OSDN Git Service

* cp/cp-tree.h (struct cp_language_function): Remove x_result_rtx.
[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>