re PR c++/7788 (g++-3.2 internal error: Segmentation fault)
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
2
3         PR c++/7788
4         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
5
6 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
7
8         * cp-tree.h: Fix comment typos.
9         * decl.c: Likewise.
10         * pt.c: Likewise.
11
12 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
13
14         * cp/class.c (contains_empty_class_p): New method.
15         (walk_subobject_offsets): Correct computation of field offset.
16         (layout_empty_base): Correct placement of emtpy base classes.
17         (layout_class_type): Warn about ABI changes.
18
19 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
20
21         * cp/class.c (layout_virtual_bases): Do not round the size of the
22         type to a multiple of the alignment before laying out virtual bases.
23         (layout_class_type): Correct handling of bit-fields that are wider
24         than their type inside unions.  Round the size of the type to a
25         even number of bytes when computing the size without virtual
26         bases.
27         * cp/cp-tree.h (abi_version_at_least): New macro.
28         
29 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
30
31         * ChangeLog: Follow spelling conventions.
32         * ChangeLog.2: Likewise.
33         * call.c: Likewise.
34         * class.c: Likewise.
35         * cp-tree.h: Likewise.
36         * cvt.c: Likewise.
37         * decl.c: Likewise.
38         * decl2.c: Likewise.
39         * except.c: Likewise.
40         * friend.c: Likewise.
41         * g++spec.c: Likewise.
42         * init.c: Likewise.
43         * lex.c: Likewise.
44         * mangle.c: Likewise.
45         * method.c: Likewise.
46         * operators.def: Likewise.
47         * optimize.c: Likewise.
48         * pt.c: Likewise.
49         * rtti.c: Likewise.
50         * search.c: Likewise.
51         * semantics.c: Likewise.
52         * spew.c: Likewise.
53         * tree.c: Likewise.
54         * typeck.c: Likewise.
55
56 2002-09-18  Devang Patel  <dpatel@apple.com>
57
58         * cp/cp-tree.h: New prototype for walk_vtabls().
59         * cp/decl.c (walk_vtables_r): New function.
60         (struct cp_binding_level): Add new members, namespaces,
61         names_size and vtables.
62         (add_decl_to_level): Add decl in namespaces or vtables
63         chain, if conditions match.
64         (walk_vtables): New function.
65         (walk_namespaces_r): Travers separate namespace chain
66         for namespace decls.
67         (wrapup_globals_for_namespace): Use names_size instead
68         of list_length().
69         * cp/decl2.c (finish_file): Use walk_vtables() instead of
70         walk_globals() to walk vtable decls.
71
72 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
73
74         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
75         ICE with invalid pointers & references.
76
77 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
78
79         * Make-lang.in: Remove all references to the demangler.
80         * cxxfilt.c: Moved to binutils.
81
82 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
83
84         PR c++/7718
85         * pt.c (tsubst_decl): Remove assert.
86
87         Remove DR 295 implementation.
88         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
89         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
90         about ignoring volatile qualifiers.
91
92         * search.c (lookup_member): Correct documentation.
93
94 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
95
96         * cp-tree.h (union lang_tree_node): Add chain_next option.
97
98 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
99
100         * parse.y (parse_finish_call_expr): Check lookup_member result.
101
102         PR c++/7015
103         * semantic.c (finish_asm_stmt): Fix operand/output_operands
104         thinko.
105         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
106
107 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
108
109         PR c++/7919
110         * call.c (build_over_call): Convert this pointer for fns found by
111         using decls.
112
113 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
114
115         * ChangeLog: Follow spelling conventions.
116         * ChangeLog.1: Likewise.
117
118 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
119
120         PR c++/7768
121         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
122
123 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
124
125         * error.c: Fix comment formatting.
126         * except.c: Likewise.
127         * expr.c: Likewise.
128         * friend.c: Likewise.
129         * g++spec.c: Likewise.
130         * init.c: Likewise.
131         * lex.c: Likewise.
132         * mangle.c: Likewise.
133         * method.c: Likewise.
134         * optimize.c: Likewise.
135         * pt.c: Likewise.
136         * rtti.c: Likewise.
137         * search.c: Likewise.
138         * semantics.c: Likewise.
139         * spew.c: Likewise.
140         * tree.c: Likewise.
141         * typeck.c: Likewise.
142         * typeck2.c: Likewise.
143
144 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
145
146         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
147
148 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
149
150         * decl.c: Fix comment formatting.
151         * decl2.c: Likewise.
152
153 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
154
155         * call.c: Fix comment formatting.
156         * class.c: Likewise.
157         * cp-lang.c: Likewise.
158         * cp-tree.h: Likewise.
159         * cvt.c: Likewise.
160
161 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
162
163         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
164         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
165         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
166         minor adjustments (use version_string, eliminate yet another
167         duplicate of xmalloc)
168
169 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
170
171         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
172
173 2002-09-05  Jason Merrill  <jason@redhat.com>
174
175         * typeck2.c (add_exception_specifier): Only pedwarn for an
176         incomplete type.
177         (require_complete_eh_spec_types): New fn.
178         (cxx_incomplete_type_diagnostic): Also support pedwarning.
179         * typeck.c (complete_type_or_diagnostic): Likewise.
180         * call.c (build_call): Call require_complete_eh_spec_types.
181         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
182         on an incomplete type.
183
184 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
185
186         * decl.c (start_cleanup_fn): Clear interface_only before
187         start_function, restore it afterwards.
188
189 2002-08-31  Jason Merrill  <jason@redhat.com>
190
191         * cp-lang.c (cp_expr_size): Allow initialization from a
192         CONSTRUCTOR.
193
194 2002-08-30  Richard Henderson  <rth@redhat.com>
195
196         PR opt/7515
197         * tree.c: Include target.h.
198         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
199         don't bind locally.
200         * Makefile.in (tree.o): Update.
201
202 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
203
204         * class.c (layout_virtual_bases): Warn about bugs in G++ that
205         result in incorrect object layouts.
206         (layout_class_type): Likewise.
207
208 2002-08-24  Matt Austern  <austern@apple.com>
209
210         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
211         are allowable.
212         (real_lvalue_p): Update caller.
213         (lvalue_p): Ditto.
214         (non_cast_lvalue_or_else): New.
215         * tree.h: Declare it.
216         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
217
218 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
219
220         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
221         and COND_EXPR specially; fix error message output.
222
223 2002-08-22  Jason Merrill  <jason@redhat.com>
224
225         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
226         * semantics.c (nullify_returns_r): Likewise.
227
228 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
229
230         Fix PR/7621
231         * typeck.c (finish_class_member_access_expr): Diagnose cases where
232         name lookup finds nothing.
233
234 2002-08-15  Jason Merrill  <jason@redhat.com>
235
236         * semantics.c (finish_then_clause): Remove redundant assignment.
237         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
238         extra binding level outside the if/switch statement.
239         (finish_while_cond, finish_for_cond): Rewrite complex condition
240         into the loop body.
241
242 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
243
244         * parse.y (sizeof, alignof, typeof): New non-terminals to
245         increment skip_evaluation.  Replace terminals with them and
246         decrement skip_evaluation at the end of rules using them.
247         * decl2.c (mark_used): Don't assemble_external if
248         skipping evaluation.
249
250 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
251
252         Fix PR/7504
253         * parse.y (parse_finish_call_expr): Handle incomplete
254         type used to name a scope.
255
256 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
257
258         PR c++/7598
259         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
260         regression caused by my 2002-08-08 patch.
261
262 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
263
264         * decl.c (pushdecl_class_level): Honor requests to bind names to
265         OVERLOADs.
266
267 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
268
269         * decl2.c (build_call_from_tree): Fix uninitialized variable.
270         * parse.y (parse_finish_call_expr): Likewise.
271         * repo.c (old_args, old_dir, old_main): Const-ify.
272
273 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
274
275         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
276         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
277         * optimize.c (maybe_clone_body): Likewise.
278         * pt.c (tsubst_enum): Likewise.
279         (lookup_template_class): Likewise.
280         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
281
282 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
283
284         * lang-specs.h: Remove -ansi.
285
286 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
287
288         * tree.c (maybe_dummy_object): Replace // with /* */
289
290 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
291
292         * call.c (standard_conversion): Use build_ptrmem_type.
293         * cp-tree.h (build_ptrmem_type): New function.
294         (adjust_result_of_qualified_name_lookup): Likewise.
295         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
296         static data members.
297         (build_ptrmem_type): New function.
298         (grokdeclarator): Do not use build_offset_type when encountering a
299         qualified name.
300         * parse.y (parse_finish_call_expr): Use
301         adjust_result_of_qualified_name_lookup.
302         * search.c (adjust_result_of_qualified_name_lookup): New function.
303         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
304         accessing OFFSET_TYPEs directly.
305
306 2002-08-08  Mike Stump  <mrs@apple.com>
307
308         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
309         (type_decays_to): Likewise.
310         * class.c (find_final_overrider): Likewise.
311         (maybe_note_name_used_in_class): Likewise.
312         * decl.c (current_tmpl_spec_kind): Likewise.
313         (add_binding): Likewise.
314         (push_class_binding): Likewise.
315         (duplicate_decls): Likewise.
316         (layout_var_decl): Likewise.
317         (grokfndecl): Likewise.
318         (grokdeclarator): Likewise.
319         (check_default_argument): Likewise.
320         * decl2.c (handle_class_head): Likewise.
321         * error.c (dump_template_decl): Likewise.
322         * init.c (build_offset_ref): Likewise.
323         * pt.c (check_specialization_scope): Likewise.
324         (determine_specialization): Likewise.
325         (check_explicit_specialization): Likewise.
326         (maybe_check_template_type): Likewise.
327         (process_partial_specialization): Likewise.
328         (check_default_tmpl_args): Likewise.
329         (push_template_decl_real): Likewise.
330         (convert_template_argument): Likewise.
331         (try_class_unification): Likewise.
332         (get_bindings_real): Likewise.
333         (do_decl_instantiation): Likewise.
334         * semantics.c (begin_function_definition): Likewise.
335         (finish_member_declaration): Likewise.
336         (check_multiple_declarators): Likewise.
337         * typeck.c (comp_array_types): Likewise.
338         (comptypes): Likewise.
339         (expr_sizeof): Likewise.
340         (build_binary_op): Likewise.
341         (dubious_conversion_warnings): Likewise.
342         (check_return_expr): Likewise.
343
344 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
345
346         * typeck.c (build_class_member_access_expr): Do not return
347         error_mark_node when no error has occurred.
348
349 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
350
351         * typeck.c (build_component_addr): Remove.
352         (build_unary_op): Just check it's not a bitfield, and then build
353         an ADDR_EXPR.
354
355 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
356
357         * class.c (convert_to_base): Correct check for error_mark_node.
358         (create_vtable_ptr): Remove unused VFUNS_P parm.
359
360 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
361
362         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
363
364 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
365
366         Rework build_component_ref.
367         * call.c (build_vfield_ref): Do not go through build_component_ref.
368         (build_field_call): Use build_class_member_access_expr.
369         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
370         (build_object_call): Likewise.
371         * class.c (convert_to_base): New function.
372         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
373         (instantiate_type): Handle BASELINKs.
374         * cp-tree.def (BASELINK): New tree code.
375         * cp-tree.h (BASELINK_P): Reimplement.
376         (SET_BASELINK_P): Remove.
377         (BASELINK_BINFO): Reimplement.
378         (BASELINK_FUNCTIONS): Likewise.
379         (BASELINK_ACCESS_BINFO): Likewise.
380         (BASELINK_OPTYPE): Likewise.
381         (convert_to_base): New function.
382         (name_p): Likewise.
383         (build_object_ref): Remove.
384         (build_component_ref_1): Likewise.
385         (build_component_ref): Likewise.
386         (build_x_component_ref): Likewise.
387         (build_class_member_access_expr): New function.
388         (finish_class_member_access_expr): Likewise.
389         (build_ptrmemfunc_access_expr): Likewise.
390         * decl.c (grokdeclarator): Handle BASELINKs.
391         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
392         finish_class_member_access_expr.
393         (arg_assoc): Handle BASELINKs.
394         (do_class_using_decl): Likewise.
395         * error.c (dump_decl): Likewise.
396         (dump_expr): Use build_ptrmemfunc_access_expr.
397         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
398         destructors.
399         (build_throw): Use BASELINK_FUNCTIONS.
400         * init.c (perform_member_init): Use
401         build_class_member_access_expr.
402         (build_offset_ref): Handle BASELINKs.  Use
403         build_class_member_access_expr.
404         * method.c (hack_identifier): Likewise.
405         * parse.y (do_id): Use BASELINK, not TREE_LIST.
406         (primary): Remove uses of build_object_ref.
407         * pt.c (lookup_template_function): Handle BASELINKs.
408         (resolve_overloaded_unification): Likewise.
409         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
410         (lookup_field): Use BASELINK, not TREE_LIST.
411         (lookup_fnfiels): Likewise.
412         (setup_class_bindings): Likewise.
413         * semantics.c (finish_object_call_expr): Do not use
414         build_method_call when we already know what function is being
415         called.
416         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
417         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
418         TREE_CHAIN.
419         (name_p): New function.
420         * typeck.c (build_object_ref): Remove.
421         (build_component_ref_1): Likewise.
422         (build_x_component_ref): Likewise.
423         (build_class_member_access_expr): New function.
424         (finish_class_member_access_expr): Likewise.
425         (build_ptrmemfunc_access_expr): Likewise.
426         (get_member_function_from_ptrfunc): Use
427         build_ptrmemfunc_access_expr.
428         (build_binary_op): Likewise.
429         (build_unary_op): Likewise.
430         (build_ptrmemfunc): Likewise.
431         (pfn_from_ptrmemfunc): Likewise.
432         * typeck2.c (build_m_component_ref): Adjust comment.
433
434 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
435
436         * Make-lang.in (CXX_C_OBJS): Update.
437         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
438         * cp-tree.h (cxx_decode_option): Remove.
439         * decl2.c (compare_options, lang_f_options, unsupported_options,
440         cxx_decode_option): Remove.
441
442 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
443
444         * typeck.c (build_x_unary_op): Handle pointer-to-member.
445
446 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
447
448         * class.c: Don't include obstack.h.
449         (popclass):
450         * decl2.c: Delete bogus comment.
451         * error.c: Don't include obstack.h.
452         * except.c: Likewise.
453         (dump_type): Correct comment.
454         * method.c: Don't include obstack.h.
455         * tree.c: Likewise.
456
457 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
458
459         Fix PR/2213
460         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
461         expressions to pointer-to-data-member of pointer-to-member-functions.
462
463 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
464
465         * cvt.c (ocp_convert): Delete obsolete code.
466         * parse.y (permanent_obstack): Delete declaration.
467         * pt.c (permanent_obstack): Delete declaration.
468         * repo.c (permanent_obstack): Delete declaration.
469         (open_repo_file): Use xmalloc instead of permanent_obstack.
470         (init_repo): Use xstrdup instead of permanent_obstack.
471
472 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
473
474         * cp-tree.h (VF_DERIVED_VALUE): Remove.
475         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
476
477 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
478
479         PR 7470.
480         C++ ABI change - vfunc ordering.
481         * class.c (add_virtual_function): Remove.
482         (dfs_modify_all_vtables): Take list of all declared
483         virtuals. Assign all that are not in primary base.
484         (check_for_override): Adjust comments.
485         (create_vtable_ptr): Take single list of virtuals. Build chain
486         of declared virtuals here.
487         (layout_class_type): Take single list of virtuals. Adjust.
488         (finish_struct_1): Keep virtuals on single list. Adjust.
489
490 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
491
492         * init.c (build_member_call): Use build_new_method_call, not
493         build_method_call.
494
495 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
496
497         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
498
499 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
500
501         * call.c (build_method_call): Issue a more helpful error message
502         about ambiguous method names.
503
504 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
505
506         * tree.c (build_shared_int_cst): Make cache file scope, and
507         GTY it.
508
509 2002-08-02  Jason Merrill  <jason@redhat.com>
510
511         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
512         (cp_expr_size): New fn.
513         * call.c (build_over_call): Lose empty class hackery.
514         (convert_arg_to_ellipsis): Promote non-POD warning to error.
515         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
516
517         * semantics.c (expand_body): Do tree optimization in the function
518         context, too.
519
520 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
521
522         * cp-tree.h: Move all warning and flag declarations to c-common.h.
523         * decl.c: Move all warning and flag variables to c-common.c.
524         * decl2.c: Move all warning and flag variables to c-common.c.
525         * lex.c (flag_digraphs): Remove.
526         (warn_traditional): Now in c-common.c.
527
528 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
529
530         * call.c (build_field_call): Do not look up the field by name.
531         (build_method_call): Simplify.
532         (struct z_candidate): Add access_path and conversion_path.  Remove
533         basetype_path.
534         (convert_class_to_reference): Adjust use of
535         add_function_candidate.
536         (add_candidate): Add conversion_path argument.
537         (add_function_candidate): Use it.
538         (add_conv_dndidate): Likewise.
539         (build_builtin_candidate): Likewise.
540         (add_template_candidate_real): Add conversion_path argument.
541         (add_template_conv_candidate): Likewise.
542         (add_template_candidate): Likewise.
543         (build_user_type_conversion_1): Use it.
544         (build_new_function_call): Remove name lookup code.  Adjust use of
545         add_template_candidate and add_function_candidate.
546         (build_new_op): Likewise.
547         (convert_like_real): Use build_special_member_call.
548         (build_over_call): Use cand->conversion_path.
549         (build_special_member_call): New method.
550         (build_new_method_call): Remove name lookup code.
551         * cp-tree.def (OFFSET_REF): Update documentation.
552         (TEMPLATE_ID_EXPR): Likewise.
553         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
554         (BASELINK_OPTYPE): Likewise.
555         (build_new_method_call): Adjust prototype.
556         (build_special_member_call): New method.
557         (build_baselink): New method.
558         (build_offset_ref_call_from_tree): Likewise.
559         (build_call_from_tree): Likewise.
560         (finish_qualified_call_expr): Remove.
561         (finish_call_expr): Adjust prototype.
562         (build_x_function_call): Remove.
563         * cvt.c (ocp_convert): Use build_special_member_call.
564         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
565         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
566         CALL_EXPR.
567         (build_offset_ref_call_from_tree): New function.
568         (build_call_from_tree): Likewise.
569         * init.c (expand_cleanup): Use build_special_member_call.
570         (expand_default_init): Likewise.
571         (build_member_call): Use finish_call_expr.
572         (build_new_1): Use build_special_member_call.
573         (push_base_cleanups): Likewise.
574         * method.c (do_build_assign_ref): Likewise.
575         * parse.y (template_id): Do not pass a COMPONENT_REF to
576         lookup_template_function.
577         (primary): Use parse_finish_call_epxr, not finish_call_expr.
578         (parse_finish_call_expr): New function.
579         * pt.c (lookup_template_function): Add assertions.
580         * search.c (lookup_base): Allow T to be a binfo.
581         (build_baselink): New function.
582         (lookup_member): Use it.
583         * semantics.c (finish_call_expr): Do not do name lookup.
584         (finish_object_call_expr): Remove #if 0'd code.
585         (finish_qualified_call_expr): Remove.
586         * typeck.c (build_x_function_call): Remove.
587         (build_static_case): Use build_special_member_call.
588         * typeck2.c (build_functional_cast): Likewise.
589
590 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
591
592         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
593
594 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
595
596         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
597
598 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
599
600         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
601         documentation.
602
603 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
604
605         * cp-tree.h: Comment typo fix.
606
607 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
608
609         * spew.c (space_for_token): Allocate zeroed memory for a new token
610         chunk.
611
612 2002-07-27  Roger Sayle  <roger@eyesopen.com>
613
614         * decl.c (builtin_function_1): No need to explicitly mark
615         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
616
617 2002-07-27  Roger Sayle  <roger@eyesopen.com>
618
619         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
620
621 2002-07-26  Jason Merrill  <jason@redhat.com>
622
623         * call.c (build_over_call): Likewise.
624         (cp_convert_parm_for_inlining): New fn.
625         (convert_for_arg_passing): New fn.
626         (convert_default_arg, build_over_call): Use it.
627         (type_passed_as): New fn.
628         * pt.c (tsubst_decl): Use it.
629         * decl2.c (cp_build_parm_decl): New fn.
630         (build_artificial_parm): Use it.
631         (start_static_storage_duration_function): Likewise.
632         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
633         (grokparms): Don't mess with DECL_ARG_TYPE.
634         * typeck.c (convert_arguments): Use convert_for_arg_passing.
635         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
636         Define.
637         * cp-tree.h: Declare new fns.
638
639 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
640
641         * cp-tree.h (flag_operator_names): Remove.
642         * decl2.c (flag_operator_names): Remove.
643         (lang_f_options): Remove operator-names.
644         * lex.c (D_OPNAME): Remove.
645         (reswords): Remove operator names.
646         (rid_to_yy): Remove operator names.
647         (init_reswords): No need to handle D_OPNAME.
648         * spew.c (read_process_identifier): There are no operator
649         names.
650
651 2002-07-26  Jason Merrill  <jason@redhat.com>
652
653         * dump.c (cp_dump_tree): Call c_dump_tree.
654         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
655
656 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
657
658         * error.c (print_whitespace): Remove.
659         * g++spec.c (LIBUNWIND): Move.
660         * mangle.c (mangled_position, write_signed_number): Remove.
661
662 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
663
664         * decl2.c (cxx_decode_option): Similarly.
665
666 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
667
668         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
669         (cxx_sizeof_or_alignof_type): Take a third argument.
670         (cxx_sizeof): Adjust definition.
671         (cxx_alignof): Likewise.
672         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
673         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
674         complaining.
675         (c_sizeof_nowarn): Remove definition.
676         (build_unary_op): Use cxx_sizeof_nowarn.
677
678 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
679
680         * tree.c (cp_build_qualified_type_real): When copying
681         pointer-to-method types, unshare the record that holds
682         the cached pointer-to-member-function type.
683
684 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
685
686         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
687
688 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
689
690         Fix PR/7363:
691         * typeck.c (cxx_sizeof_or_alignof_type): New function.
692         (c_sizeof): Remove definition.
693         (expr_sizeof): Use cxx_sizeof.
694         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
695         * decl.c (finish_destructor_body): Use cxx_sizeof.
696         * semantics.c (finish_alignof): Likewise.
697         (finish_alignof): Use cxx_alignof.
698         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
699         (cxx_sizeof_or_alignof_type): Declare.
700         (my_friendly_assert): Move to ../c-common.h.
701
702 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
703
704         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
705
706 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
707
708         PR c++/7347, c++/7348
709         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
710         * decl.c (make_typename_type): Use it.
711         (make_unbound_class_template): Likewise.
712         (lookup_name_real): Don't call type_access_control if scope is
713         template parameter dependent.
714         * parse.y (template_arg): Call make_unbound_class_template with
715         tf_parsing set.
716         (nest_name_specifier): Call make_typename_type with tf_parsing set.
717         (typename_sub0): Likewise.
718         (typename_sub1): Likewise.
719         (instantiate_decl): Push class scope.
720         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
721         for both static variable and member function template.
722         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
723         and arguments.
724         * search.c (type_access_control): Do type access for TEMPLATE_DECL
725         too.
726
727 2002-07-20  Roger Sayle  <roger@eyesopen.com>
728
729         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
730         test by using positive_option.  Make whitespace consistent.
731
732 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
733
734         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
735         members with 'locus'.  Adjust use throughout.
736         (struct feed):  Likewise.
737         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
738         Adjust use.
739         (snarf_defarg): Use error(), not error_with_file_and_line().
740
741 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
742
743         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
744         cpp_options is included.
745
746 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
747
748         PR c++/2862, c++/2863
749         * pt.c (determine_specialization): Compare the length of
750         TYPE_ARG_TYPES.  Tidy.
751
752 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
753
754         PR c++/3797
755         * decl.c (duplicate_decls): Don't propagate inlining parameters from
756         olddecl to newdecl when newdecl is a specialization of the
757         instantiation olddecl.
758
759 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
760
761         PR c++/4802, c++/5387
762         * decl.c (make_typename_type): Use enforce_access.
763
764 2002-07-17  Scott Snyder <snyder@fnal.gov>
765
766         PR c++/7320
767         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
768
769 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
770
771         * class.c (add_method): Correct handling of conversion operators.
772
773 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
774
775         PR c++/7224
776         * class.c (add_method): Simplify.
777
778 2002-07-11  Jason Merrill  <jason@redhat.com>
779
780         PR c++/7279
781         * tree.c (cp_copy_res_decl_for_inlining): Also copy
782         TREE_ADDRESSABLE.
783
784 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
785
786         * pt.c (template_parm_this_level_p, push_template_decl_real):
787         Pass depth as int pointer.
788
789 2002-07-11  Tim Josling  <tej@melbpc.org.au>
790
791         Remove front end hard coding from gengtype.c.
792
793         * config-lang.in (gtfiles): Add files needed for this front end.
794
795 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
796
797         * cp-tree.h (unqualified_name_lookup_error): Declare it.
798         (begin_function_definition): Adjust prototype.
799         * lex.c (unqualified_name_lookup_error): New function, split out
800         from ...
801         (do_identifier): ... here.
802         * parse.y (parse_begin_function_definition): New function.
803         (fn.def1): Use it.
804         * semantics.c (begin_function_definition): Accept decl-specifiers
805         and attributes as separate parameters.
806
807 2002-07-10  Jason Merrill  <jason@redhat.com>
808
809         PR c++/6255
810         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
811         modifying the old one.
812
813 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
814
815         * cp-tree.h (constructor_name_p): Declare it.
816         (check_template_template_default_arg): Likewise.
817         * class.c (handle_using_decl): Use constructor_name_p.
818         * decl.c (grokdeclarator): Likewise.
819         * decl2.c (constructor_name_p): Define it.
820         * init.c (build_member_call): Use constructor_name_p.
821         * parse.y (template_parm): Use check_template_template_default_arg.
822         * pt.c (check_explicit_specialization): Use constructor_name_p.
823         * semantics.c (check_template_template_default_arg): New function.
824
825 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
826
827         * pt.c (can_complete_type_without_circularity): Add static to
828         function definition.
829
830 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
831
832         * cp-tree.h (have_extern_spec): Declare it
833         * decl.c (have_extern_spec): Define it.
834         (start_decl): Eliminate use of used_extern_spec.
835         (start_function): Likewise.
836         * parse.y (have_extern_spec): Remove declaration.
837         (used_extern_spec): Likewise.
838         (frob_specs): Eliminate use of used_extern_spec.
839         (.hush_warning): Likewise.
840
841 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
842
843         * Make-lang.in (cp/parse.o): Depend on decl.h.
844         * cp-tree.h (do_decl_instantiation): Change prototype.
845         * parse.y: Include decl.h.
846         (parse_decl_instantiation): New function.
847         (explicit_instantiation): Use it.
848         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
849         and DECLSPECS.
850
851 2002-07-07  Roger Sayle  <roger@eyesopen.com>
852
853         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
854         constructor and destructor tests when passed a TEMPLATE_DECL.
855
856 2002-07-05  Jason Merrill  <jason@redhat.com>
857
858         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
859         pointers.
860
861         PR optimization/7145
862         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
863
864 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
865
866         Repair damage on weak-impared targets caused by my previous patch.
867         * cp-tree.h (import_export_tinfo): Add parameter.
868         * decl2.c (import_export_tinfo): Add parameter, post adjust
869         DECL_COMDAT.
870         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
871         import_export_tinfo.
872
873 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
874
875         PR c++/6944
876         * init.c (build_aggr_init): Remove qualifiers of init before calling
877         build_vec_init.
878         (build_vec_init): Flatten multi-dimensional array during cleanup.
879         (build_vec_delete_1): Abort if the type of each element is array.
880
881 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
882
883         * pt.c (instantiate_class_template): Fix typo.
884
885 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
886
887         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
888         by CVS conflict in my last patch.
889
890 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
891
892         PR c++/6716
893         * pt.c (can_complete_type_without_circularity): New function.
894         (instantiate_class_template): Use it.
895         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
896         message due to incomplete fields.
897
898 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
899
900         PR c++/7112
901         * mangle.c (write_expression): Add mangling for sizeof when
902         applied to a type.
903         * operators.def: Remove stale comment.
904
905 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
906
907         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
908         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
909         (tinfo_decl_type): Replace with ...
910         (type_info_ptr_type): ... this.
911         (import_export_tinfo): Declare.
912         (tinfo_decl_p): Rename to ...
913         (unemitted_tinfo_decl_p): ... this.
914         * decl2.c (import_export_decl): Break out tinfo handling into ...
915         (import_export_tinfo): ... here. New function.
916         (finish_file): Adjust.
917         * rtti.c (TINFO_REAL_NAME): New macro.
918         (init_rtti_processing): Create the tinfo types.
919         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
920         (get_tinfo_decl): Adjust.
921         (get_tinfo_ptr): New function.
922         (get_type_id): Use it.
923         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
924         (ptr_initializer): Use get_tinfo_ptr.
925         (ptm_initializer): Likewise.
926         (synthesize_tinfo_var): Break into ...
927         (get_pseudo_ti_init): ... this. Just create the initializer.
928         (get_pseudo_ti_desc): .. and this.
929         (create_real_tinfo_var): Remove.
930         (create_pseudo_type_info): Don't create the vtable decl here.
931         (get_vmi_pseudo_type_info): Remove.
932         (create_tinfo_types): Adjust.
933         (tinfo_decl_p): Rename to ...
934         (unemitted_tinfo_decl_p): ... here. Adjust.
935         (emit_tinfo_decl): Adjust. Create the initializer.
936
937 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
938
939         PR c++/6695
940         * pt.c (tsubst_friend_class): Substitute into the context of the
941         friend before using it.
942
943 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
944
945         * cp-tree.h (xref_tag): Change prototype.
946         (handle_class_head): Likewise.
947         (build_x_component_ref): Likewise.
948         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
949         (xref_tag): Take attributes as a separate parameter.
950         (xref_tag_from_type): Adjust call to xref_tag.
951         * decl2.c (build_expr_from_tree): Adjust call to
952         build_x_component_ref.
953         (handle_class_head): Take attributes as a separate parameter.
954         * parse.y (parse_xref_tag): New function.
955         (parse_handle_class_head): Likewise.
956         (primary): Use parse_xref_tag.
957         (class_head_decl): Use parse_handle_class_head.
958         (class_head_defn): Likewise.
959         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
960         (build_dynamic_cast_1): Likewise.
961         (create_pseudo_type_info): Likewise.
962         (emit_support_tinfos): Likewise.
963         * typeck.c (build_object_ref): Adjust call to
964         build_x_component_ref.
965         (build_x_component_ref): Remove protect parameter.
966
967 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
968
969         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
970         * class.c (handle_using_decl): Likewise.
971         (instantiate_type): Likewise.
972         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
973         (xref_basetypes): Change prototype.
974         (begin_mem_initializers): New function.
975         (get_overloaded_fn): Likewise.
976         * decl.c (xref_basetypes): Simplify.
977         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
978         * init.c (build_offset_ref): Likewise.
979         * parse.y (base_init): Use begin_mem_initializers().
980         (structsp): Adjust call to xref_basetypes.
981         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
982         (instantiate_class_template): Adjust call to xref_basetypes.
983         * semantics.c (begin_mem_initializers): New function.
984         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
985         (really_overlaoded_fn): Likewise.
986         (get_overloaded_fn): New function.'
987         (get_first_fn): USe BASELINK_FUNCTIONS.
988
989 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
990
991         * cp-tree.h (SCALAR_TYPE_P): New macro.
992         (check_for_out_of_scope_variable): New function.
993         (at_class_scope_p): Likewise.
994         (finish_fname): Likewise.
995         * class.c (finish_struct): Use at_function_scope_p.
996         * decl.c (check_for_out_of_scope_variable): New function, split
997         out from do_identifier.
998         (finish_enum): Use at_function_scope_p.
999         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
1000         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
1001         (primary): Use at_function_scope_p.
1002         * search.c (at_class_scope_p): New function.
1003         * semantics.c (finish_fname): Likewise.
1004         (check_multiple_declarators): Use at_function_scope_p.
1005
1006 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
1007
1008         * parse.y (parse_scoped_id): New function.
1009         (primary): Use it.
1010         * cp-tree.h (do_scoped_id): Adjust declaration.
1011         * lex.c (do_scoped_id): Remove call to yylex.
1012         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
1013         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
1014         expanding it inline.
1015
1016 2002-06-23  Matt Thomas  <matt@3am-software.com>
1017
1018         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
1019         "#if VMS_TARGET".
1020
1021 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1022
1023         * mangle.c (integer_type_codes): Const-ify.
1024
1025 2002-06-20  Richard Henderson  <rth@redhat.com>
1026
1027         PR c++/6747
1028         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
1029         Call put_var_into_stack.
1030
1031 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1032
1033         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
1034         array size calculation.
1035
1036 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1037
1038         PR c++/6892
1039         * pt.c (tsubst_expr): Handle FILE_STMT.
1040
1041 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1042
1043         PR c++/6723
1044         * pt.c (lookup_template_class): Don't build complete argument of
1045         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
1046         argument.
1047
1048 2002-06-19  Akim Demaille  <akim@epita.fr>
1049
1050         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
1051         decl.h's TYPENAME.
1052         * spew.c, lex.c: Adjust.
1053         * parse.y (explicit_instantiation): Add empty action to override
1054         the default $$ = $1 where it introduces a type clash.
1055
1056 2002-06-14  Jason Merrill  <jason@redhat.com>
1057
1058         * semantics.c (begin_for_stmt): Push the 'for' scope before
1059         adding the FOR_STMT.
1060
1061         C++ ABI changes.
1062         * class.c (build_base_field): Set DECL_PACKED.
1063         (layout_class_type): Don't use tail padding of PODs.
1064         * mangle.c (write_unqualified_name): Fix template conversion op
1065         mangling.
1066
1067 2002-06-16  Richard Henderson  <rth@redhat.com>
1068
1069         PR opt/6793
1070         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
1071         after template instantiation.
1072
1073 2002-06-16  Richard Henderson  <rth@redhat.com>
1074
1075         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
1076
1077 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
1078
1079         * cp-tree.h (compiler_error): Remove declaration.
1080         * lex.c (compiler_error): Remove definition.
1081
1082 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
1083
1084         * g++spec.c (LIBUNWIND): New.
1085         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
1086
1087 2002-06-13  Jessica Han  <jessica@cup.hp.com>
1088
1089         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
1090         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
1091         (build_vbase_offset_vtbl_entries): Likewise.
1092         * rtti.c (build_headof): Likewise.
1093         (get_tinfo_decl_dynamic): Likewise.
1094         (create_pseudo_type_info): Likewise.
1095
1096 2002-06-12  Stan Shebs  <shebs@apple.com>
1097
1098         * mpw-config.in: Remove file, no longer used.
1099         * mpw-make.sed: Ditto.
1100
1101 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
1102
1103         * decl2.c: Update call to cpp_handle_option.
1104
1105 2002-06-07  H.J. Lu  (hjl@gnu.org)
1106
1107         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
1108
1109 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
1110
1111         * error.c (cp_error_at): Fix typo.
1112
1113 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
1114
1115         * error.c (cp_diagnostic_starter): Adjust call.
1116         (maybe_print_instantiation_context): Change prototype to take a
1117         'diagnostic_info *'.
1118         (print_instantiation_full_context): Likewise.
1119         (print_instantiation_partial_context): Likewise.
1120         (cp_diagnostic_starter): Likewise.
1121         (cp_diagnostic_finalizer): Likewise.
1122         (cp_print_error_function): Likewise.
1123         (cp_printer): Take a secondary parameter as a 'text_info *'.
1124         Remove output_state savings.  Adjust calls.
1125
1126 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
1127
1128         * pt.c (inline_parm_levels): Mark for GC.
1129
1130         * mangle.c (start_mangling): Allocate G.substitutions here...
1131         (init_mangle): ... rather than here.
1132         (finish_mangling): Clear the varray pointer when done with it.
1133         * spew.c (yylexstring): Don't use VARRAY_FREE.
1134         * search.c (bfs_walk): Don't use VARRAY_FREE.
1135         * decl2.c (pending_statics): Use gengtype to mark.
1136         (deferred_fns): Likewise.
1137         (ssdf_decls): Likewise.
1138         (init_decl2): Delete.
1139         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
1140         (cxx_init_decl_processing): Don't call init_decl2.
1141         (cxx_pop_function_context): Don't use VARRAY_FREE.
1142         * cp-tree.h (struct saved_scope): No need for special marking
1143         of varrays.
1144         (struct language_function): Likewise.
1145         (local_classes): Use gengtype to mark.
1146         (init_decl2): Delete prototype.
1147         * class.c (init_class_processing): Don't use
1148         ggc_add_tree_varray_root.
1149         (build_vtbl_initializer): Don't use VARRAY_FREE.
1150
1151         * decl.c (typename_compare): Don't use same_type_p.
1152
1153         * decl.c: Include hashtab.h instead of hash.h.
1154         (typename_hash): Update to use htab_h.
1155         (typename_compare): Likewise.
1156         (typename_htab): Use gengtype to mark.
1157         (build_typename_type): Update to use htab_h.
1158         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
1159
1160         * Make-lang.in (gt-cp-tree.h): New rule.
1161         (cp/tree.o): Depend on gt-cp-tree.h.
1162         * config-lang.in (gtfiles): Add cp/tree.c.
1163         * tree.c: Include gt-cp-tree.h.
1164         (list_hash_table): Use gengtype to mark.
1165         (init_tree): Use gengtype to mark trees.
1166
1167         * Make-lang.in (cp/decl.o): Add debug.h dependency.
1168         * call.c (struct z_candidate): Use gengtype.
1169         (USER_CONV_CAND): Use WRAPPER_ZC.
1170         (convert_class_to_reference): Use build_zc_wrapper.
1171         (build_type_conversion_1): Likewise.
1172         (build_over_call): Use WRAPPER_ZC.
1173         (add_warning): Use build_zc_wrapper.
1174         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
1175         * cp-tree.h (struct lang_identifier): Use gengtype.
1176         (struct template_parm_index_s): Likewise.
1177         (struct ptrmem_cst): Likewise.
1178         (struct tree_binding): Likewise.
1179         (struct tree_overload): Likewise.
1180         (struct tree_srcloc): Likewise.
1181         (struct tree_wrapper): Likewise.  Also modify to have a pointer
1182         to struct z_candidate rather than void.
1183         (enum cp_tree_node_structure_enum): New.
1184         (union lang_tree_node): New.
1185         (cxx_mark_tree): Delete prototype.
1186         (cp_tree_node_structure): New prototype.
1187         (build_ptr_wrapper): Delete prototype.
1188         (build_int_wrapper): Delete prototype.
1189         (build_zc_wrapper): New prototype.
1190         * decl.c: Include debug.h
1191         (cxx_mark_tree): Delete.
1192         (cp_tree_node_structure): New.
1193         * tree.c (build_ptr_wrapper): Delete.
1194         (build_int_wrapper): Delete.
1195         (build_zc_wrapper): New.
1196
1197         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
1198         Correct typo.  Patch from k_fukui@highway.ne.jp.
1199
1200         * semantics.c (current_stmt_tree): Update for change to
1201         struct language_function.
1202         (finish_mem_initializers): Likewise.
1203         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
1204         * cp-tree.h (struct language_function): Rename from
1205         cp_language_function.  Change all uses.
1206         (cp_function_chain): Don't need to cast.
1207
1208         * class.c (duplicate_tag_error): Reset discriminator.
1209         (check_bases_and_members): Update for data structure changes.
1210         * cp-tree.h (struct lang_id2): Use gengtype.
1211         (flagged_type_tree): Likewise.
1212         (SET_LANG_ID): Use GGC on struct lang_id2.
1213         (struct cp_language_function): Use gengtype.  Remove field
1214         'x_vcalls_possible_p'.
1215         (current_vcalls_possible_p): Delete.
1216         (struct lang_type_header): New.
1217         (struct lang_type_class): Rename from struct lang_type.  Include
1218         struct lang_type_header.
1219         (struct lang_type_ptrmem): New.
1220         (struct lang_type): New.
1221         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
1222         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
1223         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
1224         (struct lang_decl_flags): Use gengtype.  Add discriminators.
1225         (struct lang_decl): Use gengtype.  Add and use discriminators.
1226         Update the macros that reference moved fields.
1227         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
1228         (SET_DECL_THUNK_P): Set discriminator too.
1229         (clear_inline_text_obstack): Delete prototype.
1230         (finish_inline_definitions): Delete prototype.
1231         (mark_pending_inlines): Delete prototype.
1232         (lang_check_failed): New prototype.
1233         * decl.c (struct named_label_use_list): Use gengtype.
1234         (struct named_label_list): Likewise.
1235         (mark_binding_level): Delete.
1236         (mark_named_label_lists): Delete.
1237         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
1238         (cxx_init_decl_processing): Use generated marker routine.
1239         (begin_destructor_body): Delete dead set to
1240         current_vcalls_possible_p.
1241         (mark_lang_function): Delete.
1242         (mark_cp_function_context): Delete.
1243         (lang_mark_tree): Use generated marker routines.
1244         * decl2.c (start_objects): Set discriminator when setting
1245         GLOBAL_INIT_PRIORITY.
1246         * lex.c (retrofit_lang_decl): Set discriminators.
1247         (copy_lang_type): Update for changes to lang_type structure.
1248         (cp_make_lang_type): Set discriminator.
1249         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
1250         * search.c: Include ggc.h.
1251         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
1252         (finish_inline_definitions): Delete.
1253         * spew.c (struct token): Use gengtype.
1254         (struct token_chunk): New.
1255         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
1256         (struct feed): Use gengtype.
1257         (feed_obstack): Delete.
1258         (feed): Mark as GC root.
1259         (pending_inlines): Mark as GC root.
1260         (pending_inlines_tail): Likewise.
1261         (processing_these_inlines): Likewise.
1262         (token_obstack): Make static.
1263         (first_token): Likewise.
1264         (init_spew): Don't initialize deleted things; use gengtype for roots.
1265         (clear_inline_text_obstack): Delete.
1266         (feed_input): Use GC for struct feed.  Update for changes to
1267         struct unparsed_text.
1268         (mark_pending_inlines): Delete.
1269         (next_token): Rename from add_token.  Change all callers.  Update
1270         for changes to struct unparsed_text.
1271         (space_for_token): New.
1272         (remove_last_token): New.
1273         (alloc_unparsed_text): New.
1274         (snarf_block): Take an unparsed_text.  Update for changes to struct
1275         unparsed_text.
1276         (snarf_method): Update for changes to struct unparsed_text.
1277         (snarf_defarg): Update for changes to struct unparsed_text.
1278         * tree.c (lang_check_failed): New.
1279
1280         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
1281         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
1282         (cp/spew.o): Add dependency on gt-<filename>.h.
1283         (cp/decl2.o): Add dependency on gt-<filename>.h.
1284         (cp/call.o): Add dependency on gt-<filename>.h.
1285         (cp/pt.o): Add dependency on gt-<filename>.h.
1286         (cp/repo.o): Add dependency on gt-<filename>.h.
1287         (cp/parse.o): Add dependency on gt-<filename>.h.
1288         * call.c: Use gengtype for roots.
1289         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
1290         decl2.c parse.y pt.c repo.c spew.c.
1291         * cp-tree.h: Use gengtype for roots.
1292         (struct saved_scope): Use GGC, gengtype.
1293         (cp_parse_init): Delete prototype.
1294         (init_pt): Delete prototype.
1295         * decl.c: Use gengtype for roots.
1296         (mark_saved_scope): Delete.
1297         (cxx_init_decl_processing): Don't call deleted initilisation
1298         routines.
1299         (signed_size_zero_node): Delete, unused.
1300         * decl.h: Use gengtype for roots.
1301         * decl2.c: Use gengtype for roots.
1302         * lex.h: Use gengtype for roots.
1303         * parse.y: Use gengtype for roots.
1304         (cp_parse_init): Delete.
1305         * pt.c: Use gengtype for roots.
1306         (init_pt): Delete.
1307         * repo.c: Use gengtype for roots.
1308         * spew.c: Use gengtype for roots.
1309
1310         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
1311         (cp/decl.o): Add dependency on gtype-cp.h.
1312         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
1313         Include gtype-cp.h.  Allow for filename changes.
1314
1315         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
1316         (cp/decl.o): Add cp/gt-decl.h dependency.
1317         * config-lang.in (gtfiles): New.
1318         * tree.h: Rename struct binding_level to struct cp_binding_level.
1319         * decl.c: Rename struct binding_level to struct cp_binding_level.
1320         Include cp/gt-decl.h.
1321         (struct cp_binding_level): Use gengtype.
1322         (make_binding_level): Use GGC on struct cp_binding_level.
1323         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
1324         (cxx_init_decl_processing): Mark free_binding_level as
1325         deletable.
1326
1327         * decl.c (mark_cp_function_context): Update calling sequence.
1328
1329         * decl.c (start_function): Don't free 'struct
1330         cp_language_function'.
1331         (pop_cp_function_context): Likewise.
1332         (save_function_data): Allocate it using GC.
1333         * semantics.c (genrtl_start_function): Don't free 'struct
1334         cp_language_function'.
1335
1336 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
1337
1338         * lang-specs.h: Use cpp_debug_options.
1339
1340 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
1341
1342         * mangle.c, tree.c: Include real.h.
1343         * Make-lang.in: Update dependency lists.
1344
1345 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
1346
1347         * lex.c: Don't include c-lex.h.
1348         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
1349
1350 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
1351
1352         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
1353
1354 2002-05-22  Richard Henderson  <rth@redhat.com>
1355
1356         * decl.c (obscure_complex_init): Check for VAR_DECL
1357         before using DECL_THREAD_LOCAL.
1358
1359 2002-05-22  Richard Henderson  <rth@redhat.com>
1360
1361         * decl.c (check_tag_decl): Handle RID_THREAD.
1362         (obscure_complex_init): Reject run-time init of tls.
1363         (grokvardecl, grokdeclarator): Handle RID_THREAD.
1364         * lex.c (reswords): Add __thread.
1365         (rid_to_yy): Map RID_THREAD to SCSPEC.
1366
1367 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
1368
1369         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
1370         * cp-tree.h (cxx_post_options): Kill.
1371         * cp-lex.c (cxx_post_options): Kill.
1372
1373 2002-05-21  Richard Henderson  <rth@redhat.com>
1374
1375         * lex.c (rid_to_yy): Add RID_THREAD.
1376
1377 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
1378
1379         * init.c (build_vec_init): Test for trivial copy-assignment when
1380         copy-assigning arrays.
1381
1382 2002-05-20  Andreas Jaeger  <aj@suse.de>
1383
1384         * init.c (build_default_init): Remove unused variable.
1385
1386 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
1387
1388         * call.c (any_strictly_viable): New.
1389         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
1390
1391 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1392
1393         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
1394
1395 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1396
1397         PR c++/186, DR 259
1398         * pt.c (do_decl_instantiation): Don't complain explicit
1399         instantiation after explicit specialization.
1400         (do_type_instantiation): Likewise.
1401
1402 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
1403
1404         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
1405         renamed from...
1406         (complete_type_or_else): ... this.  Redefined as macro.
1407         (cxx_incomplete_type_diagnostic): Declare.
1408         (cxx_incomplete_type_error): Define as macro.
1409         * init.c (build_delete): Warn about incomplete types other than
1410         void, and use the built-in operator delete for them.
1411         * typeck.c (complete_type_or_diagnostic): Renamed from
1412         complete_type_or_else.  Added warn_only argument, passed to...
1413         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
1414         warnings or errors depending on new warn_only argument.  Renamed
1415         from...
1416         (cxx_incomplete_type_error): ... this.  New implementation in
1417         terms of cxx_incomplete_type_diagnostic.
1418
1419 2002-05-18  Jason Merrill  <jason@redhat.com>
1420
1421         PR c++/6611
1422         * decl2.c (import_export_decl): If we clear
1423         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
1424
1425 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1426
1427         PR c++/6620
1428         * pt.c (verify_class_unification): Don't check if PARM is template
1429         parameter dependent.  Simplify.
1430         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
1431         parameter dependent expression.
1432
1433 2002-05-14  Jason Merrill  <jason@redhat.com>
1434
1435         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
1436         Do set DECL_COMDAT.
1437         (synthesize_tinfo_var): Take the public decl.
1438         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
1439         (emit_tinfo_decl): Adjust.  Call import_export_decl.
1440         * decl2.c (import_export_decl): Simplify tinfo decl handling.
1441
1442 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
1443
1444         * cp-tree.h (struct lang_type): Added non_zero_init.
1445         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
1446         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
1447         * class.c (check_field_decls): Test non_zero_init.
1448         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
1449         zero-to-NULL conversions.
1450         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
1451         type that needs zero-initialization without zeros.
1452         (check_initializer_decl): Compute zero-initializer for types
1453         that require a non-trivial one.
1454         * init.c (build_forced_zero_init): New function.
1455         (build_default_init): Use it.
1456         * tree.c (zero_init_p): New function.
1457         * typeck2.c (force_store_init_value): New function.
1458         (process_init_constructor): Create non-trivial zero-initializers
1459         for array members and class fields.
1460
1461 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
1462
1463         * lang-specs.h: Remove redundant -lang-c++.
1464
1465 2002-05-13  Jason Merrill  <jason@redhat.com>
1466
1467         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
1468         (fixed_type_or_null): See through reference vars.
1469         (build_base_path): Vtable contents are constant.
1470         * typeck.c (get_member_function_from_ptrfunc): Likewise.
1471
1472 2002-05-12  Jason Merrill  <jason@redhat.com>
1473
1474         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
1475         structs are safe.
1476
1477 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
1478
1479         * cp-tree.h (flag_ansi): Remove.
1480         * decl2.c (flag_ansi): Remove.
1481         (cxx_decode_option): Set flag_iso and flag_undef.
1482
1483 2002-05-09  Jason Merrill  <jason@redhat.com>
1484
1485         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
1486         Use subtraction rather than a bitmask to get the index.
1487         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
1488
1489         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
1490
1491 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
1492
1493         * Make-lang.in (decl2.o): Update.
1494         * cp-tree.h (warn_multichar): Remove.
1495         * decl2.c: Include c-common.h.
1496         (warn_multichar): Remove.
1497
1498 2002-05-03  Jason Merrill  <jason@redhat.com>
1499
1500         * tree.c (build_cplus_array_type): Only const and volatile get
1501         special handling.
1502
1503         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
1504
1505 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
1506
1507         ABI change, returning simple classes from functions.
1508         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
1509         TYPE_HAS_TRIVIAL_INIT_REF is false or
1510         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
1511
1512 2002-04-30  Jason Merrill  <jason@redhat.com>
1513
1514         PR debug/6436
1515         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
1516         anonymous class with a typedef if there are attributes.
1517
1518 2002-04-29  Paul Eggert  <eggert@twinsun.com>
1519
1520         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
1521
1522 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
1523
1524         PR c++/6477
1525         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
1526         non-NULL first.
1527
1528 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
1529
1530         PR c++/6492
1531         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
1532         enter that scope before name lookup.
1533
1534         PR c++/6486
1535         * method.c (do_build_copy_constructor): Avoid building
1536         cv-qualified reference types.
1537
1538 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
1539
1540         PR c++/5719
1541         * decl.c (grok_op_properties): Assignment ops don't have to return
1542         by value. operator% should.
1543
1544 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1545
1546         PR c/6343
1547         * decl.c (duplicate_decls): Call merge_weak.
1548
1549 2002-04-26  Richard Henderson  <rth@redhat.com>
1550
1551         * parse.y (malloced_yyss, malloced_yyvs): New.
1552         (yyoverflow): Re-add.  Set them.
1553         (free_parser_stacks): New.
1554
1555 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
1556
1557         PR c++/6497
1558         * method.c (do_build_assign_ref): Pass a derivation to
1559         build_method_call when calling base class assignment operators.
1560
1561 2002-04-26  Richard Henderson  <rth@redhat.com>
1562
1563         * parse.y (yyoverflow): Revert.
1564
1565 2002-04-26  Richard Henderson  <rth@redhat.com>
1566
1567         PR c/3581
1568         * parse.y (string): Remove.  Update all uses to use STRING
1569         instead, and not call combine_strings.
1570         * rtti.c (tinfo_name): Use fix_string_type.
1571         * semantics.c (finish_asm_stmt): Don't call combine_strings.
1572         * spew.c (yylexstring): New.
1573         (read_token): Use it.
1574
1575 2002-04-25  Richard Henderson  <rth@redhat.com>
1576
1577         PR c/2161
1578         * parse.y (yyoverflow): New.
1579
1580 2002-04-25  Jason Merrill  <jason@redhat.com>
1581
1582         PR c++/5607
1583         * search.c (check_final_overrider): No longer static.
1584         * class.c (update_vtable_entry_for_fn): Call it.
1585         * cp-tree.h: Adjust.
1586
1587 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
1588
1589         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
1590         * cp-tree.h (cxx_set_yydebug): Die.
1591         * lex.c (YYDEBUG): Get from c-lex.h.
1592         (cxx_set_yydebug): Remove.
1593         * parse.y: Include c-lex.h.
1594         (YYDEBUG): Get from c-lex.h.
1595
1596 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
1597
1598         PR c++/6438.
1599         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
1600         void.
1601
1602 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
1603
1604         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
1605         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
1606         Redefine.
1607         * cp-tree.h (cp_attribute_table): Rename.
1608         * decl.c (lang_attribute_table): Remove declaration.
1609         (cxx_init_decl_processing): Don't set it.
1610         * tree.c (cp_attribute_table): Rename.
1611
1612 2002-04-24  Jason Merrill  <jason@redhat.com>
1613
1614         PR c++/6331
1615         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
1616         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
1617         The pedwarn for array assignment is now unconditional.
1618         * tree.c (build_cplus_array_type_1): Still process simple array types
1619         normally in templates.
1620
1621         PR c++/6395
1622         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
1623         stuff for comdats.
1624
1625 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
1626
1627         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
1628         node with attributes.
1629
1630 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
1631
1632         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
1633         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
1634
1635 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
1636
1637         PR c++/6256:
1638         * pt.c (tsubst_friend_class): Handle templates with explicit
1639         nested names.
1640
1641         PR c++/6331:
1642         * typeck.c (merge_types): Remember the cv-qualification of pointer
1643         types when merging them.
1644
1645 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
1646
1647         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
1648         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
1649         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
1650         cxx_mark_function_context): New.
1651         * decl.c (push_cp_function_context, pop_cp_function_context,
1652         mark_cp_function_context): Rename for consistency.
1653         (cxx_init_decl_processing): Don't set old hooks.
1654
1655 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
1656
1657         * call.c (convert_type_from_ellipsis): Rename, update.
1658         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
1659         * cp-tree.h (convert_type_from_ellipsis): Rename.
1660         * decl.c (cxx_init_decl_processing): Don't set hook.
1661
1662 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
1663
1664         * call.c (build_new_method_call): Update.
1665         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
1666         * cp-tree.h (cxx_incomplete_type_error): New.
1667         * decl.c (grokdeclarator, grokparms): Update.
1668         * decl2.c (check_classfn): Update.
1669         * pt.c (tsubst): Update.
1670         * typeck.c (complete_type_or_else, expr_sizeof,
1671         decay_conversion): Update.
1672         * typeck2.c (incomplete_type_error): Rename.
1673         (add_exception_specifier): Update.
1674
1675 2002-04-18  Jason Merrill  <jason@redhat.com>
1676
1677         PR c++/5658
1678         * search.c (setup_class_bindings): A class template qualifies as a
1679         type binding.
1680
1681 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
1682
1683         PR c++/6316
1684         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
1685         before expanding.
1686
1687 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
1688
1689         * init.c (begin_init_stmts): Remove commented out code.
1690         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
1691         * semantics.c (begin_gobal_stmt_expr): Adjust call to
1692         expand_start_stmt_expr.
1693
1694 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
1695
1696         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
1697         dso_handle itself, to __cxa_atexit.
1698
1699 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
1700
1701         * error.c (cxx_print_error_function): Adjust call to macros.
1702
1703 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
1704
1705         * class.c (layout_virtual_bases): Do all dsize computation on trees.
1706
1707 2002-04-14  Jason Merrill  <jason@redhat.com>
1708
1709         * typeck.c (get_member_function_from_ptrfunc): Don't do
1710         gratuitious division and multiplication on
1711         ptrmemfunc_vbit_in_delta targets.
1712
1713 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
1714
1715         PR c++/5373.
1716         * semantics.c (finish_expr_stmt): Remember the type of the
1717         expression before any conversions are performed.
1718
1719 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
1720
1721         PR c++/5189.
1722         * call.c (add_template_candidate_real): Do not treat member
1723         templates as copy constructors.
1724
1725 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
1726
1727         * decl.c (duplicate_decls): Do not copy the RTL for a variable
1728         declaration if the old variable had an incomplete type and the new
1729         variable does not.
1730         (complete_vars): Do not call layout_decl for completed variables.
1731
1732 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
1733
1734         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
1735         with an explicit one.
1736         (follow_tag_typedef): New.
1737         (lookup_tag): Use it to extract the tag of an explicit typedef.
1738         (xref_tag): Likewise.
1739
1740 2002-04-11  Andrew Haley  <aph@redhat.com>
1741
1742         * typeck.c (type_after_usual_arithmetic_conversions):
1743         If two types have the same variant, return immediately.
1744         When two floating-point operands are the same precision:
1745           convert to float if one of the operands is float;
1746           if neither operand is one of the standard types, return the type
1747           of the first operand.
1748
1749 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
1750
1751         PR c++/5507
1752         * decl.c (make_typename_type): Remove implicit typenameness.
1753
1754 2002-04-09  Jason Merrill  <jason@redhat.com>
1755
1756         PR optimization/6189
1757         * semantics.c (genrtl_start_function): Don't free
1758         DECL_SAVED_FUNCTION_DATA for inline functions.
1759
1760         * init.c (build_member_call): For now, don't convert to
1761         intermediate base if it would cause an error.
1762
1763 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
1764
1765         * parse.y (namespace_qualifier, maybe_identifier,
1766         begin_explicit_instantiation, end_explicit_instantiation,
1767         apparent_template_type, .finish_template_type,
1768         do_id, maybe_init, defarg_again, component_decl_1):
1769         Add ending ';', in accordance with POSIX.
1770
1771 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
1772
1773         PR c++/5571
1774         * class.c (layout_class_type): Remember incomplete static
1775         variables.
1776         (finish_struct_1): Call complete_vars, not
1777         hack_incomplete_structures.
1778         * cp-tree.h (hack_incomplete_structures): Rename to ...
1779         (complete_vars): ... this.
1780         (struct saved_scope): Remove incomplete.
1781         (namespace_scope_incomplete): Remove.
1782         * decl.c (struct binding_level): Remove incomplete.
1783         (incomplete_vars): New variable.
1784         (mark_binding_level): Don't mark incomplete.
1785         (print_binding_level): Don't print it.
1786         (mark_saved_scope): Don't mark incomplete.
1787         (pushdecl): Use maybe_register_incopmlete_var.
1788         (cxx_init_decl_processing): Register incomplete_vars for GC.
1789         (start_decl_1): Clarify error message.
1790         (hack_incomplete_vars): Remove.
1791         (maybe_register_incomplete_var): New function.
1792         (complete_vars): Likewise.
1793
1794 2002-04-06  Jason Merrill  <jason@redhat.com>
1795
1796         PR c++/4934
1797         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
1798         set before checking it.
1799
1800         PR c++/525
1801         * init.c (build_member_call): Use build_scoped_ref.
1802         (resolve_offset_ref): Likewise.
1803         * call.c (build_scoped_method_call): Likewise.
1804         * tree.c (maybe_dummy_object): Kludge around current_class_type being
1805         wrong.
1806         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
1807         * cp-tree.h: Adjust.
1808
1809         * init.c (push_base_cleanups): Just use build_scoped_method_call.
1810
1811         PR c++/6179
1812         * method.c (implicitly_declare_fn): Pass unqualified type to
1813         synthesize_exception_spec.
1814
1815 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
1816
1817         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
1818         * cvt.c: Update comment.
1819         * init.c (expand_cleanup_for_base): Update.
1820         * semantics.c (finish_parenthesized_expr): Update.
1821         * typeck.c (cp_truthvalue_conversion): Update.
1822
1823 2002-04-04  Jason Merrill  <jason@redhat.com>
1824
1825         * semantics.c (finish_eh_cleanup): New fn.
1826         * cp-tree.h: Add prototype.
1827         * init.c (perform_member_init, expand_cleanup_for_base): Use
1828         finish_eh_cleanup.
1829         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
1830         * cp-tree.h: Remove references.
1831         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
1832         * dump.c (cp_dump_tree): Likewise.
1833         * pt.c (tsubst_expr): Likewise.
1834         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
1835         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
1836         * tree.c (cp_statement_code_p): Likewise.
1837
1838         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
1839
1840         PR c++/5636
1841         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
1842         cleanup for nrv.
1843
1844         PR c++/5104
1845         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
1846         specifiers.
1847         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
1848
1849 2002-04-03  Richard Henderson  <rth@redhat.com>
1850
1851         * cp-lang.c (cxx_warn_unused_global_decl): New.
1852         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
1853
1854 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
1855
1856         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
1857         * tree.c (init_tree): Don't set hook.
1858
1859 2002-04-03  Roger Sayle  <roger@eyesopen.com>
1860
1861         PR c++/5998:
1862         * decl.c (duplicate_decls): Don't mess with assembler names when
1863         redeclaring builtin functions as static.
1864
1865 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1866
1867         * call.c (build_addr_func): Update.
1868         * class.c (resolve_address_of_overloaded_function): Update.
1869         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
1870         * cp-tree.h (cxx_mark_addressable): New.
1871         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
1872         * decl2.c (build_cleanup): Update.
1873         * except.c (build_throw): Update.
1874         * init.c (resolve_offset_ref): Update.
1875         * pt.c (convert_nontype_argument): Update.
1876         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
1877         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
1878         unary_complex_lvalue): Update.
1879         (mark_addressable): Rename.
1880
1881 2002-04-01  Roger Sayle  <roger@eyesopen.com>
1882
1883         PR c++/5998:
1884         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
1885         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
1886         but follow the SET_DECL_RTL idiom used elsewhere in the function.
1887
1888 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1889
1890         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1891         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
1892         * decl.c (grokdeclarator): Update.
1893         * mangle.c (write_integer_cst): Update.
1894         * typeck.c (build_binary_op): Update.
1895
1896 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
1897
1898         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
1899         * lex.c (cxx_init): Don't set hook.
1900
1901 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
1902
1903         * Make-lang.in (error.o): Update.
1904         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
1905         * cp-tree.h (struct diagnostic_context): Predeclare.
1906         (cxx_print_error_function): New.
1907         * error.c: Include langhooks-def.h.
1908         (lang_print_error_function): Rename.  Update.
1909         (init_error): Don't set hook.
1910
1911 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
1912
1913         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
1914         Redefine.
1915         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
1916         * decl.c (finish_enum): Similarly.
1917         * error.c (dump_type): Similarly.
1918         * lex.c (cxx_init): Similarly.
1919         * mangle.c (write_builtin_type): Similarly.
1920         * typeck.c (comptypes): Similarly.
1921
1922 2002-03-28  Roger Sayle  <roger@eyesopen.com>
1923
1924         PR c++/5998:
1925         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
1926         in the g++ front-end.
1927         (duplicate_decl): Allow redefinition of anticipated built-ins.
1928         Fix inlining problem by over-writing the old DECL_RTL.
1929         (lookup_namespace_name): Fail to find an identifier in the
1930         specified namespace if its still anticipated.
1931         (builtin_function_1): New function split out from builtin_function
1932         to create a builtin in the current namespace with given context.
1933         (builtin_function): Call builtin_function_1 to define the
1934         appropriate builtins in both the std and global namespaces.
1935         (select_decl): Don't test for anticipated decls here.
1936         (unqualified_namespace_lookup): Instead ignore them whilst
1937         searching through scopes and namespaces.
1938         * decl2.c (do_nonmember_using_decl): If a using declaration
1939         specifies an anticipated built-in function, mark it as no longer
1940         anticipated in that scope.
1941         (ambiguous_decl):  Avoid resolving to an anticipated decl.
1942         * lex.c (do_scoped_id): Fail to find an identifier in the global
1943         namespace if its still anticipated.
1944
1945 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
1946
1947         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
1948         * cp-tree.h (cp_make_lang_type): Rename.
1949         * lex.c (cp_make_lang_type): Rename.
1950         (make_aggr_type): Update.
1951         * tree.c (init_tree): Don't set make_lang_type_fn.
1952
1953 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
1954
1955         PR c++/6073
1956         * class.c (finish_struct_1): Update static field's DECL_MODE even
1957         if its type is a variant of t.
1958
1959 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
1960
1961         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
1962         * cp-tree.h (cxx_insert_default_attributes): New.
1963         * decl.c (insert_default_attributes): Rename.
1964
1965 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
1966
1967         PR c++/4884
1968         * call.c (build_op_delete_call): Allow for the fact the placement
1969         may be a COMPOUND_EXPR.
1970
1971 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
1972
1973         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
1974         * cp-tree.h (init_cplus_expand): Remove.
1975         (cxx_expand_expr): New.
1976         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
1977         fix prototype.
1978         (init_cplus_expand): Remove.
1979         * lex.c (cxx_init): Don't call init_cplus_expand.
1980
1981 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
1982
1983         PR c++/4884.
1984         * init.c (build_new_1): Allow for the fact the result of
1985         build_function_call may be a COMPOUND_EXPR.
1986
1987 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
1988
1989         PR c++/5682
1990         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
1991         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
1992         (dfs_skip_nonprimary_vbases_markedp): Remove.
1993         * search.c (get_shared_vbase_if_not_primary): Remove.
1994         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
1995         (dfs_skip_nonprimary_vbases_markedp): Remove.
1996         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
1997         (dfs_marked_real_bases_queue_p): Likewise.
1998
1999 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
2000
2001         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
2002         * cp-tree.h (cxx_mark_tree): New.
2003         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
2004
2005 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
2006
2007         * cp-tree.h (cxx_maybe_build_cleanup): New.
2008         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
2009         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
2010         * tree.c (build_target_expr): Update.
2011         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
2012
2013 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
2014
2015         * decl2.c (cxx_decode_option): Handle -E.
2016         * lang-specs.h (default_compilers): Preprocess with cc1plus.
2017         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
2018
2019 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
2020
2021         PR c++/6037
2022         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
2023
2024 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2025
2026         * error.c (dump_type): Be careful about implicit typenames.
2027
2028 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2029
2030         PR C++/3656
2031         * semantics.c (finish_base_specifier): Handle erronous base
2032         classes.
2033
2034 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
2035
2036         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
2037         REAL_IS_NOT_DOUBLE.
2038
2039 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
2040
2041         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
2042         an index into the vtable_entry array regardless of
2043         TARGET_PTRMEMFUNC_VBIT_LOCATION.
2044
2045 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
2046
2047         * tree.c (cp_cannot_inline_tree_fn): Same.
2048
2049 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
2050
2051         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
2052         insert_block, getdecls, global_bindings_p): New.
2053
2054 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
2055
2056         PR c++/4361
2057         * mangle.c (struct globals) Add internal_mangling_p member.
2058         (write_template_param): Do internal mangling, if needed.
2059         (mangle_conv_op_name_for_type): Request internal mangling.
2060
2061 2002-03-20  Jason Merrill  <jason@redhat.com>
2062
2063         PR c++/2136
2064         * init.c (build_delete): Check access for a member op delete here.
2065         * decl2.c (delete_sanity): Not here.
2066
2067 2002-03-19  Jason Merrill  <jason@redhat.com>
2068
2069         PR c++/5118
2070         * class.c (get_vfield_name): Use the constructor_name.
2071
2072 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
2073
2074         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
2075         * cp-tree.h (lang_printable_name): Rename.
2076         * error.c (lang_decl_name): Use new hook.
2077         * lex.c (cxx_init): Remove old hook.
2078         * pt.c (tsubst_decl): Use new hook.
2079         * tree.c (lang_printable_name): Rename.
2080
2081 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
2082
2083         PR c++/3882
2084         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
2085         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
2086         only after recording the declaration.
2087
2088 2002-03-18  Jason Merrill  <jason@redhat.com>
2089
2090         PR c++/2039
2091         * init.c (resolve_offset_ref): Hand off to build_component_ref.
2092
2093         PR c++/4222, c++/5995
2094         * call.c (build_over_call): Fix empty class logic.
2095
2096         PR c++/3870
2097         * cp-tree.h (struct saved_scope): Add last_parms field.
2098         * decl.c (maybe_push_to_top_level): Save last_function_parms.
2099         (pop_from_top_level): Restore it.
2100
2101         PR c++/4377
2102         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
2103         NON_LVALUE_EXPRs.
2104
2105         PR c++/4003
2106         * pt.c (tsubst_friend_function): Use decl_namespace_context.
2107
2108         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
2109         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
2110         type with a nontrivial destructor.
2111
2112 2002-03-17  Jason Merrill  <jason@redhat.com>
2113
2114         PR c++/4460
2115         * class.c (build_base_path): Virtual base layout is fixed in
2116         in-charge [cd]tors.
2117
2118 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
2119
2120         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
2121         * parse.y (yyparse): Remove macro.
2122
2123 2002-03-17  Jason Merrill  <jason@redhat.com>
2124
2125         PR c++/5757
2126         * init.c (build_new_1): Pass the right pointer to op delete.
2127
2128 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
2129
2130         PR c++/4361
2131         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
2132         conversion operators go.
2133         (struct lang_decl_flags): Add template_conv_p and unused
2134         bitfields.
2135         (DECL_TEMPLATE_CONV_FN_P): New macro.
2136         * call.c (build_user_type_conversion_1): Don't check second type
2137         conversion of overload set first.
2138         * class.c (add_method): Make sure templated conversion operators
2139         all end up on slot 2.
2140         * lex.c (do_identifier): A conversion operator token might be
2141         satisfied by a templated conversion operator.
2142         * pt.c (check_explicit_specialization): Use
2143         CLASSTYPE_FIRST_CONVERSION_SLOT.
2144         (template_parm_this_level_p): New function.
2145         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
2146         * search.c (lookup_fnfields_1): Template conversions will be on
2147         the first slot.
2148         * typeck.c (build_component_ref): Preserve the type of an
2149         conversion operator name on the overload type.
2150         (build_x_function_call): Retrieve the conversion operator name.
2151
2152 2002-03-15  Richard Henderson  <rth@redhat.com>
2153
2154         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
2155
2156 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
2157
2158         * cp-tree.h (CLEANUP_DECL): Remove.
2159         (CLEANUP_EXPR): Likewise.
2160         * decl.c (destroy_local_var): Simplify.
2161         (maybe_build_cleanup): Tidy.
2162         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
2163         * semantics.c (cp_expand_stmt): Likewise.
2164         * cp/tree.c (cp_statement_code_p): Likewise.
2165
2166 2002-03-15  Jason Merrill  <jason@redhat.com>
2167
2168         PR c++/5857
2169         * decl.c (duplicate_decls): Use merge_types instead of common_type.
2170         * typeck.c (common_type): Just hand off to
2171         type_after_usual_arithmetic_conversions and
2172         composite_pointer_type.
2173         (merge_types): New fn.
2174         (commonparms): Use it instead of common_type.
2175         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
2176         (composite_pointer_type): Also handle attributes.
2177         * cp-tree.h: Declare merge_types.
2178
2179         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
2180         variables.
2181         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
2182
2183 2002-03-14  Richard Henderson  <rth@redhat.com>
2184
2185         * decl.c: Include c-pragma.h.
2186         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
2187         * Make-lang.in: Update dependencies.
2188
2189 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
2190
2191         PR c++/5908
2192         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
2193         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
2194
2195 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
2196
2197         * mangle.c (write_builtin_type): Handle 128-bit integers even if
2198         they are not a standard integer type.
2199
2200 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
2201
2202         * cp-tree.h (init_init_processing): Remove declaration.
2203         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
2204         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
2205
2206 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2207
2208         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
2209         Define.
2210         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
2211         tree_code_length.
2212         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
2213         cplus_tree_code_name): Delete.
2214         (cxx_init): Don't call add_c_tree_codes, instead set
2215         lang_unsafe_for_reeval.  Don't try to copy into the various
2216         tree_code arrays.
2217
2218 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
2219
2220         PR c++/5659
2221         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
2222         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
2223         definitions.
2224
2225 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
2226
2227         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
2228         DR209 is now not a defect.
2229         * cp-tree.h (skip_type_access_control): Remove.
2230         * decl.c (grokdeclarator): Do type access control for friend
2231         declarations.
2232         * semantics.c (decl_type_access_control): Don't reset
2233         current_type_lookups.
2234         (save_type_access_control): Always save the lookups.
2235         (skip_type_access_control): Remove.
2236         (finish_class_definition): Don't change type_lookups.
2237
2238 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
2239
2240         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
2241         It is incorrect.
2242         * typeck.c (build_static_cast): Compare non-qualified types
2243         with pointer to member conversions.
2244
2245 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
2246             Daniel Berlin  <dan@dberlin.org>
2247
2248         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
2249         (cxx_get_alias_set): Use it.
2250
2251 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2252
2253         * cp-tree.h (stabilize_expr): Prototype.
2254
2255 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
2256
2257         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
2258         conditional return void.
2259
2260 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
2261
2262         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
2263         * cp-tree.h (cxx_unsave): New.
2264         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
2265         (init_tree): Update.
2266
2267 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2268
2269         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
2270         explicit sizeof/sizeof.
2271         * decl2.c (cxx_decode_option): Likewise.
2272         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
2273
2274 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
2275
2276         PR c++/775
2277         * decl.c (lookup_tag): Only reject enum/class mismatch, not
2278         class/union mismatch.
2279         * parse.y (check_class_key): New function.
2280         (structsp): Call it.
2281
2282 2002-03-01  Michael Matz  <matz@suse.de>
2283
2284         * typeck.c (cp_pointer_int_sum): Complete inner type which is
2285         used later by size_in_bytes().
2286
2287 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
2288
2289         * cp-tree.h:  Require __GNUC__ to be #defined.
2290         (build_init):  Add missing prototype.
2291
2292 2002-03-01  Jason Merrill  <jason@redhat.com>
2293
2294         * except.c: Don't include decl.h or obstack.h.  Do include
2295         tree-inline.h.
2296         (build_throw): Destroy temporaries from the thrown
2297         expression before calling __cxa_throw.  Construct a thrown
2298         temporary directly into the exception object.
2299         (stabilize_throw_expr): New function.
2300         (wrap_cleanups_r): New function.
2301         * tree.c (stabilize_expr): New function.
2302         * init.c (build_init): New function.
2303         * Make-lang.in (cp/except.o): Adjust .h deps.
2304
2305 2002-02-28  Jason Merrill  <jason@redhat.com>
2306
2307         * search.c (lookup_base_r): Don't clear is_non_public just because
2308         we found a friendly scope.
2309
2310         * decl.c (finish_function): Only warn about missing return
2311         statement with -Wreturn-type.
2312
2313 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
2314
2315         * class.c (build_clone): Update.
2316         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
2317         * cp-tree.h (cxx_dup_lang_specific_decl): New.
2318         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
2319         (copy_decl): Update.
2320         * method.c (make_thunk): Update.
2321
2322 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
2323
2324         * decl2.c: Delete traditional-mode-related code copied from
2325         the C front end but not used, or used only to permit the
2326         compiler to link.
2327
2328 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
2329
2330         PR c++/4093
2331         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
2332         to void.
2333
2334 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
2335
2336         PR other/5746
2337         * semantics.c (finish_switch_cond): Don't call get_unwidened
2338         if error_mark_node.
2339
2340 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
2341
2342         PR c++/2645, DR 295
2343         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
2344         tf_keep_type_decl.
2345         (make_typename_type): Use tsubst_flags_t.
2346         * decl.c (make_typename_type): Adjust. Return non-artificial
2347         TYPE_DECLs, if required.
2348         (grokdeclarator): Simplify CVR qualification handling. Allow bad
2349         qualifiers on typedef types.
2350         * decl2.c (handle_class_head): Adjust make_typename_type call.
2351         * parse.y (nested_name_specifier): Likewise.
2352         (typename_sub0): Likewise.
2353         (typename_sub1): Likewise.
2354         * pt.c (convert_template_argument): Adjust make_typename_type
2355         return value.
2356         (tsubst): Adjust cp_build_qualified_type_real calls.
2357         (check_cv_quals_for_unify): Cope with alowing bad qualifications
2358         on template type parms.
2359         (instantiate_decl): Recheck substitutions to give warnings on bad
2360         qualifications.
2361         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
2362
2363 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
2364
2365         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
2366
2367         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
2368         unless DECL_ALWAYS_INLINE.
2369
2370 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
2371
2372         * typeck.c (cp_pointer_int_sum): Renamed from
2373         pointer_int_sum, call pointer_int_sum.
2374
2375 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
2376
2377         * decl.c (duplicate_decls): Return 0 if issued error about
2378         redeclaration.
2379
2380 2002-02-19  Jason Merrill  <jason@redhat.com>
2381
2382         ABI change: Mangle `void (A::*)() const' as
2383         M1AKFvvE, not MK1AFvvE.
2384         * mangle.c (write_function_type): Write cv-quals for member
2385         function type here.
2386         (write_pointer_to_member_type): Not here.
2387
2388 2002-02-18  Jason Merrill  <jason@redhat.com>
2389
2390         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
2391         (do_decl_instantiation): Likewise.
2392
2393 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
2394
2395         PR c++/5685
2396         * decl.c (duplicate_decls): Make warning unconditional
2397         if duplicate default argument declarations are present.
2398
2399 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
2400
2401         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
2402         shortening.
2403
2404 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
2405
2406         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
2407         remove incorrect comment. Move #if 0'd code to common path. Use
2408         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
2409
2410 2002-02-13  Jason Merrill  <jason@redhat.com>
2411
2412         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
2413         (finish_function): Don't warn if current_function_returns_null.
2414
2415         * typeck2.c (digest_init): Do handle values of vector type.
2416
2417         * typeck2.c (digest_init, process_init_constructor): Treat vectors
2418         like arrays.
2419
2420 2002-02-11  Jason Merrill  <jason@redhat.com>
2421
2422         * parse.y (reserved_declspecs): Don't handle attributes.
2423         (reserved_typespecquals): Handle them here.
2424         * Make-lang.in (parse.c): Adjust expected conflicts.
2425
2426 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
2427
2428         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
2429         instead of compstmt.
2430         (compstmt_or_stmtexpr): Renamed from compstmt.
2431         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
2432
2433 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
2434
2435         Rename instantiate_type_flags to tsubst_flags_t & expand use.
2436         * cp-tree.h (instantiate_type_flags): Rename to ...
2437         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
2438         add tf_warning flag.
2439         (instantiate_type): Adjust prototype.
2440         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
2441         do_type_instantiation, cp_build_qualified_type_real): Likewise.
2442         cp_build_qualified_type: Adjust.
2443         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
2444         tf_*.
2445         * call.c (standard_conversion): Rename itf_* to tf_*.
2446         (reference_binding): Likewise.
2447         (convert_like_real): Likewise.
2448         * cvt.c (cp_convert_to_pointer): Likewise.
2449         (convert_to_reference): Likewise.
2450         * decl.c (lookup_namespace_name): Use tf_* flags.
2451         (make_typename_type): Likewise.
2452         (grokdeclarator): Likewise.
2453         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
2454         (coerce_template_template_parms, convert_template_argument,
2455         coerce_template_parms, maybe_get_template_decl_from_type_decl,
2456         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
2457         instantiate_class_template, tsubst_template_arg_vector,
2458         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
2459         tsubst_decl, tsubst_arg_types, tsubst_function_type,
2460         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
2461         instantiate_template, fn_type_unification,
2462         resolve_overloaded_unification, verify_class_unification,
2463         unify, get_bindings_real, do_type_instantiation,
2464         regenerate_decl_from_template, instantiate_decl,
2465         tsubst_initializer_list, tsubst_enum,
2466         get_mostly_instantiated_function_type,
2467         invalid_nontype_parm_type_p): Likewise.
2468         * tree.c (cp_build_qualified_type_real): Likewise.
2469         * typeck.c (build_binary_op): Rename itf_* to tf_*.
2470         (build_ptrmemfunc): Likewise.
2471         (convert_for_assignment): Likewise.
2472
2473 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
2474
2475         PR c++/109
2476         * decl.c (grokdeclarator): Allow friend declarations from
2477         dependent types.
2478         * decl2.c (handle_class_head): Don't push into template parm contexts.
2479         * pt.c (push_template_decl_real): Template parm contexts are never
2480         being defined.
2481
2482 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
2483
2484         * class.c: Include target.h.
2485         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
2486         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
2487         bit-field layout.
2488         * Make-lang.in: Adjust deps.
2489
2490 2002-02-05  Jason Merrill  <jason@redhat.com>
2491
2492         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
2493
2494 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
2495
2496         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
2497         (finish_switch_cond): Set SWITCH_TYPE.
2498
2499 2002-02-04  Richard Henderson  <rth@redhat.com>
2500
2501         * method.c (use_thunk): Always initialize the block tree.  Reindent.
2502         * semantics.c (expand_body): Emit thunks after function, not before.
2503
2504 2002-02-04  Jason Merrill  <jason@redhat.com>
2505
2506         * decl.c (start_function): Call cplus_decl_attributes immediately
2507         after grokdeclarator.
2508
2509         * decl.c (start_function): Combine DECL_RESULT handling code.
2510
2511 2002-02-03  Jason Merrill  <jason@redhat.com>
2512
2513         * xref.c: Remove.
2514         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
2515         (cp/xref.o): Remove dependencies.
2516         * class.c (finish_struct_1, check_methods): Don't call xref fns.
2517         (finish_struct_1): Likewise.
2518         * friend.c (make_friend_class): Likewise.
2519         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
2520         * spew.c (read_process_identifier): Likewise.
2521
2522 2002-02-01  Jason Merrill  <jason@redhat.com>
2523
2524         PR c++/4872
2525         * decl.c (finish_function): Warn about a non-void function with
2526         no return statement and no abnormal exit.
2527         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
2528         (current_function_returns_abnormally): New macro.
2529         * call.c (build_call): Set it.
2530
2531         * typeck.c (build_component_ref): Always complain about offsetof
2532         constructs on non-PODs.  Only make it an error for members of
2533         virtual bases.
2534
2535         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
2536         (dump_function_decl): Always dump parms.
2537
2538         * decl2.c (finish_static_data_member_decl): Complain about a local
2539         class with a static data member.
2540
2541         PR c++/4286
2542         * search.c (lookup_field_1): Don't xref a static data member
2543         just because we looked it up.
2544
2545 2002-01-31  Jason Merrill  <jason@redhat.com>
2546
2547         * Make-lang.in (parse.c): Handle .output file.
2548
2549         PR c++/3395
2550         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
2551         not TREE_TYPE.
2552         * semantics.c (finish_class_definition): Adjust.
2553
2554         Allow attributes in parms and casts.
2555         * parse.y (named_parm): Don't strip attrs.
2556         (declmods): Remove 'attributes' production.
2557         (nonempty_cv_qualifiers): Accept attributes.
2558         (ATTRIBUTE): Give precedence.
2559         * decl.c (groktypename): Handle attributes.
2560         (grokparms): Likewise.
2561
2562 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
2563
2564         * decl2.c (cxx_decode_option): Pass 0 as last argument to
2565         cpp_handle_option.
2566         * lang-specs.h: Use cpp_unique_options instead of cpp_options
2567         when used together with cc1_options.
2568
2569 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
2570
2571         PR c++/5132
2572         * typeck2.c (digest_init): Make sure non-array core type is
2573         instantiated.
2574         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
2575         constructor, rather than build a new one.
2576         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
2577         PURPOSE of constructor elts.
2578
2579 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
2580
2581         * Make-lang.in (parse.c): Adjust expected number of
2582         shift-reduce conflicts.
2583         (decl.o): Depend on diagnostic.h.
2584         * decl.c: Include diagnostic.h.
2585         (grokdeclarator): Check for null pointer.
2586         (finish_function): Don't abort when
2587         current_binding_level->parm_flag != 1, if errors have
2588         occurred; throw away the statement tree and extra binding
2589         levels, and continue.
2590         * lex.c (note_list_got_semicolon): Check for null pointer.
2591         * method.c (hack_identifier): Just return error_mark_node if
2592         value is error_mark_node.
2593         * parse.y (primary: TYPEID(type_id)): No need to use
2594         TYPE_MAIN_VARIANT here.
2595         (handler_seq): Accept an empty list of catch clauses and
2596         generate a fake handler block to avoid later crashes.
2597         (ansi_raise_identifier): Accept the error token too.
2598         * semantics.c (begin_class_definition,
2599         finish_class_definition): Check for error_mark_node.
2600
2601 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
2602
2603         * typeck2.c (friendly_abort): Delete definition.
2604         * cp-tree.h (friendly_abort): Don't prototype.
2605         (my_friendly_assert): Use fancy_abort.
2606
2607 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
2608
2609         * cp-tree.h (my_friendly_abort): Remove.
2610
2611 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
2612
2613         * spew.c (pending_inlines, pending_inlines_tail,
2614         processing_these_inlines): Make static.
2615         (mark_pending_inlines): Remove static.
2616         (begin_parsing_inclass_inline): If in function, save pi
2617         for GC to cp_function_chain->unparsed_inlines instead.
2618         (process_next_inline): Likewise.
2619         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
2620         (mark_pending_inlines): Add prototype.
2621         * decl.c (spew_debug): Remove unused extern.
2622         (mark_lang_function): Call mark_pending_inlines.
2623
2624 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
2625
2626         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
2627         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
2628         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
2629         Change my_fancy_abort() to abort().
2630
2631 2002-01-23  Jason Merrill  <jason@redhat.com>
2632
2633         PR c++/5453
2634         * class.c (fixed_type_or_null): Fix thinko.
2635
2636         PR c++/3331
2637         * init.c (resolve_offset_ref): Use build_indirect_ref.
2638
2639         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
2640
2641 2002-01-22  Jason Merrill  <jason@redhat.com>
2642
2643         * parse.y (function_body): Suppress the block for the outermost
2644         curly braces.
2645         * decl.c (pushdecl): Don't try to skip it.
2646         (begin_function_body): Keep the block we create, not the next one.
2647         * init.c (emit_base_init): Don't mess with keep_next_level.
2648
2649         * class.c (build_base_path): Tweak formatting.
2650
2651 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
2652
2653         Fix regression introduced with patch for c++/775
2654         * parse.y (class_head_defn): Check for template specializations
2655         with a different class-key.
2656
2657 2002-01-17  Jason Merrill  <jason@redhat.com>
2658
2659         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
2660         (begin_function_body): Call them and keep_next_level.
2661         * init.c (emit_base_init): Call keep_next_level.
2662         * semantics.c (setup_vtbl_ptr): Lose.
2663         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
2664         (vtbls_set_up_p): Lose.
2665         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
2666         * method.c (do_build_copy_constructor): Likewise.
2667         (synthesize_method): Call finish_mem_initializers.
2668         * parse.y (nodecls): Likewise.
2669
2670         * error.c (dump_type_suffix): Print the exception specs before
2671         recursing.
2672         (dump_function_decl): Here, too.
2673
2674         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
2675
2676 2002-01-10  Ira Ruben   <ira@apple.com>
2677
2678         PR c++/907
2679         * decl.c (start_method): Handle attrlist.
2680
2681 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
2682
2683         * decl2.c (max_tinst_depth): Increase default limit to 500.
2684
2685 2002-01-10  Graham Stott  <grahams@redhat.com>
2686
2687         * spew.c (YYCHAR): Uppercase macro parameter and add
2688         parenthesis.
2689         (YYCODE): Likewise.
2690         (NAME): Uppercase macro parameter.
2691
2692 2002-01-09  Graham Stott  <grahams@redhat.com>
2693
2694         * decl.h (grokdeclarator): Wrap long line.
2695
2696         * semantics.c (FINISH_COND): Uppercase macro paramaters and
2697         add parenthesis.
2698
2699 2002-01-08  Graham Stott  <grahams@redhat.com>
2700
2701         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
2702         (PALLOC): Uppercase macro parameter and whitespace.
2703         (SALLOC): Uppercase macro parameter.
2704         (SFREE): Uppercase macros parameter, add parenthese and
2705         whitespace.
2706         (STREQL): Uppercase macro parameter and whitespace.
2707         (STRNEQ): Likewise.
2708         (STRLSS): Likewise.
2709         (STRLEQ): Likewise.
2710         (STRGTR): Likewise.
2711         (STRGEQ): Likewise.
2712
2713         * call.c (convert_like): Add parenthesis and wrap.
2714         (convert_like_with_context): Likewise.
2715         (ICS_RANK): Whitespace.
2716         (NEED_TEMPORARY_P): Remove parenthesis.
2717
2718         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
2719         whitespace.
2720         (VTT_MARKED_BINFO_P): Likewise.
2721
2722         * decl.c (BINDING_LEVEL): Add parenthesis.
2723         (DEF_OPERATOR): Likewise.
2724
2725         * mangle.c (MANGLE_TRACE): Add parenthesis.
2726         (MANGLE_TRACE_TREE): Likewise.
2727         (write_signed_number): Likewise.
2728         (write_unsigned_number): Likewise.
2729
2730         * pt.c (ccat): Uppercase macro parameter.
2731         (cat): Likewise
2732
2733         * search.c (SET_BINFO_ACCESS): Add parenthesis.
2734
2735 2002-01-07  Jason Merrill  <jason@redhat.com>
2736
2737         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
2738         to pedwarn.
2739
2740         PR c++/3536
2741         * method.c (make_thunk): If !flag_weak, give the thunk the
2742         function's linkage.
2743         (use_thunk): Here, too.
2744
2745 2002-01-07  Graham Stott  <grahams@redhat.com>
2746
2747         * error.c: Update copyright date.
2748         (print_scope_operator): Add parenthesis.
2749         (print_left_paren): Likewise.
2750         (print_right_paren): Likewise.
2751         (print_left_bracket): Likewise.
2752         (print_right_bracket): Likewise.
2753         (print_template_argument_list_start): Likewise.
2754         (print_template_argument_list_end): Likewise.
2755         (print_non_consecutive_character): Likewise.
2756         (print_tree_identifier): Likewise.
2757         (print_identifier): Likewise.
2758         (NEXT_CODE): Uppercase macro parameter.
2759         (ident_fndecl): Delete unused.
2760         (GLOBAL_THING): Likewise.
2761
2762 2002-01-06  Graham Stott  <grahams@redhat.com>
2763
2764         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
2765         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
2766         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
2767         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
2768         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
2769         (C_IS_RESERVED_WORD): Uppercase macro parameter.
2770         (C_RID_YYCODE) Likewise.
2771         (ptrmem_cst): Use rtx.
2772         (LOCAL_BINDING_P): Add whitespace.
2773         (INHERITED_VALUE_BINDING_P): Likewise.
2774         (BINDING_SCOPE): Wrap long line.
2775         (BINDING_HAS_LEVEL_P): Remove parenthesis.
2776         (BINDING_VALUE): Wrap long line.
2777         (BINDING_TYPE): Whitespace.
2778         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
2779         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
2780         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
2781         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
2782         (same_type_p): Uppercase macro parameters.
2783         (same_type_ignoring_top_level_qualifiers_p): Likewise.
2784         (OVL_FUNCTION): Wrap long line.
2785         (OVL_CHAIN): Whitespace.
2786         (OVL_CURRENT): Add parenthesis and whitespace.
2787         (OVL_NEXT): Whitespace.
2788         (OVL_USED): Likewise.
2789         (IDENTIFIER_TYPE_VALUE): Likewise.
2790         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
2791         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
2792         (LANG_ID_FIELD): Whitespace.
2793         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
2794         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
2795         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
2796         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
2797         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
2798         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
2799         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
2800         (IDENTIFIER_VIRTUAL_P): Likewise.
2801         (IDENTIFIER_OPNAME_P): Likewise.
2802         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
2803         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
2804         (C_SET_EXP_ORIGINAL_CODE): Likewise.
2805         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
2806         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2807         (IS_AGGR_TYPE): Uppercase macro parameter.
2808         (CLASS_TYPE_P): Likewise.
2809         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
2810         (IS_AGGR_TYPE_2): Whitespace.
2811         (TAGGED_TYPE_P): Uppercase macro parameter.
2812         (TYPE_BUILT_IN): Whitespace.
2813         (TYPE_FOR_JAVA): Likewise.
2814         (FUNCTION_ARG_CHAIN): Remove parenthesis.
2815         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
2816         (FUNCTION_FIRST_USER_PARAM): Likewise.
2817         (PROMOTES_TO_AGGR_TYPE): Whitespace.
2818         (DERIVED_FROM_P): Add parenthesis and wrap.
2819         (UNIQUELY_DERIVED_FROM_P): Likewise.
2820         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
2821         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2822         (CLASSTYPE_USE_TEMPLATE): Whitespace.
2823         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
2824         (TYPE_GETS_DELETE): Add parenthesis.
2825         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
2826         (TYPE_HAS_ASSIGN_REF): Likewise,
2827         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
2828         (TYPE_HAS_INIT_REF): Likewise.
2829         (TYPE_HAS_CONST_INIT_REF): Likewise.
2830         (TYPE_BEING_DEFINED): Likewise.
2831         (TYPE_LANG_SPECIFIC): Likewise.
2832         (CLASSTYPE_RTTI): Likewise.
2833         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
2834         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
2835         (TYPE_OVERLOADS_ARROW): Likewise.
2836         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
2837         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
2838         (CLASSTYPE_METHOD_VEC): Likewise.
2839         (CLASSTYPE_MARKED_N): Likewise.
2840         (CLASSTYPE_MARKED): Likewise.
2841         (CLASSTYPE_MARKED2): Likewise.
2842         (CLASSTYPE_MARKED3): Likewise.
2843         (CLASSTYPE_MARKED4): Likewise.
2844         (CLASSTYPE_MARKED5): Likewise.
2845         (CLASSTYPE_MARKED6): Likewise.
2846         (SET_CLASSTYPE_MARKED): Whitespace.
2847         (CLEAR_CLASSTYPE_MARKED): Likewise.
2848         (SET_CLASSTYPE_MARKED2): Likewise.
2849         (CLEAR_CLASSTYPE_MARKED2): Likewise.
2850         (SET_CLASSTYPE_MARKED3): Likewise.
2851         (CLEAR_CLASSTYPE_MARKED3): Likewise.
2852         (SET_CLASSTYPE_MARKED4): Likewise.
2853         (CLEAR_CLASSTYPE_MARKED4): Likewise.
2854         (SET_CLASSTYPE_MARKED5): Likewise.
2855         (CLEAR_CLASSTYPE_MARKED5): Likewise.
2856         (SET_CLASSTYPE_MARKED6): Likewise.
2857         (CLEAR_CLASSTYPE_MARKED6): Likewise.
2858         (CLASSTYPE_TAGS): Likewise.
2859         (CLASSTYPE_VSIZE): Likewise.
2860         (CLASSTYPE_VBASECLASSES): Likewise.
2861         (CANONICAL_BINFO): Add parenthesis.
2862         (CLASSTYPE_SIZE(NODE): Likewise.
2863         (CLASSTYPE_SIZE_UNIT): Likewise.
2864         (CLASSTYPE_ALIGN(NODE): Likewise.
2865         (CLASSTYPE_USER_ALIGN): Likewise.
2866         (TYPE_JAVA_INTERFACE): Likewise.
2867         (CLASSTYPE_PURE_VIRTUALS): Likewise.
2868         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
2869         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
2870         (CLASSTYPE_HAS_MUTABLE): Likewise.
2871         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
2872         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
2873         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
2874         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
2875         (CLASSTYPE_INTERFACE_ONLY): Likewise.
2876         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2877         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2878         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2879         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2880         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2881         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
2882         (BINFO_UNSHARED_MARKED): Whitespace.
2883         (BINFO_MARKED): Whitespace and wrap.
2884         (SET_BINFO_MARKED): Likewise.
2885         (CLEAR_BINFO_MARKED): Likewise.
2886         (BINFO_VTABLE_PATH_MARKED): Likewise.
2887         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
2888         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
2889         (BINFO_SUBVTT_INDEX): Remove parenthesis.
2890         (BINFO_VPTR_INDEX): Likewise.
2891         (BINFO_PRIMARY_BASE_OF): Likewise,
2892         (CLASSTYPE_VFIELDS): Whitespace.
2893         (VF_DERIVED_VALUE): Wrap long line.
2894         (NAMESPACE_LEVEL): Whitespace.
2895         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
2896         (DEFARG_POINTER): Whitespace.
2897         (DECL_NEEDED_P): Remove parenthesis.
2898         (DECL_LANGUAGE): Whitespace.
2899         (SET_DECL_LANGUAGE): Add parenthesis.
2900         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
2901         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
2902         (DECL_IN_AGGR_P): Whitespace.
2903         (DECL_FRIEND_P): Likewise.
2904         (DECL_BEFRIENDING_CLASSES): Likewise.
2905         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
2906         (DECL_NONCONVERTING_P): Whitespace.
2907         (DECL_PURE_VIRTUAL_P): Likewise.
2908         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
2909         (DECL_PENDING_INLINE_INFO): Whitespace.
2910         (DECL_SORTED_FIELDS): Likewise.
2911         (DECL_DEFERRED_FN): Likewise.
2912         (DECL_TEMPLATE_INFO): Likewise.
2913         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
2914         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
2915         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
2916         (TMPL_ARGS_LEVEL): Likewise.
2917         (SET_TMPL_ARGS_LEVEL): Likewise.
2918         (INNERMOST_TEMPLATE_PARMS): Whitespace.
2919         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
2920         (INTEGRAL_CODE_P(CODE): Add parenthesis.
2921         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
2922         (TYPE_HAS_CONSTRUCTOR): Whitespace.
2923         (TREE_HAS_CONSTRUCTOR): Likewise.
2924         (TYPE_HAS_DESTRUCTOR): Likewise.
2925         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
2926         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
2927         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
2928         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
2929         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
2930         (TYPE_PTRMEMFUNC_P): Likewise.
2931         (TYPE_PTRMEMFUNC_FLAG): Likewise.
2932         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
2933         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
2934         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
2935         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2936         (DECL_ACCESS): Whitespace.
2937         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
2938         (DECL_GLOBAL_DTOR_P): Likewise.
2939         (GLOBAL_INIT_PRIORITY): Likewise.
2940         (DECL_TEMPLATE_PARMS): Likewise.
2941         (DECL_TEMPLATE_RESULT): Likewise.
2942         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
2943         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
2944         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
2945         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2946         (PRIMARY_TEMPLATE_P): Add parenthesis.
2947         (DECL_USE_TEMPLATE): Whitespace.
2948         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
2949         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
2950         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
2951         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
2952         (CALL_DECLARATOR_PARMS): Remove parenthesis.
2953         (CALL_DECLARATOR_QUALS): Likewise.
2954         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2955         (TEMP_NAME_P): Wrap.
2956         (VFIELD_NAME_P): Likewise.
2957         (B_SET): Uppercase macro parameters and add parenthesis.
2958         (B_CLR): Likewise.
2959         (B_TST): Likewise.
2960         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
2961         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
2962         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
2963         (same_or_base_type_p): Likewise.
2964         (cp_deprecated): Likewise.
2965
2966 2002-01-05  Richard Henderson  <rth@redhat.com>
2967
2968         * semantics.c (expand_body): Revert last change.
2969
2970 2002-01-04  Jason Merrill  <jason@redhat.com>
2971
2972         PR c++/4122
2973         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
2974         lost primary.
2975
2976         * class.c (build_vtbl_initializer): Check for a lost primary
2977         before calculating the vtable entry to throw away.
2978
2979 2002-01-02  Jason Merrill  <jason@redhat.com>
2980
2981         * semantics.c (expand_body): Call outlining_inline_function when
2982         emitting an inline function out of line.
2983
2984 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2985
2986         PR c++/5116, c++/764 reversion
2987         * call.c (build_new_op): Revert the instantiations. They are
2988         incorrect.
2989
2990 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2991
2992         PR c++/5089
2993         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
2994
2995 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2996
2997         PR c++/3716
2998         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
2999         (tsubst, case POINTER_TYPE): Handle pmfs here.
3000         (tsubst, case OFFSET_TYPE): Check it is not an offset to
3001         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
3002
3003 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
3004
3005         PR c++/35
3006         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
3007         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
3008         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
3009         PARM_DECL.
3010         (tsubst_template_parms): Break up loop statements.
3011         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
3012         parm PARM_DECLs don't get promoted.
3013
3014 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
3015
3016         PR c++/5123
3017         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
3018         (build_x_function_call): Cope with a COMPONENT_REF containing a
3019         TEMPLATE_ID_EXPR.
3020
3021 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
3022
3023         PR c++/5213
3024         * pt.c (convert_template_argument): Be more careful determining
3025         when RECORD_TYPE templates are or are not templates.
3026
3027 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
3028
3029         PR c++/775
3030         * cp-tree.h (handle_class_head): Adjust prototype.
3031         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
3032         parameters. Use for all class heads.
3033         * parse.y (named_class_head_sans_basetype, named_class_head,
3034         named_complex_class_head_sans_basetype,
3035         named_class_head_sans_basetype_defn,
3036         unnamed_class_head): Remove.
3037         (class_head, class_head_apparent_template): Recognize class heads
3038         (class_head_decl, class_head_defn): New reductions. Process class
3039         heads.
3040         (structsp): Adjust class definition and class declaration
3041         reductions.
3042         (maybe_base_class_list): Give diagnostic on empty list.
3043
3044 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
3045
3046         PR c++/4379
3047         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
3048         single non-static member.
3049         (unary_complex_lvalue): If it cannot be a pointer to member, don't
3050         make it so. Check it is not pointer to reference.
3051
3052 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
3053
3054         PR c++/5132
3055         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
3056         are processing a template decl.
3057
3058 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
3059
3060         PR c++/5116, c++/764
3061         * call.c (build_new_op): Make sure template class operands are
3062         instantiated. Simplify arglist construction.
3063
3064 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
3065
3066         * call.c (build_user_type_conversion_1): Use my_friendly_assert
3067         rather than if ... abort.
3068         * cvt.c (convert_to_reference): Likewise.
3069         * semantics.c (setup_vtbl_ptr): Likewise.
3070         * pt.c (lookup_template_class): Comment typo.
3071
3072 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
3073
3074         PR c++/5125
3075         * pt.c (push_template_decl_real): Make sure DECL has
3076         DECL_LANG_SPECIFIC.
3077
3078 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
3079
3080         PR c++/335
3081         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
3082         for non-reference fields.
3083         * typeck.c (require_complete_type): Use resolve_offset_ref).
3084
3085 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
3086
3087         PR c++/196
3088         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
3089
3090 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
3091
3092         PR c++/160
3093         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
3094         up. Don't stabilize_references when initializing a reference.
3095
3096 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3097
3098         * decl2.c (lang_f_options): Const-ify.
3099
3100 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
3101
3102         * config-lang.in (diff_excludes): Remove.
3103
3104 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
3105
3106         PR c++/90
3107         * typeck.c (build_function_call_real): Use original function
3108         expression for errors.
3109
3110 2001-12-18  Jason Merrill  <jason@redhat.com>
3111
3112         PR c++/3242
3113         * class.c (add_method): Do compare 'this' quals when trying to match a
3114         used function.  Don't defer to another used function.
3115
3116 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
3117
3118         * pt.c (instantiate_clone): Remove, fold into ...
3119         (instantiate_template): ... here. Simplify by removing mutual
3120         recursion.
3121         * typeck2.c (build_m_component_ref): Don't cv qualify the function
3122         pointed to by a pointer to function.
3123         * class.c (delete_duplicate_fields_1): Typo.
3124
3125 2001-12-18  Jason Merrill  <jason@redhat.com>
3126
3127         C++ ABI change: destroy value arguments in caller.
3128         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
3129         create an extra binding level for the parameters.
3130         * decl.c (store_parm_decls): Don't do parameter cleanups.
3131
3132 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
3133
3134         * call.c (build_new_method_call): Use '%#V'.
3135         * error.c (cv_to_string): Use V parameter to determine padding.
3136
3137 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
3138
3139         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
3140         spellings in messages.
3141
3142 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
3143
3144         * cp-tree.h: Delete #defines for cp_error, cp_warning,
3145         cp_pedwarn, and cp_compiler_error.
3146         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
3147         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
3148         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
3149         typeck2.c: Change calls to the above macros to use their
3150         language-independent equivalents: error, warning, pedwarn, and
3151         internal_error respectively.
3152
3153 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
3154
3155         * decl2.c (finish_file): Remove back_end_hook.
3156
3157 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
3158
3159         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
3160         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
3161         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
3162
3163 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
3164
3165         * lang-options.h: Use American spelling in messages.
3166
3167 2001-12-13  Jason Merrill  <jason@redhat.com>
3168
3169         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
3170
3171         Use cleanups to run base and member destructors.
3172         * init.c (push_base_cleanups): New function, split out from...
3173         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
3174         * decl.c (finish_destructor_body): Move vbase destruction code to
3175         push_base_cleanups.
3176         (begin_function_body, finish_function_body): New fns.
3177         (finish_function): Move [cd]tor handling and call_poplevel to
3178         finish_function_body.
3179         (pushdecl): Skip the new level.
3180         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
3181         (setup_vtbl_ptr): Call push_base_cleanups.
3182         * method.c (synthesize_method): Call {begin,end}_function_body.
3183         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
3184         * cp-tree.h: Declare new fns.
3185         * parse.y (function_body, .begin_function_body): New nonterminals.
3186         (fndef, pending_inline, function_try_block): Use function_body.
3187         (ctor_initializer_opt, function_try_block): No longer has a value.
3188         (base_init): Remove .set_base_init token.
3189         (.set_base_init, compstmt_or_error): Remove.
3190         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
3191
3192         * optimize.c (maybe_clone_body): Fix parameter updating.
3193
3194 2001-12-12  Jason Merrill  <jason@redhat.com>
3195
3196         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
3197         * semantics.c (genrtl_start_function): Don't pass
3198         parms_have_cleanups or push an extra binding level.
3199         (genrtl_finish_function): Lose cleanup_label cruft.
3200
3201         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
3202         (ctor_label): Remove.
3203         * semantics.c (finish_return_stmt): Lose ctor_label support.
3204         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
3205         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
3206         dtor_label.
3207
3208         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
3209         check for [cd]tors.
3210         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
3211
3212         * decl.c (finish_function): Check VMS_TARGET, not VMS.
3213
3214         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
3215         (end_cleanup_fn): And poplevel.
3216
3217         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
3218         if we're in a template.
3219
3220 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
3221
3222         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
3223         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
3224         THIS_NAME_P): Delete.
3225         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
3226         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
3227         with internal naming scheme.
3228         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
3229
3230 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
3231
3232         * decl.c (grokdeclarator): Deprecated implicit typename use.
3233
3234 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
3235
3236         PR g++/51
3237         * parse.y (frob_specs): Indicate it is a language linkage which
3238         contained the extern.
3239         * decl.c (grokdeclarator): Allow extern language linkage with
3240         other specifiers.
3241
3242 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
3243
3244         PR g++/72
3245         * decl.c (add_binding): Don't reject duplicate typedefs involving
3246         template parameters.
3247
3248 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
3249
3250         * parse.y, semantics.c: Similarly.
3251
3252 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
3253
3254         PR g++/87
3255         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
3256         (copy_args_p): Rename to ...
3257         (copy_fn_p): ... here.
3258         (grok_special_member_properties): New function.
3259         (grok_op_properties): Lose VIRTUALP parameter.
3260         (copy_assignment_arg_p): Remove.
3261         * call.c (build_over_call): Use copy_fn_p.
3262         * decl.c (grokfndecl): Reformat. Adjust call to
3263         grok_op_properties.
3264         (copy_args_p): Rename to ...
3265         (copy_fn_p): ... here. Reject template functions. Check for pass
3266         by value.
3267         (grok_special_member_properties): Remember special functions.
3268         (grok_ctor_properties): Don't remember them here, just check.
3269         (grok_op_properties): Likewise.
3270         (start_method): Call grok_special_member_properties.
3271         * decl2.c (grokfield): Likewise.
3272         (copy_assignment_arg_p): Remove.
3273         (grok_function_init): Don't remember abstract assignment here.
3274         * pt.c (instantiate_class_template): Call
3275         grok_special_member_properties.
3276         (tsubst_decl): Adjust grok_op_properties call.
3277
3278 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
3279
3280         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
3281         RID_TYPES_COMPATIBLE_P.
3282
3283 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3284
3285         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
3286         call to build_aggr_init.
3287         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
3288
3289 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
3290
3291         * parse.y: Replace uses of the string non-terminal with STRING.
3292         Don't perform string concatentaion here.
3293         (string): Remove non-terminal.
3294         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
3295
3296 2001-12-05  Jason Merrill  <jason@redhat.com>
3297
3298         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
3299         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
3300         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
3301         * pt.c (push_tinst_level): No longer static.
3302         * cp-tree.h: Declare them.
3303
3304         * init.c (resolve_offset_ref): Don't check access for the base
3305         conversion to access a FIELD_DECL.
3306
3307         * cp-tree.h (TYPE_REFFN_P): New macro.
3308         * decl.c (bad_specifiers): Check it, too.
3309
3310         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
3311         on the __*_type_info type if we haven't seen a definition.
3312
3313 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
3314
3315         * decl.c: Include c-common.h.
3316         (shadow_warning): Move to c-common.c.
3317
3318 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3319
3320         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
3321
3322 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
3323
3324         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
3325
3326 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
3327
3328         PR g++/164
3329         * init.c (sort_base_init): Allow binfos to be directly specified.
3330         * method.c (do_build_copy_constructor): Explicitly convert to the
3331         base instance.
3332         (do_build_assign_ref): Likewise.
3333
3334 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
3335
3336         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
3337         declaration and initialization.
3338
3339 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
3340
3341         * typeck2.c: Remove leading capital from diagnostic messages, as
3342         per GNU coding standards.
3343
3344 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
3345
3346         PR c++/3394
3347         * decl.c (xref_basetypes): Handle attributes between
3348         'class' and name.
3349
3350 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
3351
3352         PR g++/3381
3353         * parse.y (named_complex_class_head_sans_basetype): Add new
3354         reduction.
3355         * Make-lang.in (parse.c): Adjust expected conflict count.
3356
3357 2001-12-03  Jason Merrill  <jason@redhat.com>
3358
3359         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
3360         immediate binfos for our virtual bases.
3361
3362 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
3363
3364         * call.c (build_java_interface_fn_ref): Similarly.
3365         * except.c (is_admissible_throw_operand): Similarly.
3366         * init.c (build_java_class_ref): Similarly.
3367         * xref.c (open_xref_file): Similarly.
3368
3369 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
3370
3371         * class.c (finish_struct): Remove trailing periods from messages.
3372         * decl.c (check_tag_decl): Similarly.
3373         * lex.c (cxx_set_yydebug): Similarly.
3374         * typeck2.c (friendly_abort): Similarly.
3375
3376 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
3377
3378         PR c++/3048
3379         * cp-tree.h (ovl_member): Remove.
3380         * decl2.c (merge_functions): Handle extern "C" functions
3381         specially.
3382         * tree.c (ovl_member): Remove.
3383
3384 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
3385
3386         PR c++/4842
3387         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
3388         FUNCTION_DECL, as input.
3389         (mark_overriders): Remove.
3390         (warn_hidden): Rework for the new ABI.
3391
3392 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
3393
3394         PR c++/3471
3395         * call.c (convert_like_real): Do not build additional temporaries
3396         for rvalues of class type.
3397
3398 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
3399
3400         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
3401         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
3402         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
3403         (DERIVED_FROM_P): Likewise.
3404         (enum base_access): Renumber, add ba_quiet bit mask.
3405         (get_binfo): Remove.
3406         (get_base_distance): Remove.
3407         (binfo_value): Remove.
3408         (ACCESSIBLY_DERIVED_FROM_P): Remove.
3409         * call.c (standard_conversion): Use lookup_base.
3410         * class.c (strictly_overrides): Likewise.
3411         (layout_virtual_bases): Likewise.
3412         (warn_about_ambiguous_direct_bases): Likewise.
3413         (is_base_of_enclosing_class): Likewise.
3414         (add_vcall_offset_vtbl_entries_1): Likewise.
3415         * cvt.c (build_up_reference): Adjust comment.
3416         * init.c (build_member_call): Reformat.
3417         * search.c (get_binfo): Remove.
3418         (get_base_distance_recursive): Remove.
3419         (get_base_distance): Remove.
3420         (lookup_base_r): Tweak.
3421         (lookup_base): Add ba_quiet control. Complete the types here.
3422         (covariant_return_p): Use lookup_base.
3423         * tree.c (binfo_value): Remove.
3424         (maybe_dummy_object): Use lookup_base.
3425         * typeck.c (build_static_cast): Use lookup_base.
3426         (get_delta_difference): Likewise.
3427         * typeck2.c (binfo_or_else): Use lookup_base.
3428         (build_scoped_ref): Add back error_mark_check.
3429         (build_m_component_ref): Use lookup_base.
3430
3431 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3432
3433         * Make-lang.in (c++.generated-manpages): New dummy target.
3434
3435 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3436
3437         * Make-lang.in (cp-lang.o): Depends on c-common.h.
3438         * cp-lang.c (c-common.h): Include.
3439         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
3440         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
3441         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
3442
3443 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
3444
3445         * decl2.c (c_language): Move to c-common.c.
3446         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
3447         functions.
3448         (cxx_init): Update.
3449
3450 2001-11-26  Jason Merrill  <jason@redhat.com>
3451
3452         * call.c (joust): Remove COND_EXPR hack.
3453
3454 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
3455
3456         * search.c (lookup_base_r): Declare bk in variable declaration
3457         space.
3458
3459 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
3460
3461         PR g++/3145
3462         * class.c (build_vbase_pointer): Remove.
3463         (build_vbase_path): Remove.
3464         (build_base_path): New function.
3465         * cp-tree.h (base_access, base_kind): New enumerations.
3466         (build_base_path): Declare.
3467         (convert_pointer_to_real): Remove.
3468         (convert_pointer_to): Remove.
3469         (lookup_base): Declare.
3470         (convert_pointer_to_vbase): Remove.
3471         * call.c (build_scoped_method_call): Use lookup_base &
3472         build_base_path instead of convert_pointer_to_real,
3473         get_base_distance & get_binfo.
3474         (build_over_call): Likewise.
3475         * cvt.c (cp_convert_to_pointer): Likewise.
3476         (convert_to_pointer_force): Likewise.
3477         (build_up_reference): Likewise.
3478         (convert_pointer_to_real): Remove.
3479         (convert_pointer_to): Remove.
3480         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
3481         instead of convert_pointer_to_vbase & build_vbase_path.
3482         (emit_base_init): Use build_base_path instead of
3483         convert_pointer_to_real.
3484         (expand_virtual_init): Lose unrequired conversions.
3485         (resolve_offset_ref): Use lookup_base and build_base_path
3486         instead of convert_pointer_to.
3487         * rtti.c (build_dynamic_cast_1): Use lookup_base &
3488         build_base_path instead of get_base_distance & build_vbase_path.
3489         * search.c (get_vbase_1): Remove.
3490         (get_vbase): Remove.
3491         (convert_pointer_to_vbase): Remove.
3492         (lookup_base_r): New function.
3493         (lookup_base): New function.
3494         * typeck.c (require_complete_type): Use lookup_base &
3495         build_base_path instead of convert_pointer_to.
3496         (build_component_ref): Likewise.
3497         (build_x_function_call): Likewise.
3498         (get_member_function_from_ptrfunc): Likewise.
3499         (build_component_addr): Likewise.
3500         * typeck2.c (build_scoped_ref): Likewise.
3501
3502 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
3503
3504         * cp-tree.h (CP_TYPE_QUALS): Removed.
3505         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
3506         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
3507         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
3508         * dump.c (cp_dump_tree): Use void* dump_info argument to match
3509         lang-hooks prototype.
3510         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
3511         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
3512         CP_TYPE_QUALS changed to cp_type_quals.
3513         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
3514         (CXX_C_OBJS): Remove c-dump.o.
3515
3516 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
3517
3518         PR c++/3637
3519         * pt.c (lookup_template_class): Ensure that all specializations
3520         are registered on the list corresponding to the most general
3521         template.
3522
3523 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
3524
3525         * call.c (non_reference): Add documentation.
3526         (convert_class_to_reference): Do not strip reference types
3527         from conversion operators.
3528         (maybe_handle_ref_bind): Simplify.
3529         (compare_ics): Correct handling of references.
3530
3531 2001-11-19  John Wilkinson <johnw@research.att.com>
3532
3533         * dump.c (dump_op): New function.
3534         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
3535         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
3536         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
3537
3538 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
3539
3540         PR4629
3541         * semantics.c (finish_sizeof): Make sure that expression created
3542         while processing a template do not have a type.
3543         (finish_alignof): Likewise.
3544         * typeck.c (c_sizeof): Likewise.
3545         (expr_sizeof): Likewise.
3546
3547 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
3548
3549         * lex.c (cxx_finish): Call c_common_finish.
3550         (finish_parse): Remove.
3551
3552 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3553
3554         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
3555         when displaying error message about missing array bounds.
3556
3557 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3558
3559         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
3560         CONST_CAST_EXPR.
3561         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
3562
3563 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
3564
3565         * cp-tree.h (print_class_statistics): Restore.
3566
3567 2001-11-15  Jason Merrill  <jason@redhat.com>
3568
3569         * method.c (use_thunk): Don't emit debugging information for thunks.
3570
3571         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
3572         * decl.c (make_typename_type): Handle getting a class template.
3573         * search.c (lookup_field_r): A class template is good enough for
3574         want_type.
3575
3576         * call.c (convert_like_real): Only use cp_convert for the bad part.
3577         (standard_conversion): Also allow bad int->enum.
3578         * typeck.c (ptr_reasonably_similar): Also allow functions to
3579         interconvert.  Pointers to same-size integers are reasonably
3580         similar.
3581
3582         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
3583         give it void type.
3584
3585 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
3586
3587         PR g++/3154
3588         * init.c (sort_base_init): Remove unreachable code.
3589         (expand_member_init): Adjust comment to reflect reality. Simplify
3590         and remove unreachable code.
3591
3592 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
3593
3594         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
3595         (cxx_init): Update prototype.
3596         * decl.c (init_decl_processing): Rename.  Move null node init
3597         to its creation time.
3598         * lex.c (cxx_init_options): Update.
3599         (cxx_init): Combine with old init_parse; also call
3600         cxx_init_decl_processing.
3601
3602 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
3603
3604         * decl.c (check_initializer): Try to complete the type of an
3605         array element before checking whether it's complete.  Don't
3606         complain about arrays with complete element types but an
3607         unknown size.
3608         (cp_finish_decl): Build the hierarchical constructor before
3609         calling maybe_deduce_size_from_array_init.
3610
3611 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
3612
3613         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
3614
3615 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
3616
3617         PR g++/4206
3618         * parse.y (already_scoped_stmt): Remove.
3619         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
3620
3621 2001-11-12  H.J. Lu <hjl@gnu.org>
3622
3623         * cvt.c (ocp_convert): Don't warn the address of a weak
3624         function is always `true'.
3625
3626 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3627
3628         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3629         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3630         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
3631         * cp-tree.h (print_class_statistics): Remove.
3632         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
3633         cxx_print_identifier, cxx_set_yydebug): New.
3634         * lex.c (set_yydebug): Rename c_set_yydebug.
3635         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
3636         lang_print_xnode): Rename.
3637         * tree.c (print_lang_statistics): Rename.
3638
3639 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3640
3641         * class.c (dump_array): Fix format specifier warning.
3642
3643 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3644
3645         * cp-lang.c (LANG_HOOKS_NAME): Override.
3646         (struct lang_hooks): Constify.
3647         * lex.c (cxx_init_options): Update.
3648         (lang_identify): Remove.
3649         * parse.y (language_string): Remove.
3650
3651 2001-11-08  Andreas Franck  <afranck@gmx.de>
3652
3653         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
3654         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
3655         suggested by autoconf.
3656         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
3657         (c++.install-common): Use the transformed target alias names.
3658
3659 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3660
3661         * Make-lang.in: Update.
3662         * cp-lang.c: Include langhooks-def.h.
3663
3664 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3665
3666         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
3667
3668 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3669
3670         * lex.c (copy_lang_type): Add static prototype.
3671
3672 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3673
3674         * pt.c (unify): Handle SCOPE_REF.
3675
3676 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
3677
3678         * tree.c (cp_copy_res_decl_for_inlining): Adjust
3679         DECL_ABSTRACT_ORIGIN for the return variable.
3680
3681 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
3682
3683         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
3684
3685 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
3686
3687         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
3688         semantics.c, spew.c: Fix spelling errors.
3689
3690 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3691
3692         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
3693
3694 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
3695
3696         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
3697         pop_everything.
3698
3699 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3700
3701         * cp-lang.c (cxx_get_alias_set): New function.
3702         Point LANG_HOOKS_GET_ALIAS_SET to it.
3703
3704 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3705
3706         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
3707         * cp-tree.h (make_unbound_class_template): Prototype new function.
3708         * decl.c (make_unbound_class_template): New function.
3709         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
3710         * error.c (dump_type): Likewise.
3711         * mangle.c (write_type): Likewise.
3712         * parse.y (template_parm): Likewise.
3713         (template_argument): Use make_unbound_class_template.
3714         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
3715         (tsubst): Likewise.
3716         (tsubst_copy): Likewise.
3717         (unify): Likewise.
3718         * tree.c (walk_tree): Likewise.
3719         * typeck.c (comptypes): Likewise.
3720
3721 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3722
3723         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
3724         extra calls into fewer ones.
3725
3726 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
3727
3728         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
3729         Warn when merging inline with attribute noinline.
3730         (start_decl, start_function): Warn if inline and attribute
3731         noinline appear in the same declaration.
3732
3733 2001-10-16  H.J. Lu <hjl@gnu.org>
3734
3735         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
3736         for tree checking disabled.
3737
3738 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
3739
3740         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
3741         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
3742
3743 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
3744
3745         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
3746         (unify): Only handle MINUS_EXPR specially if the above flag is set
3747         and the subtracted constant is 1.  Clear the flag on recursive calls.
3748         Set it when unifying the maximum value in an INTEGER_TYPE's range.
3749
3750 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
3751
3752         * decl.c (bad_specifiers): Don't allow exception specifications
3753         on any typedefs.
3754
3755 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
3756
3757         * cp/lex.c (init_cp_pragma): Similarly.
3758
3759 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3760
3761         * pt.c (lookup_template_class): Build complete template arguments
3762         for BOUND_TEMPLATE_TEMPLATE_PARM.
3763
3764 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3765
3766         * cp-tree.h (TYPE_BINFO): Update comment.
3767         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
3768         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
3769         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
3770         (copy_type): Prototype new function.
3771         * lex.c (copy_lang_decl): Gather tree node statistics.
3772         (copy_lang_type): New function.
3773         (copy_type): Likewise.
3774         (cp_make_lang_type): Create lang_type for
3775         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
3776         and BOUND_TEMPLATE_TEMPLATE_PARM.
3777         * pt.c (tsubst): Use copy_type instead of copy_node.
3778         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
3779
3780 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3781
3782         * pt.c (determine_specialization): Ignore functions without
3783         DECL_TEMPLATE_INFO.
3784
3785 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3786
3787         PR g++/4476
3788         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
3789
3790 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
3791
3792         * typeck2.c (store_init_value): Don't re-digest a bracketed
3793         initializer.
3794
3795         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
3796         ANON_AGGR_TYPE_P.
3797
3798 2001-10-11  Richard Henderson  <rth@redhat.com>
3799
3800         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
3801         of an asm statement.
3802         (build_vtbl_ref_1): Split out from build_vtbl_ref.
3803         (build_vfn_ref): Use it to handle vtable descriptors before
3804         calling build_vtable_entry_ref.
3805         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
3806
3807 2001-10-10  Richard Henderson  <rth@redhat.com>
3808
3809         * parse.y (asm_operand): Allow named operands.
3810         * semantics.c (finish_asm_stmt): Tweek for changed location
3811         of the operand constrant.
3812
3813 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
3814
3815         * call.c (standard_conversion): Add bad conversion between
3816         integers and pointers.
3817         (convert_like_real): Don't use convert_for_initialization for bad
3818         conversions; complain here and use cp_convert.
3819         (build_over_call): Don't handle bad conversions specially.
3820         (perform_implicit_conversion): Allow bad conversions.
3821         (can_convert_arg_bad): New fn.
3822         * cp-tree.h: Declare it.
3823         * typeck.c (convert_for_assignment): Use it.
3824         (ptr_reasonably_similar): Any target type is similar to void.
3825
3826 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
3827
3828         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
3829         (cp/cp-lang.o): New rule.
3830         * cp-tree.h: Declare hooks.
3831         * tree.c: Make hooks non-static.
3832         (init_tree): Don't initialize hooks here.
3833         * lex.c: Likewise.  Move definition of lang_hooks to...
3834         * cp-lang.c: ... new file.
3835
3836 2001-10-08  Richard Henderson  <rth@redhat.com>
3837
3838         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
3839         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
3840
3841 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3842
3843         * class.c (build_vtable_entry_ref): Const-ify.
3844         * decl.c (predefined_identifier,
3845         initialize_predefined_identifiers): Likewise.
3846         * init.c (build_new_1): Likewise.
3847         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
3848         Likewise.
3849
3850 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
3851
3852         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
3853         (INSNS_PER_STMT): Likewise.
3854         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
3855         (copy_body, initialize_inlined_parameters): Likewise.
3856         (declare_return_variable, inlinable_function_p): Likewise.
3857         (expand_call_inline, expand_calls_inline): Likewise.
3858         (optimize_inline_calls, clone_body): Likewise.
3859         * tree.c (walk_tree): Moved to ../tree-inline.c.
3860         (walk_tree_without_duplicates): Likewise.
3861         (copy_tree_r, remap_save_expr): Likewise.
3862
3863 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
3864
3865         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
3866         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
3867         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
3868         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
3869         (flag_inline_trees): Moved declaration to ../tree-inline.h.
3870         (walk_tree): Moved declaration to ../tree-inline.h.
3871         (walk_tree_without_duplicates, copy_tree_r): Likewise.
3872         (remap_save_expr): Likewise.
3873         * decl.c: Include tree-inline.h.
3874         (lang_mark_tree): Don't mark inlined_fns.
3875         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
3876         * optimize.c: Include tree-inline.h.
3877         (optimize_inline_calls): Move declaration to ../tree.h, as
3878         non-static.
3879         (remap_decl): Use language-independent constructs and hooks.
3880         (remap_block, copy_body_r, declare_return_variable): Likewise.
3881         (inlinable_function_p): Likewise.  Don't test for
3882         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
3883         no longer language-specific.
3884         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
3885         call of dump_function to...
3886         (optimize_function): Here...
3887         (clone_body): New function, extracted from...
3888         (maybe_clone_body): ... here.  Build decl_map locally and pass
3889         it on to clone_body.
3890         * pt.c, semantics.c: Include tree-inline.h.
3891         * tree.c: Likewise.
3892         (cp_walk_subtrees): New language-specific hook for tree inlining.
3893         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
3894         cp_is_overload_p, cp_auto_var_in_fn_p,
3895         cp_copy_res_decl_for_inlining): Likewise.
3896         (walk_tree): Move language-specific constructs into...
3897         (cp_walk_subtrees): this new function.
3898         (copy_tree_r): Use language-independent constructs and hooks.
3899         (init_tree): Initialize tree inlining hooks.
3900         (remap_save_expr): Adjust prototype so that the declaration
3901         does not require the definition of splay_tree.
3902
3903 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3904
3905         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
3906         to build the declaration instead of the declaration itself.
3907
3908 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
3909
3910         * decl2.c (cxx_decode_option): Add 'else'.
3911
3912         * spew.c (end_input): No longer static.
3913         * cp-tree.h: Declare it.
3914         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
3915
3916 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
3917
3918         * call.c (build_over_call), typeck.c (build_function_call_real):
3919         Pass type attributes to check_function_format rather than name or
3920         assembler name.  Don't require there to be a name or assembler
3921         name to check formats.
3922
3923 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
3924
3925         * decl.c (init_decl_processing): Don't call
3926         init_function_format_info.  Initialize lang_attribute_table
3927         earlier.
3928         (builtin_function): Call decl_attributes.
3929         (insert_default_attributes): New.
3930
3931 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
3932
3933         * decl.c (grokdeclarator): Copy array typedef handling from C
3934         frontend.
3935
3936         * decl.c (grokdeclarator): Copy too-large array handling from C
3937         frontend.
3938
3939 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
3940
3941         * config-lang.in (target_libs): Added target-gperf, so that we
3942         don't try to build it if C++ is disabled.
3943
3944 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
3945
3946         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
3947         (cp/errfn.o): Delete rule.
3948         (cp/error.o): Depend on flags.h.
3949         * errfn.c: Delete file.
3950         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
3951         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
3952         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
3953         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
3954         internal_error respectively.  Make cp_deprecated into a macro.
3955         Don't define cp_printer typedef or declare cp_printers.
3956         * error.c: Include flags.h.
3957         Delete: struct tree_formatting_info, print_function_argument_list,
3958         print_declaration, print_expression, print_function_declaration,
3959         print_function_parameter, print_type_id, print_cv_qualifier_seq,
3960         print_type_specifier_seq, print_simple_type_specifier,
3961         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
3962         print_parameter_declaration_clause, print_exception_specification,
3963         print_nested_name_specifier, and definition of cp_printers.
3964         (locate_error): New function.
3965         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
3966         rewritten in terms of locate_error and diagnostic.c.
3967         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
3968         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
3969         (init_error): Adjust to match.
3970
3971 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3972
3973         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
3974
3975 2001-09-21  Richard Henderson  <rth@redhat.com>
3976
3977         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
3978         (build_vtbl_initializer): Likewise.
3979         (build_vfn_ref): New.
3980         * cp-tree.h: Declare it.
3981         * call.c (build_over_call): Use it.
3982         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
3983         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
3984
3985 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
3986
3987         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
3988
3989 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
3990
3991         Table-driven attributes.
3992         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
3993         * decl2.c (cplus_decl_attributes): Only take one attributes
3994         parameter.
3995         * cp-tree.c (cplus_decl_attributes): Update prototype.
3996         * class.c (finish_struct), decl.c (start_decl, start_function),
3997         decl2.c (grokfield), friend.c (do_friend), parse.y
3998         (parse_bitfield): Update calls to cplus_decl_attributes.
3999         * decl.c (grokdeclarator): Take a pointer to a single ordinary
4000         attribute list.
4001         * decl.h (grokdeclarator): Update prototype.
4002         * decl2.c (grokfield): Take a single ordinary attribute list.
4003         * friend.c (do_friend): Likewise.
4004         * decl.c (shadow_tag, groktypename, start_decl,
4005         start_handler_parms, grokdeclarator, grokparms, start_function,
4006         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
4007         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
4008         (process_template_parm, do_decl_instantiation): Pass single
4009         ordinary attribute lists around.
4010         * decl.c (grokdeclarator): Correct handling of nested attributes.
4011         Revert the patch
4012         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
4013                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
4014                 not the left.
4015         .
4016         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
4017         (cp_attribute_table): Declare.
4018         * decl.c (valid_lang_attribute): Don't define.
4019         (lang_attribute_table): Define.
4020         (init_decl_processing): Initialize lang_attribute_table instead of
4021         valid_lang_attribute.
4022         * tree.c (cp_valid_lang_attribute): Remove.
4023         (handle_java_interface_attribute, handle_com_interface_attribute,
4024         handle_init_priority_attribute): New functions.
4025         (cp_attribute_table): New array.
4026         * decl2.c (import_export_class): Don't use
4027         targetm.valid_type_attribute.
4028
4029 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4030
4031         * Make-lang.in (cp/error.o): Depend on real.h
4032         * error.c: #include "real.h"
4033
4034 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4035
4036         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
4037         xmalloc/strcpy/strcat.
4038
4039 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4040
4041         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
4042         Const-ification.
4043         * pt.c (tsubst_decl): Likewise.
4044
4045 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4046
4047         * decl2.c (lang_f_options): Const-ification.
4048         * lex.c (cplus_tree_code_name): Likewise.
4049         * spew.c (yyerror): Likewise.
4050
4051 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4052
4053         PR c++/3986
4054         * class.c (force_canonical_binfo_r): Check & move an indirect
4055         primary base first.
4056         (force_canonical_binfo): Check that it's not already
4057         canonical.
4058         (mark_primary_virtual_base): Remove BINFO parameter.
4059         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
4060
4061 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
4062
4063         Remove TYPE_NONCOPIED_PARTS.
4064         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
4065         CLASSTYPE_PURE_VIRTUALS.
4066         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
4067         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
4068         (layout_class_type): Don't call fixup_inline_methods here ...
4069         (finish_struct_1): ... call it here.
4070
4071 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
4072
4073         * decl.c (duplicate_decls): Remove code deadling with
4074         DECL_SAVED_INSNS.
4075         * decl2.c (finish_file): Likewise.
4076         * pt.c (instantiate_decl): Likewise.
4077         * semantics.c (expand_body): Don't defer local functions if
4078         they wouldn't be deferred for some other reason.  Don't
4079         generate RTL for functions that will not be emitted.
4080         (genrtl_start_function): Remove code deadling with
4081         DECL_SAVED_INSNS.
4082         (genrtl_finish_function): Likewise.
4083
4084 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
4085
4086         PR c++/4203
4087         * call.c (build_over_call): Do not optimize any empty base
4088         construction.
4089
4090 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4091
4092         * error.c (dump_template_decl): Output template parameters
4093         together with their specifiers.
4094         Output `class' prefix for template template parameter.
4095         (dump_decl): Fix formatting.
4096
4097 2001-08-30  Kurt Garloff  <garloff@suse.de>
4098
4099         * optimize.c (inlinable_function_p): Allow only smaller single
4100         functions. Halve inline limit after reaching recursive limit.
4101
4102 2001-08-30  Joern Rennecke <amylaar@redhat.com>
4103             Jason Merrill  <jason_merrill@redhat.com>
4104
4105         * class.c (build_vtable_entry_ref): Subtract in char*, not
4106         ptrdiff_t.
4107
4108 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
4109
4110         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
4111         (build_cplus_array_type): Use cp_build_qualified_type, not
4112         TYPE_MAIN_VARIANT, to get an unqualified version.
4113
4114         * decl2.c (grok_alignof): Lose.
4115         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
4116         * typeck.c (c_alignof): Lose.
4117         * semantics.c (finish_sizeof, finish_alignof): New.
4118         * parse.y: Use them.
4119         * cp-tree.h: Declare them.
4120
4121 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
4122
4123         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
4124         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
4125         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
4126
4127 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
4128
4129         * typeck2.c (add_exception_specifier): Only require complete type if
4130         not in processing template declaration.
4131
4132 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4133
4134         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
4135         GNU_xref_start_scope and GNU_xref_end_scope.
4136
4137         * tree.c (TYPE_HASH): Moved to ../tree.h.
4138
4139 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
4140
4141         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
4142         on COMPOUND_EXPRs.
4143
4144 2001-08-14  Richard Henderson  <rth@redhat.com>
4145
4146         * class.c, cp-tree.h (build_vfn_ref): Remove.
4147         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
4148
4149 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
4150
4151         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
4152         empty class assignment as having side-effects to avoid
4153         spurious warnings.
4154
4155 2001-08-13  Zack Weinberg  <zackw@panix.com>
4156
4157         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
4158         * except.c: Include libfuncs.h.
4159
4160 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4161
4162         * decl.c (grokdeclarator): Clarify diagnostic message.
4163
4164 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4165
4166         * decl2.c (do_nonmember_using_decl): Replace using directive
4167         with using declaration in the error message.
4168
4169 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4170
4171         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
4172         criterion to avoid rebuilding expression tree instead of
4173         processing_template_decl.
4174
4175 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
4176
4177         Support named return value optimization for inlines, too.
4178         * decl.c (finish_function): Nullify returns here.
4179         * semantics.c (genrtl_start_function): Not here.
4180         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
4181         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
4182         Also nullify the CLEANUP_STMT for the nrv.
4183         * cp-tree.h: Declare it.
4184         * optimize.c (declare_return_variable): Replace the nrv with the
4185         return variable.
4186         * typeck.c (check_return_expr): Be more flexible on alignment check.
4187         Ignore cv-quals when checking for a matching type.
4188
4189 2001-08-09  Richard Henderson  <rth@redhat.com>
4190
4191         * decl2.c (finish_objects): Use target hooks instead of
4192         assemble_constructor and assemble_destructor.
4193
4194 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4195
4196         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
4197
4198 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
4199
4200         PR c++/3820
4201         Stop using TYPE_NONCOPIED_PARTS.
4202         * call.c (build_over_call): Be careful when copy constructing
4203         or assigning to an empty class.
4204         * class.c (check_bases_and_members): It has a
4205         COMPLEX_ASSIGN_REF if it has a vptr.
4206         (layout_class_type): Don't add empty class padding to
4207         TYPE_NONCOPIED_PARTS.
4208         (finish_struct_1): Don't add the VFIELD either.
4209         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
4210         initialization.
4211
4212 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
4213
4214         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
4215
4216 2001-08-06  Richard Henderson  <rth@redhat.com>
4217
4218         * decl2.c (finish_objects): Pass a symbol_ref and priority to
4219         assemble_{constructor,destructor}.  Remove priority handling.
4220
4221 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4222
4223         Don't allow template-id in using-declaration.
4224         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
4225         (do_class_using_decl): Likewise.
4226
4227 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
4228
4229         * cp/spew.c (read_token): No need to pop buffers.
4230
4231 2001-08-02  Stan Shebs  <shebs@apple.com>
4232
4233         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
4234         (fnaddr_from_vtable_entry): Remove decl.
4235         * method.c (use_thunk): Update comment.
4236
4237 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
4238
4239         * repo.c (get_base_filename): Change return value to const char
4240         pointer.
4241
4242 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
4243
4244         Kill -fhonor-std.
4245         * NEWS: Document.
4246         * cp-tree.h (flag_honor_std): Remove.
4247         (CPTI_FAKE_STD): Remove.
4248         (std_node): Remove comment about it being NULL.
4249         (fake_std_node): Remove.
4250         * decl.c (in_fake_std): Remove.
4251         (walk_namespaces_r): Remove fake_std_node check.
4252         (push_namespace): Remove in_fake_std code.
4253         (pop_namespace): Likewise.
4254         (lookup_name_real): Remove fake_std_node check.
4255         (init_decl_processing): Always create std_node. Always add
4256         std:: things there.
4257         (builtin_function): Always put non '_' fns in std.
4258         * decl2.c (flag_honor_std): Remove.
4259         (lang_f_options): Remove honor-std.
4260         (unsupported_options): Add honor-std.
4261         (set_decl_namespace): Remove fake_std_node check.
4262         (validate_nonmember_using_decl): Likewise.
4263         (do_using_directive): Likewise.
4264         (handle_class_head): Likewise.
4265         * dump.c (cp_dump_tree): Likewise.
4266         * except.c (init_exception_processing): Adjust.
4267         * init.c (build_member_call): Remove fake_std_node check.
4268         (build_offset_ref): Likewise.
4269         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
4270         * rtti.c (init_rtti_processing): Adjust.
4271
4272 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
4273
4274         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
4275         operand while calling cp_tree_equal.
4276
4277 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
4278
4279         The 3.0 ABI no longer has vbase pointer fields.
4280         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
4281         FORMAT_VBASE_NAME): Remove.
4282         * method.c (do_build_copy_constructor): Adjust.
4283         (do_build_assign_ref): Adjust.
4284         * search.c (lookup_field_r): Adjust.
4285         * typeck.c (build_component_ref): Adjust.
4286
4287         The 3.0 ABI always has a vtable pointer at the start of every
4288         polymorphic class.
4289         * rtti.c (build_headof_sub): Remove.
4290         (build_headof): Adjust.
4291         (get_tinfo_decl_dynamic): No need to check flag_rtti
4292         here. Adjust.
4293         (create_real_tinfo_var): Explain why we need a hidden name.
4294
4295 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
4296
4297         PR c++/3631
4298         * class.c (update_vtable_entry_for_fn): The fixed adjustment
4299         of a virtual thunk should be from declaring base.
4300
4301 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
4302
4303         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
4304         the shared virtual base, so preserving inheritance graph order.
4305
4306 2001-07-30  Andreas Jaeger  <aj@suse.de>
4307
4308         * decl2.c: Remove unused var global_temp_name_counter.
4309
4310 2001-07-28  Richard Henderson  <rth@redhat.com>
4311
4312         * method.c (pending_inlines): Remove.
4313
4314 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
4315
4316         * class.c (mark_primary_virtual_base): Don't adjust base
4317         offsets here.
4318         (dfs_unshared_virtual_bases): Adjust them here.
4319         (mark_primary_bases): Explain why we adjust at the end.
4320
4321 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
4322
4323         * class.c (finish_struct_1): When copying the primary base's
4324         VFIELD, make sure we find it is at offset zero.
4325
4326 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4327
4328         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
4329         tsubst_expr for default template arguments.
4330
4331 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
4332
4333         PR c++/3621
4334         * spew.c (yylex): Only copy the token's lineno, if it is
4335         nonzero.
4336
4337 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
4338
4339         PR c++/3624
4340         * call.c (resolve_args): Simplify, call
4341         convert_from_reference.
4342         (build_new_op): Resolve and convert from reference ARG1
4343         earlier. Adjust ARG2 & ARG3 resolve and conversion.
4344
4345 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
4346
4347         * decl.c (last_function_parm_tags): Remove.
4348         (current_function_parm_tags): Remove.
4349         (init_decl_processing): Adjust.
4350         (start_function): Adjust.
4351         (store_parm_decls): Adjust.
4352
4353         PR c++/3152
4354         * decl.c (grokdeclarator): Detect when a function typedef is
4355         declaring a function, and create last_function_parms correctly.
4356
4357 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
4358
4359         * call.c (joust): Only prefer a non-builtin candidate to a builtin
4360         one if they have the same signature.
4361
4362         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
4363         it rather than toplevel_bindings_p.  Give it a mangled name if static.
4364         (convert_to_reference): Adjust.
4365         * decl2.c (get_temp_name): Lose.
4366         * mangle.c (mangle_ref_init_variable): New fn.
4367         (mangle_guard_variable): Strip the ref-init header.
4368         * cp-tree.h: Adjust.
4369         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
4370         initializer.
4371         (grok_reference_init): Always use DECL_INITIAL.
4372
4373 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
4374
4375         PR c++/3416
4376         * call.c (build_conditional_expr): Recheck args after
4377         conversions.
4378         * cp-tree.h (build_conditional_expr): Move to correct file.
4379         * typeck.c (decay_conversion): Diagnose any unknown types
4380         reaching here.
4381         (build_binary_op): Don't do initial decay or default
4382         conversions on overloaded functions.
4383         (build_static_cast): Don't do a decay conversion here.
4384
4385 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
4386
4387         PR c++/3543
4388         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
4389         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
4390
4391 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
4392
4393         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
4394         (create_vtbl_ptr): ... here.
4395
4396 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
4397
4398         * class.c (build_vbase_offset_vbtl_entries): Look for
4399         non-primary base of which we are a sub vtable.
4400
4401 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
4402
4403         * semantics.c (finish_this_expr):  Remove unused code.
4404
4405 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
4406
4407         Simplify rtti, now we've only one ABI.
4408         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
4409         CPTI_TINFO_VAR_ID.
4410         (tinfo_decl_id, tinfo_var_id): Remove.
4411         (get_typeid_1): Remove.
4412         * rtti.c
4413         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
4414         (typeid_ok_p): New function.
4415         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
4416         (get_tinfo_decl): Remove old abi documentation.
4417         (tinfo_from_decl): Remove.
4418         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
4419         (get_typeid_1): Remove.
4420         (get_base_offset): Remove.
4421         (synthesize_tinfo_var): Absorb get_base_offset.
4422         (create_real_tinfo_var): Don't use tinfo_decl_id.
4423
4424 2001-07-23  Graham Stott  <grahams@redhat.com>
4425
4426         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
4427         variable has_two_argument_delete_p.
4428
4429 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
4430
4431         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
4432         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
4433         (CPTI_INDEX_IDENTIFIER): Remove.
4434         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
4435         (delta2_identifier): Remove.
4436         (index_identifier): Remove.
4437         (pfn_or_delta2_identifier): Remove.
4438         (flag_vtable_thunks): Remove.
4439         (VTABLE_DELTA2_NAME): Remove.
4440         (VTABLE_INDEX_NAME): Remove.
4441         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
4442         (vfunc_ptr_type_node): Adjust.
4443         (VTABLE_NAME_PREFIX): Adjust.
4444         (build_vfn_ref): Lose first parameter.
4445         (fixup_all_virtual_upcast_offsets): Remove.
4446         * decl.c (initialize_predefined_identifiers): Remove
4447         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
4448         (init_decl_processing): Remove no-vtable-thunk code.
4449         * decl2.c (flag_vtable_thunks): Remove.
4450         (mark_vtable_entries): Remove no-vtable-thunk code.
4451         * error.c (dump_decl): Remove no-vtable-thunk code.
4452         (dump_expr): Adjust ptr to member function code.
4453         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
4454         code.
4455         * rtti.c (build_headof): Remove no-vtable-thunk code.
4456         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
4457         * search.c (get_base_distance): Remove expand_upcast_fixups case.
4458         (virtual_context) Remove.
4459         (expand_upcast_fixups): Remove.
4460         (fixup_virtual_upcast_offsets): Remove.
4461         (fixup_all_virtual_upcast_offsets): Remove.
4462         * typeck.c (get_member_function_from_ptrfunc): Remove
4463         no-vtable-thunk code.
4464         * call.c (build_over_call): Adjust call to build_vfn_ref.
4465         * class.c (build_vfn_ref): Lose first parameter. Remove
4466         no-vtable-thunk code.
4467         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
4468         (build_vtable_entry): Remove no-vtable-thunk code.
4469
4470 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4471
4472         Remove old-abi remnants. Remove comments about old abi
4473         behavior. Remove references to 'new-abi' in comments.
4474         * cp-tree.h: Adjust comments.
4475         (vbase_offsets_in_vtable_p): Delete.
4476         (vcall_offsets_in_vtable_p): Delete.
4477         (vptrs_present_everywhere_p): Delete.
4478         (all_overridden_vfuns_in_vtables_p): Delete.
4479         (merge_primary_and_secondary_vtables_p): Delete.
4480         (TYPE_CONTAINS_VPTR_P): Adjust.
4481         (VTT_NAME_PREFIX): Remove.
4482         (CTOR_VTBL_NAME_PREFIX): Remove.
4483         (init_vbase_pointers): Remove.
4484         * class.c: Adjust coments.
4485         (build_vbase_pointer_fields): Delete.
4486         (build_vbase_pointer): Remove old-abi code.
4487         (build_secondary_vtable): Likewise.
4488         (modify_all_vtables): Likewise.
4489         (create_vtable_ptr): Likewise.
4490         (layout_class_type): Likewise.
4491         (finish_struct_1): Likewise.
4492         (finish_vtbls): Likewise.
4493         (dfs_finish_vtbls): Delete.
4494         (build_vbase_offset_vtbl_entries): Remove old-abi code.
4495         * cvt.c: Adjust comments.
4496         * decl.c: Adjust comments.
4497         * decl2.c: Adjust comments.
4498         * init.c: Adjust comments.
4499         (construct_virtual_bases): Remove old-abi code.
4500         * lang-specs.h: Remove -fno-new-abi.
4501         * mangle.c: Adjust comments.
4502         * rtti.c: Adjust comments.
4503         (get_base_offset): Remove old-abi-code.
4504         * search.c: Adjust comments.
4505         (dfs_init_vbase_pointers): Remove.
4506         (dfs_vtable_path_unmark): Remove.
4507         (init_vbase_pointers): Remove.
4508         * semantics.c: Adjust comments.
4509         (emit_associated_thunks): Remove old-abi code.
4510         * typeck.c: Adjust comments.
4511
4512 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
4513
4514         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
4515         params.h.
4516
4517 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
4518
4519         * class.c (finish_struct_anon): Forbid nested classes.
4520
4521 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
4522
4523         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
4524         * optimize.c: Include debug.h.
4525         (maybe_clone_body): Use debug hook.
4526         * semantics.c: Include debug.h.
4527         (expand_body): Use debug hook.
4528
4529 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
4530
4531         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
4532
4533 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
4534
4535         * class.c (type_requires_array_cookie): New function.
4536         (check_methods): Don't try to figure out whether the type needs a
4537         cookie here.
4538         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
4539         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
4540         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
4541         * pt.c (instantiate_class_template): Don't set
4542         TYPE_VEC_DELETE_TAKES_SIZE.
4543         * NEWS: Document ABI changes from GCC 3.0.
4544
4545 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
4546             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
4547
4548         * NEWS (Changes in GCC 3.0): Fix typo.
4549
4550 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
4551
4552         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
4553         which attributes are to be attached, and a flags argument.  Update
4554         call to decl_attributes.
4555         (grokfield): Update call to decl_attributes.
4556         * class.c (finish_struct): Update call to cplus_decl_attributes.
4557         * cp-tree.h (cplus_decl_attributes): Update prototype.
4558         * decl.c (start_decl, grokdeclarator, start_function): Update
4559         calls to decl_attributes and cplus_decl_attributes.
4560         * friend.c (do_friend): Update call to cplus_decl_attributes.
4561         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
4562
4563 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
4564
4565         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
4566         for `register' variables with an asm-specification.
4567
4568 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
4569
4570         * semantics.c (finish_asm_stmt): Mark the output operands
4571         to an asm addressable, if necessary.
4572
4573 2001-07-11  Ben Elliston  <bje@redhat.com>
4574
4575         * Revert this change -- there is a subtle bug.
4576
4577         PR c++/80
4578         * decl.c (finish_enum): New "attributes" argument; pass it to
4579         cplus_decl_attributes.  Use a narrower type if the enum is packed.
4580         * cp-tree.h (finish_enum): Adjust prototype.
4581         * parse.y (enum_head): New non-terminal.
4582         (structsp): Use it. Enums now may be preceded or followed by
4583         optional attributes -- pass their chained tree to finish_enum().
4584         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
4585
4586 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
4587
4588         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
4589         variables.
4590
4591 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
4592
4593         * semantics.c (cp_expand_stmt): Fix for null
4594         current_function_return_value.
4595
4596 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
4597
4598         * call.c (build_op_delete_call): Initialize fn.
4599         (convert_like_real): Delete conditional.
4600         (joust): Initialize *w and *l.
4601         * class.c: Add prototype for binfo_ctor_vtable.
4602         (get_primary_binfo): Initialize result.
4603         * init.c (build_java_class_ref): Initialize name.
4604
4605 2001-07-09  Erik Rozendaal  <dlr@acm.org>
4606
4607         * typeck.c (unary_complex_lvalue): Do not duplicate the
4608         argument to modify, pre-, or post-increment when used as an
4609         lvalue and when the argument has side-effects.
4610
4611 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
4612
4613         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
4614         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
4615         cplus_decl_attributes even if attrs is NULL.
4616         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
4617
4618 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
4619
4620         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
4621         calls to decl_attributes.
4622
4623 2001-07-06  Ira Ruben   <ira@apple.com>
4624
4625         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
4626         be DECL_TEMPLATE_RESULT.
4627
4628 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4629
4630         * cp-tree.h (copy_template_template_parm): Rename to ...
4631         (bind_template_template_parm): ... here.
4632         * tree.c (copy_template_template_parm): Rename to ...
4633         (bind_template_template_parm): ... here.  Remove the case when
4634         NEWARGS is NULL_TREE.
4635         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
4636         BOUND_TEMPLATE_TEMPLATE_PARM.
4637         * pt.c (lookup_template_class): Adjust.
4638
4639 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
4640
4641         * cvt.c (convert_lvalue): New fn.
4642         * cp-tree.h: Declare it.
4643         * method.c (do_build_assign_ref): Use it.
4644         (do_build_copy_constructor): Convert parm to base types
4645         before calling base constructors.
4646
4647         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
4648         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
4649         optimize.
4650         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
4651
4652 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
4653
4654         * optimize.c (optimize_inline_calls): New function, broken out
4655         of ...
4656         (optimize_function): ... here. Call it. Don't inline if it is
4657         a thunk.
4658         (dump_function): Print name of dump flag causing this dump.
4659         * semantics.c (expand_body): Move thunk inline check to
4660         optimize_function.
4661
4662 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4663
4664         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
4665         (comptypes): Use target.comp_type_attributes.
4666
4667 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
4668
4669         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
4670
4671 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4672
4673         * error.c (lang_print_error_function): Add a `diagnostic_context *'
4674         parameter. Tweak.
4675
4676 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
4677
4678         * decl2.c (import_export_class): Update.
4679
4680 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
4681
4682         * error.c (init_error): Adjust settings.
4683
4684 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
4685
4686         * error.c (init_error): Adjust settings.
4687
4688 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
4689
4690         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
4691         return pointers to data members by reference rather than by value.
4692
4693 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
4694
4695         Implement the Named Return Value optimization.
4696         * cp-tree.h (struct cp_language_function): Add x_return_value.
4697         (current_function_return_value): Now a macro.
4698         * decl.c: Don't define it.
4699         (define_label, finish_case_label): Don't clear it.
4700         (init_decl_processing): Don't register it with GC.
4701         * semantics.c (genrtl_finish_function): Don't check it for
4702         no_return_label.  Copy the RTL from the return value to
4703         current_function_return_value and walk, calling...
4704         (nullify_returns_r): ...this new fn.
4705         * typeck.c (check_return_expr): Set current_function_return_value.
4706
4707 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
4708
4709         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
4710         sharing a ctor vtable with.  Merge code for cases 1 and 2.
4711         (binfo_ctor_vtable): New fn.
4712         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
4713
4714 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
4715
4716         * class.c (dfs_find_final_overrider): Fix logic.
4717
4718         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
4719         virtual thunk instead of non-virtual.
4720         (get_matching_virtual): Uncomment.
4721
4722         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
4723         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
4724         PARM, not ARG.
4725
4726 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
4727
4728         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
4729         we've not emerged from the hierarchy of RTTI_BINFO on reaching
4730         a non-virtual base.
4731
4732 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
4733
4734         * NEWS: Update release number.
4735
4736 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
4737
4738         PR c++/3130, c++/3131, c++/3132
4739         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
4740         * class.c (force_canonical_binfo_r): Move
4741         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
4742         virtual bases unless they're primary and what they're primary
4743         too has been moved.
4744         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
4745         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
4746         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
4747         derived binfo.
4748         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
4749         (layout_nonempty_base_or_field): Add most derived type
4750         parameter. Adjust.
4751         (layout_empty_base): Likewise.
4752         (build_base_field): Likewise.
4753         (build_base_fields): Likewise.
4754         (propagate_binfo_offsets): Add most derived type
4755         parameter. Skip non canonical virtual bases too.
4756         (dfs_set_offset_for_unshared_vbases): Don't skip primary
4757         bases. Do skip canonical bases.
4758         (layout_virtual_bases): Adjust.
4759         (layout_class_type): Adjust.
4760         (dfs_get_primary_binfo): Build list of virtual primary base
4761         candidates.
4762         (get_primary_binfo): Check that the shared virtual primary
4763         base candidate was found first.
4764         (accumulate_vtbl_inits): Don't do anything for non-vptr
4765         containing binfos. For case 1 primary virtual bases, keep
4766         checking that we've not emerged from the hierarchy of RTTI_BINFO.
4767
4768 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
4769
4770         PR c++/3089
4771         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
4772         hierarchy looking for primary bases for a ctor
4773         vtable. Recursively call oneself, if we meet our primary via
4774         this route and haven't met it yet via inheritance graph order.
4775
4776 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
4777
4778         * lang-options.h: Emit documentation for -fno-honor-std, not
4779         -fhonor-std.
4780
4781 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
4782
4783         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
4784         Don't clobber delta.
4785         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
4786
4787 2001-06-10  Mark Mitchell <mark@codesourcery.com>
4788             Gabriel Dos Reis  <gdr@codesourcery.com>
4789
4790         * Make-lang.in (cp/call.o): Depend on diagnostic.h
4791         (cp/typeck.o): Depend on diagnostic.h
4792         (cp/typeck2.o): Depend on diagnostic.h
4793         (cp/repo.o): Depend on dignostic.h
4794         * typeck.c: #include diagnostic.h
4795         (convert_for_initialization): Remove extern declaration for
4796         warningcount and errorcount.
4797
4798         * call.c: #include diagnostic.h
4799         (convert_like_real): Remove extern declaration for warnincount and
4800         errorcount.
4801
4802         * repo.c: #include diagnostic.h
4803         * typeck2.c: #include diagnostic.h
4804
4805 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
4806
4807         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
4808         in previous change.
4809
4810 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
4811
4812         PR c++/2929
4813         * friend.c (do_friend): Use push_decl_namespace for classes at
4814         namespace scope.
4815
4816 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
4817             Jason Merrill <jason_merrill@redhat.com>
4818
4819         PR c++/3061
4820         * class.c (build_secondary_vtable): Use assert, rather than an error
4821         message.
4822         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
4823         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
4824         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
4825         Don't set BINFO_VTABLE for a primary virtual base.
4826
4827 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
4828
4829         * decl.c (duplicate_decls): Update source position information
4830         when a template function is defined.
4831
4832 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
4833
4834         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
4835
4836 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
4837
4838         PR c++/2914
4839         * decl.c (pushtag): Don't push into a complete type's scope.
4840
4841 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
4842
4843         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
4844         (struct lang_decl_flags): Lose generate_with_vtable_p.
4845         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
4846         * class.c (copy_virtuals): Adjust.
4847         * decl2.c (mark_vtable_entries): Adjust.
4848         * method.c (make_thunk, build_vtable_entry): Adjust.
4849         * class.c (update_vtable_entry_for_fn): Only look as far as the
4850         first defining class.
4851         (build_vtbl_initializer): Put nothing in the slot for a function only
4852         defined in a lost primary virtual base.
4853         (add_vcall_offset_vtbl_entries_1): Use the same code for
4854         the lost primary case and the normal case.
4855         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
4856         (get_vfield_offset, get_derived_offset): Lose.
4857         (dfs_find_final_overrider): Use look_for_overrides_here.
4858         (get_matching_virtual): New fn.
4859         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
4860         not BV_VCALL_INDEX.
4861         * search.c (look_for_overrides_here): Split out from...
4862         (look_for_overrides_r): Here.
4863
4864         * class.c (find_final_overrider): Return error_mark_node on error.
4865
4866         * decl2.c (key_method): #if 0 accidental change.
4867
4868 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4869
4870         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
4871         (build_over_call): Likewise.
4872         * decl.c (grokparms): Likewise.
4873         * pt.c (tsubst_decl): Likewise.
4874         * typeck.c (convert_arguments): Likewise.
4875
4876 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
4877
4878         * semantics.c (begin_class_definition): Robustify.
4879
4880         * pt.c (instantiate_decl): Tell the repository code about the
4881         clones, not the cloned functions.
4882         * repo.c (repo_template_used): Explicitly instantiate the cloned
4883         function, not the clones.
4884
4885 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
4886
4887         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
4888         ICS_BAD_FLAG on created conversion.
4889         (compare_ics): Break out rank.
4890
4891 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
4892
4893         * decl.c (xref_tag): Remove extraneous %s on dependent name
4894         lookup warning.
4895
4896 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
4897
4898         * class.c (layout_vtable_decl): Fix off by one error on
4899         build_index_type.
4900         (build_vtt): Likewise.
4901         (build_ctor_vtbl_group): Likewise.
4902
4903 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
4904
4905         * class.c (maybe_indent_hierarchy): New function.
4906         (dump_class_hierarchy_r): Add flags. Dump extra binfo
4907         information, if enabled. Use maybe_indent_hierarchy. Adjust
4908         output format.
4909         (dump_class_hierarchy): Adjust prototype. Adjust output format.
4910         (dump_array, dump_vtable, dump_vtt): New functions.
4911         (finish_struct_1): Adjust hierarchy dumping.
4912         (initialize_vtable): Call dump_vtable.
4913         (build_vtt): Call dump_vtt.
4914         (build_ctor_vtbl_group): Call dump_vtable.
4915         * decl2.c (flag_dump_class_layout): Remove.
4916         (cxx_decode_option): Remove dump translation unit
4917         and dump class hierarchy check. Call dump_switch_p.
4918         (finish_file): Adjust dumping.
4919         (dump.c): Only dump base classes if not TDF_SLIM.
4920         Only dump namespace members if not TDF_SLIM.
4921         * optimize.c (dump_function): New function.
4922         (optimize_function): Call dump_function.
4923         * semantics.c (expand_body): Use dump_enabled_p.
4924
4925 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
4926
4927         PR g++/2936
4928         Part missed from first commit
4929         * decl2.c (finish_anon_union): Copy context.
4930
4931 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
4932
4933         PR g++/2936
4934         * optimize.c (remap_decl): Remap anonymous aggregate members too.
4935
4936 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
4937
4938         PR g++/2823
4939         * semantics.c (expand_body): Don't optimize thunks.
4940
4941 2001-05-25  Sam TH  <sam@uchicago.edu>
4942
4943         * cp-tree.h lex.h: Fix header include guards.
4944
4945 2001-05-25  Mark Mitchell <mark@codesourcery.com>
4946
4947         * decl.c (init_decl_processing): Tweak.
4948
4949 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
4950
4951         * decl.c (duplicate_decls): Tidy.
4952         (init_decl_processing): Always set flag_no_builtin.
4953
4954 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
4955
4956         PR c++/2184
4957         * decl2.c (do_local_using_decl): Push the decls, even in a
4958         template.
4959
4960 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
4961
4962         * optimize.c (initialize_inlined_parameters): Don't set
4963         TREE_READONLY for a VAR_DECL taking the place of an inlined
4964         PARM_DECL.
4965
4966 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
4967
4968         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
4969         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
4970         attribute.
4971
4972 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
4973
4974         * parse.y: Refer to compound literals as such, not as
4975         constructor-expressions.
4976
4977 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
4978
4979         * call.c (build_op_delete_call): Ignore exception-specifications
4980         when looking for matching delete operators.
4981         * init.c (build_new_1): Compute whether or not the allocation
4982         function used is a placement allocation function or not, and
4983         communicate this information to build_op_delete_call.
4984
4985 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
4986
4987         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
4988         (build_vtbl_ref): Adjust.
4989         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
4990         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
4991         Re-add vtable-gc.
4992         (unsupported_options): Correspondingly.
4993
4994         * decl2.c (maybe_make_one_only): Check flag_weak, not
4995         supports_one_only().
4996
4997         * cp-tree.def (START_CATCH_STMT): Lose.
4998         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
4999         * tree.c (cp_statement_code_p): Don't case it.
5000         * semantics.c (cp_expand_stmt): Likewise.
5001         * cp-tree.h (START_CATCH_TYPE): Lose.
5002         (HANDLER_TYPE): New.
5003         * except.c (expand_start_catch_block): Don't start any blocks.
5004         Return the type.
5005         (expand_end_catch_block): Don't end any blocks.
5006         * parse.y (handler): Don't pass anything from finish_handler_parms
5007         to finish_handler.
5008         * pt.c (tsubst_expr): Likewise.
5009         * semantics.c (begin_handler): Call note_level_for_catch here.
5010         (finish_handler_parms): Don't return anything.
5011         (genrtl_catch_block, begin_catch_block): Lose.
5012         (genrtl_handler): Call expand_start_catch here.
5013
5014 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
5015
5016         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
5017         (get_vtable_decl, build_vtt): Not here.
5018
5019 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
5020
5021         PR c++/2781
5022         * optimize.c (update_cloned_parm): Copy addressability and other
5023         flags.
5024
5025 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5026
5027         * pt.c (determine_specialization): Ignore artificial functions.
5028
5029 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5030
5031         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
5032         (C_RID_CODE): Remove.
5033         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
5034         (init_parse): Don't do it here.
5035
5036 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
5037
5038         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
5039         function declaration to avoid stripping the symbol's attributes.
5040
5041 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
5042
5043         * decl.c (pushdecl): Adjust error string.
5044         (xref_tag): Adjust friend class injection warning. Remove the
5045         inherited name from the class shadowed scope.
5046
5047 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
5048
5049         * except.c (cp_protect_cleanup_actions): New function.
5050         (init_exception_processing): Don't set protect_cleanup_actions
5051         here.  Do set lang_protect_cleanup_actions.
5052
5053 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
5054
5055         * spew.c (read_token): Call yyerror on all unexpected tokens.
5056
5057 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
5058
5059         * init.c (member_init_ok_or_else): Take a tree rather than
5060         string for name.
5061         (expand_member_init): Adjust.
5062
5063 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
5064
5065         * decl.c (duplicate_decls): Suppress warning about duplicate
5066         decls if the first decl is a friend.
5067
5068 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
5069
5070         * except.c (choose_personality_routine): Export.  Add
5071         explanatory comment.  Take an enum languages, not a boolean.
5072         (initialize_handler_parm): Adjust to match.
5073         * cp-tree.h: Prototype choose_personality_routine.
5074         * lex.c (handle_pragma_java_exceptions): New function.
5075         (init_cp_pragma): Register #pragma GCC java_exceptions.
5076
5077 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
5078
5079         * method.c (build_mangled_C99_name): Remove unused prototype.
5080
5081 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
5082
5083         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
5084         * typeck.c (get_member_function_from_ptrfunc,
5085         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
5086         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
5087
5088         Reverted Geoff Keating's 2001-05-03's patch.
5089
5090 2001-05-11  Ira Ruben   <ira@apple.com>
5091
5092         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
5093
5094 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
5095
5096         * cp-tree.h (finish_label_expr, lookup_label): Delete.
5097         * parse.y: Update for '&&'; don't issue warning here.
5098         * semantics.c (finish_label_expr): Delete.
5099
5100 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
5101
5102         * splay-tree.h (splay_tree_max): New function.
5103         (splay_tree_min): Likewise.
5104
5105 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
5106
5107         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
5108         (pfn_vflag_identifier): Define.
5109         Update comment about layout of pointer functions.
5110         (build_ptrmemfunc1): Update prototype.
5111         (expand_ptrmemfunc_cst): Update prototype.
5112         * decl.c (initialize_predefined_identifiers): Initialize
5113         pfn_vflag_identifier.
5114         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
5115         an extra field to the type.
5116         * expr.c (cplus_expand_constant): Pass 'flag' between
5117         expand_ptrmemfunc_cst and build_ptrmemfunc1.
5118         * typeck.c (get_member_function_from_ptrfunc): When
5119         FUNCTION_BOUNDARY < 16, look at additional field to determine
5120         if a pointer-to-member is a real pointer or a vtable offset.
5121         (build_ptrmemfunc1): Add new parameter to contain extra field.
5122         (build_ptrmemfunc): Pass the extra field around.
5123         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
5124         (pfn_from_ptrmemfunc): Ignore the extra field.
5125
5126 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
5127
5128         * cp-tree.h (flag_inline_trees): Update documentation.
5129         * decl.c (init_decl_processing): Adjust handling of
5130         flag_inline_functions and flag_inline_trees to support -O3.
5131         (grokfndecl): Set DECL_INLINE on all functions if that's what
5132         the user requested.
5133         (save_function_data): Clear DECL_INLINE in
5134         current_function_cannot_inline is non-NULL.
5135         * decl2.c (flag_inline_trees): Update documentation.
5136
5137 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
5138
5139         * dump.c (cp_dump_tree, USING_STMT case): New case.
5140         * tree.c (cp_statement_code_p): Add USING_STMT.
5141         * decl2.c (do_using_directive): Add the using directive statement.
5142
5143         * tree.c (walk_tree): Reformat an if block.
5144
5145 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
5146
5147         * decl.c (compute_array_index_type): Don't try to do anything with
5148         the indices when processing a template.
5149
5150 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5151
5152         * call.c: NULL_PTR -> NULL.
5153         * class.c: Likewise.
5154         * cvt.c: Likewise.
5155         * decl.c: Likewise.
5156         * decl2.c: Likewise.
5157         * except.c: Likewise.
5158         * init.c: Likewise.
5159         * rtti.c: Likewise.
5160         * search.c: Likewise.
5161         * tree.c: Likewise.
5162         * typeck.c: Likewise.
5163         * typeck2.c: Likewise.
5164
5165 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
5166
5167         * decl2.c (do_using_directive): Revert previous patch.
5168
5169 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
5170
5171         * cp-tree.def (USING_STMT): New statement node.
5172         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
5173         * decl2.c (do_using_directive): Add USING_STMT to statement
5174         tree. Don't emit errors when processing template decl.
5175         * pt.c (tsubst_expr, USING_STMT case): New case.
5176         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
5177
5178 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
5179
5180         * call.c (build_new_op): Convert args from reference here.
5181         (build_conditional_expr): Don't convert here.
5182
5183 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
5184
5185         * spew.c (last_token_id): New static variable.
5186         (read_token): Set it here.
5187         (yyerror): Use it here.
5188
5189 2001-04-30  Richard Henderson  <rth@redhat.com>
5190
5191         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
5192         * decl.c: Likewise.
5193
5194 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
5195
5196         * gxxint.texi: Remove.
5197         * Make-lang.in: Remove all traces of gxxint.texi.
5198
5199 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
5200
5201         * decl2.c (start_static_initialization_or_destruction): Correct
5202         logic to handle the -fno-use-cxa-atexit case.
5203
5204 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
5205
5206         * optimize.c (update_cloned_parm): New function.
5207         (maybe_clone_body): Use it.  Update the `this' parameter too.
5208
5209 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5210
5211         * decl2.c (unsupported_options): Add new-abi.
5212         * lang-options.h: Remove no longer supported options.
5213
5214 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
5215
5216         * except.c (can_convert_eh): Don't check template parms,
5217         typename types etc.
5218
5219 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
5220
5221         * optimize.c (maybe_clone_body): Copy parameter names and locations.
5222
5223 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
5224
5225         * cp-tree.h (adjust_clone_args): Prototype new function.
5226         * class.c (adjust_clone_args): New function.
5227         * decl.c (start_function): Call it for in charge ctors.
5228
5229 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
5230
5231         * method.c (use_thunk): Make sure that thunks really are emitted
5232         when requested.
5233
5234 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
5235
5236         * mangle.c (write_chars): New macro.
5237         (hwint_to_ascii): New function
5238         (write_number): Use it.
5239         (write_integer_cst): Deal with really big numbers.
5240
5241 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
5242
5243         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
5244         the clone.
5245
5246 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
5247
5248         * decl.c (grokdeclarator): Set context of namespace scope
5249         TYPE_DECLS.
5250
5251 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
5252
5253         * cp/optimize.c: Include hashtab.h.
5254         (struct inline_data): Add tree_pruner.
5255         (expand_call_inline, expand_calls_inline): Use it when calling
5256         walk_tree.
5257         (optimize_function): Initialize and free tree_pruner.
5258
5259 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
5260
5261         Lazy __FUNCTION__ generation.
5262         * cp-tree.def (FUNCTION_NAME): Remove.
5263         * cp-tree.h (function_name_declared_p): Remove.
5264         (cp_fname_init): Prototype.
5265         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
5266         don't call declare_function_name. Call start_fname_decls.
5267         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
5268         clobber the line number.
5269         (cp_fname_init): New function.
5270         (start_function): Call start_fname_decls.
5271         (finish_function): Call finish_fname_decls.
5272         * lex.c (reswords): Add slots for __FUNCTION__ et al.
5273         (rid_to_yy): Add mappings for __FUNCTION__ et al.
5274         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
5275         * parse.y (VAR_FUNC_NAME): New token.
5276         (primary): Add VAR_FUNC_NAME.
5277         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
5278         generation.
5279         (tsubst, FUNCTION_NAME case): Remove.
5280         (tsubst_copy, FUNCTION_NAME case): Remove.
5281         (tsubst_expr, DECL_STMT case): Be careful with a
5282         DECL_PRETTY_FUNCTION_P.
5283         (instantiate_decl): Remove function_name_declared_p.
5284         * semantics.c (begin_compound_statement): Don't call
5285         declare_function_name here.
5286         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
5287         (finish_translation_unit): Call finish_fname_decls.
5288         (expand_body): Remove function_name_declared_p.
5289         * typeck2.c (digest_init): Allow any ERROR_MARK.
5290
5291 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
5292
5293         * pt.c (tsubst_decl): Use VOID_TYPE_P.
5294         * semantics.c: Fix some typos.
5295
5296 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
5297
5298         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
5299
5300 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5301
5302         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
5303
5304 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
5305
5306         * except.c (build_throw): Wrap the initialization of the exception
5307         object in a MUST_NOT_THROW_EXPR.
5308         (do_free_exception): #if 0.
5309
5310 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
5311
5312         * cp-tree.h (finish_enum): Change prototype.
5313         * decl.c (finish_enum): Reorganize.
5314         * parse.y (structsp): Adjust calls to finish_enum.
5315
5316 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
5317
5318         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
5319         't' case.
5320
5321 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
5322
5323         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
5324         (layout_empty_base): Return at end flag.
5325         (build_base_field): Likewise.
5326         (build_base_fields): Likewise.
5327         (layout_virtual_bases): Don't add 1 to eoc value.
5328         (end_of_class): Use full size for empty bases.
5329         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
5330         empty bases. Don't add 1 to eoc value. Only add trailing padding
5331         if we're an empty class with no empty bases.
5332         (dump_class_hierarchy): Dump size and alignment.
5333
5334 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
5335
5336         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
5337         ICS_BAD_FLAG.
5338
5339 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
5340
5341         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
5342         is found, look first if name does not match the structure name.
5343
5344 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
5345
5346         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
5347         set.
5348         (SET_DECL_LANGUAGE): New macro.
5349         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
5350         (pushdecl): Likewise.
5351         (build_library_fn_1): Likewise.
5352         (build_cp_library_fn): Likewise.
5353         (grokfndecl): Likewise.
5354         (grokvardecl): Mark `extern "C"' variables as having C linkage.
5355         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
5356         * lex.c (retrofit_lang_decl): Likewise.
5357         * mangle.c (mangle_decl_string): Don't mangle the names of
5358         variables declared with C language linkage.
5359         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
5360
5361 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5362
5363         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
5364         flag_access_control from uninitialized storage.
5365
5366 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
5367
5368         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
5369         * mangle.c (write_pointer_to_member_type): Fix mangling of
5370         pointers to cv-qualified member function types.
5371
5372         * init.c (build_delete): Create a SAVE_EXPR for the address if
5373         we're going to use it more than once.
5374
5375 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
5376
5377         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
5378         (expand_ptremfunc_cst): Change prototype.
5379         (delta2_from_ptrmemfunc): Remove.
5380         * expr.c (cplus_expand_constant): Adjust call to
5381         expand_ptrmemfunc_cst.
5382         * typeck.c (build_ptrmemfunc1): Simplify.
5383         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
5384         results in a constant.
5385         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
5386         (delta2_from_ptrmemfunc): Remove.
5387         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
5388
5389 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
5390
5391         * cp-tree.h (decl_namespace_list): New macro.
5392         (struct saved_scope): Add decl_ns_list.
5393         * decl.c (mark_saved_scope): Mark it.
5394         * decl2.c: Lose static decl_namespace_list.
5395         (init_decl2): Don't save it.
5396
5397 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5398
5399         * cp-tree.h (warn_return_type, yylex): Delete redundant
5400         declarations.
5401
5402         * decl.c (current_class_depth, global_namespace): Likewise.
5403
5404         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
5405
5406         * repo.c (flag_use_repository): Likewise.
5407
5408 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5409
5410         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
5411         set_block, pushdecl, getdecls, gettags, init_decl_processing,
5412         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
5413         lvalue_or_else, print_lang_statistics, comp_target_types,
5414         unsigned_type, signed_type, signed_or_unsigned_type,
5415         build_function_call, mark_addressable, incomplete_type_error):
5416         Delete redundant declarations.
5417
5418 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
5419
5420         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
5421         (TYPE_ANONYMOUS_P): New macro.
5422         (TAGGED_TYPE_P): New macro.
5423         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
5424         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
5425         * tree.c (no_linkage_helper): Likewise.
5426         * semantics.c (begin_class_definition): Likewise.
5427         * pt.c (convert_template_argument): Likewise.
5428         * lex.c (check_for_missing_semicolon): Likewise.
5429
5430 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
5431
5432         * class.c (dfs_unshared_virtual_bases): New function.
5433         (mark_primary_bases): Call it.
5434         (check_bases): Ignore virtual bases when determining
5435         nearly-emptiness.
5436
5437 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
5438
5439         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
5440
5441 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
5442
5443         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
5444         cloned function to the clone.
5445
5446 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5447
5448         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
5449
5450         * semantics.c: Include expr.h.
5451
5452 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
5453
5454         * method.c (implicitly_declare_fn): Commonize code for copy ctor
5455         and assignment op. Set TREE_USED for parameter.
5456
5457 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
5458
5459         * class.c (find_final_overrider_data): Add `candidates'.
5460         (dfs_find_final_overrider): Don't issue error messages
5461         prematurely.
5462         (find_final_overrider): Issue error messages here.
5463         (build_base_field): Don't warn about amgibuous direct bases here.
5464         (warn_about_ambiguous_direct_bases): New function.
5465         (layout_class_type): Use it.
5466
5467 2001-04-10  Richard Henderson  <rth@redhat.com>
5468
5469         * typeck.c (build_array_ref): Push the array reference inside
5470         COMPOUND_EXPR and COND_EXPR.
5471
5472 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
5473
5474         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
5475         * decl.c (duplicate_decls): Adjust accordingly.
5476         (maybe_commonize_var): Likewise.
5477         (grokfndecl): Likewise.
5478         (start_function): Likewise.
5479         (start_method): Likewise.
5480         * decl2.c (key_method): Likewise.
5481         (import_export_decl): Likewise.
5482         * method.c (implicitly_declare_fn): Likewise.
5483         * optimize.c (maybe_clone_body): Likewise.
5484
5485 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
5486
5487         * lang-specs.h: Add __DEPRECATED.
5488
5489 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
5490
5491         * search.c (get_dynamic_cast_base_type): When building a new
5492         constant, set its type to ssizetype.
5493
5494 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
5495
5496         * optimize.c (expand_call_inline): Only add newly inlined statements
5497         into inlined_stmts.
5498
5499 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
5500
5501         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
5502         (OPERATOR_FORMAT): Likewise.
5503         (OPERATOR_TYPENAME_FORMAT): Likewise.
5504         * operators.def: Remove old name-mangling information.
5505         * decl.c (grok_op_properties): Adjust accordingly.
5506         * lex.c (init_operators): Likewise.
5507         * rtti.c (get_tinfo_decl): Issue error messages about types that
5508         have variable size.
5509
5510 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
5511
5512         * decl2.c (import_export_decl): Don't call import_export_class
5513         when processing an inline member function.
5514         * semantics.c (expand_body): Call import_export_decl before
5515         emitting inline functions.
5516
5517 2001-03-28  Richard Henderson  <rth@redhat.com>
5518
5519         IA-64 ABI Exception Handling:
5520         * cp-tree.def (EH_SPEC_BLOCK): New.
5521         (MUST_NOT_THROW_EXPR): New.
5522         * cp-tree.h: Update changed function declarations.
5523         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
5524         (CPTI_CALL_UNEXPECTED): New.
5525         (struct cp_language_function): Rename x_eh_spec_try_block
5526         to x_eh_spec_block.
5527         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
5528         * decl.c (current_binding_level): If no current function
5529         bindings, revert to scope_chain.
5530         (initialize_predefined_identifiers): Remove __cp_push_exception.
5531         (store_parm_decls): Use begin_eh_spec_block.
5532         (finish_function): Use finish_eh_spec_block.
5533         (mark_lang_function): Update for name changes.
5534         * decl2.c (finish_file): No mark_all_runtime_matches.
5535         * dump.c (cp_dump_tree): Handle new tree codes.
5536         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
5537         * except.c (catch_language_init, catch_language): Remove.
5538         (init_exception_processing): Don't set language code.
5539         Initialize call_unexpected_node, protect_cleanup_actions,
5540         eh_personality_libfunc, lang_eh_runtime_type.
5541         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
5542         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
5543         (prepare_eh_type): Split out type canonicalizations ...
5544         (build_eh_type_type): ... from here.
5545         (build_eh_type_type_ref): Remove.
5546         (mark_all_runtime_matches): Remove.
5547         (build_exc_ptr): New.
5548         (do_begin_catch, do_end_catch): New.
5549         (do_pop_exception): Remove.
5550         (build_terminate_handler): Remove.
5551         (choose_personality_routine): Split out language choice from ...
5552         (initialize_handler_parm): ... here.
5553         Use MUST_NOT_THROW_EXPR.
5554         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
5555         exception object handling.
5556         (expand_start_eh_spec, expand_end_eh_spec): Remove.
5557         (expand_exception_blocks, alloc_eh_object): Remove.
5558         (begin_eh_spec_block, finish_eh_spec_block): New.
5559         (do_allocate_exception, do_free_exception): New.
5560         (expand_throw): Merge into ...
5561         (build_throw): ... here.  Update for abi.
5562         * expr.c (cplus_expand_expr): No expand_internal_throw.
5563         Handle MUST_NOT_THROW_EXPR.
5564         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
5565         * semantics.c (*) Update for except.h name changes.
5566         (genrtl_try_block): No protect_with_terminate.
5567         (genrtl_eh_spec_block): New.
5568         (genrtl_handler): Don't emit the goto here.
5569         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
5570         (genrtl_finish_function): Don't expand_exception_blocks.
5571         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
5572
5573 2001-03-28  Richard Henderson  <rth@redhat.com>
5574
5575         * decl.c (struct named_label_list): Rename eh_region to
5576         in_try_scope, add in_catch_scope.
5577         (struct binding_level): Rename eh_region to is_try_scope,
5578         add is_catch_scope.
5579         (note_level_for_try): Rename from note_level_for_eh.
5580         (note_level_for_catch): New.
5581         (poplevel): Copy both is_try_scope and is_catch_scope to
5582         the named_label_list struct.
5583         (check_previous_goto_1): Don't check for catch block via
5584         DECL_ARTIFICIAL; use in_try_scope instead.
5585         (check_goto): Likewise.
5586         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
5587         * except.c (expand_start_catch_block): Call note_level_for_catch.
5588         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
5589
5590 2001-03-27  Richard Henderson  <rth@redhat.com>
5591
5592         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
5593         exceptions_via_longjmp.
5594
5595 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
5596
5597         * pt.c (check_default_tmpl_args):  Make error messages clearer.
5598
5599 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
5600
5601         * error.c:  Also undefine 'A' macro used for cp_printers definition.
5602
5603 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5604
5605         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
5606
5607 2001-03-26  Mike Yang <yang@research.att.com>
5608             Mark Mitchell  <mark@codesourcery.com>
5609
5610         * dump.c (dump_access): New function.
5611         (cp_dump_tree): Use it.  Dump basetype information for class
5612         types.
5613
5614 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
5615
5616         * Makefile.in (optimize.o): Depend on params.h.
5617         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
5618         (init_decl_processing): Set flag_no_inline when doing
5619         inlining-on-trees.
5620         * optimize.c: Include params.h.
5621         (struct inline_data): Improve documentation of FNS.  Add
5622         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
5623         (INSNS_PER_STMT): New macro.
5624         (remap_block): Use CLONING_P.
5625         (inlinable_function_p): Don't inline big functions.
5626         (expand_call_inline): Keep track of how much inlining we've done.
5627         (optimize_function): Set FIRST_INLINED_FN.
5628         (maybe_clone_body): Set CLONING_P.
5629         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
5630         tree nodes.
5631         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
5632         rest_of_compilation.  Clear DECL_RTL for local variables
5633         afterwards.
5634         (clear_decl_rtl): New function.
5635
5636 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
5637
5638         Implement DR 209
5639         * cp-tree.h (skip_type_access_control,
5640         reset_type_access_control): Prototype.
5641         * decl.c (grokdeclarator): Access of friends is not checked.
5642         * parse.y (component_decl_list): Reset type access control.
5643         * semantics.c (decl_type_access_control): Clear
5644         current_type_lookups.
5645         (save_type_access_control): Don't save if not deferring.
5646         (skip_type_access_control, reset_type_access_control): New
5647         functions.
5648         (begin_class_definition): Do type access control for basetypes.
5649         Start deferred access control.
5650         (finish_class_definition): Resume immediate access control if
5651         this is a local class.
5652
5653 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5654
5655         * class.c (add_method): Use memcpy/memmove, not bcopy.
5656
5657         * decl.c (duplicate_decls): Likewise.
5658
5659 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
5660
5661         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
5662         not `_'.
5663
5664 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
5665
5666         * decl.c (local_names): Define.
5667         (push_local_name): New.
5668         (grok_reference_init): Return init if initializing static reference
5669         variable with non-constant instead of emitting it.
5670         Move expand_static_init call to cp_finish_decl.
5671         (layout_var_decl): Call push_local_name.
5672         (maybe_commonize_var): Allow inlining functions even if they have
5673         static local variables, use comdat_linkage for them if flag_weak.
5674         (check_initializer): Call obscure_complex_init if
5675         grok_reference_init returned nonzero.
5676         (save_function_data): Clear x_local_names.
5677         (pop_cp_function_context): Free x_local_names.
5678         (mark_inlined_fns): Remove.
5679         (mark_lang_function): Mark x_local_names.
5680         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
5681         Mark inlined_fns as tree, remove call to mark_inlined_fns.
5682         * class.c (alter_access): Ensure DECL_ACCESS is never set if
5683         DECL_DISCRIMINATOR_P.
5684         * cp-tree.h (cp_language_function): Add x_local_names.
5685         (lang_decl_flags): Add discriminator into u2.
5686         (lang_decl_inlined_fns): Remove.
5687         (lang_decl): inlined_fns is now a TREE_VEC.
5688         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
5689         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
5690         TREE_VEC, not a custom structure.
5691         (optimize_function): Likewise.
5692         * mangle.c (discriminator_for_local_entity): Discriminate among
5693         VAR_DECL local entities.
5694         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
5695         is not valid.
5696
5697 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
5698
5699         Add support for Java interface method calls.
5700         * cp-tree.h (struct lang_type): Add java_interface flag.
5701         (TYPE_JAVA_INTERFACE): New macro.
5702         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
5703         by setting TYPE_JAVA_INTERFACE.
5704         * call.c (java_iface_lookup_fn): New static.
5705         (build_over_call): If calling a method declared in a
5706         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
5707         expression which resolves the function address.
5708         (build_java_interface_fn_ref): New function.
5709
5710 2001-03-22  Richard Henderson  <rth@redhat.com>
5711
5712         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
5713         * except.c: Don't include it.
5714
5715 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
5716             based on an idea from Joe Buck <jbuck@synopsys.com>
5717
5718         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
5719         New nonterminals.
5720         (data_def, component_decl): Add reductions to bad_decl.
5721
5722 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
5723
5724         * method.c (do_build_assign_ref): Don't use build_modify_expr for
5725         anonymous aggregates, since they don't have assignment operator
5726         method.
5727         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
5728         assignment operators for anonymous structure fields.
5729
5730 2001-03-21  Jason Merrill  <jason@redhat.com>
5731
5732         * pt.c (instantiate_decl): Abort if we see a member constant
5733         instantiation that doesn't already have its initializer.
5734         Downgrade explicit instantiation without definition to pedwarn.
5735
5736         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
5737         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
5738         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
5739
5740         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
5741         (pending_vtables): Remove.
5742         * decl2.c (pending_vtables): Remove.
5743         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
5744         CLASSTYPE_VTABLE_NEEDS_WRITING.
5745         (import_export_class): Likewise.
5746         (init_decl2): Don't mark pending_vtables.
5747         * lex.c (handle_pragma_vtable): Just sorry.
5748         * pt.c (instantiate_class_template): Don't mess with
5749         CLASSTYPE_VTABLE_NEEDS_WRITING.
5750         (mark_class_instantiated): Likewise.
5751         * ptree.c (print_lang_type): Don't print it.
5752         * semantics.c (begin_class_definition): Don't set it.
5753
5754         * pt.c (template_tail): Replace with last_pending_template.
5755         (maybe_templates, maybe_template_tail): Remove.
5756         (add_pending_template): Adjust.
5757         (instantiate_pending_templates): Adjust.
5758
5759         * cp-tree.h (struct saved_scope): Remove lang_stack field.
5760         (current_lang_stack): Remove.
5761         * decl.c (maybe_push_to_top_level): Don't initialize it.
5762         (duplicate_decls): Use current_lang_depth.
5763         (xref_basetypes): Likewise.
5764         * class.c (current_lang_depth): New fn.
5765         (push_lang_context): Use more varray functionality.
5766         (pop_lang_context): Likewise.
5767
5768         * error.c (GLOBAL_THING): Always use '__'.
5769
5770 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
5771
5772         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
5773
5774         * mangle.c (mangle_decl_string): Mangle the names of overloaded
5775         operators, even when they have `extern "C"' linkage.
5776
5777 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
5778
5779         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
5780         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
5781         where it's not necessary.
5782         (add_method): Remove optimization involving comparison of
5783         DECL_ASSEMBLER_NAME.
5784         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
5785         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
5786         where it's not necessary.
5787         (check_methods): Likewise.
5788         (build_clone): Likewise.
5789         (built_vtt): Likewise.
5790         * cp-tree.h (DECL_NEEDED_P): Likewise.
5791         * decl.c (pushtag): Likewise.
5792         (duplicate_decls): Likewise.
5793         (pushdecl): Likewise.
5794         (builtin_function): Likewise.
5795         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
5796         (build_cp_library_fn): Likewise.
5797         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
5798         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
5799         where it's not necessary.
5800         (make_rtl_for_nonlocal_decl): Likewise.
5801         (cp_finish_decl): Likewise.
5802         (grokfndecl): Likewise.
5803         (grokvardecl): Likewise.
5804         (grokdeclarator): Likewise.
5805         (start_function): Likewise.
5806         (cp_missing_return_ok_p): Likewise.
5807         * decl2.c (grokclassfn): Likewise.
5808         (check_classfn): Likewise.
5809         (finish_static_data_member_decl): Likewise.
5810         (grokfield): Likewise.
5811         * error.c (GLOBAL_IORD_P): Remove.
5812         (dump_global_iord): Improve output.
5813         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
5814         * except.c (nothrow_libfn_p): Summarily reject any function not in
5815         namespace-scope.
5816         * init.c (build_java_class_ref): Don't explicitly set
5817         DECL_ASSEMBLER_NAME after calling mangle_decl.
5818         * mangle.c (mangle_decl_string): Handle extern "C" functions.
5819         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
5820         * method.c (set_mangled_name_for_decl): Don't explicitly set
5821         DECL_ASSEMBLER_NAME after calling mangle_decl.
5822         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
5823         IDENTIFIER_GLOBAL_VALUE for the thunk.
5824         * pt.c (set_mangled_name_for_template_decl): Remove.
5825         (check_explicit_specialization): Don't use it.
5826         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
5827         (tsubst_friend_function): Likewise.
5828         (tsubst_decl): Likewise.
5829         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
5830         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
5831         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
5832         where it's not necessary.
5833         (tinfo_base_init): Likewise.
5834         (create_real_tinfo_var): Likewise.
5835         * search.c (looup_field_1): Likewise.
5836         * semantics.c (finish_named_return_value): Likewise.
5837         * tree.c (init_tree): Set lang_set_decl_assembler_name.
5838
5839 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
5840
5841         Correct semantics restrictions checking in throw-expression.
5842         * except.c (is_admissible_throw_operand): New function.
5843         (build_throw): Use it.
5844
5845 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
5846
5847         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
5848         and its ilk.
5849
5850 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
5851
5852         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5853         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
5854         * decl.c (duplicate_decls): Likewise.
5855         (builtin_function): Likewise.
5856         (build_library_fn): Likewise.
5857         (build_cp_library_fn): Likewise.
5858         (check_initializer): Likewise.
5859         (cp_finish_decl): Likewise.
5860         * decl2.c (grokfield): Likewise.
5861         (grok_function_init): Remove #if 0'd code.
5862         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5863         * friend.c (do_friend): Likewise.
5864         * init.c (get_temp_regvar): Likewise.
5865         * method.c (make_thunk): Likewise.
5866         * pt.c (tsubst_friend_function): Likewise.
5867         (tsubst_decl): Likewise.
5868         (regenerate_decl_from_template): Likewise.
5869         * semantics.c (genrtl_named_return_value): Likewise.
5870         (expand_body): Likewise.
5871         (genrtl_finish_function): Likewise.
5872         * tree.c (cp_tree_equal): Likewise.
5873
5874 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
5875
5876         * call.c (convert_like_real): Add extra semantics to INNER
5877         parameter. Don't convert to temporary if a user conversion
5878         gives us an lvalue that we're about to bind to a reference.
5879         Set INNER to indicate pending reference binding on recursive
5880         calls.
5881
5882 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
5883
5884         * cp/lex.c: Delete duplicate pending_lang_change.
5885
5886 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
5887
5888         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
5889         Similarly.
5890         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
5891         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
5892
5893 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
5894
5895         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
5896
5897 2001-03-08  Stan Shebs  <shebs@apple.com>
5898
5899         * cp-tree.h (set_identifier_local_value): Remove unused decl.
5900
5901 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
5902
5903         * spew.c: Remove references to CPP_OSTRING.
5904
5905 2001-03-06  Andrew Haley  <aph@redhat.com>
5906
5907         * typeck.c (convert_arguments): Check that we have an fndecl.
5908
5909 2001-03-05  Andrew Haley  <aph@redhat.com>
5910
5911         * typeck.c (convert_arguments): Don't do ellipsis conversion for
5912         __built_in_constant_p.
5913
5914 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5915
5916         * typeck.c (build_static_cast): Allow enum to enum conversions
5917         as per DR 128.
5918
5919 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5920
5921         * class.c (check_field_decls): Pointers to member do not a
5922         non-pod struct make, as per DR 148.
5923
5924 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5925
5926         * call.c (joust): cp_pedwarn when using gnu extension concerning
5927         worst conversion sequences.
5928
5929 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5930
5931         * decl.c: Replace all uses of 'boolean' with 'bool'.
5932
5933 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5934
5935         * lang-specs.h: Add zero initializer for cpp_spec field to
5936         all array elements that need one.  Don't put an #ifdef inside
5937         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
5938         use it.
5939
5940 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
5941
5942         Implement using decls inside template functions.
5943         * decl2.c (validate_nonmember_using_decl): Don't special case
5944         fake_std_node in the global namespace. Don't reject early when
5945         processing a template.
5946         (do_local_using_decl): Add to statement tree. Don't do further
5947         processing when building a template.
5948         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
5949
5950 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
5951
5952         * decl2.c (do_nonmember_using_decl): Don't complain if we find
5953         same function. Do complain about ambiguating extern "C"
5954         declarations.
5955
5956 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
5957
5958         Remove floating point and complex type template constant parms.
5959         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
5960         COMPLEX_TYPE extensions.
5961         (invalid_nontype_parm_type_p): Likewise.
5962
5963 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
5964
5965         * except.c (call_eh_info): Revert "match_function"'s type.
5966
5967 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
5968
5969         Fix ctor vtable vcall offsets.
5970         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
5971         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
5972         (get_matching_base): Remove.
5973         (get_original_base): New function.
5974         (build_vtbl_initializer): Initialize vid.rtti_binfo.
5975         Use a virtual thunk for a ctor vtable with an index
5976         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
5977         primary base within a constructor vtable. Only set
5978         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
5979         when primary base has been lost.
5980         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
5981
5982 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
5983
5984         * call.c (joust): Ensure more_specialized()'s argument length
5985         parameter has correct value for constructors.
5986
5987 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
5988
5989         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
5990
5991         * decl.c (mark_inlined_fns): Prototype.
5992
5993 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
5994
5995         * spew.c (yylex): Correct handling of friends.
5996
5997 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
5998
5999         * mangle.c (write_encoding): Pass write_function_type the
6000         FUNCTION_DECL for the function being encoded.
6001         (write_function_type): Pass it along to write_bare_function_type.
6002         (write_bare_function_type): Pass it along to write_method_parms.
6003         (write_method_parms): Don't mangle the compiler-generated
6004         parameters to a constructor or destructor.
6005
6006 2001-02-22  Andreas Jaeger  <aj@suse.de>
6007
6008         * optimize.c: Include toplev.h for
6009         note_deferral_of_defined_inline_function prototype.
6010
6011 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
6012
6013         * cp-tree.h (struct lang_decl_inlined_fns): New.
6014         (struct lang_decls): Add inlined_fns.
6015         (DECL_INLINED_FNS): New macro.
6016         * optimize.c (struct inline_data): Add inlined_fns.
6017         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
6018         (inlinable_function_p): Likewise, fix typo in comment,
6019         function is not inlinable if it already inlined function currently
6020         being optimized.
6021         (expand_call_inline): Add fn to inlined_fns if necessary.
6022         (optimize_function): Initialize inlined_fns.
6023         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
6024         * decl.c (mark_inlined_fns): New function.
6025         (lang_mark_tree): Call it.
6026
6027 2001-02-21  Jason Merrill  <jason@redhat.com>
6028
6029         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
6030         (DECL_UNINLINABLE): Move to middle-end.
6031
6032         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
6033         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
6034         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
6035         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
6036         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
6037
6038         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
6039         second parm of op=.
6040
6041 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
6042
6043         * decl2.c (set_decl_namespace): Allow explicit instantiations in
6044         any namespace.
6045
6046 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6047
6048         * optimize.c (expand_call_inline): Don't walk subtrees of type
6049         nodes.
6050
6051 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
6052
6053         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
6054         for a destructor.
6055
6056 2001-02-18  Jason Merrill  <jason@redhat.com>
6057
6058         Do put the VTT parameter in DECL_ARGUMENTS.
6059         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
6060         (current_vtt_parm): New macro.
6061         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
6062         (DECL_HAS_VTT_PARM_P): New macro.
6063         (DECL_VTT_PARM): Remove.
6064         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
6065         * decl.c (duplicate_decls): Only copy the operator code if
6066         appropriate.
6067         (start_function): Set current_vtt_parm.
6068         (lang_mark_tree): Don't mark vtt_parm.
6069         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
6070         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
6071         * class.c (build_clone): Maybe remove the VTT parm.
6072         * optimize.c (maybe_clone_body): Set up the VTT parm.
6073         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
6074         * call.c (build_over_call): Just allow the VTT arg.
6075         * method.c (make_thunk): Don't set DECL_VTT_PARM.
6076         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
6077         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
6078         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
6079         * error.c (dump_function_decl): Likewise.
6080         * call.c (build_user_type_conversion_1, convert_like_real): Abort
6081         if we try to call a constructor with in-charge or VTT parms.
6082         * method.c (skip_artificial_parms_for): New fn.
6083         * call.c (add_function_candidate, build_over_call): Call it.
6084         * call.c (build_new_method_call): Use current_vtt_parm.
6085         * init.c (expand_virtual_init): Likewise.
6086         * class.c (same_signature_p): No longer static.
6087         * cp-tree.h: Declare it.
6088         * search.c (look_for_overrides_r): Use it.
6089
6090 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
6091
6092         * cp-tree.h (new_abi_rtti_p): Remove.
6093         (name_mangling_version): Likewise.
6094         (flag_do_squangling): Likewise.
6095         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
6096         * decl.c (grokfndecl): Likewise.
6097         * decl2.c (name_mangling_version): Remove.
6098         (flag_do_squangling): Likewise.
6099         (lang_f_options): Remove `squangle'.
6100         (unsupported_options): Add `squangle'.
6101         (cxx_decode_option): Issue a warning about uses of
6102         -fname-mangling-version.
6103         (finish_file): Remove old ABI support.
6104         * pt.c (check_explicit_specialization): Likewise.
6105         (tsubst_decl): Likewise.
6106         * rtti.c (init_rtti_processing): Likewise.
6107         (build_headof): Likewise.
6108         (get_tinfo_decl_dynamic): Likewise.
6109         (tinfo_from_decl): Likewise.
6110         (build_dynamic_cast_1): Likewise.
6111         (synthesize_tinfo_var): Likewise.
6112         * init.c (build_new): Allow enumeration types for the array-bounds
6113         in a direct-new-declarator.
6114
6115         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
6116
6117         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
6118         TREE_PROTECTED from the template being specialized.
6119
6120 2001-02-17  Jason Merrill  <jason@redhat.com>
6121
6122         * decl2.c (build_artificial_parm): Set TREE_READONLY.
6123
6124         * decl.c (bad_specifiers): Allow throw specs on things with
6125         pointer-to-function or -member-function type.
6126         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
6127         a pmf.
6128
6129 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
6130
6131         * call.c (check_dtor_name): Handle template names correctly.
6132
6133 2001-02-16  Jason Merrill  <jason@redhat.com>
6134
6135         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
6136         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
6137         * optimize.c (maybe_clone_body): Don't substitute it.
6138         * call.c (build_new_method_call): Check in_chrg instead.
6139         * init.c (expand_virtual_init): Likewise.
6140
6141 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
6142
6143         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
6144         class-type introduces at least a type-name.
6145
6146 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
6147
6148         * call.c (convert_like_real): Create a temporary for non-lvalue.
6149
6150 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
6151
6152         * cp-tree.h: Fix typos in comments.
6153
6154 2001-02-16  Jason Merrill  <jason@redhat.com>
6155
6156         * optimize.c (remap_block): If we're compiling a clone, pass the
6157         new block to insert_block.
6158
6159 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
6160
6161         * semantics.c (finish_asm_stmt): Robustify.
6162
6163 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
6164
6165         * pt.c (push_template_decl_real): Don't remangle the name of a
6166         class template.
6167
6168 2001-02-15  Jim Meyering  <meyering@lucent.com>
6169
6170         * Make-lang.in (c++.install-common): Depend on installdirs.
6171         (c++.install-info): Likewise.
6172         (c++.install-man): Likewise.
6173
6174 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
6175
6176         * typeck2.c (build_m_component_ref): Robustify.
6177
6178 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
6179
6180         * friend.c (do_friend): Don't take the nested [template] class
6181         into account when deciding whether to warn about the friend
6182         function not referring to a template function.
6183
6184 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
6185
6186         * typeck.c (build_unary_op): Clarify error message.
6187
6188 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
6189
6190         * parse.y (component_constructor_declarator): allow optional
6191         parentheses around constructor class name.
6192
6193 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
6194
6195         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
6196         section.
6197         * init.c (emit_base_init): Remove incorrect comment about
6198         virtual bases.
6199         * method.c (make_thunk): Fix comment alignment.
6200
6201 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
6202
6203         Kill remnants of this is variable.
6204         * cp-tree.h (flag_this_is_variable): Remove.
6205         * decl2.c (flag_this_is_variable): Remove.
6206         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
6207         (build_vbase_path): The path is non-static, even in a cdtor.
6208         (resolves_to_fixed_type_p): Add additional return value.
6209         * search.c (init_vbase_pointers): Adjust.
6210         * tree.c (lvalue_p_1): Adjust.
6211         * typeck.c (mark_addressable): Adjust.
6212
6213 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
6214
6215         * pt.c (unify): Don't check cv quals of array types.
6216
6217 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
6218
6219         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
6220         check whether we already have the type.
6221
6222 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
6223
6224         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
6225         * call.c (build_op_delete_call): Simplify to remove duplicate
6226         code.
6227         * class.c (clone_function_decl): Don't build the deleting variant
6228         of a non-virtual destructor.
6229         * decl.c (finish_destructor_body): Don't call delete if this is a
6230         non-virtual destructor.
6231         * init.c (build_delete): Explicitly call `operator delete' when
6232         deleting an object with a non-virtual destructor.
6233
6234 2001-02-13  Jason Merrill  <jason@redhat.com>
6235
6236         * lang-specs.h: Add more __EXCEPTIONS.
6237
6238 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
6239
6240         * typeck2.c (process_init_constructor): Check
6241         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
6242
6243 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
6244
6245         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
6246         Remove spurious information in comment. Allow further
6247         adjustments of REFERENCE_TYPE args.
6248
6249 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
6250
6251         * errfn.c (cp_deprecated): Tweak diagnostic text.
6252         * parse.y (new_initializer): Deprecate initializer lists
6253         extension.
6254
6255 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
6256
6257         Remove old ABI support.
6258
6259 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
6260
6261         * decl2.c (flag_vtable_thunks): Always set it to 1.
6262         (flag_new_abi): Likewise.
6263         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
6264
6265         * Makefile.in (g++spec.o): Fix typo.
6266
6267 2001-02-09  Jason Merrill  <jason@redhat.com>
6268
6269         * lang-specs.h: Restore definition of __EXCEPTIONS.
6270
6271 2001-02-08  Jason Merrill  <jason@redhat.com>
6272
6273         * search.c (shared_member_p): New function.
6274         (lookup_field_r): Use it.
6275         * cp-tree.h (SHARED_MEMBER_P): Remove.
6276
6277         * method.c (process_overload_item): Handle template-dependent array
6278         bounds.
6279         * pt.c (type_unification_real): If we end up with undeduced nontype
6280         parms, try again.
6281
6282         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
6283         types.
6284
6285         * typeck2.c (friendly_abort): Don't say anything if we have
6286         earlier errors or sorries.
6287
6288         * decl.c (check_tag_decl): Notice attempts to redefine bool and
6289         wchar_t.  Ignore if in_system_header.
6290
6291         * decl.c (maybe_push_cleanup_level): New fn...
6292         (start_decl_1): ...split out from here.
6293         * cvt.c (build_up_reference): Use it.
6294         * cp-tree.h: Declare it.
6295
6296 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
6297
6298         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
6299         spec.
6300
6301 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
6302
6303         * pt.c (lookup_template_class): Make sure it's a primary
6304         template or template_template_parm when called from the parser.
6305         (instantiate_template_class): Add assertion.
6306
6307 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
6308
6309         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
6310         from error_mark_node.
6311
6312 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
6313
6314         Fix specification and implementation bugs in V3 ABI
6315         construction vtables.
6316         * cp-tree.h (flag_dump_class_layout): New flag.
6317         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
6318         (BINFO_LOST_PRIMARY_P): New flag.
6319         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
6320         (BINFO_PRIMARY_MARKED_P): Rename to ...
6321         (BINFO_PRIMARY_P): ... here.
6322         (binfo_via_virtual): New prototype.
6323         * decl2.c (flag_dump_class_layout): New flag.
6324         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
6325         use `=' as a file name separator.
6326         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
6327         bases.
6328         (build_vtbl_address): If this is a virtual primary base, then
6329         get the vtbl of what it is ultimately primary for.
6330         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
6331         for BINFO_PRIMARY_P.
6332         (dfs_skip_nonprimary_vbases_markedp): Likewise.
6333         (get_shared_vbase_if_not_primary): Likewise.
6334         (dfs_get_pure_virtuals): Likewise.
6335         (expand_upcast_fixups): Likewise.
6336         (fixup_virtual_upcast_offsets): Likewise.
6337         (dfs_find_vbase_instance): Likewise.
6338         (find_vbase_instance): Likewise.
6339         (binfo_from_vbase): Adjust comment to reflect reality.
6340         (binfo_via_virtual): New function.
6341         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
6342         for binfo walking during VTT construction.
6343         (dfs_mark_primary_bases): Remove.
6344         (force_canonical_binfo_r): New function.
6345         (force_canonical_binfo): New function.
6346         (mark_primary_virtual_base): New function.
6347         (mark_primary_bases): Walk in inheritance graph order, use
6348         mark_primary_virtual_base.
6349         (determine_primary_base): Use some more intermediate variables.
6350         (dfs_find_final_overrider): Don't check for overriding along a
6351         virtual path.
6352         (dfs_modify_vtables): Walk into primary virtual bases too.
6353         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
6354         (build_base_fields): Likewise.
6355         (dfs_set_offset_for_unshared_vbases): Likewise.
6356         (layout_virtual_bases): Likewise.
6357         (end_of_class): Likewise.
6358         (finish_struct_1): Call dump_class_hierarchy, if requested.
6359         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
6360         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
6361         (dump_class_hierarchy): Add file parameter. Append to file, if
6362         required.
6363         (finish_vtbls): Adjust accumulate_vtbl_inits call.
6364         Use canonical base for virtual bases.
6365         (build_vtt): Add more comments. Adjust build_vtt_inits call.
6366         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
6367         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
6368         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
6369         virtual VTTs.
6370         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
6371         from DATA.  We want virtual primary bases and all bases via virtual.
6372         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
6373         virtual base when not a construction vtable.
6374         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
6375         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
6376         Use canonical bases when processing virtual bases.
6377         (accumulate_vtbl_inits): We're interested in any base via a
6378         virtual path.
6379         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
6380         within a construction vtable, determine what is being overridden.
6381         (build_vtbl_initializer): Add more comments
6382         (add_vcall_offset_vtbl_entries_1): Adjust comment.
6383         (build_rtti_vtbl_entries): Check if the base has lost its
6384         primary.
6385
6386 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
6387
6388         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
6389
6390 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6391
6392         * decl.c (pushdecl): Call abort instead of fatal.
6393         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
6394         * init.c (build_new_1): Likewise.
6395         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
6396         * decl.c (build_typename_type): hash_table_init now returns void.
6397         decl.c (init_decl_processing): Make an error non-fatal.
6398
6399 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
6400
6401         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
6402         Document.
6403         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6404         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6405         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6406         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6407         * decl.c (maybe_commonize_var): Use the new name-mangling where
6408         appropriate.
6409         * decl2.c (comdat_linkage): Enhance comments.  Make all
6410         compiler-generated things static, if COMDAT is not available.
6411         (get_tinfo_decl): Do not make typeinfo objects that belong in the
6412         library COMDAT.
6413         (tinfo_base_init): Use the correct mangled name for typeinfo
6414         strings, and push them into the global scope.
6415         (typeinfo_in_lib_p): New function.
6416         (synthesize_tinfo_var): Use it.
6417         (create_real_tinfo_var): Likewise.
6418
6419 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
6420
6421         * decl.c (push_class_binding): Use context_for_name_lookup instead
6422         of CP_DECL_CONTEXT.
6423         * search.c (context_for_name_lookup): Remove static.  Check for NULL
6424         context in the loop.
6425         * cp-tree.h (context_for_name_lookup): Add prototype.
6426
6427 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
6428
6429         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
6430         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
6431         Remove.
6432         * call.c (convert_class_to_reference, build_user_type_conversion_1,
6433         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
6434
6435 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
6436
6437         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
6438         of macros used when compiling g++spec.c.
6439         * g++spec.c (lang_specific_driver): Link with the shared
6440         libgcc by default.
6441
6442 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6443
6444         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
6445         make_reference_declarator, make_call_declarator), method.c
6446         (implicitly_declare_fn), parse.y (namespace_using_decl,
6447         notype_unqualified_id, expr_or_declarator, new_type_id,
6448         after_type_declarator, direct_after_type_declarator,
6449         notype_declarator, complex_notype_declarator,
6450         complex_direct_notype_declarator, qualified_id,
6451         notype_qualified_id, overqualified_id, direct_new_declarator,
6452         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
6453         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
6454         instead of build_parse_node.
6455
6456 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6457
6458         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
6459         (minus_one_node): Moved to top level gcc directory.  Renamed
6460         to integer_minus_one_node.
6461
6462         * init.c (init_init_processing): Don't set minus_one_node.
6463         (build_vec_init): Use integer_minus_one_node.
6464
6465         * rtti.c (get_tinfo_decl_dynamic): Likewise.
6466
6467 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
6468
6469         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
6470         identical and they would be replaced with constant, remove
6471         MODIFY_EXPR from the tree.
6472
6473 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6474
6475         * Make-lang.in: Remove all dependencies on defaults.h.
6476         * call.c: Don't include defaults.h.
6477         * decl.c: Likewise.
6478         * decl2.c: Likewise.
6479         * except.c: Likewise.
6480         * pt.c: Likewise.
6481         * rtti.c: Likewise.
6482         * tree.c: Likewise.
6483         * typeck.c: Likewise.
6484
6485 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
6486
6487         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
6488         operators even in "C" linkage.
6489         * method.c (set_mangled_name_for_decl): Likewise.
6490         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
6491         overloaded operators in "C" linkage.
6492
6493 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
6494
6495         * pt.c (tsubst_decl): Remove IN_DECL parameter.
6496         (tsubst_arg_types): Check parameter is not void.
6497         (tsubst): Adjust tsubst_decl call.
6498
6499 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
6500
6501         * call.c (add_builtin_candidate): Quote std properly, from
6502         previous change.
6503
6504 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6505
6506         * pt.c (check_explicit_specialization): Clone constructors and
6507         destructors.
6508
6509 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
6510
6511         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
6512         indicates anything special about template depth. Make sure we
6513         only count the user visible template classes.
6514
6515 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
6516
6517         * call.c (build_conv): Typo in comment.
6518         (add_builtin_candidate): Add more explanation.
6519         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
6520         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
6521         when we have enumeral types.
6522         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
6523         candidates for relops and eqops.
6524         (joust): Simplify control flow. Allow a non-template user
6525         function to hide a builtin.
6526
6527 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
6528
6529         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
6530         (more_specialized): Add deduction parameter.
6531         * call.c (joust): Adjust more_specialized call.
6532         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
6533         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
6534         (get_bindings_order): Remove.
6535         (get_bindings_real): Add DEDUCE parameter.
6536         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
6537         REFERENCE_TYPE jig for DEDUCE_ORDER.
6538         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
6539         maybe_adjust_types_for_deduction.
6540         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
6541         directly.
6542         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
6543         (check_cv_quals_for_unify): Use new unify qualifier flags.
6544         (unify): Clear new unify qualifier flags.
6545         (get_bindings_real): Add DEDUCE parameter.
6546         (get_bindings): Adjust call to get_bindings_real.
6547         (get_bindings_overload): Likewise.
6548         (most_specialized_instantiation): Adjust call to
6549         more_specialized.
6550
6551 2001-01-19  Jason Merrill  <jason@redhat.com>
6552
6553         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
6554
6555         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
6556         -fnew-abi.
6557
6558 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
6559
6560         * decl2.c (arg_assoc_class): Fix double iteration logic.
6561
6562 2001-01-19  Jason Merrill  <jason@redhat.com>
6563
6564         * init.c (build_delete): Always call convert_force to strip cv-quals.
6565
6566         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
6567         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
6568         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
6569
6570 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6571
6572         * search.c (get_vbase_1): Count only virtual bases.
6573
6574 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6575
6576         * class.c (duplicate_tag_error): Robustify flag clearing.
6577
6578 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6579
6580         * cp-tree.h (lookup_template_class): Add complain parm.
6581         * decl.c (lookup_namespace_name): Adjust call to
6582         lookup_template_class.
6583         (make_typename_type): Likewise.
6584         * semantics.c (finish_template_type): Likewise.
6585         * pt.c (lookup_template_class): Add complain parm. Adjust.
6586         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
6587         (tsubst): Likewise.
6588
6589 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6590
6591         * pt.c (copy_default_args_to_explicit_spec): Preserve
6592         object's CV quals. Reorganize.
6593
6594 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
6595
6596         * typeck.c (build_modify_expr): Say `initialization' for
6597         INIT_EXPRs.
6598         * init.c (build_default_init): Convert to enumeral type, if
6599         needed.
6600
6601 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
6602
6603         * parse.y (nomods_initdcl0): Properly set things up for
6604         initdcl0_innards.
6605
6606 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
6607
6608         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
6609         (type_unification_real): Set it.
6610         (unify): Use it.
6611
6612 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
6613
6614         * decl.c (finish_destructor_body): Convert to vbase pointer here.
6615
6616 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
6617
6618         * semantics.c (begin_class_definition): Check we're not inside a
6619         template parm list.
6620
6621 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
6622
6623         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
6624         BASELINK_P.
6625
6626 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6627
6628         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
6629         * call.c (build_over_call): Add comment.
6630
6631 2001-01-16 Daniel Berlin <dberlin@redhat.com>
6632
6633         * cvt.c (ocp_convert): Handle vector type conversion
6634         * typeck2.c (digest_init): Handle vector type initializations
6635
6636 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
6637
6638         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
6639           was given.
6640
6641 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
6642
6643         * pt.c (check_nontype_parm): Rename to ...
6644         (invalid_nontype_parm_type_p): ... here.
6645         (process_template_parm): Adjust.
6646         (convert_template_argument): Adjust.
6647
6648 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
6649
6650         * pt.c (check_nontype_parm): New function.
6651         (process_template_parm): Use it.
6652         (convert_template_argument): Use it.
6653         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
6654         member.
6655
6656 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
6657
6658         * tree.c: Add defaults.h
6659         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
6660         * Make-lang.in (cp/tree.o): Add defaults.h.
6661
6662 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6663
6664         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
6665
6666 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6667
6668         * g++.1: Change to be ".so man1/gcc.1".
6669
6670 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6671
6672         * Make-lang.in (c++.info, c++.install-info): Build and install g++
6673         internals info.
6674         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
6675         ($(srcdir)/cp/g++int.info): New target.
6676         * gxxint.texi: Add info directory entry.  Use @@ in email address.
6677         * .cvsignore: Update.
6678
6679 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
6680
6681         * typeck.c (build_c_cast): Do template processing earlier.
6682         Always pedwarn on array casts.
6683
6684 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
6685
6686         * friend.c (make_friend_class): Make sure a templated class is
6687         actually a template.
6688
6689 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
6690
6691         * decl2.c (get_guard): Set linkage from guarded decl.
6692
6693 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
6694
6695         * call.c (convert_default_arg): Check for unprocessed
6696         DEFAULT_ARG.
6697         * cp-tree.h (replace_defarg): Move to spew.c.
6698         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
6699         spew.c, which is where they really are.
6700         (done_pending_defargs): Declare.
6701         (unprocessed_defarg_fn): Declare.
6702         * decl.c (replace_defarg): Move to spew.c
6703         * parse.y (structsp): Call done_pending_defargs.
6704         * spew.c (defarg_fns): Rearrange list structure.
6705         (defarg_fnsdone): New static variable.
6706         (defarg_depfns): New static variable.
6707         (init_spew): Adjust.
6708         (add_defarg_fn): Store the type in TREE_TYPE.
6709         (do_pending_defargs): Detect and deal with ordering constraints
6710         and circularity.
6711         (done_pending_defargs): New function.
6712         (unprocessed_defarg_fn): New function.
6713         (replace_defarg): Moved from decl.c. Robustify. Don't save
6714         if circularity detected.
6715
6716 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
6717
6718         * pt.c (unify): Check array has a domain, before checking
6719         whether it is variable sized.
6720
6721 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
6722
6723         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
6724         parameters with pointers to arrays of unknown bound.
6725
6726 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
6727
6728         * parse.y (template_parm_header, template_spec_header): New
6729         reductions. Split out from ...
6730         (template_header): ... here. Use them.
6731         (template_template_parm): Use template_parm_header.
6732         * semantics.c (finish_template_template_parm): Add assert.
6733
6734 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
6735
6736         * mangle.c (write_builtin_type): Fix thinko.
6737
6738         * pt.c (copy_default_args_to_explicit_spec_1): New function.
6739         (copy_default_args_to_explicit_spec): Likewise.
6740         (check_explicit_specialization): Use it.
6741
6742         * class.c (finish_struct_1):  Remove last argument in call to
6743         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6744         * decl.c (builtin_function): Likewise.
6745         (build_cp_library_fn): Likewise.
6746         (check_initializer): Likewise.
6747         (make_rtl_for_nonlocal_decl): Likewise.
6748         (cp_finish_decl): Likewise.
6749         (start_function): Likewise.
6750         * decl2.c (finish_anon_union): Likewise.
6751         * friend.c (do_friend): Likewise.
6752         * init.c (build_java_class_ref): Likewise.
6753         * method.c (make_thunk): Likewise.
6754         * pt.c (tsubst_friend_function): Likewise.
6755         * semantics.c (expand_body): Likewise.
6756
6757 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
6758
6759         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
6760         looking at DECL_CLONED_FUNCTION for non-functions.
6761
6762 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
6763
6764         * error.c (dump_template_parameter): Use parm to determine how
6765         to print default value.
6766
6767 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
6768
6769         * class.c (duplicate_tag_error): Clear more flags.
6770
6771 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
6772
6773         * call.c (build_new_method_call): Use binfo_for_vbase.
6774
6775 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
6776
6777         * cp-tree.h (flag_cond_mismatch): Don't declare.
6778         * decl2.c (flag_cond_mismatch): Don't define.
6779         (lang_f_options): Remove cond-mismatch.
6780         (unsupported_options): Add cond-mismatch.
6781
6782 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
6783
6784         * class.c (handle_using_decl): Reject using of constructor name
6785         of sourcing class. Allow injecting of a method with same name as
6786         nested class. Fixup error messages.
6787
6788 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
6789
6790         * decl2.c (lang_decode_option): Handle -Wformat=2.
6791
6792 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
6793
6794         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
6795         initialized_in_class.
6796         (DECL_DEFINED_IN_CLASS_P): Rename to ...
6797         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
6798         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
6799         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
6800         * pt.c (check_default_tmpl_args): Adjust for
6801         DECL_INITIALIZED_IN_CLASS_P.
6802         (instantiate_class_template): Likewise.
6803         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
6804
6805         * class.c (finish_struct): Constify saved_filename.
6806
6807 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
6808
6809         * class.c (duplicate_tag_error): Adjust diagnostic.
6810         (finish_struct): Locally set location to start of struct.
6811         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
6812
6813 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
6814
6815         * decl.c (struct binding_level): Adjust class_shadowed comments
6816         to reflect reality.
6817         (push_class_level_binding): Adjust comments to reflect reality.
6818         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
6819         Don't set TREE_VALUE on the class_shadowed list.
6820
6821 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6822
6823         * decl2.c (acceptable_java_type): Allow references too.
6824         * init.c (build_java_class_ref): When using the new ABI, search
6825         `class$' and have it mangled with `mangle_decl.'
6826         * mangle.c (write_java_integer_type_codes): New function.
6827         (write_builtin_type): Detect and mangle Java integer and real
6828         types.
6829
6830 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
6831
6832         * decl2.c (grokfield): Don't accept `asm' specifiers for
6833         non-static data members.
6834
6835 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6836
6837         * expr.c (cplus_expand_expr): Don't reset `target'.
6838
6839 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
6840
6841         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
6842
6843 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
6844
6845         * parse.y (template_datadef): Check for error_mark_node.
6846
6847 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
6848
6849         * cp-tree.def (DEFAULT_ARG): Make `x' class.
6850
6851 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
6852
6853         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
6854         (record_builtin_type): Make non-static.
6855         (flag_short_double): Don't declare.
6856         (init_decl_processing): Remove the creation of many tree nodes now
6857         in c_common_nodes_and_builtins.
6858         (build_void_list_node): New function.
6859         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
6860         * cp-tree.h (flag_short_wchar): Don't declare.
6861
6862 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
6863
6864         * call.c (build_conv): Don't use build1 for USER_CONV.
6865         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
6866
6867 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
6868
6869         * lex.c (lang_init): Call c_common_lang_init.
6870
6871 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
6872
6873         * search.c (lookup_fnfields_here): Remove.
6874         (look_for_overrides_r): Use lookup_fnfields_1.
6875         Ignore functions from using declarations.
6876
6877 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
6878
6879         Implement exceptions specifiers for implicit member functions.
6880         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
6881         * method.c (synthesize_exception_spec): New function.
6882         (locate_dtor, locate_ctor, locate_copy): New functions.
6883         (implicitly_declare_fn): Generate the exception spec too.
6884         * search.c (check_final_overrider): Check artificial functions
6885         too.
6886         * typeck2.c (merge_exception_specifiers): New function.
6887
6888 2001-01-03  Jason Merrill  <jason@redhat.com>
6889
6890         * init.c (build_default_init): New fn.
6891         (perform_member_init): Split out from here.
6892         (build_new_1): Use it.  Simplify initialization logic.
6893         (build_vec_init): Take an array, rather than a pointer and maxindex.
6894         Speed up simple initializations.  Don't clean up if we're assigning.
6895         * cp-tree.h: Adjust.
6896         * decl2.c (do_static_initialization): Remove TREE_VEC case.
6897         * parse.y (new_initializer): Return void_zero_node for ().
6898         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
6899         * typeck2.c (digest_init): Only complain about user-written
6900         CONSTRUCTORs.
6901
6902 2000-12-22  Mike Stump  <mrs@wrs.com>
6903
6904         * decl2.c: (max_tinst_depth): Increase to 50.
6905
6906 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
6907
6908         * class.c (invalidate_class_lookup_cache): Zero the
6909         previous_class_values.
6910         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
6911         TREE_INT_CST_HIGH.
6912         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
6913         * decl.c (free_bindings): New variable.
6914         (push_binding): Don't create a new binding if we have one on the
6915         free list.
6916         (pop_binding): Put old bindings on the free list.
6917         (init_decl_processing): Use size_int, not build_int_2.
6918         Register free_bindings as a GC root.
6919         (cp_make_fname_decl): Use size_int, not build_int_2.
6920         (push_inline_template_parms_recursive): Likewise.
6921         (end_template_parm_list): Likewise.
6922         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
6923         (tsubst_template_parms): Use size_int, not build_int_2.
6924         (tsubst): Likewise.
6925         * rtti.c (get_vmi_pseudo_type_info): Likewise.
6926
6927 2001-01-02  Richard Henderson  <rth@redhat.com>
6928
6929         * parse.y (asm): Set ASM_INPUT_P.
6930
6931 2001-01-02  Jason Merrill  <jason@redhat.com>
6932
6933         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
6934         for v3 ABI.
6935
6936         * typeck.c (cp_truthvalue_conversion): New fn.
6937         * cvt.c (ocp_convert): Use it.
6938
6939         * cp-tree.h: Lose c-common.c decls.
6940
6941         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
6942         * cvt.c (convert_to_void): Use type_unknown_p.
6943
6944         * typeck.c (strip_all_pointer_quals): Also strip quals from
6945         pointer-to-member types.
6946
6947         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
6948         parse.y as C.
6949
6950         * call.c (build_new_method_call): Do evaluate the object parameter
6951         when accessing a static member.
6952         * typeck.c (build_component_ref): Likewise.
6953
6954 2001-01-02  Andreas Jaeger  <aj@suse.de>
6955
6956         * decl.c (cp_missing_noreturn_ok_p): New.
6957         (init_decl_processing): Set lang_missing_noreturn_ok_p.
6958
6959 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
6960
6961         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
6962
6963 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
6964
6965         * class.c (pushclass): Remove #if 0'd code.
6966         * cp-tree.h (overload_template_name): Remove.
6967         * decl.c (store_bindings): Simplify.
6968         (pop_from_top_level): Likewise.
6969         * pt.c (overload_template_name): Remove.
6970         (instantiate_decl): Don't call push_to_top_level if it's not
6971         needed.
6972
6973 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
6974
6975         * pt.c (register_local_specialization): Don't return a value.
6976         (lookup_template_class): Use move-to-front heuristic when looking
6977         up template instantiations.
6978         (instantiate_decl): Only push_to_top_level when we're actually
6979         going to instantiate the template.
6980
6981 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
6982
6983         * search.c (binfo_for_vtable): Return least derived class, not
6984         most.  Handle secondary vtables.
6985
6986 2000-12-22  Jason Merrill  <jason@redhat.com>
6987
6988         * pt.c (more_specialized): Don't optimize len==0.
6989         (fn_type_unification): If we're adding the return type, increase len.
6990
6991         * typeck.c (build_binary_op): Fix pmf comparison logic.
6992
6993         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
6994         DECL_STATIC_FUNCTION_P.
6995
6996         * semantics.c (genrtl_finish_function): Don't try to jump to
6997         return_label unless it exists.
6998
6999         In partial ordering for a call, ignore parms for which we don't have
7000         a real argument.
7001         * call.c (joust): Pass len to more_specialized.
7002         (add_template_candidate_real): Strip 'this', pass len.
7003         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
7004         (get_bindings_order): New fn.  Pass len down.
7005         (get_bindings_real): Strip 'this', pass len.
7006         (fn_type_unification): Likewise.
7007         (type_unification_real): Succeed after checking 'len' args.
7008         (most_specialized_instantiation): Lose explicit_args parm.
7009         * class.c (resolve_address_of_overloaded_function): Strip 'this',
7010         pass len.
7011
7012 2000-12-21  Jason Merrill  <jason@redhat.com>
7013
7014         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
7015         DECL_TEMPLATE_RESULT.
7016
7017         * search.c (lookup_field_r): Call lookup_fnfields_1, not
7018         lookup_fnfields_here.
7019
7020         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
7021
7022         * call.c (build_object_call): Also allow conversions that return
7023         reference to pointer to function.
7024         (add_conv_candidate): Handle totype being ref to ptr to fn.
7025         (build_field_call): Also allow members of type reference to function.
7026         Lose support for calling pointer to METHOD_TYPE fields.
7027
7028         * error.c (dump_expr): Handle *_CAST_EXPR.
7029
7030         * typeck2.c (build_scoped_ref): Always convert to the naming class.
7031
7032         * tree.c (break_out_cleanups): Lose.
7033         * cp-tree.h: Remove prototype.
7034         * typeck.c (build_component_ref): Don't break_out_cleanups.
7035         (build_compound_expr): Likewise.
7036         * semantics.c (finish_expr_stmt): Likewise.
7037
7038 2000-12-20  Richard Henderson  <rth@redhat.com>
7039
7040         * cp-tree.h: Update declarations.
7041         * decl.c (finish_case_label): Return the new stmt node.
7042         * semantics.c (finish_goto_stmt): Likewise.
7043         (finish_expr_stmt, finish_return_stmt): Likewise.
7044         (finish_break_stmt, finish_continue_stmt): Likewise.
7045         (finish_asm_stmt): Likewise.
7046         * parse.y (already_scoped_stmt): Set STMT_LINENO.
7047         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
7048         (simple_if, simple_stmt): Return the new stmt node.
7049         (save_lineno): New.
7050
7051 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
7052
7053         * cp-tree.h: Don't declare warn_long_long.
7054
7055 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7056
7057         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
7058         IS_AGGR_TYPE.
7059
7060 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7061
7062         * pt.c (unify): Handle when both ARG and PARM are
7063         BOUND_TEMPLATE_TEMPLATE_PARM.
7064
7065 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7066
7067         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
7068         DECL_TEMPLATE_PARM_P.
7069
7070 2000-12-15  Jason Merrill  <jason@redhat.com>
7071
7072         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
7073
7074         * init.c (build_new_1): Don't strip quals from type.
7075
7076         * decl.c (pushdecl): Don't check for linkage on a non-decl.
7077
7078         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
7079
7080         * call.c (build_new_function_call): Lose space before paren in
7081         error message.
7082         (build_new_method_call): Likewise.
7083
7084         * typeck2.c (build_m_component_ref): Propagate quals from datum.
7085
7086 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7087
7088         * pt.c (check_explicit_specialization): Propagate default
7089         function arguments to explicit specializations.
7090
7091 2000-12-13  DJ Delorie  <dj@redhat.com>
7092
7093         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
7094         and <? operators.
7095
7096 2000-12-08  Jason Merrill  <jason@redhat.com>
7097
7098         * error.c (dump_function_name): Don't let the user see __comp_ctor.
7099
7100         Clean up copy-initialization in overloading code.
7101         * call.c (build_user_type_conversion_1): Die if we are asked to
7102         convert to the same or a base type.
7103         (implicit_conversion): Avoid doing so.  Lose reference binding code.
7104         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
7105         direct-initialization.  Also do direct-init part of copy-init.
7106         (build_user_type_conversion): Don't provide context to convert_like.
7107         * cvt.c (ocp_convert): build_user_type_conversion will now provide
7108         the constructor call for copy-init.
7109
7110         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
7111         instantiation of a member template.
7112         (do_decl_instantiation): Not here.
7113
7114 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
7115
7116         * class.c (check_field_decls): Don't special case anonymous
7117         fields in error messages.
7118         (note_name_declared_in_class): Use %D on diagnostic.
7119
7120         * tree.c (pod_type_p): Use strip_array_types.
7121         (cp_valid_lang_attribute): Likewise.
7122         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
7123         multiple evaluations.
7124         (cp_has_mutable_p): Use strip_array_types.
7125
7126 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
7127
7128         * cp-tree.h (sufficient_parms_p): Declare new function.
7129         * call.c (sufficient_parms_p): New function, broken out of ...
7130         (add_function_candidate): ... here. Use it.
7131         (add_conv_candidate): Use it.
7132         * decl.c (grok_ctor_properties): Use it.
7133
7134 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
7135
7136         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
7137
7138 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
7139
7140         * decl2.c (lang_decode_option): Handle -Wformat-security.
7141
7142 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7143
7144         * pt.c (verify_class_unification): New function.
7145         (get_class_bindings): Use it.
7146         (try_class_unification): Tidy.
7147         (unify): Handle when argument of a template-id is not
7148         template parameter dependent.
7149         (template_args_equal): Handle when TREE_CODE's do not match.
7150
7151 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
7152
7153         * lang-specs.h (c++): When invoking the stand-alone preprocessor
7154         for -save-temps, pass all relevant -Defines to it, and then don't
7155         pass them to cc1plus.
7156
7157 2000-12-05  Will Cohen  <wcohen@redhat.com>
7158
7159         * decl.c (finish_case_label): Cleared
7160         more_cleanups_ok in surrounding function scopes.
7161         (define_label): Likewise.
7162
7163 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
7164
7165         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
7166         (get_matching_virtual): Remove.
7167         (look_for_overrides): Declare new function.
7168         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
7169         DECL_VINDEX here.
7170         * class.c (check_for_override): Move base class iteration code
7171         to look_for_overrides.
7172         * search.c (next_baselink): Remove.
7173         (get_virtuals_named_this): Remove.
7174         (get_virtual_destructor): Remove.
7175         (tree_has_any_destructors_p): Remove.
7176         (struct gvnt_info): Remove.
7177         (check_final_overrider): Remove `virtual' from error messages.
7178         (get_matching_virtuals): Remove. Move functionality to ...
7179         (look_for_overrides): ... here, and ...
7180         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
7181         to be overriding.
7182
7183 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
7184
7185         * typeck.c (get_delta_difference): If via a virtual base,
7186         return zero.
7187         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
7188         adjustment.
7189
7190 2000-12-04  Richard Henderson  <rth@redhat.com>
7191
7192         * error.c (dump_tree): Use output_add_string not OB_PUTS.
7193
7194 2000-12-04  Jason Merrill  <jason@redhat.com>
7195
7196         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
7197         (write_builtin_type): Pass intSI_type_node and the like through
7198         type_for_mode.
7199         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
7200         Pass intSI_type_node and the like through type_for_mode.
7201         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
7202         * pt.c (tsubst, unify): Likewise.
7203         * tree.c (walk_tree): Likewise.
7204         * error.c (dump_type): Likewise.
7205         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
7206
7207         * Make-lang.in: Tweak top comment for emacs.
7208         (cp/TAGS): Restore.
7209
7210         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
7211
7212         * class.c (clone_function_decl): Robustify.
7213
7214 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
7215
7216         * decl.c (store_bindings): Only search in the non modified
7217         old_bindings for duplicates.
7218
7219 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7220
7221         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
7222         TYPE_POLYMORPHIC_P.
7223
7224         * typeck.c (build_static_cast): Remove unused variable.
7225
7226 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7227
7228         * pt.c: Fix typo in comment.
7229
7230 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
7231
7232         * decl2.c (warn_format): Remove definition.
7233         (lang_decode_option): Handle -Wformat-nonliteral,
7234         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
7235
7236 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
7237
7238         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
7239         (init_decl_processing): Don't create string_type_node,
7240         const_string_type_node, wint_type_node, intmax_type_node,
7241         uintmax_type_node, default_function_type, ptrdiff_type_node and
7242         unsigned_ptrdiff_type_node.  Adjust position of call to
7243         c_common_nodes_and_builtins.
7244         (identifier_global_value): New function.
7245
7246 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
7247
7248         * call.c (standard_conversion): Reject pointer to member
7249         conversions from ambiguous, inaccessible or virtual bases.
7250         * typeck.c (build_static_cast): Don't check pointers to members
7251         specially.
7252
7253 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
7254
7255         * method.c (do_build_copy_constructor): Preserve cv
7256         qualifications when accessing source object members.
7257         (do_build_assign_ref): Likewise. Remove separate diagnostics for
7258         unnamed fields.
7259
7260 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
7261
7262         * method.c (do_build_assign_ref): Construct appropriately
7263         CV-qualified base reference. Don't allow const casts in base
7264         conversion.
7265
7266 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
7267
7268         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
7269         incomplete return type.
7270
7271 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
7272
7273         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
7274         * semantics.c (finish_base_specifier): Accept a _TYPE not a
7275         _DECL.
7276
7277 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
7278
7279         * spew.c (yyerror): Cope if yylval.ttype is NULL.
7280
7281 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
7282
7283         * decl.c (grokdeclarator): Diagnose undefined template contexts.
7284
7285 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
7286
7287         * decl.c (grokdeclarator): Do type access control on friend
7288         class.
7289
7290 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
7291
7292         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
7293         bison parser ickiness.
7294         * pt.c (tsubst_friend_function): Enter namespace scope when
7295         tsubsting the function name.
7296         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
7297
7298 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
7299
7300         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
7301         * cvt.c (cp_convert_to_pointer): Add force parameter.
7302         Allow conversions via virtual base if forced.
7303         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
7304         (ocp_convert): Likewise.
7305         * search.c (binfo_from_vbase): Return the virtual base's binfo.
7306         * typeck.c (get_delta_difference): Adjust handling of virtual
7307         bases.
7308
7309 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
7310
7311         * tree.c (struct list_hash): Remove.
7312         (list_hash_table): Make it be an htab.
7313         (struct list_proxy): New type.
7314         (list_hash_eq): New function.
7315         (list_hash_pieces): Renamed from ...
7316         (list_hash): ... this.
7317         (list_hash_lookup): Remove.
7318         (list_hash_add): Remove.
7319         (hash_tree_cons): Use the generic hashtable.
7320         (mark_list_hash): Remove.
7321         (init_tree): Create the hashtable.
7322
7323 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
7324
7325         * method.c (build_mangled_C9x_name): Rename to
7326         build_mangled_C99_name.  Change C9X references in comments to
7327         refer to C99.
7328
7329 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
7330
7331         * parse.y (unary_expr): Move VA_ARG from here ...
7332         (primary): ... to here.
7333
7334 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
7335
7336         * semantics.c (finish_id_expr): If type is error_mark, return
7337         error_mark.
7338
7339 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
7340
7341         * pt.c (lookup_template_class): Simplify loop exit constructs.
7342         Cope when there is no partial instantiation of a template
7343         template member.
7344
7345 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
7346
7347         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
7348
7349 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
7350
7351         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
7352         prefix.
7353
7354         * pt.c (do_decl_instantiate): Explicitly clone constructors and
7355         destructors that haven't already been cloned.
7356
7357 2000-11-20  Richard Henderson  <rth@redhat.com>
7358
7359         * parse.y (yyparse_1): Rename the parser entry point.
7360
7361 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
7362
7363         * mangle.c (write_name): Use <unscoped-name> for names directly in
7364         function scope.
7365         (write_unscoped_name): Accept names directly in function scope.
7366
7367 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
7368
7369         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
7370         * parse.y (extdef): Add EXPORT reduction.
7371         * spew.c (yylex): Don't skip export here.
7372
7373 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
7374
7375         * decl.c (init_decl_processing): Correct name of pure virtual
7376         function under the new ABI.
7377         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
7378         (throw_bad_typeid): Likewise for bad typeid function.
7379
7380 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
7381
7382         * decl.c (grokparms): Don't even function types of `void' type,
7383         either.
7384         * mangle.c (write_type): Don't crash when confronted with the
7385         error_mark_node.
7386
7387         * decl.c (grokparms): Don't create parameters of `void' type.
7388
7389 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
7390
7391         * lex.c (mark_impl_file_chain): Delete.
7392         (init_parse): Remove call to ggc_add_string_root.  No need to
7393         ggc_strdup a string constant.  Do not add impl_file_chain to GC
7394         roots.
7395         (handle_pragma_implementation): No need to ggc_strdup main_filename.
7396
7397 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
7398
7399         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
7400
7401 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
7402
7403         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
7404         * decl.c (grokdeclarator): Don't reject void parms here.
7405         (require_complete_types_for_parms): Simplify, use
7406         complete_type_or_else.
7407         (grokparms): Remove bitrot. Remove funcdef parm.
7408         Deal with ellipsis parm lists here.
7409         * semantics.c (finish_parmlist): Don't append void_list_node
7410         here. Set PARMLIST_ELLIPSIS_P.
7411
7412 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
7413
7414         * typeck2.c (incomplete_type_error): Reorganize to avoid
7415         excessive diagnostics.
7416
7417 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
7418
7419         * lex.c (struct impl_files, internal_filename): Constify a char *.
7420
7421 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
7422
7423         * mangle.c (write_special_name_constructor): Don't generate
7424         assembler junk when confronted with an old-style constructor.
7425         (write_special_name_destructor): Likewise.
7426         (mangle_decl_string): Do it here instead.
7427
7428 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
7429
7430         * call.c (op_error): Make error messages clearer.
7431
7432 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
7433
7434         * decl.c (wrapup_globals_for_namespace): Don't mark things
7435         TREE_ASM_WRITTEN when they're not.
7436
7437 2000-11-15  Jason Merrill  <jason@redhat.com>
7438
7439         * typeck2.c (friendly_abort): Uncount the error before handing
7440         off to fancy_abort.
7441
7442 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
7443
7444         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
7445
7446 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
7447
7448         * class.c (build_vtbl_initializer): Fix typo in comment.
7449         * typeck.c (expr_sizeof): Don't crash on errors.
7450
7451 2000-11-14  Jim Wilson  <wilson@redhat.com>
7452
7453         * lang-specs.h: Add %2 after %(cc1_options).
7454
7455 2000-11-14  Richard Henderson  <rth@redhat.com>
7456
7457         * typeck.c (c_sizeof): Be strict about casting result value
7458         back to c_size_type_node.
7459         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
7460
7461 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7462
7463         * typeck.c (build_unary_op): Use boolean_increment from
7464         c-common.c, moving the relevant code there.
7465
7466 2000-11-11  Jason Merrill  <jason@redhat.com>
7467
7468         * typeck.c (mark_addressable): Don't call put_var_into_stack.
7469
7470         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
7471         in inlines.
7472
7473 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7474
7475         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
7476         * lex.c (copy_lang_decl): Likewise.
7477
7478 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
7479
7480         * dump.c (cp_dump_tree): Don't dump function bodies here.
7481
7482         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7483         (dump.o): Update dependency list.
7484         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
7485         (flag_dump_translation_unit): Likewise.
7486         (CP_TYPE_QUALS): Adjust definition.
7487         (DECL_C_BIT_FIELD): Remove.
7488         (SET_DECL_C_BIT_FIELD): Likewise.
7489         (CLEAR_DECL_C_BIT_FIELD): Likewise.
7490         (add_maybe_template): Likewise.
7491         (strip_array_types): Likewise.
7492         (dump_node_to_file): Likewise.
7493         (cp_dump_tree): New function.
7494         * decl.c (init_decl_processing): Set lang_dump_tree.
7495         * decl2.c (flag_dump_translation_unit): Remove.
7496         * dump.c: Move most of it to ../c-dump.c.
7497         (cp_dump_tree): New function.
7498         * pt.c (add_maybe_template): Remove.
7499         * typeck.c (strip_array_types): Likewise.
7500
7501 2000-11-07  Eric Christopher  <echristo@redhat.com>
7502
7503         * decl.c (init_decl_processing): Change definition of
7504         __wchar_t to wchar_t.  Remove artificial declaration of
7505         wchar_t.
7506         * lex.c: Change instances of __wchar_t to wchar_t.
7507
7508 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
7509
7510         * lex.c (do_identifier): Don't lookup_name for operators.
7511         * parse.y (operator): Save looking_for_typename.
7512         (unoperator): Restore it.
7513         * spew.c (frob_opname): Use nth_token for lookahead.
7514
7515 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
7516
7517         * decl.c (grok_op_properties): Always use coerce_new_type and
7518         coerce_delete_type.
7519         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
7520         exception specification. Tidy up.
7521         (coerce_delete_type): Preserve exception specification. Tidy up.
7522
7523 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
7524
7525         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
7526         (push_binding_level), error.c (cp_tree_printer), pt.c
7527         (process_partial_specialization, tsubst_template_arg_vector),
7528         search.c (lookup_member): Use memset () instead of bzero ().
7529
7530 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
7531
7532         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
7533
7534 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
7535
7536         * Make-lang.in (c++.distdir): Remove.
7537
7538 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
7539
7540         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
7541         declarations from different namespaces to be combined.
7542
7543 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
7544
7545         * decl.c: Include tm_p.h.
7546
7547 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
7548
7549         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
7550
7551 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7552
7553         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
7554         (build_overload_value), repo.c (open_repo_file), xref.c
7555         (open_xref_file): Use strchr () and strrchr () instead of index ()
7556         and rindex ().
7557
7558 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
7559
7560         * call.c (build_over_call): Call fold on the CALL_EXPR.
7561
7562 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
7563
7564         * error.c (dump_template_decl): Separate template hearders with
7565         space not comma.
7566
7567 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
7568
7569         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
7570         TS_* flags with corresponding TFF_*.  Adjust prototypes of
7571         functions (which used to take a tree_string_flags) to take an int.
7572
7573         * cp-tree.h (enum tree_string_flags): Remove
7574         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
7575         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
7576         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
7577         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
7578         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
7579         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
7580         (type_as_string, decl_as_string, expr_as_string,
7581         context_as_string): Adjust prototype.
7582
7583         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
7584         instead of TS_PLAIN.
7585
7586         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
7587         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
7588         plain `0'.
7589
7590 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
7591
7592         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
7593         (linkage_kind): New enumeration.
7594         (decl_linkage): New function.
7595         * decl2.c (comdat_linkage): Extend comment.
7596         * error.c (dump_function_decl): Print the arguments used to
7597         instantiate a template, even when not printing the type of the
7598         function.
7599         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
7600         not TREE_PUBLIC, to test for external linkage.
7601         * tree.c (decl_linkage): New function.
7602
7603 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
7604
7605         * pt.c (instantiate_decl): Always instantiate static data members
7606         initialized in-class.
7607
7608 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
7609
7610         * Make-lang.in: Move all build rules here from Makefile.in,
7611         adapt to new context.  Wrap all rules that change the current
7612         directory in parentheses.  Expunge all references to $(P).
7613         When one command depends on another and they're run all at
7614         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
7615         all object-file generation rules.  Delete obsolete variables.
7616
7617         * Makefile.in: Delete.
7618         * config-lang.in: Delete outputs= line.
7619
7620 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7621
7622         * error.c (dump_function_decl): Print no space between
7623         `ptr-operator' the `type-specifier' of the return type.
7624         (dump_type_prefix): Make sure we put space at the appropriate
7625         place.
7626
7627 2000-10-23  Jason Merrill  <jason@redhat.com>
7628
7629         * call.c (equal_functions): Also call decls_match for extern "C" fns.
7630
7631 2000-10-22  Jason Merrill  <jason@redhat.com>
7632
7633         * call.c (build_conditional_expr): Use ocp_convert to force
7634         rvalue conversion.
7635
7636 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
7637
7638         * call.c (standard_conversion): Use RVALUE_CONVs for all
7639         expressions that satisfy lvalue_p, not just those that satisfy
7640         real_lvalue_p.
7641
7642         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
7643
7644         * typeck.c (c_sizeof): Return an expression of `size_t' type,
7645         not one with TYPE_IS_SIZETYPE set.
7646         (dubious_conversion_warnings): Remove special-case code.
7647
7648 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
7649
7650         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
7651         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
7652         (dump_type_prefix): Print vector-of-int as 'int vector'.
7653         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
7654         * tree.c (walk_tree): Handle VECTOR_TYPE.
7655
7656         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
7657
7658 2000-10-21  Jason Merrill  <jason@redhat.com>
7659
7660         * parse.y (operator): Set got_object from got_scope.
7661         Set looking_for_typename.
7662         * decl.c (lookup_name_real): Clear val after setting from_obj.
7663         Reorganize diagnostic.
7664
7665 2000-10-20  Jason Merrill  <jason@redhat.com>
7666
7667         * tree.c (walk_tree): Don't walk into default args.
7668
7669         * error.c (dump_expr): Use host_integerp.
7670
7671 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
7672
7673         * typeck2.c (abstract_virtuals_error): Use "because" instead of
7674         "since" in error message.
7675
7676 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7677
7678         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
7679
7680 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
7681
7682         * decl.c (revert_static_member_fn): Fixed typo.
7683
7684 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
7685
7686         * class.c (subobject_offset_fn): New type.
7687         (dfs_record_base_offsets): Remove.
7688         (record_base_offsets): Likewise.
7689         (dfs_search_base_offsets): Likewise.
7690         (record_subobject_offset): New function.
7691         (check_subobject_offset): Likewise.
7692         (walk_subobject_offsets): Likewise.
7693         (record_subobject_offsets): Likewise.
7694         (layout_conflict_p): Reimplement.
7695         (layout_nonempty_base_or_field): Correct handling of type
7696         conflicts during layout.
7697         (layout_empty_base): Likewise.
7698         (build_base_field): Adjust to handle new representation of empty
7699         base offset table.
7700         (build_base_fields): Likewise.
7701         (layout_virtual_bases): Likewise.
7702         (splay_tree_compare_integer_csts): New function.
7703         (layout_class_type): Use a splay_tree, rather than a varray, to
7704         represent the offsets of empty bases.
7705
7706         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
7707         * decl.c (select_decl): Don't return declarations that are
7708         DECL_ANTICIPATED.
7709
7710 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
7711
7712         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
7713         (fake_std_node): New macro.
7714         * decl.c (in_std): Rename to ...
7715         (in_fake_std): ... this.
7716         (flag_no_builtin): Remove.
7717         (flag_no_nonansi_builtin): Likewise.
7718         (walk_namespaces_r): Use fake_std_node.
7719         (push_namespace): Use std_identifier.
7720         (pop_namespace): Use in_fake_std.
7721         (lookup_name_real): Use fake_std_node.
7722         (init_decl_processing): When -fhonor-std, create the `std'
7723         namespace.  Don't create a dummy fake_std_node in that case.
7724         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
7725         (builtin_function): Put builtins whose names don't begin
7726         with `_' in the std namespace.
7727         * decl2.c (flag_no_builtin): Remove.
7728         (flag_no_nonansi_builtin): Likewise.
7729         (set_decl_namespace): Use fake_std_node.
7730         (validate_nonmember_using_decl): Likewise.
7731         (do_using_directive): Likewise.
7732         (handle_class_head): Likewise.
7733         * dump.c (dequeue_and_dump): Likewise.
7734         * except.c (init_exception_processing): Use std_identifier.
7735         * init.c (build_member_call): Use fake_std_node.
7736         * rtti.c (init_rtti_processing): Use std_identifier.
7737
7738 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
7739
7740         * cp-tree.h (back_end_hook): Remove declaration.
7741         * decl2.c (back_end_hook): Remove definition.
7742
7743         * dump.c (dequeue_and_dump): Dump TREE_USED.
7744
7745 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
7746
7747         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
7748
7749 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
7750
7751         * decl.c (WINT_TYPE): Define.
7752         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
7753         c_size_type_node, signed_size_type_node and wint_type_node.
7754
7755 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
7756
7757         * decl2.c (warn_missing_format_attribute): New variable.
7758         (lang_decode_option): Decode -Wmissing-format-attribute.
7759
7760 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
7761
7762         * typeck.c (qualify_type): Remove.
7763         (composite_pointer_type): Fix handling of conversions to `cv void*'.
7764
7765 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7766
7767         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
7768
7769 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7770
7771         * Makefile.in (parse.c, parse.h): Create atomically.
7772
7773 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
7774
7775         * class.c (current_obstack): Remove.
7776         * decl.c (ggc_p): Remove.
7777         (start_decl): Don't use decl_tree_cons.
7778         (grokdeclarator): Don't use build_decl_list.
7779         (start_function): Don't use decl_tree_cons.
7780         (finish_function): Don't mess with obstacks.
7781         * decl2.c (grok_x_components): Don't use build_decl_list.
7782         * lex.c (make_call_declarator): Don't call decl_tree_cons.
7783         (implicitly_declare_fn): Don't call build_decl_list.
7784         * parse.y (frob_specs): Don't call build_decl_list or
7785         decl_tree_cons.
7786         (expr_or_declarator_intern): Don't call decl_tree_cons.
7787         (primary): Don't call build_decl_list.
7788         (fcast_or_absdcl): Likewise.
7789         (typed_declspecs): Don't call decl_tree_cons.
7790         (reserved_declspecs): Don't call build_decl_list.
7791         (declmods): Likewise.
7792         (reserved_typespecquals): Likewise.
7793         (aggr): Likewise.
7794         (new_type_id): Likewise.
7795         (cv_qualifiers): Likewise.
7796         (after_type_declarator_intern): Likewise.
7797         (notype_declarator_intern): Likewise.
7798         (absdcl_intern): Likewise.
7799         (named_parm): Likewise.
7800         * pt.c (most_specialized_class): Likewise.
7801         * repo.c (temporary_obstack): Make it a structure, not a pointer.
7802         (init_repo): Initialize it.
7803         * search.c (current_obstack): Remove.
7804         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
7805
7806 2000-10-09  Richard Henderson  <rth@cygnus.com>
7807
7808         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
7809         (c++ language support bits for libgcc): Remove.
7810         (c++.clean): Remove cplib2.txt cleanup.
7811         * config-lang.in (headers, lib2funcs): Remove.
7812
7813         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
7814         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
7815         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
7816         * inc/new.h, inc/typeinfo: Remove files.
7817
7818 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7819
7820         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
7821         defined.
7822         (init_decl_processing): Initialize intmax_type_node and
7823         uintmax_type_node.
7824
7825 2000-10-06  Richard Henderson  <rth@cygnus.com>
7826
7827         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
7828         (original_result_rtx): Remove.
7829         * decl.c (save_function_data): Don't clear x_result_rtx.
7830         (mark_lang_function): Don't mark it either.
7831         * expr.c (fixup_result_decl): Remove.
7832         * semantics.c (genrtl_named_return_value): Frob the return decl
7833         before calling emit_local_var.
7834         (genrtl_finish_function): Don't call fixup_result_decl.
7835         Always emit the jump to return_label.
7836
7837 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
7838
7839         * pt.c (lookup_template_class): Set current access for enum.
7840         (tsubst_enum): Set file & line for enum decl.
7841
7842         * spew.c (yylex): Remove unused variable.
7843
7844 2000-10-05  Richard Henderson  <rth@cygnus.com>
7845
7846         * semantics.c (genrtl_finish_function): Don't init or check
7847         can_reach_end; remove noreturn and return value checks.
7848
7849 2000-10-05  Tom Tromey  <tromey@cygnus.com>
7850
7851         * init.c (build_java_class_ref): Use `build_static_name' with a
7852         suffix, not a prefix, to build the class object's name.
7853
7854 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
7855
7856         * cp-tree.h (access_kind): Fix comment typo.
7857         * decl2.c (grokfield): Fix diagnostic typo.
7858         * semantics.c (finish_template_type): Fix comment typo.
7859         (finish_qualified_object_call_expr): Likewise.
7860
7861 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
7862
7863         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
7864         tsubsting fails.
7865
7866 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
7867
7868         * spew.c (frob_id): New static function.
7869         (frob_opname): Use it.
7870         (yylex): Use it.
7871
7872 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
7873
7874         * decl.c (lang_mark_false_label_stack): Remove.
7875         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
7876
7877 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
7878
7879         * gxxint.texi: Use @email for formatting email addresses.
7880
7881 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
7882
7883         * error.c: Remove direct obstack manipulation.  Replace with
7884         output_buffer-based formatting.  Adjust calls to removed macros.
7885         (obstack_chunk_alloc, obstack_chunk_free): Remove.
7886         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
7887         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
7888
7889 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
7890
7891         * ir.texi: Move to ../c-tree.texi.
7892
7893 2000-09-20  Jason Merrill  <jason@redhat.com>
7894
7895         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
7896
7897 2000-09-21  Andreas Jaeger  <aj@suse.de>
7898
7899         * errfn.c: Move declaration of cp_printer and cp_printers to ...
7900         * cp-tree.h: ... here.
7901
7902         * error.c: Remove declaration of cp_printer.
7903
7904 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
7905
7906         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
7907
7908 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
7909
7910         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
7911         users.
7912
7913 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
7914
7915         * decl.c (start_function): Robustify.
7916
7917 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7918
7919         * cp-tree.h (check_function_format): Accept a `status' parameter.
7920
7921         * call.c, typeck.c: Updates calls to `check_function_format'.
7922
7923 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
7924
7925         * decl2.c (handle_class_head): Always push some scope even
7926         in the error case.
7927
7928 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
7929
7930         * cp-tree.h (struct cp_language_function): Remove
7931         x_scope_stmt_stack and name_declared.
7932         (current_scope_stmt_stack): Remove.
7933         (function_name_declared_p): New macro.
7934         (struct lang_decl_flags): Use c_lang_decl as a base class.
7935         (context): Remove.
7936         (struct lang_decl): Replace saved_tree with context.
7937         (DECL_FRIEND_CONTEXT): Adjust accordingly.
7938         (SET_DECL_FRIEND_CONTEXT): Likewise.
7939         (DECL_VIRTUAL_CONTEXT): Likewise.
7940         (DECL_SAVED_TREE): Remove.
7941         (C_DECLARED_LABEL_FLAG): Likewise.
7942         (cplus_expand_expr_stmt): Don't declare.
7943         (add_decl_stmt): Likewise.
7944         (add_scope_stmt): Likewise.
7945         * decl.c (mark_stmt_tree): Remove.
7946         (case_compare): Likewise.
7947         (finish_case_label): Use c_add_case_label.
7948         (init_decl_processing): Set more language-specific hooks.
7949         (build_enumerator): Fix typo in comment.
7950         (cplus_expand_expr_stmt): Remove.
7951         (mark_lang_function): Use mark_c_language_function.
7952         (lang_mark_tree): Use c_mark_lang_decl.
7953         * decl2.c: Change order of inclusion.
7954         * except.c: Likewise.
7955         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
7956         back on c_expand_expr.
7957         * friend.c: Include expr.h.
7958         * init.c: Change order of inclusion.
7959         * Makefile.in: Update dependencies.
7960         * lex.h (free_lang_decl_chain): Remove.
7961         * optimize.c (maybe_clone_body): Use function_name_declared_p.
7962         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
7963         it doesn't exist.
7964         (instantiate_decl): Use function_name_declared_p.
7965         * semantics.c (lang_expand_expr_stmt): Remove.
7966         (set_current_function_name_declared): Likewise.
7967         (current_function_name_declared): Likewise.
7968         (begin_compound_stmt): Use function_name_declared_p.
7969         (add_decl_stmt): Remove.
7970         (setup_vtbl_ptr): Use function_name_declared_p.
7971         (add_scope_stmt): Remove.
7972         (current_scope_stmt_stack): New function.
7973         (cp_expand_stmt): Don't handle SCOPE_STMTs.
7974         (expand_body): Use function_name_declared_p.
7975         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
7976         * typeck.c: Change order of includes.
7977         (convert_sequence): Remove.
7978
7979 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
7980
7981         * lex.c (reswords): Add _Complex.
7982
7983 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7984
7985         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
7986
7987 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
7988
7989         * init.c (begin_init_stmts): Don't use // comments.
7990
7991 2000-09-12  Jason Merrill  <jason@redhat.com>
7992
7993         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
7994         all non-extern arrays.
7995
7996         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
7997         typenames, too.  Downgrade complaint to pedwarn.
7998         (xref_tag): Warn about surprising behavior of 'friend struct T'.
7999         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
8000         'class This::Inherited'.
8001
8002 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
8003
8004         * decl.c (finish_case_label): Given the LABEL_DECL a
8005         DECL_CONTEXT.
8006
8007 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
8008
8009         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
8010         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
8011         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
8012         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
8013         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
8014         New macros.
8015         (sorry_for_unsupported_tree, print_scope_operator,
8016         print_left_paren, print_right_paren, print_left_bracket,
8017         print_right_bracket, print_whitespace): Likewise.
8018         (aggr_variety): Rename to class_key_or_enum.
8019         (print_type): Rename to print_type_id.
8020         (print_type_specifier_seq, print_simple_type_specifier,
8021         print_elaborated_type_specifier,
8022         print_rest_of_abstract_declarator,
8023         print_parameter_declaration_clause, print_exception_specification,
8024         print_nested_name_specifier, print_template_id,
8025         typedef_original_name,  print_template_argument_list_start,
8026         print_template_argument_list_end): New functions.
8027
8028 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
8029
8030         * ir.texi: Add more documentation.
8031
8032 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
8033
8034         * cp-tree.h (struct saved_scope): Remove x_function_parms.
8035         (current_function_parms): Don't define.
8036         (struct cp_language_function): Remove parms_stored.
8037         (current_function_just_assigned_this): Don't define.
8038         (current_function_parms_stored): Likewise.
8039         (static_ctors): Declare.
8040         (static_dtors): Likewise.
8041         (SF_EXPAND): Don't define.
8042         (expand_start_early_try_stmts): Remove declaration.
8043         (store_parm_decls): Likewise.
8044         * decl.c (static_ctors): Don't declare.
8045         (static_dtors): Likewise.
8046         (struct binding_level): Remove this_block.
8047         (poplevel): Remove dead code.
8048         (set_block): Likewise.
8049         (mark_binding_level): Don't mark this_block.
8050         (mark_saved_scope): Don't mark x_function_parms.
8051         (init_decl_processing): Don't add current_function_parms as a GC
8052         root.
8053         (check_function_type): Change prototype.
8054         (start_function): Remove RTL-generation code.
8055         (expand_start_early_try_stmts): Remove.
8056         (store_parm_decls): Give it internal linkage.  Remove
8057         RTL-generation code.
8058         (finish_function): Remove RTL-generation code.
8059         * decl2.c (static_ctors): Fix formatting.
8060         (static_dtors): Likewise.
8061         * method.c (use_thunk): Don't call store_parm_decls.
8062         (synthesize_method): Likewise.
8063         * optimize.c (maybe_clone_body): Likewise.
8064         * parse.y (fn.def2): Likewise.
8065         (.set_base_init): Likewise.
8066         (nodecls): Likewise.
8067         * pt.c (instantiate_decl): Likewise.
8068         * rtti.c (synthesize_tinfo_fn): Likewise.
8069         * semantics.c (genrtl_try_block): Simplify.
8070         (expand_body): Use genrtl_start_function and
8071         genrtl_finish_function.
8072         (genrtl_start_function): New function.
8073         (genrtl_finish_function): Likewise.
8074
8075 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
8076
8077         * error.c (cp_tree_printer, case 'P'): Append break.
8078
8079 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
8080
8081         * cp-tree.h (frob_opname): Declare.
8082         * parse.y (saved_scopes): New static variable.
8083         (cp_parse_init): Adjust.
8084         (do_id): If lastiddecl is NULL, do do_identifier.
8085         (operator): Save scope information.
8086         (unoperator): New reduction. Restore scope information.
8087         (operator_name): Append unoperator. Call frob_opname.
8088         * spew.c (frob_opname): Define.
8089
8090 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
8091
8092         * decl.c, rtti.c: Include defaults.h if not already included.
8093         Don't define the *_TYPE_SIZE macros.
8094
8095 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
8096
8097         * cp-tree.h (push_switch): Change prototype.
8098         (check_cp_case_value): Remove declaration.
8099         (decl_constant_value): Likewise.
8100         * decl.c (struct cp_switch): Add switch_stmt and cases.
8101         (case_compare): New function.
8102         (push_switch): Set switch_stmt.  Initialize cases.
8103         (pop_switch): Clean up cases.
8104         (define_case_label): Rename to ...
8105         (finish_case_label): ... this.  Do semantic analysis for case
8106         labels here.
8107         (start_function): Correct comment.
8108         * decl2.c (check_cp_case_value): Remove.
8109         * expr.c (do_case): Remove.
8110         * pt.c (tsubst_expr): Adjust call to finish_case_label.
8111         * semantics.c (genrtl_do_poplevel): Remove declaration.
8112         (RECHAIN_STMTS): Remove.
8113         (finish_break_stmt): Use build_break_stmt.
8114         (finish_continue_stmt): Use build_continue_stmt.
8115         (finish_switch_cond): Adjust condition here, rater than in
8116         c_expand_start_case.
8117         (finish_case_label): Remove.
8118         * typeck.c (c_expand_return): Remove.
8119         (c_expand_start_case): Likewise.
8120
8121 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
8122
8123         * ir.texi: Document type nodes.
8124
8125 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
8126
8127         * cp-tree.h (init_cp_semantics): Declare.
8128         (genrtl_try_block): Don't declare.
8129         (genrtl_handler): Likewise.
8130         (genrtl_catch_block): Likewise.
8131         (genrtl_ctor_stmt): Likewise.
8132         (genrtl_subobject): Likewise.
8133         (genrtl_do_poplevel): Likewise.
8134         (genrtl_named_return_value): Likewise.
8135         * lex.c (init_parse): Call init_cp_semantics.
8136         * semantics.c (genrtl_try_block): Give it internal linkage.
8137         (genrtl_handler): Likewise.
8138         (genrtl_catch_block): Likewise.
8139         (genrtl_ctor_stmt): Likewise.
8140         (genrtl_subobject): Likewise.
8141         (genrtl_do_poplevel): Likewise.
8142         (genrtl_named_return_value): Likewise.
8143         (lang_expand_stmt): Rename to ...
8144         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
8145         (init_cp_semantics): Define.
8146
8147         * decl.c (initialize_local_var): Remove RTL-generating code.
8148         * semantics.c (genrtl_try_block): Fix formatting.
8149
8150         Move statement-tree facilities from C++ to C front-end.
8151         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
8152         (void_zero_node): Remove.
8153         (stmt_tree): Likewise.
8154         (scope_chain): Adjust.
8155         (language_function): Rename to cp_language_function.
8156         (cp_function_chain): Adjust.
8157         (current_stmt_tree): Remove.
8158         (last_tree): Likewise.
8159         (last_expr_type): Likewise.
8160         (struct lang_decl): Adjust.
8161         (STMT_IS_FULL_EXPR_P): Remove.
8162         (add_tree): Remove.
8163         (begin_stmt_tree): Likewise.
8164         (finish_stmt_tree): Likewise.
8165         (walk_tree_fn): Likewise.
8166         (walk_stmt_tree): Likewise.
8167         * class.c (finish_struct): Replace use of add_tree with add_stmt.
8168         * decl.c (mark_stmt_tree): Adjust type.
8169         (init_decl_processing): Don't build void_zero_node.
8170         (initialize_local_var): Adjust usage of current_stmt_tree.
8171         (finish_enum): Use add_stmt, not add_tree.
8172         (save_function_data): Adjust use of language_function.
8173         (finish_constructor_body): Use add_stmt, not add_tree.
8174         (finish_destructor_body): Likewise.
8175         (push_cp_function_context): Adjust use of language_function.
8176         (pop_cp_function_context): Likewise.
8177         (mark_lang_function): Likewise.
8178         (mark_cp_function_context): Likewise.
8179         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
8180         (build_vec_init): Likewise.
8181         * semantics.c (SET_LAST_STMT): Remove.
8182         (RECHAIN_STMTS): Don't use it.
8183         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
8184         (current_stmt_tree): Define.
8185         (add_tree): Remove.
8186         (finish_goto_stmt): Use add_stmt, not add_tree.
8187         (finish_expr_stmt): Likewise.
8188         (begin_if_stmt): Likewise.
8189         (finish_then_clause): Likewise.
8190         (begin_while_stmt): Likewise.
8191         (begin_do_stmt): Likewise.
8192         (finish_return_stmt): Likewise.
8193         (begin_for_stmt): Likewise.
8194         (finish_break_stmt): Likewise.
8195         (finish_continue_stmt): Likewise.
8196         (begin_switch_stmt): Likewise.
8197         (finish_case_label): Likewise.
8198         (begin_try_block): Likewise.
8199         (begin_function_try_block): Likewise.
8200         (begin_handler): Likewise.
8201         (begin_catch_block): Likewise.
8202         (begin_compound_stmt): Likewise.
8203         (begin_asm_stmt): Likewise.
8204         (finish_asm_stmt): Likewise.
8205         (finish_label_stmt): Likewise.
8206         (add_decl_stmt): Likewise.
8207         (finish_subobject): Likewise.
8208         (finish_decl_cleanup): Likewise.
8209         (finish_named_return_value): Likewise.
8210         (setup_vtbl_ptr): Likewise.
8211         (add_scope_stmt): Likewise.
8212         (finish_stmt_expr): Likewise.
8213         (prune_unused_decls): Remove.
8214         (begin_stmt_tree): Likewise.
8215         (finish_stmt_tree): Likewise.
8216         (prep_stmt): Adjust use of current_stmt_tree.
8217         (lang_expand_stmt): Likewise.
8218         * tree.c (statement_code_p): Remove.
8219         (cp_statement_code_p): New function.
8220         (walk_stmt_tree): Remove.
8221         (init_tree): Set lang_statement_code_p.
8222
8223 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
8224
8225         Integrated preprocessor.
8226
8227         * Make-lang.in, Makefile.in: Remove all references to input.c,
8228         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
8229         * gxx.gperf, hash.h, input.c: Delete.
8230         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
8231         initialized properly.
8232
8233         * class.c (fixup_pending_inline): Take a tree, not a
8234         struct pending_inline *.  All callers changed.
8235         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
8236         RID_PROTECTED entries in ridpointers[] array here.
8237         * decl.c (duplicate_decls): Do not refer to struct
8238         pending_inline.
8239         (record_builtin_type, init_decl_processing): Use RID_MAX not
8240         CP_RID_MAX.
8241         (grokdeclarator): Use C_IS_RESERVED_WORD.
8242         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
8243         cpplib.
8244         (grok_x_components): Do not inspect pending_inlines chain.
8245
8246         * cp-tree.h (struct lang_identifier): Add rid_code entry.
8247         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
8248         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
8249         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
8250         TIME_IDENTIFIER_FILEINFO): Kill.
8251         Update prototypes.
8252         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
8253         single 32-bit word.
8254         * parse.y: Call do_pending_inlines unconditionally.
8255         reinit_parse_for_method is now snarf_method.  fn.defpen is no
8256         longer necessary.  Remove unnecessary <itype> annotation on
8257         SCOPE.  Do not refer to end_of_file or struct pending_inline.
8258         * semantics.c (begin_inline_definitions): Call
8259         do_pending_inlines unconditionally.
8260
8261         * lex.c: Remove all code now shared with C front end.
8262         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
8263         into the get_identifier table.  Rewrite pragma handling to
8264         work with the registry.  Move code to save tokens for later
8265         processing to spew.c.
8266
8267         * spew.c: Rewrite everything in terms of token streams instead
8268         of text.  Move routines here from lex.c / input.c as
8269         appropriate.  GC-mark trees hanging off the pending inlines
8270         chain.
8271
8272 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
8273
8274         * NEWS: Mention that the named return value extension has been
8275         deprecated.
8276         * cp-tree.h (original_result_rtx): Define.
8277         (TREE_REFERENCE_EXPR): Remove.
8278         (DECL_VPARENT): Likewise.
8279         (pushdecl_nonclass_level): Likewise.
8280         (store_return_init): Likewise.
8281         (reinit_lang_specific): Likewise.
8282         (genrtl_named_return_value): Change prototype.
8283         * decl.c (original_result_rtx): Remove.
8284         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
8285         Do not generate RTL for local variables here.
8286         (store_return_init): Remove.
8287         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
8288         store_return_init.
8289         (finish_named_return_value): Adjust accordingly.  Warn that this
8290         extension is deprecated.
8291         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
8292
8293 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8294
8295         * pt.c (type_unification_real): Replace switch with if.
8296         (unify): Tsubst non-type parms before comparing.
8297
8298 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8299
8300         * error.c (dump_typename): New function, broken out of ...
8301         (dump_type): ... here. Use it.
8302         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
8303
8304 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8305
8306         * init.c (build_offset_ref): Deal with namespace scoped
8307         TEMPLATE_ID_EXPRs.
8308
8309 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
8310
8311         * class.c (resolve_address_of_overloaded_function): Add
8312         explanation message.
8313         * decl.c (define_case_label): Reformat explanation.
8314         * decl2.c (finish_static_data_member_decl): Likewise.
8315         (grokfield): Likewise.
8316         * friend.c (do_friend): Likewise.
8317
8318 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
8319
8320         * tree.c (walk_tree): Expose tail recursion.
8321         (walk_stmt_tree): New function.
8322         * cp-tree.h: Prototype walk_stmt_tree.
8323         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
8324         the BLOCKs directly.  If a BLOCK has no variables after
8325         pruning, discard it.
8326         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
8327         restore the line number.
8328
8329 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
8330
8331         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
8332         (pt.o): Remove dependency on HTAB_H.
8333         * cp-tree.h: Include hashtab.h.
8334         (walk_tree): Change prototype.
8335         (walk_tree_without_duplicates): New function.
8336         * decl.c (check_default_argument): Use it.
8337         * optimize.c (remap_decl): Adjust calls to walk_tree.
8338         (copy_body): Likewise.
8339         (expand_calls_inline): Likewise.
8340         (calls_setjmp_p): Use walk_tree_without_duplicates.
8341         * pt.c: Don't include hashtab.h.
8342         (for_each_template_parm): Use walk_tree_without_duplicates.
8343         * semantics.c (finish-stmt_tree): Likewise.
8344         (expand_body): Likewise.
8345         * tree.c (walk_tree): Add additional parameter.
8346         (walk_tree_without_duplicates): New function.
8347         (count_trees): Use it.
8348         (verify_stmt_tree): Adjust call to walk_tree.
8349         (find_tree): Use walk_tree_without_duplicates.
8350         (no_linkage_check): Likewise.
8351         (break_out_target_exprs): Adjust call to walk_tree.
8352         (cp_unsave): Likewise.
8353
8354 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8355
8356         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
8357         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
8358         * cp-tree.h (TYPE_BINFO): Adjust comment.
8359         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
8360         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
8361         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
8362         (TYPE_TEMPLATE_INFO): Likewise.
8363         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
8364         * class.c (push_nested_class): Likewise.
8365         * decl.c (lookup_name_real): Likewise.
8366         (grokdeclarator): Likewise.
8367         (grok_op_properties): Likewise.
8368         (xref_tag): Likewise.
8369         (xref_basetypes): Likewise.
8370         * decl2.c (constructor_name_full): Likewise.
8371         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
8372         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
8373         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
8374         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8375         (dump_type_suffix): Likewise.
8376         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
8377         instead.
8378         (get_aggr_from_typedef): Likewise.
8379         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
8380         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8381         (write_template_parm): Likewise.
8382         (write_template_template_parm): Check tree code instead of
8383         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8384         * method.c (build_overload_nested_name): Add
8385         BOUND_TEMPLATE_TEMPLATE_PARM.
8386         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
8387         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8388         * pt.c (convert_template_argument): Check tree code instead of
8389         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8390         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
8391         (for_each_template_parm): Adjust comment.
8392         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
8393         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8394         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
8395         template_args_equal to compare template template parameter cases.
8396         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8397         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
8398         instead.
8399         * tree.c (copy_template_template_parm): Decide whether to create
8400         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
8401         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
8402         (copy_tree_r): Likewise.
8403         * typeck.c (comptypes): Likewise.  Check tree code instead of
8404         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
8405
8406 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
8407
8408         * decl.c (finish_function): Move the code for handling functions
8409         marked with the constructor and destructor attributes inside the
8410         expand_p block.
8411
8412 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
8413
8414         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
8415
8416 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
8417
8418         * pt.c (lookup_template_class): Remove abort.
8419         * tree.c (get_type_decl): Allow error_mark_node.
8420
8421 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
8422
8423         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
8424         TEMPLATE_ID_EXPRs.
8425
8426 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
8427
8428         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
8429         new ABI mangling.
8430
8431 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
8432
8433         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
8434         union tag mismatch error reporting.
8435
8436 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
8437
8438         * call.c (build_scoped_method_call): Check it is not a namespace.
8439
8440 2000-08-30  Jason Merrill  <jason@redhat.com>
8441
8442         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
8443
8444         * tree.c (bot_manip): Check TREE_CONSTANT rather than
8445         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
8446         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
8447
8448         * decl.c (start_function): Always call make_function_rtl.
8449
8450 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
8451
8452         * semantics.c (prune_unused_decls): New function.
8453         (finish_stmt_tree): Call it via walk_tree.
8454
8455 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
8456
8457         * class.c (build_secondary_vtable): Constify a char *.
8458         * decl.c (init_decl_processing): Initialize function_id_node,
8459         pretty_function_id_node, and func_id_node.
8460         * input.c (struct input_source): Constify 'str'.
8461         (feed_input): Constify first argument.
8462         * mangle.c (write_identifier): Constify argument.
8463         * pt.c (mangle_class_name_for_template): Constify argument.
8464
8465 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
8466
8467         * typeck.c (mark_addressable): Remove code that pokes around in
8468         RTL.
8469
8470 2000-08-28  Jason Merrill  <jason@redhat.com>
8471
8472         * lex.c (file_name_nondirectory): Move to toplev.c.
8473
8474         * cp-tree.h (LOCAL_CLASS_P): New macro.
8475         * class.c (finish_struct_1): Use it.
8476
8477 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
8478
8479         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
8480         (write_encoding): Pass another argument to write_name.
8481         (write_name): Add ignore_local_scope parameter.  Fix handling of
8482         local names.
8483         (write_nested_name): Use write_unqualified_name.
8484         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
8485         (write_template_prefix): Use write_unqualified_name.
8486         (write_component): Remove.
8487         (write_local_name): Add parameter.  Use direct local entity to
8488         discriminator calculation.
8489         (write_class_enum_type): Pass another argument to write_name.
8490         (write_template_template_arg): Likewise.
8491         (make_guard_variable): Likewise.
8492
8493 2000-08-27  Jason Merrill  <jason@redhat.com>
8494
8495         * decl.c (pushdecl): Matching decls for local externs are found in
8496         the current level.  Propagate linkage information from previous
8497         declarations.
8498
8499 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8500
8501         * ir.texi (Expressions): Fix typo.
8502
8503 2000-08-25  Greg McGary  <greg@mcgary.org>
8504
8505         * tree.c (init_tree): Use ARRAY_SIZE.
8506
8507 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
8508
8509         * error.c (cp_tree_printer): Rework.
8510
8511 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
8512
8513         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
8514         dyn-string.o.
8515         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
8516         (cp-demangle.o): Remove target.
8517         (dyn-string.o): Likewise.
8518
8519         * decl.c (grokfndecl): Require that `main' return an `int'.
8520         * mangle.c (write_encoding): Don't mangle return types for
8521         conversion functions.
8522
8523 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
8524
8525         * error.c (tree_formatting_info): New data type.
8526         (tree_being_formatted): New macro.
8527         (tree_formatting_flags): Likewise.
8528         (put_whitespace): Likewise.
8529         (print_tree_identifier): Likewise.
8530         (print_identifier): Likewise.
8531         (cp_tree_printer, print_function_argument_list, print_declaration,
8532         print_expression, print_function_declaration,
8533         print_function_parameter, print_type, print_cv_qualifier): New
8534         functions.
8535         (init_error): Initialize lang_printer.
8536
8537 2000-08-24  Jason Merrill  <jason@redhat.com>
8538
8539         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
8540         adjustment necessary.
8541
8542 2000-08-24  Greg McGary  <greg@mcgary.org>
8543
8544         * cp-tree.h (MAIN_NAME_P): Remove macro.
8545
8546 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
8547
8548         * error.c (print_instantiation_context): Don't forget to flush the
8549         buffer.
8550
8551 2000-08-23  Jason Merrill  <jason@redhat.com>
8552
8553         * typeck.c (build_ptrmemfunc): Save the input pmf.
8554
8555         * method.c (process_modifiers): Use same_type_p.
8556
8557 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
8558
8559         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
8560         * mangle.c (write_function_type): Change prototype.
8561         (write_encoding): Don't mangle return types for
8562         constructors or destructors.
8563         (write_type): Adjust call to write_function_type.
8564         * pt.c (instantiate_template): Instantiate alternate entry points
8565         when instantiating the main function.
8566
8567 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
8568
8569         * error.c (cp_print_error_function): Don't use embedded '\n' in
8570         output_printf.
8571
8572 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
8573
8574         * decl.c (init_decl_processing): Remove bogus initialization.
8575         * error.c (lang_print_error_function): Restore here.
8576         (init_error): Initialize print_error_function.
8577
8578 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8579
8580         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
8581
8582 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
8583
8584         * Makefile.in (error.o): Depends on diagnostic.h
8585
8586         * cp-tree.h (problematic_instantiation_changed,
8587         record_last_problematic_instantiation, current_instantiation,
8588         print_instantiation_context): Declare.
8589         (maybe_print_template_context): Remove.
8590
8591         * decl.c (init_decl_processing): Set print_error_function to NULL.
8592         (lang_print_error_function): Remove, since we're using a new
8593         machinery.
8594
8595         * error.c: #include diagnostic.h
8596         (function_category): New function.
8597         (cp_diagnostic_starter): Likewise.
8598         (cp_diagnostic_finalizer): Likewise.
8599         (cp_print_error_function): Likewise.
8600         (maybe_print_instantiation_context): Likewise.
8601         (print_instantiation_full_context): Likewise.
8602         (print_instantiation_partial_context): Likewise.
8603         (print_instantiation_context): Define.
8604         (init_error): Initialize diagnostic pager and finalizer.
8605
8606         * pt.c (problematic_instantiation_changed): Define.
8607         (record_last_problematic_instantiation): Likewise.
8608         (current_instantiation): Likewise.
8609         (maybe_print_template_context): Remove.
8610         (print_template_context): Likewise.
8611         (current_tinst_level): Make static to reflect Brendan Kehoe's
8612         change of 1995-04-13.
8613         (push_tinst_level): Call print_instantiation_context.
8614
8615 2000-08-21  Nix  <nix@esperi.demon.co.uk>
8616
8617         * lang-specs.h: Do not process -o or run the assembler if
8618         -fsyntax-only.
8619
8620 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
8621
8622         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
8623         variables.
8624         * decl2.c (lang_decode_option): Disable gettext attributes for
8625         -ansi.
8626
8627 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
8628
8629         * lex.c (lang_init_options): Default diagnostic message maximum
8630         length to 80, when line-wrapping.
8631
8632 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
8633
8634         * class.c (build_vtbl_initializer): Clear the entire
8635         vtbl_init_data.  Start keeping track of the functions for which we
8636         have created vcall offsets here.
8637         (dfs_build_vcall_offset_vtbl_entries): Remove.
8638         (build_vcall_offset_vtbl_entries): Reimplement.
8639         (add_vcall_offset_vtbl_entries_r): New function.
8640         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
8641         computing when vcall offsets are necessary.
8642
8643 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
8644
8645         * decl.c (member_function_or_else): Use cp_error ... %T.
8646         (grokdeclarator): Likewise.
8647         (start_method): Likewise.
8648         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
8649
8650 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
8651
8652         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
8653         TYPE_DECLs.
8654
8655 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
8656
8657         * cp-tree.h (PTRMEM_OK_P): New macro.
8658         (itf_ptrmem_ok): New enumeration value.
8659         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
8660         argument. Diagnose implicit pointer to member.
8661         (instantiate_type): Don't diagnose implicit pointer to member
8662         here. Pass itf_ptrmem_ok if ok. Adjust calls to
8663         resolve_address_of_overloaded_function.
8664         * init.c (build_offset_ref): Set PTRMEM_OK_P.
8665         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
8666         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
8667         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
8668         (build_unary_op): Deal with single non-static member in
8669         microsoft-land.
8670
8671 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
8672
8673         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
8674
8675 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
8676
8677         * cp-tree.h (enum_name_string): Remove prototype.
8678         (report_case_error): Remove prototype.
8679         * cp/typeck2.c (enum_name_string): Remove.
8680         (report_case_error): Remove.
8681         * error.c (dump_expr): Deal with enum values directly.
8682         Correctly negate integer constant.
8683
8684 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
8685
8686         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
8687         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
8688         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
8689         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
8690         (__cxa_vec_new): Use __cxa_vec_new2.
8691         (__cxa_vec_delete): Use __cxa_vec_delete2.
8692
8693 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
8694
8695         * vec.cc (__cxa_vec_new): Set "C" linkage.
8696         (__cxa_vec_ctor): Likewise.
8697         (__cxa_vec_cctor): Likewise.
8698         (__cxa_vec_dtor): Likewise.
8699         (__cxa_vec_delete): Likewise.
8700         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
8701         (__cxa_vec_ctor): Likewise.
8702         (__cxa_vec_cctor): Likewise.
8703         (__cxa_vec_dtor): Likewise.
8704         (__cxa_vec_delete): Likewise.
8705
8706 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
8707
8708         * class.c (instantiate_type): Reinstate local variable
8709         deleted in previous change.
8710
8711         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
8712         itf_no_attributes.
8713
8714 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
8715
8716         * cp-tree.h (instantiate_type_flags): New enumeration.
8717         (instantiate_type): Change parameter.
8718         * class.c (instantiate_type): Adjust prototype. Adjust.
8719         * call.c (standard_conversion): Adjust instantiate_type call.
8720         (reference_binding): Likewise.
8721         (build_op_delete_call): Likewise.
8722         (convert_like_real): Likewise.
8723         * cvt.c (cp_convert_to_pointer): Likewise.
8724         (convert_to_reference): Likewise.
8725         * pt.c (convert_nontype_argument): Likewise.
8726         * typeck.c (build_binary_op): Likewise.
8727         (build_ptrmemfunc): Likewise.
8728         (convert_for_assignment): Likewise.
8729
8730 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
8731
8732         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
8733         (current_aggr): Define.
8734         * decl.c (grokdeclarator): Make sure a friend class is an
8735         elaborated type specifier.
8736         * parse.y (current_aggr): Remove static definition.
8737         (cp_parse_init): Adjust.
8738         (structsp): Clear and restore current_aggr.
8739         (component_decl_list): Clear current_aggr.
8740
8741         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
8742         aggregate tag on the typename's context.
8743
8744         * pt.c (tsubst_friend_class): Return error_mark_node, if
8745         parms becomes NULL.
8746         (instantiate_class_template): Ignore error_mark_node friend types.
8747
8748 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
8749
8750         * cvt.c (warn_ref_binding): New static function, broken out of ...
8751         (convert_to_reference): ... here. Use it.
8752
8753 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8754
8755         * parse.y (template_arg): Add rule for template qualified with
8756         global scope.
8757
8758 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8759
8760         * decl2.c (add_function): Reorganize.
8761         (arg_assoc): Do not consider function template decls.
8762
8763 2000-08-11  Jason Merrill  <jason@redhat.com>
8764
8765         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
8766         looking inside.
8767
8768 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
8769
8770         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
8771         (lookup_nested_tag): Likewise.
8772
8773         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
8774         can be produced.
8775
8776 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
8777
8778         * parse.y (named_complex_class_head_sans_basetype): Remove
8779         always true if.
8780
8781 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
8782
8783         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
8784         explicit TEMPLATE_ID_EXPR args.
8785         (build_expr_from_tree, case CALL_EXPR): Likewise.
8786
8787 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
8788
8789         * decl.c (check_tag_decl): Diagnose typename's which don't
8790         declare anything.
8791
8792 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
8793
8794         * init.c (build_aggr_init): Reject bogus array initializers
8795         early.
8796
8797 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
8798
8799         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
8800         runtime.
8801         * cp/tinfo.cc (__dynamic_cast): Likewise.
8802         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
8803
8804 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
8805
8806         * cvt.c (convert_to_pointer_force): Fix error message when
8807         attempting to cast from ambiguous base.
8808
8809 2000-08-08  Jason Merrill  <jason@redhat.com>
8810
8811         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
8812         (tsubst_template_arg_vector): Likewise.
8813
8814         * decl2.c (build_anon_union_vars): Choose the largest field; don't
8815         assume that one will be as large as the union.
8816
8817 2000-08-07  Kazu Hirata  <kazu@hxi.com>
8818
8819         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
8820         * decl.c (pop_labels): Likewise.
8821
8822 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
8823
8824         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
8825         specifications.
8826         (__pointer_to_member_type_info): Likewise.
8827         (__base_class_info): Likewise.
8828         (__class_type_info): Likewise.
8829         (__si_class_type_info): Likewise.
8830         (__vmi_class_type_info): Likewise.
8831         * tinfo.cc (__si_class_type_info::__do_find_public_src):
8832         Changed member names to match specifications.
8833         (__vmi_class_type_info::__do_find_public_src): Likewise.
8834         (__si_class_type_info::__do_dyncast): Likewise.
8835         (__vmi_class_type_info::__do_dyncast): Likewise.
8836         (__si_class_type_info::__do_upcast): Likewise.
8837         (__vmi_class_type_info::__do_upcast): Likewise.
8838         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
8839         (__pbase_type_info::__pointer_catch): Likewise.
8840         (__pointer_type_info::__pointer_catch): Likewise.
8841         (__pointer_to_member_type_info::__pointer_catch): Likewise.
8842
8843 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
8844
8845         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
8846         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
8847         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
8848
8849 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
8850
8851         * cp-tree.h (add_method): Change prototype.
8852         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
8853         Don't double the size of the method vector in the error case.
8854         (handle_using_decl): Adjust call to add_method.
8855         (add_implicitly_declared_members): Likewise.
8856         (clone_function_decl): Likewise.
8857         * decl2.c (check_classfn): Likewise.
8858         * semantics.c (finish_member_declaration): Likewise.
8859
8860 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
8861
8862         * decl.c (flag_isoc94): New variable.
8863
8864 2000-08-02  Jason Merrill  <jason@redhat.com>
8865
8866         * pt.c (do_type_instantiation): Add complain parm; don't complain
8867         if called recursively.
8868         * cp-tree.h, parse.y: Adjust.
8869
8870 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
8871
8872         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
8873         -Wno-strict-prototypes.
8874
8875         * g++spec.c: Adjust type of second argument to
8876         lang_specific_driver, and update code as necessary.
8877
8878         * cp-tree.h: Don't prototype min_precision here.
8879         (my_friendly_assert): Cast expression to void.
8880         * semantics.c (do_poplevel): Initialize scope_stmts.
8881
8882 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
8883
8884         * cp-tree.h (DECL_NEEDED_P): Tweak.
8885
8886 2000-07-28  Jason Merrill  <jason@redhat.com>
8887
8888         * lang-specs.h: Use %i in rule for .ii files.
8889
8890 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
8891
8892         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
8893
8894 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
8895
8896         Allow indirect primary bases.
8897         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
8898         primary_base.
8899         (CLASSTYPE_VFIELD_PARENT): Remove.
8900         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
8901         (BINFO_PRIMARY_BINFO): Remove.
8902         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
8903         (BINFO_VBASE_PRIMARY_P): Likewise.
8904         (BINFO_PRIMARY_BASE_OF): New macro.
8905         (BINFO_INDIRECT_PRIMARY_P): Likewise.
8906         (get_primary_binfo): New function.
8907         * decl.c (lang_mark_tree): Make lang_type::primary_base.
8908         * class.c (vcall_offset_data_s): Rename to ...
8909         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
8910         and add ctor_vtbl_p.
8911         (get_derived_offset): Use get_primary_binfo.
8912         (dfs_mark_primary_bases): Adjust handling of virtual primary
8913         bases.
8914         (mark_primary_bases): Likewise.
8915         (set_primary_base): Take a binfo, not an integer, as a
8916         representation of the primary base.
8917         (indirect_primary_base_p): Remove.
8918         (determine_primary_base): Adjust for indirect primary bases.
8919         (dfs_find_final_overrider): Fix typo in coment.
8920         (update_vtable_entry_for_fn): Use get_primary_binfo.
8921         (layout_nonempty_base_or_field): Tweak.
8922         (build_base_fields): Adjust for new primary base semantics.
8923         (dfs_propagate_binfo_offsets): Remove.
8924         (propagate_binfo_offsets): Rewrite.
8925         (dfs_set_offset_for_shared_vbases): Remove.
8926         (layout_virtual_bases): Don't use it.
8927         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
8928         ABI.
8929         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
8930         CLASSTYPE_VFIELD_PARENT.
8931         (dfs_get_primary_binfo): New function.
8932         (get_primary_binfo): Likewise.
8933         (dump_class_hierarchy_r): Tweak printing of primary bases.
8934         (build_vtbl_initializer): Fix typo in comments.  Use
8935         vtbl_init_data.
8936         (build_vcall_and_vbase_vtbl_entries): Likewise.
8937         (build_vbaes_offset_vtbl_entries): Likewise.
8938         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
8939         BV_VCALL_INDEX to handle indirect primary bases.
8940         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
8941         (build_rtti_vtbl_entries): Likewise.
8942         * search.c (get_shared_vbase_if_not_primary): Tweak.
8943         (find_vbase_instance): Likewise.
8944         (binfo_for_vtable): Simplify.
8945         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
8946         (make_binfo): Make it have 11 entries.
8947
8948 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
8949
8950         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
8951         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
8952         ascertaining primaryness.
8953         (G): Remove template_args.
8954         (decl_is_template_id): New function.
8955         (write_encoding): Use decl_is_template_id.
8956         (write_name): Likewise.  Handle type_decls.  Get main variant of
8957         type decls.
8958         (write_nested_name): Likewise.
8959         (write_prefix): Likewise.
8960         (write_template_prefix): Likewise.
8961         (write_special_name_constructor): Remove defunct production from
8962         comment.
8963         (write_bare_function_type): Remove comment about absent parameter.
8964         (write_template_template_arg): Add missing grammar production to
8965         comment.
8966
8967 2000-07-27  Jason Merrill  <jason@redhat.com>
8968
8969         * decl.c (duplicate_decls): If common_type produces a non-typedef
8970         type for a typedef, just use the old type.
8971
8972 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
8973
8974         * cp-tree.h (function_depth): Declare.
8975         (verify_stmt_tree): Likewise.
8976         (find_tree): Likewise.
8977         * decl.c (function_depth): Give it external linkage.
8978         * optimize.c (optimize_function): Increment and decrement it.
8979         * tree.c (verify_stmt_tree_r): New function.
8980         (verify_stmt_tree): Likewise.
8981         (find_tree_r): Likewise.
8982         (find_tree): Likewise.
8983
8984 2000-07-27  Jason Merrill  <jason@redhat.com>
8985
8986         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
8987         TYPE_PTRMEMFUNC_P.
8988         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
8989
8990 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
8991
8992         * decl.c (start_cleanup_fn): Mark the function as `inline'.
8993         * decl2.c (get_guard): Call cp_finish_decl, not
8994         rest_of_decl_compilation, for local guards.
8995         * lex.c (do_identifier): Remove unused variable.
8996
8997 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
8998
8999         * parse.y:  Add missing ';'.
9000
9001 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
9002
9003         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
9004         of `extern "C++"'.
9005
9006 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
9007
9008         Kill strict_prototype. Backwards compatibility only for
9009         non NO_IMPLICIT_EXTERN_C systems.
9010         * cp-tree.h (flag_strict_prototype): Remove.
9011         (strict_prototype): Remove.
9012         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
9013         * decl.c (maybe_push_to_top_level): Adjust.
9014         (pop_from_top_level): Adjust.
9015         (decls_match): Only allow sloppy parm matching for ancient
9016         system headers.
9017         (init_decl_processing): Adjust.
9018         (grokdeclarator): Adjust.
9019         * decl2.c (flag_strict_prototype): Remove.
9020         (strict_prototype): Remove.
9021         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
9022         (lang_f_options): Remove "strict-prototype".
9023         (unsupported-options): Add "strict-prototype".
9024         * lex.c (do_identifier): Adjust.
9025         (do_scoped_id): Adjust.
9026         * parse.y (empty_parms): Adjust.
9027         * class.c (push_lang_context): Adjust.
9028         (pop_lang_context): Adjust.
9029         * typeck.c (comp_target_parms): Adjust.
9030
9031 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
9032
9033         * decl.c (poplevel): Deal with anonymous variables at for scope.
9034         (maybe_inject_for_scope_var): Likewise.
9035
9036 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
9037
9038         * decl.c: Remove all signal handling code, now done in toplev.c.
9039
9040 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
9041
9042         * decl.c (make_rtl_for_nonlocal_decl): Rework.
9043
9044         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
9045         correctly.
9046
9047 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
9048
9049         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
9050         Define my_friendly_assert and my_friendly_abort as macros
9051         which may call friendly_abort.  Prototype friendly abort, not
9052         my_friendly_abort or my_friendly_assert.
9053         * decl.c (signal_catch): Report the signal caught in the error
9054         message.  Call fatal directly.
9055         * typeck2.c (ack, my_friendly_assert): Delete.
9056         (my_friendly_abort): Rename to friendly_abort.  Expect file,
9057         line, and function parameters.  Report the abort code, then
9058         call fancy_abort.  Do not mask an abort if errors have
9059         already occurred.
9060
9061 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
9062
9063         * typeck.c (comp_target_parms): Remove obsolete parameter.
9064         (comp_target_types): Adjust.
9065
9066 2000-07-17  Jason Merrill  <jason@redhat.com>
9067
9068         * typeck.c (mark_addressable): Never set TREE_USED.
9069         * call.c (build_call): Don't abort on calls to library functions
9070         that have been declared normally.
9071
9072         * typeck.c (build_binary_op): Fix grammar in warning.
9073
9074         * exception.cc (__eh_free): Fix prototype.
9075
9076         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
9077
9078         * decl.c (pushdecl): Handle seeing an OVERLOAD in
9079         IDENTIFIER_NAMESPACE_VALUE.
9080
9081 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
9082
9083         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
9084         * method.c (use_thunk): Correct handling of vcall offsets.
9085
9086 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
9087
9088         * .cvsignore: parse.h and parse.c have no cp- prefix.
9089
9090 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
9091
9092         * .cvsignore: New file.
9093
9094 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
9095
9096         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
9097
9098 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
9099
9100         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
9101         * parse.c: Remove.
9102         * parse.h: Likewise.
9103
9104 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
9105
9106         * class.c (layout_class_type): Add pointers to virtual bases after
9107         base classes under the old ABI.
9108
9109 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
9110
9111         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
9112         (finish_continue_stmt): Likewise.
9113         (begin_for_stmt): Remove call to note_level_for_for.
9114         (finish_goto_stmt): Change call from build_min_nt
9115         to build_stmt.
9116         (finish_expr_stmt): Likewise.
9117         (begin_if_stmt): Likewise.
9118         (begin_while_stmt): Likewise.
9119         (finish_while_stmt): Likewise.
9120         (finish_return_stmt): Likewise.
9121         (begin_for_stmt): Likewise.
9122         (finish_for_stmt): Likewise.
9123         (finish_break_stmt): Likewise.
9124         (begin_switch_stmt): Likewise.
9125         (finish_case_label): Likewise.
9126         (genrtl_try_block): Likewise.
9127         (begin_try_block): Likewise.
9128         (begin_handler): Likewise.
9129         (begin_compound_stmt): Likewise.
9130         (finish_asm_stmt): Likewise.
9131         (finish_label_stmt): Likewise.
9132         (add_decl_stmt): Likewise.
9133         (finish_subobject): Likewise.
9134         (finish_decl_cleanup): Likewise.
9135         (finish_named_return_value): Likewise.
9136         (setup_vtbl_ptr): Likewise.
9137         (add_scope_stmt): Likewise.
9138         * decl.c (finish_constructor_body): Likewise.
9139         (finish_destructor_body): Likewise.
9140         * optimize.c (copy_body_r): Likewise.
9141         (initialize_inlined_parameters): Likewise.
9142         (declare_return_variable): Likewise.
9143         (expand_call_inline): Likewise.
9144
9145 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
9146
9147         * semantics.c (expand_body): Sync interface information
9148         at the end of function body expansion.
9149
9150 2000-07-09  Jason Merrill  <jason@redhat.com>
9151
9152         * init.c (build_new_1): Bail early if the call to new fails.
9153
9154         * decl.c (compute_array_index_type): Check specifically for
9155         an INTEGER_CST, not just TREE_CONSTANT.
9156
9157         * decl.c (duplicate_decls): Don't call duplicate_decls on
9158         the DECL_TEMPLATE_RESULT.
9159         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
9160         codes.
9161
9162         * error.c (dump_template_bindings): Don't crash if we had an
9163         invalid argument list.
9164
9165         * typeck.c (c_expand_start_case): Do narrowing here.
9166         * semantics.c (finish_switch_cond): Not here.
9167
9168 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
9169
9170         * parse.y (asm_clobbers): Do string concatenation.
9171
9172 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
9173
9174         * decl.c (pushtag): Don't put local classes in template functions
9175         on the local_classes list.
9176
9177 2000-07-04  Scott Snyder  <snyder@fnal.gov>
9178
9179         * decl2.c (get_guard): Add missing return for old ABI local
9180         variable case.
9181
9182 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
9183
9184         * cp-tree.h (char_type_p): New function.
9185         * decl.c (init_decl_processing): Don't initialize
9186         signed_wchar_type_node or unsigned_wchar_type_node.
9187         (complete_array_type): Handle brace-enclosed string-constants.
9188         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
9189         * tree.c (char_type_p): New function.
9190         * typeck2.c (digest_init): Use char_type_p.
9191
9192 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
9193
9194         * pt.c (tsubst): Don't layout type, if it's error_mark.
9195
9196 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
9197
9198         * pt.c (instantiate_pending_templates): Reset template level.
9199
9200 2000-07-05  Jason Merrill  <jason@redhat.com>
9201
9202         * call.c (joust): Don't complain about `operator char *()' beating
9203         `operator const char *() const'.
9204
9205 2000-07-04  scott snyder  <snyder@fnal.gov>
9206             Jason Merrill  <jason@redhat.com>
9207
9208         * repo.c (repo_get_id): Handle the case where a class with virtual
9209         bases has a null TYPE_BINFO_VTABLE.
9210
9211 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
9212             Jason Merrill  <jason@redhat.com>
9213
9214         * parse.y (member_init): Just pass in the type.
9215         * init.c (expand_member_init): Handle getting a type.
9216
9217 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9218             Jason Merrill  <jason@redhat.com>
9219
9220         * decl.c (finish_function): Warn if a function has no return
9221         statement.
9222         Suggested by Andrew Koenig.
9223         * typeck.c (check_return_expr): Do set current_function_returns_value
9224         if we got an error_mark_node.
9225
9226 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
9227
9228         * decl2.c (push_decl_namespace): Push the original namespace.
9229
9230 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
9231
9232         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
9233         * semantics.c (begin_class_definition): Clear it.
9234
9235 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
9236
9237         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
9238         (genrtl_expr_stmt): Likewise.
9239         (genrtl_decl_stmt): Likewise.
9240         (genrtl_if_stmt): Likewise.
9241         (genrtl_while_stmt): Likewise.
9242         (genrtl_do_stmt): Likewise.
9243         (genrtl_return_stmt): Likewise.
9244         (genrtl_for_stmt): Likewise.
9245         (genrtl_break_stmt): Likewise.
9246         (genrtl_continue_stmt): Likewise.
9247         (genrtl_scope_stmt): Likewise.
9248         (genrtl_switch_stmt): Likewise.
9249         (genrtl_case_label): Likewise.
9250         (genrtl_begin_compound_stmt): Likewise.
9251         (genrtl_finish_compound_stmt): Likewise.
9252         (genrtl_compound_stmt): Likewise.
9253         (genrtl_asm_stmt): Likewise.
9254
9255         * init.c (begin_init_stmts): Remove call to
9256         genrtl_begin_compound_stmt.
9257         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
9258
9259         * semantics.c (lang_expand_stmt): Changed call to
9260         genrtl_compound_stmt to ignore return value.
9261
9262 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
9263
9264         * mangle.c (canonicalize_for_substitution): Return the canonical
9265         variant of a type.
9266
9267         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
9268         TYPE_DECL.
9269         * typeck.c (commonparms): Remove obstack manipulations.
9270
9271 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
9272
9273         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
9274
9275         * Makefile.in (OBJS): Added ../c-semantics.o.
9276         (OBJDEPS): Likewise.
9277
9278         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
9279         ../c-common.h.
9280         (struct stmt_tree): Added comment.
9281         (current_function_name_declared): Removed.
9282         (stmts_are_full_exprs_p): Likewise.
9283         (genrtl_do_pushlevel): Likewise.
9284         (genrtl_clear_out_block): Likewise.
9285         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
9286         (DECL_ANON_UNION_ELEMS): Likewise.
9287         (emit_local_var): Likewise.
9288         (make_rtl_for_local_static): Likewise.
9289         (do_case): Likewise.
9290         (expand_stmt): Likewise.
9291         (genrtl_decl_cleanup): Likewise.
9292         (c_expand_asm_operands): Likewise.
9293         (c_expand_return): Likewise.
9294         (c_expand_start_case): Likewise.
9295
9296         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
9297         (emit_local_var): Likewise.
9298         (initialize_local_var): Change reference to
9299         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
9300         Change reference to stmts_are_full_exprs_p to
9301         current_stmt_tree->stmts_are_full_exprs_p.
9302         (push_cp_function_context): Likewise.
9303
9304         * expect.c (expand_throw): Change reference to
9305         stmts_are_full_exprs_p.
9306
9307         * init.c (build_aggr_init): Change reference to
9308         stmts_are_full_exprs_p.
9309         (build_vec_init): Likewise.
9310
9311         * optimize.c (maybe_clone_body): Change reference to
9312         current_function_name_declared to
9313         cp_function_chain->name_declared.
9314
9315         * pt.c (instantiate_decl): Change reference to
9316         current_function_name_declared to
9317         cp_function_chain->name_declared.
9318
9319         * semantics.c (expand_cond): Moved declaration to c-common.h.
9320         (genrtl_do_pushlevel): Moved to c-semantics.c.
9321         (genrtl_clear_out_block): Likewise.
9322         (genrtl_goto_stmt): Likewise.
9323         (genrtl_expr_stmt): Likewise.
9324         (genrtl_decl_stmt): Likewise.
9325         (gerntl_if_stmt): Likewise.
9326         (genrtl_while_stmt): Likewise.
9327         (genrtl_do_stmt): Likewise.
9328         (genrtl_return_stmt): Likewise.
9329         (genrtl_for_stmt): Likewise.
9330         (genrtl_break_stmt): Likewise.
9331         (genrtl_continue_stmt): Likewise.
9332         (genrtl_scope_stmt): Likewise.
9333         (genrtl_switch_stmt): Likewise.
9334         (genrtl_case_label): Likewise.
9335         (genrtl_begin_compound_stmt): Likewise.
9336         (genrtl_finish_compound_stmt): Likewise.
9337         (genrtl_compound_stmt): Likewise.
9338         (genrtl_asm_stmt): Likewise.
9339         (genrtl_decl_cleanup): Likewise.
9340         (expand_cond): Likewise.
9341         (expand_stmt): Renamed to ...
9342         (lang_expand_stmt): ... this.
9343         (lang_expand_expr_stmt): Initialize.
9344         (set_current_function_name_declared): Likewise.
9345         (stmts_are_full_exprs_p): Likewise.
9346         (current_function_name_declared): Likewise.
9347         (anon_aggr_type_p): Likewise.
9348         (do_poplevel): Change reference to
9349         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
9350         Change reference to stmts_are_full_exprs_p to
9351         current_stmt_tree->stmts_are_full_exprs_p.
9352         (add_tree): Likewise.
9353         (finish_expr_stmt): Likewise.
9354         (prep_stmt): Likewise.
9355         (lang_expand_stmt): Likewise.
9356         (begin_compound_stmt): Change reference to
9357         current_function_name_declared to
9358         cp_function_chain->name_declared and call to
9359         current_function_name_declared().
9360         (setup_vtbl_ptr): Likewise.
9361         (genrtl_do_poplevel): Removed.
9362
9363 2000-06-30  Jason Merrill  <jason@redhat.com>
9364
9365         * init.c (init_init_processing): Go back to aligning like
9366         double_type_node for old ABI.
9367         (get_cookie_size): Make cookie larger if we get a type that needs
9368         more alignment.
9369         (build_vec_delete): Call it.
9370
9371         * typeck.c (qualify_type_recursive): New fn.
9372         (composite_pointer_type): Use it.
9373         (build_binary_op): Use composite_pointer_type.
9374
9375 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
9376             Jason Merrill  <jason@redhat.com>
9377
9378         * typeck.c (check_return_expr): Don't complain about returning
9379         NULL from operator new if -fcheck-new.
9380         * cp-tree.h: Declare flag_check_new here.
9381         * init.c: Not here.
9382
9383 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
9384
9385         * mangle.c (find_substitution): Use same_type_p.
9386         (write_encoding): Don't check for substitutions.
9387
9388 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
9389
9390         * parse.y (expr_no_comma_rangle): New non-terminal.
9391         (template_parm): Use it for default parameter case.
9392         (template_arg): Use it.
9393         (expr_no_commas): Remove commented out undefined extensions.
9394         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
9395         * parse.h, parse.c: Rebuilt.
9396
9397 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
9398
9399         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
9400         (finish_asm_stmt): Do it here, instead.
9401
9402         * cp-tree.h (ridpointers): Don't declare.
9403         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
9404         (record_builtin_java_type): Likewise.
9405         (init_decl_processing): Likewise.
9406         * lex.c: Move inclusion of lex.h.
9407         (ridpointers): Don't define.
9408         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
9409         RID_MAX.
9410         * lex.h (enum rid): Rename to ...
9411         (enum cp_rid): ... this.
9412         (ridpointers): Don't declare.
9413         * parse.y: Move inclusion of lex.h.
9414         * parse.c: Regenerated.
9415         * spew.c: Move inclusion of lex.h.
9416
9417         * cp-tree.h (struct language_function): Remove temp_name_counter.
9418         (temp_name_counter): Remove.
9419         (get_temp_name): Change prototype.
9420         (get_guard): New function.
9421         (get_guard_cond): Likewise.
9422         (set_guard): Likewise.
9423         * cvt.c (build_up_reference): Adjust call to get_temp_name.
9424         * decl.c (expand_static_init): Use get_guard and friends to
9425         implement guard variables.
9426         * decl2.c (get_temp_name): Assume that the variables created are
9427         always static.
9428         (get_sentry): Rename to ...
9429         (get_guard): ... this.  Implement new ABI guard variables.
9430         (get_guard_bits): New function.
9431         (get_guard_cond): Likewise.
9432         (set_guard): Likewise.
9433         (start_static_initialization_or_destruction): Use them.
9434         (do_static_initialization): Replace sentry with guard throughout.
9435         (do_static_destruction): Likewise.
9436         * init.c (create_temporary_var): Add comment.
9437
9438 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
9439
9440         * mangle.c (find_substitution): Use same_type_p.
9441         (write_encoding): Don't check for substitutions.
9442
9443 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
9444
9445         * parse.y (expr_no_comma_rangle): New non-terminal.
9446         (template_parm): Use it for default parameter case.
9447         (template_arg): Use it.
9448         (expr_no_commas): Remove commented out undefined extensions.
9449         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
9450         * parse.h, parse.c: Rebuilt.
9451
9452 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
9453
9454         * cp-tree.h (flag_const_strings): Remove.
9455         (warn_parentheses): Likewise.
9456         (warn_format): Likewise.
9457         (common_type): Likewise.
9458         (default_conversion): Likewise.
9459         (build_binary_op): Likewise.
9460         (cp_build_binary_op): New macro.
9461         * call.c (build_new_op): Use cp_build_binary_op instead of
9462         build_binary_op.
9463         * class.c (build_vtable_entry_ref): Likewise.
9464         * decl.c (expand_static_init): Likewise.
9465         (compute_array_index_type): Likewise.
9466         (build_enumerator): Likewise.
9467         * decl2.c (delete_sanity): Likewise.
9468         (start_static_initialization_or_destruction): Likewise.
9469         * error.c (dump_type_suffix): Likewise.
9470         * init.c (resolve_offset_ref): Likewise.
9471         (build_new): Likewise.
9472         (build_new_1): Likewise.
9473         (build_vec_delete_1): Likewise.
9474         (build_vec_init): Likewise.
9475         (build_delete): Likewise.
9476         * rtti.c (synthesize_tinfo_fn): Likewise.
9477         (synthesize_tinfo_var): Likewise.
9478         * search.c (expand_upcast_fixups): Likewise.
9479         (fixup_all_virtual_upcast_offsets): Likewise.
9480         * typeck.c (build_array_ref): Likewise.
9481         (get_member_function_from_ptrfunc): Likewise.
9482         (build_binary_op): Add parameter.
9483         (pointer_int_sum): Use cp_build_binary_op.
9484         (pointer_diff): Likewise.
9485         (build_modify_expr): Likewise.
9486         (get_delta_difference): Likewise.
9487         (build_ptrmemfunc): Likewise.
9488
9489 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
9490
9491         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
9492         * decl.c (create_implicit_typedef): Adjust.
9493         * decl2.c (build_artificial_parm): Adjust.
9494         * method.c (implicitly_declare_fn): Adjust.
9495         * pt.c (push_inline_template_parms_recursive): Adjust.
9496         (process_template_parm): Adjust.
9497         (overloaded_template_name): Adjust.
9498         * semantics.c (finish_template_template_parm): Adjust.
9499
9500 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
9501
9502         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
9503         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
9504         where to emit thunks.
9505         (build_vtt): Adjust call to build_vtt_inits.
9506         (build_vtt_inits): Add parameter to indicate whether or not
9507         sub-VTTs for virtual bases should be included.  Adjust handling of
9508         construction vtables.
9509         (get_matching_base): New function.
9510         (dfs_build_vtt_inits): Rename to ...
9511         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
9512         construction vtables.
9513         (dfs_fixup_binfo_vtbls): Likewise.
9514         (build_ctor_vtbl_groups): Build construction vtables for virtual
9515         bases, too.
9516         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
9517         to build construction vtbls.
9518         (dfs_accumulate_vtbl_inits): Adjust handling of
9519         construction vtables.
9520
9521         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
9522         types correctly.
9523
9524 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
9525
9526         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
9527
9528 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
9529
9530         * search.c (hides): Remove.
9531         (is_subobject_of_p): Add most_derived parameter. Use
9532         CANONICAL_BINFO.
9533         (lookup_field_queue_p): Adjust.
9534         (lookup_field_r): Adjust.
9535
9536 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
9537
9538         * decl2.c (handle_class_head): Bash typedefs to the type's main
9539         decl.
9540
9541 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
9542
9543         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
9544         (begin_global_stmt_expr): ... this.
9545         (genrtl_finish_stmt_expr): Rename to ...
9546         (finish_global_stmt_expr): ... this.
9547         * init.c (begin_init_stmts): Adjust calls.
9548         (finish_init_stmts): Likewise.
9549         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
9550         (begin_global_stmt_expr): ... this.
9551         (genrtl_finish_stmt_expr): Rename to ...
9552         (finish_global_stmt_expr): ... this.
9553
9554 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9555
9556         * search.c (lookup_member): Fix typo in comment.
9557
9558 2000-06-24  Jason Merrill  <jason@redhat.com>
9559
9560         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
9561         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
9562
9563 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9564
9565         * parse.y (complex_direct_notype_declarator): Support global_scope.
9566         * Makefile.in: Adjust conflict count.
9567
9568 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9569
9570         * parse.y (template_arg): Convert TEMPLATE_DECL
9571         that is a template template parameter to
9572         TEMPLATE_TEMPLATE_PARM here.
9573
9574         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
9575         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
9576         (copy_template_template_parm): Adjust prototype.
9577         * decl.c (grokdeclarator): Remove dead code.
9578         * pt.c (process_template_parm): Tidy.
9579         (lookup_template_class): Construct nodes in
9580         copy_template_template_parm.
9581         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
9582         lookup_template_class.  Use TYPE_TI_TEMPLATE.
9583         * tree.c (copy_template_template_parm): Add NEWARGS
9584         parameter.
9585         (mapcar): Adjust call to copy_template_template_parm.
9586         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
9587         * method.c (build_template_template_parm_names): Change error
9588         code to avoid compilation warning.
9589
9590         * gxxint.texi: Document template template parameter
9591         name mangling.
9592
9593 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
9594
9595         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
9596         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
9597         (cp-demangle.o): New rule.
9598         (dyn-string.o): Likewise.
9599         * inc/cxxabi.h (__cxa_demangle): New declaration.
9600
9601 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
9602
9603         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
9604         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
9605         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
9606         a tree, not an int.
9607         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
9608         (make_thunk): Change prototype.
9609         (emit_thunk): Rename to use_thunk.
9610         (mangle_thunk): Change prototype.
9611         * class.c (get_derived_offset): Simplify.
9612         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
9613         BV_GENERATE_THUNK_WITH_VTABLE_P.
9614         (build_primary_vtable): Simplify.
9615         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
9616         (dfs_find_base): Remove.
9617         (update_vtable_entry_for_fn): Correct bug in finding the base
9618         where a virtual function was first declared.  Figure out whether
9619         or not to emit a vcall-thunk with the vtables in which it appears.
9620         Correct logic for deciding whether to use an ordinary thunk, or a
9621         vcall thunk.
9622         (finish_struct_1): Remove unnecssary code.
9623         (build_vtbl_initializer): Use ssize_int for the running counter of
9624         negative indices.
9625         (build_vtbl_initializer): Only use vcall thunks where necessary.
9626         Mark thunks as needing to be emitted with their vtables, or not.
9627         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
9628         indices.  Use size_binop.
9629         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
9630         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
9631         size_binop.
9632         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
9633         (build_vtable_entry): Mark thunks as needing to be emitted with
9634         their vtables, or not.
9635         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
9636         * decl2.c (mark_vtable_entries): Use use_thunk instead of
9637         emit_thunk.
9638         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
9639         information.
9640         * error.c (dump_expr): Use BV_FN.
9641         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
9642         not an int.
9643         * method.c (make_thunk): Likewise.
9644         (emit_thunk): Rename to use_thunk.  Allow callers to decide
9645         whether or not to actually emit the thunk.  Adjust for changes in
9646         representation of vcall offsets.
9647         * search.c (dfs_get_pure_virtuals): Use BV_FN.
9648         * semantics.c (emit_associated_thunks): New function.
9649         (expand_body): Use it.
9650         * ir.texi: Adjust decriptions of thunks.
9651
9652 2000-06-22  Jason Merrill  <jason@redhat.com>
9653
9654         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
9655         (tsubst_friend_function): Copy it here.
9656
9657         * decl.c (grok_op_properties): Fix typo.
9658
9659         * decl2.c (delete_sanity): Clarify warning, avoid failure on
9660         deleting void*.
9661
9662         * pt.c (check_explicit_specialization): Clarify error.
9663
9664         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
9665         an old OVERLOAD when we're declaring a non-function.
9666         (pushdecl, destroy_local_var): Check for error_mark_node.
9667         (warn_extern_redeclared_static): Also bail early if
9668         we're a CONST_DECL.
9669         (push_overloaded_decl): Ignore an old error_mark_node.
9670
9671 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
9672
9673         * call.c (build_x_va_arg): Check if in a template decl.
9674         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
9675
9676 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9677
9678         * class.c (push_lang_context): TYPE_NAME gets you to the Java
9679         types DECLs.
9680         * decl.c (check_goto): Computed gotos assumed OK.
9681
9682 2000-06-20  Jason Merrill  <jason@redhat.com>
9683
9684         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
9685         for which we don't need to look for instantiations.
9686
9687 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
9688
9689         * parse.y (program): Always call finish_translation_unit.
9690         * parse.c, parse.h: Rebuilt.
9691
9692 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
9693
9694         * method.c: Don't include hard-reg-set.h.
9695
9696 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
9697
9698         * rtti.c (get_base_offset): Cope when vbase field is in a base.
9699
9700 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
9701
9702         * call.c (build_conditional_expr): Use VOID_TYPE_P.
9703         * cvt.c (cp_convert_to_pointer): Likewise.
9704         (convert_to_void): Likewise.
9705         * error.c (dump_expr): Likewise.
9706         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
9707         * init.c (build_delete): Likewise.
9708         * method.c (emit_thunk): Likewise.
9709         * optmize.c (declare_return_variable): Likewise.
9710         * rtti.c (get_tinfo_decl_dynamic): Likewise.
9711         (get_typeid): Likewise.
9712         (build_dynamic_cast_1): Likewise.
9713         * typeck.c (composite_pointer_type): Likewise.
9714         (common_type): Likewise.
9715         (build_indirect_ref): Likewise.
9716         (build_binary_op): Likewise.
9717         (build_x_compound_expr): Likewise.
9718         (check_return_expr): Likewise.
9719         * typeck2.c (add_exception_specifier): Likewise.
9720
9721         * mangle.c (write_method_parms): Use direct comparison for end
9722         of parmlist.
9723
9724 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
9725
9726         * cp-tree.h (genrtl_try_block): Declare function.
9727         (genrtl_handler): Likewise.
9728         (genrtl_catch_block): Likewise.
9729         (genrtl_ctor_stmt): Likewise.
9730         (genrtl_subobject): Likewise.
9731         (genrtl_decl_cleanup): Likewise.
9732         (genrtl_do_poplevel): Likewise.
9733         (genrtl_do_pushlevel): Likewise.
9734         (genrtl_clear_out_block): Likewise.
9735         (genrtl_goto_stmt): Likewise.
9736         (genrtl_expr_stmt): Likewise.
9737         (genrtl_decl_stmt): Likewise.
9738         (genrtl_if_stmt): Likewise.
9739         (genrtl_while_stmt): Likewise.
9740         (genrtl_do_stmt): Likewise.
9741         (genrtl_return_stmt): Likewise.
9742         (genrtl_for_stmt): Likewise.
9743         (genrtl_break_stmt): Likewise.
9744         (genrtl_continue_stmt): Likewise.
9745         (genrtl_scope_stmt): Likewise.
9746         (genrtl_switch_stmt): Likewise.
9747         (genrtl_case_label): Likewise.
9748         (genrtl_begin_compound_stmt): Likewise.
9749         (genrtl_finish_compound_stmt): Likewise.
9750         (genrtl_compound_stmt): Likewise.
9751         (genrtl_asm_stmt): Likewise.
9752         (genrtl_named_return_value): Likewise.
9753         (genrtl_begin_stmt_expr): Likewise.
9754         (genrtl_finish_stmt_expr): Likewise.
9755         (finish_for_stmt): Removed first argument.
9756         (finish_switch_stmt): Likewise.
9757
9758         * semantics.c (genrtl_try_block): Define function.
9759         (genrtl_handler): Likewise.
9760         (genrtl_catch_block): Likewise.
9761         (genrtl_ctor_stmt): Likewise.
9762         (genrtl_subobject): Likewise.
9763         (genrtl_decl_cleanup): Likewise.
9764         (genrtl_do_poplevel): Likewise.
9765         (genrtl_do_pushlevel): Likewise.
9766         (genrtl_clear_out_block): Likewise.
9767         (genrtl_goto_stmt): Likewise.
9768         (genrtl_expr_stmt): Likewise.
9769         (genrtl_decl_stmt): Likewise.
9770         (genrtl_if_stmt): Likewise.
9771         (genrtl_while_stmt): Likewise.
9772         (genrtl_do_stmt): Likewise.
9773         (genrtl_return_stmt): Likewise.
9774         (genrtl_for_stmt): Likewise.
9775         (genrtl_break_stmt): Likewise.
9776         (genrtl_continue_stmt): Likewise.
9777         (genrtl_scope_stmt): Likewise.
9778         (genrtl_switch_stmt): Likewise.
9779         (genrtl_case_label): Likewise.
9780         (genrtl_begin_compound_stmt): Likewise.
9781         (genrtl_finish_compound_stmt): Likewise.
9782         (genrtl_compound_stmt): Likewise.
9783         (genrtl_asm_stmt): Likewise.
9784         (genrtl_named_return_value): Likewise.
9785         (genrtl_begin_stmt_expr): Likewise.
9786         (genrtl_finish_stmt_expr): Likewise.
9787         (finish_for_stmt): Removed first argument and generate rtl
9788         specific code.
9789         (finish_switch_stmt): Likewise.
9790         (do_poplevel): Removed generate rtl specific code.
9791         (do_pushlevel): Likewise.
9792         (add_tree): Likewise.
9793         (finish_goto_stmt): Likewise.
9794         (finish_expr_stmt): Likewise.
9795         (begin_if_stmt): Likewise.
9796         (finish_if_stmt_cond): Likewise.
9797         (finish_then_clause): Likewise.
9798         (begin_else_clause): Likewise.
9799         (finish_else_clause): Likewise.
9800         (finish_if_stmt): Likewise.
9801         (clear_out_block): Likewise.
9802         (begin_while_stmt): Likewise.
9803         (finish_while_stmt_cond): Likewise.
9804         (finish_while_stmt): Likewise.
9805         (begin_do_stmt): Likewise.
9806         (finish_do_body): Likewise.
9807         (finish_do_stmt): Likewise.
9808         (finish_return_stmt): Likewise.
9809         (begin_for_stmt): Likewise.
9810         (finish_for_init_stmt): Likewise.
9811         (finish_for_cond): Likewise.
9812         (finish_for_expr): Likewise.
9813         (finish_break_stmt): Likewise.
9814         (finish_continue_stmt): Likewise.
9815         (begin_switch_stmt): Likewise.
9816         (finish_switch_cond): Likewise.
9817         (finish_case_label): Likewise.
9818         (begin_try_block): Likewise.
9819         (begin_function_try_block): Likewise.
9820         (finish_try_block): Likewise.
9821         (finish_cleanup_try_block): Likewise.
9822         (finish_cleanup): Likewise.
9823         (finish_function_try_block): Likewise.
9824         (finish_handler_sequence): Likewise.
9825         (finish_function_handler_sequence): Likewise.
9826         (begin_handler): Likewise.
9827         (finish_handler_parms): Likewise.
9828         (begin_catch_block): Likewise.
9829         (finish_handler): Likewise.
9830         (begin_compound_stmt): Likewise.
9831         (finish_compound_stmt): Likewise.
9832         (finish_asm_stmt): Likewise.
9833         (finish_label_stmt): Likewise.
9834         (finish_label_decl): Likewise.
9835         (finish_subobject): Likewise.
9836         (finish_decl_cleanup): Likewise.
9837         (finish_named_return_value): Likewise.
9838         (begin_stmt_expr): Likewise.
9839         (finish_stmt_expr): Likewise.
9840
9841         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
9842         to call genrtl_expr_stmt when appropriate.
9843
9844         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
9845         begin_compound_expr to call genrtl_begin_stmt_expr and
9846         genrtl_begin_compound_expr when appropriate.
9847         (finish_init_stmts): Changed calls to finish_compound_expr and
9848         finish_stmt_expr to call genrtl_finish_compound_expr and
9849         genrtl_finish_stmt_expr when appropriate.
9850         (expand_default_init): Changed call to finish_expr_stmt to call
9851         genrtl_expr_stmt when appropriate.
9852         (build_vec_init): Likewise.
9853
9854         * parse.y (simple_stmt): Removed first argument from call to
9855         finish_for_stmt. Removed first argument from call to
9856         finish_switch_stmt.
9857
9858         * parse.c: Regenerated.
9859
9860         * pt.c (tsubst_expr): Removed first argument from call to
9861         finish_for_stmt. Removed first argument from call to
9862         finish_switch_stmt.
9863
9864 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
9865
9866         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
9867         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
9868
9869         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
9870         (cplus_tree_code_length[]): Likewise.
9871         (cplus_tree_code_name[]): Likewise.
9872         (init_parse): Added call to add_c_tree_codes. Changed
9873         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
9874
9875 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
9876
9877         * cp-tree.h (finish_mem_initializers): Declare.
9878         (count_trees): Likewise.
9879         * parse.y (base_init): Use finish_mem_initializers.
9880         * semantics.c (finish_mem_initializers): New function.
9881
9882         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
9883         the number of trees.
9884         (n_trees): Remove.
9885         (count_trees): Don't use it.
9886
9887 2000-06-15  Jason Merrill  <jason@redhat.com>
9888
9889         * tree.c (count_trees): New debugging function.
9890
9891         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
9892         * init.c (build_member_call): Pull out the name of a DECL.
9893
9894         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
9895         * semantics.c (expand_body): Push to TV_INTEGRATION here.
9896         * optimize.c (optimize_function): Not here.
9897         * pt.c (instantiate_decl): Push to TV_PARSE.
9898
9899 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
9900
9901         * cp-tree.h (struct language_function): Remove x_base_init_list
9902         and x_member_init_list.
9903         (current_base_init_list): Remove.
9904         (current_member_init_list): Likewise.
9905         (setup_vtbl_ptr): Change prototype.
9906         (emit_base_init): Likewise.
9907         (expand_member_init): Likewise.
9908         (reinit_parse_for_function): Remove.
9909         * decl.c (save_function_data): Don't clear x_base_init_list and
9910         x_member_init_list.
9911         (mark_language_function): Don't mark them.
9912         * init.c (perform_member_init): Tweak comment.
9913         (sort_member_init): Take the list of initializers as an argument.
9914         (sort_base_init): Likewise.
9915         (emit_base_init): Likewise.
9916         (expand_member_init): Return the initializer.  Don't use global
9917         variables.
9918         * lex.c (reinit_parse_for_function): Remove.
9919         * method.c (build_template_parm_names): Correct substitution.
9920         (do_build_copy_constructor): Don't use current_member_init_list
9921         and current_base_init_list.
9922         (synthesize_method): Likewise.
9923         * parse.y (base_init): Split mem-initializers into
9924         base-initializers and field-initializers.
9925         (member_init_list): Build up the list here.
9926         (member_init): Return the initializer.
9927         (fn.depfn): Don't use reinit_parse_for_function.
9928         * parse.c: Regenerated.
9929         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
9930         ERROR_MARK.
9931         (tsubst_expr): Don't use current_member_init_list
9932         and current_base_init_list.
9933         (tsubst_expr_values): Rename to ...
9934         (tsubst_initializer_list): ... this.  Use convert_from_reference.
9935         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
9936         and current_base_init_list.
9937         (begin_function_definition): Don't call reinit_parse_for_function.
9938
9939         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
9940
9941         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
9942         correctly.
9943
9944         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
9945
9946 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
9947
9948         * cp-tree.h (IF_COND): Move to c-common.h.
9949         (THEN_CLAUSE): Likewise.
9950         (ELSE_CLAUSE): Likewise.
9951         (WHILE_COND): Likewise.
9952         (WHILE_BODY): Likewise.
9953         (DO_COND): Likewise.
9954         (DO_BODY): Likewise.
9955         (RETURN_EXPR): Likewise.
9956         (EXPR_STMT_EXPR): Likewise.
9957         (FOR_INIT_STMT): Likewise.
9958         (FOR_COND): Likewise.
9959         (FOR_EXPR): Likewise.
9960         (FOR_BODY): Likewise.
9961         (SWITCH_COND): Likewise.
9962         (SWITCH_BODY): Likewise.
9963         (CASE_LOW): Likewise.
9964         (CASE_HIGH): Likewise.
9965         (GOTO_DESTINATION): Likewise.
9966         (COMPOUND_BODY): Likewise.
9967         (ASM_CV_QUAL): Likewise.
9968         (ASM_STRING): Likewise.
9969         (ASM_OUTPUTS): Likewise.
9970         (ASM_INPUTS): Likewise.
9971         (ASM_CLOBBERS): Likewise.
9972         (DECL_STMT_DECL): Likewise.
9973         (STMT_EXPR_STMT): Likewise.
9974         (LABEL_STMT_LABEL): Likewise.
9975         (SCOPE_BEGIN_P): Likewise.
9976         (SCOPE_END_P): Likewise.
9977         (SCOPE_STMT_BLOCK): Likewise.
9978         (SCOPE_NULLIFIED_P): Likewise.
9979         (SCOPE_NO_CLEANUPS_P): Likewise.
9980         (SCOPE_PARTIAL_P): Likewise.
9981         (ASM_VOLATILE_P): Likewise.
9982         (STMT_LINENO): Likewise.
9983         (STMT_LINENO_FOR_FN_P): Likewise.
9984
9985         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
9986         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
9987         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
9988         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
9989         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
9990
9991         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
9992
9993         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
9994         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
9995
9996         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
9997         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
9998         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
9999
10000 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
10001
10002         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
10003         * class.c (dfs_find_final_overrider): Set it appropriately.
10004         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
10005         avoid unneeded secondary vptrs.
10006
10007 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
10008
10009         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
10010         (check_bitfield_decl, check_field_decl): Likewise.
10011         (build_vtbl_or_vbase_field, build_base_field): Likewise.
10012         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
10013         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
10014         (xfer_tag, finish_enum): Likewise.
10015         * decl2.c (finish_builtin_type): Likewise.
10016         * init.c (init_init_processing): Likewise.
10017         * pt.c (instantiate_class_template): Likewise.
10018         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
10019         * cp-tree.h (struct lang_type): Add user_align member.
10020         (CLASSTYPE_USER_ALIGN): Define.
10021
10022 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
10023
10024         * Make-lang.in (c++.install-common): Install g++-cross in
10025         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
10026         $(target_alias)-g++ and $(target_alias)-c++.
10027
10028 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
10029
10030         * class.c (vcall_offset_data_s): Add last_init and fns.
10031         (overrides): Rename to same_signature_p.
10032         (dfs_find_final_overrider): Adjust accordingly.
10033         (mark_overriders): Likewise.
10034         (warn_hidden): Likewise.
10035         (build_vtbl_initializer): Reorganize machinery for building things
10036         at negative offsets.
10037         (build_vcall_and_vbase_vtbl_entries): Likewise.
10038         (build_vbase_offset_vtbl_entries): Likewise.
10039         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
10040         offset entries.  Do not create two entries for functions with the
10041         same signature.
10042         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
10043         (build_rtti_vtbl_entries): Reorganize machinery for building things
10044         at negative offsets.
10045
10046         * optimize.c (expand_call_inline): Don't recurse into the code
10047         used to initialize the parameters more than once.
10048
10049 2000-06-11  Mark Mitchell <mark@codesourcery.com>
10050
10051         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
10052         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
10053         (find_substitution): Only use the `Sa' substitution for
10054         std::allocator, not instantiations of it.
10055         (write_template_prefix): Move comment.  Only use a TREE_LIST to
10056         represent substitutions for a member template.
10057         (write_array_type): Mangle array dimensions correctly.
10058         * optimize.c (maybe_clone_body): Copy more information from the
10059         cloned function.
10060         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
10061         on the regenerated declaration.
10062
10063 2000-06-11  Chip Salzenberg  <chip@valinux.com>
10064             Mark Mitchell <mark@codesourcery.com>
10065
10066         * class.c (build_vtable): Clarify comment.
10067         (build_ctor_vtbl_group): Pass the most derived type to
10068         build_vtable.
10069
10070 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10071
10072         * decl2.c (compare_options): Don't needlessly cast away const-ness.
10073
10074 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
10075
10076         * decl.c (add_binding): Handle duplicate declarations of external
10077         variables.
10078
10079 2000-06-09  Chip Salzenberg  <chip@valinux.com>
10080             Mark Mitchell <mark@codesourcery.com>
10081
10082         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
10083         argument.
10084         (write_signed_number): New macro.
10085         (write_unsigned_number): Likewise.
10086         (write_source_name): Use them.
10087         (write_number): Handle signed and unsigned values.
10088         (write_integer_cst): Use tree_int_cst_sgn, and use
10089         write_unsigned_number or write_signed_number as appropriate.
10090         (write_discriminator): Use write_unsigned_number or
10091         write_signed_number as appropriate.
10092         (write_template_arg_literal): Likewise.
10093         (write_array_type): Use tree_low_cst.
10094         (write_template_parm):  Use write_unsigned_number or
10095         write_signed_number as appropriate.
10096         (write_substitution): Adjust call to write_number.
10097         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
10098         (write_expression): Handle non-type template arguments of
10099         reference type correctly.
10100         (mangle_thunk): Use write_signed_number.
10101
10102 2000-06-09  Chip Salzenberg  <chip@valinux.com>
10103
10104         * mangle.c (find_substition): Don't mangle objects with typename
10105         substitutions (e.g. "cin" as "Si").
10106
10107 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
10108
10109         * call.c (add_candidate): Use ggc_alloc_cleared.
10110         * decl.c (lookup_label): Likewise.
10111         * lex.c (retrofit_lang_decl): Likewise.
10112
10113 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
10114
10115         * semantics.c (expand_body): Push to TV_EXPAND.
10116         * optimize.c (optimize_function): Push to TV_INTEGRATION.
10117         * decl.c (start_function): Always call announce_function.
10118
10119         * tinfo2.cc: Just declare abort.
10120
10121 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
10122
10123         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
10124         whenever @ is a symbolic name.
10125
10126 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
10127
10128         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
10129
10130 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
10131
10132         * decl.c (pushdecl): Look up functions by DECL_NAME, not
10133         DECL_ASSEMBLER_NAME.
10134
10135 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
10136
10137         * decl2.c (c_language): Define.
10138
10139 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
10140
10141         * lex.c (lang_init_options): Tweak.
10142
10143         * decl2.c: Remove #inclusion of diagnostic.h
10144         (lang_decode_option): Move diagnostic formatting options to
10145         toplevel.
10146
10147         * lang-options.h: Remove documentation for diagnostic options.
10148
10149         * Makefile.in (lex.o): Depends upon diagnostic.h
10150
10151 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
10152
10153         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
10154         the same DECL_RESULT, it's not a redefinition.
10155         * pt.c (tsubst_decl): Remove code to handle illegal
10156         specializations.
10157
10158 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
10159
10160         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
10161
10162 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
10163
10164         * search.c (maybe_suppress_debug_info): Don't check
10165         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
10166
10167         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
10168         here if extern_p.
10169
10170         Remember instantiation context in deferred instantiations.
10171         * cp-tree.h (struct tinst_level): Remove.
10172         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
10173         * pt.c (current_tinst_level): Now a tree.
10174         (print_template_context, push_tinst_level, pop_tinst_level,
10175         tinst_for_decl): Adjust.
10176         (reopen_tinst_level): New fn.
10177         (init_pt): Register current_tinst_level as a root.
10178         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
10179         of the pending templates list.
10180         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
10181         * lex.c (extract_interface_info): Adjust.
10182         * decl2.c (warn_if_unknown_interface): Adjust.
10183
10184 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
10185
10186         * class.c (indirect_primary_base_p): New function.
10187         (determine_primary_base): Use it.
10188
10189 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10190
10191         Update new-abi dynamic cast algorithm.
10192         * tinfo.cc (__class_type_info::__dyncast_result): Add
10193         whole_details. Adjust constructor.
10194         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
10195         Avoid unnecessary searching.
10196         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
10197
10198 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10199
10200         * decl.c (init_decl_processing): Don't call record_component_aliases.
10201         * tree.c (build_cplus_array_type_1): Likewise.
10202
10203 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
10204
10205         * ir.texi: Correct typo.
10206         * mangle.c (write_expression): Handle non-type template arguments
10207         with reference type.
10208         * method.c (build_overload_value): Likewise.
10209         * pt.c (convert_nontype_argument): Explicitly represent conversion
10210         to a reference with an ADDR_EXPR.
10211         (unify): Always unify arguments in left-to-right order.
10212
10213 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
10214             Mark Mitchell  <mark@codesourcery.com>
10215
10216         * Make-lang.in (CXX_SRCS): Add mangle.c.
10217         * Makefile.in (CXX_OBJS): Add mangle.o.
10218         (mangle.o): New rule.
10219
10220         * class.c (local_classes): New variable.
10221         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
10222         (get_vtt_name): Use mangle_vtt_name for new ABI.
10223         (init_class_processing): Initialize local_classes.
10224         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
10225         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
10226         (std_identifier): New macro.
10227         (DECL_VOLATILE_MEMFUNC_P): New macro.
10228         (DECL_NAMESPACE_STD_P): Likewise.
10229         (local_classes): Declare.
10230         (get_mostly_instantiated_function_type): Declare.
10231         (init_mangle): Declare.
10232         (mangle_decl): Likewise.
10233         (mangle_type_string): Likewise.
10234         (mangle_type): Likewise.
10235         (mangle_typeinfo_for_type): Likewise.
10236         (mangle_typeinfo_string_for_type): Likewise.
10237         (mangle_vtbl_for_type): Likewise.
10238         (mangle_vtt_for_type): Likewise.
10239         (mangle_ctor_vtbl_for_type): Likewise.
10240         (mangle_thunk): Likewise.
10241         (mangle_conv_op_name_for_type): Likewise.
10242         (mangle_guard_variable): Likewise.
10243         * decl.c (pushtag): Keep track of local classes.
10244         (initialize_predefined_identifiers): Initialize std_identifier.
10245         (init_decl_processing): Use std_identifier.
10246         (start_decl): Don't treat instantiations as specializations.
10247         (grokdeclarator): Likewise.
10248         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
10249         name for fully-instantiated templates.
10250         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
10251         destructors with the new ABI.
10252         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
10253         (grokfield): Use mangle_type for new ABI.
10254         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
10255         (get_sentry): Use mangle_guard_variable for new ABI.
10256         (start_static_initialization_or_destruction): Likewise.
10257         * expr.c (extract_aggr_init): Remove.
10258         (extract_scalar_init): Likewise.
10259         (extract_init): Remove #if 0'd code.
10260         * mangle.c: New function.
10261         * method.c (build_mangled_name): Assert not flag_new_abi.
10262         (build_static_name): Likewise.
10263         (build_decl_overload_real): Likewise.
10264         (build_typename_overload): Likewise.
10265         (build_overload_with_type): Likewise.
10266         (build_overload_name): Likewise.
10267         (get_ctor_vtbl_name): Likewise.
10268         (start_squangling): Likewise.
10269         (get_id_2): Likewise.
10270         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
10271         (init_method): Call init_mangle for new ABI.
10272         (make_thunk): Call mangle_thunk for new ABI.
10273         * operators.def: Correct new ABI manglings for the `%' operator.
10274         Add `::' operator.
10275         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
10276         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
10277         (lookup_template_class): Call mangle_decl for new ABI.
10278         (get_mostly_instantiated_function_type): New function.
10279         (set_mangled_name_for_template_decl): Use it.
10280         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
10281         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
10282         conversion op names.
10283         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
10284         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
10285         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
10286         mangle_typeinfo_string_for_type.
10287
10288 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
10289
10290         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
10291         (INNERMOST_TEMPLATE_ARGS): New macro.
10292         (innermost_args): Remove.
10293         (get_innermost_template_args): New function.
10294         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
10295         * error.c (dump_function_decl): Be caution when using
10296         most_general_template.
10297         * method.c (build_template_parm_names):  Use
10298         INNERMOST_TEMPLATE_ARGS.
10299         * pt.c (add_to_template_args): Tidy comment
10300         (get_innermost_template_args): New function.
10301         (check_explicit_specialization): Clear DECL_INITIAL for a new
10302         specialization.
10303         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
10304         Tidy.
10305         (push_template_decl): Always register specializations of the most
10306         general template.
10307         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
10308         (coerce_template_parms): Likewise.
10309         (lookup_template_class): Likewise.
10310         (innermost_args): Remove.
10311         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
10312         (tsubst_decl): Handle tricky specializations.  Use
10313         get_innermost_template_args.
10314         (instantiate_template): Simplify handling of partial
10315         instantiations.
10316         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
10317         (most_general_template): Reimplement, in a more straightforward
10318         manner.
10319         (regenerate_decl_from_template): Tweak formatting.  Use
10320         TMPL_ARGS_DEPTH for clarity.
10321         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
10322
10323         * dump.c (dequeue_and_dump): Dump information about thunks.
10324
10325 2000-06-01  Richard Henderson  <rth@cygnus.com>
10326
10327         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
10328
10329 2000-06-01  Richard Henderson  <rth@cygnus.com>
10330
10331         * decl2.c (unsupported_options): Fix typo, make const.
10332         (lang_decode_option): Fix bsearch argument order.
10333
10334 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
10335
10336         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
10337         on FIELD_DECLs.
10338
10339 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10340
10341         * cp-tree.h (c_get_alias_set): Deleted.
10342         * Makefile.in (decl.o): Include ../expr.h.
10343         * decl.c (expr.h): Include.
10344         (init_decl_processing): Call record_component_aliases for arrays.
10345         (grokdeclarator): Likewise.
10346         Set TREE_ADDRESSABLE for fields that aren't bitfields.
10347         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
10348
10349 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
10350
10351         Remove guiding declaration support.
10352         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
10353         (flag_guiding_decls): Remove.
10354         * call.c (build_user_type_conversion_1): Remove support for
10355         guiding decls.
10356         (build_new_function_call): Likewise.
10357         (build_new_op): Likewise.
10358         (build_new_method_call): Likewise.
10359         * decl.c (start_function): Likewise.
10360         * friend.c (is_friend): Likewise.
10361         (do_friend): Likewise.
10362         * decl2.c ((flag_dump_translation_unit): Make it const.
10363         (flag_guiding_decls): Remove.
10364         (unsupported_options): New variable
10365         (compare_options): New function.
10366         (lang_decode_option): Use them.
10367
10368         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
10369
10370         * method.c (mangle_expression): Adjust test for legal expression
10371         operators.
10372
10373         * pt.c (instantiate_decl): Save and restore the local
10374         specializations list.
10375
10376 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
10377
10378         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
10379
10380 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
10381
10382         * call.c (add_template_candidate_real): Handle member template
10383         constructors for classes with virtual bases.
10384         (build_user_type_conversion_1): Use in_charge_arg_for_name.
10385         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
10386
10387         * ir.texi: Update thunk documentation.
10388
10389         * call.c (joust): Fix handling of overloaded builtin operators.
10390
10391 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
10392
10393         * cp-tree.h (DECL_ANTICIPATED): New macro.
10394         Document new use of DECL_LANG_FLAG_7.
10395         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
10396         in the user namespace.
10397         * lex.c (do_identifier): If the identifier's declaration has
10398         DECL_ANTICIPATED on, it has not yet been declared.  But do not
10399         replace it with an ordinary implicit declaration.
10400
10401         * tinfo2.cc: Include stdlib.h.
10402
10403 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
10404
10405         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
10406         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
10407         CLASSTYPE_ALIGN.
10408
10409 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
10410
10411         * decl2.c (lang_decode_option): Use skip_leading_substring instead
10412         of plain strncmp.
10413
10414 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
10415
10416         * operators.def (<?): Duplicated, should have been...
10417         (>?): this.  Fixed.
10418
10419 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
10420             Mark Mitchell  <mark@codesourcery.com>
10421
10422         * cp-tree.h (ansi_opname): Make it a macro.
10423         (ansi_assopname): Likewise.
10424         (struct lang_decl_flags): Add assignment_operator_p.
10425         (struct lang_decl): Add operator_code.
10426         (DECL_VTT_PARM): Adjust.
10427         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
10428         overloaded operator.
10429         (SET_OVERLOADED_OPERATOR_CODE): New macro.
10430         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
10431         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
10432         (opname_tab): Remove.
10433         (assignop_tab): Likewise.
10434         (operator_name_info_t): New type.
10435         (operator_name_info): New variable.
10436         (assignment_operator_name_info): Likewise.
10437         (build_cp_library_fn): Remove declaration.
10438         (push_cp_library_fn): Likewise.
10439         (operator_name_string): Likewise.
10440         (build_decl_overload): Likewise.
10441         * call.c (print_z_candidates): Simplify.
10442         (build_object_call): Adjust usage of ansi_opname.  Use
10443         DECL_OVERLOADED_OPERATOR_P.
10444         (op_error): Adjust operator name lookup.
10445         (build_conditional_expr): Adjust usage of ansi_opname.
10446         (build_new_op): Likewise.
10447         (build_op_delete_call): Likewise.
10448         (build_over_call): Likewise.
10449         (joust): Use DECL_OVERLOADED_OPERATOR_P.
10450         * decl.c (duplicate_decls): Copy operator_code.
10451         (init_decl_processing): Adjust parameters to push_cp_library_fn.
10452         (builtin_function): Adjust parameters to build_library_fn_1.
10453         (build_library_fn_1): Accept an overloaded operator code.
10454         (build_library_fn): Pass ERROR_MARK.
10455         (build_cp_library_fn): Accept an overloaded operator code.
10456         (push_cp_library_fn): Likewise.
10457         (grokfndecl): Tweak.
10458         (grokdeclarator): Simplify code to compute names of overloaded
10459         operators.  Adjust use of ansi_opname.
10460         (ambi_op_p): Work on tree_codes, not identifiers.
10461         (unary_op_p): Likewise.
10462         (grok_op_properties): Likewise.
10463         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
10464         (lang_mark_tree): Don't try to mark the operator_code.
10465         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
10466         * error.c (dump_decl): Remove special handling for operator
10467         names.
10468         (dump_function_name): Likewise.
10469         (dump_expr): Adjust name lookup of operators.
10470         (op_to_string): Simplify.
10471         (assop_to_string): Likewise.
10472         * init.c (build_new_1): Adjust use of ansi_opname.
10473         * lex.c (opname_tab): Remove.
10474         (assignop_tab): Likewise.
10475         (ansi_opname): Likewise.
10476         (ansi_assopname): Likewise.
10477         (operator_name_string): Likewise.
10478         (reinit_lang_specific): Likewise.
10479         (operator_name_info): New variable.
10480         (assignment_operator_name_info): Likewise.
10481         (init_operators): New function.
10482         (init_parse): Use it.
10483         (do_identifier): Adjust use of ansi_opname.
10484         * method.c (mangle_expression): Don't use ansi_opname for
10485         mangling.
10486         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
10487         (build_decl_overload): Remove.
10488         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
10489         (do_build_assign_ref): Adjust use of ansi_opname.
10490         (synthesize_method): Likewise.
10491         (implicitly_declare_fn): Likewise.
10492         * operators.def: New file.
10493         * parse.y (operator): Adjust use of ansi_opname.
10494         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
10495         (set_mangled_name_for_template_decl): Don't play games with
10496         current_namespace.
10497         (special_function_p): Adjust use of ansi_opname.
10498         * typeck.c (check_return_expr): Likewise.
10499         * Make-lang.in (cc1plus): Depend on operators.def.
10500         * Makefile.in (lex.o): Likewise.
10501         (decl.o): Likewise.
10502
10503 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
10504
10505         * Make-lang.in (cplib2.ready): Eradicate.
10506
10507 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10508
10509         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
10510         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
10511         (built_min, cp_tree_equal): Likewise.
10512
10513 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
10514
10515         * class.c (layout_nonempty_base_or_field): Replace
10516         `record_layout_info' with `record_layout_info_s'.
10517
10518 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
10519
10520         Fix goto checking.
10521         * cp-tree.h (struct language_function): x_named_labels is now
10522         a struct named_label_list*.
10523         * decl.c (struct named_label_use_list): Renamed from...
10524         (struct named_label_list): ...this.  New struct.
10525         (push_binding_level): Don't set eh_region.
10526         (note_level_for_eh): New fn.
10527         (pop_label): Take label and old value directly.
10528         (pop_labels): Adjust for new named_labels format.
10529         (lookup_label): Likewise.
10530         (poplevel): Note characteristics of a binding level containing a
10531         named label.  Mess with named label lists earlier.
10532         (mark_named_label_lists): New fn.
10533         (mark_lang_function): Call it.
10534         (use_label): New fn, split out from...
10535         (make_label_decl): ...here.  Don't call it.
10536         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
10537         check_previous_gotos): New fns, split out from...
10538         (define_label): ...here.
10539         (check_switch_goto): New fn.
10540         (define_case_label): Call it.
10541         (check_goto): New fn.
10542         * semantics.c (finish_goto_stmt): Call it and use_label.
10543         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
10544         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
10545
10546 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
10547
10548         * class.c (build_vtable_entry_ref): Correct usage of
10549         get_vtbl_decl_for_binfo.
10550
10551         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
10552         * method.c (implicitly_declare_fn): Not here.
10553
10554 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
10555
10556         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
10557         (CPTI_PTMD_DESC_TYPE): ... here.
10558         (ptmd_desc_type_node): Rename to ...
10559         (ptm_desc_type_node): ... here.
10560         * decl.c: Likewise.
10561         * rtti.c (ptmd_initializer): Rename to ...
10562         (ptm_initializer): ... here.
10563         (sythesize_tinfo_var): Adjust. Deal with pointer to member
10564         function.
10565         (create_tinfo_types): Adjust.
10566
10567 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
10568
10569         Finish implementation of VTTs.
10570         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
10571         CPTI_VTT_PARM_IDENTIFIER.
10572         (vtt_parm_identifier): New macro.
10573         (vtt_parm_type): Likewise.
10574         (BINFO_SUBVTT_INDEX): Likewise.
10575         (BINFO_VPTR_INDEX): Likewise.
10576         (struct lang_decl): Add vtt_parm.
10577         (DECL_VTT_PARM): New macro.
10578         (DECL_USE_VTT_PARM): Likewise.
10579         (DECL_NEEDS_VTT_PARM_P): Likewise.
10580         (get_vtt_name): Declare.
10581         (build_artificial_parm): Likewise.
10582         (fixup_all_virtual_upcast_offsets): Likewise.
10583         (expand_indirect_vtbls_init): Remove.
10584         * call.c (build_new_method_call): Pass the vtt to subobject
10585         constructors and destructors.
10586         * class.c (get_vtt_name): Give it external linkage.
10587         (build_clone): Handle the magic VTT parameters for clones.
10588         (clone_function_decl): Fix typo in comment.
10589         (build_vtt): Keep track of the indices in the VTTs where various
10590         entities are stored.
10591         (build_vtt_inits): Likewise.
10592         (dfs_build_vtt_inits): Likewise.
10593         (build_ctor_vtbl_group): Tweak type of construction vtables.
10594         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
10595         primary bases, when building construction vtables.
10596         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
10597         (initialize_predefined_identifiers): Add vtt_parm_identifier.
10598         (init_decl_processing): Initialize vtt_parm_type.
10599         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
10600         (lang_mark_tree): Make vtt_parm.
10601         * decl2.c (build_artificial_parm): New function.
10602         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
10603         (grokclassfn): Use build_artificial_parm.
10604         * init.c (initialize_vtbl_ptrs): Call
10605         fixup_all_virtual_upcast_offsets directly.
10606         (perform_member_init): Use the complete subobject destructor for
10607         member cleanups.
10608         (build_vtbl_address): New function.
10609         (expand_virtual_init): Handle VTTs.
10610         * optimize (maybe_clone_body): Likewise.
10611         * search.c (fixup_all_virtual_upcast_offsets): Give it external
10612         linkage.
10613         (expand_indirect_vtbls_init): Remove.
10614         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
10615         * tree.c (make_binfo): Make them bigger.
10616
10617 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
10618
10619         * inc/cxxabi.h (__pbase_type_info): Define, based on
10620         __pointer_type_info.
10621         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
10622         (__pointer_to_member_type_info): Likewise.
10623         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
10624         (__pointer_to_member_type_info::__is_pointer_p): Remove.
10625         (__pointer_type_info::__do_catch): Rename to ...
10626         (__pbase_type_info::__do_catch): ... here. Adjust.
10627         (__pbase_type_info::__pointer_catch): Implement.
10628         (__pointer_type_info::__pointer_catch): Adjust.
10629         (__pointer_to_member_type_info::__pointer_catch): Adjust.
10630
10631 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
10632
10633         * tinfo.h (__user_type_info::contained_virtual_p): New
10634         predicate.
10635         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
10636         shaped hierarchy.
10637         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
10638         diamond shaped hierarchy. Add early out for mixed diamond and
10639         duplicate shaped hierarchy.
10640
10641 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
10642
10643         * cp-tree.h (build_delete): Change prototype.
10644         (build_vec_delete): Likewise.
10645         * call.c (build_scoped_method_call): Use special_function_kind
10646         values to indicate the kind of destruction to be done.
10647         (build_method_call): Likewise.
10648         * decl.c (finish_destructor_body): Likewise.
10649         (maybe_build_cleanup_1): Likewise.  Rename to ...
10650         (maybe_build_cleanup): ... this.
10651         * decl2.c (delete_sanity): Use special_function_kind
10652         values to indicate the kind of destruction to be done.
10653         (build_cleanup): Likewise.
10654         * init.c (perform_member_init): Likewise.
10655         (build_vec_delete_1): Likewise.
10656         (build_dtor_call): Simplify.
10657         (build_delete): Use special_function_kind
10658         values to indicate the kind of destruction to be done.
10659         (build_vbase_delete): Likewise.
10660         (build_vec_delete): Likewise.
10661
10662         * init.c (sort_member_init): Fix typo in error message generation
10663         code.
10664
10665 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
10666
10667         * semantics.c (begin_class_definition): make the packed
10668         attribute be sensitive to the "-fpack-struct" command line flag
10669
10670 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
10671
10672         Update new-abi upcast algorithm.
10673         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
10674         prototype and meaning of return value.
10675         (__si_class_type_info::__do_upcast): Likewise.
10676         (__vmi_class_type_info::__do_upcast): Likewise.
10677         * tinfo.cc (__class_type_info::__upcast_result): Replace
10678         whole2dst with part2dst. Adjust ctor.
10679         (__class_type_info::__do_upcast): Adjust call of worker function.
10680         (__class_type_info::__do_upcast): Adjust.
10681         (__si_class_type_info::__do_upcast): Adjust. Use parent's
10682         __do_upcast.
10683         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
10684         virtual base in diamond hierarchy bug.
10685
10686 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
10687
10688         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
10689         and bitfield to tinfo_fn_p.
10690         (DECL_TINFO_FN_P): Adjust.
10691         (SET_DECL_TINFO_FN_P): Likewise.
10692         (DECL_MUTABLE_P): Likewise.
10693         (DECL_C_BIT_FIELD): Likewise.
10694         (SET_DECL_C_BIT_FIELD): Likewise.
10695         (CLEAR_DECL_C_BIT_FIELD): Likewise.
10696         (DECL_UNINLINABLE): Likewise.
10697         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
10698         (handle_using_decl): Remove assertion.
10699         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
10700         to build FIELD_DECLs.
10701         (build_base_field): Likewise.
10702         (layout_class_type): Likewise.
10703         * decl.c (init_decl_processing): Likewise.
10704         (build_ptrmemfunc_type): Likewise.
10705         (grokdeclarator): Likewise.
10706         * decl2.c (grok_x_components): Likewise.
10707         * except.c (call_eh_info): Likewise.
10708         * init.c (init_init_processing): Likewise.
10709         * rtti.c (expand_class_desc): Likewise.
10710         (create_pseudo_type_info): Likewise.
10711         (get_vmi_pseudo_type_info): Likewise.
10712         (create_tinfo_types): Likewise.
10713         * ptree.c (print_lang_decl): Adjust.
10714         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
10715         before checking DECL_MUTABLE_P.
10716
10717         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
10718         parameters for template functions.
10719         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
10720         destructors as well as constructors.
10721
10722 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
10723
10724         * class.c (build_ctor_vtbl_group): Set inits.
10725         * optimize.c (maybe_clone_body): Set DECL_INLINE and
10726         DECL_THIS_INLINE appropriately for clones.
10727
10728         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
10729         (DECL_CONV_FN_P): Simplify.
10730         (DECL_OPERATOR): Remove.
10731         (language_to_string): Declare.
10732         * decl.c (duplicate_decls): Fix typo in comment.
10733         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
10734         (grok_op_properties): Use DECL_CONV_FN_P instead of
10735         IDENTIFIER_TYPENAME_P.
10736         * dump.c (dequeue_and_dump): Dump the language linkage of
10737         declarations.
10738         * error.c (language_to_string): Give it external linkage.
10739         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
10740         (implicitly_declare_fn): Set DECL_LANGUAGE.
10741         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
10742         IDENTIFIER_TYPENAME_P.
10743         (tsubst_decl): Likewise.
10744         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
10745         * semantics.c (finish_member_declaration): Don't mark members of
10746         classes declared in an extern "C" region as extern "C".
10747
10748 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10749
10750         * decl2.c (qualified_lookup_using_namespace): Look through
10751         namespace aliases.
10752
10753         * decl.c (push_using_decl): Return the old decl on namespace level.
10754
10755 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
10756
10757         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
10758         (VTT_NAME_PREFIX): New macro.
10759         (CTOR_VTBL_NAME_PREFIX): Likewise.
10760         (get_ctor_vtbl_name): New function.
10761         * class.c (get_vtable_name): Simplify.
10762         (get_vtt_name): New function.
10763         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
10764         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
10765         when a virtual base becomes primary.
10766         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
10767         VTTs.
10768         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
10769         additional parameters.
10770         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
10771         (initialize_array): New function.
10772         (build_vtt): Likewise.
10773         (build_vtt_inits): Likewise.
10774         (dfs_build_vtt_inits): Likewise.
10775         (dfs_fixup_binfo_vtbls): Likewise.
10776         (build_ctor_vtbl_group): Likewise.
10777         (initialize_vtable): Use initialize_array.
10778         (accumulate_vtbl_inits): Reimplement to handle construction
10779         vtables.
10780         (dfs_accumulate_vtbl_inits): Likewise.
10781         (bulid_vtbl_initializer): Adjust parameter name.
10782         * method.c (build_typename_overload): Remove #if 0'd code.
10783         (get_ctor_vtbl_name): New function.
10784         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
10785         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
10786
10787         * cp-tree.h (struct lang_type): Remove search_slot.
10788         (CLASSTYPE_SEARCH_SLOT): Remove.
10789         (emit_base_init): Change prototype.
10790         (initialize_vtbl_ptrs): Likewise.
10791         (expand_indirect_vtbls_init): Likewise.
10792         (clear_search_slots): Remove.
10793         * decl.c (lang_mark_tree): Don't mark search_slot.
10794         * init.c (initialize_vtbl_ptrs): Simplify.
10795         (emit_base_init): Likewise.
10796         * search.c (struct vbase_info): Document decl_ptr.
10797         (convert_pointer_to_single_level): Remove.
10798         (dfs_find_vbases): Remove.
10799         (dfs_init_base_pointers): Simplify.
10800         (dfs_clear_vbase_slots): Remove.
10801         (dfs_vtable_path_unmark): New function.
10802         (init_vbase_pointers): Simplify.
10803         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
10804         (expand_indirect_vtbls_init): Simplify.  Don't call
10805         mark_all_temps_used.
10806         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
10807         initialize_vtbl_ptrs.
10808
10809 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
10810
10811         * except.c: Add static prototypes.
10812
10813 2000-05-20  H.J. Lu  <hjl@gnu.org>
10814
10815         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
10816
10817 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
10818
10819         Don't create a separate copy of virtual bases for the
10820         CLASSTYPE_VBASECLASSES list.
10821         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
10822         (BINFO_FOR_VBASE): Remove.
10823         (CANONICAL_BINFO): Adjust.
10824         (binfo_for_vbase): New function.
10825         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
10826         instead of BINFO_FOR_VBASE.
10827         (build_vbase_pointer): Likewise.
10828         (build_secondary_vtable): Likewise.
10829         (dfs_mark_primary_bases): Likewise.
10830         (mark_primary_bases): Likewise.
10831         (layout_nonempty_base_or_field): Likewise.
10832         (dfs_set_offset_for_shared_vbases): Likewise.
10833         (dfs_set_offset_for_unshared_vbases): Likewise.
10834         (layout_virtual_bases): Likewise.  Adjust for changes to the
10835         CLASSTYPE_VBASECLASSES list.
10836         (dump_class_hierarchy_r): Use binfo_for_vbase
10837         instead of BINFO_FOR_VBASE.
10838         (dump_class_hierarchy): Likewise.
10839         (finish_vtbls): Likewise.
10840         (build_vtbl_initializer): Adjust for changes to the
10841         CLASSTYPE_VBASECLASSES list.
10842         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
10843         * decl.c (finish_destructor_body): Adjust for changes to the
10844         CLASSTYPE_VBASECLASSES list.
10845         * init.c (sort_base_init): Use binfo_for_vbase.
10846         (construct_virtual_bases): Adjust for changes to the
10847         CLASSTYPE_VBASECLASSES list.
10848         (expand_member_init): Use binfo_for_vbase.
10849         (build_vbase_delete):  Adjust for changes to the
10850         CLASSTYPE_VBASECLASSES list.
10851         * method.c (do_build_copy_constructor): Likewise.
10852         * rtti.c (get_base_offset): Use binfo_for_vbase.
10853         (expand_class_desc): Remove #if 0'd code.
10854         * search.c (struct vbase_info): Remove vbase_types.
10855         (get_base_distance):  Use binfo_for_vbase.
10856         (lookup_field_queue_p): Use CANONICAL_BINFO.
10857         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
10858         (get_pure_virtuals): Adjust for changes to the
10859         CLASSTYPE_VBASECLASSES list.
10860         (dfs_find_vbases): Use binfo_for_vbase.
10861         (dfs_init_vbase_pointers): Likewise.
10862         (init_vbase_pointers): Don't initialize vi.vbase_types.
10863         (virtual_context): Use binfo_for_vbase.
10864         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
10865         CLASSTYPE_VBASECLASSES list.
10866         (expand_indirect_vtbls_init): Simplify.
10867         (dfs_get_vbase_types): Don't replicate virtual bases.
10868         (find_vbase_instance): Use binfo_for_vbase.
10869         (binfo_for_vbase): New function.
10870         * typeck.c (get_delta_difference): Use binfo_for_vbase.
10871
10872 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
10873
10874         * decl2.c (finish_anon_union): Generalize error messages to handle
10875         anonymous structures.
10876         * init.c (perform_member_init): Remove `name' parameter.
10877         (build_field_list): New function.
10878         (sort_member_init): Handle anonymous union initialization order
10879         correctly.  Check for multiple initializations of the same union.
10880         (emit_base_init): Don't look up fields by name here.
10881         (expand_member_init): Record the result of name lookup for future
10882         reference.
10883         * typeck.c (build_component_ref): Fix formatting.
10884
10885 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
10886
10887         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
10888         * typeck.c (build_x_compound_expr): Replace warn_unused with
10889         warn_unused_value.
10890
10891         * decl2.c (lang_decode_option): Update -Wall unused flags by
10892         calling set_Wunused.
10893
10894 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
10895
10896         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
10897         * init.c (dfs_vtable_path_unmark): Remove.
10898         * search.c (marked_new_vtable_p): Likewise.
10899         (unmarked_new_vtable_p): Likewise.
10900         (dfs_search_slot_nonempty_p): Likewise.
10901         (dfs_mark): Likewise.
10902         (dfs_vtable_path_unmark): Likewise.
10903         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
10904         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
10905         (dfs_init_vbase_pointers): Remove special-case new ABI code.
10906         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
10907         (init_vbase_pointers): Simplify.
10908         (expand_indirect_vtbls_init): Likewise.
10909
10910         * class.c (copy_virtuals): New function.
10911         (build_primary_table): Use it.
10912         (build_secondary_vtable): Likewise.
10913         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
10914         indicate that no vcall offset is required.
10915         (add_virtual_function): Likewise.
10916         (modify_all_vtables): Likewise.
10917         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
10918         (dfs_accumulate_vtbl_inits): Likewise.
10919         (build_vtbl_initializer): Make changes to handle construction
10920         vtables.
10921         (dfs_build_vcall_offset_vtbl_entries): Likewise.
10922         (build_rtti_vtbl_entries): Likewise.
10923         (build_vtable_entries): Handle a NULL vcall_index.
10924
10925 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
10926
10927         * decl2.c (lang_decode_option): Fix thinko.
10928
10929 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
10930
10931         * except.c (check_handlers): New fn.
10932         * cp-tree.h: Declare it.
10933         * semantics.c (finish_handler_sequence): Call it.
10934         (finish_function_handler_sequence): Likewise.
10935         (finish_handler_parms): Set TREE_TYPE on the handler.
10936         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
10937         * search.c (get_base_distance_recursive): If protect>1, ignore
10938         special access.
10939         (get_base_distance): Don't reduce watch_access.
10940
10941 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
10942
10943         * lex.c: #include diagnostic.h.
10944         (lang_init_options): Set default prefixing rules.
10945
10946         * lang-options.h: Add -fdiagnostics-show-location=.
10947
10948         * decl2.c: #include diagnostic.h.
10949         (lang_decode_option): Handle -fdiagnostics-show-location=.
10950
10951 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
10952
10953         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
10954         * vec.cc: Revert my 2000-05-07 change.
10955
10956 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
10957
10958         * class.c (check_field_decls): Complain about non-static data
10959         members with same name as class in class with constructor.
10960
10961 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
10962
10963         * decl.c (grokdeclarator): Allow non-static data members with
10964         same name as class.
10965
10966 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
10967
10968         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
10969         and pending_inline.filename.  Update prototypes.
10970         * decl.c (define_label): Constify filename parameter.
10971         * decl2.c (warn_if_unknown_interface): Constify local char *.
10972         * input.c Constify input_source.filename. Don't declare
10973         input_filename or lineno.  Constify filename parameter to feed_input.
10974         * lex.c (init_parse): Constify parameter and return value.
10975         (cp_pragma_interface, cp_pragma_implementation): Constify
10976         filename argument.
10977         (reinit_parse_for_method, reinit_parse_for_block,
10978         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
10979         Constify local char *.
10980         * pt.c: Don't declare lineno or input_filename.
10981         (print_template_context, tsubst_friend_function, tsubst_decl,
10982         tsubst, instantiate_decl): Constify local char *.
10983         * semantics.c (expand_body): Constify local char *.
10984         * tree.c (build_srcloc): Constify filename parameter.
10985         * typeck.c (c_expand_asm_operands): Constify filename
10986         parameter.
10987
10988 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
10989
10990         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
10991         offsetof expansion.
10992
10993 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
10994
10995         * inc/cxxabi.h:  Fix typos in comment.
10996         (__base_class_info::__offset): Use a static_cast.
10997
10998 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
10999
11000         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
11001         of std::size_t and std::ptrdiff_t respectively.
11002         * tinfo.cc: Likewise.
11003         * vec.cc: Likewise.
11004
11005 2000-05-06  Richard Henderson  <rth@cygnus.com>
11006
11007         * typeck.c (build_c_cast): Don't warn integer->pointer size
11008         mismatch for constants.
11009
11010 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
11011
11012         * rtti.c (ptmd_initializer): Set non-public, if class is
11013         incomplete.
11014
11015         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
11016         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
11017         __cxa_vec_delete): Likewise.
11018         * tinfo.cc (__dynamic_cast): Likewise.
11019         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
11020         __cxa_vec_delete): Likewise.
11021
11022 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
11023
11024         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
11025         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
11026         (lang_decl_flags): Add vcall_offset.
11027         (THUNK_VCALL_OFFSET): Use it.
11028         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
11029         * method.c (make_thunk): Create the lang_decl here, not in
11030         emit_thunk.
11031         (emit_thunk): Make generic thunks into ordinary functions once
11032         they have been fed to expand_body.
11033         * semantics.c (expand_body): Set current_function_is_thunk here.
11034
11035 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11036
11037         * class.c (update_vtable_entry_for_fn): Prototype.
11038
11039         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
11040         and `tmpl'.
11041
11042         * search.c (dfs_build_inheritance_graph_order): Prototype.
11043
11044 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
11045
11046         * cp-tree.h (special_function_kind): Add various kinds of
11047         destructors.
11048         (special_function_p): New function.
11049         * class.c (overrides): Don't let one kind of destructor override
11050         another.
11051         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
11052         whether or not to instantiate a template.
11053         * tree.c (special_function_p): Define.
11054
11055 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
11056
11057         * cp-tree.def (THUNK_DECL): Remove.
11058         * cp-tree.h (DECL_THUNK_P): New macro.
11059         (DECL_NON_THUNK_FUNCTION_P): Likewise.
11060         (DECL_EXTERN_C_FUNCTION_P): Likewise.
11061         (SET_DECL_THUNK_P): Likewise.
11062         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
11063         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
11064         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
11065         * decl.c (decls_match): Use DECL_EXTERN_C_P.
11066         (duplicate_decls): Likewise.
11067         (pushdecl): Likewise.  Adjust thunk handling.
11068         (grokfndecl): Use DECL_EXTERN_C_P.
11069         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
11070         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
11071         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
11072         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
11073         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
11074         DECL_NO_STATIC_CHAIN.
11075         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
11076         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
11077         * search.c (covariant_return_p): Remove THUNK_DECL handling.
11078         * ir.texi: Update.
11079
11080 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
11081
11082         * tree.c (walk_tree): Set lineno.
11083
11084 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
11085
11086         * exception.cc: Update license notice.
11087         * new.cc: Likewise.
11088         * new1.cc: Likewise.
11089         * new2.cc: Likewise.
11090         * tinfo.cc: Likewise.
11091         * tinfo2.cc: Likewise.
11092         * vec.cc: Likewise.
11093         * inc/cxxabi.h: Likewise.
11094         * inc/exception: Likewise.
11095         * inc/new: Likewise.
11096         * inc/new.h: Likewise.
11097         * inc/typeinfo: Likewise.
11098
11099 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
11100
11101         * tree.c (build_target_expr_with_type): If we already have a
11102         TARGET_EXPR, just return it.
11103
11104         * optimize.c (initialize_inlined_parameters): Don't generate an
11105         EXPR_STMT if we can just use DECL_INITIAL.
11106         * decl.c (emit_local_var): Only make the initialization a
11107         full-expression if stmts_are_full_exprs_p.
11108
11109 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
11110
11111         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
11112         macro.
11113         * call.c (standard_conversion): Use it.
11114         (direct_reference_binding): Likewise.
11115         (build_over_call): Likewise.
11116         (is_properly_derived_from): Likewise.
11117         (compare_ics): Likewise.
11118         * class.c (resolves_to_fixed_type_p): Likewise.
11119         * optimize.c (declare_return_variable): Likewise.
11120         * pt.c (is_specialization_of): Likewise.
11121         (unify): Likewise.
11122         * typeck.c (comp_target_parms): Likeiwse.
11123         (build_static_cast): Likewise.
11124         (build_reinterpret_cast): Likewise.
11125         (build_const_cast): Likewise.
11126         (comp_ptr_ttypes_real): Likewise.
11127         (comp_ptr_ttypes_const): Likewise.
11128         * typeck2.c (process_init_constructor): Likewise.
11129
11130 2000-04-30  Scott Snyder <snyder@fnal.gov>
11131
11132         * decl.c (finish_destructor_body): Use the base destructor when
11133         destroying virtual bases.
11134
11135 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
11136
11137         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
11138         STMT_EXPRs.
11139         * optimize.c (struct inline_data): Add target_exprs field.
11140         (declare_return_variable): When a function returns an aggregate,
11141         use the variable declared in the TARGET_EXPR as the remapped
11142         DECL_RESULT.
11143         (expand_call_inline): Update the pending target_exprs stack.
11144         (optimize_function): Initialize the stack.
11145
11146         * decl2.c (finish_file): Fix typo in comment.
11147
11148         * method.c (emit_thunk): Don't try to return a `void' value.
11149
11150         * optimize.c (initialize_inlined_parameters): If the parameter is
11151         addressable, we need to make a new VAR_DECL, even if the
11152         initializer is constant.
11153
11154 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
11155
11156         * decl.c (grok_op_properties): Add an extra check of argtypes.
11157
11158 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
11159
11160         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
11161         variables.
11162         (initialize_inlined_parameters): Try to avoid creating new
11163         VAR_DECLs.
11164
11165 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
11166
11167         * lex.c (my_get_run_time): Remove.
11168         (init_filename_times): Use get_run_time instead of my_get_run_time.
11169         (check_newline): Likewise.
11170         (dump_time_statistics): Likewise.
11171         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
11172         of computing elapsed time explicitly.
11173
11174 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
11175
11176         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
11177         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
11178         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
11179         before calling decl_constant_value.
11180         * class.c (check_bitfield_decl): Likewise.
11181         * cvt.c (ocp_convert): Likewise.
11182         (convert): Likewise.
11183         * decl.c (compute_array_index_type): Likewise.
11184         (build_enumerator): Likewise.
11185         * decl2.c (check_cp_case_value): Likewise.
11186         * pt.c (convert_nontype_argument): Likewise.
11187         (tsubst): Likewise.
11188         * typeck.c (decay_conversion): Likewise.
11189         (build_compound_expr): Likewise.
11190         (build_reinterpret_cast): Likewise.
11191         (build_c_cast): Likewise.
11192         (convert_for_assignment): Likewise.
11193
11194 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
11195
11196         * decl.c (finish_function): Don't play games with DECL_INLINE.
11197
11198 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
11199
11200         * ir.texi: Correct typo.
11201
11202 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11203
11204         * decl.c (grokdeclarator): Reject VLAs as members.
11205
11206 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
11207
11208         * call.c (standard_conversion): Accept conversion between
11209         COMPLEX_TYPEs.
11210
11211         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
11212
11213 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
11214
11215         * decl2.c (finish_file): Remove double setup for accounting
11216         compile time.
11217
11218 2000-04-24  Robert Lipe <robertlipe@usa.net>
11219
11220         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
11221
11222 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
11223
11224         * new.cc (set_new_handler): Needs to be in std::.
11225
11226 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
11227
11228         * cp-tree.h (lang_decl): Remove pretty_function_p.
11229         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
11230         language-specific node.
11231         * decl.c (cp_make_fname_decl): Use build_decl, not
11232         build_lang_decl, to build the variables.
11233         (grokvardecl): Don't call build_lang_decl for local variables in
11234         templates.
11235         (grokdeclarator): Don't call build_lang_decl for local type
11236         declarations in templates.
11237         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
11238         zero'd memory, rather than calling memset.
11239         * pt.c: Include hashtab.h.
11240         (local_specializations): New variable.
11241         (retrieve_local_specialization): Use it.
11242         (register_local_specialization): Likewise.
11243         (tsubst_decl): Don't assume local variables have
11244         DECL_LANG_SPECIFIC.
11245         (instantiate_decl): Set up local_specializations.
11246         * Makefile.in (HTAB_H): New variable.
11247
11248 2000-04-23  Richard Henderson  <rth@cygnus.com>
11249
11250         * typeck.c (c_expand_asm_operands): Restore the original
11251         contents of the output list.
11252
11253 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
11254
11255         * ir.texi:  Document complex number representation.
11256
11257 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11258
11259         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
11260         (target_incomplete_p): New function.
11261         (tinfo_base_init): Create comdat NTBS name variable.
11262         (ptr_initializer): Add non_public parameter. Calculate it.
11263         (ptmd_initializer): Likewise.
11264         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
11265         (create_real_tinfo_var): Add non_public parameter. Use it.
11266         Push proxy into global namespace.
11267         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
11268         New enumeration.
11269         * inc/typeinfo (type_info::before, type_info::operator==):
11270         Compare __name addresses.
11271
11272         * tinfo2.cc: Remove new-abi builtins comment.
11273
11274 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
11275
11276         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
11277
11278         * call.c (joust): Exit early if we get the same function, too.
11279
11280         * decl2.c (key_method): Return NULL_TREE for template classes.
11281         (import_export_class): Don't need to check for template classes.
11282
11283 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
11284
11285         * lex.c: Remove references to cccp.c.
11286
11287 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
11288
11289         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
11290         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
11291         (DECL_DESTRUCTOR_P): Use destructor_attr.
11292         (DECL_CONST_MEMFUNC_P): Reimplement.
11293         (DECL_VOLATILE_MEMFUNC_P): Remove.
11294         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
11295         (overrides): Use DECL_DESTRUCTOR_P.
11296         (check_for_override): Likewise.
11297         * decl.c (start_function): Likewise.
11298         * decl2.c (grokfclassfn): Likewise.
11299         (check_classfn): Likewise.
11300         (grok_function_init): Likewise.
11301
11302 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
11303
11304         * decl2.c (grokfield): Issue error on illegal data member
11305         declaration.
11306
11307 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
11308
11309         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
11310
11311 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
11312
11313         * class.c (build_vtable_entry): Don't build thunks for type-info
11314         functions.
11315
11316 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
11317
11318         * decl.c (decls_match): Allow a redeclaration of a builtin to
11319         specify args while the builtin did not.
11320
11321 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
11322
11323         * cp-tree.def (THUNK_DECL): Add to documentation.
11324         * cp-tree.h (flag_huge_objects): Declare.
11325         * class.c (modify_vtable_entry): Tidy.
11326         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
11327         Calculate delta appropriately for the new ABI.
11328         (dfs_modify_vtables): Use it.
11329         (modify_all_vtables): Fix thinko in code to add overriding copies
11330         of functions to primary vtables.
11331         (build_clone): Fix typo in comment.
11332         (clone_function_decl): Correct order of destructors in vtable.
11333         (build_vbase_offset_vtbl_entries): Adjust comment.
11334         (dfs_vcall_offset_queue_p): Remove.
11335         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
11336         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
11337         (build_vtable_entry): Correct check for pure virtual functions.
11338         Don't declare flag_huge_objects.
11339         * decl.c (flag_huge_objects): Remove declaration.
11340         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
11341         Use int_size_in_bytes.
11342         (emit_thunk): Handle vcall offset thunks.
11343
11344 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11345
11346         * decl2.c (parse_time, varconst_time): Delete declarations.
11347         (finish_file): Delete LINENO declaration.
11348         START_TIME and THIS_TIME now long.
11349
11350 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
11351
11352         * class.c (build_base_field): Reformat comment.
11353
11354         * inc/cxxabi.h (stddef.h): Comment inclusion.
11355         (__base_class_info::__offset): Comment shift.
11356
11357 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
11358
11359         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
11360         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
11361         (cp_push_exception_identifier): New macro.
11362         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
11363         (DECL_BASE_DESTRUCTOR_P): Likewise.
11364         (DECL_DELETING_DESTRUCTOR_P): Likewise.
11365         (get_vtbl_decl_for_binfo): Fix formatting.
11366         (in_charge_arg_for_name): New macro.
11367         (maybe_build_cleanup_and_delete): Remove declaration.
11368         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
11369         (in_charge_arg_for_name): New function.
11370         (build_new_method_call): Use it.  Handle cloned destructors.
11371         (build_clone): Don't make the base constructor virtual.
11372         Automatically defer generated functions.
11373         (clone_function_decl): Handle destructors, too.
11374         (clone_constructors_and_destructors): Likewise.
11375         (create_vtable_ptr): Don't create a vtable entry for a cloned
11376         function.
11377         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
11378         (initialize_predefined_identifiers): Update appropriately.
11379         (finish_destructor_body): Simplify.
11380         (maybe_build_cleanup_and_delete): Remove.
11381         * except.c (expand_throw): Handle new-ABI destructors.
11382         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
11383         (build_dtor_call): New function.
11384         (build_delete): Use it.  Simplify.
11385         * optimize.c (maybe_clone_body): Handle destructors.
11386         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
11387
11388         * exception.cc (cleanup_fn): New typedef.
11389         (CALL_CLEANUP): New macro.
11390         (cp_eh_info): Use them.
11391         (__cp_push_exception): Likewise.
11392         (__cp_pop_exception): Likewise.
11393
11394 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
11395
11396         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
11397         (complete_dtor_identifier): New macro.
11398         (CLASSTYPE_FIRST_CONVERSION): Remove.
11399         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
11400         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
11401         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
11402         (CLASSTYPE_CONSTRUCTORS): Likewise.
11403         (CLASSTYPE_DESTRUCTORS): Likewise.
11404         (lang_decl): Add cloned_function.
11405         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
11406         (DECL_BASE_CONSTRUCTOR_P): Likewise.
11407         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
11408         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
11409         (DECL_CLONED_FUNCTION_P): Likewise.
11410         (DECL_CLONED_FUNCTION): Likewise.
11411         (clone_function_decl): Declare.
11412         (maybe_clone_body): Likewise.
11413         * call.c (build_user_type_conversion_1): Call complete object
11414         constructors in the new ABI.
11415         (build_new_method_call): Don't add in-charge parameters under the
11416         new ABI.
11417         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
11418         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
11419         CLASSTYPE_DESTRUCTOR_SLOT.
11420         (build_clone): New function.
11421         (clone_function_decl): Likewise.
11422         (clone_constructors_and_destructors): Likewise.
11423         (check_bases_and_members): Use it.
11424         * decl.c (iniitialize_predefined_identifiers): Initialize
11425         complete_dtor_identifier.
11426         (finish_function): Don't add extra code to a clone.
11427         (lang_mark_tree): Mark cloned_function.
11428         * decl2.c (mark_used): Don't bother trying to instantiate things
11429         we synthesized.
11430         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
11431         * method.c (set_mangled_name_for_decl): Don't treat clones as
11432         constructors.
11433         (synthesize_method): Sythesize cloned functions, not the clones.
11434         * optimize.c (inline_data): Update comment on ret_label.
11435         (remap_block): Don't assume DECL_INITIAL exists.
11436         (copy_body_r): Allow ret_label to be NULL.
11437         (maybe_clone_body): Define.
11438         * pt.c (tsubst_decl): Handle clones.
11439         (instantiate_clone): New function.
11440         (instantiate_template): Use it.
11441         (set_mangled_name_for_template_decl): Don't treat clones as
11442         constructors.
11443         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
11444         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
11445         * semantics.c (expand_body): Clone function bodies as necessary.
11446
11447         * optimize.c (remap_decl): Avoid sharing structure for arrays
11448         whose size is only known at run-time.
11449         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
11450
11451         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
11452         to has_in_charge_parm_p.
11453         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
11454         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
11455         (DECL_COPY_CONSTRUCTOR_P): New macro.
11456         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
11457         (build_user_type_conversion_1): Likewise.
11458         (convert_like_real): Likewise.
11459         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
11460         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
11461         (copy_args_p): Likewise.
11462         (grok_ctor_properties): Likewise.
11463         (start_function): Likewise.
11464         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
11465         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
11466         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
11467         * method.c (do_build_copy_constructor): Use
11468         DECL_HAS_IN_CHARGE_PARM_P.
11469         (synthesize_method): Likewise.
11470         * pt.c (instantiate_template): Remove goto.
11471         * tree.c (build_cplus_method_type): Remove mention of obstacks in
11472         comment.
11473
11474         * cp-tre.h (finish_function): Change prototype.
11475         * decl.c (end_cleanup_fn): Adjust caller.
11476         (finish_function): Take only one parameter.
11477         * decl2.c (finish_objects): Adjust caller.
11478         (finish_static_storage_duration_function): Likewise.
11479         * method.c (emit_thunk): Likewise.
11480         * parse.y: Likewise.
11481         * parse.c: Regenerated.
11482         * pt.c (instantiate_decl): Likewise.
11483         * rtti.c (synthesize_tinfo_fn): Likewise.
11484         * semantics.c (expand_body): Likewise.
11485
11486         * cp-tree.h (copy_decl): New function.
11487         * class.c (finish_struct_1): Use it.
11488         * lex.c (copy_decl): Define it.
11489         * pt.c (tsubst_decl): Likewise.
11490         * tree.c (copy_template_template_parm): Likewise.
11491
11492         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
11493         has_nonpublic_assign_ref.
11494         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
11495         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
11496         * class.c (finish_struct_methods): Don't set
11497         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
11498         (interface_only): Don't declare.
11499         (interface_unknown): Likewise.
11500
11501 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11502
11503         * tree.h (HAVE_TEMPLATES): Remove definition.
11504         * lang-options.h (-fthis-is-variable): Remove documentation.
11505
11506 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
11507
11508         * class.c (instantiate_type): Handle object-relative template-id.
11509
11510         * semantics.c (finish_expr_stmt): Call convert_to_void here.
11511         * decl.c (cplus_expand_expr_stmt): Not here.
11512
11513         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
11514         Initialize exprtype earlier.
11515
11516         * parse.y (fn.def1): Check for defining types in return types.
11517
11518         * decl.c (check_tag_decl): Notice extra fundamental types.
11519         Diagnose empty decls in classes, too.
11520
11521         * decl.c (grokdeclarator): Don't override an anonymous name if no
11522         declarator was given.
11523
11524         * cvt.c (convert_to_void): Call resolve_offset_ref.
11525
11526         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
11527
11528         * decl2.c (decl_namespace): Handle getting a type.
11529
11530         * typeck.c (build_c_cast): Re-enable warning for cast between
11531         pointer and integer of different size.
11532
11533 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
11534
11535         * inc/cxxabi.h (__pointer_type_info): Add restrict and
11536         incomplete flags.
11537         (__pointer_type_info::__pointer_catch): New virtual function.
11538         (__pointer_to_member_type_info): Derive from
11539         __pointer_type_info. Adjust.
11540         (__pointer_to_member_type_info::__do_catch): Remove.
11541         (__pointer_to_member_type_info::__is_pointer_p): Declare.
11542         (__pointer_to_member_type_info::__pointer_catch): Declare.
11543         * rtti.c (qualifier_flags): Add restrict flag.
11544         (ptmd_initializer): Reorder members.
11545         (create_tinfo_types): Expand comments. Reorder
11546         ptmd_desc_type_node members.
11547         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
11548         Implement.
11549         (__pointer_type_info::__do_catch): Move specific code into
11550         __pointer_catch. Call it.
11551         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
11552         specific catch checking. Fix void conversion check.
11553         (__pointer_to_member_type_info::__do_catch): Remove.
11554         (__pointer_to_member_type_info::__pointer_catch): Implement.
11555
11556 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11557
11558         * lex.c (init_parse): Remove traces of classof and headof.
11559         * decl2.c (flag_operator_names): Default to 1.
11560         (lang_decode_option): Do not set it for -ansi.
11561
11562 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
11563
11564         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
11565         (DECL_MAIN_VARIANT): Remove.
11566         * decl.c (duplicate_decls): Don't set it.
11567         (start_function): Likewise.
11568         (lang_mark_tree): Don't mark it.
11569         * decl2.c (defer_fn): Don't use it.
11570         * lex.c (retrofit_lang_decl): Don't set it.
11571         * pt.c (tsubst_decl): Likewise.
11572         * ptree.c (print_lang_decl): Don't print it.
11573         * typeck.c (mark_addressable): Don't use it.
11574
11575 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
11576
11577         * vec.cc: Include <new> and <exception>.
11578         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
11579         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
11580         terminate.
11581         (__cxa_vec_delete): Catch dtor exceptions.
11582
11583 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
11584
11585         Prepend __ to implementation defined names.
11586         * inc/typeinfo (type_info): Rename _name to __name.
11587         (type_info::type_info): Rename parameter.
11588         (type_info::operator==, type_info::operator!=,
11589         type_info::before): Likewise.
11590         (type_info::is_pointer_p, type_info::is_function_p,
11591         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
11592         parameters.
11593         * inc/cxxabi.h
11594         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
11595         (__pointer_type_info::__pointer_type_info): Likewise.
11596         (__pointer_type_info::is_pointer_p,
11597         __pointer_type_info::do_catch): Prepend __. Rename parameters.
11598         (__array_type_info::__array_type_info): Rename parameters.
11599         (__function_type_info::__function_type_info): Likewise.
11600         (__function_type_info::is_function_p): Prepend __.
11601         (__enum_type_info::__enum_type_info): Rename parameters.
11602         (__pointer_to_member_type_info::__pointer_to_member_type_info):
11603         Likewise.
11604         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
11605         parameters.
11606         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
11607         (__class_type_info::__class_type_info): Rename parameters.
11608         (__class_type_info::sub_kind): Prepend __. Adjust member names.
11609         (__class_type_info::upcast_result,
11610         __class_type_info::dyncast_result): Prepend __. Move definition
11611         into tinfo.cc.
11612         (__class_type_info::do_upcast, __class_type_info::do_catch,
11613         __class_type_info::find_public_src,
11614         __class_type_info::do_dyncast,
11615         __class_type_info::do_find_public_src): Prepend __. Rename
11616         parameters.
11617         (__si_class_type_info::__si_class_type_info): Rename parameters.
11618         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
11619         __si_class_type_info::do_find_public_src): Prepent __. Rename
11620         parameters.
11621         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
11622         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
11623         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
11624         parameters.
11625         (__dynamic_cast): Rename parameters.
11626         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
11627         type_info::do_catch, type_info::do_upcast): Prepend __.
11628         (contained_p, public_p, virtual_p, contained_public_p,
11629         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
11630         (__class_type_info::do_catch,
11631         __class_type_info::do_upcast): Prepend __. Adjust.
11632         (__class_type_info::__upcast_result,
11633         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
11634         Adjust.
11635         (__class_type_info::find_public_src): Prepend __. Adjust.
11636         (__class_type_info::do_find_public_src,
11637         __si_class_type_info::do_find_public_src,
11638         __vmi_class_type_info::do_find_public_src): Likewise.
11639         (__class_type_info::do_dyncast,
11640         __si_class_type_info::do_dyncast,
11641         __vmi_class_type_info::do_dyncast): Likewise.
11642         (__class_type_info::do_upcast,
11643         __si_class_type_info::do_upcast,
11644         __vmi_class_type_info::do_upcast): Likewise.
11645         (__dynamic_cast): Adjust.
11646         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
11647         (__function_type_info::is_function_p): Likewise.
11648         (__pointer_type_info::do_catch): Likewise. Adjust.
11649         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
11650         (__throw_type_match_rtti_2): Adjust.
11651         (__is_pointer): Adjust.
11652
11653 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
11654
11655         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
11656         (complete_ctor_identifier): New macro.
11657         (special_function_kind): Add sfk_copy_constructor and
11658         sfk_assignment_operator.
11659         (LOOKUP_HAS_IN_CHARGE): Remove.
11660         (cons_up_default_function): Rename to ...
11661         (implicitly_declare_fn): ... this.
11662         * call.c (build_new_method_call): Add in-charge parameters for
11663         constructors here.
11664         * class.c (add_implicitly_declared_members): Change parameter name
11665         from cant_have_assignment to cant_have_const_assignment.
11666         Replace calls to cons_up_default_function to implicitly_declare_fn.
11667         * cvt.c (ocp_convert): Use complete_ctor_identifier.
11668         * decl.c (initialize_predefined_identifiers): Initialize it.
11669         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
11670         complex expression.
11671         * init.c (expand_default_init): Don't calculate the in-charge
11672         parameter here.
11673         (build_new_1): Likewise.
11674         * lex.c (cons_up_default_function): Move to method.c.
11675         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
11676         (implicitly_declare_fn): New function.
11677         * typeck.c (build_static_cast): Use complete_ctor_identifier.
11678         (build_modify_expr): Likewise.
11679         * typeck2.c (build_functional_cast): Likewise.
11680
11681         Under the new ABI, constructors don't return `this'.
11682         * cp-tree.h (warn_reorder): Declare.
11683         (special_function_kind): New enum.
11684         (global_base_init_list): Remove declaration.
11685         (emit_base_init): Don't return a value.
11686         (check_base_init): Don't declare.
11687         (is_aggr_typedef): Likewise.
11688         * decl.c (check_special_function_return_type): New function.
11689         (return_types): Remove.
11690         (grokdeclarator): Use check_special_function_return_type.
11691         (start_function): Don't initialize ctor_label under the new ABI.
11692         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
11693         * init.c (begin_init_stmts): Move to top of file.
11694         (finish_init_stmts): Likewise.
11695         (warn_reorder): Don't declare.
11696         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
11697         value.
11698         (check_base_init): Remove.
11699         (is_aggr_typedef): Likewise.
11700         (build_new_1): Don't use the return value of a constructor.
11701         * semantics.c (setup_vtbl_ptr): Don't use the return value
11702         of emit_base_init.
11703         * typeck.c (check_return_expr): Don't magically convert return
11704         statements into `return this' in constructors under the new ABI.
11705
11706         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
11707         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
11708         (base_ctor_identifier): New macro.
11709         (base_dtor_identifier): Likewise.
11710         (deleting_dtor_identifier): Likewise.
11711         * decl.c: Don't include obstack.h.
11712         (obstack_chunk_alloc): Don't define.
11713         (obstack_chunk_free): Likewise.
11714         (struct predefined_identifier): New type.
11715         (initialize_predefined_identifiers): New function.
11716         (init_decl_processing): Use it.
11717         (debug_temp_inits): Remove.
11718         (start_method): Don't call preserve_data.
11719         (hack_incomplete_structures): Update comment.
11720         * init.c (init_init_processing): Don't initialize
11721         nelts_identifier.
11722         (build_offset_rf): Remove dead code.
11723         (build_delete): Use CLASSTYPE_N_BASECLASSES.
11724         * search.c (init_search_processing): Don't initialize
11725         vptr_identifier.
11726
11727 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11728
11729         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
11730         some sign_compare warnings.
11731
11732 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
11733
11734         Rename abi::__vmi_class_type_info members.
11735         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
11736         base_list, detail_masks members to vmi_flags, vmi_base_count,
11737         vmi_bases and vmi_flags_masks respectively.
11738         (__vmi_class_type_info::vmi_flags_masks): Rename
11739         details_unknown_mask to flags_unknown_mask.
11740         * tinfo.cc (__class_type_info::do_upcast): Adjust.
11741         (__vmi_class_type_info::do_find_public_src): Adjust.
11742         (__vmi_class_type_info::do_dyncast): Adjust.
11743         (__vmi_class_type_info::do_upcast): Adjust.
11744
11745 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
11746
11747         * tinfo.cc (convert_to_base): New function.
11748         (get_vbase_offset): Remove. Move into convert_to_base.
11749         (__vmi_class_type_info::do_find_public_src): Adjust.
11750         (__vmi_class_type_info::do_dyncast): Adjust.
11751         (__vmi_class_type_info::do_upcast): Adjust.
11752
11753 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
11754
11755         * tinfo.cc (operator=): Use __builtin_strcmp.
11756         * tinfo2.cc (before): Likewise.
11757
11758 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
11759
11760         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
11761         (DECL_SAVED_INLINE): Rename to ...
11762         (DECL_DEFERRED_FN): ... this.
11763         (in_function_p): Remove declaration.
11764         (mark_inline_for_output): Rename to ...
11765         (defer_fn): ... this.
11766         * decl.c (finish_function): Adjust call to mark_inline_for_output.
11767         (in_function_p): Remove definition.
11768         * decl2.c (saved_inlines): Rename to ...
11769         (deferred_fns): ... this.
11770         (saved_inlines_used): Rename to ...
11771         (deferred_fns_used): ... this.
11772         (mark_inline_for_output): Rename to ...
11773         (defer_fn): ... this.
11774         (finish_file): Adjust accordingly.
11775         (init_decl2): Likewise.
11776         * lex.c (cons_up_default_function): Likewise.
11777         * pt.c (mark_decl_instantiated): Likewise.
11778         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
11779         circumstances.
11780         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
11781         * semantics.c (expand_body): Defer more functions.
11782
11783 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
11784
11785         * vec.cc: New file.
11786         * Make-lang.in (CXX_LIB2FUNCS): Add it.
11787         (vec.o): Build it.
11788         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
11789         __cxa_vec_delete): Declare.
11790
11791 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
11792
11793         * rtti.c (dfs_class_hint_mark): New static function.
11794         (dfs_class_hint_unmark): New static function.
11795         (class_hint_flags): Use them.
11796
11797 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
11798
11799         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
11800
11801 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
11802
11803         * cp-tree.h (instantiate_decl): Change prototype.
11804         * decl2.c (mark_used): Adjust call.
11805         * optimize.c (inlinable_function_p): Adjust handling of templates.
11806         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
11807         (do_type_instantiation): Likewise.
11808         (instantiate_decl): Defer more templates.
11809         (instantiate_pending_templates): Adjust logic to handle inline
11810         friend functions.
11811
11812         * Makefile.in (GGC_H): New variable.  Use it throughout in place
11813         of ggc.h.
11814
11815         * call.c: Don't include obstack.h.  Include ggc.h.
11816         (obstack_chunk_alloc): Don't define.
11817         (obstack_chunk_free): Likewise.
11818         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
11819         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
11820         (pop_switch): Free it.
11821
11822         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
11823
11824         * dump.c (dequeue_and_dump): Don't try to print the bit_position
11825         if we don't have a DECL_FIELD_OFFSET.
11826
11827 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
11828
11829         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
11830         special_function_p.
11831
11832 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11833
11834         * cfns.gperf (hash, libc_name_p): Prototype.
11835
11836         * rtti.c (build_dynamic_cast_1): Constification.
11837
11838         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
11839
11840         * semantics.c (deferred_type_access_control): Prototype.
11841
11842 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
11843
11844         Correct many new ABI issues regarding vbase and vcall offset
11845         layout.
11846         * cp-tree.h (BINFO_VTABLE): Document.
11847         (struct lang_type): Tweak formatting.
11848         (BINFO_PRIMARY_BINFO): Add to documentation.
11849         (CLASSTYPE_VSIZE): Fix typo in comment.
11850         (CLASSTYPE_VBASECLASSES): Update documentation.
11851         (BINFO_VBASE_MARKED): Remove.
11852         (SET_BINFO_VBASE_MARKED): Likewise.
11853         (CLEAR_BINFO_VBASE_MARKED): Likewise.
11854         (BINFO_FIELDS_MARKED): Remove.
11855         (SET_BINFO_FIELDS_MARKED): Likewise.
11856         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
11857         (enum access_kind): New enumeration.
11858         (num_extra_vtbl_entries): Remove declaration.
11859         (size_extra_vtbl_entries): Likewise.
11860         (get_vtbl_decl_for_binfo): New function.
11861         (dfs_vbase_unmark): Remove declaration.
11862         (mark_primary_bases): Likewise.
11863         * class.c (SAME_FN): Remove.
11864         (struct vcall_offset_data_s): Move definition.
11865         (build_vbase_pointer): Use `build', not `build_binary_op', to
11866         access the vbase pointer under the new ABI.
11867         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
11868         (build_primary_vtable): Likewise.
11869         (dfs_mark_primary_bases): Move here from search.c.
11870         (mark_primary_bases): Likewise.
11871         (determine_primary_bases): Under the new ABI, don't make a base
11872         class a primary base just because we don't yet have any virtual
11873         functions.
11874         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
11875         (num_vfun_entries): Remove.
11876         (dfs_count_virtuals): Likewise.
11877         (num_extra_vtbl_entries): Likewise.
11878         (size_extra_vtbl_entries): Likewise.
11879         (layout_virtual_bases): Iterate in inheritance graph order under
11880         the new ABI.
11881         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
11882         indicate that a vfield is present.
11883         (init_class_processing): Initialize access_public_node, etc., from
11884         ak_public, etc.
11885         (get_vtbl_decl_for_binfo): New function.
11886         (dump_class_hierarchy_r): Likewise.
11887         (dump_class_hierarchy): Use it.
11888         (finish_vtbls): Build the vtbls in inheritance graph order.
11889         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
11890         (initialize_vtable): Use get_vtbl_decl_for_binfo.
11891         (accumulate_vtbl_inits): Add comments explaining why a pre-order
11892         walk is required.
11893         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
11894         where the vptr points, even for primary vtables.
11895         (build_vtbl_initializer): Adjust handling of vbase and vcall
11896         offsets.
11897         (build_vcall_and_vbase_vtable_entries): New function.
11898         (dfs_build_vbase_offset_vtbl_entries): Remove.
11899         (build_vbase_offset_vtbl_entries): Reimplement.
11900         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
11901         were already handled in a primary base class vtable.
11902         (build_vcall_offset_vtbl_entries): Adjust.
11903         (build_rtti_vtbl_entries): Adjust.
11904         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
11905         * init.c (expand_virtual_init): Simplify.
11906         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
11907         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
11908         * search.c (BINFO_ACCESS): New macro.
11909         (SET_BINFO_ACCESS): Likewise.
11910         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
11911         (access_in_type): Likewise.
11912         (dfs_accessible_p): Likewise.
11913         (protected_accessible_p): Likewise.
11914         (lookup_fnfields_1): Adjust documentation.
11915         (dfs_mark_primary_bases): Move to class.c
11916         (mark_primary_bases): Likewise.
11917         (dfs_vbase_unmark): Remove.
11918         (virtual_context): Use BINFO_FOR_VBASE.
11919         (dfs_get_vbase_types): Simplify.
11920         (dfs_build_inheritance_graph_order): New function.
11921         (get_vbase_types): Use it.
11922         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
11923
11924         * tinfo.cc (get_vbase_offset): New function.
11925         (__vmi_class_type_info::do_find_public_src): Use it.
11926         (__vmi_class_type_info::do_dyncast): Likewise.
11927         (__vmi_class_type_info::do_upcast): Likewise.
11928
11929 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
11930
11931         * lang-specs.h: Pass -fno-show-column to the preprocessor.
11932
11933 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
11934
11935         * rtti.c (class_hint_flags): Rename flags.
11936         (class_initializer): Remove flags.
11937         (synthesize_tinfo_var): Combine offset and flags. Add flags
11938         for __vmi_class_type_info.
11939         (create_tinfo_types): Remove flags from __class_type_info and
11940         __si_class_type_info. Merge flags and offset from
11941         base_class_type_info.
11942         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
11943         (__base_class_info::is_virtual_p): Adjust.
11944         (__base_class_info::is_public_p): Adjust.
11945         (__base_class_info::offset): New accessor.
11946         (__class_type_info::details): Remove member.
11947         (__class_type_info::__class_type_info): Lose details.
11948         (__class_type_info::detail_masks): Remove.
11949         (__si_class_type_info::__si_class_type_info): Lose details.
11950         (__vmi_class_type_info::details): New member.
11951         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
11952         (__vmi_class_type_info::detail_masks): New member.
11953         * tinfo.cc (__class_type_info::do_upcast): Initialize result
11954         with unknown_details_mask.
11955         (__vmi_class_type_info::do_find_public_src): Adjust
11956         (__vmi_class_type_info::do_dyncast): Adjust.
11957         (__vmi_class_type_info::do_upcast): Set result details, if
11958         needed. Adjust.
11959         (__dynamic_cast): Temporarily #if out optimization.
11960
11961 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
11962
11963         * rtti.c (get_tinfo_decl): Mark used.
11964         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
11965         mark as dealt with, if we output it.
11966
11967 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
11968
11969         * class.c: Reorganize to put virtual function table initialization
11970         machinery at the end of the file.
11971
11972 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
11973
11974         * class.c (finish_struct): Use bitsize_zero_node.
11975         * pt.c (instantiate_class_template): Likewise.
11976
11977 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
11978
11979         Put RTTI entries at negative offsets in new ABI.
11980         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
11981         vbase offset at index -3, not -1.
11982         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
11983         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
11984         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
11985         (build_rtti_vtbl_entries): New function.
11986         (set_rtti_entry): Remove.
11987         (build_primary_vtable): Don't use it.
11988         (build_secondary_vtable): Likewise.
11989         (start_vtable): Remove.
11990         (first_vfun_index): New function.
11991         (set_vindex): Likewise.
11992         (add_virtual_function): Don't call start_vtable.  Do call
11993         set_vindex.
11994         (set_primary_base): Rename parameter.
11995         (determine_primary_base): Likewise.
11996         (num_vfun_entries): Don't use skip_rtti_stuff.
11997         (num_extra_vtbl_entries): Include RTTI information.
11998         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
11999         (skip_rtti_stuff): Remove.
12000         (dfs_modify_vtables): Don't use it.
12001         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
12002         (layout_nonempty_base_or_field): Update size handling.
12003         (create_vtable_ptr): Tweak.
12004         (layout_class_type): Adjust parameter names.
12005         (finish_struct_1): Simplify.
12006         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
12007         (skip_rtti_stuff): Remove.
12008         (first_vfun_index): New function.
12009         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
12010         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
12011         (marked_vtable_pathp): Declare.
12012         (unmarked_vtable_pathp): Likewise.
12013         * error.c (dump_expr): Use first_vfun_index to calculate vtable
12014         offsets.
12015         * rtti.c (build_headof): Look for RTTI at negative offsets.
12016         (get_tinfo_decl_dynamic): Likewise.
12017         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
12018         here.
12019         (create_pseudo_type_info): Do it here instead.  Adjust so that
12020         vptr points at first virtual function.
12021         * search.c (marked_vtable_pathp): Make it global.
12022         (unmarked_vtable_pathp): Likewise.
12023         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
12024         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
12025         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
12026         (get_pure_virtuals): Likewise.
12027         (expand_upcast_fixups): Likewise.
12028         * tree.c (debug_binfo): Likewise.
12029         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
12030         negative offset.
12031
12032 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12033
12034         * class.c (check_field_decl): Fix typo.
12035         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
12036         (check_methods): Likewise.
12037         (check_field_decls): Likewise.
12038         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
12039         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
12040         Use DECL_RESULT_FLD, not DECL_RESULT.
12041         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
12042         * lex.c (identifier_type): Likewise.
12043         * pt.c (determine_specialization, lookup_template_class): Likewise.
12044         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
12045         (resolve_overloaded_unification, more_specialized): Likewise.
12046         * semantics.c (finish_member_declaration): Likewise.
12047         * typeck.c (build_x_function_call): Likewise.
12048
12049 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
12050
12051         * class.c (layout_empty_base): Handle empty bases with non-byte
12052         alignment.
12053         (build_base_field): Likewise.
12054         (layout_virtual_bases): Likewise.
12055
12056         * class.c (finish_struct_1): Fix typo in this change:
12057
12058         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12059
12060 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
12061
12062         * decl.c (grokdeclarator): Count partial specializations when
12063         keeping track of how many template classes have been seen.
12064
12065         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
12066
12067 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12068
12069         * class.c (build_vbase_pointer_fields): layout_field now place_field.
12070         (get_vfield_offset): Use byte_position.
12071         (set_rtti_entry): Set OFFSET to ssizetype zero.
12072         (get_binfo_offset_as_int): Deleted.
12073         (dfs_record_base_offsets): Use tree_low_cst.
12074         (dfs_search_base_offsets): Likewise.
12075         (layout_nonempty_base_or_field): Reflect changes in RLI format
12076         and call byte_position.
12077         (layout_empty_base): Convert offset to ssizetype.
12078         (build_base_field): use rli_size_unit_so_far.
12079         (dfs_propagate_binfo_offsets): Do computation in proper type.
12080         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
12081         (layout_class_type): Reflect changes in RLI names and fields.
12082         (finish_struct_1): Set DECL_FIELD_OFFSET.
12083         * dump.c (dequeue_and_dump): Call bit_position.
12084         * expr.c (cplus_expand_constant): Use byte_position.
12085         * rtti.c (expand_class_desc): Use bitsize_one_node.
12086         * typeck.c (build_component_addr): Use byte_position and don't
12087         special case for zero offset.
12088
12089 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
12090
12091         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
12092
12093         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
12094         tinfo object.
12095         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
12096         vtable.
12097
12098 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12099
12100         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
12101         DECL_P macros.
12102         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
12103         make_typename_type, check_initializer, cp_finish_decl,
12104         xref_tag): Likewise.
12105         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
12106         decl_namespace, arg_assoc_template_arg, arg_assoc,
12107         validate_nonmember_using_decl, do_class_using_decl): Likewise.
12108         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
12109         args_to_string): Likewise.
12110         * friend.c (is_friend): Likewise.
12111         * lex.c (note_got_semicolon, note_list_got_semicolon,
12112         is_global): Likewise.
12113         * method.c (build_overload_nested_name, build_overload_value,
12114         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
12115         * parse.y (typename_sub, typename_sub1): Likewise.
12116         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
12117         process_partial_specialization, convert_template_argument,
12118         template_args_equal, add_pending_template, lookup_template_class,
12119         for_each_template_parm_r, maybe_fold_nontype_arg,
12120         tsubst, instantiate_template, type_unification_real, unify,
12121         instantiate_pending_templates, set_mangled_name_for_template_decl):
12122         Likewise.
12123         * repo.c (repo_get_id, repo_template_used): Likewise.
12124         * search.c (lookup_field_1): Likewise.
12125         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
12126         * xref.c (classname): Likewise.
12127
12128 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
12129
12130         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
12131         (CANONICAL_BINFO): New macro.
12132         (BINFO_NEW_VTABLE_MARKED): Use it.
12133         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
12134         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
12135         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
12136         not TREE_TYPE.
12137         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12138         (build_secondary_vtable): Likewise.
12139         (dfs_finish_vtbls): Likewise.
12140         (dfs_accumulate_vtbl_inits): Likewise.
12141         (accumulate_vtbl_inits): New function.
12142         (finish_vtbls): Make sure that virtual bases come after
12143         non-virtual bases in the vtable group.
12144         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
12145         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12146         * search.c (struct vbase_info): Move definition.
12147         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
12148         (unmarked_new_vtable_p): Likewise.
12149         (dfs_mark_vtable_path): Remove.
12150         (dfs_mark_new_vtable): Remove.
12151         (dfs_unmark_new_vtable): Likewise.
12152         (dfs_clear_search_slot): Likewise.
12153         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
12154         (dfs_clear_vbase_slots): Likewise.
12155         (init_vbase_pointers): LIkewise.
12156
12157 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
12158
12159         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
12160         SIZETYPE to a non-SIZETYPE.
12161
12162 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
12163
12164         * class.c (layout_virtual_bases): Adjust names in conditionally
12165         compiled code.
12166
12167         * class.c (record_base_offsets): New function.
12168         (layout_conflict_p): Likewise.
12169         (layout_nonempty_base_or_field): Use it.
12170         (layout_empty_base): New function.
12171         (build_base_field): Use it.
12172         (build_base_fields): Update comment.
12173         (layout_virtual_bases): Fold in a little code form
12174         layout_basetypes.  Use layout_empty_base.
12175         (layout_basetypes): Remove.
12176         (end_of_class): New function.
12177         (layout_class_type): Use it.  Adjust.
12178
12179         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
12180         (fntype_p): Remove.
12181         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
12182         comment.
12183         (dfs_skip_nonprimary_vbases_markedp): Likewise.
12184         * typeck.c (fntype_p): Remove.
12185
12186         * cp-tree.h (TI_SPEC_INFO): Remove.
12187         (CLASSTYPE_TI_SPEC_INFO): Likewise.
12188         * pt.c (process_partial_specialization): Likewise.
12189
12190         * class.c (build_base_field): Fix thinko in computation of binfo
12191         offsets.
12192
12193         * tree.c (mark_local_for_remap_p): Mark variables declared in
12194         TARGET_EXPRs as well.
12195
12196 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
12197
12198         * typeck.c (require_complete_type, complete_type,
12199         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
12200         build_array_ref, convert_arguments, pointer_diff,
12201         build_x_unary_op, build_unary_op, build_c_cast,
12202         build_modify_expr): Use COMPLETE_TYPE_P etc.
12203         * call.c (is_complete, convert_like_real,
12204         build_new_method_call): Likewise.
12205         * class.c (build_vbase_pointer_fields, check_bases,
12206         build_base_field, finish_struct_1, pushclass): Likewise.
12207         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
12208         * decl.c (maybe_process_template_type_declaration, pushtag,
12209         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
12210         layout_var_decl, check_initializer, cp_finish_decl,
12211         grokdeclarator, require_complete_types_for_parms,
12212         grok_op_properties, xref_tag, xref_basetypes,
12213         check_function_type): Likewise.
12214         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
12215         * friend.c (do_friend): Likewise.
12216         * init.c (build_offset_ref): Likewise.
12217         * parse.y (structsp): Likewise.
12218         * pt.c (maybe_process_partial_specialization,
12219         tsubst_friend_function, instantiate_class_template, tsubst,
12220         do_type_instantiation, instantiate_pending_templates): Likewise.
12221         * repo.c (repo_get_id): Likewise.
12222         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
12223         synthesize_tinfo_var, emit_support_tinfos): Likewise.
12224         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
12225         * semantics.c (begin_class_definition): Likewise.
12226         * tree.c (build_cplus_method_type): Likewise.
12227         * typeck2.c (digest_init, build_functional_cast,
12228         add_exception_specifier): Likewise.
12229         * parse.h, parse.c: Regenerated.
12230
12231 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
12232
12233         * inc/cxxabi.h: New header file. Define new-abi entry points.
12234         (__pointer_type_info::target): Rename member to ...
12235         (__pointer_type_info::type): ... here.
12236         (__base_class_info::type): Rename member to ...
12237         (__base_class_info::base): ... here.
12238         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
12239         * cp-tree.h (CPTI_ABI): New global tree enumeration.
12240         (abi_node): New global tree node.
12241         * decl.c (abi_node): Document.
12242         (init_decl_processing): Initialize abi_node.
12243         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
12244         (get_vmi_pseudo_type_info): Likewise.
12245         (create_tinfo_types): Likewise.
12246         (emit_support_tinfos): Likewise.
12247         * tinfo.h (cxxabi.h): Include for new-abi.
12248         Move rtti class definitions to new header file.
12249         * tinfo.cc (abi): Use the namespace.
12250         (std): Move new abi rtti classes from here ...
12251         (__cxxabiv1): ... to here.
12252         * tinfo2.cc (cxxabi.h): Include for new-abi.
12253         Move rtti class definitions to new header file.
12254         (std): Move new abi rtti classes from here ...
12255         (__cxxabiv1): ... to here.
12256         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
12257         namespace.
12258
12259 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
12260             Jason Merrill  <jason@casey.cygnus.com>
12261
12262         * method.c (build_overload_int): Use host_integerp.
12263
12264 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12265
12266         * init.c (build_offset_ref): Handle the case of a templated member
12267         function.
12268
12269 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12270
12271         * except.c (expand_exception_blocks): Clear catch_clauses_last.
12272
12273 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
12274
12275         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
12276         * class.c (check_bitfield_decl): Turn illegal bitfields into
12277         non-bitfields.
12278         (dfs_propagate_binfo_offsets): Adjust for new size_binop
12279         semantics.
12280         (dfs_offset_for_unshared_vbases): Likewise.
12281         * cvt.c (cp_convert_to_pointer): Convert NULL to a
12282         pointer-to-member correctly under the new ABI.
12283         * expr.c (cplus_expand_constant): Don't use cp_convert when
12284         turning an offset into a pointer-to-member.
12285         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
12286         when dereferencing them under the new ABI.
12287         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
12288         of pointers-to-members under the new ABI.
12289
12290         * class.c (check_bitfield_decl): Remove restriction on really long
12291         bitfields.
12292         (layout_class_type): Implement new ABI handling of bitfields
12293         longer than their types.
12294
12295 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12296
12297         * parse.y (extdefs): Call ggc_collect.
12298         * parse.c: Regenerated.
12299
12300 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
12301
12302         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
12303         (note_name_declared_in_class): Use OVL_CURRENT to get at a
12304         potential overload.
12305
12306 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12307
12308         * class.c (build_vbase_path): Use integer_zerop.
12309         (build_vtable_entry): Use tree_low_cst.
12310         (get_vfield_offset): Use bit_position.
12311         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
12312         Use tree_low_cst.
12313         (check_bitfield_decl): Set DECL_SIZE using convert.
12314         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
12315         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
12316         Use tree_low_cst.
12317         (finish_struct_1): Use bit_position.
12318         (dump_class_hierarchy): Use tree_low_cst.
12319         * cp-tree.h (min_precision): Add declaration.
12320         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
12321         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
12322         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
12323         * expr.c (cplus_expand_constant): Use bit_position.
12324         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
12325         * rtti.c (get_base_offset): Use bit_position.
12326         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
12327         host_integerp, and tree_low_cst.
12328         (pointer_int_sum): Use integer_zerop.
12329         (build_component_addr): Use bit_position.
12330
12331 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
12332
12333         * typeck.c (require_complete_type): Don't assume size_zero_node.
12334         (complete_type_or_else): Likewise.
12335
12336 2000-03-16  Steven Grady <grady@digitaldeck.com>
12337             Jason Merrill  <jason@casey.cygnus.com>
12338
12339         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
12340
12341 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
12342
12343         * decl2.c (grokfield): Bail out if type is error_mark_node.
12344
12345 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
12346
12347         * tinfo2.cc (__ptr_to_member_data): Rename to ...
12348         (__pointer_to_member_data): ... here. Adjust.
12349         * rtti.c (create_tinfo_types): Adjust.
12350
12351 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
12352
12353         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
12354         * decl.c (ref_desc_type_node): Undocument.
12355         * rtti.c (ptr_ref_initializer): Rename to ...
12356         (ptr_initializer): ... here. Adjust comments.
12357         (ptmd_initializer): Fix comment thinko.
12358         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
12359         (create_tinfo_types): Remove ref_desc_type_node init.
12360         * tinfo2.cc (__reference_type_info): Remove.
12361
12362 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
12363
12364         * decl.c (cp_finish_decl): Remove obsolete comment.
12365
12366         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
12367
12368 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
12369
12370         * cp-tree.h: Tweak documentation.
12371         * class.c (build_vbase_pointer_fields): Layout the fields, too.
12372         (avoid_overlap): Remove.
12373         (get_binfo_offset_as_int): New function.
12374         (dfs_serach_base_offsets): Likewise.
12375         (layout_nonempty_base_or_field): Likewise.
12376         (build_base_field): Layout fields here.  Avoid placing two objects
12377         of the same type at the same address, under the new ABI.
12378         (build_base_fields): Adjust accordingly.
12379         (create_vtable_ptr): Return the new field, but don't attach it to
12380         TYPE_FIELDS.
12381         (remove_base_field): Remove.
12382         (remove_base_fields): Remove.
12383         (layout_basetypes): Adjust accordingly.
12384         (layout_class_type): Call layout_field for each field, rather than
12385         just making a wholesale call to layout_type.
12386
12387 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
12388
12389         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
12390
12391 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
12392
12393         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
12394
12395         * except.c (dtor_nothrow): New fn.
12396         (do_pop_exception): Use it.  Take type parm.
12397         (push_eh_cleanup): Take type parm.
12398         (expand_start_catch_block): Pass it.
12399         (build_eh_type_type_ref): Accept null type.
12400
12401 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
12402
12403         * cp-tree.h (revert_static_member_fn): Change prototype.
12404         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
12405         (grok_op_properties): Likewise.
12406         (start_function): Likewise.
12407         (revert_static_member_fn): Simplify.
12408         * pt.c (check_explicit_specialization): Adjust call to
12409         revert_static_member_fn.
12410
12411 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
12412
12413         * cp-tree.h (scope_kind): New type.
12414         (tmpl_spec_kind): Likewise.
12415         (declare_pseudo_global_level): Remove.
12416         (pseudo_global_level_p): Rename to template_parm_scope_p.
12417         (pushlevel): Remove declaration.
12418         (begin_scope): New function.
12419         (finish_scope): Likewise.
12420         (current_tmpl_spec_kind): Likewise.
12421         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
12422         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
12423         Add template_spec_p.
12424         (toplevel_bindings_p): Adjust.
12425         (declare_pseudo_global_level): Remove.
12426         (pseudo_global_level_p): Rename to template_parm_scope_p.
12427         (current_tmpl_spec_kind): New function.
12428         (begin_scope): Likewise.
12429         (finish_scope): Likewise.
12430         (maybe_push_to_top_level): Adjust.
12431         (maybe_process_template_type_declaration): Likewise.
12432         (pushtag): Likewise.
12433         (pushdecl_nonclass_level): Likewise.
12434         (lookup_tag): Likewise.
12435         (grokfndecl): Handle member template specializations.  Share
12436         constructor and non-constructor code.
12437         * decl2.c (check_classfn): Handle member template specializations.
12438         * pt.c (begin_template_parm_list): Use begin_scope.
12439         (begin_specialization): Likewise.
12440         (end_specialization): Likewise.
12441         (check_explicit_specialization): Use current_tmpl_spec_kind.
12442         Handle member template specializations.
12443         (end_template_decl): Use finish_scope.  Remove call to
12444         get_pending_sizes.
12445         (push_template_decl_real): Remove bogus error message.
12446         (tsubst_decl): Fix typo in code contained in comment.
12447         (instantiate_template): Handle member template specializations.
12448         (most_general_template): Likewise.
12449
12450 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
12451
12452         * lex.c (whitespace_cr): Compress consecutive calls to warning().
12453         (do_identifier): Ditto for error().
12454
12455         * pt.c (convert_nontype_argument): Ditto for cp_error().
12456         (convert_template_argument): Ditto for cp_pedwarn().
12457
12458 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
12459
12460         * exception.cc (__check_null_eh_spec): New fn.
12461         * except.c (expand_end_eh_spec): Call it if the spec is throw().
12462
12463 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
12464
12465         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
12466         * except.c (expand_end_eh_spec): Add the return type.
12467         * rtti.c (throw_bad_cast): Add the parmtypes.
12468         (throw_bad_typeid): Likewise.
12469
12470         * semantics.c (expand_stmt): Only leave out rtl for unused
12471         artificials, and set DECL_IGNORED_P on them as well.
12472         * decl.c (wrapup_globals_for_namespace): Likewise.
12473
12474 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
12475
12476         * decl.c (maybe_commonize_var): Skip all artificial decls.
12477         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
12478
12479 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
12480
12481         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
12482         * cp-tree.h: Declare flag_enforce_eh_specs.
12483         * decl.c (store_parm_decls, finish_function): Check it.
12484
12485         C library functions don't throw.
12486         * Makefile.in (cfns.h): New target.
12487         (except.o): Depend on it.
12488         * Make-lang.in (cc1plus): Depend on cfns.gperf.
12489         * cfns.gperf: New file.
12490         * cfns.h: Generated.
12491         * except.c: Include it.
12492         (nothrow_libfn_p): New fn.
12493         * decl.c (grokfndecl): Use it.
12494         * cp-tree.h: Declare it.
12495
12496         * decl.c (push_overloaded_decl_1, auto_function,
12497         define_function): Lose.
12498         (build_library_fn_1): New static fn.
12499         (builtin_function): Use it.
12500         (get_atexit_node): Use build_library_fn_ptr.
12501         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
12502         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
12503         push_void_library_fn, push_throw_library_fn): New fns.
12504         * cp-tree.h: Declare them.
12505         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
12506         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
12507         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
12508         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
12509         * rtti.c (build_runtime_decl): Lose.
12510         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
12511         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
12512         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
12513
12514         * call.c (build_call): Remove result_type parm.
12515         Call mark_used on unused artificial fns.
12516         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
12517
12518 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
12519
12520         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
12521         appropriate.
12522         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
12523         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
12524         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
12525         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
12526         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
12527         expand_generic_desc): Likewise.
12528
12529 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
12530
12531         * exception.cc (__cp_pop_exception): Cleanup the original object.
12532
12533 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
12534
12535         * decl.c (grok_op_properties): Merge conversion to void warning
12536         with other silly op warnings.
12537
12538 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
12539
12540         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
12541         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
12542
12543 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
12544
12545         * decl.c (cp_make_fname_decl): New function.
12546         (wrapup_globals_for_namespace): Don't emit unused static vars.
12547         (init_decl_processing): Remove comment about use of
12548         array_domain_type. Set make_fname_decl.
12549         (cp_finish_decl): Remove __FUNCTION__ nadgering.
12550         * semantics.c (begin_compound_stmt): Remove
12551         current_function_name_declared flagging.
12552         (expand_stmt): Don't emit unused local statics.
12553         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
12554         specially.
12555
12556 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
12557
12558         * typeck.c (convert_for_assignment): Don't look at array
12559         initializer.
12560         * call.c (convert_like_real): Likewise.
12561
12562 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
12563
12564         Add initial support for '\uNNNN' specifier.
12565         * lex.c (read_ucs): New fn.
12566         (readescape, skip_white_space): Call it.
12567         (is_extended_char, is_extended_char_1): New fns.
12568         (utf8_extend_token): New fn, #if 0'd out.
12569         (real_yylex): Treat extended chars like letters.
12570
12571         * search.c (note_debug_info_needed): Walk the bases even if we
12572         weren't deferring the type itself.
12573
12574 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12575
12576         * decl2.c (finish_objects): Constify a char*.
12577
12578         * method.c (emit_thunk): Likewise.
12579
12580 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
12581
12582         * typeck.c (dubious_conversion_warnings): Look through
12583         REFERENCE_TYPE.
12584
12585 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12586
12587         * class.c (dfs_modify_vtables): I is now unsigned.
12588         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
12589         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
12590         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
12591         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
12592         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
12593         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
12594         Call integer_all_onesp.
12595         * typeck2.c (process_init_constructor): Use compare_tree_int.
12596
12597         * lang-specs.h (as): Don't call if -syntax-only.
12598
12599 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
12600
12601         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
12602         RTL_EXPR_HAS_NO_SCOPE after all.
12603
12604 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
12605
12606         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
12607         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
12608         RTL_EXPR_HAS_NO_SCOPE.
12609
12610         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
12611         later.
12612
12613         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
12614
12615 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
12616
12617         * call.c (convert_like): Macrofy.
12618         (convert_like_with_context): New macro.
12619         (convert_like_real): Renamed from convert_like.  Add calling
12620         context parameters, for diagnostics. Add recursive flag.  Call
12621         dubious_conversion_warnings for outer conversion.
12622         (build_user_type_conversion): Use convert_like_with_context.
12623         (build_over_call): Likewise. Don't warn about dubious
12624         conversions here. Adjust convert_default_arg calls.
12625         (convert_default_arg): Add context parameters for diagnostics.
12626         Pass through to convert_like_with_context.
12627         * cp-tree.h (convert_default_arg): Add context parameters.
12628         (dubious_conversion_warnings): Prototype new function.
12629         * typeck.c (convert_arguments): Adjust convert_default_arg call.
12630         (dubious_conversion_warnings): New function, broken
12631         out of convert_for_assignment.
12632         (convert_for_assignment): Adjust.
12633
12634 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
12635
12636         * decl2.c (key_method): Break out from...
12637         (import_export_vtable, import_export_class): ...here.
12638
12639         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
12640         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
12641
12642         * search.c (note_debug_info_needed, dfs_debug_mark,
12643         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
12644         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
12645
12646 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
12647
12648         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
12649         typos.
12650
12651 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
12652
12653         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
12654         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
12655         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
12656         (lang_type): Split gets_new into has_new and has_array_new.
12657         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12658         (TYPE_GETS_NEW): Split into ...
12659         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
12660         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
12661         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
12662         (build_op_new_call): Don't declare.
12663         (build_new_1): Likewise.
12664         * call.c (build_op_new_call): Remove.
12665         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
12666         instead of TYPE_NEEDS_DESTRUCTOR.
12667         (finish_struct_bits): Likewise.
12668         (add_implicitly_declared_members): Likewise.
12669         (check_field_decl): Likewise.
12670         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
12671         correctly under the new ABI.
12672         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
12673         instead of TYPE_NEEDS_DESTRUCTOR.
12674         (initialize_local_var): Likewise.
12675         (destroy_local_var): Likewise.
12676         (cp_finish_decl): Likewise.
12677         (register_dtor_fn): Likewise.
12678         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
12679         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
12680         TYPE_VEC_DELETE_TAKES_SIZE here.
12681         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
12682         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
12683         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12684         (finish_destructor_body): Likewise.
12685         (maybe_build_cleanup_1): Likewise.
12686         * decl2.c (do_static_destruction): Likewise.
12687         * init.c (build_new_1): Make it static.
12688         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12689         (expand_cleanup_for_base): Likewise.
12690         (get_cookie_size): New function.
12691         (build_new_1): Handle array-new cookies correctly under the new
12692         ABI.
12693         (build_vec_delete_1): Likewise.
12694         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12695         (build_delete): Likewise.
12696         (build_vec_delete): Handle array-new cookies correctly under the new
12697         ABI.
12698         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12699         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
12700         TYPE_HAS_ARRAY_NEW_OPERATOR.
12701         * ptree.c (print_lang_type): Check them.
12702         * search.c (context_for_name_lookup): Fix typo in comment.
12703         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12704         * tree.c (break_out_cleanups): Likewise.
12705         (build_cplus_array_test_1): Likewise.
12706         (cp_build_qualified_type_real): Likewise.
12707         * typeck.c (complete_type): Likewise.
12708
12709         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
12710         the command-line, not the end.
12711
12712 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
12713
12714         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
12715
12716 2000-03-02  Tom Tromey  <tromey@cygnus.com>
12717
12718         * cp-tree.h (build_java_class_ref): Declare.
12719         * init.c (build_java_class_ref): No longer static.
12720         * except.c (expand_throw): Generate a Java-style `throw' if the
12721         thrown object is a "Java" object.
12722         (initialize_handler_parm): Generate a Java-style lookup of
12723         exception info if the caught object is a "Java" object.
12724         (catch_language, catch_language_init): New globals.
12725         (decl_is_java_type): New function.
12726         (expand_start_catch_block): Don't call push_eh_info() or
12727         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
12728         class reference to build_catch_block.
12729
12730 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12731
12732         * typeck.c (comptypes): Treat sizetype like its language equivalent.
12733
12734 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
12735
12736         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
12737         to merge reference/pointer code and fix incorrect warnings.
12738
12739 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
12740
12741         * search.c (protected_accessible_p): Use context_for_name_lookup.
12742
12743         * init.c (construct_virtual_bases): Fix thinko.
12744         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
12745
12746 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12747
12748         * decl.c (current_function_decl): Move to toplev.c.
12749
12750 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
12751
12752         * pt.c (fn_type_unification): Unify return type, whenever
12753         provided.
12754         (get_bindings_real): Only pass return type when necessary.
12755         Remove explicit return type check.
12756         * class.c (resolve_address_of_overloaded_function): Pass desired
12757         return type to fn_type_unification.
12758
12759 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12760
12761         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
12762         DECL_FIELD_SIZE.
12763         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
12764         DECL_FIELD_SIZE.
12765         * rtti.c (expand_class_desc): Likewise.
12766         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
12767         (THUNK_VCALL_OFFSET): Likewise.
12768         (THUNK_DELTA): Reflect changes in ../tree.h.
12769
12770 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
12771
12772         * search.c (protected_accessible_p): Also allow the access if
12773         the member is public in DERIVED.  Lose TYPE parm.
12774         (friend_accessible_p): Lose TYPE parm.
12775         (accessible_p): Adjust.
12776
12777 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12778
12779         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
12780         on things that are not sizes; ssize_binop deleted.
12781         Call size_diffop when appropriate.
12782         (dfs_build_vcall_offset_vtbl_entries): Likewise.
12783         (build_primary_vtable, build_secondary_vtable): Likewise.
12784         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
12785         Variable I is HOST_WIDE_INT.
12786         (get_vfield_offset): Pass proper types to size_binop.
12787         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
12788         (finish_struct_1): Likewise.
12789         (skip_rtti_stuff): Arg N is now pointer to signed.
12790         (layout_class_type): Use size_zero_node.
12791         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
12792         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
12793         * decl.c (complete_arry_type): Pass proper types to size_binop.
12794         (xref_basetypes): BINFO_OFFSET is sizetype.
12795         * error.c (dump_expr): Don't use size_binop non-sizes.
12796         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
12797         * init.c (construct_virtual_bases): Fix type error.
12798         (build_vec_delete_1): Pass proper type to size_binop and don't
12799         fold result.
12800         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
12801         * rtti.c (get_base_offset): Pass proper type to size_binop.
12802         * search.c (dfs_find_vbases): Fix type error.
12803         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
12804         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
12805         * tree.c (debug_binfo): Variable N is signed.
12806         Use HOST_WIDE_INT_PRINT_DEC.
12807         * typeck.c (comptypes): sizetype is same as equivalent integer type.
12808         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
12809         size_one_node and size_zero_node.
12810         (c_alignof): Use size_one_node.
12811         (build_component_addr): Pass proper types to size_binop.
12812         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
12813
12814 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
12815
12816         Implement class scope using-declarations for functions.
12817         * class.c (handle_using_decl): Call add_method for used functions.
12818         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
12819         (add_method): Used functions are hidden by local functions.
12820         (check_bases_and_members): Handle using-decls before finalizing
12821         CLASSTYPE_METHOD_VEC.
12822         * call.c (add_function_candidate): Add ctype parm; if nonzero,
12823         override the type of 'this' accordingly.
12824         (add_template_candidate, add_template_candidate_real): Add ctype parm.
12825         (convert_class_to_reference, build_user_type_conversion_1,
12826         build_new_function_call, build_object_call, build_new_op,
12827         build_new_method_call): Pass ctype parm.
12828
12829         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
12830         the baselink.
12831         * call.c (convert_class_to_reference, build_user_type_conversion_1,
12832         build_new_function_call, build_object_call, build_new_op,
12833         build_new_method_call, build_op_delete_call): Don't get basetype_path
12834         from a baselink.
12835         * typeck.c (build_component_ref): Likewise.
12836         * init.c (build_offset_ref): Likewise.
12837         (resolve_offset_ref): Don't call enforce_access.
12838         Call build_scoped_ref.
12839         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
12840         would cause an error or if -pedantic.
12841         * class.c (alter_access): Lose binfo parm.
12842
12843 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
12844
12845         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
12846         types.
12847
12848 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
12849
12850         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
12851         pseudo_type_info creation into the std namespace
12852
12853 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
12854
12855         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
12856         (import_export_class): Remove declaration.
12857         * decl2.c (import_export_class): Make it static.
12858         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
12859         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
12860         EXPR_WITH_FILE_LOCATION.
12861         * lex.c (check_newline): Tweak filename/lineno setting.
12862         * semantics.c (begin_while_stmt): Fix typo in comment.
12863
12864 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12865
12866         * lang-options.h (-fmessage-length=): Add missing option.
12867
12868         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
12869
12870 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
12871
12872         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
12873
12874 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
12875
12876         * optimize.c (expand_call_inline): Emit the return label before
12877         evaluating the return value.
12878
12879 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
12880
12881         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
12882         than duplicating functionality here.
12883         * optimize.c: Include input.h.
12884         (expand_call_inline): Use push_srcloc and pop_srcloc.
12885         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
12886         * parse.c: Regenerated.
12887         * Makefile.in (lex.o): Depend on input.h.
12888         (optimize.o): Likewise.
12889
12890 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
12891
12892         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
12893         function type, rather than ICE.
12894
12895 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
12896
12897         * decl.c (grokdeclarator): Call decl_type_access_control.
12898         * parse.y (parse_end_decl): Don't call decl_type_access_control if
12899         decl is null.
12900
12901 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
12902
12903         * decl.c (decls_match): Remove obsolete static member nadgering.
12904
12905 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12906
12907         * decl.c (grokdeclarator): Change ANSI to ISO.
12908         * lex.c (consume_string, readescape, do_identifier): Likewise.
12909         (parse_float, real_yylex): Likewise.
12910         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
12911         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
12912         new_type_id, maybe_label_decls, simple_stmt,
12913         for.init.statement): Likewise.
12914         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
12915         * semantics.c (finish_named_return_value): Likewise.
12916         * parse.c: Regenerate.
12917
12918 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
12919
12920         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
12921         (CPTI_CLASS_STAR_TYPE): Remove.
12922         (vtable_index_type): Likewise.
12923         (class_star_type_node): Remove.
12924         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
12925         (build_binary_op_nodefault): Remove.
12926         * call.c (build_new_op): Use build_binary_op instead of
12927         build_binary_op_nodefault.
12928         * decl.c (init_decl_processing): Remove class_star_type_node
12929         initialization.  Make delta_type_node ptrdiff_type_node under the
12930         new ABI.  Initialize vtable_index_type.
12931         (build_ptrmemfunc_type): Build different structures for the new
12932         ABI.
12933         (build_enumerator): Use build_binary_op instead of
12934         build_binary_op_nodefault.
12935         * method.c (build_overload_value): Mangle pointers-to-members
12936         appropriately under the new ABI.
12937         * typeck.c (build_array_ref): Use build_binary_op instead of
12938         build_binary_op_nodefault.
12939         (get_member_function_from_ptrfunc): Adjust for the new ABI.
12940         (build_binary_op_nodefault): Rename to ...
12941         (build_binary_op): ... this.  Remove old version.  Adjust for
12942         pointer-to-member comparisons under the new ABI.
12943         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
12944         (build_ptrmemfunc): Adjust for the new ABI.
12945         (expand_ptrmemfunc_cst): Likewise.
12946         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
12947         (pfn_from_ptrmemfunc): Adjust for the new ABI.
12948
12949 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
12950
12951         * call.c (build_object_call): Compress consecutive calls to
12952         cp_error.
12953         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
12954         (build_op_delete_call): Adjust message formatting.
12955
12956         * class.c (check_bases): Compress consecutive calls to
12957         cp_pedwarn.
12958         (finish_struct_anon): Say 'ISO C++'.
12959
12960         * decl.c (start_decl): Same here.
12961         (grok_reference_init): Likewise.
12962         (grokfndecl): Correct message formatting.
12963         (grokfndecl): Improve diagnostic.
12964         (check_static_variable_definition): Likewise. Say 'ISO C++'
12965         (compute_array_index_type): Say 'ISO C++'
12966         (create_array_type_for_decl): Compress consecutive calls to
12967         cp_error.
12968         (grokdeclarator): Say 'ISO C++'
12969         (grok_op_properties): Likewise.
12970
12971         * decl2.c (delete_sanity): Clairify diagnostic.
12972         (check_member_template): Same here.
12973         (grok_function_init): Use consistent terminology.
12974
12975         * expr.c (do_case): Say 'ISO C++'
12976
12977         * friend.c (do_friend): Compress consecutive calls to warning.
12978
12979 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
12980
12981         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
12982         * class.c (build_secondary_vtable): Reorganize.  Don't create a
12983         new vtable under the new ABI.
12984         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
12985         computing the size.
12986         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
12987         the initializing elements.
12988         (initialize_vtable): New function.
12989         (dfs_finish_vtbls): Use it.
12990         (dfs_accumulate_vtbl_inits): New function.
12991         (finish_vtbls): Merge primary and secondary vtables under the new
12992         ABI.
12993         (finish_struct_1): Remove redundant call to layout_vtable_decl.
12994         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
12995         aren't VAR_DECLs.
12996
12997         * class.c (build_vtable): New function, split out from ...
12998         (get_vtable_decl): ... here, and ...
12999         (build_secondary_vtable): ... here.
13000
13001         * pt.c (tsubst_decl): Fix formatting.
13002
13003 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13004
13005         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
13006         (avoid_overlap, build_base_field): Likewise.
13007         (build_base_field, build_base_fields, is_empty_class):
13008         Test DECL_SIZE with integer_zero.
13009         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
13010         * cp-tree.h (struct lang_type): New field size_unit.
13011         (CLASSTYPE_SIZE_UNIT): New macro.
13012         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
13013         (cp_finish_decl): Delete -Wlarger-than processing.
13014         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
13015         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
13016         * tree.c (make_binfo): binfo vector is one entry longer.
13017         (walk_tree): Walk DECL_SIZE_UNIT.
13018
13019 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
13020
13021         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
13022         comment.
13023         (build_vtable_entry): Don't assume all vtable entries are
13024         functions.
13025         (build_vtbl_initializer): Adjust accordingly.
13026         (get_vtable_decl): Fix formatting.
13027
13028 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
13029
13030         * semantics.c (deferred_type_access_control): Walk the entire
13031         type_lookups list.
13032         (save_type_access_control): Rename from
13033         initial_deferred_type_access_control.  Just remember the value.
13034         (decl_type_access_control): New fn.
13035         (begin_function_definition): Use deferred_type_access_control, after
13036         we've started the function.  Set type_lookups to error_mark_node.
13037         * parse.y (frob_specs, fn.def1): Adjust.
13038         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
13039         (parse_end_decl, parse_bitfield0, parse_method): New fns.
13040         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
13041         (after_type_component_declarator0): Likewise.
13042         (after_type_component_declarator): Likewise.
13043         (notype_component_declarator): Likewise.
13044         * cp-tree.h: Adjust.
13045
13046         * decl.c (redeclaration_error_message): Allow redeclaration of
13047         namespace-scope decls.
13048
13049 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
13050
13051         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
13052
13053 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
13054
13055         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
13056         * decl2.c (grokclassfn): Likewise.
13057
13058         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
13059
13060         * decl2.c (lang_decode_option): Don't set default message length
13061         here.
13062         * lex.c (lang_init_options): Set it here.
13063
13064 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
13065
13066         Make DECL_CONTEXT mean the class in which a member function was
13067         declared, even for a virtual function.
13068         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
13069         (DECL_FRIEND_CONTEXT): New macro.
13070         (DECL_REAL_CONTEXT): Remove.
13071         (SET_DECL_FRIEND_CONTEXT): Likewise.
13072         (DECL_VIRTUAL_CONTEXT): Adjust.
13073         (DECL_CLASS_SCOPE_P): Use TYPE_P.
13074         (add_friends): Remove.
13075         (hack_decl_function_context): Likewise.
13076         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
13077         CP_DECL_CONTEXT.
13078         (build_over_call): Fix indentation.  Use DECL_CONTEXT
13079         instead of DECL_CLASS_CONTEXT.
13080         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
13081         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
13082         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13083         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
13084         (build_base_field): Likewise.
13085         (finish_struct_1): Likewise.
13086         (build_self_reference): Likewise.
13087         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
13088         DECL_REAL_CONTEXT.
13089         (pushtag): Use decl_function_context, not
13090         hack_decl_function_context.
13091         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13092         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
13093         (pushdecl): Remove bogus code.
13094         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
13095         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13096         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13097         Use decl_function_context, nothack_decl_function_context.
13098         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
13099         (grokdeclarator): Likewise.  Use decl_function_context, not
13100         hack_decl_function_context.
13101         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
13102         (start_function): Use DECL_FRIEND_CONTEXT, not
13103         DECL_CLASS_CONTEXT.  Use decl_function_context, not
13104         hack_decl_function_context.
13105         (finish_function): Use decl_function_context, not
13106         hack_decl_function_context.
13107         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
13108         DECL_CLASS_CONTEXT.
13109         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
13110         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
13111         (grokfield): Likewise.
13112         (finish_builtin_type): Likewise.
13113         (finish_vtable_vardec): Use decl_function_context, not
13114         hack_decl_function_context.
13115         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13116         (start_static_initialization_or_destruction): Likewise.
13117         (finish_static_initialization_or_destruction): Likewise.
13118         (mark_used): Adjust logic for deciding when to synthesize methods.
13119         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
13120         DECL_REAL_CONTEXT.
13121         * error.c (dump_function_decl): Use DECL_CONTEXT, not
13122         DECL_CLASS_CONTEXT.
13123         * friend.c (is_friend): Likewise.
13124         (add_friends): Remove.
13125         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
13126         * lex.c (begin_definition_of_inclass_inline): Use
13127         decl_function_context, not hack_decl_function_context.
13128         (process_next_inline): Likewise.
13129         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
13130         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
13131         DECL_CLASSS_CONTEXT.
13132         (hack_identifier): Likewise.
13133         (synthesize_method):  Use decl_function_context, not
13134         hack_decl_function_context.
13135         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
13136         DECL_REAL_CONTEXT.
13137         (is_member_template): Use decl_function_context, not
13138         hack_decl_function_context.  Use DECL_CONTEXT, not
13139         DECL_CLASS_CONTEXT.
13140         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
13141         DECL_CLASS_CONTEXT.
13142         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
13143         DECL_REAL_CONTEXT.
13144         (push_template_decl_real): Likewise.
13145         (instantiate_class_template): Don't call add_friends.
13146         (tsubst_default_argument): Use DECL_CONTEXT, not
13147         DECL_REAL_CONTEXT.
13148         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
13149         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13150         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
13151         DECL_CLASS_CONTEXT.
13152         * repo.c (repo_inline_used): Likewise.
13153         * search.c (current_scope): Adjust for new _CONTEXT macros.
13154         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
13155         DECL_REAL_CONTEXT.
13156         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
13157         (lookup_fnfields_here):Likewise.
13158         (check_final_overrider): Likewise.
13159         (init_vbase_pointers): Likewise.
13160         (virtual_context): Likewise.
13161         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
13162         (expand_body): Use decl_function_context, not
13163         hack_decl_function_context.
13164         * tree.c (hack_decl_function_context): Remove.
13165         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
13166         DECL_CLASS_CONTEXT.
13167         * typeck2.c (error_not_base_type): Likewise.
13168
13169 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
13170
13171         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
13172
13173 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13174
13175         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
13176
13177 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
13178
13179         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
13180
13181 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
13182
13183         * decl2.c (lang_decode_option): Enable automatic line wrapping.
13184
13185 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
13186
13187         * parse.y (frob_specs): Split out...
13188         (parse_decl): From here.
13189         (fn.def2): Call initial_deferred_type_access_control.
13190         (after_type_component_declarator0): Call frob_specs.
13191         (notype_component_declarator0): Likewise.
13192         * search.c (friend_accessible_p): Nested classes are friends of their
13193         enclosing classes.
13194
13195 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
13196
13197         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
13198         used to create an implicit temporary.
13199
13200         * class.c (dfs_modify_vtables): Tweak calculation of functions to
13201         override.
13202
13203 2000-02-08  Nathan Sidwell  <nathan@acm.org>
13204
13205         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
13206         strip array element qualifiers too.
13207
13208 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
13209
13210         * decl.c (store_parm_decls): Don't build cleanups for parameters
13211         while processing_template_decl.
13212
13213 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
13214
13215         * cp-tree.h (struct saved_scope): Add incomplete field.
13216         (namespace_scope_incomplete): New macro.
13217         * decl.c (pushdecl): Use it.
13218         (hack_incomplete_structures): Use it.  See through artificial
13219         binding levels.
13220         (mark_saved_scope): Mark it.
13221
13222         Implement access control for nested types.
13223         * search.c (type_access_control): New fn.
13224         (accessible_p): Now we do perform access control for types.
13225         * semantics.c (deferred_type_access_control): New fn.
13226         (initial_deferred_type_access_control): New fn.
13227         (begin_function_definition): Call it.  Add lookups parm.
13228         * decl.c (struct binding_level): Add this_class field.
13229         (pushlevel_class): Set it.
13230         (mark_binding_level): Mark it.
13231         (lookup_name_real): Use it.  Call type_access_control.
13232         (mark_saved_scope): Mark lookups field.
13233         * cp-tree.h (flagged_type_tree): Add lookups field.
13234         (struct saved_scope): Add lookups field.
13235         (type_lookups): New macro.
13236         * parse.y (declmods): Now <ftype>.
13237         (parse_decl): Add lookups parm.  Call
13238         initial_deferred_type_access_control.
13239         (lang_extdef): Clear type_lookups.
13240         (typed_declspecs, declmods, typespec): Set lookups field.
13241         (initdcl): Call deferred_type_access_control.
13242         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
13243         component_decl_1, named_parm): Adjust.
13244         * friend.c (is_friend): Nested classes are friends of their
13245         enclosing classes.
13246
13247         * class.c (currently_open_derived_class): New fn.
13248         * method.c (hack_identifier): Use it.
13249
13250         * lex.c (do_identifier): Remove obsolete code.
13251
13252         * parse.y (typed_typespecs): Propagate new_type_flag properly.
13253
13254 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
13255
13256         * tinfo.h: Remove apostrophes from C++ comment (xgettext
13257         thinks this file is plain C).
13258
13259 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13260
13261         * Makefile.in (call.o): Depend on $(EXPR_H).
13262
13263         * call.c: Include "expr.h".
13264
13265         * class.c (dump_class_hierarchy): Add prototype.
13266
13267         * search.c (dfs_get_pure_virtuals): Likewise.
13268
13269 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
13270
13271         * parse.y (simple_stmt): Allow :: token in asm parameter list.
13272         * parse.c: Rebuilt.
13273
13274 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
13275
13276         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
13277         Store it in DECL_FCONTEXT.
13278         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
13279
13280 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
13281
13282         * tinfo.h (old abi): #include "tconfig.h".
13283         * tinfo.cc (convert_to_base): Move into old abi section.
13284
13285 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
13286
13287         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
13288         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
13289         (BINFO_PRIMARY_BINFO): New macro.
13290         (BF_DELTA): Rename to ...
13291         (BV_DELTA): ... this.
13292         (BF_VCALL_INDEX): Rename to ...
13293         (BV_VCALL_INDEX): ... this.
13294         (BF_FN): Rename to ...
13295         (BV_FN): ... this.
13296         * class.c (build_vbase_path): Adjust for changes to reverse_path.
13297         (set_rtti_entry): Rename BF_ macros to BV_ variants.
13298         (modify_vtable_entry): Simplify.
13299         (add_virtual_function): Rename BF_ macros to BV_ variants.
13300         (build_vtable_initializer): Likewise.
13301         (get_class_offset_1): Remove.
13302         (dfs_get_class_offset): Likewise.
13303         (get_class_offset): Likewise.
13304         (dfs_find_final_overrider): New function.
13305         (find_final_overrider): Likewise.
13306         (modify_one_vtable): Remove.
13307         (dfs_find_base): New function.
13308         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
13309         find_final_overrider.
13310         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
13311         virtuals.
13312         (dfs_fixup_vtable_deltas): Remove.
13313         (override_one_vtable): Remove.
13314         (merge_overrides): Likewise.
13315         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
13316         unreal chilren of virtual bases.
13317         (finish_struct_1): Don't use merge_overrides.  Don't use
13318         dfs_fixup_vtable_deltas.
13319         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
13320         BINFOs.
13321
13322 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
13323             Jason Merrill  <jason@yorick.cygnus.com>
13324
13325         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
13326
13327 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
13328
13329         * exception.cc (__throw_bad_typeid): Add missing std::.
13330
13331 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13332
13333         * cp-tree.h (make_thunk): PROTO -> PARAMS.
13334
13335 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
13336
13337         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
13338
13339         Runtime support for new-abi rtti.
13340         * inc/typeinfo (type_info::operator!=): Define in class.
13341         (type_info::before, type_info::name, type_info::operator==,
13342         type_info::operator!=): Define new ABI implementations.
13343         (type_info::is_pointer_p, type_info::is_function_p): Declare
13344         new virtual functions.
13345         (type_info::do_catch, type_info::do_upcast): Likewise.
13346
13347         * tinfo.h (__base_class_info): Define new class.
13348         (__class_type_info): Likewise.
13349         (__si_class_type_info): Likewise.
13350         (__vmi_class_type_info): Likewise.
13351         (__dynamic_cast): Prototype.
13352
13353         * tinfo.cc: Conditionalize old and new rtti mechanisms.
13354         (type_info::is_pointer_p): Define new function.
13355         (type_info::is_function_p): Likewise.
13356         (type_info::do_catch): Likewise.
13357         (type_info::do_upcast): Likewise.
13358         (vtable_prefix): New structure for vtable access.
13359         (adjust_pointer): Define new template function.
13360         (contained_p, public_p, virtual_p, contained_public_p,
13361         contained_nonpublic_p, contained_nonvirtual_p): Define new
13362         functions.
13363         (nonvirtual_base_type): New local variable.
13364         (__class_type_info::~__class_type_info): Define.
13365         (__si_class_type_info::~__si_class_type_info): Likewise.
13366         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
13367         (__class_type_info::do_catch): Define new function.
13368         (__class_type_info::do_upcast): Likewise.
13369         (__class_type_info::find_public_src): Likewise.
13370         (__class_type_info::do_find_public_src): Likewise.
13371         (__si_class_type_info::do_find_public_src): Likewise.
13372         (__vmi_class_type_info::do_find_public_src): Likewise.
13373         (__class_type_info::do_dyncast): Likewise.
13374         (__si_class_type_info::do_dyncast): Likewise.
13375         (__vmi_class_type_info::do_dyncast): Likewise.
13376         (__class_type_info::do_upcast): Likewise.
13377         (__si_class_type_info::do_upcast): Likewise.
13378         (__vmi_class_type_info::do_upcast): Likewise.
13379         (__dynamic_cast): Likewise.
13380
13381         * tinfo2.cc (__fundamental_type_info): Define new class.
13382         (__pointer_type_info): Likewise.
13383         (__reference_type_info): Likewise.
13384         (__array_type_info): Likewise.
13385         (__function_type_info): Likewise.
13386         (__enum_type_info): Likewise.
13387         (__ptr_to_member_type_info): Likewise.
13388         (__fundamental_type_info::~__fundamental_type_info): Define.
13389         (__pointer_type_info::~__pointer_type_info): Likewise.
13390         (__reference_type_info::~__reference_type_info): Likewise.
13391         (__array_type_info::~__array_type_info): Likewise.
13392         (__function_type_info::~__function_type_info): Likewise.
13393         (__enum_type_info::~__enum_type_info): Likewise.
13394         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
13395         (__pointer_type_info::do_catch): Define new function.
13396         (__ptr_to_member_type_info::do_catch): Define new function.
13397
13398         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
13399         (__is_pointer): Likewise.
13400
13401         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
13402
13403 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
13404
13405         * cp/class.c (build_vtable): Rename to build_primary_vtable.
13406         (prepare_fresh_vtable): Rename to build_secondary_vtable.
13407         (make_new_vtable): New function.
13408         (modify_vtable_entry): Handle generation of new vtables correctly.
13409         (modify_one_vtable): Remove unused parameter.
13410         (dfs_fixup_vtable_deltas): Likewise.
13411         (override_one_vtable): Use build_secondary_vtable.
13412         (finish_struct_1): Use build_primary_vtable and
13413         build_secondary_vtable.
13414
13415 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
13416
13417         * cp/decl.c: Adjust variable names, comments, help strings.
13418
13419 2000-01-29  Nathan Sidwell  <nathan@acm.org>
13420
13421         * new2.cc (operator delete[]): Use operator delete, don't assume
13422         implementation.
13423
13424 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
13425
13426         * class.c (build_vtbl_initializer): Add argument to
13427         build_vtable_entry call.
13428
13429 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
13430
13431         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
13432         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
13433         (BF_DELTA): New macro.
13434         (BF_VCALL_INDEX): Likewise.
13435         (BF_FN): Likewise.
13436         (THUNK_VCALL_OFFSET): Likewise.
13437         (make_thunk): Change prototype.
13438         * class.c (build_vtable_entry): Integrate
13439         build_vtable_entry_for_fn.  Handle vcall indices.
13440         (build_vtable_entry_for_fn): Remove.
13441         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
13442         BF_VCALL_INDEX, BF_FN.
13443         (modify_vtable_entry): Integrate common code from
13444         modify_one_vtable and dfs_fixup_vtable_deltas.
13445         (add_virtual_function): Set BF_VCALL_INDEX.
13446         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
13447         and BF_FN.
13448         (modify_one_vtable): Simplify.
13449         (dfs_fixup_vtable_deltas): Likewise.
13450         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
13451         * method.c (make_thunk): Handle vcall indices.
13452
13453 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
13454
13455         Compiler side new abi rtti (not enabled).
13456         * cp-tree.h (new_abi_rtti_p): New macro.
13457         (emit_support_tinfos): Prototype new function.
13458         (tinfo_decl_p): Likewise.
13459         (emit_tinfo_decl): Likwise.
13460         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
13461         macros.
13462         (doing_runtime): New local static.
13463         (init_rtti_processing): Add new-abi initializer.
13464         (get_tinfo_decl): Add new-abi logic.
13465         (tinfo_from_decl): Likewise.
13466         (build_dynamic_cast_1): Likewise.
13467         (qualifier_flags): New static function.
13468         (tinfo_base_init): Likewise.
13469         (generic_initializer): Likewise.
13470         (ptr_ref_initializer): Likewise.
13471         (ptmd_initializer): Likewise.
13472         (class_hint_flags): Likewise.
13473         (class_initializer): Likewise.
13474         (synthesize_tinfo_var): Likewise.
13475         (create_real_tinfo_var): Likewise.
13476         (create_pseudo_type_info): Likewise.
13477         (get_vmi_pseudo_type_info): Likewise.
13478         (create_tinfo_types): Likewise.
13479         (emit_support_tinfos): New global function.
13480         (tinfo_decl_p): New global predicate.
13481         (emit_tinfo_decl): New global function.
13482         * class.c (set_rtti_entry): Generalize for old and new rtti.
13483         (build_vtbl_initializer): Likewise.
13484         * decl2.c (finish_file): Likewise.
13485
13486 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
13487
13488         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
13489         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
13490
13491 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
13492
13493         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
13494         for scopes.
13495
13496 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
13497
13498         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
13499
13500 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
13501
13502         * optimize.c (calls_setjmp_r): Supply new argument
13503         to special_function_p.
13504
13505 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13506
13507         * call.c: PROTO -> PARAMS.
13508         * class.c: Likewise.
13509         * cp-tree.h: Likewise.
13510         * cvt.c: Likewise.
13511         * decl.c: Likewise.
13512         * decl.h: Likewise.
13513         * decl2.c: Likewise.
13514         * dump.c: Likewise.
13515         * errfn.c: Likewise.
13516         * error.c: Likewise.
13517         * except.c: Likewise.
13518         * expr.c: Likewise.
13519         * init.c: Likewise.
13520         * input.c: Likewise.
13521         * lex.c: Likewise.
13522         * lex.h: Likewise.
13523         * method.c: Likewise.
13524         * optimize.c: Likewise.
13525         * parse.y: Likewise.
13526         * pt.c: Likewise.
13527         * repo.c: Likewise.
13528         * rtti.c: Likewise.
13529         * search.c: Likewise.
13530         * semantics.c: Likewise.
13531         * spew.c: Likewise.
13532         * tree.c: Likewise.
13533         * typeck.c: Likewise.
13534         * typeck2.c: Likewise.
13535         * xref.c: Likewise.
13536
13537 2000-01-25  Richard Henderson  <rth@cygnus.com>
13538
13539         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
13540
13541 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
13542
13543         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
13544         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
13545         (struct vcall_offset_data_s): New type.
13546         (dfs_vcall_offset_queue_p): New function.
13547         (dfs_build_vcall_offset_vtbl_entries): Likewise.
13548         (build_vcall_offset_vtbl_entries): Likewise.
13549         (layout_vtable_decl): Likewise.
13550         (num_vfun_entries): Likewise.
13551         (num_extra_vtbl_entries): Add the entries for vcall offsets.
13552         (build_vtbl_initializer): Likewise.
13553         (dfs_finish_vtabls): Use layout_vtable_decl.
13554         (modify_one_vtables): Always duplicate vtables under the new ABI.
13555         (finish_struct_1): Use layout_vtable_decl.
13556
13557 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13558
13559         * decl.c (member_function_or_else): Change third arg from a format
13560         specifier to an `enum overload_flags'.  Callers changed.
13561
13562 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
13563
13564         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
13565         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
13566         build_const_cast, get_delta_difference, check_return_expr): Avoid
13567         ANSI string concatenation usage.
13568
13569 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
13570
13571         * class.c (layout_class_type): Put the fields required to make a
13572         class non-empty at the end, not the beginning, of the TYPE_FIELDs
13573         list.
13574
13575 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
13576
13577         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
13578         template.
13579
13580         * decl2.c (mark_used): Do instantiate inlines that have been
13581         explicitly instantiated.
13582
13583 2000-01-24  Richard Henderson  <rth@cygnus.com>
13584
13585         * call.c (build_over_call): Use expand_tree_builtin.
13586         * typeck.c (build_function_call_real): Likewise.
13587         (build_binary_op_nodefault): Handle unordered compares.
13588
13589 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
13590
13591         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
13592         cp_tree_index values.
13593         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
13594         New global node #defines for them.
13595         * rtti.c (call_void_fn): Replace with ...
13596         (build_runtime_decl): ... new static function.
13597         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
13598         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
13599         (build_dynamic_cast_1): Always produce correctly typed result.
13600         Explicitly produce type_info addresses. Use dynamic_cast_node.
13601         * exception.cc (__throw_bad_cast): Return `void *'.
13602         (__throw_bad_typeid): Return `const type_info &'.
13603
13604 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
13605
13606         * cp-tree.h (get_vtable_decl): Prototype new function.
13607         * class.c (get_vtable_decl): New function. Broken out from ...
13608         (build_vtable): ... here. Use it.
13609         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
13610         by get_vtable_decl.
13611
13612 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
13613
13614         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
13615         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
13616         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
13617         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
13618         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
13619         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
13620         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
13621         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
13622         (CPTI_TINFO_VAR_ID): New enumeration.
13623         (__tp_desc_type_node, __access_mode_type_node,
13624         __bltn_desc_type_node, __user_desc_type_node,
13625         __class_desc_type_node, __ptr_desc_type_node,
13626         __attr_desc_type_node, __func_desc_type_node,
13627         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
13628         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
13629         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
13630         enum_desc_type_node, class_desc_type_node,
13631         si_class_desc_type_node, vmi_class_desc_type_node,
13632         ptmd_desc_type_node, base_desc_type_node): New #defines.
13633         (tinfo_fn_id, tinfo_fn_type): Rename to ...
13634         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
13635         (tinfo_var_id): New enumeration.
13636         (DECL_TINFO_FN_P): Augment comment.
13637         * decl.c (cp_global_trees): Adjust documentation.
13638         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
13639         tinfo_decl_type and tinfo_var_id.
13640         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
13641         (build_typeid): Remove unused variable.
13642         (get_tinfo_var): Use tinfo_var_id.
13643         (tinfo_name): New static function.
13644         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
13645         (tinfo_from_decl): Likewise.
13646         (get_base_offset): New static function, broken out of
13647         expand_class_desc.
13648         (expand_si_desc): Use tinfo_name.
13649         (expand_class_desc): Likewise. Lose local static variable.
13650         Use base_desc_type_node. Use get_base_offset.
13651         (expand_ptr_desc): Use tinfo_name.
13652         (expand_attr_desc): Likewise.
13653         (expand_generic_desc): Likewise.
13654
13655         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
13656         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
13657
13658 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
13659
13660         * cp-tree.h (__eprintf): Remove declaration.
13661         * tree.c (__eprintf): Remove definition.
13662
13663 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
13664             Mark Mitchell  <mark@codesourcery.com>
13665
13666         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
13667         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
13668
13669 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
13670
13671         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
13672
13673 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
13674
13675         * cp-tree.h (register_dtor_fn): New function.
13676         * decl.c (destroy_local_static): Rename to ...
13677         (register_dtor_fn): ... this.  Give it external linkage.
13678         (expand_static_init): Use it.
13679         * decl2.c (do_static_initialization): Likewise, if using
13680         __cxa_atexit.
13681         (do_static_destruction): Check that __cxa_atexit is not in use.
13682         (finish_file): Don't call do_static_destruction if using
13683         __cxa_atexit.
13684
13685         * typeck.c (convert_arguments): Restore two-message error
13686         reporting.
13687
13688 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
13689
13690         Remap dynamic cast hint values to be consistent across ABIs.
13691         * search.c (dynamic_cast_base_recurse): Remap generated value.
13692         (get_dynamic_cast_base_type): Adjust documentation.
13693         * tinfo.h (__user_type_info::dyncast): Likewise.
13694         (__user_type_info::find_public_subobj): Remap BOFF meaning.
13695         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
13696         (__class_type_info::do_dyncast): Likewise.
13697         (__class_type_info::do_find_public_subobj): Likewise.
13698         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
13699
13700 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
13701
13702         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
13703
13704         * typeck2.c (incomplete_type_error): Restore previous
13705         cp_error and cp_error_at call sequence.
13706
13707 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
13708
13709         * class.c (dump_class_hierarchy): Make format agree with argument;
13710         cast pointer to unsigned long and print with %lx.
13711
13712 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
13713
13714         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
13715
13716         * typeck.c (composite_pointer_type, common_type,
13717         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
13718         build_function_call_real, convert_arguments,
13719         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
13720         build_unary_op, mark_addressable, build_compound_expr,
13721         build_static_cast, build_reinterpret_cast, build_const_cast,
13722         build_c_cast, build_modify_expr, get_delta_difference,
13723         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
13724         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
13725         into a single one.
13726         * typeck2.c (readonly_error, abstract_virtuals_error,
13727         process_init_constructor, check_for_new_type): Likewise.
13728
13729 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
13730
13731         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
13732         VAR_DECLs.
13733
13734 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
13735
13736         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
13737         (build_x_typeid): Likewise.
13738         (get_tinfo_fn): Likewise.
13739         (get_tinfo_fn_unused): Rename to ...
13740         (get_tinfo_decl): ... here.
13741         * rtti.c (build_headof): Replace logic error with assertion.
13742         (get_tinfo_fn_dynamic): Rename to ...
13743         (get_tinfo_decl_dynamic): ... here. Make static. Use
13744         complete_type_or_else.
13745         (build_x_typeid): Move into ...
13746         (build_typeid): ... here. Adjust call to
13747         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
13748         throw_bad_typeid expression.
13749         (get_tinfo_fn_unused): Rename to ...
13750         (get_tinfo_decl): ... here. Adjust comment.
13751         (get_tinfo_fn): Delete.
13752         (tinfo_from_decl): New static function.
13753         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
13754         (get_typeid): Use complete_type_or_else.
13755         (build_dynamic_cast_1): Adjust calls to
13756         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
13757         * parse.y (primary): Adjust call to build_typeid.
13758         * except.c (build_eh_type_type_ref): Adjust call to
13759         get_tinfo_decl. Mark as used.
13760         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
13761         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
13762         * parse.c: Regenerated.
13763
13764 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
13765
13766         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
13767         calling convention.
13768         (resolves_to_fixed_type_p): Document calling convention.
13769         * rtti.c (build_x_typeid): Initialize NONNULL.
13770
13771         * cp-tree.h (build_shared_int_cst): New function.
13772         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
13773         * class.c (modify_vtable_entry): Likewise.
13774         (add_virtual_function): Split out code to generated shared
13775         INTEGER_CSTs to build_share_int_cst.
13776         (modify_all_vtables): Handle all the overridden functions here.
13777         Add overridden functions from non-primary virtual bases to the
13778         primary vtable.
13779         (finish_struct_1): Adjust call to modify_all_vtables.  Add
13780         overridden functions from non-primary bases to the vtable.
13781         * tree.c (build_shared_int_cst): New function.
13782
13783         * cp-tree.h (scratchalloc): Remove.
13784         (build_scratch_list): Likewise.
13785         * call.c (convert_class_to_reference): Replace build_scratch_list
13786         and build_expr_list with build_tree_list.
13787         (add_candidate): Replace scratchalloc with expralloc.  Note memory
13788         leak.
13789         (build_user_type_conversion_1):  Replace build_scratch_list
13790         and build_expr_list with build_tree_list.
13791         (build_new_op): Likewise.
13792         (build_op_delete_call): Likewise.
13793         (convert_like): Likewise.
13794         * cvt.c (ocp_convert): Likewise.
13795         * decl.c (start_decl): Likewise.
13796         (start_function): Likewise.
13797         (finish_destructor_body): Likewise.
13798         (maybe_build_cleanup_1): Likewise.
13799         * decl2.c (reparse_decl_as_expr): Likewise.
13800         * init.c (perform_member_init): Likewise.
13801         (expand_cleanup_for_base): Likewise.
13802         (build_builtin_delete_call): Likewise.
13803         (build_new_1): Likewise.
13804         (build_delete): Likewise.
13805         * method.c (do_build_assign_ref): Likewise.
13806         * parse.y (already_scoped_stmt): Likewise.
13807         (nontrivial_exprlist): Likewise.
13808         (net_initializer): Likewise.
13809         (initlist): Likewise.
13810         * parse.c: Regenerated.
13811         * rtti.c (build_x_typeid): Likewise.
13812         (build_dynamic_cast_1): Likewise.
13813         * typeck.c (build_x_compound_expr): Likewise.
13814         (build_static_cast): Likewise.
13815         (build_modify_expr): Likewise.
13816
13817         * cp-tree.h (DECL_VINDEX): Add documentation.
13818         * class.c (build_vtable_entry): Likewise.
13819         (start_vtable): Add comment.
13820         (add_virtual_function): Replace pending_hard_virtuals with
13821         overridden_virtuals and pending_virtuals with new_virtuals.
13822         Replace redundant assignments with assertions.
13823         (check_for_override): Add comment.
13824         (check_bases_and_members): Replace pending_hard_virtuals with
13825         overridden_virtuals and pending_virtuals with new_virtuals.
13826         (create_vtbl_ptr): Likewise.
13827         (layout_class_type): Likewise.
13828         (finish_struct_1): Likewise.  Add comments.
13829
13830 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
13831
13832         * class.c (finish_struct_1): Replace redundant code with
13833         assertions.
13834
13835         * cp-tree.h (flag_new_abi): Move.
13836         (flag_use_cxa_atexit): Likewise.
13837         (flag_honor_std): Likewise.
13838         (flag_rtti): Likewise.
13839         (vbase_offsets_in_vtable_p): Define.
13840         (vptrs_present_everywhere_p): Likewise.
13841         (TYPE_CONTAINS_VPTR_P): Likewise.
13842         (dfs_walk_real): Declare.
13843         * class.c (build_vbase_pointer_fields): Check
13844         vbase_offsets_in_vtable_p.
13845         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
13846         BINFO_VPTR_FIELD.
13847         (build_vbase_offset_vtbl_entries): Simplify.
13848         (build_vbase_offset_vtbl_entries): Adjust.
13849         (build_vbase_pointer): Add ability to look up vbase offsets in
13850         vtable.
13851         (start_vtable): New function.
13852         (add_virtual_function): Use it.
13853         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
13854         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
13855         (build_vtbl_initializer): Take the type of the complete object as
13856         input.  Use it to correctly calculate vbase offsets.
13857         (dfs_finish_vtbls): Pass the complete type to
13858         build_vtbl_initializer.
13859         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
13860         (create_vtable_ptr): Create a vtable even if there are no
13861         new virtual functions, under the new ABI.
13862         (finish_struct_1): Likewise.
13863         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
13864         * decl.c (exapnd_static_init): Remove call to
13865         preserve_initializer.
13866         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
13867         vtables.
13868         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
13869         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
13870         (construct_virtual_bases): Don't initialize virtual base pointers
13871         under the new ABI.
13872         (build_aggr_init): Clean up comment.
13873         (expand_aggr_init_1): Likewise.
13874         * rtti.c (expand_class_desc): Store the virtual function table
13875         index where the vbase offset lives in the offset field.
13876         * search.c (dfs_walk_real): Make it global.
13877         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
13878         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
13879
13880         * tinfo.h (USItype): Make it signed under the new ABI.
13881         * tinfo.cc (convert_to_base): New function.  Encapsulate base
13882         conversion logic here.
13883         (__class_type_info::do_upcast): Use it.
13884         (__class_type_info::do_dyncast): Likewise.
13885         (__class_type_info::do_find_public_subobj): Likewise.
13886
13887         * init.c (construct_virtual_bases): Don't look up the addresses of
13888         virtual bases at run-time.
13889
13890         * class.c (build_vbase_pointer): Relocate.
13891         (build_vbase_pointer_fields): Likewise.
13892         (dfs_build_vbase_offset_vtbl_entries): Likewise.
13893         (build_vbase_offset_vtbl_entries): Likewise.
13894
13895         * decl.c (init_decl_processing): Complain if -fnew-abi
13896         -fno-vtable-thunks is used.
13897
13898         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
13899         flag_new_abi.
13900
13901 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
13902
13903         * cp-tree.h (num_extra_vtbl_entries): New function.
13904         (size_extra_vtbl_entries): Likewise.
13905         (dfs_vtable_path_unmark): Likewise.
13906         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
13907         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
13908         * class.c (num_extra_vtbl_entries): New function.
13909         (size_extra_vtbl_entries): Likewise.
13910         (dfs_build_vbase_offset_vtbl_entries): New function.
13911         (build_vbase_offset_vtbl_entries): Likewise.
13912         (build_vtbl_initializer): Use it.
13913         (finish_struct_1): Adjust vtable sizes (using
13914         num_extra_vtbl_entries).
13915         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
13916         THUNK_DECL is non-NULL before expanding it.
13917         * init.c (expand_virtual_init): Adjust the vtable pointer by
13918         size_extra_vtbl_entries before storing it.
13919         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
13920         Handle TREE_LIST parameters here, not in the dfs_* functions.
13921         (dfs_unmarked_real_bases_queue_p): Adjust.
13922         (dfs_marked_real_bases_queue_p): Likewise.
13923         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
13924         (dfs_vtable_path_marked_real_bases_queue_p): New function.
13925         (dfs_vtable_path_unmark): Likewise.
13926
13927 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
13928
13929         * optimize.c (copy_body_r): Clear the operand three of a
13930         TARGET_EXPR when copying it.
13931
13932 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13933
13934         * method.c (build_decl_overload_real): Check whether we are in ::
13935         before returning __builtin_new/delete.
13936
13937 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
13938
13939         * pt.c (tsubst_friend_function): Improve comment.
13940         (instantiate_decl): Avoid crashing when a "nested" function is
13941         instantiated from the top level.
13942
13943         * dump.c (dqeueue_and_dump): Dump
13944         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
13945
13946 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13947
13948         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
13949
13950 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
13951
13952         * g++spec.c (lang_specific_driver): Add -fnew-abi if
13953         ENABLE_NEW_GXX_ABI defined.
13954         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
13955         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
13956         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
13957
13958 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
13959
13960         * decl.c (start_cleanup_fn): Call pushdecl.
13961
13962         * call.c (convert_class_to_reference): Fix typos.
13963         (build_conditional_expr): Handle errors gracefully.
13964         * class.c (push_nested_class): Likewise.
13965         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
13966         (DECL_THIS_EXTERN): Use it.
13967         (DECL_THIS_STATIC): Likewise.
13968         * cvt.c (convert_to_void): Handle errors gracefully.
13969         (build_expr_type_conversion): Likewise.
13970         * decl.c (maybe_push_decl): Likewise.
13971         (start_decl_1): Likewise.
13972         (require_complete_types_for_parms): Likewise.
13973         * parse.y (structsp): Likewise.
13974         (base_class): Likewise.
13975         * parse.c: Regenerated.
13976         * pt.c (finish_member_template_decl): Likewise.
13977         * typeck.c (decay_conversion): Likewise.
13978
13979         * cp-tree.h (dfs_skip_vbases): New function.
13980         (find_vbase_instance): Likewise.
13981         * class.c (determine_primary_base): Allow a nearly empty base to
13982         serve as a primary base class under the new ABI.
13983         (get_class_offset_1): Rename to ...
13984         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
13985         messages here.
13986         (get_class_offset): Use it.  Issue error messages here.
13987         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
13988         find the right copies of virtual bases.
13989         (fixup_vtable_deltas1): Rename to ...
13990         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
13991         bases as primary bases.
13992         (fixup_vtable_deltas): Remove.
13993         (override_one_vtable): Handle virtual bases as primary bases.
13994         (merge_overrides): Likewise.
13995         (finish_struct_1): Likewise.
13996         (dump_class_hierarchy): Dump primary-ness of bases as well.
13997         * search.c (mark_primary_bases): Use a pre-order traversal to
13998         handle primary virtual bases.
13999         (dfs_skip_vbases): New fiunction.
14000         (expand_upcast_fixups): Adjust to handle primary virtual bases.
14001         (fixup_virtual_upcast_offsets): Likewise.
14002         (fixup_all_virtual_upcast_offsets): Likewise.
14003         (dfs_find_vbase_instances): New function.
14004         (find_vbase_instance): Likewise.
14005
14006 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
14007
14008         * lex.c (DIR_SEPARATOR): Delete macro.
14009
14010 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
14011
14012        * decl2.c (lang_decode_option): Handle automatic line wrapping
14013        option.
14014
14015 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
14016
14017         * friend.c (do_friend): Don't resolve scopes when processing
14018         template declarations, even if the qualifying scope doesn't
14019         involve template parameters.
14020
14021 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
14022
14023         * class.c (dfs_modify_vtables_queue_p): Remove.
14024         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
14025         and dfs_marked_real_bases_queue_p instead of
14026         dfs_modify_vtables_queue_p.
14027
14028         * class.c (build_vbase_path): Simplify.
14029         (dfs_propagate_binfo_offsets): New function.
14030         (propagate_binfo_offsets): Use it.
14031         (remove_base_field): Simplify.
14032         (dfs_set_offset_for_vbases): Remove.
14033         (dfs_set_offset_for_shared_vbases): New function.
14034         (dfs_set_offset_for_unshared_vbases): Likewise.
14035         (layout_virtual_bases): Use them.
14036         (layout_basetypes): Don't call propagate_binfo_offsets.
14037         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
14038         for the vbases.
14039
14040         * class.c (build_base_field): New function, split out from ...
14041         (build_base_fields): ... here.  Use it.  Allocate primary bases
14042         first, under the new ABI.
14043         (get_vtable_entry): Remove.
14044         (remove_base_field): New function, split out from ...
14045         (remove_base_fields): ... here.  Adjust since primary bases come
14046         first under the new ABI.
14047
14048         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
14049         (initialize_vtbl_ptrs): New function.
14050         (expand_indirect_vtbls_init): Change prototype.
14051         (convert_pointer_to_vbase): Declare.
14052         * init.c (expand_direct_vtbls_init): Remove.
14053         (dfs_initialize_vtbl_ptrs): New function.
14054         (initialize_vtbl_ptrs): Likewise.
14055         (emit_base_init): Use initialize_vtbl_ptrs.
14056         * search.c (convert_pointer_to_vbase): Make it global.
14057         (expand_indirect_vtbls_init): Remove vtable initialization code.
14058         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
14059
14060         * class.c (dfs_finish_vtbls): New function.
14061         (finish_vtbls): Use it.
14062         (dump_class_hierarchy): New function.
14063
14064         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
14065         (BINFO_VBASE_PRIMARY_P): New macro.
14066         (BINFO_VIRTUALS): Add to documentation.
14067         (SET_BINFO_PRIMARY_MARKED_P): Remove.
14068         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
14069         (dfs_mark_primary_bases_queue_p): Likewise.
14070         (dfs_unmarked_real_bases_queue_p): New function.
14071         (dfs_marked_real_bases_queue_p): Likewise.
14072         * search.c (dfs_mark_primary_bases): Adjust.
14073         (mark_primary_bases): Likewise.
14074         (get_shared_vbase_if_not_primary): New function.
14075         (dfs_unmarked_real_bases_queue_p): Likewise.
14076         (dfs_marked_real_bases_queue_p): Likewise.
14077         (dfs_get_pure_virtuals): Simplify.
14078         (get_pure_virtuals): Likewise.
14079
14080 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14081
14082         * lex.c: Include tm_p.h.
14083
14084 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
14085
14086         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
14087
14088 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
14089
14090         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
14091         * pt.c (instantiate_decl): Defer comdat templates that might not be
14092         needed.
14093
14094         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
14095         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
14096         (finish_file): Likewise.
14097
14098         * decl2.c (import_export_class): Undo 12/14 change.
14099
14100         * error.c (dump_decl): operator new, not operatornew.
14101
14102         * class.c (field_decl_cmp): A nontype is "greater" than a type.
14103         * search.c (lookup_field_1): Look for the last field with the
14104         desired name.
14105
14106 2000-01-05  Nathan Sidwell  <nathan@acm.org>
14107
14108         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
14109         FUNCTION_DECL.
14110
14111 2000-01-05  Nathan Sidwell  <nathan@acm.org>
14112
14113         * typeck.c (build_static_cast): Don't strip target qualifiers
14114         when casting from a class.
14115
14116 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14117
14118         * class.c (warn_hidden): Initialize variable `fndecl'.
14119
14120 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
14121
14122         * decl.c (flag_isoc9x): New variable to be able to use code in
14123         c-common.c.  For now always zero.
14124
14125 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
14126
14127         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
14128         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
14129         or unshare_base_binfos for virtual bases here.
14130         * search.c (dfs_get_vbase_types): Do it here.
14131         (get_vbase_types): Adjust.
14132
14133 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
14134
14135         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
14136         (BINFO_PRIMARY_MARKED_P): Use flag 5.
14137         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
14138         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
14139         (unmark_primary_bases): Remove declaration.
14140         (unmarkedp): Declare.
14141         (dfs_vbase_unmark): Likewise.
14142         * class.c (determine_primary_base): Return immediately if there
14143         are no base classes.  Call mark_primary_bases here.
14144         (modify_all_direct_vtables): Remove.
14145         (modify_all_indirect_vtables): Remove.
14146         (dfs_modify_vtables_queue_p): New function.
14147         (dfs_modify_vtables): New function.
14148         (modify_all_vtables): Use them.
14149         (build_base_fields): Build FIELD_DECLs for primary virtual base
14150         classes.
14151         (create_vtable_ptr): Don't call determine_primary_base here.
14152         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
14153         (dfs_set_offset_for_vbases): ... this.
14154         (layout_virtual_bases): Use it.
14155         (layout_class_type): Call determine_primary_base here.
14156         * search.c (unmarkedp): Make it global.
14157         (shared_marked_p): Simplify.
14158         (shared_unmarked_p): Likewise.
14159         (dfs_primary_bases_queue_p): Remove.
14160         (dfs_unmark_primary_bases): Likewise.
14161         (unmark_primary_bases): Likewise.
14162         (mark_primary_bases): Simplify.
14163         (get_pure_virtuals): Don't call mark_primary_bases here.
14164         (dfs_vbase_unmark): New function.
14165         (get_vbase_types): Simplify.
14166
14167         * class.c (struct base_info): Remove.
14168         (determine_primary_base): Take has_virtual_p rather than a
14169         base_info as input.  Don't calculate max_has_virtual.
14170         (finish_struct_bits): Remove max_has_virtual argument.
14171         (create_vtable_ptr): Remove max_has_virtual_p argument.
14172         (layout_virtual_bases): Remove max argument.
14173         (layout_basetypes): Likewise.
14174         (layout_class_type): Remove max_has_virtual_p argument.
14175         (finish_struct_1): Remove max_has_virtual.
14176
14177         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
14178         (layout_basetypes): Remove.
14179         * class.c (propagate_binfo_offsets): Moved here from tree.c.
14180         Update to handle primary virtual bases.
14181         (remove_base_fields): New function, split out from
14182         layout_basetypes.
14183         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
14184         (layout_virtual_bases): New function, split out from
14185         layout_basetypes.  Update to handle primary virtual bases.
14186         (layout_basetypes): Moved here from tree.c.  Use
14187         remove_base_fields and layout_virtual_bases.
14188         * search.c (dfs_mark_primary_bases_queue_p): New function.
14189         (mark_primary_bases): Use it.
14190         * tree.c (CEIL): Remove.
14191         (propagate_binfo_offsets): Remove.
14192         (layout_basetypes): Remove.
14193
14194 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
14195
14196         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
14197         (BINFO_PRIMARY_MARKED_P): New macro.
14198         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
14199         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
14200         (mark_primary_bases): New function.
14201         (unmark_primary_bases): Likewise.
14202         * search.c (get_abstract_virtuals_1): Remove.
14203         (dfs_mark_primary_bases): New function.
14204         (mark_primary_bases): Likewise.
14205         (dfs_unmark_primary_bases): Likewise.
14206         (unmark_primary_bases): Likewise.
14207         (dfs_get_pure_virtuals): Likewise.
14208
14209 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
14210
14211         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
14212         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
14213         (modify_one_vtable): Adjust.
14214         (fixup_vtable_deltas1): Likewise.
14215         (override_one_vtable): Likewise.
14216         * search.c (get_abstract_virtuals_1): Likewise.
14217         (get_pure_virtuals): Likewise.
14218         (expand_upcast_fixups): Likewise.
14219         * tree.c (debug_binfo): Likewise.
14220
14221         * class.c (build_vtable): Don't return a value.  Don't rebuild
14222         vtables for bases that have already been handled.
14223         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
14224         already been handled.
14225         (modify_one_vtable): Adjust accordingly.
14226         (fixup_vtable_deltas1): Likewise.
14227         (finish_struct_1): Likewise.
14228
14229 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14230
14231         * call.c (build_new_method_call): Also check destructors.