OSDN Git Service

* Makefile.in (LN): Remove duplicate definition.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2
3         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
4
5 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
6
7         * init.c (begin_init_stmts): Don't use // comments.
8
9 2000-09-12  Jason Merrill  <jason@redhat.com>
10
11         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
12         all non-extern arrays.
13
14         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15         typenames, too.  Downgrade complaint to pedwarn.
16         (xref_tag): Warn about surprising behavior of 'friend struct T'.
17         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
18         'class This::Inherited'.
19
20 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
21
22         * decl.c (finish_case_label): Given the LABEL_DECL a
23         DECL_CONTEXT.
24
25 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
26
27         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
28         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
29         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
30         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
31         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
32         New macros.
33         (sorry_for_unsupported_tree, print_scope_operator,
34         print_left_paren, print_right_paren, print_left_bracket,
35         print_right_bracket, print_whitespace): Likewise.
36         (aggr_variety): Rename to class_key_or_enum.
37         (print_type): Rename to print_type_id.
38         (print_type_specifier_seq, print_simple_type_specifier,
39         print_elaborated_type_specifier,
40         print_rest_of_abstract_declarator,
41         print_parameter_declaration_clause, print_exception_specification,
42         print_nested_name_specifier, print_template_id,
43         typedef_original_name,  print_template_argument_list_start,
44         print_template_argument_list_end): New functions.
45
46 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
47
48         * ir.texi: Add more documentation.
49
50 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
51
52         * cp-tree.h (struct saved_scope): Remove x_function_parms.
53         (current_function_parms): Don't define.
54         (struct cp_language_function): Remove parms_stored.
55         (current_function_just_assigned_this): Don't define.
56         (current_function_parms_stored): Likewise.
57         (static_ctors): Declare.
58         (static_dtors): Likewise.
59         (SF_EXPAND): Don't define.
60         (expand_start_early_try_stmts): Remove declaration.
61         (store_parm_decls): Likewise.
62         * decl.c (static_ctors): Don't declare.
63         (static_dtors): Likewise.
64         (struct binding_level): Remove this_block.
65         (poplevel): Remove dead code.
66         (set_block): Likewise.
67         (mark_binding_level): Don't mark this_block.
68         (mark_saved_scope): Don't mark x_function_parms.
69         (init_decl_processing): Don't add current_function_parms as a GC
70         root.
71         (check_function_type): Change prototype.
72         (start_function): Remove RTL-generation code.
73         (expand_start_early_try_stmts): Remove.
74         (store_parm_decls): Give it internal linkage.  Remove
75         RTL-generation code.
76         (finish_function): Remove RTL-generation code.
77         * decl2.c (static_ctors): Fix formatting.
78         (static_dtors): Likewise.
79         * method.c (use_thunk): Don't call store_parm_decls.
80         (synthesize_method): Likewise.
81         * optimize.c (maybe_clone_body): Likewise.
82         * parse.y (fn.def2): Likewise.
83         (.set_base_init): Likewise.
84         (nodecls): Likewise.
85         * pt.c (instantiate_decl): Likewise.
86         * rtti.c (synthesize_tinfo_fn): Likewise.
87         * semantics.c (genrtl_try_block): Simplify.
88         (expand_body): Use genrtl_start_function and
89         genrtl_finish_function.
90         (genrtl_start_function): New function.
91         (genrtl_finish_function): Likewise.
92
93 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
94
95         * error.c (cp_tree_printer, case 'P'): Append break.
96
97 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
98
99         * cp-tree.h (frob_opname): Declare.
100         * parse.y (saved_scopes): New static variable.
101         (cp_parse_init): Adjust.
102         (do_id): If lastiddecl is NULL, do do_identifier.
103         (operator): Save scope information.
104         (unoperator): new reduction. Restore scope information.
105         (operator_name): Append unoperator. Call frob_opname.
106         * spew.c (frob_opname): Define.
107
108 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
109
110         * decl.c, rtti.c: Include defaults.h if not already included.
111         Don't define the *_TYPE_SIZE macros.
112
113 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
114
115         * cp-tree.h (push_switch): Change prototype.
116         (check_cp_case_value): Remove declaration.
117         (decl_constant_value): Likewise.
118         * decl.c (struct cp_switch): Add switch_stmt and cases.
119         (case_compare): New function.
120         (push_switch): Set switch_stmt.  Initialize cases.
121         (pop_switch): Clean up cases.
122         (define_case_label): Rename to ...
123         (finish_case_label): ... this.  Do semantic analysis for case
124         labels here.
125         (start_function): Correct comment.
126         * decl2.c (check_cp_case_value): Remove.
127         * expr.c (do_case): Remove.
128         * pt.c (tsubst_expr): Adjust call to finish_case_label.
129         * semantics.c (genrtl_do_poplevel): Remove declaration.
130         (RECHAIN_STMTS): Remove.
131         (finish_break_stmt): Use build_break_stmt.
132         (finish_continue_stmt): Use build_continue_stmt.
133         (finish_switch_cond): Adjust condition here, rater than in
134         c_expand_start_case.
135         (finish_case_label): Remove.
136         * typeck.c (c_expand_return): Remove.
137         (c_expand_start_case): Likewise.
138         
139 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
140
141         * ir.texi: Document type nodes.
142
143 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
144
145         * cp-tree.h (init_cp_semantics): Declare.
146         (genrtl_try_block): Don't declare.
147         (genrtl_handler): Likewise.
148         (genrtl_catch_block): Likewise.
149         (genrtl_ctor_stmt): Likewise.
150         (genrtl_subobject): Likewise.
151         (genrtl_do_poplevel): Likewise.
152         (genrtl_named_return_value): Likewise.
153         * lex.c (init_parse): Call init_cp_semantics.
154         * semantics.c (genrtl_try_block): Give it internal linkage.
155         (genrtl_handler): Likewise.
156         (genrtl_catch_block): Likewise.
157         (genrtl_ctor_stmt): Likewise.
158         (genrtl_subobject): Likewise.
159         (genrtl_do_poplevel): Likewise.
160         (genrtl_named_return_value): Likewise.
161         (lang_expand_stmt): Rename to ...
162         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
163         (init_cp_semantics): Define.
164
165         * decl.c (initialize_local_var): Remove RTL-generating code.
166         * semantics.c (genrtl_try_block): Fix formatting.
167
168         Move statement-tree facilities from C++ to C front-end.
169         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
170         (void_zero_node): Remove.
171         (stmt_tree): Likewise.
172         (scope_chain): Adjust.
173         (language_function): Rename to cp_language_function.
174         (cp_function_chain): Adjust.
175         (current_stmt_tree): Remove.
176         (last_tree): Likewise.
177         (last_expr_type): Likewise.
178         (struct lang_decl): Adjust.
179         (STMT_IS_FULL_EXPR_P): Remove.
180         (add_tree): Remove.
181         (begin_stmt_tree): Likewise.
182         (finish_stmt_tree): Likewise.
183         (walk_tree_fn): Likewise.
184         (walk_stmt_tree): Likewise.
185         * class.c (finish_struct): Replace use of add_tree with add_stmt.
186         * decl.c (mark_stmt_tree): Adjust type.
187         (init_decl_processing): Don't build void_zero_node.
188         (initialize_local_var): Adjust usage of current_stmt_tree.
189         (finish_enum): Use add_stmt, not add_tree.
190         (save_function_data): Adjust use of language_function.
191         (finish_constructor_body): Use add_stmt, not add_tree.
192         (finish_destructor_body): Likewise.
193         (push_cp_function_context): Adjust use of language_function.
194         (pop_cp_function_context): Likewise.
195         (mark_lang_function): Likewise.
196         (mark_cp_function_context): Likewise.
197         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
198         (build_vec_init): Likewise.
199         * semantics.c (SET_LAST_STMT): Remove.
200         (RECHAIN_STMTS): Don't use it.
201         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
202         (current_stmt_tree): Define.
203         (add_tree): Remove.
204         (finish_goto_stmt): Use add_stmt, not add_tree.
205         (finish_expr_stmt): Likewise.
206         (begin_if_stmt): Likewise.
207         (finish_then_clause): Likewise.
208         (begin_while_stmt): Likewise.
209         (begin_do_stmt): Likewise.
210         (finish_return_stmt): Likewise.
211         (begin_for_stmt): Likewise.
212         (finish_break_stmt): Likewise.
213         (finish_continue_stmt): Likewise.
214         (begin_switch_stmt): Likewise.
215         (finish_case_label): Likewise.
216         (begin_try_block): Likewise.
217         (begin_function_try_block): Likewise.
218         (begin_handler): Likewise.
219         (begin_catch_block): Likewise.
220         (begin_compound_stmt): Likewise.
221         (begin_asm_stmt): Likewise.
222         (finish_asm_stmt): Likewise.
223         (finish_label_stmt): Likewise.
224         (add_decl_stmt): Likewise.
225         (finish_subobject): Likewise.
226         (finish_decl_cleanup): Likewise.
227         (finish_named_return_value): Likewise.
228         (setup_vtbl_ptr): Likewise.
229         (add_scope_stmt): Likewise.
230         (finish_stmt_expr): Likewise.
231         (prune_unused_decls): Remove.
232         (begin_stmt_tree): Likewise.
233         (finish_stmt_tree): Likewise.
234         (prep_stmt): Adjust use of current_stmt_tree.
235         (lang_expand_stmt): Likewise.
236         * tree.c (statement_code_p): Remove.
237         (cp_statement_code_p): New function.
238         (walk_stmt_tree): Remove.
239         (init_tree): Set lang_statement_code_p.
240         
241 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
242
243         Integrated preprocessor.
244
245         * Make-lang.in, Makefile.in: Remove all references to input.c,
246         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
247         * gxx.gperf, hash.h, input.c: Delete.
248         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
249         initialized properly.
250
251         * class.c (fixup_pending_inline): Take a tree, not a
252         struct pending_inline *.  All callers changed.
253         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
254         RID_PROTECTED entries in ridpointers[] array here.
255         * decl.c (duplicate_decls): Do not refer to struct
256         pending_inline.
257         (record_builtin_type, init_decl_processing): Use RID_MAX not
258         CP_RID_MAX.
259         (grokdeclarator): Use C_IS_RESERVED_WORD.
260         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
261         cpplib.
262         (grok_x_components): Do not inspect pending_inlines chain.
263
264         * cp-tree.h (struct lang_identifier): Add rid_code entry.
265         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
266         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
267         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
268         TIME_IDENTIFIER_FILEINFO): Kill.
269         Update prototypes.
270         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
271         single 32-bit word.
272         * parse.y: Call do_pending_inlines unconditionally.
273         reinit_parse_for_method is now snarf_method.  fn.defpen is no
274         longer necessary.  Remove unnecessary <itype> annotation on
275         SCOPE.  Do not refer to end_of_file or struct pending_inline.
276         * semantics.c (begin_inline_definitions): Call
277         do_pending_inlines unconditionally.
278
279         * lex.c: Remove all code now shared with C front end.
280         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
281         into the get_identifier table.  Rewrite pragma handling to
282         work with the registry.  Move code to save tokens for later
283         processing to spew.c.
284
285         * spew.c: Rewrite everything in terms of token streams instead
286         of text.  Move routines here from lex.c / input.c as
287         appropriate.  GC-mark trees hanging off the pending inlines
288         chain.
289
290 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
291
292         * NEWS: Mention that the named return value extension has been
293         deprecated.
294         * cp-tree.h (original_result_rtx): Define.
295         (TREE_REFERENCE_EXPR): Remove.
296         (DECL_VPARENT): Likewise.
297         (pushdecl_nonclass_level): Likewise.
298         (store_return_init): Likewise.
299         (reinit_lang_specific): Likewise.
300         (genrtl_named_return_value): Change prototype.
301         * decl.c (original_result_rtx): Remove.
302         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
303         Do not generate RTL for local variables here.
304         (store_return_init): Remove.
305         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
306         store_return_init.
307         (finish_named_return_value): Adjust accordingly.  Warn that this
308         extension is deprecated.
309         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
310
311 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
312
313         * pt.c (type_unification_real): Replace switch with if.
314         (unify): Tsubst non-type parms before comparing.
315
316 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
317
318         * error.c (dump_typename): New function, broken out of ...
319         (dump_type): ... here. Use it.
320         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
321
322 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
323
324         * init.c (build_offset_ref): Deal with namespace scoped
325         TEMPLATE_ID_EXPRs.
326
327 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
328
329         * class.c (resolve_address_of_overloaded_function): Add
330         explanation message.
331         * decl.c (define_case_label): Reformat explanation.
332         * decl2.c (finish_static_data_member_decl): Likewise.
333         (grokfield): Likewise.
334         * friend.c (do_friend): Likewise.
335
336 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
337
338         * tree.c (walk_tree): Expose tail recursion.
339         (walk_stmt_tree): New function.
340         * cp-tree.h: Prototype walk_stmt_tree.
341         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
342         the BLOCKs directly.  If a BLOCK has no variables after
343         pruning, discard it.
344         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
345         restore the line number.
346
347 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
348
349         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
350         (pt.o): Remove dependency on HTAB_H.
351         * cp-tree.h: Include hashtab.h.
352         (walk_tree): Change prototype.
353         (walk_tree_without_duplicates): New function.
354         * decl.c (check_default_argument): Use it.
355         * optimize.c (remap_decl): Adjust calls to walk_tree.
356         (copy_body): Likewise.
357         (expand_calls_inline): Likewise.
358         (calls_setjmp_p): Use walk_tree_without_duplicates.
359         * pt.c: Don't include hashtab.h.
360         (for_each_template_parm): Use walk_tree_without_duplicates.
361         * semantics.c (finish-stmt_tree): Likewise.
362         (expand_body): Likewise.
363         * tree.c (walk_tree): Add additional parameter.
364         (walk_tree_without_duplicates): New function.
365         (count_trees): Use it.
366         (verify_stmt_tree): Adjust call to walk_tree.
367         (find_tree): Use walk_tree_without_duplicates.
368         (no_linkage_check): Likewise.
369         (break_out_target_exprs): Adjust call to walk_tree.
370         (cp_unsave): Likewise.
371
372 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
373
374         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
375         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
376         * cp-tree.h (TYPE_BINFO): Adjust comment.
377         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
378         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
379         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
380         (TYPE_TEMPLATE_INFO): Likewise.
381         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
382         * class.c (push_nested_class): Likewise.
383         * decl.c (lookup_name_real): Likewise.
384         (grokdeclarator): Likewise.
385         (grok_op_properties): Likewise.
386         (xref_tag): Likewise.
387         (xref_basetypes): Likewise.
388         * decl2.c (constructor_name_full): Likewise.
389         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
390         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
391         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
392         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
393         (dump_type_suffix): Likewise.
394         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
395         instead.
396         (get_aggr_from_typedef): Likewise.
397         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
398         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
399         (write_template_parm): Likewise.
400         (write_template_template_parm): Check tree code instead of
401         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
402         * method.c (build_overload_nested_name): Add
403         BOUND_TEMPLATE_TEMPLATE_PARM.
404         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
405         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
406         * pt.c (convert_template_argument): Check tree code instead of
407         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
408         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
409         (for_each_template_parm): Adjust comment.
410         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
411         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
412         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
413         template_args_equal to compare template template parameter cases.
414         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
415         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
416         instead.
417         * tree.c (copy_template_template_parm): Decide whether to create
418         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
419         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
420         (copy_tree_r): Likewise.
421         * typeck.c (comptypes): Likewise.  Check tree code instead of
422         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
423
424 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
425
426         * decl.c (finish_function): Move the code for handling functions
427         marked with the constructor and destructor attributes inside the
428         expand_p block.
429
430 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
431
432         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
433
434 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
435
436         * pt.c (lookup_template_class): Remove abort.
437         * tree.c (get_type_decl): Allow error_mark_node.
438
439 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
440
441         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
442         TEMPLATE_ID_EXPRs.
443
444 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
445
446         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
447         new ABI mangling.
448
449 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
450
451         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
452         union tag mismatch error reporting.
453
454 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
455
456         * call.c (build_scoped_method_call): Check it is not a namespace.
457
458 2000-08-30  Jason Merrill  <jason@redhat.com>
459
460         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
461
462         * tree.c (bot_manip): Check TREE_CONSTANT rather than
463         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
464         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
465
466         * decl.c (start_function): Always call make_function_rtl.
467
468 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
469
470         * semantics.c (prune_unused_decls): New function.
471         (finish_stmt_tree): Call it via walk_tree.
472
473 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
474
475         * class.c (build_secondary_vtable): Constify a char *.
476         * decl.c (init_decl_processing): Initialize function_id_node,
477         pretty_function_id_node, and func_id_node.
478         * input.c (struct input_source): Constify 'str'.
479         (feed_input): Constify first argument.
480         * mangle.c (write_identifier): Constify argument.
481         * pt.c (mangle_class_name_for_template): Constify argument.
482
483 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
484
485         * typeck.c (mark_addressable): Remove code that pokes around in
486         RTL.
487
488 2000-08-28  Jason Merrill  <jason@redhat.com>
489
490         * lex.c (file_name_nondirectory): Move to toplev.c.
491
492         * cp-tree.h (LOCAL_CLASS_P): New macro.
493         * class.c (finish_struct_1): Use it.
494
495 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
496
497         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
498         (write_encoding): Pass another argument to write_name.
499         (write_name): Add ignore_local_scope parameter.  Fix handling of
500         local names.
501         (write_nested_name): Use write_unqualified_name.
502         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
503         (write_template_prefix): Use write_unqualified_name.
504         (write_component): Remove.
505         (write_local_name): Add parameter.  Use direct local entity to
506         discriminator calculation.
507         (write_class_enum_type): Pass another argument to write_name.
508         (write_template_template_arg): Likewise.
509         (make_guard_variable): Likewise.
510
511 2000-08-27  Jason Merrill  <jason@redhat.com>
512
513         * decl.c (pushdecl): Matching decls for local externs are found in
514         the current level.  Propagate linkage information from previous
515         declarations.
516
517 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
518
519         * ir.texi (Expressions): Fix typo.
520
521 2000-08-25  Greg McGary  <greg@mcgary.org>
522
523         * tree.c (init_tree): Use ARRAY_SIZE.
524
525 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
526
527         * error.c (cp_tree_printer): Rework.
528
529 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
530
531         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
532         dyn-string.o.
533         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
534         (cp-demangle.o): Remove target.
535         (dyn-string.o): Likewise.
536
537         * decl.c (grokfndecl): Require that `main' return an `int'.
538         * mangle.c (write_encoding): Don't mangle return types for
539         conversion functions.
540
541 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
542
543         * error.c (tree_formatting_info): New data type.
544         (tree_being_formatted): New macro.
545         (tree_formatting_flags): Likewise.
546         (put_whitespace): Likewise.
547         (print_tree_identifier): Likewise.
548         (print_identifier): Likewise.
549         (cp_tree_printer, print_function_argument_list, print_declaration,
550         print_expression, print_function_declaration,
551         print_function_parameter, print_type, print_cv_qualifier): New
552         functions.
553         (init_error): Initialize lang_printer.
554
555 2000-08-24  Jason Merrill  <jason@redhat.com>
556
557         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
558         adjustment necessary.
559
560 2000-08-24  Greg McGary  <greg@mcgary.org>
561
562         * cp-tree.h (MAIN_NAME_P): Remove macro.
563
564 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
565
566         * error.c (print_instantiation_context): Don't forget to flush the
567         buffer.
568
569 2000-08-23  Jason Merrill  <jason@redhat.com>
570
571         * typeck.c (build_ptrmemfunc): Save the input pmf.
572
573         * method.c (process_modifiers): Use same_type_p.
574
575 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
576
577         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
578         * mangle.c (write_function_type): Change prototype.
579         (write_encoding): Don't mangle return types for
580         constructors or destructors.
581         (write_type): Adjust call to write_function_type.
582         * pt.c (instantiate_template): Instantiate alternate entry points
583         when instantiating the main function.
584
585 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
586
587         * error.c (cp_print_error_function): Don't use embedded '\n' in
588         output_printf.
589
590 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
591
592         * decl.c (init_decl_processing): Remove bogus initialization.
593         * error.c (lang_print_error_function): Restore here.
594         (init_error): Initialize print_error_function.
595
596 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
597
598         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
599
600 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
601
602         * Makefile.in (error.o): Depends on diagnostic.h
603
604         * cp-tree.h (problematic_instantiation_changed,
605         record_last_problematic_instantiation, current_instantiation,
606         print_instantiation_context): Declare.
607         (maybe_print_template_context): Remove.
608
609         * decl.c (init_decl_processing): Set print_error_function to NULL.
610         (lang_print_error_function): Remove, since we're using a new
611         machinery.
612
613         * error.c: #include diagnostic.h
614         (function_category): New function.
615         (cp_diagnostic_starter): Likewise.
616         (cp_diagnostic_finalizer): Likewise.
617         (cp_print_error_function): Likewise.
618         (maybe_print_instantiation_context): Likewise.
619         (print_instantiation_full_context): Likewise.
620         (print_instantiation_partial_context): Likewise.
621         (print_instantiation_context): Define.
622         (init_error): Initialize diagnostic pager and finalizer.
623
624         * pt.c (problematic_instantiation_changed): Define.
625         (record_last_problematic_instantiation): Likewise.
626         (current_instantiation): Likewise.
627         (maybe_print_template_context): Remove.
628         (print_template_context): Likewise.
629         (current_tinst_level): Make static to reflect Brendan Kehoe's
630         change of 1995-04-13.
631         (push_tinst_level): Call print_instantiation_context.
632
633 2000-08-21  Nix  <nix@esperi.demon.co.uk>
634
635         * lang-specs.h: Do not process -o or run the assembler if
636         -fsyntax-only.
637
638 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
639
640         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
641         variables.
642         * decl2.c (lang_decode_option): Disable gettext attributes for
643         -ansi.
644
645 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
646
647         * lex.c (lang_init_options): Default diagnostic message maximum
648         length to 80, when line-wrapping.
649
650 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
651
652         * class.c (build_vtbl_initializer): Clear the entire
653         vtbl_init_data.  Start keeping track of the functions for which we
654         have created vcall offsets here.
655         (dfs_build_vcall_offset_vtbl_entries): Remove.
656         (build_vcall_offset_vtbl_entries): Reimplement.
657         (add_vcall_offset_vtbl_entries_r): New function.
658         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
659         computing when vcall offsets are necessary.
660
661 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
662
663         * decl.c (member_function_or_else): Use cp_error ... %T.
664         (grokdeclarator): Likewise.
665         (start_method): Likewise.
666         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
667
668 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
669
670         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
671         TYPE_DECLs.
672
673 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
674
675         * cp-tree.h (PTRMEM_OK_P): New macro.
676         (itf_ptrmem_ok): New enumeration value.
677         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
678         argument. Diagnose implicit pointer to member.
679         (instantiate_type): Don't diagnose implicit pointer to member
680         here. Pass itf_ptrmem_ok if ok. Adjust calls to
681         resolve_address_of_overloaded_function.
682         * init.c (build_offset_ref): Set PTRMEM_OK_P.
683         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
684         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
685         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
686         (build_unary_op): Deal with single non-static member in
687         microsoft-land.
688
689 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
690
691         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
692
693 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
694
695         * cp-tree.h (enum_name_string): Remove prototype.
696         (report_case_error): Remove prototype.
697         * cp/typeck2.c (enum_name_string): Remove.
698         (report_case_error): Remove.
699         * error.c (dump_expr): Deal with enum values directly.
700         Correctly negate integer constant.
701
702 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
703
704         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
705         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
706         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
707         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
708         (__cxa_vec_new): Use __cxa_vec_new2.
709         (__cxa_vec_delete): Use __cxa_vec_delete2.
710
711 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
712
713         * vec.cc (__cxa_vec_new): Set "C" linkage.
714         (__cxa_vec_ctor): Likewise.
715         (__cxa_vec_cctor): Likewise.
716         (__cxa_vec_dtor): Likewise.
717         (__cxa_vec_delete): Likewise.
718         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
719         (__cxa_vec_ctor): Likewise.
720         (__cxa_vec_cctor): Likewise.
721         (__cxa_vec_dtor): Likewise.
722         (__cxa_vec_delete): Likewise.
723
724 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
725
726         * class.c (instantiate_type): Reinstate local variable
727         deleted in previous change.
728
729         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
730         itf_no_attributes.
731
732 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
733
734         * cp-tree.h (instantiate_type_flags): New enumeration.
735         (instantiate_type): Change parameter.
736         * class.c (instantiate_type): Adjust prototype. Adjust.
737         * call.c (standard_conversion): Adjust instantiate_type call.
738         (reference_binding): Likewise.
739         (build_op_delete_call): Likewise.
740         (convert_like_real): Likewise.
741         * cvt.c (cp_convert_to_pointer): Likewise.
742         (convert_to_reference): Likewise.
743         * pt.c (convert_nontype_argument): Likewise.
744         * typeck.c (build_binary_op): Likewise.
745         (build_ptrmemfunc): Likewise.
746         (convert_for_assignment): Likewise.
747
748 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
749
750         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
751         (current_aggr): Define.
752         * decl.c (grokdeclarator): Make sure a friend class is an
753         elaborated type specifier.
754         * parse.y (current_aggr): Remove static definition.
755         (cp_parse_init): Adjust.
756         (structsp): Clear and restore current_aggr.
757         (component_decl_list): Clear current_aggr.
758
759         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
760         aggregate tag on the typename's context.
761
762         * pt.c (tsubst_friend_class): Return error_mark_node, if
763         parms becomes NULL.
764         (instantiate_class_template): Ignore error_mark_node friend types.
765
766 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
767
768         * cvt.c (warn_ref_binding): New static function, broken out of ...
769         (convert_to_reference): ... here. Use it.
770
771 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
772
773         * parse.y (template_arg): Add rule for template qualified with
774         global scope.
775
776 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
777
778         * decl2.c (add_function): Reorganize.
779         (arg_assoc): Do not consider function template decls.
780
781 2000-08-11  Jason Merrill  <jason@redhat.com>
782
783         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
784         looking inside.
785
786 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
787
788         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
789         (lookup_nested_tag): Likewise.
790
791         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
792         can be produced.
793
794 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
795
796         * parse.y (named_complex_class_head_sans_basetype): Remove
797         always true if.
798
799 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
800
801         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
802         explicit TEMPLATE_ID_EXPR args.
803         (build_expr_from_tree, case CALL_EXPR): Likewise.
804
805 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
806
807         * decl.c (check_tag_decl): Diagnose typename's which don't
808         declare anything.
809
810 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
811
812         * init.c (build_aggr_init): Reject bogus array initializers
813         early.
814
815 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
816
817         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
818         runtime.
819         * cp/tinfo.cc (__dynamic_cast): Likewise.
820         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
821
822 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
823
824         * cvt.c (convert_to_pointer_force): Fix error message when
825         attempting to cast from ambiguous base.
826
827 2000-08-08  Jason Merrill  <jason@redhat.com>
828
829         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
830         (tsubst_template_arg_vector): Likewise.
831
832         * decl2.c (build_anon_union_vars): Choose the largest field; don't
833         assume that one will be as large as the union.
834
835 2000-08-07  Kazu Hirata  <kazu@hxi.com>
836
837         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
838         * decl.c (pop_labels): Likewise.
839
840 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
841
842         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
843         specifications.
844         (__pointer_to_member_type_info): Likewise.
845         (__base_class_info): Likewise.
846         (__class_type_info): Likewise.
847         (__si_class_type_info): Likewise.
848         (__vmi_class_type_info): Likewise.
849         * tinfo.cc (__si_class_type_info::__do_find_public_src):
850         Changed member names to match specifications.
851         (__vmi_class_type_info::__do_find_public_src): Likewise.
852         (__si_class_type_info::__do_dyncast): Likewise.
853         (__vmi_class_type_info::__do_dyncast): Likewise.
854         (__si_class_type_info::__do_upcast): Likewise.
855         (__vmi_class_type_info::__do_upcast): Likewise.
856         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
857         (__pbase_type_info::__pointer_catch): Likewise.
858         (__pointer_type_info::__pointer_catch): Likewise.
859         (__pointer_to_member_type_info::__pointer_catch): Likewise.
860
861
862 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
863
864         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
865         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
866         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
867
868 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
869
870         * cp-tree.h (add_method): Change prototype.
871         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
872         Don't double the size of the method vector in the error case.
873         (handle_using_decl): Adjust call to add_method.
874         (add_implicitly_declared_members): Likewise.
875         (clone_function_decl): Likewise.
876         * decl2.c (check_classfn): Likewise.
877         * semantics.c (finish_member_declaration): Likewise.
878
879 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
880
881         * decl.c (flag_isoc94): New variable.
882
883 2000-08-02  Jason Merrill  <jason@redhat.com>
884
885         * pt.c (do_type_instantiation): Add complain parm; don't complain
886         if called recursively.
887         * cp-tree.h, parse.y: Adjust.
888
889 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
890
891         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
892         -Wno-strict-prototypes.
893
894         * g++spec.c: Adjust type of second argument to
895         lang_specific_driver, and update code as necessary.
896
897         * cp-tree.h: Don't prototype min_precision here.
898         (my_friendly_assert): Cast expression to void.
899         * semantics.c (do_poplevel): Initialize scope_stmts.
900
901 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
902
903         * cp-tree.h (DECL_NEEDED_P): Tweak.
904
905 2000-07-28  Jason Merrill  <jason@redhat.com>
906
907         * lang-specs.h: Use %i in rule for .ii files.
908
909 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
910
911         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
912
913 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
914
915         Allow indirect primary bases.
916         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
917         primary_base.
918         (CLASSTYPE_VFIELD_PARENT): Remove.
919         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
920         (BINFO_PRIMARY_BINFO): Remove.
921         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
922         (BINFO_VBASE_PRIMARY_P): Likewise.
923         (BINFO_PRIMARY_BASE_OF): New macro.
924         (BINFO_INDIRECT_PRIMARY_P): Likewise.
925         (get_primary_binfo): New function.
926         * decl.c (lang_mark_tree): Make lang_type::primary_base.
927         * class.c (vcall_offset_data_s): Rename to ...
928         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
929         and add ctor_vtbl_p.
930         (get_derived_offset): Use get_primary_binfo.
931         (dfs_mark_primary_bases): Adjust handling of virtual primary
932         bases.
933         (mark_primary_bases): Likewise.
934         (set_primary_base): Take a binfo, not an integer, as a
935         representation of the primary base.
936         (indirect_primary_base_p): Remove.
937         (determine_primary_base): Adjust for indirect primary bases.
938         (dfs_find_final_overrider): Fix typo in coment.
939         (update_vtable_entry_for_fn): Use get_primary_binfo.
940         (layout_nonempty_base_or_field): Tweak.
941         (build_base_fields): Adjust for new primary base semantics.
942         (dfs_propagate_binfo_offsets): Remove.
943         (propagate_binfo_offsets): Rewrite.
944         (dfs_set_offset_for_shared_vbases): Remove.
945         (layout_virtual_bases): Don't use it.
946         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
947         ABI.
948         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
949         CLASSTYPE_VFIELD_PARENT.
950         (dfs_get_primary_binfo): New function.
951         (get_primary_binfo): Likewise.
952         (dump_class_hierarchy_r): Tweak printing of primary bases.
953         (build_vtbl_initializer): Fix typo in comments.  Use
954         vtbl_init_data.
955         (build_vcall_and_vbase_vtbl_entries): Likewise.
956         (build_vbaes_offset_vtbl_entries): Likewise.
957         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
958         BV_VCALL_INDEX to handle indirect primary bases.
959         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
960         (build_rtti_vtbl_entries): Likewise.
961         * search.c (get_shared_vbase_if_not_primary): Tweak.
962         (find_vbase_instance): Likewise.
963         (binfo_for_vtable): Simplify.
964         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
965         (make_binfo): Make it have 11 entries.
966
967 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
968
969         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
970         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
971         ascertaining primaryness.
972         (G): Remove template_args.
973         (decl_is_template_id): New function.
974         (write_encoding): Use decl_is_template_id.
975         (write_name): Likewise.  Handle type_decls.  Get main variant of
976         type decls.
977         (write_nested_name): Likewise.
978         (write_prefix): Likewise.
979         (write_template_prefix): Likewise.
980         (write_special_name_constructor): Remove defunct production from
981         comment.
982         (write_bare_function_type): Remove comment about absent parameter.
983         (write_template_template_arg): Add missing grammar production to
984         comment.
985
986 2000-07-27  Jason Merrill  <jason@redhat.com>
987
988         * decl.c (duplicate_decls): If common_type produces a non-typedef
989         type for a typedef, just use the old type.
990
991 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
992
993         * cp-tree.h (function_depth): Declare.
994         (verify_stmt_tree): Likewise.
995         (find_tree): Likewise.
996         * decl.c (function_depth): Give it external linkage.
997         * optimize.c (optimize_function): Increment and decrement it.
998         * tree.c (verify_stmt_tree_r): New function.
999         (verify_stmt_tree): Likewise.
1000         (find_tree_r): Likewise.
1001         (find_tree): Likewise.
1002
1003 2000-07-27  Jason Merrill  <jason@redhat.com>
1004
1005         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
1006         TYPE_PTRMEMFUNC_P.
1007         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
1008
1009 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
1010
1011         * decl.c (start_cleanup_fn): Mark the function as `inline'.
1012         * decl2.c (get_guard): Call cp_finish_decl, not
1013         rest_of_decl_compilation, for local guards.
1014         * lex.c (do_identifier): Remove unused variable.
1015
1016 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
1017
1018         * parse.y:  Add missing ';'.
1019
1020 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
1021
1022         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
1023         of `extern "C++"'.
1024
1025 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1026
1027         Kill strict_prototype. Backwards compatibility only for
1028         non NO_IMPLICIT_EXTERN_C systems.
1029         * cp-tree.h (flag_strict_prototype): Remove.
1030         (strict_prototype): Remove.
1031         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
1032         * decl.c (maybe_push_to_top_level): Adjust.
1033         (pop_from_top_level): Adjust.
1034         (decls_match): Only allow sloppy parm matching for ancient
1035         system headers.
1036         (init_decl_processing): Adjust.
1037         (grokdeclarator): Adjust.
1038         * decl2.c (flag_strict_prototype): Remove.
1039         (strict_prototype): Remove.
1040         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
1041         (lang_f_options): Remove "strict-prototype".
1042         (unsupported-options): Add "strict-prototype".
1043         * lex.c (do_identifier): Adjust.
1044         (do_scoped_id): Adjust.
1045         * parse.y (empty_parms): Adjust.
1046         * class.c (push_lang_context): Adjust.
1047         (pop_lang_context): Adjust.
1048         * typeck.c (comp_target_parms): Adjust.
1049
1050 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
1051
1052         * decl.c (poplevel): Deal with anonymous variables at for scope.
1053         (maybe_inject_for_scope_var): Likewise.
1054
1055 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
1056
1057         * decl.c: Remove all signal handling code, now done in toplev.c.
1058
1059 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
1060
1061         * decl.c (make_rtl_for_nonlocal_decl): Rework.
1062
1063         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
1064         correctly.
1065
1066 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
1067
1068         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
1069         Define my_friendly_assert and my_friendly_abort as macros
1070         which may call friendly_abort.  Prototype friendly abort, not
1071         my_friendly_abort or my_friendly_assert.
1072         * decl.c (signal_catch): Report the signal caught in the error
1073         message.  Call fatal directly.
1074         * typeck2.c (ack, my_friendly_assert): Delete.
1075         (my_friendly_abort): Rename to friendly_abort.  Expect file,
1076         line, and function parameters.  Report the abort code, then
1077         call fancy_abort.  Do not mask an abort if errors have
1078         already occurred.
1079
1080 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1081
1082         * typeck.c (comp_target_parms): Remove obsolete parameter.
1083         (comp_target_types): Adjust.
1084
1085 2000-07-17  Jason Merrill  <jason@redhat.com>
1086
1087         * typeck.c (mark_addressable): Never set TREE_USED.
1088         * call.c (build_call): Don't abort on calls to library functions
1089         that have been declared normally.
1090
1091         * typeck.c (build_binary_op): Fix grammar in warning.
1092
1093         * exception.cc (__eh_free): Fix prototype.
1094
1095         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
1096
1097         * decl.c (pushdecl): Handle seeing an OVERLOAD in
1098         IDENTIFIER_NAMESPACE_VALUE.
1099
1100 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
1101
1102         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
1103         * method.c (use_thunk): Correct handling of vcall offsets.
1104
1105 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
1106
1107         * .cvsignore: parse.h and parse.c have no cp- prefix.
1108
1109 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
1110
1111         * .cvsignore: New file.
1112
1113 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
1114
1115         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
1116
1117 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
1118
1119         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
1120         * parse.c: Remove.
1121         * parse.h: Likewise.
1122
1123 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
1124
1125         * class.c (layout_class_type): Add pointers to virtual bases after
1126         base classes under the old ABI.
1127
1128 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
1129
1130         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
1131         (finish_continue_stmt): Likewise.
1132         (begin_for_stmt): Remove call to note_level_for_for.
1133         (finish_goto_stmt): Change call from build_min_nt
1134         to build_stmt.
1135         (finish_expr_stmt): Likewise.
1136         (begin_if_stmt): Likewise.
1137         (begin_while_stmt): Likewise.
1138         (finish_while_stmt): Likewise.
1139         (finish_return_stmt): Likewise.
1140         (begin_for_stmt): Likewise.
1141         (finish_for_stmt): Likewise.
1142         (finish_break_stmt): Likewise.
1143         (begin_switch_stmt): Likewise.
1144         (finish_case_label): Likewise.
1145         (genrtl_try_block): Likewise.
1146         (begin_try_block): Likewise.
1147         (begin_handler): Likewise.
1148         (begin_compound_stmt): Likewise.
1149         (finish_asm_stmt): Likewise.
1150         (finish_label_stmt): Likewise.
1151         (add_decl_stmt): Likewise.
1152         (finish_subobject): Likewise.
1153         (finish_decl_cleanup): Likewise.
1154         (finish_named_return_value): Likewise.
1155         (setup_vtbl_ptr): Likewise.
1156         (add_scope_stmt): Likewise.
1157         * decl.c (finish_constructor_body): Likewise.
1158         (finish_destructor_body): Likewise.
1159         * optimize.c (copy_body_r): Likewise.
1160         (initialize_inlined_parameters): Likewise.
1161         (declare_return_variable): Likewise.
1162         (expand_call_inline): Likewise.
1163
1164 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
1165
1166         * semantics.c (expand_body): Sync interface information
1167         at the end of function body expansion.
1168
1169 2000-07-09  Jason Merrill  <jason@redhat.com>
1170
1171         * init.c (build_new_1): Bail early if the call to new fails.
1172
1173         * decl.c (compute_array_index_type): Check specifically for
1174         an INTEGER_CST, not just TREE_CONSTANT.
1175
1176         * decl.c (duplicate_decls): Don't call duplicate_decls on
1177         the DECL_TEMPLATE_RESULT.
1178         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
1179         codes.
1180
1181         * error.c (dump_template_bindings): Don't crash if we had an
1182         invalid argument list.
1183
1184         * typeck.c (c_expand_start_case): Do narrowing here.
1185         * semantics.c (finish_switch_cond): Not here.
1186
1187 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
1188
1189         * parse.y (asm_clobbers): Do string concatenation.
1190
1191 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
1192
1193         * decl.c (pushtag): Don't put local classes in template functions
1194         on the local_classes list.
1195
1196 2000-07-04  Scott Snyder  <snyder@fnal.gov>
1197
1198         * decl2.c (get_guard): Add missing return for old ABI local
1199         variable case.
1200
1201 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
1202
1203         * cp-tree.h (char_type_p): New function.
1204         * decl.c (init_decl_processing): Don't initialize
1205         signed_wchar_type_node or unsigned_wchar_type_node.
1206         (complete_array_type): Handle brace-enclosed string-constants.
1207         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
1208         * tree.c (char_type_p): New function.
1209         * typeck2.c (digest_init): Use char_type_p.
1210
1211 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
1212
1213         * pt.c (tsubst): Don't layout type, if it's error_mark.
1214
1215 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
1216
1217         * pt.c (instantiate_pending_templates): Reset template level.
1218
1219 2000-07-05  Jason Merrill  <jason@redhat.com>
1220
1221         * call.c (joust): Don't complain about `operator char *()' beating
1222         `operator const char *() const'.
1223
1224 2000-07-04  scott snyder  <snyder@fnal.gov>
1225             Jason Merrill  <jason@redhat.com>
1226
1227         * repo.c (repo_get_id): Handle the case where a class with virtual
1228         bases has a null TYPE_BINFO_VTABLE.
1229
1230 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
1231             Jason Merrill  <jason@redhat.com>
1232
1233         * parse.y (member_init): Just pass in the type.
1234         * init.c (expand_member_init): Handle getting a type.
1235
1236 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1237             Jason Merrill  <jason@redhat.com>
1238
1239         * decl.c (finish_function): Warn if a function has no return
1240         statement.
1241         Suggested by Andrew Koenig.
1242         * typeck.c (check_return_expr): Do set current_function_returns_value
1243         if we got an error_mark_node.
1244
1245 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
1246
1247         * decl2.c (push_decl_namespace): Push the original namespace.
1248
1249 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
1250
1251         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
1252         * semantics.c (begin_class_definition): Clear it.
1253
1254 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
1255
1256         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
1257         (genrtl_expr_stmt): Likewise.
1258         (genrtl_decl_stmt): Likewise.
1259         (genrtl_if_stmt): Likewise.
1260         (genrtl_while_stmt): Likewise.
1261         (genrtl_do_stmt): Likewise.
1262         (genrtl_return_stmt): Likewise.
1263         (genrtl_for_stmt): Likewise.
1264         (genrtl_break_stmt): Likewise.
1265         (genrtl_continue_stmt): Likewise.
1266         (genrtl_scope_stmt): Likewise.
1267         (genrtl_switch_stmt): Likewise.
1268         (genrtl_case_label): Likewise.
1269         (genrtl_begin_compound_stmt): Likewise.
1270         (genrtl_finish_compound_stmt): Likewise.
1271         (genrtl_compound_stmt): Likewise.
1272         (genrtl_asm_stmt): Likewise.
1273
1274         * init.c (begin_init_stmts): Remove call to
1275         genrtl_begin_compound_stmt.
1276         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
1277
1278         * semantics.c (lang_expand_stmt): Changed call to
1279         genrtl_compound_stmt to ignore return value.
1280
1281 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
1282
1283         * mangle.c (canonicalize_for_substitution): Return the canonical
1284         variant of a type.
1285
1286         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
1287         TYPE_DECL.
1288         * typeck.c (commonparms): Remove obstack manipulations.
1289
1290 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
1291
1292         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
1293
1294         * Makefile.in (OBJS): Added ../c-semantics.o.
1295         (OBJDEPS): Likewise.
1296
1297         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
1298         ../c-common.h.
1299         (struct stmt_tree): Added comment.
1300         (current_function_name_declared): Removed.
1301         (stmts_are_full_exprs_p): Likewise.
1302         (genrtl_do_pushlevel): Likewise.
1303         (genrtl_clear_out_block): Likewise.
1304         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
1305         (DECL_ANON_UNION_ELEMS): Likewise.
1306         (emit_local_var): Likewise.
1307         (make_rtl_for_local_static): Likewise.
1308         (do_case): Likewise.
1309         (expand_stmt): Likewise.
1310         (genrtl_decl_cleanup): Likewise.
1311         (c_expand_asm_operands): Likewise.
1312         (c_expand_return): Likewise.
1313         (c_expand_start_case): Likewise.
1314
1315         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
1316         (emit_local_var): Likewise.
1317         (initialize_local_var): Change reference to
1318         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
1319         Change reference to stmts_are_full_exprs_p to
1320         current_stmt_tree->stmts_are_full_exprs_p.
1321         (push_cp_function_context): Likewise.
1322
1323         * expect.c (expand_throw): Change reference to
1324         stmts_are_full_exprs_p.
1325
1326         * init.c (build_aggr_init): Change reference to
1327         stmts_are_full_exprs_p.
1328         (build_vec_init): Likewise.
1329
1330         * optimize.c (maybe_clone_body): Change reference to
1331         current_function_name_declared to
1332         cp_function_chain->name_declared.
1333
1334         * pt.c (instantiate_decl): Change reference to
1335         current_function_name_declared to
1336         cp_function_chain->name_declared.
1337
1338         * semantics.c (expand_cond): Moved declaration to c-common.h.
1339         (genrtl_do_pushlevel): Moved to c-semantics.c.
1340         (genrtl_clear_out_block): Likewise.
1341         (genrtl_goto_stmt): Likewise.
1342         (genrtl_expr_stmt): Likewise.
1343         (genrtl_decl_stmt): Likewise.
1344         (gerntl_if_stmt): Likewise.
1345         (genrtl_while_stmt): Likewise.
1346         (genrtl_do_stmt): Likewise.
1347         (genrtl_return_stmt): Likewise.
1348         (genrtl_for_stmt): Likewise.
1349         (genrtl_break_stmt): Likewise.
1350         (genrtl_continue_stmt): Likewise.
1351         (genrtl_scope_stmt): Likewise.
1352         (genrtl_switch_stmt): Likewise.
1353         (genrtl_case_label): Likewise.
1354         (genrtl_begin_compound_stmt): Likewise.
1355         (genrtl_finish_compound_stmt): Likewise.
1356         (genrtl_compound_stmt): Likewise.
1357         (genrtl_asm_stmt): Likewise.
1358         (genrtl_decl_cleanup): Likewise.
1359         (expand_cond): Likewise.
1360         (expand_stmt): Renamed to ...
1361         (lang_expand_stmt): ... this.
1362         (lang_expand_expr_stmt): Initialize.
1363         (set_current_function_name_declared): Likewise.
1364         (stmts_are_full_exprs_p): Likewise.
1365         (current_function_name_declared): Likewise.
1366         (anon_aggr_type_p): Likewise.
1367         (do_poplevel): Change reference to
1368         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
1369         Change reference to stmts_are_full_exprs_p to
1370         current_stmt_tree->stmts_are_full_exprs_p.
1371         (add_tree): Likewise.
1372         (finish_expr_stmt): Likewise.
1373         (prep_stmt): Likewise.
1374         (lang_expand_stmt): Likewise.
1375         (begin_compound_stmt): Change reference to
1376         current_function_name_declared to
1377         cp_function_chain->name_declared and call to
1378         current_function_name_declared().
1379         (setup_vtbl_ptr): Likewise.
1380         (genrtl_do_poplevel): Removed.
1381
1382 2000-06-30  Jason Merrill  <jason@redhat.com>
1383
1384         * init.c (init_init_processing): Go back to aligning like
1385         double_type_node for old ABI.
1386         (get_cookie_size): Make cookie larger if we get a type that needs
1387         more alignment.
1388         (build_vec_delete): Call it.
1389
1390         * typeck.c (qualify_type_recursive): New fn.
1391         (composite_pointer_type): Use it.
1392         (build_binary_op): Use composite_pointer_type.
1393
1394 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
1395             Jason Merrill  <jason@redhat.com>
1396
1397         * typeck.c (check_return_expr): Don't complain about returning
1398         NULL from operator new if -fcheck-new.
1399         * cp-tree.h: Declare flag_check_new here.
1400         * init.c: Not here.
1401
1402 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
1403
1404         * mangle.c (find_substitution): Use same_type_p.
1405         (write_encoding): Don't check for substitutions.
1406
1407 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
1408
1409         * parse.y (expr_no_comma_rangle): New non-terminal.
1410         (template_parm): Use it for default parameter case.
1411         (template_arg): Use it.
1412         (expr_no_commas): Remove commented out undefined extensions.
1413         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
1414         * parse.h, parse.c: Rebuilt.
1415
1416 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
1417
1418         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
1419         (finish_asm_stmt): Do it here, instead.
1420
1421         * cp-tree.h (ridpointers): Don't declare.
1422         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
1423         (record_builtin_java_type): Likewise.
1424         (init_decl_processing): Likewise.
1425         * lex.c: Move inclusion of lex.h.
1426         (ridpointers): Don't define.
1427         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
1428         RID_MAX.
1429         * lex.h (enum rid): Rename to ...
1430         (enum cp_rid): ... this.
1431         (ridpointers): Don't declare.
1432         * parse.y: Move inclusion of lex.h.
1433         * parse.c: Regenerated.
1434         * spew.c: Move inclusion of lex.h.
1435
1436         * cp-tree.h (struct language_function): Remove temp_name_counter.
1437         (temp_name_counter): Remove.
1438         (get_temp_name): Change prototype.
1439         (get_guard): New function.
1440         (get_guard_cond): Likewise.
1441         (set_guard): Likewise.
1442         * cvt.c (build_up_reference): Adjust call to get_temp_name.
1443         * decl.c (expand_static_init): Use get_guard and friends to
1444         implement guard variables.
1445         * decl2.c (get_temp_name): Assume that the variables created are
1446         always static.
1447         (get_sentry): Rename to ...
1448         (get_guard): ... this.  Implement new ABI guard variables.
1449         (get_guard_bits): New function.
1450         (get_guard_cond): Likewise.
1451         (set_guard): Likewise.
1452         (start_static_initialization_or_destruction): Use them.
1453         (do_static_initialization): Replace sentry with guard throughout.
1454         (do_static_destruction): Likewise.
1455         * init.c (create_temporary_var): Add comment.
1456
1457 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
1458
1459         * mangle.c (find_substitution): Use same_type_p.
1460         (write_encoding): Don't check for substitutions.
1461
1462 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
1463
1464         * parse.y (expr_no_comma_rangle): New non-terminal.
1465         (template_parm): Use it for default parameter case.
1466         (template_arg): Use it.
1467         (expr_no_commas): Remove commented out undefined extensions.
1468         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
1469         * parse.h, parse.c: Rebuilt.
1470
1471 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
1472
1473         * cp-tree.h (flag_const_strings): Remove.
1474         (warn_parentheses): Likewise.
1475         (warn_format): Likewise.
1476         (common_type): Likewise.
1477         (default_conversion): Likewise.
1478         (build_binary_op): Likewise.
1479         (cp_build_binary_op): New macro.
1480         * call.c (build_new_op): Use cp_build_binary_op instead of
1481         build_binary_op.
1482         * class.c (build_vtable_entry_ref): Likewise.
1483         * decl.c (expand_static_init): Likewise.
1484         (compute_array_index_type): Likewise.
1485         (build_enumerator): Likewise.
1486         * decl2.c (delete_sanity): Likewise.
1487         (start_static_initialization_or_destruction): Likewise.
1488         * error.c (dump_type_suffix): Likewise.
1489         * init.c (resolve_offset_ref): Likewise.
1490         (build_new): Likewise.
1491         (build_new_1): Likewise.
1492         (build_vec_delete_1): Likewise.
1493         (build_vec_init): Likewise.
1494         (build_delete): Likewise.
1495         * rtti.c (synthesize_tinfo_fn): Likewise.
1496         (synthesize_tinfo_var): Likewise.
1497         * search.c (expand_upcast_fixups): Likewise.
1498         (fixup_all_virtual_upcast_offsets): Likewise.
1499         * typeck.c (build_array_ref): Likewise.
1500         (get_member_function_from_ptrfunc): Likewise.
1501         (build_binary_op): Add parameter.
1502         (pointer_int_sum): Use cp_build_binary_op.
1503         (pointer_diff): Likewise.
1504         (build_modify_expr): Likewise.
1505         (get_delta_difference): Likewise.
1506         (build_ptrmemfunc): Likewise.
1507
1508 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
1509
1510         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
1511         * decl.c (create_implicit_typedef): Adjust.
1512         * decl2.c (build_artificial_parm): Adjust.
1513         * method.c (implicitly_declare_fn): Adjust.
1514         * pt.c (push_inline_template_parms_recursive): Adjust.
1515         (process_template_parm): Adjust.
1516         (overloaded_template_name): Adjust.
1517         * semantics.c (finish_template_template_parm): Adjust.
1518
1519 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
1520
1521         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
1522         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
1523         where to emit thunks.
1524         (build_vtt): Adjust call to build_vtt_inits.
1525         (build_vtt_inits): Add parameter to indicate whether or not
1526         sub-VTTs for virtual bases should be included.  Adjust handling of
1527         construction vtables.
1528         (get_matching_base): New function.
1529         (dfs_build_vtt_inits): Rename to ...
1530         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
1531         construction vtables.
1532         (dfs_fixup_binfo_vtbls): Likewise.
1533         (build_ctor_vtbl_groups): Build construction vtables for virtual
1534         bases, too.
1535         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
1536         to build construction vtbls.
1537         (dfs_accumulate_vtbl_inits): Adjust handling of
1538         construction vtables.
1539
1540         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
1541         types correctly.
1542
1543 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
1544
1545         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
1546
1547 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
1548
1549         * search.c (hides): Remove.
1550         (is_subobject_of_p): Add most_derived parameter. Use
1551         CANONICAL_BINFO.
1552         (lookup_field_queue_p): Adjust.
1553         (lookup_field_r): Adjust.
1554
1555 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
1556
1557         * decl2.c (handle_class_head): Bash typedefs to the type's main
1558         decl.
1559
1560 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
1561
1562         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
1563         (begin_global_stmt_expr): ... this.
1564         (genrtl_finish_stmt_expr): Rename to ...
1565         (finish_global_stmt_expr): ... this.
1566         * init.c (begin_init_stmts): Adjust calls.
1567         (finish_init_stmts): Likewise.
1568         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
1569         (begin_global_stmt_expr): ... this.
1570         (genrtl_finish_stmt_expr): Rename to ...
1571         (finish_global_stmt_expr): ... this.
1572
1573 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1574
1575         * search.c (lookup_member): Fix typo in comment.
1576
1577 2000-06-24  Jason Merrill  <jason@redhat.com>
1578
1579         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
1580         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
1581
1582 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1583
1584         * parse.y (complex_direct_notype_declarator): Support global_scope.
1585         * Makefile.in: Adjust conflict count.
1586
1587 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1588
1589         * parse.y (template_arg): Convert TEMPLATE_DECL
1590         that is a template template paramter to
1591         TEMPLATE_TEMPLATE_PARM here.
1592
1593         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1594         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
1595         (copy_template_template_parm): Adjust prototype.
1596         * decl.c (grokdeclarator): Remove dead code.
1597         * pt.c (process_template_parm): Tidy.
1598         (lookup_template_class): Construct nodes in
1599         copy_template_template_parm.
1600         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
1601         lookup_template_class.  Use TYPE_TI_TEMPLATE.
1602         * tree.c (copy_template_template_parm): Add NEWARGS
1603         parameter.
1604         (mapcar): Adjust call to copy_template_template_parm.
1605         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
1606         * method.c (build_template_template_parm_names): Change error
1607         code to avoid compilation warning.
1608
1609         * gxxint.texi: Document template template parameter
1610         name mangling.
1611
1612 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
1613
1614         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
1615         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
1616         (cp-demangle.o): New rule.
1617         (dyn-string.o): Likewise.
1618         * inc/cxxabi.h (__cxa_demangle): New declaration.
1619
1620 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
1621
1622         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
1623         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
1624         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
1625         a tree, not an int.
1626         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
1627         (make_thunk): Change prototype.
1628         (emit_thunk): Rename to use_thunk.
1629         (mangle_thunk): Change prototype.
1630         * class.c (get_derived_offset): Simplify.
1631         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
1632         BV_GENERATE_THUNK_WITH_VTABLE_P.
1633         (build_primary_vtable): Simplify.
1634         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
1635         (dfs_find_base): Remove.
1636         (update_vtable_entry_for_fn): Correct bug in finding the base
1637         where a virtual function was first declared.  Figure out whether
1638         or not to emit a vcall-thunk with the vtables in which it appears.
1639         Correct logic for deciding whether to use an ordinary thunk, or a
1640         vcall thunk.
1641         (finish_struct_1): Remove unnecssary code.
1642         (build_vtbl_initializer): Use ssize_int for the running counter of
1643         negative indices.
1644         (build_vtbl_initializer): Only use vcall thunks where necessary.
1645         Mark thunks as needing to be emitted with their vtables, or not.
1646         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
1647         indices.  Use size_binop.
1648         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
1649         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
1650         size_binop.
1651         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
1652         (build_vtable_entry): Mark thunks as needing to be emitted with
1653         their vtables, or not.
1654         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
1655         * decl2.c (mark_vtable_entries): Use use_thunk instead of
1656         emit_thunk.
1657         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
1658         information.
1659         * error.c (dump_expr): Use BV_FN.
1660         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
1661         not an int.
1662         * method.c (make_thunk): Likewise.
1663         (emit_thunk): Rename to use_thunk.  Allow callers to decide
1664         whether or not to actually emit the thunk.  Adjust for changes in
1665         representation of vcall offsets.
1666         * search.c (dfs_get_pure_virtuals): Use BV_FN.
1667         * semantics.c (emit_associated_thunks): New function.
1668         (expand_body): Use it.
1669         * ir.texi: Adjust decriptions of thunks.
1670
1671 2000-06-22  Jason Merrill  <jason@redhat.com>
1672
1673         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
1674         (tsubst_friend_function): Copy it here.
1675
1676         * decl.c (grok_op_properties): Fix typo.
1677
1678         * decl2.c (delete_sanity): Clarify warning, avoid failure on
1679         deleting void*.
1680
1681         * pt.c (check_explicit_specialization): Clarify error.
1682
1683         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
1684         an old OVERLOAD when we're declaring a non-function.
1685         (pushdecl, destroy_local_var): Check for error_mark_node.
1686         (warn_extern_redeclared_static): Also bail early if
1687         we're a CONST_DECL.
1688         (push_overloaded_decl): Ignore an old error_mark_node.
1689
1690 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
1691
1692         * call.c (build_x_va_arg): Check if in a template decl.
1693         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
1694
1695 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1696
1697         * class.c (push_lang_context): TYPE_NAME gets you to the Java
1698         types DECLs.
1699         * decl.c (check_goto): Computed gotos assumed OK.
1700
1701 2000-06-20  Jason Merrill  <jason@redhat.com>
1702
1703         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
1704         for which we don't need to look for instantiations.
1705
1706 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
1707
1708         * parse.y (program): Always call finish_translation_unit.
1709         * parse.c, parse.h: Rebuilt.
1710
1711 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
1712
1713         * method.c: Don't include hard-reg-set.h.
1714
1715 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1716
1717         * rtti.c (get_base_offset): Cope when vbase field is in a base.
1718
1719 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1720
1721         * call.c (build_conditional_expr): Use VOID_TYPE_P.
1722         * cvt.c (cp_convert_to_pointer): Likewise.
1723         (convert_to_void): Likewise.
1724         * error.c (dump_expr): Likewise.
1725         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
1726         * init.c (build_delete): Likewise.
1727         * method.c (emit_thunk): Likewise.
1728         * optmize.c (declare_return_variable): Likewise.
1729         * rtti.c (get_tinfo_decl_dynamic): Likewise.
1730         (get_typeid): Likewise.
1731         (build_dynamic_cast_1): Likewise.
1732         * typeck.c (composite_pointer_type): Likewise.
1733         (common_type): Likewise.
1734         (build_indirect_ref): Likewise.
1735         (build_binary_op): Likewise.
1736         (build_x_compound_expr): Likewise.
1737         (check_return_expr): Likewise.
1738         * typeck2.c (add_exception_specifier): Likewise.
1739
1740         * mangle.c (write_method_parms): Use direct comparison for end
1741         of parmlist.
1742
1743 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
1744
1745         * cp-tree.h (genrtl_try_block): Declare function.
1746         (genrtl_handler): Likewise.
1747         (genrtl_catch_block): Likewise.
1748         (genrtl_ctor_stmt): Likewise.
1749         (genrtl_subobject): Likewise.
1750         (genrtl_decl_cleanup): Likewise.
1751         (genrtl_do_poplevel): Likewise.
1752         (genrtl_do_pushlevel): Likewise.
1753         (genrtl_clear_out_block): Likewise.
1754         (genrtl_goto_stmt): Likewise.
1755         (genrtl_expr_stmt): Likewise.
1756         (genrtl_decl_stmt): Likewise.
1757         (genrtl_if_stmt): Likewise.
1758         (genrtl_while_stmt): Likewise.
1759         (genrtl_do_stmt): Likewise.
1760         (genrtl_return_stmt): Likewise.
1761         (genrtl_for_stmt): Likewise.
1762         (genrtl_break_stmt): Likewise.
1763         (genrtl_continue_stmt): Likewise.
1764         (genrtl_scope_stmt): Likewise.
1765         (genrtl_switch_stmt): Likewise.
1766         (genrtl_case_label): Likewise.
1767         (genrtl_begin_compound_stmt): Likewise.
1768         (genrtl_finish_compound_stmt): Likewise.
1769         (genrtl_compound_stmt): Likewise.
1770         (genrtl_asm_stmt): Likewise.
1771         (genrtl_named_return_value): Likewise.
1772         (genrtl_begin_stmt_expr): Likewise.
1773         (genrtl_finish_stmt_expr): Likewise.
1774         (finish_for_stmt): Removed first argument.
1775         (finish_switch_stmt): Likewise.
1776
1777         * semantics.c (genrtl_try_block): Define function.
1778         (genrtl_handler): Likewise.
1779         (genrtl_catch_block): Likewise.
1780         (genrtl_ctor_stmt): Likewise.
1781         (genrtl_subobject): Likewise.
1782         (genrtl_decl_cleanup): Likewise.
1783         (genrtl_do_poplevel): Likewise.
1784         (genrtl_do_pushlevel): Likewise.
1785         (genrtl_clear_out_block): Likewise.
1786         (genrtl_goto_stmt): Likewise.
1787         (genrtl_expr_stmt): Likewise.
1788         (genrtl_decl_stmt): Likewise.
1789         (genrtl_if_stmt): Likewise.
1790         (genrtl_while_stmt): Likewise.
1791         (genrtl_do_stmt): Likewise.
1792         (genrtl_return_stmt): Likewise.
1793         (genrtl_for_stmt): Likewise.
1794         (genrtl_break_stmt): Likewise.
1795         (genrtl_continue_stmt): Likewise.
1796         (genrtl_scope_stmt): Likewise.
1797         (genrtl_switch_stmt): Likewise.
1798         (genrtl_case_label): Likewise.
1799         (genrtl_begin_compound_stmt): Likewise.
1800         (genrtl_finish_compound_stmt): Likewise.
1801         (genrtl_compound_stmt): Likewise.
1802         (genrtl_asm_stmt): Likewise.
1803         (genrtl_named_return_value): Likewise.
1804         (genrtl_begin_stmt_expr): Likewise.
1805         (genrtl_finish_stmt_expr): Likewise.
1806         (finish_for_stmt): Removed first argument and generate rtl
1807         specific code.
1808         (finish_switch_stmt): Likewise.
1809         (do_poplevel): Removed generate rtl specific code.
1810         (do_pushlevel): Likewise.
1811         (add_tree): Likewise.
1812         (finish_goto_stmt): Likewise.
1813         (finish_expr_stmt): Likewise.
1814         (begin_if_stmt): Likewise.
1815         (finish_if_stmt_cond): Likewise.
1816         (finish_then_clause): Likewise.
1817         (begin_else_clause): Likewise.
1818         (finish_else_clause): Likewise.
1819         (finish_if_stmt): Likewise.
1820         (clear_out_block): Likewise.
1821         (begin_while_stmt): Likewise.
1822         (finish_while_stmt_cond): Likewise.
1823         (finish_while_stmt): Likewise.
1824         (begin_do_stmt): Likewise.
1825         (finish_do_body): Likewise.
1826         (finish_do_stmt): Likewise.
1827         (finish_return_stmt): Likewise.
1828         (begin_for_stmt): Likewise.
1829         (finish_for_init_stmt): Likewise.
1830         (finish_for_cond): Likewise.
1831         (finish_for_expr): Likewise.
1832         (finish_break_stmt): Likewise.
1833         (finish_continue_stmt): Likewise.
1834         (begin_switch_stmt): Likewise.
1835         (finish_switch_cond): Likewise.
1836         (finish_case_label): Likewise.
1837         (begin_try_block): Likewise.
1838         (begin_function_try_block): Likewise.
1839         (finish_try_block): Likewise.
1840         (finish_cleanup_try_block): Likewise.
1841         (finish_cleanup): Likewise.
1842         (finish_function_try_block): Likewise.
1843         (finish_handler_sequence): Likewise.
1844         (finish_function_handler_sequence): Likewise.
1845         (begin_handler): Likewise.
1846         (finish_handler_parms): Likewise.
1847         (begin_catch_block): Likewise.
1848         (finish_handler): Likewise.
1849         (begin_compound_stmt): Likewise.
1850         (finish_compound_stmt): Likewise.
1851         (finish_asm_stmt): Likewise.
1852         (finish_label_stmt): Likewise.
1853         (finish_label_decl): Likewise.
1854         (finish_subobject): Likewise.
1855         (finish_decl_cleanup): Likewise.
1856         (finish_named_return_value): Likewise.
1857         (begin_stmt_expr): Likewise.
1858         (finish_stmt_expr): Likewise.
1859
1860         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
1861         to call genrtl_expr_stmt when appropriate.
1862
1863         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
1864         begin_compound_expr to call genrtl_begin_stmt_expr and
1865         genrtl_begin_compound_expr when appropriate.
1866         (finish_init_stmts): Changed calls to finish_compound_expr and
1867         finish_stmt_expr to call genrtl_finish_compound_expr and
1868         genrtl_finish_stmt_expr when appropriate.
1869         (expand_default_init): Changed call to finish_expr_stmt to call
1870         genrtl_expr_stmt when appropriate.
1871         (build_vec_init): Likewise.
1872
1873         * parse.y (simple_stmt): Removed first argument from call to
1874         finish_for_stmt. Removed first argument from call to
1875         finish_switch_stmt.
1876
1877         * parse.c: Regenerated.
1878
1879         * pt.c (tsubst_expr): Removed first argument from call to
1880         finish_for_stmt. Removed first argument from call to
1881         finish_switch_stmt.
1882
1883 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
1884
1885         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
1886         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
1887
1888         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
1889         (cplus_tree_code_length[]): Likewise.
1890         (cplus_tree_code_name[]): Likewise.
1891         (init_parse): Added call to add_c_tree_codes. Changed
1892         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
1893
1894 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
1895
1896         * cp-tree.h (finish_mem_initializers): Declare.
1897         (count_trees): Likewise.
1898         * parse.y (base_init): Use finish_mem_initializers.
1899         * semantics.c (finish_mem_initializers): New function.
1900
1901         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
1902         the number of trees.
1903         (n_trees): Remove.
1904         (count_trees): Don't use it.
1905
1906 2000-06-15  Jason Merrill  <jason@redhat.com>
1907
1908         * tree.c (count_trees): New debugging function.
1909
1910         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
1911         * init.c (build_member_call): Pull out the name of a DECL.
1912
1913         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
1914         * semantics.c (expand_body): Push to TV_INTEGRATION here.
1915         * optimize.c (optimize_function): Not here.
1916         * pt.c (instantiate_decl): Push to TV_PARSE.
1917
1918 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
1919
1920         * cp-tree.h (struct language_function): Remove x_base_init_list
1921         and x_member_init_list.
1922         (current_base_init_list): Remove.
1923         (current_member_init_list): Likewise.
1924         (setup_vtbl_ptr): Change prototype.
1925         (emit_base_init): Likewise.
1926         (expand_member_init): Likewise.
1927         (reinit_parse_for_function): Remove.
1928         * decl.c (save_function_data): Don't clear x_base_init_list and
1929         x_member_init_list.
1930         (mark_language_function): Don't mark them.
1931         * init.c (perform_member_init): Tweak comment.
1932         (sort_member_init): Take the list of initializers as an argument.
1933         (sort_base_init): Likewise.
1934         (emit_base_init): Likewise.
1935         (expand_member_init): Return the initializer.  Don't use global
1936         variables.
1937         * lex.c (reinit_parse_for_function): Remove.
1938         * method.c (build_template_parm_names): Correct substitution.
1939         (do_build_copy_constructor): Don't use current_member_init_list
1940         and current_base_init_list.
1941         (synthesize_method): Likewise.
1942         * parse.y (base_init): Split mem-initializers into
1943         base-initializers and field-initializers.
1944         (member_init_list): Build up the list here.
1945         (member_init): Return the initializer.
1946         (fn.depfn): Don't use reinit_parse_for_function.
1947         * parse.c: Regenerated.
1948         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
1949         ERROR_MARK.
1950         (tsubst_expr): Don't use current_member_init_list
1951         and current_base_init_list.
1952         (tsubst_expr_values): Rename to ...
1953         (tsubst_initializer_list): ... this.  Use convert_from_reference.
1954         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
1955         and current_base_init_list.
1956         (begin_function_definition): Don't call reinit_parse_for_function.
1957
1958         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
1959
1960         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
1961         correctly.
1962
1963         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
1964
1965 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
1966
1967         * cp-tree.h (IF_COND): Move to c-common.h.
1968         (THEN_CLAUSE): Likewise.
1969         (ELSE_CLAUSE): Likewise.
1970         (WHILE_COND): Likewise.
1971         (WHILE_BODY): Likewise.
1972         (DO_COND): Likewise.
1973         (DO_BODY): Likewise.
1974         (RETURN_EXPR): Likewise.
1975         (EXPR_STMT_EXPR): Likewise.
1976         (FOR_INIT_STMT): Likewise.
1977         (FOR_COND): Likewise.
1978         (FOR_EXPR): Likewise.
1979         (FOR_BODY): Likewise.
1980         (SWITCH_COND): Likewise.
1981         (SWITCH_BODY): Likewise.
1982         (CASE_LOW): Likewise.
1983         (CASE_HIGH): Likewise.
1984         (GOTO_DESTINATION): Likewise.
1985         (COMPOUND_BODY): Likewise.
1986         (ASM_CV_QUAL): Likewise.
1987         (ASM_STRING): Likewise.
1988         (ASM_OUTPUTS): Likewise.
1989         (ASM_INPUTS): Likewise.
1990         (ASM_CLOBBERS): Likewise.
1991         (DECL_STMT_DECL): Likewise.
1992         (STMT_EXPR_STMT): Likewise.
1993         (LABEL_STMT_LABEL): Likewise.
1994         (SCOPE_BEGIN_P): Likewise.
1995         (SCOPE_END_P): Likewise.
1996         (SCOPE_STMT_BLOCK): Likewise.
1997         (SCOPE_NULLIFIED_P): Likewise.
1998         (SCOPE_NO_CLEANUPS_P): Likewise.
1999         (SCOPE_PARTIAL_P): Likewise.
2000         (ASM_VOLATILE_P): Likewise.
2001         (STMT_LINENO): Likewise.
2002         (STMT_LINENO_FOR_FN_P): Likewise.
2003
2004         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
2005         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
2006         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
2007         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
2008         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
2009
2010         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
2011
2012         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
2013         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
2014
2015         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
2016         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
2017         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
2018
2019 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
2020
2021         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
2022         * class.c (dfs_find_final_overrider): Set it appropriately.
2023         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
2024         avoid unneeded secondary vptrs.
2025
2026 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
2027
2028         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
2029         (check_bitfield_decl, check_field_decl): Likewise.
2030         (build_vtbl_or_vbase_field, build_base_field): Likewise.
2031         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
2032         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
2033         (xfer_tag, finish_enum): Likewise.
2034         * decl2.c (finish_builtin_type): Likewise.
2035         * init.c (init_init_processing): Likewise.
2036         * pt.c (instantiate_class_template): Likewise.
2037         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
2038         * cp-tree.h (struct lang_type): Add user_align member.
2039         (CLASSTYPE_USER_ALIGN): Define.
2040
2041 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2042
2043         * Make-lang.in (c++.install-common): Install g++-cross in
2044         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
2045         $(target_alias)-g++ and $(target_alias)-c++.
2046
2047 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
2048
2049         * class.c (vcall_offset_data_s): Add last_init and fns.
2050         (overrides): Rename to same_signature_p.
2051         (dfs_find_final_overrider): Adjust accordingly.
2052         (mark_overriders): Likewise.
2053         (warn_hidden): Likewise.
2054         (build_vtbl_initializer): Reorganize machinery for building things
2055         at negative offsets.
2056         (build_vcall_and_vbase_vtbl_entries): Likewise.
2057         (build_vbase_offset_vtbl_entries): Likewise.
2058         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
2059         offset entries.  Do not create two entries for functions with the
2060         same signature.
2061         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
2062         (build_rtti_vtbl_entries): Reorganize machinery for building things
2063         at negative offsets.
2064
2065         * optimize.c (expand_call_inline): Don't recurse into the code
2066         used to initialize the parameters more than once.
2067
2068 2000-06-11  Mark Mitchell <mark@codesourcery.com>
2069
2070         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
2071         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
2072         (find_substitution): Only use the `Sa' substitution for
2073         std::allocator, not instantiations of it.
2074         (write_template_prefix): Move comment.  Only use a TREE_LIST to
2075         represent substitutions for a member template.
2076         (write_array_type): Mangle array dimensions correctly.
2077         * optimize.c (maybe_clone_body): Copy more information from the
2078         cloned function.
2079         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
2080         on the regenerated declaration.
2081
2082 2000-06-11  Chip Salzenberg  <chip@valinux.com>
2083             Mark Mitchell <mark@codesourcery.com>
2084
2085         * class.c (build_vtable): Clarify comment.
2086         (build_ctor_vtbl_group): Pass the most derived type to
2087         build_vtable.
2088
2089 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2090
2091         * decl2.c (compare_options): Don't needlessly cast away const-ness.
2092
2093 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
2094
2095         * decl.c (add_binding): Handle duplicate declarations of external
2096         variables.
2097
2098 2000-06-09  Chip Salzenberg  <chip@valinux.com>
2099             Mark Mitchell <mark@codesourcery.com>
2100
2101         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
2102         argument.
2103         (write_signed_number): New macro.
2104         (write_unsigned_number): Likewise.
2105         (write_source_name): Use them.
2106         (write_number): Handle signed and unsigned values.
2107         (write_integer_cst): Use tree_int_cst_sgn, and use
2108         write_unsigned_number or write_signed_number as appropriate.
2109         (write_discriminator): Use write_unsigned_number or
2110         write_signed_number as appropriate.
2111         (write_template_arg_literal): Likewise.
2112         (write_array_type): Use tree_low_cst.
2113         (write_template_parm):  Use write_unsigned_number or
2114         write_signed_number as appropriate.
2115         (write_substitution): Adjust call to write_number.
2116         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
2117         (write_expression): Handle non-type template arguments of
2118         reference type correctly.
2119         (mangle_thunk): Use write_signed_number.
2120
2121 2000-06-09  Chip Salzenberg  <chip@valinux.com>
2122
2123         * mangle.c (find_substition): Don't mangle objects with typename
2124         substitutions (e.g. "cin" as "Si").
2125
2126 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
2127
2128         * call.c (add_candidate): Use ggc_alloc_cleared.
2129         * decl.c (lookup_label): Likewise.
2130         * lex.c (retrofit_lang_decl): Likewise.
2131
2132 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
2133
2134         * semantics.c (expand_body): Push to TV_EXPAND.
2135         * optimize.c (optimize_function): Push to TV_INTEGRATION.
2136         * decl.c (start_function): Always call announce_function.
2137
2138         * tinfo2.cc: Just declare abort.
2139
2140 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
2141
2142         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
2143         whenever @ is a symbolic name.
2144
2145 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
2146
2147         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
2148
2149 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
2150
2151         * decl.c (pushdecl): Look up functions by DECL_NAME, not
2152         DECL_ASSEMBLER_NAME.
2153
2154 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
2155
2156         * decl2.c (c_language): Define.
2157
2158 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
2159
2160         * lex.c (lang_init_options): Tweak.
2161
2162         * decl2.c: Remove #inclusion of diagnostic.h
2163         (lang_decode_option): Move diagnostic formatting options to
2164         toplevel.
2165
2166         * lang-options.h: Remove documentation for diagnostic options.
2167
2168         * Makefile.in (lex.o): Depends upon diagnostic.h
2169
2170 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
2171
2172         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
2173         the same DECL_RESULT, it's not a redefinition.
2174         * pt.c (tsubst_decl): Remove code to handle illegal
2175         specializations.
2176
2177 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
2178
2179         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
2180
2181 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
2182
2183         * search.c (maybe_suppress_debug_info): Don't check
2184         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
2185
2186         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
2187         here if extern_p.
2188
2189         Remember instantiation context in deferred instantiations.
2190         * cp-tree.h (struct tinst_level): Remove.
2191         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
2192         * pt.c (current_tinst_level): Now a tree.
2193         (print_template_context, push_tinst_level, pop_tinst_level,
2194         tinst_for_decl): Adjust.
2195         (reopen_tinst_level): New fn.
2196         (init_pt): Register current_tinst_level as a root.
2197         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
2198         of the pending templates list.
2199         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
2200         * lex.c (extract_interface_info): Adjust.
2201         * decl2.c (warn_if_unknown_interface): Adjust.
2202
2203 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
2204
2205         * class.c (indirect_primary_base_p): New function.
2206         (determine_primary_base): Use it.
2207
2208 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
2209
2210         Update new-abi dynamic cast algorithm.
2211         * tinfo.cc (__class_type_info::__dyncast_result): Add
2212         whole_details. Adjust constructor.
2213         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
2214         Avoid unnecessary searching.
2215         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
2216
2217 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2218
2219         * decl.c (init_decl_processing): Don't call record_component_aliases.
2220         * tree.c (build_cplus_array_type_1): Likewise.
2221
2222 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
2223
2224         * ir.texi: Correct typo.
2225         * mangle.c (write_expression): Handle non-type template arguments
2226         with reference type.
2227         * method.c (build_overload_value): Likewise.
2228         * pt.c (convert_nontype_argument): Explicitly represent conversion
2229         to a reference with an ADDR_EXPR.
2230         (unify): Always unify arguments in left-to-right order.
2231
2232 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
2233             Mark Mitchell  <mark@codesourcery.com>
2234
2235         * Make-lang.in (CXX_SRCS): Add mangle.c.
2236         * Makefile.in (CXX_OBJS): Add mangle.o.
2237         (mangle.o): New rule.
2238
2239         * class.c (local_classes): New variable.
2240         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
2241         (get_vtt_name): Use mangle_vtt_name for new ABI.
2242         (init_class_processing): Initialize local_classes.
2243         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
2244         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
2245         (std_identifier): New macro.
2246         (DECL_VOLATILE_MEMFUNC_P): New macro.
2247         (DECL_NAMESPACE_STD_P): Likewise.
2248         (local_classes): Declare.
2249         (get_mostly_instantiated_function_type): Declare.
2250         (init_mangle): Declare.
2251         (mangle_decl): Likewise.
2252         (mangle_type_string): Likewise.
2253         (mangle_type): Likewise.
2254         (mangle_typeinfo_for_type): Likewise.
2255         (mangle_typeinfo_string_for_type): Likewise.
2256         (mangle_vtbl_for_type): Likewise.
2257         (mangle_vtt_for_type): Likewise.
2258         (mangle_ctor_vtbl_for_type): Likewise.
2259         (mangle_thunk): Likewise.
2260         (mangle_conv_op_name_for_type): Likewise.
2261         (mangle_guard_variable): Likewise.
2262         * decl.c (pushtag): Keep track of local classes.
2263         (initialize_predefined_identifiers): Initialize std_identifier.
2264         (init_decl_processing): Use std_identifier.
2265         (start_decl): Don't treat instantiations as specializations.
2266         (grokdeclarator): Likewise.
2267         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
2268         name for fully-instantiated templates.
2269         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
2270         destructors with the new ABI.
2271         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
2272         (grokfield): Use mangle_type for new ABI.
2273         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
2274         (get_sentry): Use mangle_guard_variable for new ABI.
2275         (start_static_initialization_or_destruction): Likewise.
2276         * expr.c (extract_aggr_init): Remove.
2277         (extract_scalar_init): Likewise.
2278         (extract_init): Remove #if 0'd code.
2279         * mangle.c: New function.
2280         * method.c (build_mangled_name): Assert not flag_new_abi.
2281         (build_static_name): Likewise.
2282         (build_decl_overload_real): Likewise.
2283         (build_typename_overload): Likewise.
2284         (build_overload_with_type): Likewise.
2285         (build_overload_name): Likewise.
2286         (get_ctor_vtbl_name): Likewise.
2287         (start_squangling): Likewise.
2288         (get_id_2): Likewise.
2289         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
2290         (init_method): Call init_mangle for new ABI.
2291         (make_thunk): Call mangle_thunk for new ABI.
2292         * operators.def: Correct new ABI manglings for the `%' operator.
2293         Add `::' operator.
2294         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
2295         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
2296         (lookup_template_class): Call mangle_decl for new ABI.
2297         (get_mostly_instantiated_function_type): New function.
2298         (set_mangled_name_for_template_decl): Use it.
2299         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
2300         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
2301         conversion op names.
2302         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
2303         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
2304         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
2305         mangle_typeinfo_string_for_type.
2306
2307 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
2308
2309         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
2310         (INNERMOST_TEMPLATE_ARGS): New macro.
2311         (innermost_args): Remove.
2312         (get_innermost_template_args): New function.
2313         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
2314         * error.c (dump_function_decl): Be caution when using
2315         most_general_template.
2316         * method.c (build_template_parm_names):  Use
2317         INNERMOST_TEMPLATE_ARGS.
2318         * pt.c (add_to_template_args): Tidy comment
2319         (get_innermost_template_args): New function.
2320         (check_explicit_specialization): Clear DECL_INITIAL for a new
2321         specialization.
2322         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
2323         Tidy.
2324         (push_template_decl): Always register specializations of the most
2325         general template.
2326         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
2327         (coerce_template_parms): Likewise.
2328         (lookup_template_class): Likewise.
2329         (innermost_args): Remove.
2330         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
2331         (tsubst_decl): Handle tricky specializations.  Use
2332         get_innermost_template_args.
2333         (instantiate_template): Simplify handling of partial
2334         instantiations.
2335         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
2336         (most_general_template): Reimplement, in a more straightforward
2337         manner.
2338         (regenerate_decl_from_template): Tweak formatting.  Use
2339         TMPL_ARGS_DEPTH for clarity.
2340         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
2341
2342         * dump.c (dequeue_and_dump): Dump information about thunks.
2343
2344 2000-06-01  Richard Henderson  <rth@cygnus.com>
2345
2346         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
2347
2348 2000-06-01  Richard Henderson  <rth@cygnus.com>
2349
2350         * decl2.c (unsupported_options): Fix typo, make const.
2351         (lang_decode_option): Fix bsearch argument order.
2352
2353 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
2354
2355         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
2356         on FIELD_DECLs.
2357
2358 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2359
2360         * cp-tree.h (c_get_alias_set): Deleted.
2361         * Makefile.in (decl.o): Include ../expr.h.
2362         * decl.c (expr.h): Include.
2363         (init_decl_processing): Call record_component_aliases for arrays.
2364         (grokdeclarator): Likewise.
2365         Set TREE_ADDRESSABLE for fields that aren't bitfields.
2366         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
2367
2368 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
2369
2370         Remove guiding declaration support.
2371         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
2372         (flag_guiding_decls): Remove.
2373         * call.c (build_user_type_conversion_1): Remove support for
2374         guiding decls.
2375         (build_new_function_call): Likewise.
2376         (build_new_op): Likewise.
2377         (build_new_method_call): Likewise.
2378         * decl.c (start_function): Likewise.
2379         * friend.c (is_friend): Likewise.
2380         (do_friend): Likewise.
2381         * decl2.c ((flag_dump_translation_unit): Make it const.
2382         (flag_guiding_decls): Remove.
2383         (unsupported_options): New variable
2384         (compare_options): New function.
2385         (lang_decode_option): Use them.
2386
2387         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
2388
2389         * method.c (mangle_expression): Adjust test for legal expression
2390         operators.
2391
2392         * pt.c (instantiate_decl): Save and restore the local
2393         specializations list.
2394
2395 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
2396
2397         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
2398
2399 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
2400
2401         * call.c (add_template_candidate_real): Handle member template
2402         constructors for classes with virtual bases.
2403         (build_user_type_conversion_1): Use in_charge_arg_for_name.
2404         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
2405
2406         * ir.texi: Update thunk documentation.
2407
2408         * call.c (joust): Fix handling of overloaded builtin operators.
2409
2410 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
2411
2412         * cp-tree.h (DECL_ANTICIPATED): New macro.
2413         Document new use of DECL_LANG_FLAG_7.
2414         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
2415         in the user namespace.
2416         * lex.c (do_identifier): If the identifier's declaration has
2417         DECL_ANTICIPATED on, it has not yet been declared.  But do not
2418         replace it with an ordinary implicit declaration.
2419
2420         * tinfo2.cc: Include stdlib.h.
2421
2422 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
2423
2424         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
2425         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
2426         CLASSTYPE_ALIGN.
2427
2428 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
2429
2430         * decl2.c (lang_decode_option): Use skip_leading_substring instead
2431         of plain strncmp.
2432
2433 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
2434
2435         * operators.def (<?): Duplicated, should have been...
2436         (>?): this.  Fixed.
2437
2438 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
2439             Mark Mitchell  <mark@codesourcery.com>
2440
2441         * cp-tree.h (ansi_opname): Make it a macro.
2442         (ansi_assopname): Likewise.
2443         (struct lang_decl_flags): Add assignment_operator_p.
2444         (struct lang_decl): Add operator_code.
2445         (DECL_VTT_PARM): Adjust.
2446         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
2447         overloaded operator.
2448         (SET_OVERLOADED_OPERATOR_CODE): New macro.
2449         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
2450         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
2451         (opname_tab): Remove.
2452         (assignop_tab): Likewise.
2453         (operator_name_info_t): New type.
2454         (operator_name_info): New variable.
2455         (assignment_operator_name_info): Likewise.
2456         (build_cp_library_fn): Remove declaration.
2457         (push_cp_library_fn): Likewise.
2458         (operator_name_string): Likewise.
2459         (build_decl_overload): Likewise.
2460         * call.c (print_z_candidates): Simplify.
2461         (build_object_call): Adjust usage of ansi_opname.  Use
2462         DECL_OVERLOADED_OPERATOR_P.
2463         (op_error): Adjust operator name lookup.
2464         (build_conditional_expr): Adjust usage of ansi_opname.
2465         (build_new_op): Likewise.
2466         (build_op_delete_call): Likewise.
2467         (build_over_call): Likewise.
2468         (joust): Use DECL_OVERLOADED_OPERATOR_P.
2469         * decl.c (duplicate_decls): Copy operator_code.
2470         (init_decl_processing): Adjust parameters to push_cp_library_fn.
2471         (builtin_function): Adjust parameters to build_library_fn_1.
2472         (build_library_fn_1): Accept an overloaded operator code.
2473         (build_library_fn): Pass ERROR_MARK.
2474         (build_cp_library_fn): Accept an overloaded operator code.
2475         (push_cp_library_fn): Likewise.
2476         (grokfndecl): Tweak.
2477         (grokdeclarator): Simplify code to compute names of overloaded
2478         operators.  Adjust use of ansi_opname.
2479         (ambi_op_p): Work on tree_codes, not identifiers.
2480         (unary_op_p): Likewise.
2481         (grok_op_properties): Likewise.
2482         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
2483         (lang_mark_tree): Don't try to mark the operator_code.
2484         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
2485         * error.c (dump_decl): Remove special handling for operator
2486         names.
2487         (dump_function_name): Likewise.
2488         (dump_expr): Adjust name lookup of operators.
2489         (op_to_string): Simplify.
2490         (assop_to_string): Likewise.
2491         * init.c (build_new_1): Adjust use of ansi_opname.
2492         * lex.c (opname_tab): Remove.
2493         (assignop_tab): Likewise.
2494         (ansi_opname): Likewise.
2495         (ansi_assopname): Likewise.
2496         (operator_name_string): Likewise.
2497         (reinit_lang_specific): Likewise.
2498         (operator_name_info): New variable.
2499         (assignment_operator_name_info): Likewise.
2500         (init_operators): New function.
2501         (init_parse): Use it.
2502         (do_identifier): Adjust use of ansi_opname.
2503         * method.c (mangle_expression): Don't use ansi_opname for
2504         mangling.
2505         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
2506         (build_decl_overload): Remove.
2507         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
2508         (do_build_assign_ref): Adjust use of ansi_opname.
2509         (synthesize_method): Likewise.
2510         (implicitly_declare_fn): Likewise.
2511         * operators.def: New file.
2512         * parse.y (operator): Adjust use of ansi_opname.
2513         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
2514         (set_mangled_name_for_template_decl): Don't play games with
2515         current_namespace.
2516         (special_function_p): Adjust use of ansi_opname.
2517         * typeck.c (check_return_expr): Likewise.
2518         * Make-lang.in (cc1plus): Depend on operators.def.
2519         * Makefile.in (lex.o): Likewise.
2520         (decl.o): Likewise.
2521
2522 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
2523
2524         * Make-lang.in (cplib2.ready): Eradicate.
2525
2526 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2527
2528         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
2529         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
2530         (built_min, cp_tree_equal): Likewise.
2531
2532 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
2533
2534         * class.c (layout_nonempty_base_or_field): Replace
2535         `record_layout_info' with `record_layout_info_s'.
2536
2537 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
2538
2539         Fix goto checking.
2540         * cp-tree.h (struct language_function): x_named_labels is now
2541         a struct named_label_list*.
2542         * decl.c (struct named_label_use_list): Renamed from...
2543         (struct named_label_list): ...this.  New struct.
2544         (push_binding_level): Don't set eh_region.
2545         (note_level_for_eh): New fn.
2546         (pop_label): Take label and old value directly.
2547         (pop_labels): Adjust for new named_labels format.
2548         (lookup_label): Likewise.
2549         (poplevel): Note characteristics of a binding level containing a
2550         named label.  Mess with named label lists earlier.
2551         (mark_named_label_lists): New fn.
2552         (mark_lang_function): Call it.
2553         (use_label): New fn, split out from...
2554         (make_label_decl): ...here.  Don't call it.
2555         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
2556         check_previous_gotos): New fns, split out from...
2557         (define_label): ...here.
2558         (check_switch_goto): New fn.
2559         (define_case_label): Call it.
2560         (check_goto): New fn.
2561         * semantics.c (finish_goto_stmt): Call it and use_label.
2562         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
2563         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
2564
2565 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
2566
2567         * class.c (build_vtable_entry_ref): Correct usage of
2568         get_vtbl_decl_for_binfo.
2569
2570         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
2571         * method.c (implicitly_declare_fn): Not here.
2572
2573 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
2574
2575         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
2576         (CPTI_PTMD_DESC_TYPE): ... here.
2577         (ptmd_desc_type_node): Rename to ...
2578         (ptm_desc_type_node): ... here.
2579         * decl.c: Likewise.
2580         * rtti.c (ptmd_initializer): Rename to ...
2581         (ptm_initializer): ... here.
2582         (sythesize_tinfo_var): Adjust. Deal with pointer to member
2583         function.
2584         (create_tinfo_types): Adjust.
2585
2586 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
2587
2588         Finish implementation of VTTs.
2589         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
2590         CPTI_VTT_PARM_IDENTIFIER.
2591         (vtt_parm_identifier): New macro.
2592         (vtt_parm_type): Likewise.
2593         (BINFO_SUBVTT_INDEX): Likewise.
2594         (BINFO_VPTR_INDEX): Likewise.
2595         (struct lang_decl): Add vtt_parm.
2596         (DECL_VTT_PARM): New macro.
2597         (DECL_USE_VTT_PARM): Likewise.
2598         (DECL_NEEDS_VTT_PARM_P): Likewise.
2599         (get_vtt_name): Declare.
2600         (build_artifical_parm): Likewise.
2601         (fixup_all_virtual_upcast_offsets): Likewise.
2602         (expand_indirect_vtbls_init): Remove.
2603         * call.c (build_new_method_call): Pass the vtt to subobject
2604         constructors and destructors.
2605         * class.c (get_vtt_name): Give it external linkage.
2606         (build_clone): Handle the magic VTT parameters for clones.
2607         (clone_function_decl): Fix typo in comment.
2608         (build_vtt): Keep track of the indices in the VTTs where various
2609         entities are stored.
2610         (build_vtt_inits): Likewise.
2611         (dfs_build_vtt_inits): Likewise.
2612         (build_ctor_vtbl_group): Tweak type of construction vtables.
2613         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
2614         primary bases, when building construction vtables.
2615         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
2616         (initialize_predefined_identifiers): Add vtt_parm_identifier.
2617         (init_decl_processing): Initialize vtt_parm_type.
2618         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
2619         (lang_mark_tree): Make vtt_parm.
2620         * decl2.c (build_artificial_parm): New function.
2621         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
2622         (grokclassfn): Use build_artificial_parm.
2623         * init.c (initialize_vtbl_ptrs): Call
2624         fixup_all_virtual_upcast_offsets directly.
2625         (perform_member_init): Use the complete subobject destructor for
2626         member cleanups.
2627         (build_vtbl_address): New function.
2628         (expand_virtual_init): Handle VTTs.
2629         * optimize (maybe_clone_body): Likewise.
2630         * search.c (fixup_all_virtual_upcast_offsets): Give it external
2631         linkage.
2632         (expand_indirect_vtbls_init): Remove.
2633         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
2634         * tree.c (make_binfo): Make them bigger.
2635
2636 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
2637
2638         * inc/cxxabi.h (__pbase_type_info): Define, based on
2639         __pointer_type_info.
2640         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
2641         (__pointer_to_member_type_info): Likewise.
2642         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
2643         (__pointer_to_member_type_info::__is_pointer_p): Remove.
2644         (__pointer_type_info::__do_catch): Rename to ...
2645         (__pbase_type_info::__do_catch): ... here. Adjust.
2646         (__pbase_type_info::__pointer_catch): Implement.
2647         (__pointer_type_info::__pointer_catch): Adjust.
2648         (__pointer_to_member_type_info::__pointer_catch): Adjust.
2649
2650 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
2651
2652         * tinfo.h (__user_type_info::contained_virtual_p): New
2653         predicate.
2654         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
2655         shaped heirarchy.
2656         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
2657         diamond shaped heirarchy. Add early out for mixed diamond and
2658         duplicate shaped heirarchy.
2659
2660 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
2661
2662         * cp-tree.h (build_delete): Change prototype.
2663         (build_vec_delete): Likewise.
2664         * call.c (build_scoped_method_call): Use special_function_kind
2665         values to indicate the kind of destruction to be done.
2666         (build_method_call): Likewise.
2667         * decl.c (finish_destructor_body): Likewise.
2668         (maybe_build_cleanup_1): Likewise.  Rename to ...
2669         (maybe_build_cleanup): ... this.
2670         * decl2.c (delete_sanity): Use special_function_kind
2671         values to indicate the kind of destruction to be done.
2672         (build_cleanup): Likewise.
2673         * init.c (perform_member_init): Likewise.
2674         (build_vec_delete_1): Likewise.
2675         (build_dtor_call): Simplify.
2676         (build_delete): Use special_function_kind
2677         values to indicate the kind of destruction to be done.
2678         (build_vbase_delete): Likewise.
2679         (build_vec_delete): Likewise.
2680
2681         * init.c (sort_member_init): Fix typo in error message generation
2682         code.
2683
2684 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
2685
2686         * semantics.c (begin_class_definition): make the packed
2687         attribute be sensitive to the "-fpack-struct" command line flag
2688
2689 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
2690
2691         Update new-abi upcast algorithm.
2692         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
2693         prototype and meaning of return value.
2694         (__si_class_type_info::__do_upcast): Likewise.
2695         (__vmi_class_type_info::__do_upcast): Likewise.
2696         * tinfo.cc (__class_type_info::__upcast_result): Replace
2697         whole2dst with part2dst. Adjust ctor.
2698         (__class_type_info::__do_upcast): Adjust call of worker function.
2699         (__class_type_info::__do_upcast): Adjust.
2700         (__si_class_type_info::__do_upcast): Adjust. Use parent's
2701         __do_upcast.
2702         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
2703         virtual base in diamond heirarchy bug.
2704
2705 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
2706
2707         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
2708         and bitfield to tinfo_fn_p.
2709         (DECL_TINFO_FN_P): Adjust.
2710         (SET_DECL_TINFO_FN_P): Likewise.
2711         (DECL_MUTABLE_P): Likewise.
2712         (DECL_C_BIT_FIELD): Likewise.
2713         (SET_DECL_C_BIT_FIELD): Likewise.
2714         (CLEAR_DECL_C_BIT_FIELD): Likewise.
2715         (DECL_UNINLINABLE): Likewise.
2716         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
2717         (handle_using_decl): Remove assertion.
2718         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
2719         to build FIELD_DECLs.
2720         (build_base_field): Likewise.
2721         (layout_class_type): Likewise.
2722         * decl.c (init_decl_processing): Likewise.
2723         (build_ptrmemfunc_type): Likewise.
2724         (grokdeclarator): Likewise.
2725         * decl2.c (grok_x_components): Likewise.
2726         * except.c (call_eh_info): Likewise.
2727         * init.c (init_init_processing): Likewise.
2728         * rtti.c (expand_class_desc): Likewise.
2729         (create_pseudo_type_info): Likewise.
2730         (get_vmi_pseudo_type_info): Likewise.
2731         (create_tinfo_types): Likewise.
2732         * ptree.c (print_lang_decl): Adjust.
2733         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
2734         before checking DECL_MUTABLE_P.
2735
2736         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
2737         parameters for template functions.
2738         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
2739         destructors as well as constructors.
2740
2741 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
2742
2743         * class.c (build_ctor_vtbl_group): Set inits.
2744         * optimize.c (maybe_clone_body): Set DECL_INLINE and
2745         DECL_THIS_INLINE appropriately for clones.
2746
2747         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
2748         (DECL_CONV_FN_P): Simplify.
2749         (DECL_OPERATOR): Remove.
2750         (language_to_string): Declare.
2751         * decl.c (duplicate_decls): Fix typo in comment.
2752         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
2753         (grok_op_properties): Use DECL_CONV_FN_P instead of
2754         IDENTIFIER_TYPENAME_P.
2755         * dump.c (dequeue_and_dump): Dump the language linkage of
2756         declarations.
2757         * error.c (language_to_string): Give it external linkage.
2758         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
2759         (implicitly_declare_fn): Set DECL_LANGUAGE.
2760         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
2761         IDENTIFIER_TYPENAME_P.
2762         (tsubst_decl): Likewise.
2763         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
2764         * semantics.c (finish_member_declaration): Don't mark members of
2765         classes declared in an extern "C" region as extern "C".
2766
2767 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2768
2769         * decl2.c (qualified_lookup_using_namespace): Look through
2770         namespace aliases.
2771
2772         * decl.c (push_using_decl): Return the old decl on namespace level.
2773
2774 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
2775
2776         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
2777         (VTT_NAME_PREFIX): New macro.
2778         (CTOR_VTBL_NAME_PREFIX): Likewise.
2779         (get_ctor_vtbl_name): New function.
2780         * class.c (get_vtable_name): Simplify.
2781         (get_vtt_name): New function.
2782         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
2783         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
2784         when a virtual base becomes primary.
2785         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
2786         VTTs.
2787         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
2788         additional parameters.
2789         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
2790         (initialize_array): New function.
2791         (build_vtt): Likewise.
2792         (build_vtt_inits): Likewise.
2793         (dfs_build_vtt_inits): Likewise.
2794         (dfs_fixup_binfo_vtbls): Likewise.
2795         (build_ctor_vtbl_group): Likewise.
2796         (initialize_vtable): Use initialize_array.
2797         (accumulate_vtbl_inits): Reimplement to handle construction
2798         vtables.
2799         (dfs_accumulate_vtbl_inits): Likewise.
2800         (bulid_vtbl_initializer): Adjust parameter name.
2801         * method.c (build_typename_overload): Remove #if 0'd code.
2802         (get_ctor_vtbl_name): New function.
2803         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
2804         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
2805
2806         * cp-tree.h (struct lang_type): Remove search_slot.
2807         (CLASSTYPE_SEARCH_SLOT): Remove.
2808         (emit_base_init): Change prototype.
2809         (initialize_vtbl_ptrs): Likewise.
2810         (expand_indirect_vtbls_init): Likewise.
2811         (clear_search_slots): Remove.
2812         * decl.c (lang_mark_tree): Don't mark search_slot.
2813         * init.c (initialize_vtbl_ptrs): Simplify.
2814         (emit_base_init): Likewise.
2815         * search.c (struct vbase_info): Document decl_ptr.
2816         (convert_pointer_to_single_level): Remove.
2817         (dfs_find_vbases): Remove.
2818         (dfs_init_base_pointers): Simplify.
2819         (dfs_clear_vbase_slots): Remove.
2820         (dfs_vtable_path_unmark): New function.
2821         (init_vbase_pointers): Simplify.
2822         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
2823         (expand_indirect_vtbls_init): Simplify.  Don't call
2824         mark_all_temps_used.
2825         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
2826         initialize_vtbl_ptrs.
2827
2828 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
2829
2830         * except.c: Add static prototypes.
2831
2832 2000-05-20  H.J. Lu  <hjl@gnu.org>
2833
2834         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
2835
2836 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
2837
2838         Don't create a separate copy of virtual bases for the
2839         CLASSTYPE_VBASECLASSES list.
2840         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
2841         (BINFO_FOR_VBASE): Remove.
2842         (CANONICAL_BINFO): Adjust.
2843         (binfo_for_vbase): New function.
2844         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
2845         instead of BINFO_FOR_VBASE.
2846         (build_vbase_pointer): Likewise.
2847         (build_secondary_vtable): Likewise.
2848         (dfs_mark_primary_bases): Likewise.
2849         (mark_primary_bases): Likewise.
2850         (layout_nonempty_base_or_field): Likewise.
2851         (dfs_set_offset_for_shared_vbases): Likewise.
2852         (dfs_set_offset_for_unshared_vbases): Likewise.
2853         (layout_virtual_bases): Likewise.  Adjust for changes to the
2854         CLASSTYPE_VBASECLASSES list.
2855         (dump_class_hierarchy_r): Use binfo_for_vbase
2856         instead of BINFO_FOR_VBASE.
2857         (dump_class_hierarchy): Likewise.
2858         (finish_vtbls): Likewise.
2859         (build_vtbl_initializer): Adjust for changes to the
2860         CLASSTYPE_VBASECLASSES list.
2861         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
2862         * decl.c (finish_destructor_body): Adjust for changes to the
2863         CLASSTYPE_VBASECLASSES list.
2864         * init.c (sort_base_init): Use binfo_for_vbase.
2865         (construct_virtual_bases): Adjust for changes to the
2866         CLASSTYPE_VBASECLASSES list.
2867         (expand_member_init): Use binfo_for_vbase.
2868         (build_vbase_delete):  Adjust for changes to the
2869         CLASSTYPE_VBASECLASSES list.
2870         * method.c (do_build_copy_constructor): Likewise.
2871         * rtti.c (get_base_offset): Use binfo_for_vbase.
2872         (expand_class_desc): Remove #if 0'd code.
2873         * search.c (struct vbase_info): Remove vbase_types.
2874         (get_base_distance):  Use binfo_for_vbase.
2875         (lookup_field_queue_p): Use CANONICAL_BINFO.
2876         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
2877         (get_pure_virtuals): Adjust for changes to the
2878         CLASSTYPE_VBASECLASSES list.
2879         (dfs_find_vbases): Use binfo_for_vbase.
2880         (dfs_init_vbase_pointers): Likewise.
2881         (init_vbase_pointers): Don't initialize vi.vbase_types.
2882         (virtual_context): Use binfo_for_vbase.
2883         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
2884         CLASSTYPE_VBASECLASSES list.
2885         (expand_indirect_vtbls_init): Simplify.
2886         (dfs_get_vbase_types): Don't replicate virtual bases.
2887         (find_vbase_instance): Use binfo_for_vbase.
2888         (binfo_for_vbase): New function.
2889         * typeck.c (get_delta_difference): Use binfo_for_vbase.
2890
2891 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
2892
2893         * decl2.c (finish_anon_union): Generalize error messages to handle
2894         anonymous structures.
2895         * init.c (perform_member_init): Remove `name' parameter.
2896         (build_field_list): New function.
2897         (sort_member_init): Handle anonymous union initialization order
2898         correctly.  Check for multiple initializations of the same union.
2899         (emit_base_init): Don't look up fields by name here.
2900         (expand_member_init): Record the result of name lookup for future
2901         reference.
2902         * typeck.c (build_component_ref): Fix formatting.
2903
2904 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2905
2906         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
2907         * typeck.c (build_x_compound_expr): Replace warn_unused with
2908         warn_unused_value.
2909
2910         * decl2.c (lang_decode_option): Update -Wall unused flags by
2911         calling set_Wunused.
2912
2913 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
2914
2915         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
2916         * init.c (dfs_vtable_path_unmark): Remove.
2917         * search.c (marked_new_vtable_p): Likewise.
2918         (unmarked_new_vtable_p): Likewise.
2919         (dfs_search_slot_nonempty_p): Likewise.
2920         (dfs_mark): Likewise.
2921         (dfs_vtable_path_unmark): Likewise.
2922         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
2923         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
2924         (dfs_init_vbase_pointers): Remove special-case new ABI code.
2925         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
2926         (init_vbase_pointers): Simplify.
2927         (expand_indirect_vtbls_init): Likewise.
2928
2929         * class.c (copy_virtuals): New function.
2930         (build_primary_table): Use it.
2931         (build_secondary_vtable): Likewise.
2932         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
2933         indicate that no vcall offset is required.
2934         (add_virtual_function): Likewise.
2935         (modify_all_vtables): Likewise.
2936         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2937         (dfs_accumulate_vtbl_inits): Likewise.
2938         (build_vtbl_initializer): Make changes to handle construction
2939         vtables.
2940         (dfs_build_vcall_offset_vtbl_entries): Likewise.
2941         (build_rtti_vtbl_entries): Likewise.
2942         (build_vtable_entries): Handle a NULL vcall_index.
2943
2944 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
2945
2946         * decl2.c (lang_decode_option): Fix thinko.
2947
2948 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
2949
2950         * except.c (check_handlers): New fn.
2951         * cp-tree.h: Declare it.
2952         * semantics.c (finish_handler_sequence): Call it.
2953         (finish_function_handler_sequence): Likewise.
2954         (finish_handler_parms): Set TREE_TYPE on the handler.
2955         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
2956         * search.c (get_base_distance_recursive): If protect>1, ignore
2957         special access.
2958         (get_base_distance): Don't reduce watch_access.
2959
2960 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
2961
2962         * lex.c: #include diagnostic.h.
2963         (lang_init_options): Set default prefixing rules.
2964
2965         * lang-options.h: Add -fdiagnostics-show-location=.
2966
2967         * decl2.c: #include diagnostic.h.
2968         (lang_decode_option): Handle -fdiagnostics-show-location=.
2969
2970 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
2971
2972         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
2973         * vec.cc: Revert my 2000-05-07 change.
2974
2975 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
2976
2977         * class.c (check_field_decls): Complain about non-static data
2978         members with same name as class in class with constructor.
2979
2980 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
2981
2982         * decl.c (grokdeclarator): Allow non-static data members with
2983         same name as class.
2984
2985 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
2986
2987         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
2988         and pending_inline.filename.  Update prototypes.
2989         * decl.c (define_label): Constify filename parameter.
2990         * decl2.c (warn_if_unknown_interface): Constify local char *.
2991         * input.c Constify input_source.filename. Don't declare
2992         input_filename or lineno.  Constify filename parameter to feed_input.
2993         * lex.c (init_parse): Constify parameter and return value.
2994         (cp_pragma_interface, cp_pragma_implementation): Constify
2995         filename argument.
2996         (reinit_parse_for_method, reinit_parse_for_block,
2997         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
2998         Constify local char *.
2999         * pt.c: Don't declare lineno or input_filename.
3000         (print_template_context, tsubst_friend_function, tsubst_decl,
3001         tsubst, instantiate_decl): Constify local char *.
3002         * semantics.c (expand_body): Constify local char *.
3003         * tree.c (build_srcloc): Constify filename parameter.
3004         * typeck.c (c_expand_asm_operands): Constify filename
3005         parameter.
3006
3007 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
3008
3009         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
3010         offsetof expansion.
3011
3012 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
3013
3014         * inc/cxxabi.h:  Fix typos in comment.
3015         (__base_class_info::__offset): Use a static_cast.
3016
3017 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
3018
3019         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
3020         of std::size_t and std::ptrdiff_t respectively.
3021         * tinfo.cc: Likewise.
3022         * vec.cc: Likewise.
3023
3024 2000-05-06  Richard Henderson  <rth@cygnus.com>
3025
3026         * typeck.c (build_c_cast): Don't warn integer->pointer size
3027         mismatch for constants.
3028
3029 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
3030
3031         * rtti.c (ptmd_initializer): Set non-public, if class is
3032         incomplete.
3033
3034         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
3035         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3036         __cxa_vec_delete): Likewise.
3037         * tinfo.cc (__dynamic_cast): Likewise.
3038         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3039         __cxa_vec_delete): Likewise.
3040
3041 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
3042
3043         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
3044         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
3045         (lang_decl_flags): Add vcall_offset.
3046         (THUNK_VCALL_OFFSET): Use it.
3047         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
3048         * method.c (make_thunk): Create the lang_decl here, not in
3049         emit_thunk.
3050         (emit_thunk): Make generic thunks into ordinary functions once
3051         they have been fed to expand_body.
3052         * semantics.c (expand_body): Set current_function_is_thunk here.
3053
3054 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3055
3056         * class.c (update_vtable_entry_for_fn): Prototype.
3057
3058         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
3059         and `tmpl'.
3060
3061         * search.c (dfs_build_inheritance_graph_order): Prototype.
3062
3063 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
3064
3065         * cp-tree.h (special_function_kind): Add various kinds of
3066         destructors.
3067         (special_function_p): New function.
3068         * class.c (overrides): Don't let one kind of destructor override
3069         another.
3070         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
3071         whether or not to instantiate a template.
3072         * tree.c (special_function_p): Define.
3073
3074 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
3075
3076         * cp-tree.def (THUNK_DECL): Remove.
3077         * cp-tree.h (DECL_THUNK_P): New macro.
3078         (DECL_NON_THUNK_FUNCTION_P): Likewise.
3079         (DECL_EXTERN_C_FUNCTION_P): Likewise.
3080         (SET_DECL_THUNK_P): Likewise.
3081         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
3082         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
3083         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
3084         * decl.c (decls_match): Use DECL_EXTERN_C_P.
3085         (duplicate_decls): Likewise.
3086         (pushdecl): Likewise.  Adjust thunk handling.
3087         (grokfndecl): Use DECL_EXTERN_C_P.
3088         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
3089         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
3090         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
3091         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
3092         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
3093         DECL_NO_STATIC_CHAIN.
3094         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
3095         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
3096         * search.c (covariant_return_p): Remove THUNK_DECL handling.
3097         * ir.texi: Update.
3098
3099 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
3100
3101         * tree.c (walk_tree): Set lineno.
3102
3103 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
3104
3105         * exception.cc: Update license notice.
3106         * new.cc: Likewise.
3107         * new1.cc: Likewise.
3108         * new2.cc: Likewise.
3109         * tinfo.cc: Likewise.
3110         * tinfo2.cc: Likewise.
3111         * vec.cc: Likewise.
3112         * inc/cxxabi.h: Likewise.
3113         * inc/exception: Likewise.
3114         * inc/new: Likewise.
3115         * inc/new.h: Likewise.
3116         * inc/typeinfo: Likewise.
3117
3118 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
3119
3120         * tree.c (build_target_expr_with_type): If we already have a
3121         TARGET_EXPR, just return it.
3122
3123         * optimize.c (initialize_inlined_parameters): Don't generate an
3124         EXPR_STMT if we can just use DECL_INITIAL.
3125         * decl.c (emit_local_var): Only make the initialization a
3126         full-expression if stmts_are_full_exprs_p.
3127
3128 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
3129
3130         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
3131         macro.
3132         * call.c (standard_conversion): Use it.
3133         (direct_reference_binding): Likewise.
3134         (build_over_call): Likewise.
3135         (is_properly_derived_from): Likewise.
3136         (compare_ics): Likewise.
3137         * class.c (resolves_to_fixed_type_p): Likewise.
3138         * optimize.c (declare_return_variable): Likewise.
3139         * pt.c (is_specialization_of): Likewise.
3140         (unify): Likewise.
3141         * typeck.c (comp_target_parms): Likeiwse.
3142         (build_static_cast): Likewise.
3143         (build_reinterpret_cast): Likewise.
3144         (build_const_cast): Likewise.
3145         (comp_ptr_ttypes_real): Likewise.
3146         (comp_ptr_ttypes_const): Likewise.
3147         * typeck2.c (process_init_constructor): Likewise.
3148
3149 2000-04-30  Scott Snyder <snyder@fnal.gov>
3150
3151         * decl.c (finish_destructor_body): Use the base destructor when
3152         destroying virtual bases.
3153
3154 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
3155
3156         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
3157         STMT_EXPRs.
3158         * optimize.c (struct inline_data): Add target_exprs field.
3159         (declare_return_variable): When a function returns an aggregate,
3160         use the variable declared in the TARGET_EXPR as the remapped
3161         DECL_RESULT.
3162         (expand_call_inline): Update the pending target_exprs stack.
3163         (optimize_function): Initialize the stack.
3164
3165         * decl2.c (finish_file): Fix typo in comment.
3166
3167         * method.c (emit_thunk): Don't try to return a `void' value.
3168
3169         * optimize.c (initialize_inlined_parameters): If the parameter is
3170         addressable, we need to make a new VAR_DECL, even if the
3171         initializer is constant.
3172
3173 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
3174
3175         * decl.c (grok_op_properties): Add an extra check of argtypes.
3176
3177 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
3178
3179         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
3180         variables.
3181         (initialize_inlined_parameters): Try to avoid creating new
3182         VAR_DECLs.
3183
3184 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
3185
3186         * lex.c (my_get_run_time): Remove.
3187         (init_filename_times): Use get_run_time instead of my_get_run_time.
3188         (check_newline): Likewise.
3189         (dump_time_statistics): Likewise.
3190         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
3191         of computing elapsed time explicitly.
3192
3193 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
3194
3195         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
3196         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
3197         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
3198         before calling decl_constant_value.
3199         * class.c (check_bitfield_decl): Likewise.
3200         * cvt.c (ocp_convert): Likewise.
3201         (convert): Likewise.
3202         * decl.c (compute_array_index_type): Likewise.
3203         (build_enumerator): Likewise.
3204         * decl2.c (check_cp_case_value): Likewise.
3205         * pt.c (convert_nontype_argument): Likewise.
3206         (tsubst): Likewise.
3207         * typeck.c (decay_conversion): Likewise.
3208         (build_compound_expr): Likewise.
3209         (build_reinterpret_cast): Likewise.
3210         (build_c_cast): Likewise.
3211         (convert_for_assignment): Likewise.
3212
3213 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
3214
3215         * decl.c (finish_function): Don't play games with DECL_INLINE.
3216
3217 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
3218
3219         * ir.texi: Correct typo.
3220
3221 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3222
3223         * decl.c (grokdeclarator): Reject VLAs as members.
3224
3225 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
3226
3227         * call.c (standard_conversion): Accept conversion between
3228         COMPLEX_TYPEs.
3229
3230         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
3231
3232 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
3233
3234         * decl2.c (finish_file): Remove double setup for accounting
3235         compile time.
3236
3237 2000-04-24  Robert Lipe <robertlipe@usa.net>
3238
3239         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
3240
3241 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
3242
3243         * new.cc (set_new_handler): Needs to be in std::.
3244
3245 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
3246
3247         * cp-tree.h (lang_decl): Remove pretty_function_p.
3248         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
3249         language-specific node.
3250         * decl.c (cp_make_fname_decl): Use build_decl, not
3251         build_lang_decl, to build the variables.
3252         (grokvardecl): Don't call build_lang_decl for local variables in
3253         templates.
3254         (grokdeclarator): Don't call build_lang_decl for local type
3255         declarations in templates.
3256         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
3257         zero'd memory, rather than calling memset.
3258         * pt.c: Include hashtab.h.
3259         (local_specializations): New variable.
3260         (retrieve_local_specialization): Use it.
3261         (register_local_specialization): Likewise.
3262         (tsubst_decl): Don't assume local variables have
3263         DECL_LANG_SPECIFIC.
3264         (instantiate_decl): Set up local_specializations.
3265         * Makefile.in (HTAB_H): New variable.
3266
3267 2000-04-23  Richard Henderson  <rth@cygnus.com>
3268
3269         * typeck.c (c_expand_asm_operands): Restore the original
3270         contents of the output list.
3271
3272 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
3273
3274         * ir.texi:  Document complex number representation.
3275
3276 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3277
3278         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
3279         (target_incomplete_p): New function.
3280         (tinfo_base_init): Create comdat NTBS name variable.
3281         (ptr_initializer): Add non_public parameter. Calculate it.
3282         (ptmd_initializer): Likewise.
3283         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
3284         (create_real_tinfo_var): Add non_public parameter. Use it.
3285         Push proxy into global namespace.
3286         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
3287         New enumeration.
3288         * inc/typeinfo (type_info::before, type_info::operator==):
3289         Compare __name addresses.
3290
3291         * tinfo2.cc: Remove new-abi builtins comment.
3292
3293 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
3294
3295         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
3296
3297         * call.c (joust): Exit early if we get the same function, too.
3298
3299         * decl2.c (key_method): Return NULL_TREE for template classes.
3300         (import_export_class): Don't need to check for template classes.
3301
3302 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
3303
3304         * lex.c: Remove references to cccp.c.
3305
3306 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
3307
3308         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
3309         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
3310         (DECL_DESTRUCTOR_P): Use destructor_attr.
3311         (DECL_CONST_MEMFUNC_P): Reimplement.
3312         (DECL_VOLATILE_MEMFUNC_P): Remove.
3313         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
3314         (overrides): Use DECL_DESTRUCTOR_P.
3315         (check_for_override): Likewise.
3316         * decl.c (start_function): Likewise.
3317         * decl2.c (grokfclassfn): Likewise.
3318         (check_classfn): Likewise.
3319         (grok_function_init): Likewise.
3320
3321 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
3322
3323         * decl2.c (grokfield): Issue error on illegal data member
3324         declaration.
3325
3326 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
3327
3328         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
3329
3330 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
3331
3332         * class.c (build_vtable_entry): Don't build thunks for type-info
3333         functions.
3334
3335 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
3336
3337         * decl.c (decls_match): Allow a redeclaration of a builtin to
3338         specify args while the builtin did not.
3339
3340 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
3341
3342         * cp-tree.def (THUNK_DECL): Add to documentation.
3343         * cp-tree.h (flag_huge_objects): Declare.
3344         * class.c (modify_vtable_entry): Tidy.
3345         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
3346         Calculate delta appropriately for the new ABI.
3347         (dfs_modify_vtables): Use it.
3348         (modify_all_vtables): Fix thinko in code to add overriding copies
3349         of functions to primary vtables.
3350         (build_clone): Fix typo in comment.
3351         (clone_function_decl): Correct order of destructors in vtable.
3352         (build_vbase_offset_vtbl_entries): Adjust comment.
3353         (dfs_vcall_offset_queue_p): Remove.
3354         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
3355         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
3356         (build_vtable_entry): Correct check for pure virtual functions.
3357         Don't declare flag_huge_objects.
3358         * decl.c (flag_huge_objects): Remove declaration.
3359         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
3360         Use int_size_in_bytes.
3361         (emit_thunk): Handle vcall offset thunks.
3362
3363 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3364
3365         * decl2.c (parse_time, varconst_time): Delete declarations.
3366         (finish_file): Delete LINENO declaration.
3367         START_TIME and THIS_TIME now long.
3368
3369 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
3370
3371         * class.c (build_base_field): Reformat comment.
3372
3373         * inc/cxxabi.h (stddef.h): Comment inclusion.
3374         (__base_class_info::__offset): Comment shift.
3375
3376 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
3377
3378         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
3379         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
3380         (cp_push_exception_identifier): New macro.
3381         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
3382         (DECL_BASE_DESTRUCTOR_P): Likewise.
3383         (DECL_DELETING_DESTRUCTOR_P): Likewise.
3384         (get_vtbl_decl_for_binfo): Fix formatting.
3385         (in_charge_arg_for_name): New macro.
3386         (maybe_build_cleanup_and_delete): Remove declaration.
3387         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
3388         (in_charge_arg_for_name): New function.
3389         (build_new_method_call): Use it.  Handle cloned destructors.
3390         (build_clone): Don't make the base constructor virtual.
3391         Automatically defer generated functions.
3392         (clone_function_decl): Handle destructors, too.
3393         (clone_constructors_and_destructors): Likewise.
3394         (create_vtable_ptr): Don't create a vtable entry for a cloned
3395         function.
3396         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
3397         (initialize_predefined_identifiers): Update appropriately.
3398         (finish_destructor_body): Simplify.
3399         (maybe_build_cleanup_and_delete): Remove.
3400         * except.c (expand_throw): Handle new-ABI destructors.
3401         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
3402         (build_dtor_call): New function.
3403         (build_delete): Use it.  Simplify.
3404         * optimize.c (maybe_clone_body): Handle destructors.
3405         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
3406
3407         * exception.cc (cleanup_fn): New typedef.
3408         (CALL_CLEANUP): New macro.
3409         (cp_eh_info): Use them.
3410         (__cp_push_exception): Likewise.
3411         (__cp_pop_exception): Likewise.
3412
3413 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
3414
3415         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
3416         (complete_dtor_identifier): New macro.
3417         (CLASSTYPE_FIRST_CONVERSION): Remove.
3418         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
3419         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
3420         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
3421         (CLASSTYPE_CONSTRUCTORS): Likewise.
3422         (CLASSTYPE_DESTRUCTORS): Likewise.
3423         (lang_decl): Add cloned_function.
3424         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
3425         (DECL_BASE_CONSTRUCTOR_P): Likewise.
3426         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
3427         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
3428         (DECL_CLONED_FUNCTION_P): Likewise.
3429         (DECL_CLONED_FUNCTION): Likewise.
3430         (clone_function_decl): Declare.
3431         (maybe_clone_body): Likewise.
3432         * call.c (build_user_type_conversion_1): Call complete object
3433         constructors in the new ABI.
3434         (build_new_method_call): Don't add in-charge parameters under the
3435         new ABI.
3436         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
3437         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
3438         CLASSTYPE_DESTRUCTOR_SLOT.
3439         (build_clone): New function.
3440         (clone_function_decl): Likewise.
3441         (clone_constructors_and_destructors): Likewise.
3442         (check_bases_and_members): Use it.
3443         * decl.c (iniitialize_predefined_identifiers): Initialize
3444         complete_dtor_identifier.
3445         (finish_function): Don't add extra code to a clone.
3446         (lang_mark_tree): Mark cloned_function.
3447         * decl2.c (mark_used): Don't bother trying to instantiate things
3448         we synthesized.
3449         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
3450         * method.c (set_mangled_name_for_decl): Don't treat clones as
3451         constructors.
3452         (synthesize_method): Sythesize cloned functions, not the clones.
3453         * optimize.c (inline_data): Update comment on ret_label.
3454         (remap_block): Don't assume DECL_INITIAL exists.
3455         (copy_body_r): Allow ret_label to be NULL.
3456         (maybe_clone_body): Define.
3457         * pt.c (tsubst_decl): Handle clones.
3458         (instantiate_clone): New function.
3459         (instantiate_template): Use it.
3460         (set_mangled_name_for_template_decl): Don't treat clones as
3461         constructors.
3462         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
3463         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
3464         * semantics.c (expand_body): Clone function bodies as necessary.
3465
3466         * optimize.c (remap_decl): Avoid sharing structure for arrays
3467         whose size is only known at run-time.
3468         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
3469
3470         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
3471         to has_in_charge_parm_p.
3472         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
3473         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
3474         (DECL_COPY_CONSTRUCTOR_P): New macro.
3475         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
3476         (build_user_type_conversion_1): Likewise.
3477         (convert_like_real): Likewise.
3478         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
3479         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
3480         (copy_args_p): Likewise.
3481         (grok_ctor_properties): Likewise.
3482         (start_function): Likewise.
3483         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
3484         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
3485         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
3486         * method.c (do_build_copy_constructor): Use
3487         DECL_HAS_IN_CHARGE_PARM_P.
3488         (synthesize_method): Likewise.
3489         * pt.c (instantiate_template): Remove goto.
3490         * tree.c (build_cplus_method_type): Remove mention of obstacks in
3491         comment.
3492
3493         * cp-tre.h (finish_function): Change prototype.
3494         * decl.c (end_cleanup_fn): Adjust caller.
3495         (finish_function): Take only one parameter.
3496         * decl2.c (finish_objects): Adjust caller.
3497         (finish_static_storage_duration_function): Likewise.
3498         * method.c (emit_thunk): Likewise.
3499         * parse.y: Likewise.
3500         * parse.c: Regenerated.
3501         * pt.c (instantiate_decl): Likewise.
3502         * rtti.c (synthesize_tinfo_fn): Likewise.
3503         * semantics.c (expand_body): Likewise.
3504
3505         * cp-tree.h (copy_decl): New function.
3506         * class.c (finish_struct_1): Use it.
3507         * lex.c (copy_decl): Define it.
3508         * pt.c (tsubst_decl): Likewise.
3509         * tree.c (copy_template_template_parm): Likewise.
3510
3511         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
3512         has_nonpublic_assign_ref.
3513         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
3514         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
3515         * class.c (finish_struct_methods): Don't set
3516         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
3517         (interface_only): Don't declare.
3518         (interface_unknown): Likewise.
3519
3520 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3521
3522         * tree.h (HAVE_TEMPLATES): Remove definition.
3523         * lang-options.h (-fthis-is-variable): Remove documentation.
3524
3525 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
3526
3527         * class.c (instantiate_type): Handle object-relative template-id.
3528
3529         * semantics.c (finish_expr_stmt): Call convert_to_void here.
3530         * decl.c (cplus_expand_expr_stmt): Not here.
3531
3532         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
3533         Initialize exprtype earlier.
3534
3535         * parse.y (fn.def1): Check for defining types in return types.
3536
3537         * decl.c (check_tag_decl): Notice extra fundamental types.
3538         Diagnose empty decls in classes, too.
3539
3540         * decl.c (grokdeclarator): Don't override an anonymous name if no
3541         declarator was given.
3542
3543         * cvt.c (convert_to_void): Call resolve_offset_ref.
3544
3545         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
3546
3547         * decl2.c (decl_namespace): Handle getting a type.
3548
3549         * typeck.c (build_c_cast): Re-enable warning for cast between
3550         pointer and integer of different size.
3551
3552 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
3553
3554         * inc/cxxabi.h (__pointer_type_info): Add restrict and
3555         incomplete flags.
3556         (__pointer_type_info::__pointer_catch): New virtual function.
3557         (__pointer_to_member_type_info): Derive from
3558         __pointer_type_info. Adjust.
3559         (__pointer_to_member_type_info::__do_catch): Remove.
3560         (__pointer_to_member_type_info::__is_pointer_p): Declare.
3561         (__pointer_to_member_type_info::__pointer_catch): Declare.
3562         * rtti.c (qualifier_flags): Add restrict flag.
3563         (ptmd_initializer): Reorder members.
3564         (create_tinfo_types): Expand comments. Reorder
3565         ptmd_desc_type_node members.
3566         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
3567         Implement.
3568         (__pointer_type_info::__do_catch): Move specific code into
3569         __pointer_catch. Call it.
3570         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
3571         specific catch checking. Fix void conversion check.
3572         (__pointer_to_member_type_info::__do_catch): Remove.
3573         (__pointer_to_member_type_info::__pointer_catch): Implement.
3574
3575 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3576
3577         * lex.c (init_parse): Remove traces of classof and headof.
3578         * decl2.c (flag_operator_names): Default to 1.
3579         (lang_decode_option): Do not set it for -ansi.
3580
3581 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
3582
3583         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
3584         (DECL_MAIN_VARIANT): Remove.
3585         * decl.c (duplicate_decls): Don't set it.
3586         (start_function): Likewise.
3587         (lang_mark_tree): Don't mark it.
3588         * decl2.c (defer_fn): Don't use it.
3589         * lex.c (retrofit_lang_decl): Don't set it.
3590         * pt.c (tsubst_decl): Likewise.
3591         * ptree.c (print_lang_decl): Don't print it.
3592         * typeck.c (mark_addressable): Don't use it.
3593
3594 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
3595
3596         * vec.cc: Include <new> and <exception>.
3597         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
3598         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
3599         terminate.
3600         (__cxa_vec_delete): Catch dtor exceptions.
3601
3602 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
3603
3604         Prepend __ to implementation defined names.
3605         * inc/typeinfo (type_info): Rename _name to __name.
3606         (type_info::type_info): Rename parameter.
3607         (type_info::operator==, type_info::operator!=,
3608         type_info::before): Likewise.
3609         (type_info::is_pointer_p, type_info::is_function_p,
3610         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
3611         parameters.
3612         * inc/cxxabi.h
3613         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
3614         (__pointer_type_info::__pointer_type_info): Likewise.
3615         (__pointer_type_info::is_pointer_p,
3616         __pointer_type_info::do_catch): Prepend __. Rename parameters.
3617         (__array_type_info::__array_type_info): Rename parameters.
3618         (__function_type_info::__function_type_info): Likewise.
3619         (__function_type_info::is_function_p): Prepend __.
3620         (__enum_type_info::__enum_type_info): Rename parameters.
3621         (__pointer_to_member_type_info::__pointer_to_member_type_info):
3622         Likewise.
3623         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
3624         parameters.
3625         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
3626         (__class_type_info::__class_type_info): Rename parameters.
3627         (__class_type_info::sub_kind): Prepend __. Adjust member names.
3628         (__class_type_info::upcast_result,
3629         __class_type_info::dyncast_result): Prepend __. Move definition
3630         into tinfo.cc.
3631         (__class_type_info::do_upcast, __class_type_info::do_catch,
3632         __class_type_info::find_public_src,
3633         __class_type_info::do_dyncast,
3634         __class_type_info::do_find_public_src): Prepend __. Rename
3635         parameters.
3636         (__si_class_type_info::__si_class_type_info): Rename parameters.
3637         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
3638         __si_class_type_info::do_find_public_src): Prepent __. Rename
3639         parameters.
3640         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
3641         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
3642         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
3643         parameters.
3644         (__dynamic_cast): Rename parameters.
3645         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
3646         type_info::do_catch, type_info::do_upcast): Prepend __.
3647         (contained_p, public_p, virtual_p, contained_public_p,
3648         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
3649         (__class_type_info::do_catch,
3650         __class_type_info::do_upcast): Prepend __. Adjust.
3651         (__class_type_info::__upcast_result,
3652         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
3653         Adjust.
3654         (__class_type_info::find_public_src): Prepend __. Adjust.
3655         (__class_type_info::do_find_public_src,
3656         __si_class_type_info::do_find_public_src,
3657         __vmi_class_type_info::do_find_public_src): Likewise.
3658         (__class_type_info::do_dyncast,
3659         __si_class_type_info::do_dyncast,
3660         __vmi_class_type_info::do_dyncast): Likewise.
3661         (__class_type_info::do_upcast,
3662         __si_class_type_info::do_upcast,
3663         __vmi_class_type_info::do_upcast): Likewise.
3664         (__dynamic_cast): Adjust.
3665         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
3666         (__function_type_info::is_function_p): Likewise.
3667         (__pointer_type_info::do_catch): Likewise. Adjust.
3668         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
3669         (__throw_type_match_rtti_2): Adjust.
3670         (__is_pointer): Adjust.
3671
3672 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
3673
3674         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
3675         (complete_ctor_identifier): New macro.
3676         (special_function_kind): Add sfk_copy_constructor and
3677         sfk_assignment_operator.
3678         (LOOKUP_HAS_IN_CHARGE): Remove.
3679         (cons_up_default_function): Rename to ...
3680         (implicitly_declare_fn): ... this.
3681         * call.c (build_new_method_call): Add in-charge parameters for
3682         constructors here.
3683         * class.c (add_implicitly_declared_members): Change parameter name
3684         from cant_have_assignment to cant_have_const_assignment.
3685         Replace calls to cons_up_default_function to implicitly_declare_fn.
3686         * cvt.c (ocp_convert): Use complete_ctor_identifier.
3687         * decl.c (initialize_predefined_identifiers): Initialize it.
3688         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
3689         complex expression.
3690         * init.c (expand_default_init): Don't calculate the in-charge
3691         parameter here.
3692         (build_new_1): Likewise.
3693         * lex.c (cons_up_default_function): Move to method.c.
3694         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
3695         (implicitly_declare_fn): New function.
3696         * typeck.c (build_static_cast): Use complete_ctor_identifier.
3697         (build_modify_expr): Likewise.
3698         * typeck2.c (build_functional_cast): Likewise.
3699
3700         Under the new ABI, constructors don't return `this'.
3701         * cp-tree.h (warn_reorder): Declare.
3702         (special_function_kind): New enum.
3703         (global_base_init_list): Remove declaration.
3704         (emit_base_init): Don't return a value.
3705         (check_base_init): Don't declare.
3706         (is_aggr_typedef): Likewise.
3707         * decl.c (check_special_function_return_type): New function.
3708         (return_types): Remove.
3709         (grokdeclarator): Use check_special_function_return_type.
3710         (start_function): Don't initialize ctor_label under the new ABI.
3711         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
3712         * init.c (begin_init_stmts): Move to top of file.
3713         (finish_init_stmts): Likewise.
3714         (warn_reorder): Don't declare.
3715         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
3716         value.
3717         (check_base_init): Remove.
3718         (is_aggr_typedef): Likewise.
3719         (build_new_1): Don't use the return value of a constructor.
3720         * semantics.c (setup_vtbl_ptr): Don't use the return value
3721         of emit_base_init.
3722         * typeck.c (check_return_expr): Don't magically convert return
3723         statements into `return this' in constructors under the new ABI.
3724
3725         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
3726         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
3727         (base_ctor_identifier): New macro.
3728         (base_dtor_identifier): Likewise.
3729         (deleting_dtor_identifier): Likewise.
3730         * decl.c: Don't include obstack.h.
3731         (obstack_chunk_alloc): Don't define.
3732         (obstack_chunk_free): Likewise.
3733         (struct predefined_identifier): New type.
3734         (initialize_predefined_identifiers): New function.
3735         (init_decl_processing): Use it.
3736         (debug_temp_inits): Remove.
3737         (start_method): Don't call preserve_data.
3738         (hack_incomplete_structures): Update comment.
3739         * init.c (init_init_processing): Don't initialize
3740         nelts_identifier.
3741         (build_offset_rf): Remove dead code.
3742         (build_delete): Use CLASSTYPE_N_BASECLASSES.
3743         * search.c (init_search_processing): Don't initialize
3744         vptr_identifier.
3745
3746 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3747
3748         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
3749         some sign_compare warnings.
3750
3751 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
3752
3753         Rename abi::__vmi_class_type_info members.
3754         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
3755         base_list, detail_masks members to vmi_flags, vmi_base_count,
3756         vmi_bases and vmi_flags_masks respectively.
3757         (__vmi_class_type_info::vmi_flags_masks): Rename
3758         details_unknown_mask to flags_unknown_mask.
3759         * tinfo.cc (__class_type_info::do_upcast): Adjust.
3760         (__vmi_class_type_info::do_find_public_src): Adjust.
3761         (__vmi_class_type_info::do_dyncast): Adjust.
3762         (__vmi_class_type_info::do_upcast): Adjust.
3763
3764 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
3765
3766         * tinfo.cc (convert_to_base): New function.
3767         (get_vbase_offset): Remove. Move into convert_to_base.
3768         (__vmi_class_type_info::do_find_public_src): Adjust.
3769         (__vmi_class_type_info::do_dyncast): Adjust.
3770         (__vmi_class_type_info::do_upcast): Adjust.
3771
3772 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
3773
3774         * tinfo.cc (operator=): Use __builtin_strcmp.
3775         * tinfo2.cc (before): Likewise.
3776
3777 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
3778
3779         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
3780         (DECL_SAVED_INLINE): Rename to ...
3781         (DECL_DEFERRED_FN): ... this.
3782         (in_function_p): Remove declaration.
3783         (mark_inline_for_output): Rename to ...
3784         (defer_fn): ... this.
3785         * decl.c (finish_function): Adjust call to mark_inline_for_output.
3786         (in_function_p): Remove definition.
3787         * decl2.c (saved_inlines): Rename to ...
3788         (deferred_fns): ... this.
3789         (saved_inlines_used): Rename to ...
3790         (deferred_fns_used): ... this.
3791         (mark_inline_for_output): Rename to ...
3792         (defer_fn): ... this.
3793         (finish_file): Adjust accordingly.
3794         (init_decl2): Likewise.
3795         * lex.c (cons_up_default_function): Likewise.
3796         * pt.c (mark_decl_instantiated): Likewise.
3797         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
3798         circumstances.
3799         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
3800         * semantics.c (expand_body): Defer more functions.
3801
3802 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
3803
3804         * vec.cc: New file.
3805         * Make-lang.in (CXX_LIB2FUNCS): Add it.
3806         (vec.o): Build it.
3807         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3808         __cxa_vec_delete): Declare.
3809
3810 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
3811
3812         * rtti.c (dfs_class_hint_mark): New static function.
3813         (dfs_class_hint_unmark): New static function.
3814         (class_hint_flags): Use them.
3815
3816 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
3817
3818         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
3819
3820 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
3821
3822         * cp-tree.h (instantiate_decl): Change prototype.
3823         * decl2.c (mark_used): Adjust call.
3824         * optimize.c (inlinable_function_p): Adjust handling of templates.
3825         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
3826         (do_type_instantiation): Likewise.
3827         (instantiate_decl): Defer more templates.
3828         (instantiate_pending_templates): Adjust logic to handle inline
3829         friend functions.
3830
3831         * Makefile.in (GGC_H): New variable.  Use it throughout in place
3832         of ggc.h.
3833
3834         * call.c: Don't include obstack.h.  Include ggc.h.
3835         (obstack_chunk_alloc): Don't define.
3836         (obstack_chunk_free): Likewise.
3837         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
3838         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
3839         (pop_switch): Free it.
3840
3841         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
3842
3843         * dump.c (dequeue_and_dump): Don't try to print the bit_position
3844         if we don't have a DECL_FIELD_OFFSET.
3845
3846 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
3847
3848         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
3849         special_function_p.
3850
3851 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3852
3853         * cfns.gperf (hash, libc_name_p): Prototype.
3854
3855         * rtti.c (build_dynamic_cast_1): Constification.
3856
3857         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
3858
3859         * semantics.c (deferred_type_access_control): Prototype.
3860
3861 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
3862
3863         Correct many new ABI issues regarding vbase and vcall offset
3864         layout.
3865         * cp-tree.h (BINFO_VTABLE): Document.
3866         (struct lang_type): Tweak formatting.
3867         (BINFO_PRIMARY_BINFO): Add to documentation.
3868         (CLASSTYPE_VSIZE): Fix typo in comment.
3869         (CLASSTYPE_VBASECLASSES): Update documentation.
3870         (BINFO_VBASE_MARKED): Remove.
3871         (SET_BINFO_VBASE_MARKED): Likewise.
3872         (CLEAR_BINFO_VBASE_MARKED): Likewise.
3873         (BINFO_FIELDS_MARKED): Remove.
3874         (SET_BINFO_FIELDS_MARKED): Likewise.
3875         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
3876         (enum access_kind): New enumeration.
3877         (num_extra_vtbl_entries): Remove declaration.
3878         (size_extra_vtbl_entries): Likewise.
3879         (get_vtbl_decl_for_binfo): New function.
3880         (dfs_vbase_unmark): Remove declaration.
3881         (mark_primary_bases): Likewise.
3882         * class.c (SAME_FN): Remove.
3883         (struct vcall_offset_data_s): Move definition.
3884         (build_vbase_pointer): Use `build', not `build_binary_op', to
3885         access the vbase pointer under the new ABI.
3886         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
3887         (build_primary_vtable): Likewise.
3888         (dfs_mark_primary_bases): Move here from search.c.
3889         (mark_primary_bases): Likewise.
3890         (determine_primary_bases): Under the new ABI, don't make a base
3891         class a primary base just because we don't yet have any virtual
3892         functions.
3893         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
3894         (num_vfun_entries): Remove.
3895         (dfs_count_virtuals): Likewise.
3896         (num_extra_vtbl_entries): Likewise.
3897         (size_extra_vtbl_entries): Likewise.
3898         (layout_virtual_bases): Iterate in inheritance graph order under
3899         the new ABI.
3900         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
3901         indicate that a vfield is present.
3902         (init_class_processing): Initialize access_public_node, etc., from
3903         ak_public, etc.
3904         (get_vtbl_decl_for_binfo): New function.
3905         (dump_class_hierarchy_r): Likewise.
3906         (dump_class_hierarchy): Use it.
3907         (finish_vtbls): Build the vtbls in inheritance graph order.
3908         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
3909         (initialize_vtable): Use get_vtbl_decl_for_binfo.
3910         (accumulate_vtbl_inits): Add comments explaining why a pre-order
3911         walk is required.
3912         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
3913         where the vptr points, even for primary vtables.
3914         (build_vtbl_initializer): Adjust handling of vbase and vcall
3915         offsets.
3916         (build_vcall_and_vbase_vtable_entries): New function.
3917         (dfs_build_vbase_offset_vtbl_entries): Remove.
3918         (build_vbase_offset_vtbl_entries): Reimplement.
3919         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
3920         were already handled in a primary base class vtable.
3921         (build_vcall_offset_vtbl_entries): Adjust.
3922         (build_rtti_vtbl_entries): Adjust.
3923         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
3924         * init.c (expand_virtual_init): Simplify.
3925         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
3926         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
3927         * search.c (BINFO_ACCESS): New macro.
3928         (SET_BINFO_ACCESS): Likewise.
3929         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
3930         (access_in_type): Likewise.
3931         (dfs_accessible_p): Likewise.
3932         (protected_accessible_p): Likewise.
3933         (lookup_fnfields_1): Adjust documentation.
3934         (dfs_mark_primary_bases): Move to class.c
3935         (mark_primary_bases): Likewise.
3936         (dfs_vbase_unmark): Remove.
3937         (virtual_context): Use BINFO_FOR_VBASE.
3938         (dfs_get_vbase_types): Simplify.
3939         (dfs_build_inheritance_graph_order): New function.
3940         (get_vbase_types): Use it.
3941         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
3942
3943         * tinfo.cc (get_vbase_offset): New function.
3944         (__vmi_class_type_info::do_find_public_src): Use it.
3945         (__vmi_class_type_info::do_dyncast): Likewise.
3946         (__vmi_class_type_info::do_upcast): Likewise.
3947
3948 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
3949
3950         * lang-specs.h: Pass -fno-show-column to the preprocessor.
3951
3952 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
3953
3954         * rtti.c (class_hint_flags): Rename flags.
3955         (class_initializer): Remove flags.
3956         (synthesize_tinfo_var): Combine offset and flags. Add flags
3957         for __vmi_class_type_info.
3958         (create_tinfo_types): Remove flags from __class_type_info and
3959         __si_class_type_info. Merge flags and offset from
3960         base_class_type_info.
3961         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
3962         (__base_class_info::is_virtual_p): Adjust.
3963         (__base_class_info::is_public_p): Adjust.
3964         (__base_class_info::offset): New accessor.
3965         (__class_type_info::details): Remove member.
3966         (__class_type_info::__class_type_info): Lose details.
3967         (__class_type_info::detail_masks): Remove.
3968         (__si_class_type_info::__si_class_type_info): Lose details.
3969         (__vmi_class_type_info::details): New member.
3970         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
3971         (__vmi_class_type_info::detail_masks): New member.
3972         * tinfo.cc (__class_type_info::do_upcast): Initialize result
3973         with unknown_details_mask.
3974         (__vmi_class_type_info::do_find_public_src): Adjust
3975         (__vmi_class_type_info::do_dyncast): Adjust.
3976         (__vmi_class_type_info::do_upcast): Set result details, if
3977         needed. Adjust.
3978         (__dynamic_cast): Temporarily #if out optimization.
3979
3980 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
3981
3982         * rtti.c (get_tinfo_decl): Mark used.
3983         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
3984         mark as dealt with, if we output it.
3985
3986 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
3987
3988         * class.c: Reorganize to put virtual function table initialization
3989         machinery at the end of the file.
3990
3991 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
3992
3993         * class.c (finish_struct): Use bitsize_zero_node.
3994         * pt.c (instantiate_class_template): Likewise.
3995
3996 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
3997
3998         Put RTTI entries at negative offsets in new ABI.
3999         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
4000         vbase offset at index -3, not -1.
4001         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
4002         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
4003         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
4004         (build_rtti_vtbl_entries): New function.
4005         (set_rtti_entry): Remove.
4006         (build_primary_vtable): Don't use it.
4007         (build_secondary_vtable): Likewise.
4008         (start_vtable): Remove.
4009         (first_vfun_index): New function.
4010         (set_vindex): Likewise.
4011         (add_virtual_function): Don't call start_vtable.  Do call
4012         set_vindex.
4013         (set_primary_base): Rename parameter.
4014         (determine_primary_base): Likewise.
4015         (num_vfun_entries): Don't use skip_rtti_stuff.
4016         (num_extra_vtbl_entries): Include RTTI information.
4017         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
4018         (skip_rtti_stuff): Remove.
4019         (dfs_modify_vtables): Don't use it.
4020         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
4021         (layout_nonempty_base_or_field): Update size handling.
4022         (create_vtable_ptr): Tweak.
4023         (layout_class_type): Adjust parameter names.
4024         (finish_struct_1): Simplify.
4025         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
4026         (skip_rtti_stuff): Remove.
4027         (first_vfun_index): New function.
4028         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
4029         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
4030         (marked_vtable_pathp): Declare.
4031         (unmarked_vtable_pathp): Likewise.
4032         * error.c (dump_expr): Use first_vfun_index to calculate vtable
4033         offsets.
4034         * rtti.c (build_headof): Look for RTTI at negative offsets.
4035         (get_tinfo_decl_dynamic): Likewise.
4036         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
4037         here.
4038         (create_pseudo_type_info): Do it here instead.  Adjust so that
4039         vptr points at first virtual function.
4040         * search.c (marked_vtable_pathp): Make it global.
4041         (unmarked_vtable_pathp): Likewise.
4042         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
4043         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
4044         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
4045         (get_pure_virtuals): Likewise.
4046         (expand_upcast_fixups): Likewise.
4047         * tree.c (debug_binfo): Likewise.
4048         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
4049         negative offset.
4050
4051 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4052
4053         * class.c (check_field_decl): Fix typo.
4054         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
4055         (check_methods): Likewise.
4056         (check_field_decls): Likewise.
4057         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
4058         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
4059         Use DECL_RESULT_FLD, not DECL_RESULT.
4060         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
4061         * lex.c (identifier_type): Likewise.
4062         * pt.c (determine_specialization, lookup_template_class): Likewise.
4063         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
4064         (resolve_overloaded_unification, more_specialized): Likewise.
4065         * semantics.c (finish_member_declaration): Likewise.
4066         * typeck.c (build_x_function_call): Likewise.
4067
4068 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
4069
4070         * class.c (layout_empty_base): Handle empty bases with non-byte
4071         alignment.
4072         (build_base_field): Likewise.
4073         (layout_virtual_bases): Likewise.
4074
4075         * class.c (finish_struct_1): Fix typo in this change:
4076
4077         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4078
4079 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
4080
4081         * decl.c (grokdeclarator): Count partial specializations when
4082         keeping track of how many template classes have been seen.
4083
4084         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
4085
4086 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4087
4088         * class.c (build_vbase_pointer_fields): layout_field now place_field.
4089         (get_vfield_offset): Use byte_position.
4090         (set_rtti_entry): Set OFFSET to ssizetype zero.
4091         (get_binfo_offset_as_int): Deleted.
4092         (dfs_record_base_offsets): Use tree_low_cst.
4093         (dfs_search_base_offsets): Likewise.
4094         (layout_nonempty_base_or_field): Reflect changes in RLI format
4095         and call byte_position.
4096         (layout_empty_base): Convert offset to ssizetype.
4097         (build_base_field): use rli_size_unit_so_far.
4098         (dfs_propagate_binfo_offsets): Do computation in proper type.
4099         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
4100         (layout_class_type): Reflect changes in RLI names and fields.
4101         (finish_struct_1): Set DECL_FIELD_OFFSET.
4102         * dump.c (dequeue_and_dump): Call bit_position.
4103         * expr.c (cplus_expand_constant): Use byte_position.
4104         * rtti.c (expand_class_desc): Use bitsize_one_node.
4105         * typeck.c (build_component_addr): Use byte_position and don't
4106         special case for zero offset.
4107
4108 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4109
4110         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
4111
4112         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
4113         tinfo object.
4114         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
4115         vtable.
4116
4117 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4118
4119         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
4120         DECL_P macros.
4121         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
4122         make_typename_type, check_initializer, cp_finish_decl,
4123         xref_tag): Likewise.
4124         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
4125         decl_namespace, arg_assoc_template_arg, arg_assoc,
4126         validate_nonmember_using_decl, do_class_using_decl): Likewise.
4127         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
4128         args_to_string): Likewise.
4129         * friend.c (is_friend): Likewise.
4130         * lex.c (note_got_semicolon, note_list_got_semicolon,
4131         is_global): Likewise.
4132         * method.c (build_overload_nested_name, build_overload_value,
4133         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
4134         * parse.y (typename_sub, typename_sub1): Likewise.
4135         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
4136         process_partial_specialization, convert_template_argument,
4137         template_args_equal, add_pending_template, lookup_template_class,
4138         for_each_template_parm_r, maybe_fold_nontype_arg,
4139         tsubst, instantiate_template, type_unification_real, unify,
4140         instantiate_pending_templates, set_mangled_name_for_template_decl):
4141         Likewise.
4142         * repo.c (repo_get_id, repo_template_used): Likewise.
4143         * search.c (lookup_field_1): Likewise.
4144         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
4145         * xref.c (classname): Likewise.
4146
4147 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
4148
4149         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
4150         (CANONICAL_BINFO): New macro.
4151         (BINFO_NEW_VTABLE_MARKED): Use it.
4152         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
4153         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
4154         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
4155         not TREE_TYPE.
4156         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4157         (build_secondary_vtable): Likewise.
4158         (dfs_finish_vtbls): Likewise.
4159         (dfs_accumulate_vtbl_inits): Likewise.
4160         (accumulate_vtbl_inits): New function.
4161         (finish_vtbls): Make sure that virtual bases come after
4162         non-virtual bases in the vtable group.
4163         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
4164         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4165         * search.c (struct vbase_info): Move definition.
4166         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4167         (unmarked_new_vtable_p): Likewise.
4168         (dfs_mark_vtable_path): Remove.
4169         (dfs_mark_new_vtable): Remove.
4170         (dfs_unmark_new_vtable): Likewise.
4171         (dfs_clear_search_slot): Likewise.
4172         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
4173         (dfs_clear_vbase_slots): Likewise.
4174         (init_vbase_pointers): LIkewise.
4175
4176 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
4177
4178         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
4179         SIZETYPE to a non-SIZETYPE.
4180
4181 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
4182
4183         * class.c (layout_virtual_bases): Adjust names in conditionally
4184         compiled code.
4185
4186         * class.c (record_base_offsets): New function.
4187         (layout_conflict_p): Likewise.
4188         (layout_nonempty_base_or_field): Use it.
4189         (layout_empty_base): New function.
4190         (build_base_field): Use it.
4191         (build_base_fields): Update comment.
4192         (layout_virtual_bases): Fold in a little code form
4193         layout_basetypes.  Use layout_empty_base.
4194         (layout_basetypes): Remove.
4195         (end_of_class): New function.
4196         (layout_class_type): Use it.  Adjust.
4197
4198         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
4199         (fntype_p): Remove.
4200         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
4201         comment.
4202         (dfs_skip_nonprimary_vbases_markedp): Likewise.
4203         * typeck.c (fntype_p): Remove.
4204
4205         * cp-tree.h (TI_SPEC_INFO): Remove.
4206         (CLASSTYPE_TI_SPEC_INFO): Likewise.
4207         * pt.c (process_partial_specialization): Likewise.
4208
4209         * class.c (build_base_field): Fix thinko in computation of binfo
4210         offsets.
4211
4212         * tree.c (mark_local_for_remap_p): Mark variables declared in
4213         TARGET_EXPRs as well.
4214
4215 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
4216
4217         * typeck.c (require_complete_type, complete_type,
4218         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
4219         build_array_ref, convert_arguments, pointer_diff,
4220         build_x_unary_op, build_unary_op, build_c_cast,
4221         build_modify_expr): Use COMPLETE_TYPE_P etc.
4222         * call.c (is_complete, convert_like_real,
4223         build_new_method_call): Likewise.
4224         * class.c (build_vbase_pointer_fields, check_bases,
4225         build_base_field, finish_struct_1, pushclass): Likewise.
4226         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
4227         * decl.c (maybe_process_template_type_declaration, pushtag,
4228         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
4229         layout_var_decl, check_initializer, cp_finish_decl,
4230         grokdeclarator, require_complete_types_for_parms,
4231         grok_op_properties, xref_tag, xref_basetypes,
4232         check_function_type): Likewise.
4233         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
4234         * friend.c (do_friend): Likewise.
4235         * init.c (build_offset_ref): Likewise.
4236         * parse.y (structsp): Likewise.
4237         * pt.c (maybe_process_partial_specialization,
4238         tsubst_friend_function, instantiate_class_template, tsubst,
4239         do_type_instantiation, instantiate_pending_templates): Likewise.
4240         * repo.c (repo_get_id): Likewise.
4241         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
4242         synthesize_tinfo_var, emit_support_tinfos): Likewise.
4243         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
4244         * semantics.c (begin_class_definition): Likewise.
4245         * tree.c (build_cplus_method_type): Likewise.
4246         * typeck2.c (digest_init, build_functional_cast,
4247         add_exception_specifier): Likewise.
4248         * parse.h, parse.c: Regenerated.
4249
4250 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
4251
4252         * inc/cxxabi.h: New header file. Define new-abi entry points.
4253         (__pointer_type_info::target): Rename member to ...
4254         (__pointer_type_info::type): ... here.
4255         (__base_class_info::type): Rename member to ...
4256         (__base_class_info::base): ... here.
4257         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
4258         * cp-tree.h (CPTI_ABI): New global tree enumeration.
4259         (abi_node): New global tree node.
4260         * decl.c (abi_node): Document.
4261         (init_decl_processing): Initialize abi_node.
4262         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
4263         (get_vmi_pseudo_type_info): Likewise.
4264         (create_tinfo_types): Likewise.
4265         (emit_support_tinfos): Likewise.
4266         * tinfo.h (cxxabi.h): Include for new-abi.
4267         Move rtti class definitions to new header file.
4268         * tinfo.cc (abi): Use the namespace.
4269         (std): Move new abi rtti classes from here ...
4270         (__cxxabiv1): ... to here.
4271         * tinfo2.cc (cxxabi.h): Include for new-abi.
4272         Move rtti class definitions to new header file.
4273         (std): Move new abi rtti classes from here ...
4274         (__cxxabiv1): ... to here.
4275         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
4276         namespace.
4277
4278 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
4279             Jason Merrill  <jason@casey.cygnus.com>
4280
4281         * method.c (build_overload_int): Use host_integerp.
4282
4283 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4284
4285         * init.c (build_offset_ref): Handle the case of a templated member
4286         function.
4287
4288 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4289
4290         * except.c (expand_exception_blocks): Clear catch_clauses_last.
4291
4292 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
4293
4294         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
4295         * class.c (check_bitfield_decl): Turn illegal bitfields into
4296         non-bitfields.
4297         (dfs_propagate_binfo_offsets): Adjust for new size_binop
4298         semantics.
4299         (dfs_offset_for_unshared_vbases): Likewise.
4300         * cvt.c (cp_convert_to_pointer): Convert NULL to a
4301         pointer-to-member correctly under the new ABI.
4302         * expr.c (cplus_expand_constant): Don't use cp_convert when
4303         turning an offset into a pointer-to-member.
4304         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
4305         when dereferencing them under the new ABI.
4306         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
4307         of pointers-to-members under the new ABI.
4308
4309         * class.c (check_bitfield_decl): Remove restriction on really long
4310         bitfields.
4311         (layout_class_type): Implement new ABI handling of bitfields
4312         longer than their types.
4313
4314 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4315
4316         * parse.y (extdefs): Call ggc_collect.
4317         * parse.c: Regenerated.
4318
4319 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
4320
4321         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
4322         (note_name_declared_in_class): Use OVL_CURRENT to get at a
4323         potential overload.
4324
4325 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4326
4327         * class.c (build_vbase_path): Use integer_zerop.
4328         (build_vtable_entry): Use tree_low_cst.
4329         (get_vfield_offset): Use bit_position.
4330         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
4331         Use tree_low_cst.
4332         (check_bitfield_decl): Set DECL_SIZE using convert.
4333         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
4334         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
4335         Use tree_low_cst.
4336         (finish_struct_1): Use bit_position.
4337         (dump_class_hierarchy): Use tree_low_cst.
4338         * cp-tree.h (min_precision): Add declaration.
4339         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
4340         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
4341         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
4342         * expr.c (cplus_expand_constant): Use bit_position.
4343         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
4344         * rtti.c (get_base_offset): Use bit_position.
4345         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
4346         host_integerp, and tree_low_cst.
4347         (pointer_int_sum): Use integer_zerop.
4348         (build_component_addr): Use bit_position.
4349
4350 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
4351
4352         * typeck.c (require_complete_type): Don't assume size_zero_node.
4353         (complete_type_or_else): Likewise.
4354
4355 2000-03-16  Steven Grady <grady@digitaldeck.com>
4356             Jason Merrill  <jason@casey.cygnus.com>
4357
4358         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
4359
4360 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4361
4362         * decl2.c (grokfield): Bail out if type is error_mark_node.
4363
4364 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
4365
4366         * tinfo2.cc (__ptr_to_member_data): Rename to ...
4367         (__pointer_to_member_data): ... here. Adjust.
4368         * rtti.c (create_tinfo_types): Adjust.
4369
4370 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
4371
4372         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
4373         * decl.c (ref_desc_type_node): Undocument.
4374         * rtti.c (ptr_ref_initializer): Rename to ...
4375         (ptr_initializer): ... here. Adjust comments.
4376         (ptmd_initializer): Fix comment thinko.
4377         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
4378         (create_tinfo_types): Remove ref_desc_type_node init.
4379         * tinfo2.cc (__reference_type_info): Remove.
4380
4381 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
4382
4383         * decl.c (cp_finish_decl): Remove obsolete comment.
4384
4385         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
4386
4387 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
4388
4389         * cp-tree.h: Tweak documentation.
4390         * class.c (build_vbase_pointer_fields): Layout the fields, too.
4391         (avoid_overlap): Remove.
4392         (get_binfo_offset_as_int): New function.
4393         (dfs_serach_base_offsets): Likewise.
4394         (layout_nonempty_base_or_field): Likewise.
4395         (build_base_field): Layout fields here.  Avoid placing two objects
4396         of the same type at the same address, under the new ABI.
4397         (build_base_fields): Adjust accordingly.
4398         (create_vtable_ptr): Return the new field, but don't attach it to
4399         TYPE_FIELDS.
4400         (remove_base_field): Remove.
4401         (remove_base_fields): Remove.
4402         (layout_basetypes): Adjust accordingly.
4403         (layout_class_type): Call layout_field for each field, rather than
4404         just making a wholesale call to layout_type.
4405
4406 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
4407
4408         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
4409
4410 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
4411
4412         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
4413
4414         * except.c (dtor_nothrow): New fn.
4415         (do_pop_exception): Use it.  Take type parm.
4416         (push_eh_cleanup): Take type parm.
4417         (expand_start_catch_block): Pass it.
4418         (build_eh_type_type_ref): Accept null type.
4419
4420 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
4421
4422         * cp-tree.h (revert_static_member_fn): Change prototype.
4423         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
4424         (grok_op_properties): Likewise.
4425         (start_function): Likewise.
4426         (revert_static_member_fn): Simplify.
4427         * pt.c (check_explicit_specialization): Adjust call to
4428         revert_static_member_fn.
4429
4430 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
4431
4432         * cp-tree.h (scope_kind): New type.
4433         (tmpl_spec_kind): Likewise.
4434         (declare_pseudo_global_level): Remove.
4435         (pseudo_global_level_p): Rename to template_parm_scope_p.
4436         (pushlevel): Remove declaration.
4437         (begin_scope): New function.
4438         (finish_scope): Likewise.
4439         (current_tmpl_spec_kind): Likewise.
4440         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
4441         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
4442         Add template_spec_p.
4443         (toplevel_bindings_p): Adjust.
4444         (declare_pseudo_global_level): Remove.
4445         (pseudo_global_level_p): Rename to template_parm_scope_p.
4446         (current_tmpl_spec_kind): New function.
4447         (begin_scope): Likewise.
4448         (finish_scope): Likewise.
4449         (maybe_push_to_top_level): Adjust.
4450         (maybe_process_template_type_declaration): Likewise.
4451         (pushtag): Likewise.
4452         (pushdecl_nonclass_level): Likewise.
4453         (lookup_tag): Likewise.
4454         (grokfndecl): Handle member template specializations.  Share
4455         constructor and non-constructor code.
4456         * decl2.c (check_classfn): Handle member template specializations.
4457         * pt.c (begin_template_parm_list): Use begin_scope.
4458         (begin_specialization): Likewise.
4459         (end_specialization): Likewise.
4460         (check_explicit_specialization): Use current_tmpl_spec_kind.
4461         Handle member template specializations.
4462         (end_template_decl): Use finish_scope.  Remove call to
4463         get_pending_sizes.
4464         (push_template_decl_real): Remove bogus error message.
4465         (tsubst_decl): Fix typo in code contained in comment.
4466         (instantiate_template): Handle member template specializations.
4467         (most_general_template): Likewise.
4468
4469 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
4470
4471         * lex.c (whitespace_cr): Compress consecutive calls to warning().
4472         (do_identifier): Ditto for error().
4473
4474         * pt.c (convert_nontype_argument): Ditto for cp_error().
4475         (convert_template_argument): Ditto for cp_pedwarn().
4476
4477 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
4478
4479         * exception.cc (__check_null_eh_spec): New fn.
4480         * except.c (expand_end_eh_spec): Call it if the spec is throw().
4481
4482 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
4483
4484         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
4485         * except.c (expand_end_eh_spec): Add the return type.
4486         * rtti.c (throw_bad_cast): Add the parmtypes.
4487         (throw_bad_typeid): Likewise.
4488
4489         * semantics.c (expand_stmt): Only leave out rtl for unused
4490         artificials, and set DECL_IGNORED_P on them as well.
4491         * decl.c (wrapup_globals_for_namespace): Likewise.
4492
4493 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
4494
4495         * decl.c (maybe_commonize_var): Skip all artificial decls.
4496         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
4497
4498 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
4499
4500         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
4501         * cp-tree.h: Declare flag_enforce_eh_specs.
4502         * decl.c (store_parm_decls, finish_function): Check it.
4503
4504         C library functions don't throw.
4505         * Makefile.in (cfns.h): New target.
4506         (except.o): Depend on it.
4507         * Make-lang.in (cc1plus): Depend on cfns.gperf.
4508         * cfns.gperf: New file.
4509         * cfns.h: Generated.
4510         * except.c: Include it.
4511         (nothrow_libfn_p): New fn.
4512         * decl.c (grokfndecl): Use it.
4513         * cp-tree.h: Declare it.
4514
4515         * decl.c (push_overloaded_decl_1, auto_function,
4516         define_function): Lose.
4517         (build_library_fn_1): New static fn.
4518         (builtin_function): Use it.
4519         (get_atexit_node): Use build_library_fn_ptr.
4520         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
4521         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
4522         push_void_library_fn, push_throw_library_fn): New fns.
4523         * cp-tree.h: Declare them.
4524         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
4525         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
4526         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
4527         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
4528         * rtti.c (build_runtime_decl): Lose.
4529         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
4530         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
4531         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
4532
4533         * call.c (build_call): Remove result_type parm.
4534         Call mark_used on unused artificial fns.
4535         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
4536
4537 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
4538
4539         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
4540         appropriate.
4541         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
4542         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
4543         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
4544         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
4545         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4546         expand_generic_desc): Likewise.
4547
4548 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
4549
4550         * exception.cc (__cp_pop_exception): Cleanup the original object.
4551
4552 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
4553
4554         * decl.c (grok_op_properties): Merge conversion to void warning
4555         with other silly op warnings.
4556
4557 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
4558
4559         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
4560         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
4561
4562 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
4563
4564         * decl.c (cp_make_fname_decl): New function.
4565         (wrapup_globals_for_namespace): Don't emit unused static vars.
4566         (init_decl_processing): Remove comment about use of
4567         array_domain_type. Set make_fname_decl.
4568         (cp_finish_decl): Remove __FUNCTION__ nadgering.
4569         * semantics.c (begin_compound_stmt): Remove
4570         current_function_name_declared flagging.
4571         (expand_stmt): Don't emit unused local statics.
4572         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
4573         specially.
4574
4575 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
4576
4577         * typeck.c (convert_for_assignment): Don't look at array
4578         initializer.
4579         * call.c (convert_like_real): Likewise.
4580
4581 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
4582
4583         Add initial support for '\uNNNN' specifier.
4584         * lex.c (read_ucs): New fn.
4585         (readescape, skip_white_space): Call it.
4586         (is_extended_char, is_extended_char_1): New fns.
4587         (utf8_extend_token): New fn, #if 0'd out.
4588         (real_yylex): Treat extended chars like letters.
4589
4590         * search.c (note_debug_info_needed): Walk the bases even if we
4591         weren't deferring the type itself.
4592
4593 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4594
4595         * decl2.c (finish_objects): Constify a char*.
4596
4597         * method.c (emit_thunk): Likewise.
4598
4599 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
4600
4601         * typeck.c (dubious_conversion_warnings): Look through
4602         REFERENCE_TYPE.
4603
4604 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4605
4606         * class.c (dfs_modify_vtables): I is now unsigned.
4607         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
4608         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
4609         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
4610         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
4611         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
4612         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
4613         Call integer_all_onesp.
4614         * typeck2.c (process_init_constructor): Use compare_tree_int.
4615
4616         * lang-specs.h (as): Don't call if -syntax-only.
4617
4618 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
4619
4620         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
4621         RTL_EXPR_HAS_NO_SCOPE after all.
4622
4623 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
4624
4625         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
4626         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
4627         RTL_EXPR_HAS_NO_SCOPE.
4628
4629         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
4630         later.
4631
4632         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
4633
4634 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
4635
4636         * call.c (convert_like): Macrofy.
4637         (convert_like_with_context): New macro.
4638         (convert_like_real): Renamed from convert_like.  Add calling
4639         context parameters, for diagnostics. Add recursive flag.  Call
4640         dubious_conversion_warnings for outer conversion.
4641         (build_user_type_conversion): Use convert_like_with_context.
4642         (build_over_call): Likewise. Don't warn about dubious
4643         conversions here. Adjust convert_default_arg calls.
4644         (convert_default_arg): Add context parameters for diagnostics.
4645         Pass throught to convert_like_with_context.
4646         * cp-tree.h (convert_default_arg): Add context parameters.
4647         (dubious_conversion_warnings): Prototype new function.
4648         * typeck.c (convert_arguments): Adjust convert_default_arg call.
4649         (dubious_conversion_warnings): New function, broken
4650         out of convert_for_assignment.
4651         (convert_for_assignment): Adjust.
4652
4653 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
4654
4655         * decl2.c (key_method): Break out from...
4656         (import_export_vtable, import_export_class): ...here.
4657
4658         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
4659         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
4660
4661         * search.c (note_debug_info_needed, dfs_debug_mark,
4662         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
4663         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
4664
4665 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
4666
4667         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
4668         typos.
4669
4670 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
4671
4672         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
4673         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
4674         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
4675         (lang_type): Split gets_new into has_new and has_array_new.
4676         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4677         (TYPE_GETS_NEW): Split into ...
4678         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
4679         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
4680         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
4681         (build_op_new_call): Don't declare.
4682         (build_new_1): Likewise.
4683         * call.c (build_op_new_call): Remove.
4684         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4685         instead of TYPE_NEEDS_DESTRUCTOR.
4686         (finish_struct_bits): Likewise.
4687         (add_implicitly_declared_members): Likewise.
4688         (check_field_decl): Likewise.
4689         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
4690         correctly under the new ABI.
4691         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4692         instead of TYPE_NEEDS_DESTRUCTOR.
4693         (initialize_local_var): Likewise.
4694         (destroy_local_var): Likewise.
4695         (cp_finish_decl): Likewise.
4696         (register_dtor_fn): Likewise.
4697         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
4698         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
4699         TYPE_VEC_DELETE_TAKES_SIZE here.
4700         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
4701         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
4702         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4703         (finish_destructor_body): Likewise.
4704         (maybe_build_cleanup_1): Likewise.
4705         * decl2.c (do_static_destruction): Likewise.
4706         * init.c (build_new_1): Make it static.
4707         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4708         (expand_cleanup_for_base): Likewise.
4709         (get_cookie_size): New function.
4710         (build_new_1): Handle array-new cookies correctly under the new
4711         ABI.
4712         (build_vec_delete_1): Likewise.
4713         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4714         (build_delete): Likewise.
4715         (build_vec_delete): Handle array-new cookies correctly under the new
4716         ABI.
4717         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4718         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
4719         TYPE_HAS_ARRAY_NEW_OPERATOR.
4720         * ptree.c (print_lang_type): Check them.
4721         * search.c (context_for_name_lookup): Fix typo in comment.
4722         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4723         * tree.c (break_out_cleanups): Likewise.
4724         (build_cplus_array_test_1): Likewise.
4725         (cp_build_qualified_type_real): Likewise.
4726         * typeck.c (complete_type): Likewise.
4727
4728         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
4729         the command-line, not the end.
4730
4731 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
4732
4733         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
4734
4735 2000-03-02  Tom Tromey  <tromey@cygnus.com>
4736
4737         * cp-tree.h (build_java_class_ref): Declare.
4738         * init.c (build_java_class_ref): No longer static.
4739         * except.c (expand_throw): Generate a Java-style `throw' if the
4740         thrown object is a "Java" object.
4741         (initialize_handler_parm): Generate a Java-style lookup of
4742         exception info if the caught object is a "Java" object.
4743         (catch_language, catch_language_init): New globals.
4744         (decl_is_java_type): New function.
4745         (expand_start_catch_block): Don't call push_eh_info() or
4746         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
4747         class reference to build_catch_block.
4748
4749 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4750
4751         * typeck.c (comptypes): Treat sizetype like its language equivalent.
4752
4753 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
4754
4755         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
4756         to merge reference/pointer code and fix incorrect warnings.
4757
4758 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
4759
4760         * search.c (protected_accessible_p): Use context_for_name_lookup.
4761
4762         * init.c (construct_virtual_bases): Fix thinko.
4763         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
4764
4765 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4766
4767         * decl.c (current_function_decl): Move to toplev.c.
4768
4769 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
4770
4771         * pt.c (fn_type_unification): Unify return type, whenever
4772         provided.
4773         (get_bindings_real): Only pass return type when necessary.
4774         Remove explicit return type check.
4775         * class.c (resolve_address_of_overloaded_function): Pass desired
4776         return type to fn_type_unification.
4777
4778 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4779
4780         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
4781         DECL_FIELD_SIZE.
4782         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
4783         DECL_FIELD_SIZE.
4784         * rtti.c (expand_class_desc): Likewise.
4785         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
4786         (THUNK_VCALL_OFFSET): Likewise.
4787         (THUNK_DELTA): Reflect changes in ../tree.h.
4788
4789 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
4790
4791         * search.c (protected_accessible_p): Also allow the access if
4792         the member is public in DERIVED.  Lose TYPE parm.
4793         (friend_accessible_p): Lose TYPE parm.
4794         (accessible_p): Adjust.
4795
4796 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4797
4798         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
4799         on things that are not sizes; ssize_binop deleted.
4800         Call size_diffop when appropriate.
4801         (dfs_build_vcall_offset_vtbl_entries): Likewise.
4802         (build_primary_vtable, build_secondary_vtable): Likewise.
4803         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
4804         Variable I is HOST_WIDE_INT.
4805         (get_vfield_offset): Pass proper types to size_binop.
4806         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
4807         (finish_struct_1): Likewise.
4808         (skip_rtti_stuff): Arg N is now pointer to signed.
4809         (layout_class_type): Use size_zero_node.
4810         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
4811         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
4812         * decl.c (complete_arry_type): Pass proper types to size_binop.
4813         (xref_basetypes): BINFO_OFFSET is sizetype.
4814         * error.c (dump_expr): Don't use size_binop non-sizes.
4815         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
4816         * init.c (construct_virtual_bases): Fix type error.
4817         (build_vec_delete_1): Pass proper type to size_binop and don't
4818         fold result.
4819         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
4820         * rtti.c (get_base_offset): Pass proper type to size_binop.
4821         * search.c (dfs_find_vbases): Fix type error.
4822         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
4823         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
4824         * tree.c (debug_binfo): Variable N is signed.
4825         Use HOST_WIDE_INT_PRINT_DEC.
4826         * typeck.c (comptypes): sizetype is same as equivalent integer type.
4827         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
4828         size_one_node and size_zero_node.
4829         (c_alignof): Use size_one_node.
4830         (build_component_addr): Pass proper types to size_binop.
4831         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
4832
4833 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
4834
4835         Implement class scope using-declarations for functions.
4836         * class.c (handle_using_decl): Call add_method for used functions.
4837         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
4838         (add_method): Used functions are hidden by local functions.
4839         (check_bases_and_members): Handle using-decls before finalizing
4840         CLASSTYPE_METHOD_VEC.
4841         * call.c (add_function_candidate): Add ctype parm; if non-zero,
4842         override the type of 'this' accordingly.
4843         (add_template_candidate, add_template_candidate_real): Add ctype parm.
4844         (convert_class_to_reference, build_user_type_conversion_1,
4845         build_new_function_call, build_object_call, build_new_op,
4846         build_new_method_call): Pass ctype parm.
4847
4848         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
4849         the baselink.
4850         * call.c (convert_class_to_reference, build_user_type_conversion_1,
4851         build_new_function_call, build_object_call, build_new_op,
4852         build_new_method_call, build_op_delete_call): Don't get basetype_path
4853         from a baselink.
4854         * typeck.c (build_component_ref): Likewise.
4855         * init.c (build_offset_ref): Likewise.
4856         (resolve_offset_ref): Don't call enforce_access.
4857         Call build_scoped_ref.
4858         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
4859         would cause an error or if -pedantic.
4860         * class.c (alter_access): Lose binfo parm.
4861
4862 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
4863
4864         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
4865         types.
4866
4867 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
4868
4869         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
4870         pseudo_type_info creation into the std namespace
4871
4872 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
4873
4874         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
4875         (import_export_class): Remove declaration.
4876         * decl2.c (import_export_class): Make it static.
4877         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
4878         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
4879         EXPR_WITH_FILE_LOCATION.
4880         * lex.c (check_newline): Tweak filename/lineno setting.
4881         * semantics.c (begin_while_stmt): Fix typo in comment.
4882
4883 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4884
4885         * lang-options.h (-fmessage-length=): Add missing option.
4886
4887         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
4888
4889 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
4890
4891         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
4892
4893 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
4894
4895         * optimize.c (expand_call_inline): Emit the return label before
4896         evaluating the return value.
4897
4898 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
4899
4900         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
4901         than duplicating functionality here.
4902         * optimize.c: Include input.h.
4903         (expand_call_inline): Use push_srcloc and pop_srcloc.
4904         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
4905         * parse.c: Regenerated.
4906         * Makefile.in (lex.o): Depend on input.h.
4907         (optimize.o): Likewise.
4908
4909 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
4910
4911         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
4912         function type, rather than ICE.
4913
4914 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
4915
4916         * decl.c (grokdeclarator): Call decl_type_access_control.
4917         * parse.y (parse_end_decl): Don't call decl_type_access_control if
4918         decl is null.
4919
4920 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
4921
4922         * decl.c (decls_match): Remove obsolete static member nadgering.
4923
4924 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4925
4926         * decl.c (grokdeclarator): Change ANSI to ISO.
4927         * lex.c (consume_string, readescape, do_identifier): Likewise.
4928         (parse_float, real_yylex): Likewise.
4929         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
4930         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
4931         new_type_id, maybe_label_decls, simple_stmt,
4932         for.init.statement): Likewise.
4933         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
4934         * semantics.c (finish_named_return_value): Likewise.
4935         * parse.c: Regenerate.
4936
4937 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
4938
4939         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
4940         (CPTI_CLASS_STAR_TYPE): Remove.
4941         (vtable_index_type): Likewise.
4942         (class_star_type_node): Remove.
4943         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
4944         (build_binary_op_nodefault): Remove.
4945         * call.c (build_new_op): Use build_binary_op instead of
4946         build_binary_op_nodefault.
4947         * decl.c (init_decl_processing): Remove class_star_type_node
4948         initialization.  Make delta_type_node ptrdiff_type_node under the
4949         new ABI.  Initialize vtable_index_type.
4950         (build_ptrmemfunc_type): Build different structures for the new
4951         ABI.
4952         (build_enumerator): Use build_binary_op instead of
4953         build_binary_op_nodefault.
4954         * method.c (build_overload_value): Mangle pointers-to-members
4955         appropriately under the new ABI.
4956         * typeck.c (build_array_ref): Use build_binary_op instead of
4957         build_binary_op_nodefault.
4958         (get_member_function_from_ptrfunc): Adjust for the new ABI.
4959         (build_binary_op_nodefault): Rename to ...
4960         (build_binary_op): ... this.  Remove old version.  Adjust for
4961         pointer-to-member comparisons under the new ABI.
4962         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
4963         (build_ptrmemfunc): Adjust for the new ABI.
4964         (expand_ptrmemfunc_cst): Likewise.
4965         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
4966         (pfn_from_ptrmemfunc): Adjust for the new ABI.
4967
4968 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
4969
4970         * call.c (build_object_call): Compress consecutive calls to
4971         cp_error.
4972         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
4973         (build_op_delete_call): Adjust message formatting.
4974
4975         * class.c (check_bases): Compress consecutive calls to
4976         cp_pedwarn.
4977         (finish_struct_anon): Say 'ISO C++'.
4978
4979         * decl.c (start_decl): Same here.
4980         (grok_reference_init): Likewise.
4981         (grokfndecl): Correct message formatting.
4982         (grokfndecl): Improve diagnostic.
4983         (check_static_variable_definition): Likewise. Say 'ISO C++'
4984         (compute_array_index_type): Say 'ISO C++'
4985         (create_array_type_for_decl): Compress consecutive calls to
4986         cp_error.
4987         (grokdeclarator): Say 'ISO C++'
4988         (grok_op_properties): Likewise.
4989
4990         * decl2.c (delete_sanity): Clairify diagnostic.
4991         (check_member_template): Same here.
4992         (grok_function_init): Use consistent terminology.
4993
4994         * expr.c (do_case): Say 'ISO C++'
4995
4996         * friend.c (do_friend): Compress consecutive calls to warning.
4997
4998 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
4999
5000         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
5001         * class.c (build_secondary_vtable): Reorganize.  Don't create a
5002         new vtable under the new ABI.
5003         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
5004         computing the size.
5005         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
5006         the initializing elements.
5007         (initialize_vtable): New function.
5008         (dfs_finish_vtbls): Use it.
5009         (dfs_accumulate_vtbl_inits): New function.
5010         (finish_vtbls): Merge primary and secondary vtables under the new
5011         ABI.
5012         (finish_struct_1): Remove redundant call to layout_vtable_decl.
5013         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
5014         aren't VAR_DECLs.
5015
5016         * class.c (build_vtable): New function, split out from ...
5017         (get_vtable_decl): ... here, and ...
5018         (build_secondary_vtable): ... here.
5019
5020         * pt.c (tsubst_decl): Fix formatting.
5021
5022 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5023
5024         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
5025         (avoid_overlap, build_base_field): Likewise.
5026         (build_base_field, build_base_fields, is_empty_class):
5027         Test DECL_SIZE with integer_zero.
5028         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
5029         * cp-tree.h (struct lang_type): New field size_unit.
5030         (CLASSTYPE_SIZE_UNIT): New macro.
5031         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
5032         (cp_finish_decl): Delete -Wlarger-than processing.
5033         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
5034         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
5035         * tree.c (make_binfo): binfo vector is one entry longer.
5036         (walk_tree): Walk DECL_SIZE_UNIT.
5037
5038 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
5039
5040         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
5041         comment.
5042         (build_vtable_entry): Don't assume all vtable entries are
5043         functions.
5044         (build_vtbl_initializer): Adjust accordingly.
5045         (get_vtable_decl): Fix formatting.
5046
5047 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
5048
5049         * semantics.c (deferred_type_access_control): Walk the entire
5050         type_lookups list.
5051         (save_type_access_control): Rename from
5052         initial_deferred_type_access_control.  Just remember the value.
5053         (decl_type_access_control): New fn.
5054         (begin_function_definition): Use deferred_type_access_control, after
5055         we've started the function.  Set type_lookups to error_mark_node.
5056         * parse.y (frob_specs, fn.def1): Adjust.
5057         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
5058         (parse_end_decl, parse_bitfield0, parse_method): New fns.
5059         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
5060         (after_type_component_declarator0): Likewise.
5061         (after_type_component_declarator): Likewise.
5062         (notype_component_declarator): Likewise.
5063         * cp-tree.h: Adjust.
5064
5065         * decl.c (redeclaration_error_message): Allow redeclaration of
5066         namespace-scope decls.
5067
5068 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5069
5070         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
5071
5072 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
5073
5074         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
5075         * decl2.c (grokclassfn): Likewise.
5076
5077         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
5078
5079         * decl2.c (lang_decode_option): Don't set default message length
5080         here.
5081         * lex.c (lang_init_options): Set it here.
5082
5083 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
5084
5085         Make DECL_CONTEXT mean the class in which a member function was
5086         declared, even for a virtual function.
5087         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
5088         (DECL_FRIEND_CONTEXT): New macro.
5089         (DECL_REAL_CONTEXT): Remove.
5090         (SET_DECL_FRIEND_CONTEXT): Likewise.
5091         (DECL_VIRTUAL_CONTEXT): Adjust.
5092         (DECL_CLASS_SCOPE_P): Use TYPE_P.
5093         (add_friends): Remove.
5094         (hack_decl_function_context): Likewise.
5095         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
5096         CP_DECL_CONTEXT.
5097         (build_over_call): Fix indentation.  Use DECL_CONTEXT
5098         instead of DECL_CLASS_CONTEXT.
5099         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
5100         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
5101         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5102         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
5103         (build_base_field): Likewise.
5104         (finish_struct_1): Likewise.
5105         (build_self_reference): Likewise.
5106         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
5107         DECL_REAL_CONTEXT.
5108         (pushtag): Use decl_function_context, not
5109         hack_decl_function_context.
5110         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
5111         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
5112         (pushdecl): Remove bogus code.
5113         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
5114         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
5115         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5116         Use decl_function_context, nothack_decl_function_context.
5117         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
5118         (grokdeclarator): Likewise.  Use decl_function_context, not
5119         hack_decl_function_context.
5120         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
5121         (start_function): Use DECL_FRIEND_CONTEXT, not
5122         DECL_CLASS_CONTEXT.  Use decl_function_context, not
5123         hack_decl_function_context.
5124         (finish_function): Use decl_function_context, not
5125         hack_decl_function_context.
5126         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
5127         DECL_CLASS_CONTEXT.
5128         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
5129         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
5130         (grokfield): Likewise.
5131         (finish_builtin_type): Likewise.
5132         (finish_vtable_vardec): Use decl_function_context, not
5133         hack_decl_function_context.
5134         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5135         (start_static_initialization_or_destruction): Likewise.
5136         (finish_static_initialization_or_destruction): Likewise.
5137         (mark_used): Adjust logic for deciding when to synthesize methods.
5138         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
5139         DECL_REAL_CONTEXT.
5140         * error.c (dump_function_decl): Use DECL_CONTEXT, not
5141         DECL_CLASS_CONTEXT.
5142         * friend.c (is_friend): Likewise.
5143         (add_friends): Remove.
5144         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
5145         * lex.c (begin_definition_of_inclass_inline): Use
5146         decl_function_context, not hack_decl_function_context.
5147         (process_next_inline): Likewise.
5148         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
5149         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
5150         DECL_CLASSS_CONTEXT.
5151         (hack_identifier): Likewise.
5152         (synthesize_method):  Use decl_function_context, not
5153         hack_decl_function_context.
5154         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
5155         DECL_REAL_CONTEXT.
5156         (is_member_template): Use decl_function_context, not
5157         hack_decl_function_context.  Use DECL_CONTEXT, not
5158         DECL_CLASS_CONTEXT.
5159         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
5160         DECL_CLASS_CONTEXT.
5161         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
5162         DECL_REAL_CONTEXT.
5163         (push_template_decl_real): Likewise.
5164         (instantiate_class_template): Don't call add_friends.
5165         (tsubst_default_argument): Use DECL_CONTEXT, not
5166         DECL_REAL_CONTEXT.
5167         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
5168         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5169         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
5170         DECL_CLASS_CONTEXT.
5171         * repo.c (repo_inline_used): Likewise.
5172         * search.c (current_scope): Adjust for new _CONTEXT macros.
5173         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
5174         DECL_REAL_CONTEXT.
5175         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5176         (lookup_fnfields_here):Likewise.
5177         (check_final_overrider): Likewise.
5178         (init_vbase_pointers): Likewise.
5179         (virtual_context): Likewise.
5180         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
5181         (expand_body): Use decl_function_context, not
5182         hack_decl_function_context.
5183         * tree.c (hack_decl_function_context): Remove.
5184         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
5185         DECL_CLASS_CONTEXT.
5186         * typeck2.c (error_not_base_type): Likewise.
5187
5188 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
5189
5190         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
5191
5192 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5193
5194         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
5195
5196 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
5197
5198         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
5199
5200 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
5201
5202         * decl2.c (lang_decode_option): Enable automatic line wrapping.
5203
5204 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
5205
5206         * parse.y (frob_specs): Split out...
5207         (parse_decl): From here.
5208         (fn.def2): Call initial_deferred_type_access_control.
5209         (after_type_component_declarator0): Call frob_specs.
5210         (notype_component_declarator0): Likewise.
5211         * search.c (friend_accessible_p): Nested classes are friends of their
5212         enclosing classes.
5213
5214 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
5215
5216         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
5217         used to create an implicit temporary.
5218
5219         * class.c (dfs_modify_vtables): Tweak calculation of functions to
5220         override.
5221
5222 2000-02-08  Nathan Sidwell  <nathan@acm.org>
5223
5224         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
5225         strip array element qualifiers too.
5226
5227 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
5228
5229         * decl.c (store_parm_decls): Don't build cleanups for parameters
5230         while processing_template_decl.
5231
5232 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
5233
5234         * cp-tree.h (struct saved_scope): Add incomplete field.
5235         (namespace_scope_incomplete): New macro.
5236         * decl.c (pushdecl): Use it.
5237         (hack_incomplete_structures): Use it.  See through artificial
5238         binding levels.
5239         (mark_saved_scope): Mark it.
5240
5241         Implement access control for nested types.
5242         * search.c (type_access_control): New fn.
5243         (accessible_p): Now we do perform access control for types.
5244         * semantics.c (deferred_type_access_control): New fn.
5245         (initial_deferred_type_access_control): New fn.
5246         (begin_function_definition): Call it.  Add lookups parm.
5247         * decl.c (struct binding_level): Add this_class field.
5248         (pushlevel_class): Set it.
5249         (mark_binding_level): Mark it.
5250         (lookup_name_real): Use it.  Call type_access_control.
5251         (mark_saved_scope): Mark lookups field.
5252         * cp-tree.h (flagged_type_tree): Add lookups field.
5253         (struct saved_scope): Add lookups field.
5254         (type_lookups): New macro.
5255         * parse.y (declmods): Now <ftype>.
5256         (parse_decl): Add lookups parm.  Call
5257         initial_deferred_type_access_control.
5258         (lang_extdef): Clear type_lookups.
5259         (typed_declspecs, declmods, typespec): Set lookups field.
5260         (initdcl): Call deferred_type_access_control.
5261         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
5262         component_decl_1, named_parm): Adjust.
5263         * friend.c (is_friend): Nested classes are friends of their
5264         enclosing classes.
5265
5266         * class.c (currently_open_derived_class): New fn.
5267         * method.c (hack_identifier): Use it.
5268
5269         * lex.c (do_identifier): Remove obsolete code.
5270
5271         * parse.y (typed_typespecs): Propagate new_type_flag properly.
5272
5273 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
5274
5275         * tinfo.h: Remove apostrophes from C++ comment (xgettext
5276         thinks this file is plain C).
5277
5278 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5279
5280         * Makefile.in (call.o): Depend on $(EXPR_H).
5281
5282         * call.c: Include "expr.h".
5283
5284         * class.c (dump_class_hierarchy): Add prototype.
5285
5286         * search.c (dfs_get_pure_virtuals): Likewise.
5287
5288 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
5289
5290         * parse.y (simple_stmt): Allow :: token in asm parameter list.
5291         * parse.c: Rebuilt.
5292
5293 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
5294
5295         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
5296         Store it in DECL_FCONTEXT.
5297         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
5298
5299 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
5300
5301         * tinfo.h (old abi): #include "tconfig.h".
5302         * tinfo.cc (convert_to_base): Move into old abi section.
5303
5304 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
5305
5306         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
5307         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
5308         (BINFO_PRIMARY_BINFO): New macro.
5309         (BF_DELTA): Rename to ...
5310         (BV_DELTA): ... this.
5311         (BF_VCALL_INDEX): Rename to ...
5312         (BV_VCALL_INDEX): ... this.
5313         (BF_FN): Rename to ...
5314         (BV_FN): ... this.
5315         * class.c (build_vbase_path): Adjust for changes to reverse_path.
5316         (set_rtti_entry): Rename BF_ macros to BV_ variants.
5317         (modify_vtable_entry): Simplify.
5318         (add_virtual_function): Rename BF_ macros to BV_ variants.
5319         (build_vtable_initializer): Likewise.
5320         (get_class_offset_1): Remove.
5321         (dfs_get_class_offset): Likewise.
5322         (get_class_offset): Likewise.
5323         (dfs_find_final_overrider): New function.
5324         (find_final_overrider): Likewise.
5325         (modify_one_vtable): Remove.
5326         (dfs_find_base): New function.
5327         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
5328         find_final_overrider.
5329         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
5330         virtuals.
5331         (dfs_fixup_vtable_deltas): Remove.
5332         (override_one_vtable): Remove.
5333         (merge_overrides): Likewise.
5334         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
5335         unreal chilren of virtual bases.
5336         (finish_struct_1): Don't use merge_overrides.  Don't use
5337         dfs_fixup_vtable_deltas.
5338         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
5339         BINFOs.
5340
5341 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
5342             Jason Merrill  <jason@yorick.cygnus.com>
5343
5344         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
5345
5346 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
5347
5348         * exception.cc (__throw_bad_typeid): Add missing std::.
5349
5350 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5351
5352         * cp-tree.h (make_thunk): PROTO -> PARAMS.
5353
5354 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
5355
5356         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
5357
5358         Runtime support for new-abi rtti.
5359         * inc/typeinfo (type_info::operator!=): Define in class.
5360         (type_info::before, type_info::name, type_info::operator==,
5361         type_info::operator!=): Define new ABI implementations.
5362         (type_info::is_pointer_p, type_info::is_function_p): Declare
5363         new virtual functions.
5364         (type_info::do_catch, type_info::do_upcast): Likewise.
5365
5366         * tinfo.h (__base_class_info): Define new class.
5367         (__class_type_info): Likewise.
5368         (__si_class_type_info): Likewise.
5369         (__vmi_class_type_info): Likewise.
5370         (__dynamic_cast): Prototype.
5371
5372         * tinfo.cc: Conditionalize old and new rtti mechanisms.
5373         (type_info::is_pointer_p): Define new function.
5374         (type_info::is_function_p): Likewise.
5375         (type_info::do_catch): Likewise.
5376         (type_info::do_upcast): Likewise.
5377         (vtable_prefix): New structure for vtable access.
5378         (adjust_pointer): Define new template function.
5379         (contained_p, public_p, virtual_p, contained_public_p,
5380         contained_nonpublic_p, contained_nonvirtual_p): Define new
5381         functions.
5382         (nonvirtual_base_type): New local variable.
5383         (__class_type_info::~__class_type_info): Define.
5384         (__si_class_type_info::~__si_class_type_info): Likewise.
5385         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
5386         (__class_type_info::do_catch): Define new function.
5387         (__class_type_info::do_upcast): Likewise.
5388         (__class_type_info::find_public_src): Likewise.
5389         (__class_type_info::do_find_public_src): Likewise.
5390         (__si_class_type_info::do_find_public_src): Likewise.
5391         (__vmi_class_type_info::do_find_public_src): Likewise.
5392         (__class_type_info::do_dyncast): Likewise.
5393         (__si_class_type_info::do_dyncast): Likewise.
5394         (__vmi_class_type_info::do_dyncast): Likewise.
5395         (__class_type_info::do_upcast): Likewise.
5396         (__si_class_type_info::do_upcast): Likewise.
5397         (__vmi_class_type_info::do_upcast): Likewise.
5398         (__dynamic_cast): Likewise.
5399
5400         * tinfo2.cc (__fundamental_type_info): Define new class.
5401         (__pointer_type_info): Likewise.
5402         (__reference_type_info): Likewise.
5403         (__array_type_info): Likewise.
5404         (__function_type_info): Likewise.
5405         (__enum_type_info): Likewise.
5406         (__ptr_to_member_type_info): Likewise.
5407         (__fundamental_type_info::~__fundamental_type_info): Define.
5408         (__pointer_type_info::~__pointer_type_info): Likewise.
5409         (__reference_type_info::~__reference_type_info): Likewise.
5410         (__array_type_info::~__array_type_info): Likewise.
5411         (__function_type_info::~__function_type_info): Likewise.
5412         (__enum_type_info::~__enum_type_info): Likewise.
5413         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
5414         (__pointer_type_info::do_catch): Define new function.
5415         (__ptr_to_member_type_info::do_catch): Define new function.
5416
5417         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
5418         (__is_pointer): Likewise.
5419
5420         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
5421
5422 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
5423
5424         * cp/class.c (build_vtable): Rename to build_primary_vtable.
5425         (prepare_fresh_vtable): Rename to build_secondary_vtable.
5426         (make_new_vtable): New function.
5427         (modify_vtable_entry): Handle generation of new vtables correctly.
5428         (modify_one_vtable): Remove unused parameter.
5429         (dfs_fixup_vtable_deltas): Likewise.
5430         (override_one_vtable): Use build_secondary_vtable.
5431         (finish_struct_1): Use build_primary_vtable and
5432         build_secondary_vtable.
5433
5434 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
5435
5436         * cp/decl.c: Adjust variable names, comments, help strings.
5437
5438 2000-01-29  Nathan Sidwell  <nathan@acm.org>
5439
5440         * new2.cc (operator delete[]): Use operator delete, don't assume
5441         implementation.
5442
5443 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
5444
5445         * class.c (build_vtbl_initializer): Add argument to
5446         build_vtable_entry call.
5447
5448 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
5449
5450         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
5451         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
5452         (BF_DELTA): New macro.
5453         (BF_VCALL_INDEX): Likewise.
5454         (BF_FN): Likewise.
5455         (THUNK_VCALL_OFFSET): Likewise.
5456         (make_thunk): Change prototype.
5457         * class.c (build_vtable_entry): Integrate
5458         build_vtable_entry_for_fn.  Handle vcall indices.
5459         (build_vtable_entry_for_fn): Remove.
5460         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
5461         BF_VCALL_INDEX, BF_FN.
5462         (modify_vtable_entry): Integrate common code from
5463         modify_one_vtable and dfs_fixup_vtable_deltas.
5464         (add_virtual_function): Set BF_VCALL_INDEX.
5465         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
5466         and BF_FN.
5467         (modify_one_vtable): Simplify.
5468         (dfs_fixup_vtable_deltas): Likewise.
5469         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
5470         * method.c (make_thunk): Handle vcall indices.
5471
5472 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
5473
5474         Compiler side new abi rtti (not enabled).
5475         * cp-tree.h (new_abi_rtti_p): New macro.
5476         (emit_support_tinfos): Prototype new function.
5477         (tinfo_decl_p): Likewise.
5478         (emit_tinfo_decl): Likwise.
5479         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
5480         macros.
5481         (doing_runtime): New local static.
5482         (init_rtti_processing): Add new-abi initializer.
5483         (get_tinfo_decl): Add new-abi logic.
5484         (tinfo_from_decl): Likewise.
5485         (build_dynamic_cast_1): Likewise.
5486         (qualifier_flags): New static function.
5487         (tinfo_base_init): Likewise.
5488         (generic_initializer): Likewise.
5489         (ptr_ref_initializer): Likewise.
5490         (ptmd_initializer): Likewise.
5491         (class_hint_flags): Likewise.
5492         (class_initializer): Likewise.
5493         (synthesize_tinfo_var): Likewise.
5494         (create_real_tinfo_var): Likewise.
5495         (create_pseudo_type_info): Likewise.
5496         (get_vmi_pseudo_type_info): Likewise.
5497         (create_tinfo_types): Likewise.
5498         (emit_support_tinfos): New global function.
5499         (tinfo_decl_p): New global predicate.
5500         (emit_tinfo_decl): New global function.
5501         * class.c (set_rtti_entry): Generalize for old and new rtti.
5502         (build_vtbl_initializer): Likewise.
5503         * decl2.c (finish_file): Likewise.
5504
5505 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
5506
5507         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
5508         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
5509
5510 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
5511
5512         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
5513         for scopes.
5514
5515 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
5516
5517         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
5518
5519 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
5520
5521         * optimize.c (calls_setjmp_r): Supply new argument
5522         to special_function_p.
5523
5524 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5525
5526         * call.c: PROTO -> PARAMS.
5527         * class.c: Likewise.
5528         * cp-tree.h: Likewise.
5529         * cvt.c: Likewise.
5530         * decl.c: Likewise.
5531         * decl.h: Likewise.
5532         * decl2.c: Likewise.
5533         * dump.c: Likewise.
5534         * errfn.c: Likewise.
5535         * error.c: Likewise.
5536         * except.c: Likewise.
5537         * expr.c: Likewise.
5538         * init.c: Likewise.
5539         * input.c: Likewise.
5540         * lex.c: Likewise.
5541         * lex.h: Likewise.
5542         * method.c: Likewise.
5543         * optimize.c: Likewise.
5544         * parse.y: Likewise.
5545         * pt.c: Likewise.
5546         * repo.c: Likewise.
5547         * rtti.c: Likewise.
5548         * search.c: Likewise.
5549         * semantics.c: Likewise.
5550         * spew.c: Likewise.
5551         * tree.c: Likewise.
5552         * typeck.c: Likewise.
5553         * typeck2.c: Likewise.
5554         * xref.c: Likewise.
5555
5556 2000-01-25  Richard Henderson  <rth@cygnus.com>
5557
5558         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
5559
5560 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
5561
5562         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
5563         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
5564         (struct vcall_offset_data_s): New type.
5565         (dfs_vcall_offset_queue_p): New function.
5566         (dfs_build_vcall_offset_vtbl_entries): Likewise.
5567         (build_vcall_offset_vtbl_entries): Likewise.
5568         (layout_vtable_decl): Likewise.
5569         (num_vfun_entries): Likewise.
5570         (num_extra_vtbl_entries): Add the entries for vcall offsets.
5571         (build_vtbl_initializer): Likewise.
5572         (dfs_finish_vtabls): Use layout_vtable_decl.
5573         (modify_one_vtables): Always duplicate vtables under the new ABI.
5574         (finish_struct_1): Use layout_vtable_decl.
5575
5576 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5577
5578         * decl.c (member_function_or_else): Change third arg from a format
5579         specifier to an `enum overload_flags'.  Callers changed.
5580
5581 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
5582
5583         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
5584         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
5585         build_const_cast, get_delta_difference, check_return_expr): Avoid
5586         ANSI string concatenation usage.
5587
5588 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
5589
5590         * class.c (layout_class_type): Put the fields required to make a
5591         class non-empty at the end, not the beginning, of the TYPE_FIELDs
5592         list.
5593
5594 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
5595
5596         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
5597         template.
5598
5599         * decl2.c (mark_used): Do instantiate inlines that have been
5600         explicitly instantiated.
5601
5602 2000-01-24  Richard Henderson  <rth@cygnus.com>
5603
5604         * call.c (build_over_call): Use expand_tree_builtin.
5605         * typeck.c (build_function_call_real): Likewise.
5606         (build_binary_op_nodefault): Handle unordered compares.
5607
5608 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
5609
5610         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
5611         cp_tree_index values.
5612         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
5613         New global node #defines for them.
5614         * rtti.c (call_void_fn): Replace with ...
5615         (build_runtime_decl): ... new static function.
5616         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
5617         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
5618         (build_dynamic_cast_1): Always produce correctly typed result.
5619         Explicitly produce type_info addresses. Use dynamic_cast_node.
5620         * exception.cc (__throw_bad_cast): Return `void *'.
5621         (__throw_bad_typeid): Return `const type_info &'.
5622
5623 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
5624
5625         * cp-tree.h (get_vtable_decl): Prototype new function.
5626         * class.c (get_vtable_decl): New function. Broken out from ...
5627         (build_vtable): ... here. Use it.
5628         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
5629         by get_vtable_decl.
5630
5631 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
5632
5633         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
5634         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
5635         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
5636         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
5637         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
5638         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
5639         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
5640         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
5641         (CPTI_TINFO_VAR_ID): New enumeration.
5642         (__tp_desc_type_node, __access_mode_type_node,
5643         __bltn_desc_type_node, __user_desc_type_node,
5644         __class_desc_type_node, __ptr_desc_type_node,
5645         __attr_desc_type_node, __func_desc_type_node,
5646         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
5647         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
5648         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
5649         enum_desc_type_node, class_desc_type_node,
5650         si_class_desc_type_node, vmi_class_desc_type_node,
5651         ptmd_desc_type_node, base_desc_type_node): New #defines.
5652         (tinfo_fn_id, tinfo_fn_type): Rename to ...
5653         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
5654         (tinfo_var_id): New enumeration.
5655         (DECL_TINFO_FN_P): Augment comment.
5656         * decl.c (cp_global_trees): Adjust documentation.
5657         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
5658         tinfo_decl_type and tinfo_var_id.
5659         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
5660         (build_typeid): Remove unused variable.
5661         (get_tinfo_var): Use tinfo_var_id.
5662         (tinfo_name): New static function.
5663         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
5664         (tinfo_from_decl): Likewise.
5665         (get_base_offset): New static function, broken out of
5666         expand_class_desc.
5667         (expand_si_desc): Use tinfo_name.
5668         (expand_class_desc): Likewise. Lose local static variable.
5669         Use base_desc_type_node. Use get_base_offset.
5670         (expand_ptr_desc): Use tinfo_name.
5671         (expand_attr_desc): Likewise.
5672         (expand_generic_desc): Likewise.
5673
5674         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
5675         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
5676
5677 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
5678
5679         * cp-tree.h (__eprintf): Remove declaration.
5680         * tree.c (__eprintf): Remove definition.
5681
5682 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
5683             Mark Mitchell  <mark@codesourcery.com>
5684
5685         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
5686         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
5687
5688 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
5689
5690         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
5691
5692 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
5693
5694         * cp-tree.h (register_dtor_fn): New function.
5695         * decl.c (destroy_local_static): Rename to ...
5696         (register_dtor_fn): ... this.  Give it external linkage.
5697         (expand_static_init): Use it.
5698         * decl2.c (do_static_initialization): Likewise, if using
5699         __cxa_atexit.
5700         (do_static_destruction): Check that __cxa_atexit is not in use.
5701         (finish_file): Don't call do_static_destruction if using
5702         __cxa_atexit.
5703
5704         * typeck.c (convert_arguments): Restore two-message error
5705         reporting.
5706
5707 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
5708
5709         Remap dynamic cast hint values to be consistent across ABIs.
5710         * search.c (dynamic_cast_base_recurse): Remap generated value.
5711         (get_dynamic_cast_base_type): Adjust documentation.
5712         * tinfo.h (__user_type_info::dyncast): Likewise.
5713         (__user_type_info::find_public_subobj): Remap BOFF meaning.
5714         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
5715         (__class_type_info::do_dyncast): Likewise.
5716         (__class_type_info::do_find_public_subobj): Likewise.
5717         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
5718
5719 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
5720
5721         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
5722
5723         * typeck2.c (incomplete_type_error): Restore previous
5724         cp_error and cp_error_at call sequence.
5725
5726 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
5727
5728         * class.c (dump_class_hierarchy): Make format agree with argument;
5729         cast pointer to unsigned long and print with %lx.
5730
5731 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
5732
5733         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
5734
5735         * typeck.c (composite_pointer_type, common_type,
5736         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
5737         build_function_call_real, convert_arguments,
5738         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
5739         build_unary_op, mark_addressable, build_compound_expr,
5740         build_static_cast, build_reinterpret_cast, build_const_cast,
5741         build_c_cast, build_modify_expr, get_delta_difference,
5742         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
5743         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
5744         into a single one.
5745         * typeck2.c (readonly_error, abstract_virtuals_error,
5746         process_init_constructor, check_for_new_type): Likewise.
5747
5748 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
5749
5750         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
5751         VAR_DECLs.
5752
5753 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
5754
5755         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
5756         (build_x_typeid): Likewise.
5757         (get_tinfo_fn): Likewise.
5758         (get_tinfo_fn_unused): Rename to ...
5759         (get_tinfo_decl): ... here.
5760         * rtti.c (build_headof): Replace logic error with assertion.
5761         (get_tinfo_fn_dynamic): Rename to ...
5762         (get_tinfo_decl_dynamic): ... here. Make static. Use
5763         complete_type_or_else.
5764         (build_x_typeid): Move into ...
5765         (build_typeid): ... here. Adjust call to
5766         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
5767         throw_bad_typeid expression.
5768         (get_tinfo_fn_unused): Rename to ...
5769         (get_tinfo_decl): ... here. Adjust comment.
5770         (get_tinfo_fn): Delete.
5771         (tinfo_from_decl): New static function.
5772         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
5773         (get_typeid): Use complete_type_or_else.
5774         (build_dynamic_cast_1): Adjust calls to
5775         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
5776         * parse.y (primary): Adjust call to build_typeid.
5777         * except.c (build_eh_type_type_ref): Adjust call to
5778         get_tinfo_decl. Mark as used.
5779         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
5780         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
5781         * parse.c: Regenerated.
5782
5783 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
5784
5785         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
5786         calling convention.
5787         (resolves_to_fixed_type_p): Document calling convention.
5788         * rtti.c (build_x_typeid): Initialize NONNULL.
5789
5790         * cp-tree.h (build_shared_int_cst): New function.
5791         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
5792         * class.c (modify_vtable_entry): Likewise.
5793         (add_virtual_function): Split out code to generated shared
5794         INTEGER_CSTs to build_share_int_cst.
5795         (modify_all_vtables): Handle all the overridden functions here.
5796         Add overridden functions from non-primary virtual bases to the
5797         primary vtable.
5798         (finish_struct_1): Adjust call to modify_all_vtables.  Add
5799         overridden functions from non-primary bases to the vtable.
5800         * tree.c (build_shared_int_cst): New function.
5801
5802         * cp-tree.h (scratchalloc): Remove.
5803         (build_scratch_list): Likewise.
5804         * call.c (convert_class_to_reference): Replace build_scratch_list
5805         and build_expr_list with build_tree_list.
5806         (add_candidate): Replace scratchalloc with expralloc.  Note memory
5807         leak.
5808         (build_user_type_conversion_1):  Replace build_scratch_list
5809         and build_expr_list with build_tree_list.
5810         (build_new_op): Likewise.
5811         (build_op_delete_call): Likewise.
5812         (convert_like): Likewise.
5813         * cvt.c (ocp_convert): Likewise.
5814         * decl.c (start_decl): Likewise.
5815         (start_function): Likewise.
5816         (finish_destructor_body): Likewise.
5817         (maybe_build_cleanup_1): Likewise.
5818         * decl2.c (reparse_decl_as_expr): Likewise.
5819         * init.c (perform_member_init): Likewise.
5820         (expand_cleanup_for_base): Likewise.
5821         (build_builtin_delete_call): Likewise.
5822         (build_new_1): Likewise.
5823         (build_delete): Likewise.
5824         * method.c (do_build_assign_ref): Likewise.
5825         * parse.y (already_scoped_stmt): Likewise.
5826         (nontrivial_exprlist): Likewise.
5827         (net_initializer): Likewise.
5828         (initlist): Likewise.
5829         * parse.c: Regenerated.
5830         * rtti.c (build_x_typeid): Likewise.
5831         (build_dynamic_cast_1): Likewise.
5832         * typeck.c (build_x_compound_expr): Likewise.
5833         (build_static_cast): Likewise.
5834         (build_modify_expr): Likewise.
5835
5836         * cp-tree.h (DECL_VINDEX): Add documentation.
5837         * class.c (build_vtable_entry): Likewise.
5838         (start_vtable): Add comment.
5839         (add_virtual_function): Replace pending_hard_virtuals with
5840         overridden_virtuals and pending_virtuals with new_virtuals.
5841         Replace redundant assignments with assertions.
5842         (check_for_override): Add comment.
5843         (check_bases_and_members): Replace pending_hard_virtuals with
5844         overridden_virtuals and pending_virtuals with new_virtuals.
5845         (create_vtbl_ptr): Likewise.
5846         (layout_class_type): Likewise.
5847         (finish_struct_1): Likewise.  Add comments.
5848
5849 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
5850
5851         * class.c (finish_struct_1): Replace redundant code with
5852         assertions.
5853
5854         * cp-tree.h (flag_new_abi): Move.
5855         (flag_use_cxa_atexit): Likewise.
5856         (flag_honor_std): Likewise.
5857         (flag_rtti): Likewise.
5858         (vbase_offsets_in_vtable_p): Define.
5859         (vptrs_present_everywhere_p): Likewise.
5860         (TYPE_CONTAINS_VPTR_P): Likewise.
5861         (dfs_walk_real): Declare.
5862         * class.c (build_vbase_pointer_fields): Check
5863         vbase_offsets_in_vtable_p.
5864         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
5865         BINFO_VPTR_FIELD.
5866         (build_vbase_offset_vtbl_entries): Simplify.
5867         (build_vbase_offset_vtbl_entries): Adjust.
5868         (build_vbase_pointer): Add ability to look up vbase offsets in
5869         vtable.
5870         (start_vtable): New function.
5871         (add_virtual_function): Use it.
5872         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
5873         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
5874         (build_vtbl_initializer): Take the type of the complete object as
5875         input.  Use it to correctly calculate vbase offsets.
5876         (dfs_finish_vtbls): Pass the complete type to
5877         build_vtbl_initializer.
5878         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
5879         (create_vtable_ptr): Create a vtable even if there are no
5880         new virtual functions, under the new ABI.
5881         (finish_struct_1): Likewise.
5882         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
5883         * decl.c (exapnd_static_init): Remove call to
5884         preserve_initializer.
5885         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
5886         vtables.
5887         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
5888         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
5889         (construct_virtual_bases): Don't initialize virtual base pointers
5890         under the new ABI.
5891         (build_aggr_init): Clean up comment.
5892         (expand_aggr_init_1): Likewise.
5893         * rtti.c (expand_class_desc): Store the virtual function table
5894         index where the vbase offset lives in the offset field.
5895         * search.c (dfs_walk_real): Make it global.
5896         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
5897         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
5898
5899         * tinfo.h (USItype): Make it signed under the new ABI.
5900         * tinfo.cc (convert_to_base): New function.  Encapsulate base
5901         conversion logic here.
5902         (__class_type_info::do_upcast): Use it.
5903         (__class_type_info::do_dyncast): Likewise.
5904         (__class_type_info::do_find_public_subobj): Likewise.
5905
5906         * init.c (construct_virtual_bases): Don't look up the addresses of
5907         virtual bases at run-time.
5908
5909         * class.c (build_vbase_pointer): Relocate.
5910         (build_vbase_pointer_fields): Likewise.
5911         (dfs_build_vbase_offset_vtbl_entries): Likewise.
5912         (build_vbase_offset_vtbl_entries): Likewise.
5913
5914         * decl.c (init_decl_processing): Complain if -fnew-abi
5915         -fno-vtable-thunks is used.
5916
5917         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
5918         flag_new_abi.
5919
5920 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
5921
5922         * cp-tree.h (num_extra_vtbl_entries): New function.
5923         (size_extra_vtbl_entries): Likewise.
5924         (dfs_vtable_path_unmark): Likewise.
5925         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
5926         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5927         * class.c (num_extra_vtbl_entries): New function.
5928         (size_extra_vtbl_entries): Likewise.
5929         (dfs_build_vbase_offset_vtbl_entries): New function.
5930         (build_vbase_offset_vtbl_entries): Likewise.
5931         (build_vtbl_initializer): Use it.
5932         (finish_struct_1): Adjust vtable sizes (using
5933         num_extra_vtbl_entries).
5934         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
5935         THUNK_DECL is non-NULL before expanding it.
5936         * init.c (expand_virtual_init): Adjust the vtable pointer by
5937         size_extra_vtbl_entries before storing it.
5938         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
5939         Handle TREE_LIST parameters here, not in the dfs_* functions.
5940         (dfs_unmarked_real_bases_queue_p): Adjust.
5941         (dfs_marked_real_bases_queue_p): Likewise.
5942         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
5943         (dfs_vtable_path_marked_real_bases_queue_p): New function.
5944         (dfs_vtable_path_unmark): Likewise.
5945
5946 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
5947
5948         * optimize.c (copy_body_r): Clear the operand three of a
5949         TARGET_EXPR when copying it.
5950
5951 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5952
5953         * method.c (build_decl_overload_real): Check whether we are in ::
5954         before returning __builtin_new/delete.
5955
5956 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
5957
5958         * pt.c (tsubst_friend_function): Improve comment.
5959         (instantiate_decl): Avoid crashing when a "nested" function is
5960         instantiated from the top level.
5961
5962         * dump.c (dqeueue_and_dump): Dump
5963         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
5964
5965 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5966
5967         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
5968
5969 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
5970
5971         * g++spec.c (lang_specific_driver): Add -fnew-abi if
5972         ENABLE_NEW_GXX_ABI defined.
5973         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
5974         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
5975         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
5976
5977 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
5978
5979         * decl.c (start_cleanup_fn): Call pushdecl.
5980
5981         * call.c (convert_class_to_reference): Fix typos.
5982         (build_conditional_expr): Handle errors gracefully.
5983         * class.c (push_nested_class): Likewise.
5984         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
5985         (DECL_THIS_EXTERN): Use it.
5986         (DECL_THIS_STATIC): Likewise.
5987         * cvt.c (convert_to_void): Handle errors gracefully.
5988         (build_expr_type_conversion): Likewise.
5989         * decl.c (maybe_push_decl): Likewise.
5990         (start_decl_1): Likewise.
5991         (require_complete_types_for_parms): Likewise.
5992         * parse.y (structsp): Likewise.
5993         (base_class): Likewise.
5994         * parse.c: Regenerated.
5995         * pt.c (finish_member_template_decl): Likewise.
5996         * typeck.c (decay_conversion): Likewise.
5997
5998         * cp-tree.h (dfs_skip_vbases): New function.
5999         (find_vbase_instance): Likewise.
6000         * class.c (determine_primary_base): Allow a nearly empty base to
6001         serve as a primary base class under the new ABI.
6002         (get_class_offset_1): Rename to ...
6003         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
6004         messages here.
6005         (get_class_offset): Use it.  Issue error messages here.
6006         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
6007         find the right copies of virtual bases.
6008         (fixup_vtable_deltas1): Rename to ...
6009         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
6010         bases as primary bases.
6011         (fixup_vtable_deltas): Remove.
6012         (override_one_vtable): Handle virtual bases as primary bases.
6013         (merge_overrides): Likewise.
6014         (finish_struct_1): Likewise.
6015         (dump_class_hierarchy): Dump primary-ness of bases as well.
6016         * search.c (mark_primary_bases): Use a pre-order traversal to
6017         handle primary virtual bases.
6018         (dfs_skip_vbases): New fiunction.
6019         (expand_upcast_fixups): Adjust to handle primary virtual bases.
6020         (fixup_virtual_upcast_offsets): Likewise.
6021         (fixup_all_virtual_upcast_offsets): Likewise.
6022         (dfs_find_vbase_instances): New function.
6023         (find_vbase_instance): Likewise.
6024
6025 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
6026
6027         * lex.c (DIR_SEPARATOR): Delete macro.
6028
6029 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
6030
6031        * decl2.c (lang_decode_option): Handle automatic line wrapping
6032        option.
6033
6034 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
6035
6036         * friend.c (do_friend): Don't resolve scopes when processing
6037         template declarations, even if the qualifying scope doesn't
6038         involve template parameters.
6039
6040 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
6041
6042         * class.c (dfs_modify_vtables_queue_p): Remove.
6043         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
6044         and dfs_marked_real_bases_queue_p instead of
6045         dfs_modify_vtables_queue_p.
6046
6047         * class.c (build_vbase_path): Simplify.
6048         (dfs_propagate_binfo_offsets): New function.
6049         (propagate_binfo_offsets): Use it.
6050         (remove_base_field): Simplify.
6051         (dfs_set_offset_for_vbases): Remove.
6052         (dfs_set_offset_for_shared_vbases): New function.
6053         (dfs_set_offset_for_unshared_vbases): Likewise.
6054         (layout_virtual_bases): Use them.
6055         (layout_basetypes): Don't call propagate_binfo_offsets.
6056         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
6057         for the vbases.
6058
6059         * class.c (build_base_field): New function, split out from ...
6060         (build_base_fields): ... here.  Use it.  Allocate primary bases
6061         first, under the new ABI.
6062         (get_vtable_entry): Remove.
6063         (remove_base_field): New function, split out from ...
6064         (remove_base_fields): ... here.  Adjust since primary bases come
6065         first under the new ABI.
6066
6067         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
6068         (initialize_vtbl_ptrs): New function.
6069         (expand_indirect_vtbls_init): Change prototype.
6070         (convert_pointer_to_vbase): Declare.
6071         * init.c (expand_direct_vtbls_init): Remove.
6072         (dfs_initialize_vtbl_ptrs): New function.
6073         (initialize_vtbl_ptrs): Likewise.
6074         (emit_base_init): Use initialize_vtbl_ptrs.
6075         * search.c (convert_pointer_to_vbase): Make it global.
6076         (expand_indirect_vtbls_init): Remove vtable initialization code.
6077         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
6078
6079         * class.c (dfs_finish_vtbls): New function.
6080         (finish_vtbls): Use it.
6081         (dump_class_hierarchy): New function.
6082
6083         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
6084         (BINFO_VBASE_PRIMARY_P): New macro.
6085         (BINFO_VIRTUALS): Add to documentation.
6086         (SET_BINFO_PRIMARY_MARKED_P): Remove.
6087         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
6088         (dfs_mark_primary_bases_queue_p): Likewise.
6089         (dfs_unmarked_real_bases_queue_p): New function.
6090         (dfs_marked_real_bases_queue_p): Likewise.
6091         * search.c (dfs_mark_primary_bases): Adjust.
6092         (mark_primary_bases): Likewise.
6093         (get_shared_vbase_if_not_primary): New function.
6094         (dfs_unmarked_real_bases_queue_p): Likewise.
6095         (dfs_marked_real_bases_queue_p): Likewise.
6096         (dfs_get_pure_virtuals): Simplify.
6097         (get_pure_virtuals): Likewise.
6098
6099 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6100
6101         * lex.c: Include tm_p.h.
6102
6103 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
6104
6105         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
6106
6107 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
6108
6109         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
6110         * pt.c (instantiate_decl): Defer comdat templates that might not be
6111         needed.
6112
6113         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
6114         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
6115         (finish_file): Likewise.
6116
6117         * decl2.c (import_export_class): Undo 12/14 change.
6118
6119         * error.c (dump_decl): operator new, not operatornew.
6120
6121         * class.c (field_decl_cmp): A nontype is "greater" than a type.
6122         * search.c (lookup_field_1): Look for the last field with the
6123         desired name.
6124
6125 2000-01-05  Nathan Sidwell  <nathan@acm.org>
6126
6127         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
6128         FUNCTION_DECL.
6129
6130 2000-01-05  Nathan Sidwell  <nathan@acm.org>
6131
6132         * typeck.c (build_static_cast): Don't strip target qualifiers
6133         when casting from a class.
6134
6135 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6136
6137         * class.c (warn_hidden): Initialize variable `fndecl'.
6138
6139 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
6140
6141         * decl.c (flag_isoc9x): New variable to be able to use code in
6142         c-common.c.  For now always zero.
6143
6144 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
6145
6146         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
6147         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
6148         or unshare_base_binfos for virtual bases here.
6149         * search.c (dfs_get_vbase_types): Do it here.
6150         (get_vbase_types): Adjust.
6151
6152 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
6153
6154         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
6155         (BINFO_PRIMARY_MARKED_P): Use flag 5.
6156         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
6157         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
6158         (unmark_primary_bases): Remove declaration.
6159         (unmarkedp): Declare.
6160         (dfs_vbase_unmark): Likewise.
6161         * class.c (determine_primary_base): Return immediately if there
6162         are no base classes.  Call mark_primary_bases here.
6163         (modify_all_direct_vtables): Remove.
6164         (modify_all_indirect_vtables): Remove.
6165         (dfs_modify_vtables_queue_p): New function.
6166         (dfs_modify_vtables): New function.
6167         (modify_all_vtables): Use them.
6168         (build_base_fields): Build FIELD_DECLs for primary virtual base
6169         classes.
6170         (create_vtable_ptr): Don't call determine_primary_base here.
6171         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
6172         (dfs_set_offset_for_vbases): ... this.
6173         (layout_virtual_bases): Use it.
6174         (layout_class_type): Call determine_primary_base here.
6175         * search.c (unmarkedp): Make it global.
6176         (shared_marked_p): Simplify.
6177         (shared_unmarked_p): Likewise.
6178         (dfs_primary_bases_queue_p): Remove.
6179         (dfs_unmark_primary_bases): Likewise.
6180         (unmark_primary_bases): Likewise.
6181         (mark_primary_bases): Simplify.
6182         (get_pure_virtuals): Don't call mark_primary_bases here.
6183         (dfs_vbase_unmark): New function.
6184         (get_vbase_types): Simplify.
6185
6186         * class.c (struct base_info): Remove.
6187         (determine_primary_base): Take has_virtual_p rather than a
6188         base_info as input.  Don't calculate max_has_virtual.
6189         (finish_struct_bits): Remove max_has_virtual argument.
6190         (create_vtable_ptr): Remove max_has_virtual_p argument.
6191         (layout_virtual_bases): Remove max argument.
6192         (layout_basetypes): Likewise.
6193         (layout_class_type): Remove max_has_virtual_p argument.
6194         (finish_struct_1): Remove max_has_virtual.
6195
6196         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
6197         (layout_basetypes): Remove.
6198         * class.c (propagate_binfo_offsets): Moved here from tree.c.
6199         Update to handle primary virtual bases.
6200         (remove_base_fields): New function, split out from
6201         layout_basetypes.
6202         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
6203         (layout_virtual_bases): New function, split out from
6204         layout_basetypes.  Update to handle primary virtual bases.
6205         (layout_basetypes): Moved here from tree.c.  Use
6206         remove_base_fields and layout_virtual_bases.
6207         * search.c (dfs_mark_primary_bases_queue_p): New function.
6208         (mark_primary_bases): Use it.
6209         * tree.c (CEIL): Remove.
6210         (propagate_binfo_offsets): Remove.
6211         (layout_basetypes): Remove.
6212
6213 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
6214
6215         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
6216         (BINFO_PRIMARY_MARKED_P): New macro.
6217         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
6218         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
6219         (mark_primary_bases): New function.
6220         (unmark_primary_bases): Likewise.
6221         * search.c (get_abstract_virtuals_1): Remove.
6222         (dfs_mark_primary_bases): New function.
6223         (mark_primary_bases): Likewise.
6224         (dfs_unmark_primary_bases): Likewise.
6225         (unmark_primary_bases): Likewise.
6226         (dfs_get_pure_virtuals): Likewise.
6227
6228 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
6229
6230         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
6231         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
6232         (modify_one_vtable): Adjust.
6233         (fixup_vtable_deltas1): Likewise.
6234         (override_one_vtable): Likewise.
6235         * search.c (get_abstract_virtuals_1): Likewise.
6236         (get_pure_virtuals): Likewise.
6237         (expand_upcast_fixups): Likewise.
6238         * tree.c (debug_binfo): Likewise.
6239
6240         * class.c (build_vtable): Don't return a value.  Don't rebuild
6241         vtables for bases that have already been handled.
6242         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
6243         already been handled.
6244         (modify_one_vtable): Adjust accordingly.
6245         (fixup_vtable_deltas1): Likewise.
6246         (finish_struct_1): Likewise.
6247
6248 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6249
6250         * call.c (build_new_method_call): Also check destructors.
6251