OSDN Git Service

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