* rtti.c (throw_bad_typeid): Use build_cxx_call.
[official-gcc.git] / gcc / cp / ChangeLog
blobe5940ffe6148d6d6cc6b7cb8656b1c4456110c7b
1 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
3         * rtti.c (throw_bad_typeid): Use build_cxx_call.
5 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
7         * call.c (build_over_call): Use build_cxx_call.
8         (build_cxx_call): New method, split out of build_over_call.
9         * cp-tree.h (language_function): Add can_throw.
10         (build_cxx_call): Declare it.
11         * decl.c (finish_function): If a function does not contain any
12         calls to functions that can throw an exception, indicate that
13         fact.
14         * decl2.c (mark_used): Do not defer the instantiation of
15         functions, if the current function does not throw.
16         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
17         * pt.c (instantiate_decl): Make sure import_export_decl is called
18         before emitting things.
19         * rtti.c (throw_bad_cast): Use build_cxx_call.
20         (build_dynamic_cast_1): Likewise.
21         * typeck.c (build_function_call): Likewise.
23 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
25         PR c++/9881
26         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
27         expressions. Reverts my 2002-08-08 patch.
28         
29         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
30         cheaper early exit.
32 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
34         * cp/decl2.c (start_static_storage_duration_function): Take count
35         arg, don't check if it wraps round.
36         (generate_ctor_or_dtor_function): Add locus arg, use it.
37         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
38         locus.
39         (finish_file): Set line numbers to past EOF for synthesized
40         functions.
42 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
44         PR c++/10405
45         * search.c (lookup_field_1): Final scan goes backwards for
46         types, forwards for non-types.
48 2003-04-17  Roger Sayle  <roger@eyesopen.com>
50         PR c/10375
51         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
52         "nothrow" function attributes.
54 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
56         PR c++/10347
57         * pt.c (type_dependent_expression_p): Handle array new.
59 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
61         PR c++/10381
62         * parser.c (cp_parser_primary_expression): Reorganize logic for
63         dealing with name lookup failures.
65 2003-04-15  Jason Merrill  <jason@redhat.com>
67         * decl2.c (mark_used): Don't instantiate anything if
68         skip_evaluation.
70 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
72         * tree.c (build_cplus_array_type_1): Do not call
73         uses_template_parms() on a NULL index_type.
75 2003-04-13  Roger Sayle  <roger@eyesopen.com>
77         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
79 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
81         PR c++/10300
82         * init.c (build_new_1): Reorganize.
84 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
86         * class.c (initialize_array)
87         * decl.c (reshape_init)
88         * decl2.c (build_expr_from_tree)
89         * init.c (build_zero_init)
90         * pt.c (tsubst_copy, tsubst_copy_and_build)
91         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
92         (ptm_initializer, class_initializer, get_pseudo_ti_init)
93         * semantics.c (finish_compound_literal)
94         * typeck.c (build_ptrmemfunc1)
95         * typeck2.c (store_init_value, process_init_constructor)
96         (build_functional_cast): Use build_constructor.
98 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
100         * call.c (print_z_candidates): Use gcc_gettext_width, not
101         strlen, to determine how much padding to use.
103 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
105         * decl.c: Update all calls to shadow_warning.
107 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
109         * class.c (layout_class_type): Correct handling for overlong
110         bit-fields whose width is the same as an integer type.
112 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
114         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
115         * cp-lang.c (cp_tree_size): New function.
116         (LANG_HOOKS_TREE_SIZE): Override.
118         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
119         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
120         (union lang_tree_node): Remove common and srcloc members.
121         (build_srcloc_here): Don't prototype.
122         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
123         * pt.c (pending_templates): Correct comment.
124         * tree.c (build_srcloc, build_srcloc_here): Kill.
126 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
128         * call.c: Include intl.h.
129         (print_z_candidate): Always use inform; get rid of errfn
130         argument. Reorganize so that all the strings get picked up
131         by xgettext.  Note obligation of caller to pass first argument
132         through gettext.
133         (print_z_candidates): Update to match.  Indent second and
134         successive candidates by strlen() of translated message.
135         (joust): Restructure ambiguous-conversion pedwarn so that
136         translators see a complete sentence.  Update calls to
137         print_z_candidate.
139         * Make-lang.in (cp/call.o): Update dependencies.
141 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
143         * decl.c (set_current_binding_level): Delete, revert last change.
144         (current_binding_level): Modify to allow it as as lvalue.
146 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
148         * name-lookup.c (find_binding): Pass appropriate pointer type to
149         POP_TIMEVAR_AND_RETURN.
151 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
153         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
154         * cp-tree.h: Don't insist on having GNUC.
156 2003-04-03  Jason Merrill  <jason@redhat.com>
158         * cvt.c (ocp_convert): Only abort if we try to convert an object
159         of TREE_ADDRESSABLE type.
161         * class.c (build_vtable): Set DECL_ALIGN here.
162         (get_vtable_decl): Not here.
163         (layout_vtable_decl): Or here.
164         (create_vtable_ptr): Or here.
165         (layout_class_type): Or here.
166         (check_bitfield_decl): Don't mess with field alignment.
168 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
170         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
171         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
172         * rtti.c (dfs_class_hint_mark): Likewise.
174         * decl.c (push_local_name, push_class_level_binding,
175         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
176         functions returning void.
177         * decl2.c (add_using_namespace): Likewise.
179         * decl.c (print_binding_level, print_other_binding_stack,
180         print_binding_stack): Cast argument of %p specifier to void*.
181         * ptree.c (cxx_print_decl): Likewise.
183         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
184         VAR_FUNCTION_OR_PARM_DECL_CHECK,
185         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
186         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
187         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
189         * decl.c (set_current_binding_level): New macro.  Use throughout
190         when setting the current binding level.
192         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
193         in enum.
194         * method.c (mangling_flags): Likewise.
196         * cp-tree.h (lang_type_header): Add __extension__ and use
197         CHAR_BITFIELD for members.
199 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
201         PR other/9274
202         * mangle.c: Include gt-cp-mangle.h.
203         (subst_identifiers): Mark with GTY.
204         * config-lang.in (gtfiles): Add cp/mangle.c.
205         * Make-lang.in: (gt-cp-mangle.h): New rule.
206         (cp/mangle.o): Depends on gt-cp-mangle.h.
208 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
210         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
211         after \$(srcdir)/cp/name-lookup.h.
212         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
213         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
214         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
215         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
217 2003-03-31  Jason Merrill  <jason@redhat.com>
219         PR java/10145
220         * class.c (check_field_decl): Don't set DECL_ALIGN.
222 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
224         PR c++/7647
225         * decl.c (grokdeclarator): Tidy, slightly.
226         * search.c (lookup_field_1): Add want_type parameter.
227         (lookup_field_r): Adjust call to lookup_field_1.
229 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
231         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
233 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
235         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
236         prototype.
237         (cxx_scope_find_binding_for_name): Likewise.
238         * decl.c (find_binding: Move to name-lookup.c.
239         (binding_for_name): Likewise.
240         (cxx_scope_find_binding_for_name): Likewise.
241         (BINDING_LEVEL):  Remove.
242         (push_binding): Tidy.
243         (push_class_binding): Likewise.
244         (pop_binding): Likewise.
245         (poplevel): Likewise.
246         (poplevel_class): Likewise.
247         (set_identifier_type_value_with_scope): Likewise.
248         (push_overloaded_decl): Likewise.
249         (lookup_tag): Likewise.
250         (unqualified_namespace_lookup): Likewise.
251         (lookup_name_current_level): Likewise.
252         (maybe_inject_for_scope_var): Likewise.
253         (namespace_binding): Move to name-lookup.c.
254         (set_namespace_binding): Likewise.
255         * decl2.c (lookup_using_namespace): Tidy.
256         (qualified_lookup_using_namespace): Likewise.
257         (do_toplevel_using_decl): Likewise.
258         * name-lookup.c: Include "timevar.h"
259         * name-lookup.h (cxx_scope):  Declare.
260         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
261         member declaration.
262         (BINDING_SCOPE): Adjust definition.
263         (BINDING_HAS_LEVEL_P): Remove.
265 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
267         * name-lookup.c: New file.
268         * name-lookup.h: Likewise..
269         * decl.c (push_binding): Adjust use cxx_binding_make.
270         (free_bindings): Move to name-lookup.c
271         (pop_binding): Use cxx_binding_free.
272         (binding_for_name): Tidy.
273         * cp-tree.h: Include "name-lookup.h"
274         (cxx_binding_make): Move to name-lookup.h
275         (cxx_binding_clear): Likewise.
276         (struct cxx_binding): Likewise.
277         (LOCAL_BINDING_P): Likewise.
278         (INHERITED_VALUE_BINDING_P): Likewise.
279         (BINDING_SCOPE): Likewise.
280         (BINDING_HAS_LEVEL_P): Likewise.
281         (BINDING_VALUE): Likewise.
282         (BINDING_TYPE): Likewise.
283         * config-lang.in (gtfiles): Add cp/name-lookup.h
284         * Make-lang.in (cp/name-lookup.o): New rule.
285         (CXX_OBJS): Add cp/name-lookup.o
286         (CXX_TREE_H): Add cp/name-lookup.h
288 2003-03-28  Jason Merrill  <jason@redhat.com>
290         PR c++/10245
291         * cvt.c (force_rvalue): New fn.
292         * call.c (build_conditional_expr): Use it.
293         * cp-tree.h: Declare it.
295 2003-03-28  Mike Stump  <mrs@apple.com>
297         * error.c (dump_expr): Add 0x to printed hex numbers to make
298         output match source code better.
300 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
302         PR c++/10218
303         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
304         definitions.
306         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
307         non-existant ssdf_decls array.
308         (finish_file): Call generator_ctor_or_dtor_function when there are
309         static constructors or destructors and no other static
310         initializations.
312 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
314         PR c++/10047
315         * decl2.c (finish_file): Don't warn about explicitly instantiated
316         inline decls.
318 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
320         PR c++/10224
321         * pt.c (lookup_template_class): Only check instantiated args if
322         they do not contain template parameters.
324 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
326         PR c++/10158
327         * parser.c (cp_parser_function_definition): Set
328         DECL_INITIALIZED_IN_CLASS for members.
329         * pt.c (instantiate_decl): Only reduce the template args for
330         friends that are not defined in class.
332 2003-03-25  Jason Merrill  <jason@redhat.com>
334         * call.c (print_z_candidate): Change name of first arg to msgid.
335         (joust): Add comment for translators.
337 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
339         PR c++/9898, PR c++/383, DR 322
340         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
341         through reference types on both PARM and ARG.
343 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
345         PR c++/10119
346         * error.c (dump_expr) <BASELINK>: Use dump_expr.
347         * pt.c (maybe_fold_nontype_args): New function.
348         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
349         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
350         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
351         maybe_fold_nontype_args.
353 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
355         PR c++/10026
356         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
358 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
360         PR c++/7086
361         * typeck.c (cxx_mark_addressable):  Adjust call to
362         gen_mem_addressof or put_var_into_stack.
364 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
366         PR c++/9978, c++/9708
367         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
368         * call.c (add_template_candidate_real): Adjust
369         instantiate_template call.
370         * class.c (resolve_address_of_overloaded_function): Likewise.
371         * decl.c (build_enumerator): Set TREE_CONSTANT.
372         * pt.c (check_instantiated_args): New.
373         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
374         TREE_READONLY.
375         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
376         (reduce_template_parm_level): Likewise.
377         (process_template_parm): Likewise.
378         (check_explicit_specialization): Adjust instantiate_template call.
379         (convert_template_argument): Don't check non-type argument here.
380         (lookup_template_class): Check them here.
381         (tsubst_friend_function): Adjust instantiate_template call.
382         (instantiate_template): Add tsubst_flags parameter, use it. Check
383         instantiated args.
385 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
387         * decl.c: Update calls to shadow_warning.
389 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
391         PR c++/9898
392         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
393         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
395 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
397         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
398         friends.
399         * cp/pt.c (instantiate_class_template): Fix formatting.
401 2003-03-14  Matt Austern  <austern@apple.com>
403         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
404         (unemitted_tinfo_decl_p): Remove.
405         (emit_tinfo_decl): Change declaration to remove unused parameter.
406         * decl2.c (finish_file): Change tinfo emission to loop through
407         unemitted_tinfo_decls array instead of looping through all decls.
408         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
409         unused second parameter.
410         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
411         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
412         (emit_tinfo_decl): remove unused second parameter, add assertion
413         that decl hasn't already been emitted.
415 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
417         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
418         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
419         return statements.
421 2003-03-19  Jason Merrill  <jason@redhat.com>
423         PR c++/8316, c++/9315, c++/10136
424         * call.c (print_z_candidate): Split out from...
425         (print_z_candidiates): ...here.
426         (joust): Use it.
428 2003-03-17  Roger Sayle  <roger@eyesopen.com>
430         PR c++/10031
431         * decl.c (duplicate_decls): Use the new type when prototyping
432         anticipated decls, even when the types match.  This defines the
433         exception list for the built-in function.
435 2003-03-17  Jason Merrill  <jason@redhat.com>
437         PR c++/10091
438         * typeck.c (build_class_member_access_expr): Compare
439         TYPE_MAIN_VARIANTs.
441 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
443         PR c++/9639
444         * parser.c (cp_parser_declarator_id): Clear parser->scope.
446 2003-03-16  Jason Merrill  <jason@redhat.com>
448         PR c++/9993
449         * decl.c (finish_function): Only allow the NRVO to use variables
450         declared at function scope.
452 2003-03-17  Andreas Jaeger  <aj@suse.de>
454         * Make-lang.in (cp/TAGS): Remove.
456 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
458         PR c++/9629
459         * cp-tree.h (struct language_function): Add in_base_initializer.
460         (in_base_initializer): define it.
461         (expand_member_init): Remove INIT param.
462         * init.c (expand_member_init): Remove INIT param, return the member.
463         (emit_mem_initializers): Set in_base_initializer.
464         * class.c (build_base_path): Check in_base_initializer.
465         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
466         * pt.c (tsubst_initializer_list): Likewise.
468 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
470         * decl.c (binding_for_name): Fix initialization thinko.
472 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
474         Compile-time improvement: 2/n.
475         * cp-tree.h (struct cxx_binding): New datatype;
476         (struct lang_identifier): Use it.
477         (LOCAL_BINDING_P): Adjust definition.
478         (INHERITED_VALUE_BINDING_P): Likewise.
479         (BINDING_SCOPE): Likewise.
480         (BINDING_HAS_LEVEL_P): Likewise.
481         (BINDING_VALUE): Likewise.
482         (BINDING_TYPE): Likewise.
483         (IDENTIFIER_VALUE): Likewise.
484         (struct tree_binding): Remove.
485         (TS_CP_BINDING): Likewise.
486         ((union lang_tree_node): Remove field "binding".
487         (cxx_binding_clear): New macro.
488         (binding_for_name): Adjust return type.
489         (qualified_lookup_using_namespace): Adjust prototype.
490         (lookup_using_namespace): Adjust prototype.
491         (cxx_scope_find_binding_for_name): Declare.
492         * cp-tree.def: Remove CPLUS_BINDING definition.
493         * decl.c (push_binding): Adjust local variable type.
494         (add_binding): Likewise.
495         (push_class_binding): Likewise.
496         (pop_binding): Likewise.
497         (poplevel): Likewise.
498         (poplevel_class): Likewise.
499         (free_bindings):  Adjust type.
500         (find_binding): Adjust return type, add a third parameter. Remove
501         non-useful assertion now that we use static typing.
502         (cxx_scope_find_binding_for_name): New function.
503         (binding_for_name): Use it.  Adjust local variable type. Simplify.
504         (namespace_binding):  Simplify.
505         (set_namespace_binding): Likewise.
506         (set_identifier_type_value_with_scope): Adjust local variable type.
507         (lookup_tag): Don't type-abuse of local variable 'old'.
508         (lookup_namespace_name): Likewise.  Allocate binding on stack.
509         (select_decl): Adjust prototype.
510         (unqualified_namespace_lookup):  Allocate binding on stack.
511         Don't type-abuse of local variable 'val'.
512         (lookup_name_real): Likewise.
513         (maybe_inject_for_scope_var): Adjust local variable type.
514         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
515         (namespace_binding): Adjust logic, simplify.
516         (BINDING_LEVEL): Adjust definition.
517         (push_class_level_binding): Adjust local variable type.
518         (struct cxx_saved_binding): Adjust field 'binding' type.
519         * decl2.c (ambiguous_decl): Adjust prototype.
520         (lookup_using_namespace): Adjust local variable type.
521         (qualified_lookup_using_namespace): Catch type error and correct
522         ensueing logic error.
523         (do_nonmember_using_decl): Adjust local variable type.  Allocate
524         temporary cxx_binding on stack.
525         (do_toplevel_using_decl): Adjust local variable type.
526         * ptree.c (cxx_print_cxx_binding): New function.
527         (cxx_print_identifier): Use it.
528         (cxx_print_xnode): Delete CPLUS_BINDING case label.
530 2003-03-15  Roger Sayle  <roger@eyesopen.com>
532         * tree.c (count_functions): Fix whitespace.
534 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
536         * Make-lang.in: Update.
538 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
540         PR c++/6440
541         * pt.c (maybe_process_partial_specialization): Handle
542         member class template when enclosing class template is
543         explicit specialized.
544         (most_general_template): Stop looking when DECL is already
545         specialized.
547 2003-03-13  Jason Merrill  <jason@redhat.com>
549         PR c++/9420
550         * search.c (lookup_conversions): Call complete_type here.
551         * call.c (implicit_conversion): Not here.
553 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
555         * decl2.c (do_nonmember_using_decl): Correct handling of
556         simultaneous type/non-type bindings.
558         * call.c (initialize_reference): Remove bogus assertion.
559         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
561 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
563         PR c++/7050
564         * expr.c (cxx_expand_expr): Return const0_rtx for throw
565         expressions.
567 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
569         PR c++/9474
570         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
571         to merge old and new declarations.
573 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
575         * g++.1: Remove.
576         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
577         (cp/g++.1): Build it from scratch in the build tree.
578         (c++.install-man): Depend on it.  Install it from the build tree.
579         (c++.mostlyclean): Clean it.
581 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
583         PR c++/9474
584         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
585         to merge old and new declarations.
587         PR c++/9924
588         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
590 2003-03-11  Jason Merrill  <jason@redhat.com>
592         PR c++/9820
593         * search.c (lookup_member): Fix handling of functions in a class
594         being defined.
596 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
598         PR c++/8700
599         * call.c (convert_class_to_reference): Adjust usage of
600         splice_viable.
601         (any_viable): Remove.
602         (splice_viable): Combine with any_viable.
603         (print_z_candidates): Avoid printing duplicates.
604         (build_user_type_conversion_1): Adjust usage of splice_viable.
605         (build_new_function_call): Likewise.
606         (build_operator_new_call): Likewise.
607         (build_object_call): Likewise.
608         (build_conditional_expr): Likewise.
609         (build_new_op): Likewise.
610         (build_new_method_call): Likewise.
611         (joust): Remove spurious comment.
612         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
613         * decl2.c (arg_assoc_class): Simplify.
614         * friend.c (add_friend): Likewise.
616 2003-03-11  Jason Merrill  <jason@redhat.com>
618         PR c++/8660
619         * decl2.c (check_classfn): A member template only matches a
620         member template.
622 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
624         * Make-lang.in (CXX_C_OBJS): Update.
625         * lang-specs.h: Don't define __GNUG__ here.
627 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
629         * call.c (perform_overload_resolution): New function.
630         (build_new_function_call): Use it.
631         (build_operator_new_call): Likewise.
632         (add_candidates): Add explicit_targs and template_only parameters.
633         (build_new_op): Adjust accordingly.
634         * cp-tree.h (build_operator_new_call): New function.
635         (build_function_call_real): Remove.
636         (build_function_call_maybe): Likewise.
637         * init.c (build_new_1): Use build_operator_new_call.
638         * typeck.c (build_function_call_real): Rename to ...
639         (build_function_call): ... this.
641 2003-03-10  Devang Patel  <dpatel@apple.com>
643         PR c++/9394
644         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
646 2003-03-10  Jason Merrill  <jason@redhat.com>
648         PR c++/9798
649         * decl.c (push_using_directive): Push before recursing.
651         PR c++/9868, c++/9524
652         * call.c (resolve_scoped_fn_name): Handle the case of a function
653         pointer member.
655         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
656         argument in the pointer-to-member case.
658 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
660         PR c++/9373
661         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
662         pointers to member functions.
664         PR c++/8534
665         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
666         in pointer-to-member-function types.
668 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
670         * expr.c (cplus_expand_constant): Use C90 prototype style.
671         (cxx_expand_expr): Likewise.
673 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
675         PR c++/9970
676         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
677         functions.
679 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
681         * lang-specs.h (c++-header): Change .pch to .gch.
683 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
685         * cp-tree.h (cxx_init): Update prototype.
686         * lex.c (cxx_init): Similarly.
688 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
690         PR c++/9823
691         * cp-tree.h (begin_mem_initializers): Remove.
692         * parser.c (cp_parser_mem_initializer_list): Inline it here.
693         Do not call finish_mem_initializers if not in a constructor.
694         (cp_parser_class_head): Fix typo in error message.
695         * semantics.c (begin_mem_initializers): Remove.
696         * testsuite/g++.dg/parser/constructor1.C: New test.
698         PR c++/9809
699         * call.c (add_function_candidate): Skip builtin fuctions that have
700         not yet been declared.
702         PR c++/9982
703         * init.c (build_new_1): Correct logic for determining whether or
704         not to use an array cookie.
706         PR c++/9524
707         * parser.c (cp_parser_postfix_expression): Call
708         finish_non_static_data_member, even when processing_template_decl.
710         PR c++/9912
711         * cp-tree.h (is_ancestor): New function.
712         (handle_class_head): Change prototype.
713         * decl2.c (is_namespace_ancestor): Rename to ...
714         (namespace_anecestor): ... this.
715         (set_decl_namespace): Adjust accordingly.
716         (handle_class_head): Remove unncessary parameters.
717         * parser.c (cp_parser_class_head): Check that
718         nested-name-specifiers are used appropriately.
720 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
722         * call.c (reference_binding): Remove REF_IS_VAR parameter.
723         (implicit_conversion): Adjust call to reference_binding.
724         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
725         (initialize_reference): Adjust handling for references bound to
726         rvalues.
727         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
728         prototype.
729         (real_non_cast_lvalue_p): New method.
730         * cvt.c (build_up_reference): Adjust use of
731         make_temporary_var_for_ref_to_temp.
732         * tree.c (real_non_cast_lvalue_p): New method.
734 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
736         * except.c (init_exception_processing): Use C90 prototype style.
737         (cp_protect_cleanup_actions): Likewise.
738         (prepare_eh_type): Likewise.
739         (build_eh_type_type): Likewise.
740         (build_exc_ptr): Likewise.
741         (do_begin_catch): Likewise.
742         (dtor_nothrow): Likewise.
743         (do_end_catch): Likewise.
744         (push_eh_cleanup): Likewise.
745         (decl_is_java_type): Likewise.
746         (choose_personality_routine): Likewise.
747         (initialize_handler_parm): Likewise.
748         (expand_start_catch_block): Likewise.
749         (expand_end_catch_block): Likewise.
750         (begin_eh_spec_block): Likewise.
751         (finish_eh_spec_block): Likewise.
752         (do_allocate_exception): Likewise.
753         (do_free_exception): Likewise.
754         (wrap_cleanups_r): Likewise.
755         (stabilize_throw_expr): Likewise.
756         (build_throw): Likewise.
757         (complete_ptr_ref_or_void_ptr_p): Likewise.
758         (is_admissible_throw_operand): Likewise.
759         (nothrow_libfn_p): Likewise.
760         (can_convert_eh): Likewise.
761         (check_handlers_1): Likewise.
762         (check_handlers): Likewise.
764 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
766         * call.c (merge_conversion_sequences): New function.
767         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
768         (convert_class_to_reference): Correct handling of second
769         standard conversion sequence in a user-defined conversion
770         sequence.
771         (build_user_type_conversion_1): Use merge_conversion_sequences.
772         * cp-tree.def: Add comments for CONV nodes.
773         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
775 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
777         * error.c (init_error): Use C90 prototype style.
778         (dump_scope): Likewise.
779         (dump_qualifiers): Likewise.
780         (dump_template_argument): Likewise.
781         (dump_template_argument_list): Likewise.
782         (dump_template_parameter): Likewise.
783         (dump_template_bindings): Likewise.
784         (dump_type): Likewise.
785         (dump_typename): Likewise.
786         (class_key_or_enum): Likewise.
787         (dump_aggr_type): Likewise.
788         (dump_type_prefix): Likewise.
789         (dump_type_suffix): Likewise.
790         (dump_global_iord): Likewise.
791         (dump_simple_decl): Likewise.
792         (dump_decl): Likewise.
793         (dump_template_decl): Likewise.
794         (dump_function_decl): Likewise.
795         (dump_parameters): Likewise.
796         (dump_exception_spec): Likewise.
797         (dump_function_name): Likewise.
798         (dump_template_parms): Likewise.
799         (dump_char): Likewise.
800         (dump_expr_list): Likewise.
801         (dump_expr): Likewise.
802         (dump_binary_op): Likewise.
803         (dump_unary_op): Likewise.
804         (type_as_string): Likewise.
805         (expr_as_string): Likewise.
806         (decl_as_string): Likewise.
807         (context_as_string): Likewise.
808         (lang_decl_name): Likewise.
809         (cp_file_of): Likewise.
810         (cp_line_of): Likewise.
811         (decl_to_string): Likewise.
812         (expr_to_string): Likewise.
813         (fndecl_to_string): Likewise.
814         (code_to_string): Likewise.
815         (language_to_string): Likewise.
816         (parm_to_string): Likewise.
817         (op_to_string): Likewise.
818         (type_to_string): Likewise.
819         (assop_to_string): Likewise.
820         (args_to_string): Likewise.
821         (cv_to_string): Likewise.
822         (cxx_print_error_function): Likewise.
823         (cp_diagnostic_starter): Likewise.
824         (cp_diagnostic_finalizer): Likewise.
825         (cp_print_error_function): Likewise.
826         (function_category): Likewise.
827         (print_instantiation_full_context): Likewise.
828         (print_instantiation_partial_context): Likewise.
829         (maybe_print_instantiation_context): Likewise.
830         (print_instantiation_context): Likewise.
831         (cp_printer): Likewise.
832         (print_integer): Likewise.
833         (print_non_consecutive_character): Likewise.
834         (locate_error): Likewise.
836 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
838         PR c++/9965
839         * call.c (reference_binding): Add ref_is_var parameter.
840         (implicit_conversion): Adjust call to reference_binding.
841         (initialize_reference): Likewise.
843         PR c++/9400
844         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
845         PARM_DECLs.
847         PR c++/9791
848         * class.c (get_basefndecls): Use lookup_fnfields_1.
850 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
852         PR c++/9188
853         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
854         in error message.
855         (cp_parser_single_declaration): Likewise.
857 2003-03-05  Jason Merrill  <jason@redhat.com>
859         PR c++/9440
860         * call.c (build_conditional_expr): Use convert rather than an
861         explicit NOP_EXPR.
863 2003-03-02  Matt Austern  <austern@apple.com>
865         * decl.c (cp_binding_level): Add static_decls varray member.
866         (add_decl_to_level): Add static/inline namespace scope
867         declarations to static_decls array.
868         (wrapup_global_for_namespace): Pass static_decls only, instead of
869         all decls, to wrapup_global_declarations/check_global_declarations.
870         (push_namespace): Initialize static_decls for ordinary namespaces.
871         (cxx_init_decl_processing): Initialize static_decls for global
872         namespace.
874 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
876         * class.c (end_of_class): Correct thinko.
878 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
880         * config-lang.in: Replace ${libstdcxx_version} by its value.
882 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
884         * cp-tree.h (cxx_saved_binding): Declare.
885         (struct saved_scope): Adjust type of field 'old_binding'.
886         * decl.c (cxx_saved_binding_make): New macro.
887         (struct cxx_saved_binding): Define.
888         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
889         C++ bindings.
890         (maybe_push_to_top_level): Adjust local variable type.
891         (pop_from_top_level): Likewise.
893 2003-03-04  Tom Tromey  <tromey@redhat.com>
895         * Make-lang.in (c++.tags): New target.
897 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
899         * Make-lang.in: Update.
901 2003-03-03  Jason Merrill  <jason@redhat.com>
903         * decl.c (finish_enum): Do set the type in a template. Simplify.
904         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
906 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
908         PR c++/9878
909         * call.c (convert_class_to_reference): Correct conversion
910         sequences.
911         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
912         (implicit_conversion): Adjust call to reference_binding.
913         (add_candidate): Change type of candidates parameter.
914         (add_function_candidate): Likewise.
915         (add_conv_candidate): Likewise.
916         (build_builtin_candidate): Likewise.
917         (add_builtin_candidate): Likewise.
918         (add_builtin_candidates): Likewise.
919         (add_template_candidate_real): Likewise.
920         (add_template_candidate): Likewise.
921         (add_template_conv_candidate): Likewise.
922         (build_user_type_conversion_1): Adjust accordingly.
923         (build_object_call): Likewise.
924         (build_conditional_expr): Likewise.
925         (add_candidates): Likewise.
926         (build_new_op): Likewise.
927         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
928         (build_new_method_call): Adjust calls to add_function_candidate.
929         (make_temporary_var_for_ref_to_temp): New function.
930         (initialize_reference): Add decl parameter.
931         * class.c (build_rtti_vtbl_entries): Use build_address and
932         build_nop.
933         * cp-tree.h (initialize_reference): Change prototype.
934         (make_temporary_var_for_ref_to_temp): New function.
935         (build_type_conversion): Change prototype.
936         (build_address): New function.
937         (build_nop): Likewise.
938         * cvt.c (cp_convert_to_pointer): Adjust call to
939         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
940         Use build_nop.
941         (convert_to_pointer_force): Use build_nop.
942         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
943         (convert_to_reference): Adjust call to build_type_conversion.
944         (ocp_convert): Likewise.
945         (build_type_conversion): Remove for_sure parameter.
946         * decl.c (grok_reference_init): Use initialize_reference.
947         * typeck.c (build_address): New function.
948         (build_nop): Likewise.
949         (build_unary_op): Use them.
950         (build_ptrmemfunc): Tidy slightly.
951         (convert_for_initialization): Adjust call to
952         initialize_reference.
953         * typeck2.c (store_init_value): Remove #if 0'd code.
955 2003-03-03  Jason Merrill  <jason@redhat.com>
957         * decl.c (start_function): Clear DECL_NUM_STMTS.
959         * class.c (get_vtable_decl): Use vtbl_type_node.
960         (build_primary_vtable): Check for it.
962 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
964         * decl.c (check_initializer): Check for vector_opaque_p.
966 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
968         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
969           invoke an external cpp during compilation.
971 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
973         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
974         that of warning().
975         (start_decl): Likewise.
976         (start_function): Likewise.
978 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
980         * Make-lang.in (CXX_C_OBJS): Update.
982 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
984         PR c++/9892
985         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
986         instantiating it.
988 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
990         * parser.c (cp_parser_init_declarator): Revert opaque
991         vector_opaque_p change.
992         Do not include target.h.
994 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
996         PR c++/9879
997         * cp-tree.h (build_zero_init): Add parameter.
998         * decl.c (cp_finish_decl): Adjust call.
999         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
1000         calls.
1001         (build_default_init): Add nelts parameter.  Adjust calls to
1002         build_zero_init.
1003         (build_new_1): Adjust call to build_default_init.
1004         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
1006 2003-02-26  Devang Patel  <dpatel@apple.com>
1008         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
1009         required.  Postpone enum setting for template decls.
1010         (build_enumerator): Delay copying value node until finish_enum
1011         (). Remove #if 0'ed code.
1012         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
1013         (tsubst_copy): Add check for enum type.
1015 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
1017         PR c++/9683
1018         * decl2.c (prune_vars_needing_no_initialization): Do not throw
1019         away initializations for DECL_EXTERNAL VAR_DECLs.
1020         (finish_file): Adjust accordingly.
1021         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
1023 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
1025         * decl.c (add_binding): Time TV_NAME_LOOKUP.
1026         (push_class_binding): Likewise.
1027         (set_namespace_binding): Likewise.
1029 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
1031         PR c++/9836
1032         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
1033         specializations back to the main template.
1034         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
1035         * pt.c (resolve_typename_type): Likewise.
1037 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
1039         PR c++/9778
1040         * pt.c (tsubst_copy_and_build): For a templated function inside a
1041         scope, process template arguments.
1043 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1045         PR c++/9602
1046         * typeck2.c (abstract_virtuals_error): Don't check when
1047         TYPE is still template parameter dependent.
1049 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
1051         PR c++/5333
1052         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
1053         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
1054         * pt.c (instantiate_class_template): Don't try to instantiate
1055         dependent types.
1056         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
1058 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
1060         PR c++/9749
1061         * decl.c (grokdeclarator): Do not allow parameters with variably
1062         modified types.
1064 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
1066         * search.c (grow_bfs_bases): Remove. Fold into ...
1067         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
1068         in previous patch.
1070 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
1072         PR c++/9729
1073         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
1074         when the G++ 3.2 ABI prevents correct compilation.
1076 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
1078         Change base class access representation. Share virtual base
1079         binfos.
1080         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
1081         call.
1082         * cp/class.c (build_base_path): Likewise.
1083         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
1084         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
1085         (make_new_vtable): Adjust.
1086         (force_canonical_binfo_r): Delete.
1087         (force_canonical_binfo): Delete.
1088         (mark_primary_virtual_base): Delete.
1089         (dfs_unshared_virtual_bases): Delete.
1090         (mark_primary_bases): Adjust.
1091         (maybe_warn_about_overly_private_class): Adjust.
1092         (dfs_base_derived_from): Delete.
1093         (base_derived_from): Follow the inheritance chain.
1094         (struct find_final_overrider_data): Add vpath member.
1095         (dfs_find_final_overrider): Adjust.
1096         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
1097         (find_final_overrider): Adjust.
1098         (update_vtable_entry_for_fn): Adjust.
1099         (modify_all_vtables): Adjust.
1100         (walk_subobject_offsets): Adjust.
1101         (layout_nonempty_base_or_field): Adjust.
1102         (layout_empty_base): Remove last parameter. Adjust.
1103         (build_base_field): Adjust.
1104         (build_base_fields): Adjust.
1105         (propagate_binfo_offsets): Remove last parameter. Adjust.
1106         (dfs_set_offset_for_unshared_vbases): Delete.
1107         (layout_virtual_bases): Adjust.
1108         (finish_struct_1): Adjust.
1109         (init_class_processing): Don't init access nodes.
1110         (dfs_get_primary_binfo): Delete.
1111         (get_primary_binfo): Adjust.
1112         (dump_class_hierarchy_r): Remove most derived arg, add IGO
1113         parameter. Adjust.
1114         (dump_class_hierarchy): Adjust.
1115         (finish_vtbls): Adjust.
1116         (get_original_base): Delete.
1117         (build_vtt_inits): Adjust.
1118         (dfs_build_secondary_vptr_vtt_inits): Adjust.
1119         (dfs_ctor_vtable_bases_queue_p): Adjust.
1120         (build_ctor_vtbl_group): Adjust.
1121         (dfs_accumulate_vtbl_inits): Adjust.
1122         (build_vtbl_initializer): Adjust.
1123         (build_vbase_offset_vtbl_entries): Adjust.
1124         (add_vcall_offset_vtbl_entries_1): Adjust.
1125         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
1126         (access_*_node): Remove.
1127         (CANONICAL_BINFO): Delete.
1128         (BINFO_UNSHARED_MARKED): Remove.
1129         (BINFO_MARKED): Set LANG_FLAG_0 directly.
1130         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
1131         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
1132         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
1133         Delete.
1134         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
1135         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
1136         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
1137         Delete.
1138         (BINFO_DEPENDENT_BASE_P): New.
1139         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
1140         index.
1141         (markedp, unmarkedp): Adjust.
1142         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
1143         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
1144         find_vbase_instance, binfo_for_vbase): Delete.
1145         (copied_binfo, original_binfo): Declare.
1146         (finish_base_specifier): Add virtual_p arg.
1147         (unshare_base_binfos): Delete.
1148         (copy_base_binfos): Declare.
1149         (reverse_path): Delete.
1150         * cp/decl.c (xref_basetypes): Access and virtuality passed
1151         differently. Don't copy direct base binfos here. Call
1152         copy_base_binfos.
1153         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
1154         (initialize_vtbl_ptrs): Adjust.
1155         (expand_member_init): Adjust.
1156         * cp/parser.c (cp_parser_base_specifier): Adjust.
1157         * cp/pt.c (instantiate_class_template): Adjust.
1158         (get_template_base_recursive): Adjust.
1159         * cp/rtti.c (get_pseudo_ti_init): Adjust.
1160         (get_pseudo_ti_desc): Adjust.
1161         * cp/tree.c (unshare_base_binfos): Rename to ...
1162         (copy_base_binfos): ... here, reimplement.
1163         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
1164         (reverse_path): Remove.
1165         * cp/typeck.c (get_delta_difference): Adjust error messages.
1166         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
1167         * cp/search.c (lookup_base_r): Adjust.
1168         (dynamic_cast_base_recurse): Adjust.
1169         (canonical_binfo): Remove.
1170         (dfs_canonical_queue): Remove.
1171         (dfs_assert_unmarked_p): Remove.
1172         (assert_canonical_unmarked): Remove.
1173         (shared_marked_p, shared_unmarked_p): Remove.
1174         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
1175         (dfs_access_in_type): Adjust.
1176         (access_in_type): Adjust.
1177         (dfs_accessible_queue_p): Adjust.
1178         (dfs_accessible_p): Adjust.
1179         (is_subobject_of_p_1, is_subobject_of_p): Remove.
1180         (struct lookup_field_info): Remove from_dep_base_p field.
1181         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
1182         (lookup_field_r): Remove dependent base code.
1183         (lookup_member): Likewise.
1184         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
1185         (dfs_unmarked_real_bases_queue_p): Remove.
1186         (dfs_marked_real_bases_queue_p): Remove.
1187         (dfs_skip_vbases): Remove.
1188         (dfs_get_pure_virtuals): Adjust.
1189         (markedp, unmarkedp): Adjust.
1190         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
1191         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
1192         (dfs_unmark): Adjust.
1193         (dfs_get_vbase_types):Remove.
1194         (dfs_build_inheritance_graph_order): Remove.
1195         (get_vbase_types): Remove
1196         (dfs_find_vbase_instance): Remove.
1197         (find_vbase_instance): Remove.
1198         (dfs_debug_unmarkedp): Adjust.
1199         (dependent_base_p): Remove.
1200         (dfs_push_type_decls): Adjust.
1201         (dfs_push_decls): Adjust.
1202         (dfs_no_overlap_yet): Adjust.
1203         (copied_binfo): New function.
1204         (original_binfo): New function.
1205         (binfo_for_vbase): Remove.
1207 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
1209         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
1210         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
1211         vectors, for speed.
1213 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
1215         PR c++/9704
1216         * class.c (layout_class_type): In the 3.2 ABI, take into account
1217         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
1219 2003-02-18  Matt Austern <austern@apple.com>
1221         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
1222         nothing for C++.
1223         * cp/decl.c (wrapup_globals_for_namespace): Remove special
1224         handling of global namespace.
1226 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
1228         * cp-tree.h (rid_to_yy): Delete.
1229         (C_RID_YYCODE): Delete.
1230         (finish_file): Delete redundant declaration.
1232 2003-02-18  Jason Merrill  <jason@redhat.com>
1234         PR c++/9623
1235         * decl.c (reshape_init): Don't mess with initializer labels.
1237         PR c++/9485
1238         * parser.c (cp_parser_postfix_expression): Set idk properly for
1239         object->scope::member.
1241 2003-02-18  Ben Elliston  <bje@redhat.com>
1243         PR other/7350
1244         * decl.c (duplicate_decls): Fix typo in comment.
1246 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
1248         PR debug/9717
1249         * class.c (build_base_field): Mark fields for base classes with
1250         DECL_IGNORED_P.
1252 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1254         PR c++/9457
1255         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
1256         CONSTRUCTOR_ELTS only once.
1258 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1260         PR c++/9459
1261         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
1262         (dump_type_suffix): Likewise.
1264 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
1266         * search.c: ANSIfy function declarations and definitions.
1267         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
1268         * call.c (build_method_call, resolve_scoped_fn_name,
1269         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
1270         calls.
1271         * class.c (handle_using_decl): Likewise.
1272         * decl.c (make_typename_type, make_unmound_class_template,
1273         start_decl, compute_array_index_type): Likewise.
1274         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
1275         * init.c (expand_member_init, build_member_call): Likewise.
1276         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
1277         resolve_typename_type): Likewise.
1278         * typeck.c (lookup_destructor, finish_class_member_access_exprm
1279         build_prememfunc_access_expr): Likewise.
1281 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
1283         * decl2.c: Include "timevar.h".
1284         (namespace_ancestor): Time name lookup.
1285         (add_using_namespace): Likewise.
1286         (lookup_using_namespace): Likewise.
1287         (qualified_lookup_using_namespace): Likewise.
1288         (decl_namespace): Likewise.
1289         (lookup_arg_dependent): Likewise.
1290         * lex.c (do_identifier): Likewise.
1291         (do_scoped_id): Likewise.
1292         * pt.c (lookup_template_class): Likewise.
1294 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
1296         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
1298 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1300         * decl.c: Include "timevar.h".
1301         (poplevel): Time name lookup.
1302         (find_binding): Likewise.
1303         (push_namespace): Likewise.
1304         (pop_nested_namespace): Likewise.
1305         (store_bindings): Likewise.
1306         (maybe_push_to_top_level): Likewise.
1307         (pop_from_top_level): Likewise.
1308         (push_local_name): Likewise.
1309         (pushtag): Likewise.
1310         (pushdecl): Likewise.
1311         (pushdecl_with_scope): Likewise.
1312         (pushdecl_namespace_level): Likewise.
1313         (pushdecl_top_level): Likewise.
1314         (pushdecl_class_level): Likewise.
1315         (push_class_level_binding): Likewise.
1316         (push_using_decl): Likewise.
1317         (push_using_directive): Likewise.
1318         (push_overloaded_decl): Likewise.
1319         (lookup_label): Likewise.
1320         (define_label): Likewise.
1321         (lookup_tag): Likewise.
1322         (lookup_tag_reverse): Likewise.
1323         (lookup_namespace_name): Likewise.
1324         (select_decl): Likewise.
1325         (unqualified_namespace_lookup): Likewise.
1326         (lookup_name_real): Likewise.
1327         (lookup_name_current_level): Likewise.
1328         (lookup_type_current_level): Likewise.
1329         (maybe_inject_for_scope_var): Likewise.
1330         (xref_tag): Likewise.
1332         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
1334 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
1336         * decl.c (build_enumerator):  Remove unneeded test.
1338 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
1340         * cp-tree.h (struct lang_type_header): Make all fields unsigned
1341         char.
1343 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
1345         PR c++/7129
1346         * call.c (z_candidate): Add args.
1347         (convert_class_to_reference): Set it.
1348         (implicit_conversion): Tidy.
1349         (add_candidate): Add args parameter.
1350         (add_function_candidate): Adjust call to add_candidate.
1351         (add_conv_candidate): Likewise.
1352         (build_builtin_candidate): Likewise.
1353         (build_user_type_conversion_1): Eliminate wasteful tree_cons
1354         usage.
1355         (build_new_function_call): Likewise.
1356         (build_object_call): Likewise.
1357         (add_candidates): New function.
1358         (build_new_op): Use it.
1359         (covert_like_real): Adjust call to build_over_call.
1360         (build_over_call): Remove args parameter.
1361         * operators.def: Add <?= and >?=.
1363 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
1365         * typeck.c (build_indirect_ref): Don't check flag_volatile.
1367 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1369         PR c++/8849
1370         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
1372 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
1374         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
1375         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
1376         (BINFO_LANG_ELTS): New #define.
1377         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
1379 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
1381         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
1383 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
1385         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
1386         for class types.
1387         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
1388         rather than TYPE_LANG_FLAG_0.
1389         (TYPE_BUILT_IN): Remove.
1390         (TYPE_DEPENDENT_P): New macro.
1391         (TYPE_DEPENDENT_P_VALID): Likewise.
1392         (lang_type_class): Add fields_readonly.
1393         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
1394         * pt.c (dependent_type_p_r): New function, split out from ...
1395         (dependent_type_p): ... here.  Memoize results.
1396         * search.c (dependent_base_p): Use dependent_type_p, not
1397         uses_template_parms.
1398         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
1399         for class types.
1401 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
1403         * call.c (build_field_call): Use build_new_op, not build_opfncall.
1404         (prep_operand): New function.
1405         (build_new_op): Use it.  Remove dead code.
1406         * class.c (pushclass): Change "modify" parameter type from int to
1407         bool.
1408         (currently_open_class): Use same_type_p, not pointer equality.
1409         (push_nested_class): Adjust calls to pushclass, remove modify
1410         parameter.
1411         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
1412         (pushclass): Change prototype.
1413         (push_nested_class): Likewise.
1414         (grokoptypename): Remove.
1415         (build_opfncall): Remove.
1416         (value_dependent_expression_p): Declare.
1417         (resolve_typename_type): Likewise.
1418         (resolve_typename_type_in_current_instantiation): Likewise.
1419         (enter_scope_of): Remove.
1420         (tsubst): Remove.
1421         (tsubst_expr): Likewise.
1422         (tsubst_copy): Likewise.
1423         (tsubst_copy_and_build): Likewise.
1424         * decl.c (warn_about_implicit_typename_lookup): Remove.
1425         (finish_case_label): Return error_mark_node for erroneous labels.
1426         (start_decl): Adjust calls to push_nested_class.
1427         (grokfndecl): Call push_scope/pop_scope around call to
1428         duplicate_decls.
1429         (grokdeclarator): Do not call tsubst.
1430         (start_function): Adjust calls to push_nested_class.
1431         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
1432         (check_classfn): Use push_scope/pop_scope around type comparisions.
1433         (grokoptypename): Remove.
1434         (push_sscope): Adjust call to push_nested_class.
1435         * error.c (dump_type): Show cv-qualification of typename types.
1436         * init.c (build_member_call): Use build_new_op, not
1437         build_opfncall.
1438         * method.c (build_opfncall): Remove.
1439         * parser.c (cp_parser): Add allow_non_constant_expression_p and
1440         non_constant_expression_p.
1441         (cp_parser_constant_expression): Adjust prototype.
1442         (cp_parser_resolve_typename_type): Remove.
1443         (cp_parser_non_constant_expression): New function.
1444         (cp_parser_non_constant_id_expression): Likewise.
1445         (cp_parser_new): Set allow_non_constant_expression_p and
1446         non_constant_expression_p.
1447         (cp_parser_primary_expression): Reject `this' and `va_arg' in
1448         constant-expressions.  Note that dependent names aren't really
1449         constant.
1450         (cp_parser_postfix_expression): Reject conversions to non-integral
1451         types in constant-expressions.  Neither are increments or
1452         decrements.
1453         (cp_parser_unary_expression): Reject increments and decrements in
1454         constant-expressions.
1455         (cp_parser_direct_new_declarator): Adjust call to
1456         cp_parser_constant_expression.
1457         (cp_parser_cast_expression): Reject conversions to non-integral
1458         types in constant-expressions.
1459         (cp_parser_assignment_expression): Rejects assignments in
1460         constant-expressions.
1461         (cp_parser_expression): Reject commas in constant-expressions.
1462         (cp_parser_labeled_statement): Adjust call to
1463         cp_parser_constant_expression.
1464         (cp_parser_direct_declarator): Simplify array bounds, even in
1465         templates, when they are non-dependent.  Use
1466         resolve_typename_type, not cp_parser_resolve_typename_type.
1467         (cp_parser_class_head): Use resolve_typename_type, not
1468         cp_parser_resolve_typename_type.
1469         (cp_parser_member_declaration): Adjust call to
1470         cp_parser_constant_expression.
1471         (cp_parser_constant_initializer): Likewise.
1472         (cp_parser_constructor_declarator): Use resolve_typename_type, not
1473         cp_parser_resolve_typename_type.
1474         (cp_parser_late_parsing_default_args): Adjust call to
1475         push_nested_class.
1476         * pt.c (tsubst): Give it internal linkage.
1477         (tsubst_expr): Likewise.
1478         (tsubst_copy): Likewise.
1479         (tsubst_copy_and_build): Likewise.
1480         (push_access_scope_real): Likewise.
1481         (tsubst_friend_class): Likewise.
1482         (instantiate_class_template): Adjust call to pushclass.
1483         (value_dependent_expression_p): Give it external linkage.
1484         Robustify.
1485         (resolve_typename_type): New function.
1486         * semantics.c (finish_call_expr): Use build_new_op, not
1487         build_opfncall.
1488         (begin_constructor_declarator): Remove.
1489         (begin_class_definition): Adjust call to pushclass.
1490         (enter_scope_of): Remove.
1491         * typeck.c (comptypes): Resolve typename types as appropriate.
1492         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1493         (build_x_compound_expr): Likewise.
1494         (build_modify_expr): Likewise.
1495         (build_x_modify_expr): Likewise.
1496         * typeck2.c (build_x_arrow): Likewise.
1498 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
1500         * pt.c (last_pending_template) Declare GTY().
1502 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1504         PR c++/8591
1505         * parser.c (cp_parser_elaborated_type_specifier): Convert
1506         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1507         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1509 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
1511         PR c++/9437
1512         * pt.c (unify): Don't unify '*T' with 'U C::*'.
1514         PR c++/3902
1515         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1516         inside a declarator.
1518 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
1520         * class.c (update_vtable_entry_for_fn): Add index parameter.
1521         Generate vcall thunk for covariant overriding from a virtual
1522         primary base.
1523         (dfs_modify_vtables): Adjust.
1525 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
1527         PR c++/9403
1528         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1529         template keyword.
1530         (cp_parser_base_specifier): Look for and consume a
1531         TEMPLATE keyword. Replace switch with array index.
1533         PR c++/795
1534         * semantics.c (finish_non_static_data_member): Remember the
1535         field's type even in a template.
1537         PR c++/9415
1538         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1539         already scoped.
1541         PR c++/8545
1542         * parser.c (cp_parser_cast_expression): Be more tentative.
1544 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1546         * cp-tree.h (flagged_type_tree_s): Remove.
1547         (check_for_new_type): Likewise.
1548         * typeck2.c (check_for_new_type): Likewise.
1550 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1552         * dump.c: ANSIfy function declarations and definitions.
1554         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
1556 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1558         PR c++/9354
1559         * init.c (build_new): Set the type of the new-expression, even
1560         when processing_templte_decl.
1562         PR c++/9216
1563         * parser.c (cp_parser_primary_expression): Improve error message
1564         for templates used in an expression context.
1566         PR c++/8696
1567         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1568         parse when encountering "typedef".
1570 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
1572         * class.c, parser.c: ANSIfy function definitions and declarations.
1574 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1576         PR c++/9328
1577         * error.c (dump_decl): For an OVERLOAD, just print the name of the
1578         function; it doesn't make sense to try to print its type.
1579         * semantics.c (finish_typeof): Issue errors about invalid uses.
1581         PR c++/9298
1582         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1583         function.
1584         (cp_parser_expression_statement): Use it.
1585         (cp_parser_explicit_instantiation): Likewise.
1586         * pt.c (do_decl_instantiation): Improve error handling logic.
1588 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1590         PR c++/9384
1591         * parser.c (cp_parser_using_declaration): Issue error messages
1592         about name resolution failures here.
1594         PR c++/9388
1595         * class.c (currently_open_derived_class): Use dependent_type_p.
1596         * cp-tree.h (dependent_type_p): New function.
1597         (dependent_template_arg_p): Likewise.
1598         (dependent_template_p): Likewise.
1599         (type_dependent_expression_p): Likewise.
1600         * parser.c (cp_parser_dependent_type_p): Remove.
1601         (cp_parser_value_dependent_type_p): Likewise.
1602         (cp_parser_type_dependent_expression_p): Likewise.
1603         (cp_parser_dependent_template_arg_p): Likewise.
1604         (cp_parser_dependent_template_id_p): Likewise.
1605         (cp_parser_dependent_template_p): Likewise.
1606         (cp_parser_diagnose_invalid_type_name): Replace
1607         cp_parser_dependent_type_p with dependent_type_p, etc.
1608         (cp_parser_primary_expresion): Likewise.
1609         (cp_parser_nested_name_specifier_opt): Likewise.
1610         (cp_parser_postfix_expression): Likewise.
1611         (cp_parser_unary_expression): Likewise.
1612         (cp_parser_template_name): Likewise.
1613         (cp_parser_class_name): Likewise.
1614         (cp_parser_lookup_name): Likewise.
1615         * pt.c (dependent_type_p): New function.
1616         (value_dependent_expression_p): Likewise.
1617         (type_dependent_expression_p): Likewise.
1618         (dependent_template_arg_p): Likewise.
1619         (dependent_template_id_p): Likewise.
1620         (dependent_template_p): Likewise.
1622         PR c++/9285
1623         PR c++/9294
1624         * parser.c (cp_parser_simple_declaration): Return quickly when
1625         encountering errors.
1627 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1629         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1631 2003-01-17  Jason Merrill  <jason@redhat.com>
1633         PR c++/9167, c++/9358
1634         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1636 2003-01-17  Jason Merrill  <jason@redhat.com>
1638         PR c++/9342
1639         * call.c (build_conditional_expr): Always do lvalue-rvalue
1640         conversion.
1642 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
1644         PR c++/9294
1645         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1646         * cp-tree.h (BASELINK_BINFO): Adjust.
1647         (BASELINK_FUNCTIONS): Likewise.
1648         (BASELINK_ACCESS_BINFO): Likewise.
1649         (tree_baselink): New structure.
1650         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1651         (lang_tree_node): Add baselink.
1652         * decl.c (cp_tree_node_structure): Add BASELINK case.
1653         * search.c (build_baselink): Adjust.
1654         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1655         test from TREE_LIST case.
1657         PR c++/9272
1658         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1659         that a constructor cannot be declared outside of its own class.
1661         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1662         be resolved, neither can the qualified name.
1664         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1666 2003-01-16  Jason Merrill  <jason@redhat.com>
1668         PR c++/8564
1669         * init.c (build_vec_init): Re-add maxindex parm.
1670         (perform_member_init, build_aggr_init): Pass it.
1671         (build_new_1): Pass it. Use an incomplete array type for full_type.
1672         * typeck.c (build_modify_expr): Pass it.
1673         * cp-tree.h: Adjust.
1675 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1677         * cp-tree.h (tsubst_copy_and_build): New declaration.
1678         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1679         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1680         (tsubst_copy_and_build): New function.
1682 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1684         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1685         (PARTIAL_INSTANTIATION_P): Remove.
1686         (IMPLICIT_TYPENAME_P): Likewise.
1687         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1688         (build_typename_type): Remove declaration.
1689         (parmlist_is_exprlist): Likewise.
1690         * decl.c (build_typename_type): Make it static, remove third
1691         parameter.
1692         (push_class_binding): Don't do implicit typename stuff.
1693         (make_typename_type): Likewise.
1694         (lookup_name_real): Likewise.
1695         (grokdeclarator): Don't try to convert declarations into
1696         initializations.  Don't do implicit typename stuff.
1697         (parmlist_is_exprlist): Remove.
1698         (xref_basetypes): Simplify.
1699         * decl2.c (grokfield): Don't try to convert declarations into
1700         initializations.
1701         (build_anon_union_vars): Do this while processing templates, too.
1702         (finish_anon_union): Likewise.
1703         * error.c (dump_type): Remove implicit typename handling.
1704         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1705         (cp_parser_primary_expression): Correct handling of names not
1706         found by unqualified name lookup in templates.
1707         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1708         of types when possible.
1709         (cp_parser_simple_declaration): Complain intelligently about some
1710         invalid declarations.
1711         (cp_parser_member_declaration): Likewise.
1712         (cp_parser_constructor_declarator_p): Don't check when we're in a
1713         function scope.
1714         * pt.c (instantiate_class_template): Remove
1715         PARTIAL_INSTANTIATION_P gunk.
1716         * search.c (lookup_field_r): Don't build implicit typenames.
1717         (marked_pushdecls_p): Don't enter dependent base types.
1718         (unmarked_pushdecls_p): Likewise.
1719         * semantics.c (begin_class_definition): Remove implicit typename
1720         stuff.
1722 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1724         PR c++/9212
1725         * parser.c (cp_parser_direct_declarator): If accepting either
1726         abstract or named, the name must be an unqualified-id.
1728 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1730         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1732 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1734         * decl2.c (check_classfn): Fix uninitialized warning.
1735         (build_anon_union_vars): Likewise.
1736         * pt.c (tsubst_copy): Likewise.
1738 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1740         Further conform g++'s __vmi_class_type_info to the C++ ABI
1741         specification.
1742         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1743         the specification.
1744         (class_hint_flags): Likewise.
1746 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1748         * config-lang.in: Add semantics.c to gtfiles.
1749         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1750         (saved_scope): Likewise.
1751         (type_lookups): Remove.
1752         (deferred_access): New structure.
1753         (type_access_control): Remove.
1754         (save_type_access_control): Likewise.
1755         (reset_type_access_control): Likewise.
1756         (decl_type_access_control): Likewise.
1757         (push_deferring_access_checks): Declare.
1758         (resume_deferring_access_checks): Likewise.
1759         (stop_deferring_access_checks): Likewise.
1760         (pop_deferring_access_checks): Likewise.
1761         (get_deferred_access_checks): Likewise.
1762         (pop_to_parent_deferring_access_checks): Likewise.
1763         (perform_deferred_access_checks): Likewise.
1764         (perform_or_defer_access_check): Likewise.
1765         * decl.c (make_typename_type): Use perform_or_defer_access_check.
1766         (make_unbound_class_template): Likewise.
1767         (grokdeclarator): Don't call decl_type_access_control.
1768         * parser.c (cp_parser_context): Remove deferred_access_checks
1769         and deferring_access_checks_p fields.
1770         (cp_parser_context_new): Adjust.
1771         (cp_parser): Remove access_checks_lists.
1772         (cp_parser_defer_access_check): Remove.
1773         (cp_parser_start_deferring_access_checks): Remove.
1774         (cp_parser_stop_deferring_access_checks): Remove.
1775         (cp_parser_perform_deferred_access_checks): Remove.
1776         (cp_parser_nested_name_specifier_opt): Use new deferred access
1777         functions.
1778         (cp_parser_simple_declaration): Likewise.
1779         (cp_parser_template_id): Likewise.
1780         (cp_parser_function_definition): Likewise.
1781         (cp_parser_class_specifier): Likewise.
1782         (cp_parser_lookup_name): Likewise.
1783         (cp_parser_single_declaration): Likewise.
1784         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1785         (cp_parser_parse_tentatively): Likewise.
1786         (cp_parser_parse_definitely): Likewise.
1787         (yyparse): Likewise.
1788         (cp_parser_init_declarator): Remove access_checks parameter.
1789         Use new deferred access functions.
1790         (cp_parser_function_definition_from_specifiers_and_declarator):
1791         Likewise.
1792         (cp_parser_class_head): Remove deferring_access_checks_p and
1793         saved_access_checks parameters.  Use new deferred access functions.
1794         (cp_parser_member_specification_opt): Don't call
1795         reset_type_access_control.
1796         * search.c (type_access_control): Remove.
1797         * semantics.c: Include "gt-cp-semantics.h".
1798         (deferred_type_access_control): Remove.
1799         (deferred_access_stack): New variable.
1800         (deferred_access_free_list): Likewise.
1801         (push_deferring_access_checks): New function.
1802         (resume_deferring_access_checks): Likewise.
1803         (stop_deferring_access_checks): Likewise.
1804         (pop_deferring_access_checks): Likewise.
1805         (get_deferred_access_checks): Likewise.
1806         (pop_to_parent_deferring_access_checks): Likewise.
1807         (perform_deferred_access_checks): New function, adapted from
1808         cp_parser_perform_deferred_access_checks.
1809         (perform_or_defer_access_check): New function, adapted from
1810         cp_parser_defer_access_check.
1811         (current_type_lookups): Remove.
1812         (deferred_type_access_control): Likewise.
1813         (decl_type_access_control): Likewise.
1814         (save_type_access_control): Likewise.
1815         (reset_type_access_control): Likewise.
1816         (begin_function_definition): Adjust.
1817         (begin_class_definiton): Likewise.
1819 2003-01-13  Jason Merrill  <jason@redhat.com>
1821         PR c++/8748
1822         * class.c (build_base_path): Take the address before calling save_expr.
1824         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1825         all the ambiguous conversions are bad.
1827         * class.c (maybe_warn_about_overly_private_class): Don't stop
1828         searching when we find a nonprivate method.
1830         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1832 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
1834         * cp-tree.h (get_arglist_len_in_bytes): Remove.
1836         PR c++/9264
1837         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1838         typeame types more robustly.
1840 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
1842         * parser.c:  Fix comment typos.
1844 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1846         PR c++/9099
1847         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1848         an object_type which is not a class type.
1850 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
1852         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1853         (cp_parser_late_parsing_default_args): Likewise.
1855 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
1857         * cfns.gperf: ANSIfy function declarations.
1858         * cfns.h: Regenerate.
1859         * cp-tree.h: ANSIfy function declarations.
1861 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1863         * cp-tree.h (reparse_absdcl_as_expr): Remove.
1864         (reparse_absdcl_as_casts): Likewise.
1865         (reparse_decl_as_expr): Likewise.
1866         (finish_decl_parsing): Likewise.
1867         * decl2.c (reparse_absdcl_as_expr): Remove.
1868         (reparse_absdcl_as_casts): Likewise.
1869         (repase_decl_as_expr): Likewise.
1870         (finish_decl_parsing): Likewise.
1872         PR c++/9128
1873         PR c++/9153
1874         PR c++/9171
1875         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
1876         function.
1877         (cp_parser_nested_name_specifier_opt): Correct the
1878         check_dependency_p false.
1879         (cp_parser_postfix_expression): Fix formatting.
1880         (cp_parser_decl_specifier_seq): Avoid looking for constructor
1881         declarators when possible.
1882         (cp_parser_template_id): Avoid performing name-lookup when
1883         possible.
1884         (cp_parser_class_head): Do not count specializations when counting
1885         levels of templates.
1886         (cp_parser_constructor_declarator_p): Return immediately if
1887         there's no chance that the tokens form a constructor declarator.
1888         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
1889         expression with reference type.
1890         (get_tinfo_decl_dynamic): Do not return an expression with
1891         reference type.
1892         (build_typeid): Add comment.  Do not return an expression with
1893         reference type.
1894         * typeck.c (build_class_member_access_expr): Improve handling of
1895         conditionals and comma-expressions as objects.
1897 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1899         * cfns.gperf: ANSIfy function declarations.
1900         * cfns.h: Regenerate.
1901         * cp-tree.h: ANSIfy function declarations.
1902         * parser.c: ANSIfy function declarations & definitions.
1904         * decl.c (bad_specifiers): Fix parameter order error I introduced.
1906 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1908         Merge from pch-branch:
1910         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1912         Merge to tag pch-merge-20030102:
1914         * semantics.c (finish_translation_unit): Don't call finish_file.
1915         * parser.c: Don't include ggc.h.
1916         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
1917         read first token here.  Don't allow PCH files after the first
1918         token is read.
1919         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
1920         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
1921         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
1922         (cp_parser_late_parsing_for_member): Don't duplicate call to
1923         cp_lexer_set_source_position_from_token.
1924         (cp_parser_late_parsing_default_args): Likewise.
1925         (yyparse): Call finish_file after clearing the_parser.
1927         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
1929         * Make-lang.in: Remove $(GGC_H) from all dependencies.
1930         (CXX_TREE_H): Add $(GGC_H).
1931         * class.c: Don't include ggc.h.
1932         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
1933         (method_name_cmp): Likewise.
1934         (resort_data): New variable.
1935         (resort_field_decl_cmp): New.
1936         (resort_method_name_cmp): New.
1937         (resort_sorted_fields): New.
1938         (resort_type_method_vec): New.
1939         (finish_struct_methods): Delete cast.
1940         (finish_struct_1): Delete cast.
1941         * cp-tree.h: Include ggc.h.
1942         (struct lang_type_class): Add reorder attribute to field `methods'.
1943         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
1944         (resort_sorted_fields): New prototype.
1945         (resort_type_method_vec): New prototype.
1946         * call.c: Don't include ggc.h.
1947         * decl.c: Likewise.
1948         * decl2.c: Likewise.
1949         * init.c: Likewise.
1950         * lex.c: Likewise.
1951         * method.c: Likewise.
1952         * optimize.c: Likewise.
1953         * parse.y: Likewise.
1954         * pt.c: Likewise.
1955         * repo.c: Likewise.
1956         * search.c: Likewise.
1957         * semantics.c: Likewise.
1958         * spew.c: Likewise.
1959         * tree.c: Likewise.
1961         * lang-specs.h: Remove comment.
1963         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
1965         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
1966         (operator_name_info): Mark to be saved for PCH, specify size.
1967         (assignment_operator_name_info): Likewise.
1969         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
1971         * decl.c (anon_cnt): Mark to be saved for PCH.
1973         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
1975         * lex.c  (init_reswords): Delete now-untrue comment.
1976         Allocate ridpointers using GGC.
1978         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
1980         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
1982         * g++spec.c (lang_specific_driver): Don't include standard
1983         libraries in `added'.
1985         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
1987         * decl2.c (finish_file): Call c_common_write_pch.
1988         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
1990         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
1992         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
1993         files when using g++.
1994         * lang-specs.h: Handle compiling C++ header files.
1996 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1998         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
2000 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2002         * pt.c (push_access_scope_real): Call push_to_top_level for
2003         function in namespace scope.
2004         (pop_access_scope): Call pop_from_top_level for function in
2005         namespace scope.
2007 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
2009         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
2011 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
2013         * Make-lang.in (c++.install-common, c++.install-man,
2014         c++.uninstall): Prepend $(DESTDIR) to destination paths in
2015         all (un)installation commands.
2016         (c++.install-common): Rewrite $(LN) commands to support
2017         DESTDIR with "ln" as well as with "ln -s".
2019 2003-01-08  Jason Merrill  <jason@redhat.com>
2021         * parser.c (cp_parser_primary_expression): See through explicitly
2022         scoped ALIAS_DECLs, too.
2024 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
2026         * decl.c: Remove some #if 0 code.
2028         * decl.c: ANSIfy function declarations.
2030 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
2032         * parser.c (cp_parser_asm_definition): Correct handling of omitted
2033         operands.
2035 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2037         PR c++/9030
2038         * decl.c (make_typename_type): Check access only when tf_error.
2039         (make_unbound_class_template): Likewise.
2040         * pt.c (saved_access_scope): New variable.
2041         (push_access_scope_real): New function.
2042         (push_access_scope): Likewise.
2043         (pop_access_scope): Likewise.
2044         (tsubst_default_argument): Use them.
2045         (instantiate_template): Likewise.
2046         (regenerate_decl_from_template): Likewise.
2047         (instantiate_decl): Likewise.
2048         (get_mostly_instantiated_function_type): Likewise.
2050 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
2052         * tree.c: Delete bogus #if 0 code.
2054 2003-01-07  Andreas Schwab  <schwab@suse.de>
2056         * class.c (layout_class_type): Don't use
2057         PCC_BITFIELD_TYPE_MATTERS if not defined.
2059 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
2061         PR c++/9165
2062         * decl2.c (build_cleanup): Mark the object as used.
2064         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
2065         (hash_local_specialization): New function.
2066         (register_local_specialization): Revert 2003-01-05 change.
2067         (instantiate_decl): Use hash_local_specialization when creating
2068         the local_specializations table.
2070         * decl2.c (mark_used): Do not synthesize thunks.
2072         * class.c (layout_class_type): Correct handling of unnamed
2073         bitfields wider than their types.
2075         PR c++/9189
2076         * parser.c (cp_parser): Remove default_arg_types.  Update
2077         documentation for unparsed_functions_queues.
2078         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
2079         parameter.
2080         (cp_parser_new): Don't set parser->default_arg_types.
2081         (cp_parser_function_definition): Adjust usage of
2082         unparsed_funtions_queues.
2083         (cp_parser_class_specifier): Don't mess with
2084         parser->default_arg_types.  Handle default argument processing in
2085         a separate phase from function body processing.
2086         (cp_parser_template_declaration_after_export): Adjust usage of
2087         unparsed_functions_queues.
2088         (cp_parser_late_parsing_for_member): Do not handle default
2089         arguments.
2091 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
2093         PR c++/9109
2094         * parser.c (cp_parser_declarator_kind): New enum.
2095         (cp_parser_declarator): Adjust.
2096         (cp_parser_direct_declarator): Adjust. Allow for either named or
2097         abstract declarator. Prefer abstract, if possible. Allow
2098         parenthesized function name.
2099         (cp_parser_condition): Adjust cp_parser_declarator call.
2100         (cp_parser_explicit_instantiation): Likewise.
2101         (cp_parser_init_declarator): Likewise.
2102         (cp_parser_type_id): Likewise.
2103         (cp_parser_function_definition): Likewise.
2104         (cp_parser_member_declaration): Likewise.
2105         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
2106         the tentative parsing.
2107         (cp_parser_exception_declaration): Likewise.
2109 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
2111         * parser.c (cp_parser_template_parameter): Adjust call to
2112         cp_parser_parameter_declaration.
2113         (cp_parser_parameter_declaration_list): Likewise.
2114         (cp_parser_parameter_declaration): Replace
2115         greater_than_is_operator_p with template_parm_p parameter.  Do not
2116         cache tokens for template default arguments.
2118         * pt.c (retrieve_local_specialization): Use htab_find, not
2119         htab_find_with_hash.
2120         (register_local_specialization): Use htab_find_slot, not
2121         htab_find_slot_with_hash.
2122         (instantiate_decl): Pass a hash function to htab_create.
2124 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2126         * parser.c (cp_parser_binary_expression,
2127         cp_parser_multiplicative_expression,
2128         cp_parser_additive_expression, cp_parser_shift_expression,
2129         cp_parser_relational_expression, cp_parser_equality_expression,
2130         cp_parser_and_expression, cp_parser_exclusive_or_expression,
2131         cp_parser_inclusive_or_expression,
2132         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
2133         cp_parser_binary_expression): Const-ify.
2135 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
2137         * method.c (use_thunk): Disable access control while building the
2138         body of the thunk.
2140 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
2142         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
2143         front end.
2145 2003-01-03  Matt Austern  <austern@apple.com>
2147         * cp-tree.h (struct lang_type_class): add field for key method
2148         (cp_global_trees): rename dynamic_classes to keyed_classes
2149         (key_method): add definition
2150         * class.c (finish_struct_1): compute class's key method, and add
2151         the class to keyed_classes list if there is no key method.
2152         * decl.c (finish_function): add class to keyed_classes list if we
2153         see a definition of the class's key method.
2154         * pt.c (instantiate_class_template): add template specialization
2155         of a dynamic class to keyed_classes list.
2156         * decl2.c (key_method): remove
2157         (finish_file): iterate only through keyed_classes list when
2158         deciding whether to emit vtables, remove class from its list after
2159         we do the emission.
2161 2003-01-02  Jason Merrill  <jason@redhat.com>
2163         * call.c (build_conditional_expr): Stabilize lvalues properly.
2164         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
2165         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
2166         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
2168         * call.c (convert_like_real): Call decl_constant_value for an
2169         IDENTITY_CONV even if there are no more conversions.
2171         * cvt.c (build_up_reference): Don't push unnamed temps.
2173         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
2175         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
2176         for a backend struct.
2178         * except.c (wrap_cleanups_r, build_throw): Make
2179         MUST_NOT_THROW_EXPRs void.
2180         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
2182         * init.c (build_vec_delete_1): Pre-evaluate the base address.
2184         * init.c (get_temp_regvar): Simplify logic.
2186         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
2187         our replacement is a decl.
2189         * decl.c (cp_make_fname_decl): Push the decls inside the
2190         outermost scope.
2192 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
2194         PR c++/45, c++/3784
2195         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
2196         the same too.
2198 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
2200         * parser.c (struct cp_parser): Add access_checks_lists field
2201         (cp_parser_simple_declaration): Use.
2202         (cp_parser_init_declarator): Likewise.
2204 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2206         * parser.c (cp_parser_declaration): Accept the __extension__
2207         keyword before the declaration.
2209         PR c++/2843
2210         * parser.c (cp_parser_parameter_declaration): Allow attributes to
2211         appear after the declarator.
2213         * call.c (build_new_method_call): Fix typo in message format
2214         string.
2216 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
2218         * parser.c (cp_lexer_next_token_is): Declare it inline.
2219         (cp_lexer_set_source_position_from_token): Likewise.
2220         (cp_lexer_debugging_p): Likewise.
2221         (cp_parser_parsing_tentatively): Likewise.
2222         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
2223         to the cp_lexer_peek_token.
2225         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
2226         expression.
2228 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
2230         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
2231         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
2232         cp/repo.c: Fix copyright years.
2234 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
2236         * lex.c: Remove superfluous include of cpplib.h.
2237         (CONSTRAINT): Define without conditions.
2238         (init_cp_pragma): Use c_register_pragma.
2240 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2242         * .cvsignore: Remove.
2244 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
2246         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
2247           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
2248           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
2249           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
2250           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
2251           copyright header.
2252         * lex.h: parse.y is dead, so don't mention it.  Also replace the
2253           copyright header with the default GNU copyright header.
2255 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2257         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
2258         (lookup_name_namespace_only): Likewise.
2259         (begin_only_namespace_names): Likewise.
2260         (end_only_namespace_names): Likewise.
2261         * decl.c (only_namespace_names): Remove.
2262         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
2263         (lookup_name_real): Do not check only_namespace_names.
2264         (lookup_name_namespace_only): Remove.
2265         (begin_only_namespace_names): Likewise.
2266         (end_only_namespace_names): Likewise.
2267         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
2268         nested-name-specifiers more gracefully.
2269         (cp_parser_class_or_namespace_name): Avoid looking up namespace
2270         names when they cannot possibly appear.
2271         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
2272         (cp_parser_elaborated_type_specifier): Likewise.
2273         (cp_parser_namespace_name): Only look for namespace names.
2274         (cp_parser_lookup_name): Add is_namespace parameter.
2275         (cp_parser_lookup_name_simple): Adjust call to
2276         cp_parser_lookup_name.
2278         * parser.c (cp_parser_dependent_type_p): Fix thinko.
2280 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
2282         * .cvsignore: Update.
2284 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
2286         * class.c (modify_vtable_entry): Remove unused variable.
2287         (get_vcall_index): Always expect a non-thunk.
2288         (update_vtable_entry_for_fn): Combine covariant adjustments, when
2289         overriding a thunk. Pass get_vcall_index a non-thunk.
2291         * decl2.c (finish_file): Mark undefined inlines as extern.
2293 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2295         * cp-tree.def (RETURN_INIT): Remove.
2296         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
2297         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
2298         (note_level_for_for): Remove.
2299         (note_level_for_try): Likewise.
2300         (note_level_for_catch): Likewise.
2301         (finish_named_return_value): Likewise.
2302         (do_pushlevel): Change prototype.
2303         (pending_lang_change): Remove.
2304         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
2305         sk_for.
2306         (note_level_for_for): Remove.
2307         (note_level_for_try): Likewise.
2308         (note_level_for_catch): Likewise.
2309         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
2310         * parser.c (cp_parser_context_free_list): Make it "deletable".
2311         (cp_parser_template_argument): Remove misleading comment.
2312         * pt.c (tsubst_expr): Remove RETURN_INIT code.
2313         * semantics.c (genrtl_named_return_value): Remove.
2314         (do_pushlevel): Take a scope kind as an argument.
2315         (begin_if_stmt): Adjust.
2316         (begin_while_stmt): Likewise.
2317         (begin_for_stmt): Likewise.
2318         (finish_for_init_stmt): Likewise.
2319         (begin_switch_stmt): Likewise.
2320         (begin_handler): Likewise.
2321         (begin_compound_stmt): Likewise.
2322         (finish_named_return_value): Remove.
2323         (cp_expand_stmt): Remove RETURN_INIT case.
2324         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
2326 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
2328         PR c++/9112
2329         * parser.c (cp_parser_direct_declarator): Handle erroneous
2330         parenthesized declarators correctly.
2332 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2334         * cp-tree.h (pending_lang_change): Declare.
2336 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2338         * parser.c (cp_parser_context_free_list): New variable.
2339         (cp_parser_context_new): Use it.
2340         (cp_parser_error): Check return code from
2341         cp_parser_simulate_error.
2342         (cp_parser_simulate_error): Return a value.
2343         (cp_parser_id_expression): Optimize common case.
2344         (cp_parser_class_name): Likewise.
2345         (cp_parser_class_specifier): Adjust call to
2346         cp_parser_late_parsing_default_args.
2347         (cp_parser_lookup_name): Optimize common case.
2348         (cp_parser_late_parsing_for_member): Adjust call to
2349         cp_parser_late_parsing_default_args.
2350         (cp_parser_late_parsing_default_args): Add scope parameter.
2351         (cp_parser_require): Avoid creating the error message unless it's
2352         needed.
2353         (cp_parser_parse_definitely): Place free'd contexts on the free
2354         list.
2356         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
2358 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
2360         * parser.c (cp_parser_parameter_declaration_clause): Treat system
2361         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
2363 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2365         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
2366         GCC, not GNU CC.
2368 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
2370         * parse.y: Remove.
2371         * spew.c: Likewise.
2372         * Make-lang.in (gt-cp-spew.h): Remove.
2373         * cp-tree.h (do_pending_lang_change): Remove.
2374         (do_identifier): Change prototype.
2375         (finish_id_expr): Remove.
2376         * decl.c (lookup_name_real): Remove yylex variable.
2377         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
2378         * lex.c (init_cpp_parse): Remove.
2379         (reduce_cmp): Likewise.
2380         (token_cmp): Likewise.
2381         (yychar): Likewise.
2382         (lastiddecl): Likewise.
2383         (token_count): Likewise.
2384         (reduce_count): Likewise.
2385         (yyhook): Likewise.
2386         (print_parse_statistics): Likewise.
2387         (do_pending_lang_change): Likewise.
2388         (do_identifier): Remove parsing parameter.
2389         * lex.h (lastiddecl): Remove.
2390         (looking_for_typename): Remove.
2391         (looking_for_template): Likewise.
2392         (pending_lang_change): Likewise.
2393         (yylex): Likewise.
2394         * semantics.c (finish_id_expr): Remove.
2396         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
2397         thread" correctly.
2399 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
2401         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
2402         end, not the C front end.
2404 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
2406         * cp-tree.h (THUNK_TARGET): New macro.
2407         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
2408         (finish_thunk): Remove offset parms.
2409         * class.c (find_final_overrider): Look through thunks.
2410         (get_vcall_index): Use THUNK_TARGET.
2411         (update_vtable_entry_for_fn): Look through thunks. Set covariant
2412         fixed offset here. Adjust finish_thunk call.
2413         (build_vtbl_initializer): Adjust finish_thunk calls.
2414         * mangle.c (mangle_call_offset): Remove superfluous if.
2415         (mangle_thunk): Adjust.
2416         * method.c (make_thunk): Adjust.
2417         (finish_thunk): Adjust.
2418         (thunk_adjust): Remove assert.
2419         (use_thunk): Use THUNK_TARGET
2420         * dump1.c (cp_dump_tree): Adjust thunk dumping.
2422         PR c++/9054
2423         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
2424         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
2426 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2428         Remove traditional C constructs 4/n.
2429         * decl2.c (grok_method_quals, warn_if_unknown_interface,
2430         grok_x_components, cp_build_parm_decl, build_artificial_parm,
2431         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
2432         delete_sanity, check_member_template, check_java_method,
2433         check_classfn, finish_static_data_member_decl, grokfield,
2434         grokbitfield, grokoptypename, grok_function_init,
2435         cplus_decl_attributes, constructor_name, defer_fn,
2436         build_anon_union_vars, finish_anon_union, coerce_new_type,
2437         coerce_delete_type, comdat_linkage, maybe_make_one_only,
2438         key_method, import_export_vtable, import_export_class,
2439         output_vtable_inherit, import_export_decl, import_export_tinfo,
2440         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
2441         set_guard, start_objects, finish_objects,
2442         start_static_storage_duration_function,
2443         finish_static_storage_duration_function, get_priority_info,
2444         start_static_initialization_or_destruction,
2445         finish_static_initialization_or_destruction,
2446         do_static_initialization, do_static_destruction,
2447         prune_vars_needing_no_initialization, write_out_vars,
2448         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
2449         add_using_namespace, merge_functions, ambiguous_decl,
2450         lookup_using_namespace, lookup_using_namespace,
2451         qualified_lookup_using_namespace, set_decl_namespace,
2452         decl_namespace, current_decl_namespace, push_decl_namespace,
2453         pop_decl_namespace, push_scope, pop_scope, add_function,
2454         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
2455         lookup_arg_dependent, do_namespace_alias,
2456         validate_nonmember_using_decl, do_nonmember_using_decl,
2457         do_toplevel_using_decl, do_local_using_decl,
2458         do_class_using_decl, do_using_directive, check_default_args,
2459         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
2460         * parser.c (cp_parser_class_head): Use booleanss.
2461         * decl.c (walk_globals, walk_vtables): Likewise.
2462         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
2463         walk_globals): Change return type from 'int' to 'bool'.
2464         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
2465         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
2466         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
2467         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
2468         qualifier_flags, tinfo_base_init, generic_initializer,
2469         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
2470         dfs_class_hint_unmark, class_hint_flags, class_initializer,
2471         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2472         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2473         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2474         * repo.c (repo_compile_flags, repo_template_declared,
2475         repo_template_defined, repo_class_defined, repo_get_id,
2476         repo_template_used, repo_vtable_used, repo_inline_used,
2477         repo_tinfo_used, repo_template_instantiated, extract_string,
2478         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2479         finish_repo): Likewise.
2480         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2481         cxx_print_xnode): Likewise..
2482         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2483         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2484         * cxxfilt.c (demangle_it, print_demangler_list, usage,
2485         standard_symbol_characters, hp_symbol_characters, main, fatal):
2486         Likewise.
2487         (strip_underscore):  Change type from 'int' to 'bool'.
2488         (main): Use boolean constants.
2490 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2492         Remove traditional C constructs 3/n.
2493         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2494         build_up_reference, warn_ref_binding, convert_to_reference,
2495         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2496         convert_to_void, convert, convert_force, build_type_conversion,
2497         build_expr_type_conversion, type_promotes_to,
2498         perform_qualification_conversions): Use C90 prototyping style.
2499         * decl2.c (grok_array_decl): Use boolean constant.
2500         (delete_sanity): Likewise.
2501         * typeck.c (build_unary_op): Likewise.
2502         * semantics.c (finish_switch_cond): Likewise.
2503         * parser.c (cp_parser_direct_new_declarator): Likewise.
2504         * init.c (build_new): Likewise.
2506 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2508         * Make-lang.in (po-generated): Remove parse.c.
2509         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
2510         ($(srcdir)/cp/parse.h): Remove target.
2511         ($(srcdir)/cp/parse.c): Likewise.
2512         (gt-cp-parse.h): Likewise.
2513         (gt-cp-parser.h): New target.
2514         (c++.distclean): Do not remove parse.output.
2515         (c++.maintainer-clean): Do not remove parse.c or parse.h.
2516         (cp/spew.o): Remove target.
2517         (cp/lex.o): Adjust dependencies.
2518         (cp/pt.o): Likewise.
2519         (cp/parse.o): Likewise.
2520         (cp/TAGS): Do not mention parse.c.
2521         (cp/parser.o): New target.
2522         * NEWS: Mention the new parser.
2523         * call.c (build_scoped_method_call): Simplify.
2524         (build_method_call): Likewise.
2525         (build_new_function_call): Adjust calls to add_function_candidate
2526         and add_template_candidate.
2527         (build_new_op): Improve handling of erroroneous operands.
2528         (convert_default_arg): Remove circular argument processing.
2529         (name_as_c_string): New function.
2530         (build_new_method_call): Use it.
2531         (perform_implicit_conversion): Use error_operand_p.
2532         * class.c (finish_struct_anon): Use constructor_name_p.
2533         (check_field_decls): Likewise.
2534         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2535         (resolve_address_of_overloaded_function): Likewise.
2536         (instantiate_type): Tweak pointer-to-member handling.
2537         (get_primary_binfo): Remove incorrect assertion.
2538         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2539         * cp-tree.h (DEFARG_TOKENS): New macro.
2540         (default_arg): New structure.
2541         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2542         (lang_tree_node): Add default_arg.
2543         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2544         (type_info_ref_type): New macro.
2545         (saved_scope): Make processing_explicit_instantiation a boolean.
2546         (check_access): New field.
2547         (unparsed_text): Remove.
2548         (language_function): Remove unparsed_inlines.
2549         (error_operand_p): New macro.
2550         (lang_decl): Adjust pending_inline_info.
2551         (DEFARG_POINTER): Remove.
2552         (tag_types): Add typenames.
2553         (lookup_ualified_name): Declare.
2554         (lookup_name_real): Likewise.
2555         (shadow_tag): Adjust prototype.
2556         (get_scope_of_declarator): Declare it.
2557         (process_next_inline): Remove it.
2558         (check_for_missing_semicolon): Likewise.
2559         (maybe_get_template_decl_from_type_decl): Declare it.
2560         (finish_label_stmt): Adjust prototype.
2561         (finish_non_static_data_meber): Declare it.
2562         (finish_pseudo_destructor_call_expr): Rename to ...
2563         (finish_pseudo_destructor_expr): ... this.
2564         (finish_compound_literal): Declare it.
2565         (begin_inline_definitions): Remove it.
2566         (init_spew): Remove.
2567         (peekyylex): Likewise.
2568         (arbitrate_lookup): Likewise.
2569         (frob_opname): Likewise.
2570         (maybe_snarf_defarg): Likewise.
2571         (add_defarg_fn): Likewise.
2572         (do_pending_defargs): Likewise.
2573         (done_pending_defargs): Likewise.
2574         (unprocessed_defarg_fn): Likewise.
2575         (replace_defarg): Likewise.
2576         (end_input): Likewise.
2577         (get_overloaded_fn): Likewise.
2578         * cvt.c (convert_to_reference): Improve error handling.
2579         * decl.c (lookup_name_real): Do not declare it static.
2580         (maybe_push_to_top_level): Set check_access.
2581         (identifier_type_value): Adjust call to lookup_name_real.
2582         (lookup_qualified_name): New method.
2583         (lookup_name_real): Remove special-case parsing code.
2584         (lookup_name-nonclass): Adjust call to lookup_name_real.
2585         (lookup_name_namespace_only): Likewise.
2586         (lookup_name): Likewise.
2587         (check_tag_decl): Return the type declared.
2588         (shadow_tag): Likewise.
2589         (register_dtor_fn): Tweak check_access.
2590         (grokfndecl): Use constructor_name_p.
2591         (get_scope_of_declarator): New function.
2592         (grokdeclarator): Obscure tweaks for slightly different declarator
2593         representations.
2594         (start_method): Return error_mark_node to indicate failure.
2595         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2596         * decl2.c (constructor_name_full): Simplify.
2597         (constructor_name): Use it.
2598         (build_expr_from_tree): Adjust for changes to do new parser.
2599         (push_scope): Improve robustness.
2600         (validate_nonmember_using_decl): Process declarations, not names.
2601         (do_class_using_decl): Likewise.
2602         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2603         here.
2604         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2605         * expr.c (cxx_expand_expr): Handle BASELINKs.
2606         * init.c (member_init_ok_or_else): Issue more errors.
2607         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2608         * lex.c: Do not include parse.h.
2609         (yypring): Do not declare.
2610         (yylval): Likewise.
2611         (make_reference_declarator): Remove error-generating code.
2612         (rid_to_yy): Remove.
2613         (cxx_init): Do not call init_spew.
2614         (yypring): Remove.
2615         (check_for_missing_semicolon): Remove.
2616         * lex.h (got_scope): Remove.
2617         (got_object): Remove.
2618         * method.c (hack_identifier): Use finish_non_static_data_member.
2619         (implicitly_declare_fn): Adjust use of constructor_name.
2620         * parser.c: New file.
2621         * pt.c (parse.h): Do not include it.
2622         (maybe_get_template_decl_from_template): Do not declare it.
2623         (finish_member_template_decl): Tweak.
2624         (begin_explicit_instantiation): Adjust for
2625         processing_explicit_instantiation being boolean.
2626         (end_explicit_instantiation): Likewise.
2627         (maybe_process_partial_specialization): Tighten specialization
2628         test.
2629         (retrieve_local_specialization): Adjust ue of hash table.
2630         (eq_local_specializations): New function.
2631         (register_local_specialization): Likewise.
2632         (push_template_decl_real): Remove unnecessary test.
2633         (maybe_get_template_decl_from_type_decl): Don't make it static.
2634         (for_each_template_parm_r): Handle TYPEOF_TYPE.
2635         (tsubst_copy): Use retrieive_local_specialization to handle
2636         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
2637         Handle COMPONENT_REFs with pseudo-destructor-expressions.
2638         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2639         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2640         (unify): Tweak handling of CONST_DECLs.
2641         (regenerate_decl_from_template): Use push_nested_class.
2642         (template_for_substitution): New funciton.
2643         (instantiate_decl): Use it.  Register parameters as local
2644         specializations.
2645         * rtti.c (init_rtti_processing): Set type_info_ref_type.
2646         (build_typeid): Use it.
2647         (get_typeid): Likeise.
2648         * search.c (accessible_p): Use check_access, not
2649         flag_access_control.
2650         (adjust_result_of_qualified_name_lookup): Pay attention to the
2651         context_class.
2652         * semantics.c (finish_asm_stmt): Adjust error handling.
2653         (finish_label_stmt): Return the statement.
2654         (finish_non_static_data_member): New function.
2655         (finish_class_expr): Handle BASELINKs.
2656         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2657         (finish_object_call_expr): Simplify handling during templates.
2658         (finish_pseudo_destructor_call_expr): Rename to ...
2659         (finish_pseudo_dtor_expr): ... this.
2660         (finish_compound_literal): New function.
2661         (begin_inline_definitions): Remove.
2662         (finish_sizeof): Remove special template handling.
2663         * spew.c: Do not include parse.h.
2664         * tree.c (get_overloaded_fn): Remove.
2665         * typeck.c (build_class_member_access_expr): Handle
2666         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2667         (lookup_destructor): New function.
2668         (finish_class_member_access_expr): Use it.
2669         (convert_arguments): Simplify.
2670         (build_unary_op): Handle BASELINKs.
2672 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2674         PR c++/4803
2675         * decl2.c (mark_used): Defer inline functions.
2676         (finish_file): Merge deferred_fns loops. Check all used
2677         inline functions have a definition.
2678         * method.c (make_thunk): Thunks are not inline.
2680         PR c++/5116, c++/764
2681         * call.c (build_new_op): Make sure template class operands are
2682         instantiated.
2684 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2686         PR C++/7964
2687         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2688         * call.c (resolve_scoped_fn_name): New function. Deal with
2689         more template expansion. Broken out of ...
2690         * parse.y (parse_finish_call_expr): ... here. Call it.
2691         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2692         resolve_scoped_fn_name and build_call_from_tree.
2694         PR c++/9053
2695         * decl.c (duplicate_decls): Templates may be disambiguated by
2696         return type.
2698         PR c++/8702
2699         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2700         conversion operators on failure.
2702 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2704         Remove traditional C constructs 2/n.
2705         * call.c (tourney, build_field_call, equal_functions, joust,
2706         compare_ics, build_over_call, build_java_interface_fn_ref,
2707         convert_like_real, op_error, build_object_call, resolve_args,
2708         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2709         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2710         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2711         standard_conversion, reference_related_p,
2712         reference_compatible_p, convert_class_to_reference,
2713         direct_reference_binding, reference_binding,
2714         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2715         add_template_conv_candidate, any_viable, any_strictly_viable,
2716         build_this, splice_viable, print_z_candidates,
2717         build_user_type_conversion, build_new_function_call,
2718         conditional_conversion, build_conditional_expr, build_new_op,
2719         build_op_delete_call, enforce_access, call_builtin_trap,
2720         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2721         convert_default_arg, type_passed_as, convert_for_arg_passing,
2722         in_charge_arg_for_name, is_properly_derived_from,
2723         maybe_handle_implicit_object, maybe_handle_ref_bind,
2724         source_type, add_warning, can_convert, can_convert_arg,
2725         perform_implicit_conversion, can_convert_arg_bad,
2726         initialize_reference, add_conv_candidate,
2727         add_template_candidate_real, add_template_candidate): Ansify.
2729 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2731         PR c++/8572
2732         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2733         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2734         if in a template scope.
2735         * parse.y (unoperator): Return the scope.
2736         (operator_name): Adjust grokoptypename call.
2738 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2740         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2741         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2742         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2744 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2746         * ChangeLog: Fix a typo.
2747         * class.c: Fix comment typos.
2748         * cp-tree.h: Likewise.
2750 2002-12-18  Jason Merrill  <jason@redhat.com>
2752         Handle anonymous unions at the tree level.
2753         C++ ABI change: Mangle anonymous unions using the name of their
2754         first named field (by depth-first search).  Should not cause
2755         binary compatibility problems, though, as the compiler previously
2756         didn't emit anything for affected unions.
2757         * cp-tree.def (ALIAS_DECL): New tree code.
2758         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
2759         first field, not the largest.
2760         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
2761         push the decl, and write it out at namespace scope.
2762         * decl.c (lookup_name_real): See through an ALIAS_DECL.
2763         (pushdecl): Add namespace bindings for ALIAS_DECLs.
2764         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2765         of a decl which doesn't have one.
2766         * typeck.c (build_class_member_access_expr): Don't recurse if
2767         we already have the type we want.
2769 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2771         PR c++/8099
2772         * friend.c (make_friend_class): Allow partial specialization
2773         when declaration is not a template friend.
2775 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2777         PR c++/3663
2778         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2779         TREE_PROTECTED to created decl nodes.
2781 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
2783         * class.c (build_base_field): Do not set DECL_PACKED on the
2784         FIELD_DECL.
2786 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2788         * cp-tree.h (struct tree_srcloc): Use location_t.
2789         (SOURCE_LOCUS): New.
2790         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2792 2002-12-17  Jason Merrill  <jason@redhat.com>
2794         * decl.c (finish_function): Also complain about no return in
2795         templates.
2796         * semantics.c (finish_return_stmt): Also call check_return_expr in
2797         templates.
2798         * typeck.c (check_return_expr): In a template, just remember that we
2799         saw a return.
2801 2002-12-16  Jason Merrill  <jason@redhat.com>
2803         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2804         of the CALL_EXPR.
2806         * semantics.c (do_pushlevel): Call pushlevel after adding the
2807         SCOPE_STMT.
2808         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2809         * parse.y (function_body): Go back to using compstmt.
2810         * decl.c (pushdecl): Skip another level to get to the parms level.
2812         * call.c (build_new_method_call): Use is_dummy_object to determine
2813         whether or not to evaluate the object parameter to a static member
2814         function.
2816 2002-12-14  Jason Merrill  <jason@redhat.com>
2818         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2819         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2820         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2821         don't bother with an AGGR_INIT_EXPR.
2822         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2823         just generate a new decl normally.  Take return slot parm.
2824         * cp-tree.h: Adjust prototype.
2826 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2828         PR C++/8031
2829         * cvt.c (convert_to_pointer_force): Don't try comparing against
2830         erronous type.
2832 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
2834         * cp-tree.h: Have the multiple-include guards around
2835         the entire file.
2837 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
2839         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2840         for SPEW_DEBUG.
2841         (snarf_method): Same.
2842         (snarf_defarg): Same.
2844 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
2846         PR c++/8372
2847         * pt.c (tsubst_copy): Handle destructor names more correctly.
2849 2002-12-10  Matt Austern   <austern@apple.com>
2851         * cp-tree.h: get rid of needs_virtual_reinit bit.
2853 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
2855         * NEWS: Document removal of in-class initialization extension for
2856         static data members of non-arithmetic, non-enumeration type.
2857         * decl.c (check_static_variable_definition): Do not allow that
2858         extension.
2859         * decl2.c (grokfield): Do not call digest_init when processing
2860         templates.
2862 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2864         * error.c (dump_expr): Fix format specifier warning.
2866 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
2868         * class.c (finish_struct_1): Correct comment.
2869         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2871 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2873         PR C++/8799
2874         * error.c (dump_expr): Don't ever try to dump a non-existent
2875         expression.
2877 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2879         Implement covariant returns.
2880         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
2881         (struct lang_decl_flags): Add this_thunk_p flag.
2882         Rename vcall_offset to virtual_offset.
2883         (struct lang_decl): Rename delta to fixed_offset.
2884         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
2885         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
2886         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
2887         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
2888         (make_thunk): Add this_adjusting arg.
2889         (finish_thunk): Declare.
2890         (mangle_thunk): Add this_adjusting arg.
2891         * class.c (get_vcall_index): Use base function for lookup.
2892         (update_vtable_entry_for_fn): Generate covariant thunk.
2893         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
2894         (build_vtbl_initializer): Use base function for lookup.
2895         Finish covariant thunk here. Adjust thunk generation.
2896         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
2897         Adjust thunk dumping.
2898         * mangle.c (mangle_call_offset): New function.
2899         (mangle_thunk): Adjust for covariant thunks.
2900         * method.c (make_thunk): Adjust. Do not set name here.
2901         (finish_thunk): New function. Set name here.
2902         (use_thunk): Generate covariant thunks too.
2903         (thunk_adjust): New function.
2904         * search.c (covariant_return_p): Remove. Fold into ...
2905         (check_final_overrider): ... here. Simplify.
2906         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2908 2002-12-03  Jason Merrill  <jason@redhat.com>
2910         PR c++/8674
2911         * call.c (build_over_call): Check specifically for TARGET_EXPR
2912         when eliding.
2914         PR c++/8461, c++/8625
2915         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
2916         (cp_convert_parm_for_inlining): Remove.
2917         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2918         Remove.
2919         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
2920         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
2922         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
2923         an ambiguous conversion.
2925 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
2927         PR c++/8688
2928         * decl.c (reshape_init): Handle erroneous initializers.
2930 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
2932         PR c++/8720
2933         * spew.c (remove_last_token): Make sure that last_chunk is set
2934         correctly.
2936         PR c++/8615
2937         * error.c (dump_expr): Handle character constants with
2938         TREE_OVERFLOW set.
2940 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2942         DR 180
2943         * decl.c (grokdeclarator): Require class-key for all friend class.
2944         Output the correct type and context in the error message.
2946 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2948         PR c++/5919
2949         * pt.c (unify): Use variably_modified_type_p to test validity of
2950         template argument types.
2952         PR c++/8727
2953         * cp-tree.h (lang_type_class): Add typeinfo_var.
2954         (CLASSTYPE_TYPEINFO_VAR): New macro.
2955         * rtti.c (get_tinfo_decl): Use it.
2957         PR c++/8663
2958         * init.c (expand_member_init): Always get the main variant of a
2959         base class.
2961 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2963         PR c++/8332
2964         PR c++/8493
2965         * decl.c (cxx_init_decl_processing): Use size_type_node, not
2966         c_size_type_node.
2967         * decl2.c (coerce_new_type): Likewise.
2968         * except.c (do_allocate_exception): Likewise.
2970 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2972         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
2973         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
2974         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
2975         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2976         typeck2.c: Include coretypes.h and tm.h.
2977         * Make-lang.in: Update dependencies.
2979 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
2981         PR c++/8227
2982         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
2983         (check_initializer): Validate the type of the initialized
2984         variable, even if the initializer is absent.
2985         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
2987         PR c++/8214
2988         * typeck.c (convert_for_assignment): Do not use
2989         decl_constant_value on the operand.
2991         PR c++/8511
2992         * pt.c (instantiate_decl): Handle template friends defined outside
2993         of the class correctly.
2995 2002-11-29  Joe Buck <jbuck@synopsys.com>
2997         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
2998         anonymous structs.
3000 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
3002         * class.c (walk_subobject_offsets): Recur on binfos as well as on
3003         types.
3004         (layout_nonempty_base_or_field): Pass it a binfo when processing a
3005         base class.
3006         (layout_empty_base): Likewise.
3007         (build_base_field): Likewise.
3009 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
3011         * class.c (build_base_field): Make sure we get the canonical base
3012         when descending through primary bases.
3014 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
3016         * decl.c (check_initializer): Don't error on initialisation of
3017         a scalar with a brace-enclosed expression.
3019 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
3021         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
3022         (template_parms_equal): Remove prototype.
3023         * typeck.c (buuld_indirect_ref): Reformat.
3025 2002-11-25  Jason Merrill  <jason@redhat.com>
3027         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
3028         and a DO_STMT.
3030 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
3032         * tree.c (cp_build_qualified_type_real): Correct handling of
3033         array types.
3034         * class.c (walk_subobject_offsets): Fix thinko.
3035         (build_base_field): Record offsets of empty bases in primary
3036         virtual bases.
3037         (layout_class_type): Record offsets of empty bases in fields.
3039         * search.c (is_subobject_of_p_1): Fix thinko.
3040         (lookup_field_queue_p): Likewise.
3042 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
3044         * class.c (layout_class_type): Reuse tail padding when laying out
3045         virtual bases.
3047 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
3049         * rtti.c (qualifier_flags): Fix thinko.
3051 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3053         Remove traditional C constructs 1/n.
3054         * cp-tree.h (init_method, set_mangled_name_for_decl,
3055         build_opfncall, hack_identifier, make_thunk, use_thunk,
3056         synthesize_method, implicitly_declare_fn,
3057         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
3058         maybe_clone_body): Remove use of PARAMS.
3060         * method.c (do_build_assign_ref, do_build_copy_constructor,
3061         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
3062         Likewise.
3063         (synthesize_method): Use 'bool' type and constants instead of
3064         'int'.
3065         (locate_copy): Likewise.
3066         (implicitly_declare_fn): Likewise.
3068         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
3069         Remove old-style declaration.
3070         (maybe_clone_body): Use 'bool' type and constants.
3072 2002-11-21  Glen Nakamura  <glen@imodulo.com>
3074         PR c++/8342
3075         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
3076         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
3077         of the branches of a COND_EXPR.
3079 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
3081         * pt.c (for_each_template_parm): Free allocated memory.
3082         * search.c (is_subobject_of_p_1): New function.
3083         (is_subobject_of_p): Avoid walking virtual bases multiple times.
3085 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
3087         * g++spec.c (lang_specific_spec_functions): New.
3089 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
3091         * ChangeLog: Follow spelling conventions.
3092         * class.c: Likewise.
3093         * decl2.c: Likewise.
3095 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
3097         * search.c (dfs_push_decls): Do not try to reorder elements
3098         3..n of method_vec if method_vec has only two elements.
3099         Reverse order of two tests to avoid accessing unallocated
3100         memory.
3102 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
3104         * class.c (dfs_find_final_overrider): Adjust so that the most
3105         derived object is a binfo, rather than a class type.
3106         (find_final_overrider): Likewise.
3107         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
3108         (add_vcall_offset): Likewise.
3110 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3112         PR c++/8389
3113         * pt.c (instantiate_template): Push class scope for member
3114         functions.
3115         (get_mostly_instantiated_function_type): Likewise.  Don't call
3116         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
3117         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
3118         * mangle.c (write_encoding, write_unqualified_name): Adjust.
3120 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3122         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
3123         vcall offfsets.  Split out ...
3124         (add_vcall_offset): ... new function.
3126         PR c++/8338
3127         * pt.c (for_each_template_parm): Add htab parameter.
3128         (process_partial_specialization): Adjust call.
3129         (push_template_decl_real): Likewise.
3130         (pair_fn_data): Add visited.
3131         (for_each_template_parm_r): Avoid walking duplicates more than
3132         once.
3133         (uses_template_parms): Adjust call to for_each_template_parm.
3135 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
3137         * class.c (add_implicitly_declared_members): Put implicitly
3138         declared functions at the end of TYPE_METHODs when -fabi-version
3139         is at least 2.
3141 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
3143         * decl2.c (finish_file): Correct spelling.
3145 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
3147         * call.c (build_special_member_call): Do not try to lookup VTTs by
3148         name.
3149         * class.c (vtbl_init_data): Add generate_vcall_entries.
3150         (get_vtable_decl): Do not look up virtual tables by name.
3151         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
3152         (set_primary_base): Do not set CLASSTYPE_RTTI.
3153         (determine_primary_base): Likewise.
3154         (get_matching_virtual): Remove.
3155         (get_vcall_index): New function.
3156         (update_vtable_entry_for_fn): Do not try to use virtual thunks
3157         when they are not required.  Assign vcall indices at this point.
3158         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
3159         Do update dynamic_classes.
3160         (build_vtt): Do not add VTTs to the symbol table.
3161         (build_ctor_vtbl_group): Likewise.
3162         (build_vtbl_initializer): Simplify handling of vcall indices.
3163         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
3164         for the most derived class.
3165         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
3166         the vtable.
3167         * cp-tree.h (dynamic_classes): New macro.
3168         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
3169         (CLASSTYPE_RTTI): Remove.
3170         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
3171         (CLASSTYPE_VCALL_INDICES): New macro.
3172         (CLASSTYPE_VTABLES): Likewise.
3173         (BV_USE_VCALL_INDEX_P): Remove.
3174         (build_vtable_path): Remove.
3175         * decl2.c (finish_vtable_vardecl): Remove.
3176         (key_method): Remove #if 0'd code.
3177         (finish_vtable_vardecl): Rename to ...
3178         (maybe_emit_vtables): ... this.
3179         (finish_file): Use it.
3180         * search.c (look_for_overrides_here): Update comment.
3182 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
3184         PR c/7353 redux
3185         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
3187 2002-10-30  Jason Merrill  <jason@redhat.com>
3189         PR c++/8186
3190         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
3191         * call.c (convert_for_arg_passing): Set it.
3192         * except.c (stabilize_throw_expr): Recurse for such an arg.
3194 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
3196         * cp-tree.h (lang_decl_flags): Remove init_priority.
3197         (lang_decl): Add delta.
3198         (GLOBAL_INIT_PRIORITY): Remove.
3199         (THUNK_DELTA): Revise definition.
3200         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
3201         * dump.c (cp_dump_tree): Don't dump it.
3203 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
3205         PR c++/8160
3206         * typeck2.c (process_init_constructor): Call complete_array_type.
3208         PR c++/8149
3209         * decl.c (make_typename_type): Issue errors about invalid results.
3211 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3213         Core issue 287, PR c++/7639
3214         * cp-tree.h (lang_type_class): Add decl_list field.
3215         (CLASSTYPE_DECL_LIST): New macro.
3216         (maybe_add_class_template_decl_list): Add declaration.
3217         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
3218         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
3219         (maybe_add_class_template_decl_list): New function.
3220         (add_implicitly_declared_members): Use it.
3221         * decl.c (maybe_process_template_type_declaration): Likewise.
3222         (pushtag): Likewise.
3223         * friend.c (add_friend): Likewise.
3224         (make_friend_class): Likewise.
3225         * semantics.c (finish_member_declaration): Likewise.
3226         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
3227         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
3228         to process members and friends in the order of declaration.
3230 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
3232         PR c++/8287
3233         * decl.c (finish_destructor_body): Create the label to jump to
3234         when returning from a destructor here.
3235         (finish_function_body): Rather than here.
3237 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
3239         PR c++/7266
3240         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
3241         SCOPE_REF is not null before dereferencing it.
3243 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
3245         * call.c (build_over_call): Use DECL_CONTEXT, not
3246         DECL_VIRTUAL_CONTEXT.
3247         * class.c (modify_vtable_entry): Don't mess with
3248         DECL_VIRTUAL_CONTEXT.
3249         (set_vindex): Remove.
3250         (set_primary_base): Remove vfuns_p parameter.
3251         (determine_primary_base): Likewise.
3252         (modify_all_vtables): Likewise.
3253         (layout_class_type): Likewise.  Adjust calls to other functions
3254         accordingly.
3255         (finish_struct_1): Adjust calls to modified functions.  Set
3256         DECL_VINDEX here.
3257         * cp-tree.h (lang_type_class): Remove vsize.
3258         (CLASSTYPE_VSIZE): Remove.
3259         (lang_decl): Remove thunks.
3260         (DECL_THUNKS): Adjust.
3261         (DECL_VIRTUAL_CONTEXT): Remove.
3262         (duplicate_decls): Don't copy it.
3263         * pt.c (build_template_decl): Don't set it.
3264         (tsubst_decl): Likewise.
3265         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
3267         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
3268         (build_vtable_entry): Remove.
3269         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
3270         (lang_decl): Add thunks.
3271         (DECL_THUNKS): New macro.
3272         * decl.c (duplicate_decls): Copy it.
3273         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
3274         * semantics.c (emit_associated_thunks): Simplify.
3276 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
3278         PR c++/7228
3279         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
3280         lang_type structure exists before accessing field.
3281         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
3282         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
3283         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
3284         * class.c (check_field_decls): Use new macros.
3285         * typeck2.c (process_init_constructor): Remove redundant check for
3286         existence of lang_type structure.
3288 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
3290         * class.c (end_of_base): New method.
3291         (end_of_class): Use it.  Check indirect virtual bases.
3293         * class.c (check_field_decls): Fix typo.
3295 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
3297         PR c++/8067
3298         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
3299         related variables.
3301         PR c++/7679
3302         * spew.c (next_token): Do not return an endless stream of
3303         END_OF_SAVED_INPUT tokens.
3304         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
3305         the cached token stream.
3306         (snarf_defarg): Likewise.
3308 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
3310         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
3311         variably_modified_type_p.
3312         * cp-tree.h: Remove prototype of variably_modified_type_p.
3313         * tree.c (variably_modified_type_p): Remove; now implemented
3314         in language-independent code.
3316 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
3318         PR c++/6579
3319         * spew.c (snarf_parenthesized_expression): New function.
3320         (snarf_block): Use it.
3322 2002-10-22  Richard Henderson  <rth@redhat.com>
3324         * method.c (use_thunk): Always compute vcall_value; assert that
3325         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
3326         for vcall thunks as well.
3328 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
3330         * class.c (empty_base_at_nonzero_offset_p): New function.
3331         (layout_nonempty_base_or_field): Do not check for conflicts when
3332         laying out a virtual base using the GCC 3.2 ABI.
3333         (build_base_field): Correct checking for presence of empty classes
3334         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
3336         * class.c (include_empty_classes): Use normalize_rli.
3337         (layout_class_type): Likewise.
3339         * decl.c (reshape_init): Tweak handling of character arrays.
3341         PR c++/8218
3342         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
3343         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
3344         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
3345         (check_field_decls): Likewise.
3346         (layout_class_type): Likewise.
3347         (finish_struct_1): Initialize it.
3348         (walk_subobject_offsets): Use it to prune searches.
3350 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
3352         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
3353         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
3354         TARGET_ASM_OUTPUT_MI_THUNK in comments.
3356 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
3358         * decl.c (start_decl): Point users of the old initialized-
3359         typedef extension at __typeof__.
3361 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3363         * Make-lang.in (method.o): Depend on TARGET_H.
3364         * method.c (target.h): Include it.
3365         (use_thunk): Use target hooks.  Use vcall thunks, if available.
3367 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3369         * class.c (base_derived_from): Make sure return value is a bool.
3371 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
3373         * class.c (find_final_overrider_data_s): Remove overriding_fn and
3374         overriding_base.
3375         (dfs_base_derived_from): New function.
3376         (base_derived_from): Likewise.
3377         (dfs_find_final_overrider): Use base_derived_from.
3378         (find_final_overrider): Adjust.
3380 2002-10-18  Jason Merrill  <jason@redhat.com>
3382         PR c++/8080
3383         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
3384         with condition decls in a template.
3386 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
3388         * class.c (add_method): Compare template parms too.
3390 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
3392         PR c++/7584
3393         * class.c (handle_using_decl): Allow the declaration used to be
3394         from an ambiguous base.
3396         * pt.c (convert_template_argument): Revert this change:
3397                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3398                 * pt.c (convert_template_argument): Do not fold non-type
3399                 template rguments when inside a template.
3401         * init.c (expand_default_init): Handle brace-enclosed initializers
3402         correctly.
3404 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3406         * mangle.c (write_expression): Correct handling of enumeration
3407         constants.
3408         (write_template_arg): Likewise.
3409         * pt.c (convert_template_argument): Do not fold non-type template
3410         arguments when inside a template.
3412         PR c++/7478
3413         * cvt.c (convert_to_reference): Allow references as the incoming
3414         type.
3416 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
3418         PR c++/7524
3419         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
3420         build_qualified_type.
3422 2002-10-15  Richard Henderson  <rth@redhat.com>
3424         * error.c (dump_expr): Use real_to_decimal directly, and with
3425         the new arguments.
3427 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
3429         * decl.c (reshape_init): Fix typo.
3431         * cp-tree.h (operator_name_info_t): Add arity.
3432         * lex.c (init_operators): Initialize it.
3433         * mangle.c (write_conversion_operator_name): New function.
3434         (write_unqualified_name): Use it.
3435         (write_template_args): Accept template arguments as a TREE_LIST.
3436         (write_expression): Adjust handling of qualified names to match
3437         specification.
3439 2002-10-15  Jason Merrill  <jason@redhat.com>
3441         * call.c (call_builtin_trap): New fn.
3442         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
3443         (build_call): Don't set current_function_returns_abnormally outside
3444         a function.
3446 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3448         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
3449         clear CLASSTYPE_EMPTY_P.
3450         (build_base_field): Likewise.
3451         (build_base_fields): Likewise.
3452         (check_bases_and_members): Likewise.
3453         (create_vtbl_ptr): Likewise.
3454         (layout_class_type): Likewise.  Ensure that empty classes have
3455         size zero when used as base classes in the 3.2 ABI.
3456         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
3457         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
3458         parameter.
3459         (is_empty_class): Correct definition when using post-3.2 ABI.
3460         * cp-tree.h (lang_type_class): Add empty_p.
3461         (CLASSTYPE_EMPTY_P): New macro.
3463 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3465         * init.c (build_delete): Do not apply save_expr for arrays.
3466         (build_vec_delete): Likewise.
3468 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
3470         * decl.c (layout_var_decl): Call layout_decl even for variables
3471         whose type is an array with unspecified bounds.
3473         PR c++/7176
3474         * lex.c (do_identifier): Add another option for the parsing
3475         parameter.
3476         * parse.y (do_id): Use it.
3478 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3480         PRs C++/6803, C++/7721 and C++/7803
3481         * decl.c (grokdeclarator): Gracefully handle template-name as
3482         decl-specifier.
3484 2002-10-11  Jason Molenda  <jmolenda@apple.com>
3486         * init.c (build_field_list): Provide uses_unions_p with a default
3487         value.
3489 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
3491         PR c++/5661
3492         * cp-tree.h (variably_modified_type_p): New function.
3493         (grokdeclarator) Tighten check for variably modified types as
3494         fields.
3495         * pt.c (convert_template_argument): Do not allow variably modified
3496         types as template arguments.
3497         * tree.c (variably_modified_type_p): New function.
3499         * NEWS: Document removal of "new X = ..." extension.
3500         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
3501         brace-enclosed initializers.
3502         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
3503         (initialize_local_var): Remove declaration.
3504         (expand_static_init): Likewise.
3505         * decl.c (next_initializable_field): New function.
3506         (reshape_init): Likewise.
3507         (check_initializer): Use them.  Build dynamic initializer for
3508         aggregates here too.
3509         (initialize_local_var): Simplify, and incorporate cleanup
3510         insertion code as well.
3511         (destroy_local_var): Remove.
3512         (cp_finish_decl): Tidy.
3513         (expand_static_init): Fold checks for whether or not a variable
3514         needs initialization into this function.  Simplify.
3515         * decl2.c (do_static_initialization): Simplify.
3516         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
3517         be done for us automatically.
3518         (expand_default_init): Handle brace-enclosed initializers
3519         correctly.
3520         (expand_aggr_init_1): Remove RTL-generation code.
3521         (build_vec_init): Remove "new X = ..." support.
3522         * parse.y (new_initializer): Likewise.
3523         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
3524         brace-enclosed initializer.
3525         (create_pseudo_type_info): Likewise.
3526         * typeck2.c (store_init_value): Don't try to handle digest_init
3527         being called more than once.
3528         (digest_init): Tidy handling of brace-enclosed initializers.
3530 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3532         * decl.c (typename_hash): Use htab_hash_pointer.
3534 2002-10-10  Jim Wilson  <wilson@redhat.com>
3536         * decl.c (duplicate_decls): Don't call decl_attributes.
3538 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
3540         PR c/7353
3541         * decl.c (start_decl): Unconditionally issue error for
3542         'typedef foo = bar'.
3543         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
3544         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
3546 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3548         * decl2.c (prune_vtable_vardecl): Delete unused function.
3550 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3552         PR c++/7754
3553         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3554         procesing template functions.
3555         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3556         type. Call layout_decl.
3557         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3559 2002-10-07  Richard Henderson  <rth@redhat.com>
3561         * decl2.c, pt.c: Revert c++/7754 fix.
3563 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3565         PR c++/7804
3566         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
3568 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3570         PR c++/7931
3571         * pt.c (for_each_template_parm_r): Handle BASELINKs.
3573         PR c++/7754
3574         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3575         procesing template functions.
3576         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3577         type. Call layout_decl.
3578         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3580 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3582         PR c++/8006
3583         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3584         template parameters.
3585         (globals): Add entity and need_abi_warning.
3586         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3587         CLASSTYPE_TEMPLATE_INFO.
3588         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3589         TYPE_TI_TEMPLATE.
3590         (write_prefix): Handle typename types correctly.
3591         (write_template_prefix): Handle template template parameters
3592         correctly.
3593         (start_mangling): Add entity parameter.
3594         (finish_mangling): Warn about names whose mangling will change.
3595         (mangle_decl_string): Adjust.
3596         (mangle_type_string): Likewise.
3597         (mangle_special_for_type): Likewise.
3598         (mangle_ctor_vtbl_for_type): Likewise.
3599         (mangle_thunk): Likewise.
3600         (mangle_guard_variable): Likewise.
3601         (mangle_ref_init_variable): Likewise.
3603 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
3605         PR c++/7188.
3606         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3607         * cp-tree.h (emit_base_init): Rename to ....
3608         (emit_mem_initializers): ... this.
3609         (expand_member_init): Change prototype.
3610         * init.c (perform_member_init): Compute explicit, rather than
3611         requiring it as a parameter.
3612         (sort_member_init): Rename to ...
3613         (sort_mem_initializers): ... this.  Process bases and data members
3614         together.
3615         (sort_base_init): Remove.
3616         (emit_base_init): Rename to ...
3617         (emit_mem_initializers): ... this.
3618         (expand_aggr_vbase_init_1): Remove.
3619         (construct_virtual_bases): Rename to ...
3620         (construct_virtual_base): ... this.
3621         (expand_member_init): Rework handling of base initializers.
3622         * method.c (do_build_copy_constructor): Use
3623         finish_mem_initializers.
3624         * parse.y (member_init): Adjust calls to expand_member_init.
3625         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3626         (tsubst_initializer_list): Use expand_member_init.
3627         * semantics.c (finish_mem_intiailizers): Simplify.
3629 2002-10-02  Matt Austern  <austern@apple.com>
3630         * decl.c (walk_vtables_r): Fixed typo that caused result to
3631         never get a nonzero value.
3633 2002-10-02  Roger Sayle  <roger@eyesopen.com>
3635         PR optimization/6627
3636         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
3637         from here, and move it to tree.h.
3638         * decl.c (cxx_init_decl_processing): If storing the vbit
3639         in function pointers, ensure that force_align_functions_log
3640         is atleast one.
3642 2002-10-02  Matt Austern  <austern@apple.com>
3644         * class.c (check_field_decls): Changed warning about const member
3645         variables so that it doesn't get issued for a class aggregate.
3647 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3649         * decl.c (cp_finish_decl): Make sure array types are laid out,
3650         even if the array bounds are unknown.
3652 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
3654         * class.c (build_vtbl_initializer): Change build_c_cast
3655         to build1.
3657 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3659         * decl.c (cp_finish_decl): Make sure array types are laid out,
3660         even if the array bounds are unknown.
3662         * decl.c (cp_finish_decl): Correct check for dynamic
3663         initialization of thread-local storage.
3665 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3667         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3668         overloaded.
3670 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
3672         * class.c (build_vtbl_initializer): Add cast.
3673         (add_vcall_offset_vtbl_entries_1):
3674         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3676 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
3678         * class.c (walk_subobject_offsets): Correct the calculation of
3679         offsets for virtual bases.  Correct the counting of array
3680         elements.
3681         (layout_nonempty_base_or_field): Simplify.  Correct the
3682         calculation of offsets to be propagated through the binfo
3683         hierarchy.
3684         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3685         Add the FIELD_DECL to TYPE_FIELDS.
3686         (build_base_fields): Adjust accordingly.
3687         (layout_virtual_bases): Use build_base_field.
3688         (end_of_class): Return a tree, not an integer.
3689         (warn_about_ambiguous_direct_bases): Rename to ...
3690         (warn_about_ambiguous_bases): ... this.
3691         (include_empty_classes): New function.
3692         (layout_class_type): Create an alternative version of the type to
3693         be used when as a base class type.  Do not call
3694         finish_record_layout until we are done laying out the class.
3695         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
3696         as_base.
3697         (CLASSTYPE_SIZE): Reimplement.
3698         (CLASSTYPE_SIZE_UNIT): Likewise.
3699         (CLASSTYPE_ALIGN): Likweise.
3700         (CLASSTYPE_USER_ALIGN): Likewise.
3701         (CLASSTYPE_AS_BASE): New macro.
3702         (DECL_INITIALIZED_P): Likewise.
3703         (extract_init): Remove prototype.
3704         (build_forced_zero_init): Rename to ...
3705         (build_zero_init): ... this.
3706         (force_store_init_value): Remove.
3707         * decl.c (obscure_complex_init): Remove.
3708         (duplicate_decls): Copy DECL_INITIALIZED_P.
3709         (check_initializer): Do not leave junk in DECL_INITIAL.
3710         (cp_finish_decl): Handle zero-initialization of entities with
3711         static storage duration.
3712         * expr.c (extract_init): Remove.
3713         * init.c (build_forced_zero_init): Remove.
3714         (build_zero_init): New function.
3715         (build_default_init): Use it.
3716         (build_field_list): Skip FIELD_DECLs for base subobjects.
3717         (push_base_cleanups): Likewise.
3718         * method.c (do_build_assign_ref): Likewise.
3719         (synthesize_exception_spec): Likewise.
3720         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3721         (regenerate_decl_from_template): To not set DECL_INITIAL for a
3722         static data member whose initialization took place in its class.
3723         (instantiate_decl): Do not pass an initializer to cp_finish_decl
3724         in that situation.
3725         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
3726         (dfs_unuse_fields): Likewise.
3727         * tree.c (pod_type_p): Handle error_mark_node.
3728         (zero_init_p): Likewise.
3729         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
3730         subobjects.
3731         * typeck2.c (store_init_value): Remove #if 0'd code.
3732         (force_store_init_value): Remove.
3733         (process_init_constructor): Use build_zero_init.
3735 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
3737         PR c++/7788
3738         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
3740 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
3742         * cp-tree.h: Fix comment typos.
3743         * decl.c: Likewise.
3744         * pt.c: Likewise.
3746 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
3748         * cp/class.c (contains_empty_class_p): New method.
3749         (walk_subobject_offsets): Correct computation of field offset.
3750         (layout_empty_base): Correct placement of emtpy base classes.
3751         (layout_class_type): Warn about ABI changes.
3753 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
3755         * cp/class.c (layout_virtual_bases): Do not round the size of the
3756         type to a multiple of the alignment before laying out virtual bases.
3757         (layout_class_type): Correct handling of bit-fields that are wider
3758         than their type inside unions.  Round the size of the type to a
3759         even number of bytes when computing the size without virtual
3760         bases.
3761         * cp/cp-tree.h (abi_version_at_least): New macro.
3763 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
3765         * ChangeLog: Follow spelling conventions.
3766         * ChangeLog.2: Likewise.
3767         * call.c: Likewise.
3768         * class.c: Likewise.
3769         * cp-tree.h: Likewise.
3770         * cvt.c: Likewise.
3771         * decl.c: Likewise.
3772         * decl2.c: Likewise.
3773         * except.c: Likewise.
3774         * friend.c: Likewise.
3775         * g++spec.c: Likewise.
3776         * init.c: Likewise.
3777         * lex.c: Likewise.
3778         * mangle.c: Likewise.
3779         * method.c: Likewise.
3780         * operators.def: Likewise.
3781         * optimize.c: Likewise.
3782         * pt.c: Likewise.
3783         * rtti.c: Likewise.
3784         * search.c: Likewise.
3785         * semantics.c: Likewise.
3786         * spew.c: Likewise.
3787         * tree.c: Likewise.
3788         * typeck.c: Likewise.
3790 2002-09-18  Devang Patel  <dpatel@apple.com>
3792         * cp/cp-tree.h: New prototype for walk_vtabls().
3793         * cp/decl.c (walk_vtables_r): New function.
3794         (struct cp_binding_level): Add new members, namespaces,
3795         names_size and vtables.
3796         (add_decl_to_level): Add decl in namespaces or vtables
3797         chain, if conditions match.
3798         (walk_vtables): New function.
3799         (walk_namespaces_r): Travers separate namespace chain
3800         for namespace decls.
3801         (wrapup_globals_for_namespace): Use names_size instead
3802         of list_length().
3803         * cp/decl2.c (finish_file): Use walk_vtables() instead of
3804         walk_globals() to walk vtable decls.
3806 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
3808         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
3809         ICE with invalid pointers & references.
3811 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
3813         * Make-lang.in: Remove all references to the demangler.
3814         * cxxfilt.c: Moved to binutils.
3816 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3818         PR c++/7718
3819         * pt.c (tsubst_decl): Remove assert.
3821         Remove DR 295 implementation.
3822         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
3823         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
3824         about ignoring volatile qualifiers.
3826         * search.c (lookup_member): Correct documentation.
3828 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
3830         * cp-tree.h (union lang_tree_node): Add chain_next option.
3832 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3834         * parse.y (parse_finish_call_expr): Check lookup_member result.
3836         PR c++/7015
3837         * semantic.c (finish_asm_stmt): Fix operand/output_operands
3838         thinko.
3839         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
3841 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3843         PR c++/7919
3844         * call.c (build_over_call): Convert this pointer for fns found by
3845         using decls.
3847 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
3849         * ChangeLog: Follow spelling conventions.
3850         * ChangeLog.1: Likewise.
3852 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3854         PR c++/7768
3855         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
3857 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
3859         * error.c: Fix comment formatting.
3860         * except.c: Likewise.
3861         * expr.c: Likewise.
3862         * friend.c: Likewise.
3863         * g++spec.c: Likewise.
3864         * init.c: Likewise.
3865         * lex.c: Likewise.
3866         * mangle.c: Likewise.
3867         * method.c: Likewise.
3868         * optimize.c: Likewise.
3869         * pt.c: Likewise.
3870         * rtti.c: Likewise.
3871         * search.c: Likewise.
3872         * semantics.c: Likewise.
3873         * spew.c: Likewise.
3874         * tree.c: Likewise.
3875         * typeck.c: Likewise.
3876         * typeck2.c: Likewise.
3878 2002-09-13  Matt Austern  <austern@apple.com>
3880         PR C++/7828
3881         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
3882         * cp/call.c: Change call-by-const-reference mechanism to use
3883         non_cast_lvalue_p when deciding whether the create a temporary.
3884         We need a temporary when passing, e.g. (long) x by const ref.
3886 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
3888         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
3890 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
3892         * decl.c: Fix comment formatting.
3893         * decl2.c: Likewise.
3895 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
3897         * call.c: Fix comment formatting.
3898         * class.c: Likewise.
3899         * cp-lang.c: Likewise.
3900         * cp-tree.h: Likewise.
3901         * cvt.c: Likewise.
3903 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
3905         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
3906         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
3907         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
3908         minor adjustments (use version_string, eliminate yet another
3909         duplicate of xmalloc)
3911 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3913         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
3915 2002-09-05  Jason Merrill  <jason@redhat.com>
3917         * typeck2.c (add_exception_specifier): Only pedwarn for an
3918         incomplete type.
3919         (require_complete_eh_spec_types): New fn.
3920         (cxx_incomplete_type_diagnostic): Also support pedwarning.
3921         * typeck.c (complete_type_or_diagnostic): Likewise.
3922         * call.c (build_call): Call require_complete_eh_spec_types.
3923         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
3924         on an incomplete type.
3926 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
3928         * decl.c (start_cleanup_fn): Clear interface_only before
3929         start_function, restore it afterwards.
3931 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
3933         * cp-tree.h (finish_builtin_type): Remove.
3934         * decl2.c (finish_builtin_type): Move to common code.
3935         * decl.c (build_ptrmemfunc_type): Adjust.
3936         * rtti.c (create_pseudo_type_info): Adjust.
3937         (create_tinfo_types): Adjust.
3939 2002-08-31  Jason Merrill  <jason@redhat.com>
3941         * cp-lang.c (cp_expr_size): Allow initialization from a
3942         CONSTRUCTOR.
3944 2002-08-30  Richard Henderson  <rth@redhat.com>
3946         PR opt/7515
3947         * tree.c: Include target.h.
3948         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
3949         don't bind locally.
3950         * Makefile.in (tree.o): Update.
3952 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
3954         * class.c (layout_virtual_bases): Warn about bugs in G++ that
3955         result in incorrect object layouts.
3956         (layout_class_type): Likewise.
3958 2002-08-24  Matt Austern  <austern@apple.com>
3960         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
3961         are allowable.
3962         (real_lvalue_p): Update caller.
3963         (lvalue_p): Ditto.
3964         (non_cast_lvalue_or_else): New.
3965         * tree.h: Declare it.
3966         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
3968 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
3970         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
3971         and COND_EXPR specially; fix error message output.
3973 2002-08-22  Jason Merrill  <jason@redhat.com>
3975         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
3976         * semantics.c (nullify_returns_r): Likewise.
3978 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3980         Fix PR/7621
3981         * typeck.c (finish_class_member_access_expr): Diagnose cases where
3982         name lookup finds nothing.
3984 2002-08-15  Jason Merrill  <jason@redhat.com>
3986         * semantics.c (finish_then_clause): Remove redundant assignment.
3987         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
3988         extra binding level outside the if/switch statement.
3989         (finish_while_cond, finish_for_cond): Rewrite complex condition
3990         into the loop body.
3992 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
3994         * parse.y (sizeof, alignof, typeof): New non-terminals to
3995         increment skip_evaluation.  Replace terminals with them and
3996         decrement skip_evaluation at the end of rules using them.
3997         * decl2.c (mark_used): Don't assemble_external if
3998         skipping evaluation.
4000 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
4002         Fix PR/7504
4003         * parse.y (parse_finish_call_expr): Handle incomplete
4004         type used to name a scope.
4006 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4008         PR c++/7598
4009         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
4010         regression caused by my 2002-08-08 patch.
4012 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
4014         * decl.c (pushdecl_class_level): Honor requests to bind names to
4015         OVERLOADs.
4017 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4019         * decl2.c (build_call_from_tree): Fix uninitialized variable.
4020         * parse.y (parse_finish_call_expr): Likewise.
4021         * repo.c (old_args, old_dir, old_main): Const-ify.
4023 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
4025         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
4026         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
4027         * optimize.c (maybe_clone_body): Likewise.
4028         * pt.c (tsubst_enum): Likewise.
4029         (lookup_template_class): Likewise.
4030         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
4032 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
4034         * lang-specs.h: Remove -ansi.
4036 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
4038         * tree.c (maybe_dummy_object): Replace // with /* */
4040 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
4042         * call.c (standard_conversion): Use build_ptrmem_type.
4043         * cp-tree.h (build_ptrmem_type): New function.
4044         (adjust_result_of_qualified_name_lookup): Likewise.
4045         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
4046         static data members.
4047         (build_ptrmem_type): New function.
4048         (grokdeclarator): Do not use build_offset_type when encountering a
4049         qualified name.
4050         * parse.y (parse_finish_call_expr): Use
4051         adjust_result_of_qualified_name_lookup.
4052         * search.c (adjust_result_of_qualified_name_lookup): New function.
4053         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
4054         accessing OFFSET_TYPEs directly.
4056 2002-08-08  Mike Stump  <mrs@apple.com>
4058         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
4059         (type_decays_to): Likewise.
4060         * class.c (find_final_overrider): Likewise.
4061         (maybe_note_name_used_in_class): Likewise.
4062         * decl.c (current_tmpl_spec_kind): Likewise.
4063         (add_binding): Likewise.
4064         (push_class_binding): Likewise.
4065         (duplicate_decls): Likewise.
4066         (layout_var_decl): Likewise.
4067         (grokfndecl): Likewise.
4068         (grokdeclarator): Likewise.
4069         (check_default_argument): Likewise.
4070         * decl2.c (handle_class_head): Likewise.
4071         * error.c (dump_template_decl): Likewise.
4072         * init.c (build_offset_ref): Likewise.
4073         * pt.c (check_specialization_scope): Likewise.
4074         (determine_specialization): Likewise.
4075         (check_explicit_specialization): Likewise.
4076         (maybe_check_template_type): Likewise.
4077         (process_partial_specialization): Likewise.
4078         (check_default_tmpl_args): Likewise.
4079         (push_template_decl_real): Likewise.
4080         (convert_template_argument): Likewise.
4081         (try_class_unification): Likewise.
4082         (get_bindings_real): Likewise.
4083         (do_decl_instantiation): Likewise.
4084         * semantics.c (begin_function_definition): Likewise.
4085         (finish_member_declaration): Likewise.
4086         (check_multiple_declarators): Likewise.
4087         * typeck.c (comp_array_types): Likewise.
4088         (comptypes): Likewise.
4089         (expr_sizeof): Likewise.
4090         (build_binary_op): Likewise.
4091         (dubious_conversion_warnings): Likewise.
4092         (check_return_expr): Likewise.
4094 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
4096         * typeck.c (build_class_member_access_expr): Do not return
4097         error_mark_node when no error has occurred.
4099 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4101         * typeck.c (build_component_addr): Remove.
4102         (build_unary_op): Just check it's not a bitfield, and then build
4103         an ADDR_EXPR.
4105 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4107         * class.c (convert_to_base): Correct check for error_mark_node.
4108         (create_vtable_ptr): Remove unused VFUNS_P parm.
4110 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
4112         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
4114 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
4116         Rework build_component_ref.
4117         * call.c (build_vfield_ref): Do not go through build_component_ref.
4118         (build_field_call): Use build_class_member_access_expr.
4119         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
4120         (build_object_call): Likewise.
4121         * class.c (convert_to_base): New function.
4122         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
4123         (instantiate_type): Handle BASELINKs.
4124         * cp-tree.def (BASELINK): New tree code.
4125         * cp-tree.h (BASELINK_P): Reimplement.
4126         (SET_BASELINK_P): Remove.
4127         (BASELINK_BINFO): Reimplement.
4128         (BASELINK_FUNCTIONS): Likewise.
4129         (BASELINK_ACCESS_BINFO): Likewise.
4130         (BASELINK_OPTYPE): Likewise.
4131         (convert_to_base): New function.
4132         (name_p): Likewise.
4133         (build_object_ref): Remove.
4134         (build_component_ref_1): Likewise.
4135         (build_component_ref): Likewise.
4136         (build_x_component_ref): Likewise.
4137         (build_class_member_access_expr): New function.
4138         (finish_class_member_access_expr): Likewise.
4139         (build_ptrmemfunc_access_expr): Likewise.
4140         * decl.c (grokdeclarator): Handle BASELINKs.
4141         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
4142         finish_class_member_access_expr.
4143         (arg_assoc): Handle BASELINKs.
4144         (do_class_using_decl): Likewise.
4145         * error.c (dump_decl): Likewise.
4146         (dump_expr): Use build_ptrmemfunc_access_expr.
4147         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
4148         destructors.
4149         (build_throw): Use BASELINK_FUNCTIONS.
4150         * init.c (perform_member_init): Use
4151         build_class_member_access_expr.
4152         (build_offset_ref): Handle BASELINKs.  Use
4153         build_class_member_access_expr.
4154         * method.c (hack_identifier): Likewise.
4155         * parse.y (do_id): Use BASELINK, not TREE_LIST.
4156         (primary): Remove uses of build_object_ref.
4157         * pt.c (lookup_template_function): Handle BASELINKs.
4158         (resolve_overloaded_unification): Likewise.
4159         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
4160         (lookup_field): Use BASELINK, not TREE_LIST.
4161         (lookup_fnfiels): Likewise.
4162         (setup_class_bindings): Likewise.
4163         * semantics.c (finish_object_call_expr): Do not use
4164         build_method_call when we already know what function is being
4165         called.
4166         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
4167         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
4168         TREE_CHAIN.
4169         (name_p): New function.
4170         * typeck.c (build_object_ref): Remove.
4171         (build_component_ref_1): Likewise.
4172         (build_x_component_ref): Likewise.
4173         (build_class_member_access_expr): New function.
4174         (finish_class_member_access_expr): Likewise.
4175         (build_ptrmemfunc_access_expr): Likewise.
4176         (get_member_function_from_ptrfunc): Use
4177         build_ptrmemfunc_access_expr.
4178         (build_binary_op): Likewise.
4179         (build_unary_op): Likewise.
4180         (build_ptrmemfunc): Likewise.
4181         (pfn_from_ptrmemfunc): Likewise.
4182         * typeck2.c (build_m_component_ref): Adjust comment.
4184 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
4186         * Make-lang.in (CXX_C_OBJS): Update.
4187         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
4188         * cp-tree.h (cxx_decode_option): Remove.
4189         * decl2.c (compare_options, lang_f_options, unsupported_options,
4190         cxx_decode_option): Remove.
4192 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
4194         * typeck.c (build_x_unary_op): Handle pointer-to-member.
4196 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
4198         * class.c: Don't include obstack.h.
4199         (popclass):
4200         * decl2.c: Delete bogus comment.
4201         * error.c: Don't include obstack.h.
4202         * except.c: Likewise.
4203         (dump_type): Correct comment.
4204         * method.c: Don't include obstack.h.
4205         * tree.c: Likewise.
4207 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
4209         Fix PR/2213
4210         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
4211         expressions to pointer-to-data-member of pointer-to-member-functions.
4213 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
4215         * cvt.c (ocp_convert): Delete obsolete code.
4216         * parse.y (permanent_obstack): Delete declaration.
4217         * pt.c (permanent_obstack): Delete declaration.
4218         * repo.c (permanent_obstack): Delete declaration.
4219         (open_repo_file): Use xmalloc instead of permanent_obstack.
4220         (init_repo): Use xstrdup instead of permanent_obstack.
4222 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
4224         * cp-tree.h (VF_DERIVED_VALUE): Remove.
4225         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
4227 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
4229         PR 7470.
4230         C++ ABI change - vfunc ordering.
4231         * class.c (add_virtual_function): Remove.
4232         (dfs_modify_all_vtables): Take list of all declared
4233         virtuals. Assign all that are not in primary base.
4234         (check_for_override): Adjust comments.
4235         (create_vtable_ptr): Take single list of virtuals. Build chain
4236         of declared virtuals here.
4237         (layout_class_type): Take single list of virtuals. Adjust.
4238         (finish_struct_1): Keep virtuals on single list. Adjust.
4240 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4242         * init.c (build_member_call): Use build_new_method_call, not
4243         build_method_call.
4245 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
4247         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
4249 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
4251         * call.c (build_method_call): Issue a more helpful error message
4252         about ambiguous method names.
4254 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
4256         * tree.c (build_shared_int_cst): Make cache file scope, and
4257         GTY it.
4259 2002-08-02  Jason Merrill  <jason@redhat.com>
4261         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
4262         (cp_expr_size): New fn.
4263         * call.c (build_over_call): Lose empty class hackery.
4264         (convert_arg_to_ellipsis): Promote non-POD warning to error.
4265         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
4267         * semantics.c (expand_body): Do tree optimization in the function
4268         context, too.
4270 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
4272         * cp-tree.h: Move all warning and flag declarations to c-common.h.
4273         * decl.c: Move all warning and flag variables to c-common.c.
4274         * decl2.c: Move all warning and flag variables to c-common.c.
4275         * lex.c (flag_digraphs): Remove.
4276         (warn_traditional): Now in c-common.c.
4278 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
4280         * call.c (build_field_call): Do not look up the field by name.
4281         (build_method_call): Simplify.
4282         (struct z_candidate): Add access_path and conversion_path.  Remove
4283         basetype_path.
4284         (convert_class_to_reference): Adjust use of
4285         add_function_candidate.
4286         (add_candidate): Add conversion_path argument.
4287         (add_function_candidate): Use it.
4288         (add_conv_dndidate): Likewise.
4289         (build_builtin_candidate): Likewise.
4290         (add_template_candidate_real): Add conversion_path argument.
4291         (add_template_conv_candidate): Likewise.
4292         (add_template_candidate): Likewise.
4293         (build_user_type_conversion_1): Use it.
4294         (build_new_function_call): Remove name lookup code.  Adjust use of
4295         add_template_candidate and add_function_candidate.
4296         (build_new_op): Likewise.
4297         (convert_like_real): Use build_special_member_call.
4298         (build_over_call): Use cand->conversion_path.
4299         (build_special_member_call): New method.
4300         (build_new_method_call): Remove name lookup code.
4301         * cp-tree.def (OFFSET_REF): Update documentation.
4302         (TEMPLATE_ID_EXPR): Likewise.
4303         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
4304         (BASELINK_OPTYPE): Likewise.
4305         (build_new_method_call): Adjust prototype.
4306         (build_special_member_call): New method.
4307         (build_baselink): New method.
4308         (build_offset_ref_call_from_tree): Likewise.
4309         (build_call_from_tree): Likewise.
4310         (finish_qualified_call_expr): Remove.
4311         (finish_call_expr): Adjust prototype.
4312         (build_x_function_call): Remove.
4313         * cvt.c (ocp_convert): Use build_special_member_call.
4314         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
4315         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
4316         CALL_EXPR.
4317         (build_offset_ref_call_from_tree): New function.
4318         (build_call_from_tree): Likewise.
4319         * init.c (expand_cleanup): Use build_special_member_call.
4320         (expand_default_init): Likewise.
4321         (build_member_call): Use finish_call_expr.
4322         (build_new_1): Use build_special_member_call.
4323         (push_base_cleanups): Likewise.
4324         * method.c (do_build_assign_ref): Likewise.
4325         * parse.y (template_id): Do not pass a COMPONENT_REF to
4326         lookup_template_function.
4327         (primary): Use parse_finish_call_epxr, not finish_call_expr.
4328         (parse_finish_call_expr): New function.
4329         * pt.c (lookup_template_function): Add assertions.
4330         * search.c (lookup_base): Allow T to be a binfo.
4331         (build_baselink): New function.
4332         (lookup_member): Use it.
4333         * semantics.c (finish_call_expr): Do not do name lookup.
4334         (finish_object_call_expr): Remove #if 0'd code.
4335         (finish_qualified_call_expr): Remove.
4336         * typeck.c (build_x_function_call): Remove.
4337         (build_static_case): Use build_special_member_call.
4338         * typeck2.c (build_functional_cast): Likewise.
4340 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4342         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
4344 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
4346         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
4348 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
4350         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
4351         documentation.
4353 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
4355         * cp-tree.h: Comment typo fix.
4357 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
4359         * spew.c (space_for_token): Allocate zeroed memory for a new token
4360         chunk.
4362 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4364         * decl.c (builtin_function_1): No need to explicitly mark
4365         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
4367 2002-07-27  Roger Sayle  <roger@eyesopen.com>
4369         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
4371 2002-07-26  Jason Merrill  <jason@redhat.com>
4373         * call.c (build_over_call): Likewise.
4374         (cp_convert_parm_for_inlining): New fn.
4375         (convert_for_arg_passing): New fn.
4376         (convert_default_arg, build_over_call): Use it.
4377         (type_passed_as): New fn.
4378         * pt.c (tsubst_decl): Use it.
4379         * decl2.c (cp_build_parm_decl): New fn.
4380         (build_artificial_parm): Use it.
4381         (start_static_storage_duration_function): Likewise.
4382         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
4383         (grokparms): Don't mess with DECL_ARG_TYPE.
4384         * typeck.c (convert_arguments): Use convert_for_arg_passing.
4385         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4386         Define.
4387         * cp-tree.h: Declare new fns.
4389 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
4391         * cp-tree.h (flag_operator_names): Remove.
4392         * decl2.c (flag_operator_names): Remove.
4393         (lang_f_options): Remove operator-names.
4394         * lex.c (D_OPNAME): Remove.
4395         (reswords): Remove operator names.
4396         (rid_to_yy): Remove operator names.
4397         (init_reswords): No need to handle D_OPNAME.
4398         * spew.c (read_process_identifier): There are no operator
4399         names.
4401 2002-07-26  Jason Merrill  <jason@redhat.com>
4403         * dump.c (cp_dump_tree): Call c_dump_tree.
4404         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4406 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4408         * error.c (print_whitespace): Remove.
4409         * g++spec.c (LIBUNWIND): Move.
4410         * mangle.c (mangled_position, write_signed_number): Remove.
4412 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
4414         * decl2.c (cxx_decode_option): Similarly.
4416 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
4418         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
4419         (cxx_sizeof_or_alignof_type): Take a third argument.
4420         (cxx_sizeof): Adjust definition.
4421         (cxx_alignof): Likewise.
4422         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
4423         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
4424         complaining.
4425         (c_sizeof_nowarn): Remove definition.
4426         (build_unary_op): Use cxx_sizeof_nowarn.
4428 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
4430         * tree.c (cp_build_qualified_type_real): When copying
4431         pointer-to-method types, unshare the record that holds
4432         the cached pointer-to-member-function type.
4434 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4436         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
4438 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
4440         Fix PR/7363:
4441         * typeck.c (cxx_sizeof_or_alignof_type): New function.
4442         (c_sizeof): Remove definition.
4443         (expr_sizeof): Use cxx_sizeof.
4444         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
4445         * decl.c (finish_destructor_body): Use cxx_sizeof.
4446         * semantics.c (finish_alignof): Likewise.
4447         (finish_alignof): Use cxx_alignof.
4448         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
4449         (cxx_sizeof_or_alignof_type): Declare.
4450         (my_friendly_assert): Move to ../c-common.h.
4452 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
4454         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
4456 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4458         PR c++/7347, c++/7348
4459         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
4460         * decl.c (make_typename_type): Use it.
4461         (make_unbound_class_template): Likewise.
4462         (lookup_name_real): Don't call type_access_control if scope is
4463         template parameter dependent.
4464         * parse.y (template_arg): Call make_unbound_class_template with
4465         tf_parsing set.
4466         (nest_name_specifier): Call make_typename_type with tf_parsing set.
4467         (typename_sub0): Likewise.
4468         (typename_sub1): Likewise.
4469         (instantiate_decl): Push class scope.
4470         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
4471         for both static variable and member function template.
4472         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
4473         and arguments.
4474         * search.c (type_access_control): Do type access for TEMPLATE_DECL
4475         too.
4477 2002-07-20  Roger Sayle  <roger@eyesopen.com>
4479         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
4480         test by using positive_option.  Make whitespace consistent.
4482 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
4484         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
4485         members with 'locus'.  Adjust use throughout.
4486         (struct feed):  Likewise.
4487         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
4488         Adjust use.
4489         (snarf_defarg): Use error(), not error_with_file_and_line().
4491 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
4493         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
4494         cpp_options is included.
4496 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4498         PR c++/2862, c++/2863
4499         * pt.c (determine_specialization): Compare the length of
4500         TYPE_ARG_TYPES.  Tidy.
4502 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4504         PR c++/3797
4505         * decl.c (duplicate_decls): Don't propagate inlining parameters from
4506         olddecl to newdecl when newdecl is a specialization of the
4507         instantiation olddecl.
4509 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4511         PR c++/4802, c++/5387
4512         * decl.c (make_typename_type): Use enforce_access.
4514 2002-07-17  Scott Snyder <snyder@fnal.gov>
4516         PR c++/7320
4517         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
4519 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
4521         * class.c (add_method): Correct handling of conversion operators.
4523 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
4525         PR c++/7224
4526         * class.c (add_method): Simplify.
4528 2002-07-11  Jason Merrill  <jason@redhat.com>
4530         PR c++/7279
4531         * tree.c (cp_copy_res_decl_for_inlining): Also copy
4532         TREE_ADDRESSABLE.
4534 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
4536         * pt.c (template_parm_this_level_p, push_template_decl_real):
4537         Pass depth as int pointer.
4539 2002-07-11  Tim Josling  <tej@melbpc.org.au>
4541         Remove front end hard coding from gengtype.c.
4543         * config-lang.in (gtfiles): Add files needed for this front end.
4545 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
4547         * cp-tree.h (unqualified_name_lookup_error): Declare it.
4548         (begin_function_definition): Adjust prototype.
4549         * lex.c (unqualified_name_lookup_error): New function, split out
4550         from ...
4551         (do_identifier): ... here.
4552         * parse.y (parse_begin_function_definition): New function.
4553         (fn.def1): Use it.
4554         * semantics.c (begin_function_definition): Accept decl-specifiers
4555         and attributes as separate parameters.
4557 2002-07-10  Jason Merrill  <jason@redhat.com>
4559         PR c++/6255
4560         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
4561         modifying the old one.
4563 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
4565         * cp-tree.h (constructor_name_p): Declare it.
4566         (check_template_template_default_arg): Likewise.
4567         * class.c (handle_using_decl): Use constructor_name_p.
4568         * decl.c (grokdeclarator): Likewise.
4569         * decl2.c (constructor_name_p): Define it.
4570         * init.c (build_member_call): Use constructor_name_p.
4571         * parse.y (template_parm): Use check_template_template_default_arg.
4572         * pt.c (check_explicit_specialization): Use constructor_name_p.
4573         * semantics.c (check_template_template_default_arg): New function.
4575 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4577         * pt.c (can_complete_type_without_circularity): Add static to
4578         function definition.
4580 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
4582         * cp-tree.h (have_extern_spec): Declare it
4583         * decl.c (have_extern_spec): Define it.
4584         (start_decl): Eliminate use of used_extern_spec.
4585         (start_function): Likewise.
4586         * parse.y (have_extern_spec): Remove declaration.
4587         (used_extern_spec): Likewise.
4588         (frob_specs): Eliminate use of used_extern_spec.
4589         (.hush_warning): Likewise.
4591 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4593         * Make-lang.in (cp/parse.o): Depend on decl.h.
4594         * cp-tree.h (do_decl_instantiation): Change prototype.
4595         * parse.y: Include decl.h.
4596         (parse_decl_instantiation): New function.
4597         (explicit_instantiation): Use it.
4598         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
4599         and DECLSPECS.
4601 2002-07-07  Roger Sayle  <roger@eyesopen.com>
4603         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
4604         constructor and destructor tests when passed a TEMPLATE_DECL.
4606 2002-07-05  Jason Merrill  <jason@redhat.com>
4608         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
4609         pointers.
4611         PR optimization/7145
4612         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
4614 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4616         Repair damage on weak-impared targets caused by my previous patch.
4617         * cp-tree.h (import_export_tinfo): Add parameter.
4618         * decl2.c (import_export_tinfo): Add parameter, post adjust
4619         DECL_COMDAT.
4620         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
4621         import_export_tinfo.
4623 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4625         PR c++/6944
4626         * init.c (build_aggr_init): Remove qualifiers of init before calling
4627         build_vec_init.
4628         (build_vec_init): Flatten multi-dimensional array during cleanup.
4629         (build_vec_delete_1): Abort if the type of each element is array.
4631 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
4633         * pt.c (instantiate_class_template): Fix typo.
4635 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4637         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
4638         by CVS conflict in my last patch.
4640 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4642         PR c++/6716
4643         * pt.c (can_complete_type_without_circularity): New function.
4644         (instantiate_class_template): Use it.
4645         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
4646         message due to incomplete fields.
4648 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
4650         PR c++/7112
4651         * mangle.c (write_expression): Add mangling for sizeof when
4652         applied to a type.
4653         * operators.def: Remove stale comment.
4655 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
4657         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
4658         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
4659         (tinfo_decl_type): Replace with ...
4660         (type_info_ptr_type): ... this.
4661         (import_export_tinfo): Declare.
4662         (tinfo_decl_p): Rename to ...
4663         (unemitted_tinfo_decl_p): ... this.
4664         * decl2.c (import_export_decl): Break out tinfo handling into ...
4665         (import_export_tinfo): ... here. New function.
4666         (finish_file): Adjust.
4667         * rtti.c (TINFO_REAL_NAME): New macro.
4668         (init_rtti_processing): Create the tinfo types.
4669         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
4670         (get_tinfo_decl): Adjust.
4671         (get_tinfo_ptr): New function.
4672         (get_type_id): Use it.
4673         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
4674         (ptr_initializer): Use get_tinfo_ptr.
4675         (ptm_initializer): Likewise.
4676         (synthesize_tinfo_var): Break into ...
4677         (get_pseudo_ti_init): ... this. Just create the initializer.
4678         (get_pseudo_ti_desc): .. and this.
4679         (create_real_tinfo_var): Remove.
4680         (create_pseudo_type_info): Don't create the vtable decl here.
4681         (get_vmi_pseudo_type_info): Remove.
4682         (create_tinfo_types): Adjust.
4683         (tinfo_decl_p): Rename to ...
4684         (unemitted_tinfo_decl_p): ... here. Adjust.
4685         (emit_tinfo_decl): Adjust. Create the initializer.
4687 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
4689         PR c++/6695
4690         * pt.c (tsubst_friend_class): Substitute into the context of the
4691         friend before using it.
4693 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
4695         * cp-tree.h (xref_tag): Change prototype.
4696         (handle_class_head): Likewise.
4697         (build_x_component_ref): Likewise.
4698         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
4699         (xref_tag): Take attributes as a separate parameter.
4700         (xref_tag_from_type): Adjust call to xref_tag.
4701         * decl2.c (build_expr_from_tree): Adjust call to
4702         build_x_component_ref.
4703         (handle_class_head): Take attributes as a separate parameter.
4704         * parse.y (parse_xref_tag): New function.
4705         (parse_handle_class_head): Likewise.
4706         (primary): Use parse_xref_tag.
4707         (class_head_decl): Use parse_handle_class_head.
4708         (class_head_defn): Likewise.
4709         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
4710         (build_dynamic_cast_1): Likewise.
4711         (create_pseudo_type_info): Likewise.
4712         (emit_support_tinfos): Likewise.
4713         * typeck.c (build_object_ref): Adjust call to
4714         build_x_component_ref.
4715         (build_x_component_ref): Remove protect parameter.
4717 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
4719         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
4720         * class.c (handle_using_decl): Likewise.
4721         (instantiate_type): Likewise.
4722         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
4723         (xref_basetypes): Change prototype.
4724         (begin_mem_initializers): New function.
4725         (get_overloaded_fn): Likewise.
4726         * decl.c (xref_basetypes): Simplify.
4727         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
4728         * init.c (build_offset_ref): Likewise.
4729         * parse.y (base_init): Use begin_mem_initializers().
4730         (structsp): Adjust call to xref_basetypes.
4731         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
4732         (instantiate_class_template): Adjust call to xref_basetypes.
4733         * semantics.c (begin_mem_initializers): New function.
4734         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
4735         (really_overlaoded_fn): Likewise.
4736         (get_overloaded_fn): New function.'
4737         (get_first_fn): USe BASELINK_FUNCTIONS.
4739 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
4741         * cp-tree.h (SCALAR_TYPE_P): New macro.
4742         (check_for_out_of_scope_variable): New function.
4743         (at_class_scope_p): Likewise.
4744         (finish_fname): Likewise.
4745         * class.c (finish_struct): Use at_function_scope_p.
4746         * decl.c (check_for_out_of_scope_variable): New function, split
4747         out from do_identifier.
4748         (finish_enum): Use at_function_scope_p.
4749         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
4750         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
4751         (primary): Use at_function_scope_p.
4752         * search.c (at_class_scope_p): New function.
4753         * semantics.c (finish_fname): Likewise.
4754         (check_multiple_declarators): Use at_function_scope_p.
4756 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
4758         * parse.y (parse_scoped_id): New function.
4759         (primary): Use it.
4760         * cp-tree.h (do_scoped_id): Adjust declaration.
4761         * lex.c (do_scoped_id): Remove call to yylex.
4762         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
4763         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
4764         expanding it inline.
4766 2002-06-23  Matt Thomas  <matt@3am-software.com>
4768         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
4769         "#if VMS_TARGET".
4771 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4773         * mangle.c (integer_type_codes): Const-ify.
4775 2002-06-20  Richard Henderson  <rth@redhat.com>
4777         PR c++/6747
4778         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
4779         Call put_var_into_stack.
4781 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4783         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
4784         array size calculation.
4786 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4788         PR c++/6892
4789         * pt.c (tsubst_expr): Handle FILE_STMT.
4791 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4793         PR c++/6723
4794         * pt.c (lookup_template_class): Don't build complete argument of
4795         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
4796         argument.
4798 2002-06-19  Akim Demaille  <akim@epita.fr>
4800         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
4801         decl.h's TYPENAME.
4802         * spew.c, lex.c: Adjust.
4803         * parse.y (explicit_instantiation): Add empty action to override
4804         the default $$ = $1 where it introduces a type clash.
4806 2002-06-14  Jason Merrill  <jason@redhat.com>
4808         * semantics.c (begin_for_stmt): Push the 'for' scope before
4809         adding the FOR_STMT.
4811         C++ ABI changes.
4812         * class.c (build_base_field): Set DECL_PACKED.
4813         (layout_class_type): Don't use tail padding of PODs.
4814         * mangle.c (write_unqualified_name): Fix template conversion op
4815         mangling.
4817 2002-06-16  Richard Henderson  <rth@redhat.com>
4819         PR opt/6793
4820         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
4821         after template instantiation.
4823 2002-06-16  Richard Henderson  <rth@redhat.com>
4825         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
4827 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4829         * cp-tree.h (compiler_error): Remove declaration.
4830         * lex.c (compiler_error): Remove definition.
4832 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
4834         * g++spec.c (LIBUNWIND): New.
4835         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
4837 2002-06-13  Jessica Han  <jessica@cup.hp.com>
4839         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
4840         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
4841         (build_vbase_offset_vtbl_entries): Likewise.
4842         * rtti.c (build_headof): Likewise.
4843         (get_tinfo_decl_dynamic): Likewise.
4844         (create_pseudo_type_info): Likewise.
4846 2002-06-12  Stan Shebs  <shebs@apple.com>
4848         * mpw-config.in: Remove file, no longer used.
4849         * mpw-make.sed: Ditto.
4851 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
4853         * decl2.c: Update call to cpp_handle_option.
4855 2002-06-07  H.J. Lu  (hjl@gnu.org)
4857         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
4859 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
4861         * error.c (cp_error_at): Fix typo.
4863 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
4865         * error.c (cp_diagnostic_starter): Adjust call.
4866         (maybe_print_instantiation_context): Change prototype to take a
4867         'diagnostic_info *'.
4868         (print_instantiation_full_context): Likewise.
4869         (print_instantiation_partial_context): Likewise.
4870         (cp_diagnostic_starter): Likewise.
4871         (cp_diagnostic_finalizer): Likewise.
4872         (cp_print_error_function): Likewise.
4873         (cp_printer): Take a secondary parameter as a 'text_info *'.
4874         Remove output_state savings.  Adjust calls.
4876 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4878         * pt.c (inline_parm_levels): Mark for GC.
4880         * mangle.c (start_mangling): Allocate G.substitutions here...
4881         (init_mangle): ... rather than here.
4882         (finish_mangling): Clear the varray pointer when done with it.
4883         * spew.c (yylexstring): Don't use VARRAY_FREE.
4884         * search.c (bfs_walk): Don't use VARRAY_FREE.
4885         * decl2.c (pending_statics): Use gengtype to mark.
4886         (deferred_fns): Likewise.
4887         (ssdf_decls): Likewise.
4888         (init_decl2): Delete.
4889         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
4890         (cxx_init_decl_processing): Don't call init_decl2.
4891         (cxx_pop_function_context): Don't use VARRAY_FREE.
4892         * cp-tree.h (struct saved_scope): No need for special marking
4893         of varrays.
4894         (struct language_function): Likewise.
4895         (local_classes): Use gengtype to mark.
4896         (init_decl2): Delete prototype.
4897         * class.c (init_class_processing): Don't use
4898         ggc_add_tree_varray_root.
4899         (build_vtbl_initializer): Don't use VARRAY_FREE.
4901         * decl.c (typename_compare): Don't use same_type_p.
4903         * decl.c: Include hashtab.h instead of hash.h.
4904         (typename_hash): Update to use htab_h.
4905         (typename_compare): Likewise.
4906         (typename_htab): Use gengtype to mark.
4907         (build_typename_type): Update to use htab_h.
4908         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
4910         * Make-lang.in (gt-cp-tree.h): New rule.
4911         (cp/tree.o): Depend on gt-cp-tree.h.
4912         * config-lang.in (gtfiles): Add cp/tree.c.
4913         * tree.c: Include gt-cp-tree.h.
4914         (list_hash_table): Use gengtype to mark.
4915         (init_tree): Use gengtype to mark trees.
4917         * Make-lang.in (cp/decl.o): Add debug.h dependency.
4918         * call.c (struct z_candidate): Use gengtype.
4919         (USER_CONV_CAND): Use WRAPPER_ZC.
4920         (convert_class_to_reference): Use build_zc_wrapper.
4921         (build_type_conversion_1): Likewise.
4922         (build_over_call): Use WRAPPER_ZC.
4923         (add_warning): Use build_zc_wrapper.
4924         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
4925         * cp-tree.h (struct lang_identifier): Use gengtype.
4926         (struct template_parm_index_s): Likewise.
4927         (struct ptrmem_cst): Likewise.
4928         (struct tree_binding): Likewise.
4929         (struct tree_overload): Likewise.
4930         (struct tree_srcloc): Likewise.
4931         (struct tree_wrapper): Likewise.  Also modify to have a pointer
4932         to struct z_candidate rather than void.
4933         (enum cp_tree_node_structure_enum): New.
4934         (union lang_tree_node): New.
4935         (cxx_mark_tree): Delete prototype.
4936         (cp_tree_node_structure): New prototype.
4937         (build_ptr_wrapper): Delete prototype.
4938         (build_int_wrapper): Delete prototype.
4939         (build_zc_wrapper): New prototype.
4940         * decl.c: Include debug.h
4941         (cxx_mark_tree): Delete.
4942         (cp_tree_node_structure): New.
4943         * tree.c (build_ptr_wrapper): Delete.
4944         (build_int_wrapper): Delete.
4945         (build_zc_wrapper): New.
4947         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
4948         Correct typo.  Patch from k_fukui@highway.ne.jp.
4950         * semantics.c (current_stmt_tree): Update for change to
4951         struct language_function.
4952         (finish_mem_initializers): Likewise.
4953         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
4954         * cp-tree.h (struct language_function): Rename from
4955         cp_language_function.  Change all uses.
4956         (cp_function_chain): Don't need to cast.
4958         * class.c (duplicate_tag_error): Reset discriminator.
4959         (check_bases_and_members): Update for data structure changes.
4960         * cp-tree.h (struct lang_id2): Use gengtype.
4961         (flagged_type_tree): Likewise.
4962         (SET_LANG_ID): Use GGC on struct lang_id2.
4963         (struct cp_language_function): Use gengtype.  Remove field
4964         'x_vcalls_possible_p'.
4965         (current_vcalls_possible_p): Delete.
4966         (struct lang_type_header): New.
4967         (struct lang_type_class): Rename from struct lang_type.  Include
4968         struct lang_type_header.
4969         (struct lang_type_ptrmem): New.
4970         (struct lang_type): New.
4971         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
4972         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
4973         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
4974         (struct lang_decl_flags): Use gengtype.  Add discriminators.
4975         (struct lang_decl): Use gengtype.  Add and use discriminators.
4976         Update the macros that reference moved fields.
4977         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
4978         (SET_DECL_THUNK_P): Set discriminator too.
4979         (clear_inline_text_obstack): Delete prototype.
4980         (finish_inline_definitions): Delete prototype.
4981         (mark_pending_inlines): Delete prototype.
4982         (lang_check_failed): New prototype.
4983         * decl.c (struct named_label_use_list): Use gengtype.
4984         (struct named_label_list): Likewise.
4985         (mark_binding_level): Delete.
4986         (mark_named_label_lists): Delete.
4987         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
4988         (cxx_init_decl_processing): Use generated marker routine.
4989         (begin_destructor_body): Delete dead set to
4990         current_vcalls_possible_p.
4991         (mark_lang_function): Delete.
4992         (mark_cp_function_context): Delete.
4993         (lang_mark_tree): Use generated marker routines.
4994         * decl2.c (start_objects): Set discriminator when setting
4995         GLOBAL_INIT_PRIORITY.
4996         * lex.c (retrofit_lang_decl): Set discriminators.
4997         (copy_lang_type): Update for changes to lang_type structure.
4998         (cp_make_lang_type): Set discriminator.
4999         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
5000         * search.c: Include ggc.h.
5001         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
5002         (finish_inline_definitions): Delete.
5003         * spew.c (struct token): Use gengtype.
5004         (struct token_chunk): New.
5005         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
5006         (struct feed): Use gengtype.
5007         (feed_obstack): Delete.
5008         (feed): Mark as GC root.
5009         (pending_inlines): Mark as GC root.
5010         (pending_inlines_tail): Likewise.
5011         (processing_these_inlines): Likewise.
5012         (token_obstack): Make static.
5013         (first_token): Likewise.
5014         (init_spew): Don't initialize deleted things; use gengtype for roots.
5015         (clear_inline_text_obstack): Delete.
5016         (feed_input): Use GC for struct feed.  Update for changes to
5017         struct unparsed_text.
5018         (mark_pending_inlines): Delete.
5019         (next_token): Rename from add_token.  Change all callers.  Update
5020         for changes to struct unparsed_text.
5021         (space_for_token): New.
5022         (remove_last_token): New.
5023         (alloc_unparsed_text): New.
5024         (snarf_block): Take an unparsed_text.  Update for changes to struct
5025         unparsed_text.
5026         (snarf_method): Update for changes to struct unparsed_text.
5027         (snarf_defarg): Update for changes to struct unparsed_text.
5028         * tree.c (lang_check_failed): New.
5030         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
5031         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
5032         (cp/spew.o): Add dependency on gt-<filename>.h.
5033         (cp/decl2.o): Add dependency on gt-<filename>.h.
5034         (cp/call.o): Add dependency on gt-<filename>.h.
5035         (cp/pt.o): Add dependency on gt-<filename>.h.
5036         (cp/repo.o): Add dependency on gt-<filename>.h.
5037         (cp/parse.o): Add dependency on gt-<filename>.h.
5038         * call.c: Use gengtype for roots.
5039         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
5040         decl2.c parse.y pt.c repo.c spew.c.
5041         * cp-tree.h: Use gengtype for roots.
5042         (struct saved_scope): Use GGC, gengtype.
5043         (cp_parse_init): Delete prototype.
5044         (init_pt): Delete prototype.
5045         * decl.c: Use gengtype for roots.
5046         (mark_saved_scope): Delete.
5047         (cxx_init_decl_processing): Don't call deleted initilisation
5048         routines.
5049         (signed_size_zero_node): Delete, unused.
5050         * decl.h: Use gengtype for roots.
5051         * decl2.c: Use gengtype for roots.
5052         * lex.h: Use gengtype for roots.
5053         * parse.y: Use gengtype for roots.
5054         (cp_parse_init): Delete.
5055         * pt.c: Use gengtype for roots.
5056         (init_pt): Delete.
5057         * repo.c: Use gengtype for roots.
5058         * spew.c: Use gengtype for roots.
5060         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
5061         (cp/decl.o): Add dependency on gtype-cp.h.
5062         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
5063         Include gtype-cp.h.  Allow for filename changes.
5065         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
5066         (cp/decl.o): Add cp/gt-decl.h dependency.
5067         * config-lang.in (gtfiles): New.
5068         * tree.h: Rename struct binding_level to struct cp_binding_level.
5069         * decl.c: Rename struct binding_level to struct cp_binding_level.
5070         Include cp/gt-decl.h.
5071         (struct cp_binding_level): Use gengtype.
5072         (make_binding_level): Use GGC on struct cp_binding_level.
5073         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
5074         (cxx_init_decl_processing): Mark free_binding_level as
5075         deletable.
5077         * decl.c (mark_cp_function_context): Update calling sequence.
5079         * decl.c (start_function): Don't free 'struct
5080         cp_language_function'.
5081         (pop_cp_function_context): Likewise.
5082         (save_function_data): Allocate it using GC.
5083         * semantics.c (genrtl_start_function): Don't free 'struct
5084         cp_language_function'.
5086 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
5088         * lang-specs.h: Use cpp_debug_options.
5090 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
5092         * mangle.c, tree.c: Include real.h.
5093         * Make-lang.in: Update dependency lists.
5095 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5097         * lex.c: Don't include c-lex.h.
5098         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
5100 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
5102         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
5104 2002-05-22  Richard Henderson  <rth@redhat.com>
5106         * decl.c (obscure_complex_init): Check for VAR_DECL
5107         before using DECL_THREAD_LOCAL.
5109 2002-05-22  Richard Henderson  <rth@redhat.com>
5111         * decl.c (check_tag_decl): Handle RID_THREAD.
5112         (obscure_complex_init): Reject run-time init of tls.
5113         (grokvardecl, grokdeclarator): Handle RID_THREAD.
5114         * lex.c (reswords): Add __thread.
5115         (rid_to_yy): Map RID_THREAD to SCSPEC.
5117 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
5119         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
5120         * cp-tree.h (cxx_post_options): Kill.
5121         * cp-lex.c (cxx_post_options): Kill.
5123 2002-05-21  Richard Henderson  <rth@redhat.com>
5125         * lex.c (rid_to_yy): Add RID_THREAD.
5127 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
5129         * init.c (build_vec_init): Test for trivial copy-assignment when
5130         copy-assigning arrays.
5132 2002-05-20  Andreas Jaeger  <aj@suse.de>
5134         * init.c (build_default_init): Remove unused variable.
5136 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
5138         * call.c (any_strictly_viable): New.
5139         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
5141 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5143         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
5145 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5147         PR c++/186, DR 259
5148         * pt.c (do_decl_instantiation): Don't complain explicit
5149         instantiation after explicit specialization.
5150         (do_type_instantiation): Likewise.
5152 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
5154         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
5155         renamed from...
5156         (complete_type_or_else): ... this.  Redefined as macro.
5157         (cxx_incomplete_type_diagnostic): Declare.
5158         (cxx_incomplete_type_error): Define as macro.
5159         * init.c (build_delete): Warn about incomplete types other than
5160         void, and use the built-in operator delete for them.
5161         * typeck.c (complete_type_or_diagnostic): Renamed from
5162         complete_type_or_else.  Added warn_only argument, passed to...
5163         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
5164         warnings or errors depending on new warn_only argument.  Renamed
5165         from...
5166         (cxx_incomplete_type_error): ... this.  New implementation in
5167         terms of cxx_incomplete_type_diagnostic.
5169 2002-05-18  Jason Merrill  <jason@redhat.com>
5171         PR c++/6611
5172         * decl2.c (import_export_decl): If we clear
5173         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
5175 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5177         PR c++/6620
5178         * pt.c (verify_class_unification): Don't check if PARM is template
5179         parameter dependent.  Simplify.
5180         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
5181         parameter dependent expression.
5183 2002-05-14  Jason Merrill  <jason@redhat.com>
5185         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
5186         Do set DECL_COMDAT.
5187         (synthesize_tinfo_var): Take the public decl.
5188         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
5189         (emit_tinfo_decl): Adjust.  Call import_export_decl.
5190         * decl2.c (import_export_decl): Simplify tinfo decl handling.
5192 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
5194         * cp-tree.h (struct lang_type): Added non_zero_init.
5195         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
5196         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
5197         * class.c (check_field_decls): Test non_zero_init.
5198         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
5199         zero-to-NULL conversions.
5200         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
5201         type that needs zero-initialization without zeros.
5202         (check_initializer_decl): Compute zero-initializer for types
5203         that require a non-trivial one.
5204         * init.c (build_forced_zero_init): New function.
5205         (build_default_init): Use it.
5206         * tree.c (zero_init_p): New function.
5207         * typeck2.c (force_store_init_value): New function.
5208         (process_init_constructor): Create non-trivial zero-initializers
5209         for array members and class fields.
5211 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
5213         * lang-specs.h: Remove redundant -lang-c++.
5215 2002-05-13  Jason Merrill  <jason@redhat.com>
5217         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
5218         (fixed_type_or_null): See through reference vars.
5219         (build_base_path): Vtable contents are constant.
5220         * typeck.c (get_member_function_from_ptrfunc): Likewise.
5222 2002-05-12  Jason Merrill  <jason@redhat.com>
5224         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
5225         structs are safe.
5227 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
5229         * cp-tree.h (flag_ansi): Remove.
5230         * decl2.c (flag_ansi): Remove.
5231         (cxx_decode_option): Set flag_iso and flag_undef.
5233 2002-05-09  Jason Merrill  <jason@redhat.com>
5235         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
5236         Use subtraction rather than a bitmask to get the index.
5237         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
5239         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
5241 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5243         * Make-lang.in (decl2.o): Update.
5244         * cp-tree.h (warn_multichar): Remove.
5245         * decl2.c: Include c-common.h.
5246         (warn_multichar): Remove.
5248 2002-05-03  Jason Merrill  <jason@redhat.com>
5250         * tree.c (build_cplus_array_type): Only const and volatile get
5251         special handling.
5253         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
5255 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
5257         ABI change, returning simple classes from functions.
5258         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
5259         TYPE_HAS_TRIVIAL_INIT_REF is false or
5260         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
5262 2002-04-30  Jason Merrill  <jason@redhat.com>
5264         PR debug/6436
5265         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
5266         anonymous class with a typedef if there are attributes.
5268 2002-04-29  Paul Eggert  <eggert@twinsun.com>
5270         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
5272 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
5274         PR c++/6477
5275         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
5276         non-NULL first.
5278 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
5280         PR c++/6492
5281         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
5282         enter that scope before name lookup.
5284         PR c++/6486
5285         * method.c (do_build_copy_constructor): Avoid building
5286         cv-qualified reference types.
5288 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
5290         PR c++/5719
5291         * decl.c (grok_op_properties): Assignment ops don't have to return
5292         by value. operator% should.
5294 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5296         PR c/6343
5297         * decl.c (duplicate_decls): Call merge_weak.
5299 2002-04-26  Richard Henderson  <rth@redhat.com>
5301         * parse.y (malloced_yyss, malloced_yyvs): New.
5302         (yyoverflow): Re-add.  Set them.
5303         (free_parser_stacks): New.
5305 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
5307         PR c++/6497
5308         * method.c (do_build_assign_ref): Pass a derivation to
5309         build_method_call when calling base class assignment operators.
5311 2002-04-26  Richard Henderson  <rth@redhat.com>
5313         * parse.y (yyoverflow): Revert.
5315 2002-04-26  Richard Henderson  <rth@redhat.com>
5317         PR c/3581
5318         * parse.y (string): Remove.  Update all uses to use STRING
5319         instead, and not call combine_strings.
5320         * rtti.c (tinfo_name): Use fix_string_type.
5321         * semantics.c (finish_asm_stmt): Don't call combine_strings.
5322         * spew.c (yylexstring): New.
5323         (read_token): Use it.
5325 2002-04-25  Richard Henderson  <rth@redhat.com>
5327         PR c/2161
5328         * parse.y (yyoverflow): New.
5330 2002-04-25  Jason Merrill  <jason@redhat.com>
5332         PR c++/5607
5333         * search.c (check_final_overrider): No longer static.
5334         * class.c (update_vtable_entry_for_fn): Call it.
5335         * cp-tree.h: Adjust.
5337 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5339         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
5340         * cp-tree.h (cxx_set_yydebug): Die.
5341         * lex.c (YYDEBUG): Get from c-lex.h.
5342         (cxx_set_yydebug): Remove.
5343         * parse.y: Include c-lex.h.
5344         (YYDEBUG): Get from c-lex.h.
5346 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
5348         PR c++/6438.
5349         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
5350         void.
5352 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5354         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
5355         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
5356         Redefine.
5357         * cp-tree.h (cp_attribute_table): Rename.
5358         * decl.c (lang_attribute_table): Remove declaration.
5359         (cxx_init_decl_processing): Don't set it.
5360         * tree.c (cp_attribute_table): Rename.
5362 2002-04-24  Jason Merrill  <jason@redhat.com>
5364         PR c++/6331
5365         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
5366         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
5367         The pedwarn for array assignment is now unconditional.
5368         * tree.c (build_cplus_array_type_1): Still process simple array types
5369         normally in templates.
5371         PR c++/6395
5372         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
5373         stuff for comdats.
5375 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
5377         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
5378         node with attributes.
5380 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
5382         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
5383         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
5385 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
5387         PR c++/6256:
5388         * pt.c (tsubst_friend_class): Handle templates with explicit
5389         nested names.
5391         PR c++/6331:
5392         * typeck.c (merge_types): Remember the cv-qualification of pointer
5393         types when merging them.
5395 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5397         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
5398         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5399         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
5400         cxx_mark_function_context): New.
5401         * decl.c (push_cp_function_context, pop_cp_function_context,
5402         mark_cp_function_context): Rename for consistency.
5403         (cxx_init_decl_processing): Don't set old hooks.
5405 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
5407         * call.c (convert_type_from_ellipsis): Rename, update.
5408         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
5409         * cp-tree.h (convert_type_from_ellipsis): Rename.
5410         * decl.c (cxx_init_decl_processing): Don't set hook.
5412 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5414         * call.c (build_new_method_call): Update.
5415         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
5416         * cp-tree.h (cxx_incomplete_type_error): New.
5417         * decl.c (grokdeclarator, grokparms): Update.
5418         * decl2.c (check_classfn): Update.
5419         * pt.c (tsubst): Update.
5420         * typeck.c (complete_type_or_else, expr_sizeof,
5421         decay_conversion): Update.
5422         * typeck2.c (incomplete_type_error): Rename.
5423         (add_exception_specifier): Update.
5425 2002-04-18  Jason Merrill  <jason@redhat.com>
5427         PR c++/5658
5428         * search.c (setup_class_bindings): A class template qualifies as a
5429         type binding.
5431 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
5433         PR c++/6316
5434         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
5435         before expanding.
5437 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
5439         * init.c (begin_init_stmts): Remove commented out code.
5440         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
5441         * semantics.c (begin_gobal_stmt_expr): Adjust call to
5442         expand_start_stmt_expr.
5444 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
5446         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
5447         dso_handle itself, to __cxa_atexit.
5449 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5451         * error.c (cxx_print_error_function): Adjust call to macros.
5453 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
5455         * class.c (layout_virtual_bases): Do all dsize computation on trees.
5457 2002-04-14  Jason Merrill  <jason@redhat.com>
5459         * typeck.c (get_member_function_from_ptrfunc): Don't do
5460         gratuitious division and multiplication on
5461         ptrmemfunc_vbit_in_delta targets.
5463 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5465         PR c++/5373.
5466         * semantics.c (finish_expr_stmt): Remember the type of the
5467         expression before any conversions are performed.
5469 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5471         PR c++/5189.
5472         * call.c (add_template_candidate_real): Do not treat member
5473         templates as copy constructors.
5475 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5477         * decl.c (duplicate_decls): Do not copy the RTL for a variable
5478         declaration if the old variable had an incomplete type and the new
5479         variable does not.
5480         (complete_vars): Do not call layout_decl for completed variables.
5482 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
5484         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
5485         with an explicit one.
5486         (follow_tag_typedef): New.
5487         (lookup_tag): Use it to extract the tag of an explicit typedef.
5488         (xref_tag): Likewise.
5490 2002-04-11  Andrew Haley  <aph@redhat.com>
5492         * typeck.c (type_after_usual_arithmetic_conversions):
5493         If two types have the same variant, return immediately.
5494         When two floating-point operands are the same precision:
5495           convert to float if one of the operands is float;
5496           if neither operand is one of the standard types, return the type
5497           of the first operand.
5499 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
5501         PR c++/5507
5502         * decl.c (make_typename_type): Remove implicit typenameness.
5504 2002-04-09  Jason Merrill  <jason@redhat.com>
5506         PR optimization/6189
5507         * semantics.c (genrtl_start_function): Don't free
5508         DECL_SAVED_FUNCTION_DATA for inline functions.
5510         * init.c (build_member_call): For now, don't convert to
5511         intermediate base if it would cause an error.
5513 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
5515         * parse.y (namespace_qualifier, maybe_identifier,
5516         begin_explicit_instantiation, end_explicit_instantiation,
5517         apparent_template_type, .finish_template_type,
5518         do_id, maybe_init, defarg_again, component_decl_1):
5519         Add ending ';', in accordance with POSIX.
5521 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
5523         PR c++/5571
5524         * class.c (layout_class_type): Remember incomplete static
5525         variables.
5526         (finish_struct_1): Call complete_vars, not
5527         hack_incomplete_structures.
5528         * cp-tree.h (hack_incomplete_structures): Rename to ...
5529         (complete_vars): ... this.
5530         (struct saved_scope): Remove incomplete.
5531         (namespace_scope_incomplete): Remove.
5532         * decl.c (struct binding_level): Remove incomplete.
5533         (incomplete_vars): New variable.
5534         (mark_binding_level): Don't mark incomplete.
5535         (print_binding_level): Don't print it.
5536         (mark_saved_scope): Don't mark incomplete.
5537         (pushdecl): Use maybe_register_incopmlete_var.
5538         (cxx_init_decl_processing): Register incomplete_vars for GC.
5539         (start_decl_1): Clarify error message.
5540         (hack_incomplete_vars): Remove.
5541         (maybe_register_incomplete_var): New function.
5542         (complete_vars): Likewise.
5544 2002-04-06  Jason Merrill  <jason@redhat.com>
5546         PR c++/4934
5547         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
5548         set before checking it.
5550         PR c++/525
5551         * init.c (build_member_call): Use build_scoped_ref.
5552         (resolve_offset_ref): Likewise.
5553         * call.c (build_scoped_method_call): Likewise.
5554         * tree.c (maybe_dummy_object): Kludge around current_class_type being
5555         wrong.
5556         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
5557         * cp-tree.h: Adjust.
5559         * init.c (push_base_cleanups): Just use build_scoped_method_call.
5561         PR c++/6179
5562         * method.c (implicitly_declare_fn): Pass unqualified type to
5563         synthesize_exception_spec.
5565 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5567         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5568         * cvt.c: Update comment.
5569         * init.c (expand_cleanup_for_base): Update.
5570         * semantics.c (finish_parenthesized_expr): Update.
5571         * typeck.c (cp_truthvalue_conversion): Update.
5573 2002-04-04  Jason Merrill  <jason@redhat.com>
5575         * semantics.c (finish_eh_cleanup): New fn.
5576         * cp-tree.h: Add prototype.
5577         * init.c (perform_member_init, expand_cleanup_for_base): Use
5578         finish_eh_cleanup.
5579         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
5580         * cp-tree.h: Remove references.
5581         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
5582         * dump.c (cp_dump_tree): Likewise.
5583         * pt.c (tsubst_expr): Likewise.
5584         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
5585         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
5586         * tree.c (cp_statement_code_p): Likewise.
5588         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
5590         PR c++/5636
5591         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
5592         cleanup for nrv.
5594         PR c++/5104
5595         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
5596         specifiers.
5597         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
5599 2002-04-03  Richard Henderson  <rth@redhat.com>
5601         * cp-lang.c (cxx_warn_unused_global_decl): New.
5602         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
5604 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5606         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
5607         * tree.c (init_tree): Don't set hook.
5609 2002-04-03  Roger Sayle  <roger@eyesopen.com>
5611         PR c++/5998:
5612         * decl.c (duplicate_decls): Don't mess with assembler names when
5613         redeclaring builtin functions as static.
5615 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5617         * call.c (build_addr_func): Update.
5618         * class.c (resolve_address_of_overloaded_function): Update.
5619         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5620         * cp-tree.h (cxx_mark_addressable): New.
5621         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
5622         * decl2.c (build_cleanup): Update.
5623         * except.c (build_throw): Update.
5624         * init.c (resolve_offset_ref): Update.
5625         * pt.c (convert_nontype_argument): Update.
5626         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
5627         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
5628         unary_complex_lvalue): Update.
5629         (mark_addressable): Rename.
5631 2002-04-01  Roger Sayle  <roger@eyesopen.com>
5633         PR c++/5998:
5634         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
5635         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
5636         but follow the SET_DECL_RTL idiom used elsewhere in the function.
5638 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5640         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5641         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5642         * decl.c (grokdeclarator): Update.
5643         * mangle.c (write_integer_cst): Update.
5644         * typeck.c (build_binary_op): Update.
5646 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5648         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
5649         * lex.c (cxx_init): Don't set hook.
5651 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5653         * Make-lang.in (error.o): Update.
5654         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5655         * cp-tree.h (struct diagnostic_context): Predeclare.
5656         (cxx_print_error_function): New.
5657         * error.c: Include langhooks-def.h.
5658         (lang_print_error_function): Rename.  Update.
5659         (init_error): Don't set hook.
5661 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5663         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
5664         Redefine.
5665         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
5666         * decl.c (finish_enum): Similarly.
5667         * error.c (dump_type): Similarly.
5668         * lex.c (cxx_init): Similarly.
5669         * mangle.c (write_builtin_type): Similarly.
5670         * typeck.c (comptypes): Similarly.
5672 2002-03-28  Roger Sayle  <roger@eyesopen.com>
5674         PR c++/5998:
5675         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
5676         in the g++ front-end.
5677         (duplicate_decl): Allow redefinition of anticipated built-ins.
5678         Fix inlining problem by over-writing the old DECL_RTL.
5679         (lookup_namespace_name): Fail to find an identifier in the
5680         specified namespace if its still anticipated.
5681         (builtin_function_1): New function split out from builtin_function
5682         to create a builtin in the current namespace with given context.
5683         (builtin_function): Call builtin_function_1 to define the
5684         appropriate builtins in both the std and global namespaces.
5685         (select_decl): Don't test for anticipated decls here.
5686         (unqualified_namespace_lookup): Instead ignore them whilst
5687         searching through scopes and namespaces.
5688         * decl2.c (do_nonmember_using_decl): If a using declaration
5689         specifies an anticipated built-in function, mark it as no longer
5690         anticipated in that scope.
5691         (ambiguous_decl):  Avoid resolving to an anticipated decl.
5692         * lex.c (do_scoped_id): Fail to find an identifier in the global
5693         namespace if its still anticipated.
5695 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5697         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
5698         * cp-tree.h (cp_make_lang_type): Rename.
5699         * lex.c (cp_make_lang_type): Rename.
5700         (make_aggr_type): Update.
5701         * tree.c (init_tree): Don't set make_lang_type_fn.
5703 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
5705         PR c++/6073
5706         * class.c (finish_struct_1): Update static field's DECL_MODE even
5707         if its type is a variant of t.
5709 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5711         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
5712         * cp-tree.h (cxx_insert_default_attributes): New.
5713         * decl.c (insert_default_attributes): Rename.
5715 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
5717         PR c++/4884
5718         * call.c (build_op_delete_call): Allow for the fact the placement
5719         may be a COMPOUND_EXPR.
5721 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5723         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5724         * cp-tree.h (init_cplus_expand): Remove.
5725         (cxx_expand_expr): New.
5726         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
5727         fix prototype.
5728         (init_cplus_expand): Remove.
5729         * lex.c (cxx_init): Don't call init_cplus_expand.
5731 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
5733         PR c++/4884.
5734         * init.c (build_new_1): Allow for the fact the result of
5735         build_function_call may be a COMPOUND_EXPR.
5737 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
5739         PR c++/5682
5740         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
5741         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5742         (dfs_skip_nonprimary_vbases_markedp): Remove.
5743         * search.c (get_shared_vbase_if_not_primary): Remove.
5744         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5745         (dfs_skip_nonprimary_vbases_markedp): Remove.
5746         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
5747         (dfs_marked_real_bases_queue_p): Likewise.
5749 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5751         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5752         * cp-tree.h (cxx_mark_tree): New.
5753         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
5755 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5757         * cp-tree.h (cxx_maybe_build_cleanup): New.
5758         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
5759         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
5760         * tree.c (build_target_expr): Update.
5761         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
5763 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5765         * decl2.c (cxx_decode_option): Handle -E.
5766         * lang-specs.h (default_compilers): Preprocess with cc1plus.
5767         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
5769 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
5771         PR c++/6037
5772         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
5774 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5776         * error.c (dump_type): Be careful about implicit typenames.
5778 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5780         PR C++/3656
5781         * semantics.c (finish_base_specifier): Handle erronous base
5782         classes.
5784 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
5786         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
5787         REAL_IS_NOT_DOUBLE.
5789 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
5791         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
5792         an index into the vtable_entry array regardless of
5793         TARGET_PTRMEMFUNC_VBIT_LOCATION.
5795 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
5797         * tree.c (cp_cannot_inline_tree_fn): Same.
5799 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5801         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5802         insert_block, getdecls, global_bindings_p): New.
5804 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
5806         PR c++/4361
5807         * mangle.c (struct globals) Add internal_mangling_p member.
5808         (write_template_param): Do internal mangling, if needed.
5809         (mangle_conv_op_name_for_type): Request internal mangling.
5811 2002-03-20  Jason Merrill  <jason@redhat.com>
5813         PR c++/2136
5814         * init.c (build_delete): Check access for a member op delete here.
5815         * decl2.c (delete_sanity): Not here.
5817 2002-03-19  Jason Merrill  <jason@redhat.com>
5819         PR c++/5118
5820         * class.c (get_vfield_name): Use the constructor_name.
5822 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5824         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5825         * cp-tree.h (lang_printable_name): Rename.
5826         * error.c (lang_decl_name): Use new hook.
5827         * lex.c (cxx_init): Remove old hook.
5828         * pt.c (tsubst_decl): Use new hook.
5829         * tree.c (lang_printable_name): Rename.
5831 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
5833         PR c++/3882
5834         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
5835         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
5836         only after recording the declaration.
5838 2002-03-18  Jason Merrill  <jason@redhat.com>
5840         PR c++/2039
5841         * init.c (resolve_offset_ref): Hand off to build_component_ref.
5843         PR c++/4222, c++/5995
5844         * call.c (build_over_call): Fix empty class logic.
5846         PR c++/3870
5847         * cp-tree.h (struct saved_scope): Add last_parms field.
5848         * decl.c (maybe_push_to_top_level): Save last_function_parms.
5849         (pop_from_top_level): Restore it.
5851         PR c++/4377
5852         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
5853         NON_LVALUE_EXPRs.
5855         PR c++/4003
5856         * pt.c (tsubst_friend_function): Use decl_namespace_context.
5858         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
5859         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
5860         type with a nontrivial destructor.
5862 2002-03-17  Jason Merrill  <jason@redhat.com>
5864         PR c++/4460
5865         * class.c (build_base_path): Virtual base layout is fixed in
5866         in-charge [cd]tors.
5868 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5870         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5871         * parse.y (yyparse): Remove macro.
5873 2002-03-17  Jason Merrill  <jason@redhat.com>
5875         PR c++/5757
5876         * init.c (build_new_1): Pass the right pointer to op delete.
5878 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5880         PR c++/4361
5881         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
5882         conversion operators go.
5883         (struct lang_decl_flags): Add template_conv_p and unused
5884         bitfields.
5885         (DECL_TEMPLATE_CONV_FN_P): New macro.
5886         * call.c (build_user_type_conversion_1): Don't check second type
5887         conversion of overload set first.
5888         * class.c (add_method): Make sure templated conversion operators
5889         all end up on slot 2.
5890         * lex.c (do_identifier): A conversion operator token might be
5891         satisfied by a templated conversion operator.
5892         * pt.c (check_explicit_specialization): Use
5893         CLASSTYPE_FIRST_CONVERSION_SLOT.
5894         (template_parm_this_level_p): New function.
5895         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
5896         * search.c (lookup_fnfields_1): Template conversions will be on
5897         the first slot.
5898         * typeck.c (build_component_ref): Preserve the type of an
5899         conversion operator name on the overload type.
5900         (build_x_function_call): Retrieve the conversion operator name.
5902 2002-03-15  Richard Henderson  <rth@redhat.com>
5904         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
5906 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
5908         * cp-tree.h (CLEANUP_DECL): Remove.
5909         (CLEANUP_EXPR): Likewise.
5910         * decl.c (destroy_local_var): Simplify.
5911         (maybe_build_cleanup): Tidy.
5912         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
5913         * semantics.c (cp_expand_stmt): Likewise.
5914         * cp/tree.c (cp_statement_code_p): Likewise.
5916 2002-03-15  Jason Merrill  <jason@redhat.com>
5918         PR c++/5857
5919         * decl.c (duplicate_decls): Use merge_types instead of common_type.
5920         * typeck.c (common_type): Just hand off to
5921         type_after_usual_arithmetic_conversions and
5922         composite_pointer_type.
5923         (merge_types): New fn.
5924         (commonparms): Use it instead of common_type.
5925         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
5926         (composite_pointer_type): Also handle attributes.
5927         * cp-tree.h: Declare merge_types.
5929         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
5930         variables.
5931         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
5933 2002-03-14  Richard Henderson  <rth@redhat.com>
5935         * decl.c: Include c-pragma.h.
5936         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
5937         * Make-lang.in: Update dependencies.
5939 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
5941         PR c++/5908
5942         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
5943         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
5945 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5947         * mangle.c (write_builtin_type): Handle 128-bit integers even if
5948         they are not a standard integer type.
5950 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5952         * cp-tree.h (init_init_processing): Remove declaration.
5953         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
5954         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
5956 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5958         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
5959         Define.
5960         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
5961         tree_code_length.
5962         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
5963         cplus_tree_code_name): Delete.
5964         (cxx_init): Don't call add_c_tree_codes, instead set
5965         lang_unsafe_for_reeval.  Don't try to copy into the various
5966         tree_code arrays.
5968 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
5970         PR c++/5659
5971         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
5972         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
5973         definitions.
5975 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5977         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
5978         DR209 is now not a defect.
5979         * cp-tree.h (skip_type_access_control): Remove.
5980         * decl.c (grokdeclarator): Do type access control for friend
5981         declarations.
5982         * semantics.c (decl_type_access_control): Don't reset
5983         current_type_lookups.
5984         (save_type_access_control): Always save the lookups.
5985         (skip_type_access_control): Remove.
5986         (finish_class_definition): Don't change type_lookups.
5988 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5990         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
5991         It is incorrect.
5992         * typeck.c (build_static_cast): Compare non-qualified types
5993         with pointer to member conversions.
5995 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
5996             Daniel Berlin  <dan@dberlin.org>
5998         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
5999         (cxx_get_alias_set): Use it.
6001 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6003         * cp-tree.h (stabilize_expr): Prototype.
6005 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6007         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
6008         conditional return void.
6010 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6012         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
6013         * cp-tree.h (cxx_unsave): New.
6014         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
6015         (init_tree): Update.
6017 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6019         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
6020         explicit sizeof/sizeof.
6021         * decl2.c (cxx_decode_option): Likewise.
6022         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
6024 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
6026         PR c++/775
6027         * decl.c (lookup_tag): Only reject enum/class mismatch, not
6028         class/union mismatch.
6029         * parse.y (check_class_key): New function.
6030         (structsp): Call it.
6032 2002-03-01  Michael Matz  <matz@suse.de>
6034         * typeck.c (cp_pointer_int_sum): Complete inner type which is
6035         used later by size_in_bytes().
6037 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
6039         * cp-tree.h:  Require __GNUC__ to be #defined.
6040         (build_init):  Add missing prototype.
6042 2002-03-01  Jason Merrill  <jason@redhat.com>
6044         * except.c: Don't include decl.h or obstack.h.  Do include
6045         tree-inline.h.
6046         (build_throw): Destroy temporaries from the thrown
6047         expression before calling __cxa_throw.  Construct a thrown
6048         temporary directly into the exception object.
6049         (stabilize_throw_expr): New function.
6050         (wrap_cleanups_r): New function.
6051         * tree.c (stabilize_expr): New function.
6052         * init.c (build_init): New function.
6053         * Make-lang.in (cp/except.o): Adjust .h deps.
6055 2002-02-28  Jason Merrill  <jason@redhat.com>
6057         * search.c (lookup_base_r): Don't clear is_non_public just because
6058         we found a friendly scope.
6060         * decl.c (finish_function): Only warn about missing return
6061         statement with -Wreturn-type.
6063 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
6065         * class.c (build_clone): Update.
6066         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
6067         * cp-tree.h (cxx_dup_lang_specific_decl): New.
6068         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
6069         (copy_decl): Update.
6070         * method.c (make_thunk): Update.
6072 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
6074         * decl2.c: Delete traditional-mode-related code copied from
6075         the C front end but not used, or used only to permit the
6076         compiler to link.
6078 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
6080         PR c++/4093
6081         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
6082         to void.
6084 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
6086         PR other/5746
6087         * semantics.c (finish_switch_cond): Don't call get_unwidened
6088         if error_mark_node.
6090 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
6092         PR c++/2645, DR 295
6093         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
6094         tf_keep_type_decl.
6095         (make_typename_type): Use tsubst_flags_t.
6096         * decl.c (make_typename_type): Adjust. Return non-artificial
6097         TYPE_DECLs, if required.
6098         (grokdeclarator): Simplify CVR qualification handling. Allow bad
6099         qualifiers on typedef types.
6100         * decl2.c (handle_class_head): Adjust make_typename_type call.
6101         * parse.y (nested_name_specifier): Likewise.
6102         (typename_sub0): Likewise.
6103         (typename_sub1): Likewise.
6104         * pt.c (convert_template_argument): Adjust make_typename_type
6105         return value.
6106         (tsubst): Adjust cp_build_qualified_type_real calls.
6107         (check_cv_quals_for_unify): Cope with allowing bad qualifications
6108         on template type parms.
6109         (instantiate_decl): Recheck substitutions to give warnings on bad
6110         qualifications.
6111         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
6113 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
6115         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
6117         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
6118         unless DECL_ALWAYS_INLINE.
6120 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6122         * typeck.c (cp_pointer_int_sum): Renamed from
6123         pointer_int_sum, call pointer_int_sum.
6125 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
6127         * decl.c (duplicate_decls): Return 0 if issued error about
6128         redeclaration.
6130 2002-02-19  Jason Merrill  <jason@redhat.com>
6132         ABI change: Mangle `void (A::*)() const' as
6133         M1AKFvvE, not MK1AFvvE.
6134         * mangle.c (write_function_type): Write cv-quals for member
6135         function type here.
6136         (write_pointer_to_member_type): Not here.
6138 2002-02-18  Jason Merrill  <jason@redhat.com>
6140         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
6141         (do_decl_instantiation): Likewise.
6143 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6145         PR c++/5685
6146         * decl.c (duplicate_decls): Make warning unconditional
6147         if duplicate default argument declarations are present.
6149 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
6151         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
6152         shortening.
6154 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
6156         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
6157         remove incorrect comment. Move #if 0'd code to common path. Use
6158         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
6160 2002-02-13  Jason Merrill  <jason@redhat.com>
6162         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
6163         (finish_function): Don't warn if current_function_returns_null.
6165         * typeck2.c (digest_init): Do handle values of vector type.
6167         * typeck2.c (digest_init, process_init_constructor): Treat vectors
6168         like arrays.
6170 2002-02-11  Jason Merrill  <jason@redhat.com>
6172         * parse.y (reserved_declspecs): Don't handle attributes.
6173         (reserved_typespecquals): Handle them here.
6174         * Make-lang.in (parse.c): Adjust expected conflicts.
6176 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
6178         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
6179         instead of compstmt.
6180         (compstmt_or_stmtexpr): Renamed from compstmt.
6181         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
6183 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6185         Rename instantiate_type_flags to tsubst_flags_t & expand use.
6186         * cp-tree.h (instantiate_type_flags): Rename to ...
6187         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
6188         add tf_warning flag.
6189         (instantiate_type): Adjust prototype.
6190         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
6191         do_type_instantiation, cp_build_qualified_type_real): Likewise.
6192         cp_build_qualified_type: Adjust.
6193         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
6194         tf_*.
6195         * call.c (standard_conversion): Rename itf_* to tf_*.
6196         (reference_binding): Likewise.
6197         (convert_like_real): Likewise.
6198         * cvt.c (cp_convert_to_pointer): Likewise.
6199         (convert_to_reference): Likewise.
6200         * decl.c (lookup_namespace_name): Use tf_* flags.
6201         (make_typename_type): Likewise.
6202         (grokdeclarator): Likewise.
6203         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
6204         (coerce_template_template_parms, convert_template_argument,
6205         coerce_template_parms, maybe_get_template_decl_from_type_decl,
6206         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
6207         instantiate_class_template, tsubst_template_arg_vector,
6208         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
6209         tsubst_decl, tsubst_arg_types, tsubst_function_type,
6210         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
6211         instantiate_template, fn_type_unification,
6212         resolve_overloaded_unification, verify_class_unification,
6213         unify, get_bindings_real, do_type_instantiation,
6214         regenerate_decl_from_template, instantiate_decl,
6215         tsubst_initializer_list, tsubst_enum,
6216         get_mostly_instantiated_function_type,
6217         invalid_nontype_parm_type_p): Likewise.
6218         * tree.c (cp_build_qualified_type_real): Likewise.
6219         * typeck.c (build_binary_op): Rename itf_* to tf_*.
6220         (build_ptrmemfunc): Likewise.
6221         (convert_for_assignment): Likewise.
6223 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
6225         PR c++/109
6226         * decl.c (grokdeclarator): Allow friend declarations from
6227         dependent types.
6228         * decl2.c (handle_class_head): Don't push into template parm contexts.
6229         * pt.c (push_template_decl_real): Template parm contexts are never
6230         being defined.
6232 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
6234         * class.c: Include target.h.
6235         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
6236         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
6237         bit-field layout.
6238         * Make-lang.in: Adjust deps.
6240 2002-02-05  Jason Merrill  <jason@redhat.com>
6242         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
6244 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
6246         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
6247         (finish_switch_cond): Set SWITCH_TYPE.
6249 2002-02-04  Richard Henderson  <rth@redhat.com>
6251         * method.c (use_thunk): Always initialize the block tree.  Reindent.
6252         * semantics.c (expand_body): Emit thunks after function, not before.
6254 2002-02-04  Jason Merrill  <jason@redhat.com>
6256         * decl.c (start_function): Call cplus_decl_attributes immediately
6257         after grokdeclarator.
6259         * decl.c (start_function): Combine DECL_RESULT handling code.
6261 2002-02-03  Jason Merrill  <jason@redhat.com>
6263         * xref.c: Remove.
6264         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
6265         (cp/xref.o): Remove dependencies.
6266         * class.c (finish_struct_1, check_methods): Don't call xref fns.
6267         (finish_struct_1): Likewise.
6268         * friend.c (make_friend_class): Likewise.
6269         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
6270         * spew.c (read_process_identifier): Likewise.
6272 2002-02-01  Jason Merrill  <jason@redhat.com>
6274         PR c++/4872
6275         * decl.c (finish_function): Warn about a non-void function with
6276         no return statement and no abnormal exit.
6277         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
6278         (current_function_returns_abnormally): New macro.
6279         * call.c (build_call): Set it.
6281         * typeck.c (build_component_ref): Always complain about offsetof
6282         constructs on non-PODs.  Only make it an error for members of
6283         virtual bases.
6285         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
6286         (dump_function_decl): Always dump parms.
6288         * decl2.c (finish_static_data_member_decl): Complain about a local
6289         class with a static data member.
6291         PR c++/4286
6292         * search.c (lookup_field_1): Don't xref a static data member
6293         just because we looked it up.
6295 2002-01-31  Jason Merrill  <jason@redhat.com>
6297         * Make-lang.in (parse.c): Handle .output file.
6299         PR c++/3395
6300         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
6301         not TREE_TYPE.
6302         * semantics.c (finish_class_definition): Adjust.
6304         Allow attributes in parms and casts.
6305         * parse.y (named_parm): Don't strip attrs.
6306         (declmods): Remove 'attributes' production.
6307         (nonempty_cv_qualifiers): Accept attributes.
6308         (ATTRIBUTE): Give precedence.
6309         * decl.c (groktypename): Handle attributes.
6310         (grokparms): Likewise.
6312 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
6314         * decl2.c (cxx_decode_option): Pass 0 as last argument to
6315         cpp_handle_option.
6316         * lang-specs.h: Use cpp_unique_options instead of cpp_options
6317         when used together with cc1_options.
6319 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
6321         PR c++/5132
6322         * typeck2.c (digest_init): Make sure non-array core type is
6323         instantiated.
6324         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
6325         constructor, rather than build a new one.
6326         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
6327         PURPOSE of constructor elts.
6329 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6331         * Make-lang.in (parse.c): Adjust expected number of
6332         shift-reduce conflicts.
6333         (decl.o): Depend on diagnostic.h.
6334         * decl.c: Include diagnostic.h.
6335         (grokdeclarator): Check for null pointer.
6336         (finish_function): Don't abort when
6337         current_binding_level->parm_flag != 1, if errors have
6338         occurred; throw away the statement tree and extra binding
6339         levels, and continue.
6340         * lex.c (note_list_got_semicolon): Check for null pointer.
6341         * method.c (hack_identifier): Just return error_mark_node if
6342         value is error_mark_node.
6343         * parse.y (primary: TYPEID(type_id)): No need to use
6344         TYPE_MAIN_VARIANT here.
6345         (handler_seq): Accept an empty list of catch clauses and
6346         generate a fake handler block to avoid later crashes.
6347         (ansi_raise_identifier): Accept the error token too.
6348         * semantics.c (begin_class_definition,
6349         finish_class_definition): Check for error_mark_node.
6351 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
6353         * typeck2.c (friendly_abort): Delete definition.
6354         * cp-tree.h (friendly_abort): Don't prototype.
6355         (my_friendly_assert): Use fancy_abort.
6357 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6359         * cp-tree.h (my_friendly_abort): Remove.
6361 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
6363         * spew.c (pending_inlines, pending_inlines_tail,
6364         processing_these_inlines): Make static.
6365         (mark_pending_inlines): Remove static.
6366         (begin_parsing_inclass_inline): If in function, save pi
6367         for GC to cp_function_chain->unparsed_inlines instead.
6368         (process_next_inline): Likewise.
6369         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
6370         (mark_pending_inlines): Add prototype.
6371         * decl.c (spew_debug): Remove unused extern.
6372         (mark_lang_function): Call mark_pending_inlines.
6374 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
6376         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
6377         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
6378         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
6379         Change my_fancy_abort() to abort().
6381 2002-01-23  Jason Merrill  <jason@redhat.com>
6383         PR c++/5453
6384         * class.c (fixed_type_or_null): Fix thinko.
6386         PR c++/3331
6387         * init.c (resolve_offset_ref): Use build_indirect_ref.
6389         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
6391 2002-01-22  Jason Merrill  <jason@redhat.com>
6393         * parse.y (function_body): Suppress the block for the outermost
6394         curly braces.
6395         * decl.c (pushdecl): Don't try to skip it.
6396         (begin_function_body): Keep the block we create, not the next one.
6397         * init.c (emit_base_init): Don't mess with keep_next_level.
6399         * class.c (build_base_path): Tweak formatting.
6401 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
6403         Fix regression introduced with patch for c++/775
6404         * parse.y (class_head_defn): Check for template specializations
6405         with a different class-key.
6407 2002-01-17  Jason Merrill  <jason@redhat.com>
6409         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
6410         (begin_function_body): Call them and keep_next_level.
6411         * init.c (emit_base_init): Call keep_next_level.
6412         * semantics.c (setup_vtbl_ptr): Lose.
6413         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
6414         (vtbls_set_up_p): Lose.
6415         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
6416         * method.c (do_build_copy_constructor): Likewise.
6417         (synthesize_method): Call finish_mem_initializers.
6418         * parse.y (nodecls): Likewise.
6420         * error.c (dump_type_suffix): Print the exception specs before
6421         recursing.
6422         (dump_function_decl): Here, too.
6424         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
6426 2002-01-10  Ira Ruben   <ira@apple.com>
6428         PR c++/907
6429         * decl.c (start_method): Handle attrlist.
6431 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
6433         * decl2.c (max_tinst_depth): Increase default limit to 500.
6435 2002-01-10  Graham Stott  <grahams@redhat.com>
6437         * spew.c (YYCHAR): Uppercase macro parameter and add
6438         parenthesis.
6439         (YYCODE): Likewise.
6440         (NAME): Uppercase macro parameter.
6442 2002-01-09  Graham Stott  <grahams@redhat.com>
6444         * decl.h (grokdeclarator): Wrap long line.
6446         * semantics.c (FINISH_COND): Uppercase macro paramaters and
6447         add parenthesis.
6449 2002-01-08  Graham Stott  <grahams@redhat.com>
6451         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
6452         (PALLOC): Uppercase macro parameter and whitespace.
6453         (SALLOC): Uppercase macro parameter.
6454         (SFREE): Uppercase macros parameter, add parenthese and
6455         whitespace.
6456         (STREQL): Uppercase macro parameter and whitespace.
6457         (STRNEQ): Likewise.
6458         (STRLSS): Likewise.
6459         (STRLEQ): Likewise.
6460         (STRGTR): Likewise.
6461         (STRGEQ): Likewise.
6463         * call.c (convert_like): Add parenthesis and wrap.
6464         (convert_like_with_context): Likewise.
6465         (ICS_RANK): Whitespace.
6466         (NEED_TEMPORARY_P): Remove parenthesis.
6468         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
6469         whitespace.
6470         (VTT_MARKED_BINFO_P): Likewise.
6472         * decl.c (BINDING_LEVEL): Add parenthesis.
6473         (DEF_OPERATOR): Likewise.
6475         * mangle.c (MANGLE_TRACE): Add parenthesis.
6476         (MANGLE_TRACE_TREE): Likewise.
6477         (write_signed_number): Likewise.
6478         (write_unsigned_number): Likewise.
6480         * pt.c (ccat): Uppercase macro parameter.
6481         (cat): Likewise
6483         * search.c (SET_BINFO_ACCESS): Add parenthesis.
6485 2002-01-07  Jason Merrill  <jason@redhat.com>
6487         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
6488         to pedwarn.
6490         PR c++/3536
6491         * method.c (make_thunk): If !flag_weak, give the thunk the
6492         function's linkage.
6493         (use_thunk): Here, too.
6495 2002-01-07  Graham Stott  <grahams@redhat.com>
6497         * error.c: Update copyright date.
6498         (print_scope_operator): Add parenthesis.
6499         (print_left_paren): Likewise.
6500         (print_right_paren): Likewise.
6501         (print_left_bracket): Likewise.
6502         (print_right_bracket): Likewise.
6503         (print_template_argument_list_start): Likewise.
6504         (print_template_argument_list_end): Likewise.
6505         (print_non_consecutive_character): Likewise.
6506         (print_tree_identifier): Likewise.
6507         (print_identifier): Likewise.
6508         (NEXT_CODE): Uppercase macro parameter.
6509         (ident_fndecl): Delete unused.
6510         (GLOBAL_THING): Likewise.
6512 2002-01-06  Graham Stott  <grahams@redhat.com>
6514         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
6515         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
6516         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
6517         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
6518         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
6519         (C_IS_RESERVED_WORD): Uppercase macro parameter.
6520         (C_RID_YYCODE) Likewise.
6521         (ptrmem_cst): Use rtx.
6522         (LOCAL_BINDING_P): Add whitespace.
6523         (INHERITED_VALUE_BINDING_P): Likewise.
6524         (BINDING_SCOPE): Wrap long line.
6525         (BINDING_HAS_LEVEL_P): Remove parenthesis.
6526         (BINDING_VALUE): Wrap long line.
6527         (BINDING_TYPE): Whitespace.
6528         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
6529         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
6530         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
6531         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
6532         (same_type_p): Uppercase macro parameters.
6533         (same_type_ignoring_top_level_qualifiers_p): Likewise.
6534         (OVL_FUNCTION): Wrap long line.
6535         (OVL_CHAIN): Whitespace.
6536         (OVL_CURRENT): Add parenthesis and whitespace.
6537         (OVL_NEXT): Whitespace.
6538         (OVL_USED): Likewise.
6539         (IDENTIFIER_TYPE_VALUE): Likewise.
6540         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
6541         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
6542         (LANG_ID_FIELD): Whitespace.
6543         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
6544         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
6545         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
6546         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
6547         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
6548         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
6549         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
6550         (IDENTIFIER_VIRTUAL_P): Likewise.
6551         (IDENTIFIER_OPNAME_P): Likewise.
6552         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
6553         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
6554         (C_SET_EXP_ORIGINAL_CODE): Likewise.
6555         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
6556         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6557         (IS_AGGR_TYPE): Uppercase macro parameter.
6558         (CLASS_TYPE_P): Likewise.
6559         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
6560         (IS_AGGR_TYPE_2): Whitespace.
6561         (TAGGED_TYPE_P): Uppercase macro parameter.
6562         (TYPE_BUILT_IN): Whitespace.
6563         (TYPE_FOR_JAVA): Likewise.
6564         (FUNCTION_ARG_CHAIN): Remove parenthesis.
6565         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
6566         (FUNCTION_FIRST_USER_PARAM): Likewise.
6567         (PROMOTES_TO_AGGR_TYPE): Whitespace.
6568         (DERIVED_FROM_P): Add parenthesis and wrap.
6569         (UNIQUELY_DERIVED_FROM_P): Likewise.
6570         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
6571         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
6572         (CLASSTYPE_USE_TEMPLATE): Whitespace.
6573         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
6574         (TYPE_GETS_DELETE): Add parenthesis.
6575         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
6576         (TYPE_HAS_ASSIGN_REF): Likewise,
6577         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
6578         (TYPE_HAS_INIT_REF): Likewise.
6579         (TYPE_HAS_CONST_INIT_REF): Likewise.
6580         (TYPE_BEING_DEFINED): Likewise.
6581         (TYPE_LANG_SPECIFIC): Likewise.
6582         (CLASSTYPE_RTTI): Likewise.
6583         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
6584         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
6585         (TYPE_OVERLOADS_ARROW): Likewise.
6586         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
6587         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
6588         (CLASSTYPE_METHOD_VEC): Likewise.
6589         (CLASSTYPE_MARKED_N): Likewise.
6590         (CLASSTYPE_MARKED): Likewise.
6591         (CLASSTYPE_MARKED2): Likewise.
6592         (CLASSTYPE_MARKED3): Likewise.
6593         (CLASSTYPE_MARKED4): Likewise.
6594         (CLASSTYPE_MARKED5): Likewise.
6595         (CLASSTYPE_MARKED6): Likewise.
6596         (SET_CLASSTYPE_MARKED): Whitespace.
6597         (CLEAR_CLASSTYPE_MARKED): Likewise.
6598         (SET_CLASSTYPE_MARKED2): Likewise.
6599         (CLEAR_CLASSTYPE_MARKED2): Likewise.
6600         (SET_CLASSTYPE_MARKED3): Likewise.
6601         (CLEAR_CLASSTYPE_MARKED3): Likewise.
6602         (SET_CLASSTYPE_MARKED4): Likewise.
6603         (CLEAR_CLASSTYPE_MARKED4): Likewise.
6604         (SET_CLASSTYPE_MARKED5): Likewise.
6605         (CLEAR_CLASSTYPE_MARKED5): Likewise.
6606         (SET_CLASSTYPE_MARKED6): Likewise.
6607         (CLEAR_CLASSTYPE_MARKED6): Likewise.
6608         (CLASSTYPE_TAGS): Likewise.
6609         (CLASSTYPE_VSIZE): Likewise.
6610         (CLASSTYPE_VBASECLASSES): Likewise.
6611         (CANONICAL_BINFO): Add parenthesis.
6612         (CLASSTYPE_SIZE(NODE): Likewise.
6613         (CLASSTYPE_SIZE_UNIT): Likewise.
6614         (CLASSTYPE_ALIGN(NODE): Likewise.
6615         (CLASSTYPE_USER_ALIGN): Likewise.
6616         (TYPE_JAVA_INTERFACE): Likewise.
6617         (CLASSTYPE_PURE_VIRTUALS): Likewise.
6618         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
6619         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
6620         (CLASSTYPE_HAS_MUTABLE): Likewise.
6621         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
6622         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
6623         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
6624         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
6625         (CLASSTYPE_INTERFACE_ONLY): Likewise.
6626         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6627         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6628         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6629         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6630         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6631         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
6632         (BINFO_UNSHARED_MARKED): Whitespace.
6633         (BINFO_MARKED): Whitespace and wrap.
6634         (SET_BINFO_MARKED): Likewise.
6635         (CLEAR_BINFO_MARKED): Likewise.
6636         (BINFO_VTABLE_PATH_MARKED): Likewise.
6637         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
6638         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
6639         (BINFO_SUBVTT_INDEX): Remove parenthesis.
6640         (BINFO_VPTR_INDEX): Likewise.
6641         (BINFO_PRIMARY_BASE_OF): Likewise,
6642         (CLASSTYPE_VFIELDS): Whitespace.
6643         (VF_DERIVED_VALUE): Wrap long line.
6644         (NAMESPACE_LEVEL): Whitespace.
6645         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
6646         (DEFARG_POINTER): Whitespace.
6647         (DECL_NEEDED_P): Remove parenthesis.
6648         (DECL_LANGUAGE): Whitespace.
6649         (SET_DECL_LANGUAGE): Add parenthesis.
6650         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
6651         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
6652         (DECL_IN_AGGR_P): Whitespace.
6653         (DECL_FRIEND_P): Likewise.
6654         (DECL_BEFRIENDING_CLASSES): Likewise.
6655         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
6656         (DECL_NONCONVERTING_P): Whitespace.
6657         (DECL_PURE_VIRTUAL_P): Likewise.
6658         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
6659         (DECL_PENDING_INLINE_INFO): Whitespace.
6660         (DECL_SORTED_FIELDS): Likewise.
6661         (DECL_DEFERRED_FN): Likewise.
6662         (DECL_TEMPLATE_INFO): Likewise.
6663         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
6664         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
6665         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
6666         (TMPL_ARGS_LEVEL): Likewise.
6667         (SET_TMPL_ARGS_LEVEL): Likewise.
6668         (INNERMOST_TEMPLATE_PARMS): Whitespace.
6669         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
6670         (INTEGRAL_CODE_P(CODE): Add parenthesis.
6671         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
6672         (TYPE_HAS_CONSTRUCTOR): Whitespace.
6673         (TREE_HAS_CONSTRUCTOR): Likewise.
6674         (TYPE_HAS_DESTRUCTOR): Likewise.
6675         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
6676         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
6677         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
6678         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
6679         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
6680         (TYPE_PTRMEMFUNC_P): Likewise.
6681         (TYPE_PTRMEMFUNC_FLAG): Likewise.
6682         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
6683         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
6684         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
6685         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6686         (DECL_ACCESS): Whitespace.
6687         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
6688         (DECL_GLOBAL_DTOR_P): Likewise.
6689         (GLOBAL_INIT_PRIORITY): Likewise.
6690         (DECL_TEMPLATE_PARMS): Likewise.
6691         (DECL_TEMPLATE_RESULT): Likewise.
6692         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
6693         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
6694         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
6695         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6696         (PRIMARY_TEMPLATE_P): Add parenthesis.
6697         (DECL_USE_TEMPLATE): Whitespace.
6698         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6699         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6700         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6701         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6702         (CALL_DECLARATOR_PARMS): Remove parenthesis.
6703         (CALL_DECLARATOR_QUALS): Likewise.
6704         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6705         (TEMP_NAME_P): Wrap.
6706         (VFIELD_NAME_P): Likewise.
6707         (B_SET): Uppercase macro parameters and add parenthesis.
6708         (B_CLR): Likewise.
6709         (B_TST): Likewise.
6710         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
6711         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
6712         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
6713         (same_or_base_type_p): Likewise.
6714         (cp_deprecated): Likewise.
6716 2002-01-05  Richard Henderson  <rth@redhat.com>
6718         * semantics.c (expand_body): Revert last change.
6720 2002-01-04  Jason Merrill  <jason@redhat.com>
6722         PR c++/4122
6723         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
6724         lost primary.
6726         * class.c (build_vtbl_initializer): Check for a lost primary
6727         before calculating the vtable entry to throw away.
6729 2002-01-02  Jason Merrill  <jason@redhat.com>
6731         * semantics.c (expand_body): Call outlining_inline_function when
6732         emitting an inline function out of line.
6734 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6736         PR c++/5116, c++/764 reversion
6737         * call.c (build_new_op): Revert the instantiations. They are
6738         incorrect.
6740 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6742         PR c++/5089
6743         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
6745 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6747         PR c++/3716
6748         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
6749         (tsubst, case POINTER_TYPE): Handle pmfs here.
6750         (tsubst, case OFFSET_TYPE): Check it is not an offset to
6751         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
6753 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6755         PR c++/35
6756         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
6757         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
6758         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
6759         PARM_DECL.
6760         (tsubst_template_parms): Break up loop statements.
6761         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
6762         parm PARM_DECLs don't get promoted.
6764 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6766         PR c++/5123
6767         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
6768         (build_x_function_call): Cope with a COMPONENT_REF containing a
6769         TEMPLATE_ID_EXPR.
6771 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6773         PR c++/5213
6774         * pt.c (convert_template_argument): Be more careful determining
6775         when RECORD_TYPE templates are or are not templates.
6777 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6779         PR c++/775
6780         * cp-tree.h (handle_class_head): Adjust prototype.
6781         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
6782         parameters. Use for all class heads.
6783         * parse.y (named_class_head_sans_basetype, named_class_head,
6784         named_complex_class_head_sans_basetype,
6785         named_class_head_sans_basetype_defn,
6786         unnamed_class_head): Remove.
6787         (class_head, class_head_apparent_template): Recognize class heads
6788         (class_head_decl, class_head_defn): New reductions. Process class
6789         heads.
6790         (structsp): Adjust class definition and class declaration
6791         reductions.
6792         (maybe_base_class_list): Give diagnostic on empty list.
6794 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6796         PR c++/4379
6797         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
6798         single non-static member.
6799         (unary_complex_lvalue): If it cannot be a pointer to member, don't
6800         make it so. Check it is not pointer to reference.
6802 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6804         PR c++/5132
6805         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
6806         are processing a template decl.
6808 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6810         PR c++/5116, c++/764
6811         * call.c (build_new_op): Make sure template class operands are
6812         instantiated. Simplify arglist construction.
6814 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6816         * call.c (build_user_type_conversion_1): Use my_friendly_assert
6817         rather than if ... abort.
6818         * cvt.c (convert_to_reference): Likewise.
6819         * semantics.c (setup_vtbl_ptr): Likewise.
6820         * pt.c (lookup_template_class): Comment typo.
6822 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6824         PR c++/5125
6825         * pt.c (push_template_decl_real): Make sure DECL has
6826         DECL_LANG_SPECIFIC.
6828 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6830         PR c++/335
6831         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
6832         for non-reference fields.
6833         * typeck.c (require_complete_type): Use resolve_offset_ref).
6835 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6837         PR c++/196
6838         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
6840 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6842         PR c++/160
6843         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
6844         up. Don't stabilize_references when initializing a reference.
6846 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6848         * decl2.c (lang_f_options): Const-ify.
6850 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
6852         * config-lang.in (diff_excludes): Remove.
6854 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
6856         PR c++/90
6857         * typeck.c (build_function_call_real): Use original function
6858         expression for errors.
6860 2001-12-18  Jason Merrill  <jason@redhat.com>
6862         PR c++/3242
6863         * class.c (add_method): Do compare 'this' quals when trying to match a
6864         used function.  Don't defer to another used function.
6866 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6868         * pt.c (instantiate_clone): Remove, fold into ...
6869         (instantiate_template): ... here. Simplify by removing mutual
6870         recursion.
6871         * typeck2.c (build_m_component_ref): Don't cv qualify the function
6872         pointed to by a pointer to function.
6873         * class.c (delete_duplicate_fields_1): Typo.
6875 2001-12-18  Jason Merrill  <jason@redhat.com>
6877         C++ ABI change: destroy value arguments in caller.
6878         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
6879         create an extra binding level for the parameters.
6880         * decl.c (store_parm_decls): Don't do parameter cleanups.
6882 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6884         * call.c (build_new_method_call): Use '%#V'.
6885         * error.c (cv_to_string): Use V parameter to determine padding.
6887 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
6889         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
6890         spellings in messages.
6892 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
6894         * cp-tree.h: Delete #defines for cp_error, cp_warning,
6895         cp_pedwarn, and cp_compiler_error.
6896         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
6897         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
6898         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6899         typeck2.c: Change calls to the above macros to use their
6900         language-independent equivalents: error, warning, pedwarn, and
6901         internal_error respectively.
6903 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6905         * decl2.c (finish_file): Remove back_end_hook.
6907 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
6909         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
6910         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
6911         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
6913 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
6915         * lang-options.h: Use American spelling in messages.
6917 2001-12-13  Jason Merrill  <jason@redhat.com>
6919         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
6921         Use cleanups to run base and member destructors.
6922         * init.c (push_base_cleanups): New function, split out from...
6923         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
6924         * decl.c (finish_destructor_body): Move vbase destruction code to
6925         push_base_cleanups.
6926         (begin_function_body, finish_function_body): New fns.
6927         (finish_function): Move [cd]tor handling and call_poplevel to
6928         finish_function_body.
6929         (pushdecl): Skip the new level.
6930         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
6931         (setup_vtbl_ptr): Call push_base_cleanups.
6932         * method.c (synthesize_method): Call {begin,end}_function_body.
6933         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
6934         * cp-tree.h: Declare new fns.
6935         * parse.y (function_body, .begin_function_body): New nonterminals.
6936         (fndef, pending_inline, function_try_block): Use function_body.
6937         (ctor_initializer_opt, function_try_block): No longer has a value.
6938         (base_init): Remove .set_base_init token.
6939         (.set_base_init, compstmt_or_error): Remove.
6940         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
6942         * optimize.c (maybe_clone_body): Fix parameter updating.
6944 2001-12-12  Jason Merrill  <jason@redhat.com>
6946         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
6947         * semantics.c (genrtl_start_function): Don't pass
6948         parms_have_cleanups or push an extra binding level.
6949         (genrtl_finish_function): Lose cleanup_label cruft.
6951         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
6952         (ctor_label): Remove.
6953         * semantics.c (finish_return_stmt): Lose ctor_label support.
6954         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
6955         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
6956         dtor_label.
6958         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
6959         check for [cd]tors.
6960         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
6962         * decl.c (finish_function): Check VMS_TARGET, not VMS.
6964         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
6965         (end_cleanup_fn): And poplevel.
6967         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
6968         if we're in a template.
6970 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
6972         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
6973         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
6974         THIS_NAME_P): Delete.
6975         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
6976         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
6977         with internal naming scheme.
6978         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
6980 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
6982         * decl.c (grokdeclarator): Deprecated implicit typename use.
6984 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
6986         PR g++/51
6987         * parse.y (frob_specs): Indicate it is a language linkage which
6988         contained the extern.
6989         * decl.c (grokdeclarator): Allow extern language linkage with
6990         other specifiers.
6992 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
6994         PR g++/72
6995         * decl.c (add_binding): Don't reject duplicate typedefs involving
6996         template parameters.
6998 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
7000         * parse.y, semantics.c: Similarly.
7002 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
7004         PR g++/87
7005         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
7006         (copy_args_p): Rename to ...
7007         (copy_fn_p): ... here.
7008         (grok_special_member_properties): New function.
7009         (grok_op_properties): Lose VIRTUALP parameter.
7010         (copy_assignment_arg_p): Remove.
7011         * call.c (build_over_call): Use copy_fn_p.
7012         * decl.c (grokfndecl): Reformat. Adjust call to
7013         grok_op_properties.
7014         (copy_args_p): Rename to ...
7015         (copy_fn_p): ... here. Reject template functions. Check for pass
7016         by value.
7017         (grok_special_member_properties): Remember special functions.
7018         (grok_ctor_properties): Don't remember them here, just check.
7019         (grok_op_properties): Likewise.
7020         (start_method): Call grok_special_member_properties.
7021         * decl2.c (grokfield): Likewise.
7022         (copy_assignment_arg_p): Remove.
7023         (grok_function_init): Don't remember abstract assignment here.
7024         * pt.c (instantiate_class_template): Call
7025         grok_special_member_properties.
7026         (tsubst_decl): Adjust grok_op_properties call.
7028 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
7030         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
7031         RID_TYPES_COMPATIBLE_P.
7033 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7035         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
7036         call to build_aggr_init.
7037         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
7039 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
7041         * parse.y: Replace uses of the string non-terminal with STRING.
7042         Don't perform string concatentaion here.
7043         (string): Remove non-terminal.
7044         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
7046 2001-12-05  Jason Merrill  <jason@redhat.com>
7048         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
7049         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
7050         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
7051         * pt.c (push_tinst_level): No longer static.
7052         * cp-tree.h: Declare them.
7054         * init.c (resolve_offset_ref): Don't check access for the base
7055         conversion to access a FIELD_DECL.
7057         * cp-tree.h (TYPE_REFFN_P): New macro.
7058         * decl.c (bad_specifiers): Check it, too.
7060         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
7061         on the __*_type_info type if we haven't seen a definition.
7063 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
7065         * decl.c: Include c-common.h.
7066         (shadow_warning): Move to c-common.c.
7068 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7070         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
7072 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7074         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
7076 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
7078         PR g++/164
7079         * init.c (sort_base_init): Allow binfos to be directly specified.
7080         * method.c (do_build_copy_constructor): Explicitly convert to the
7081         base instance.
7082         (do_build_assign_ref): Likewise.
7084 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
7086         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
7087         declaration and initialization.
7089 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7091         * typeck2.c: Remove leading capital from diagnostic messages, as
7092         per GNU coding standards.
7094 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
7096         PR c++/3394
7097         * decl.c (xref_basetypes): Handle attributes between
7098         'class' and name.
7100 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7102         PR g++/3381
7103         * parse.y (named_complex_class_head_sans_basetype): Add new
7104         reduction.
7105         * Make-lang.in (parse.c): Adjust expected conflict count.
7107 2001-12-03  Jason Merrill  <jason@redhat.com>
7109         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
7110         immediate binfos for our virtual bases.
7112 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
7114         * call.c (build_java_interface_fn_ref): Similarly.
7115         * except.c (is_admissible_throw_operand): Similarly.
7116         * init.c (build_java_class_ref): Similarly.
7117         * xref.c (open_xref_file): Similarly.
7119 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7121         * class.c (finish_struct): Remove trailing periods from messages.
7122         * decl.c (check_tag_decl): Similarly.
7123         * lex.c (cxx_set_yydebug): Similarly.
7124         * typeck2.c (friendly_abort): Similarly.
7126 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7128         PR c++/3048
7129         * cp-tree.h (ovl_member): Remove.
7130         * decl2.c (merge_functions): Handle extern "C" functions
7131         specially.
7132         * tree.c (ovl_member): Remove.
7134 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7136         PR c++/4842
7137         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
7138         FUNCTION_DECL, as input.
7139         (mark_overriders): Remove.
7140         (warn_hidden): Rework for the new ABI.
7142 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
7144         PR c++/3471
7145         * call.c (convert_like_real): Do not build additional temporaries
7146         for rvalues of class type.
7148 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
7150         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
7151         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
7152         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
7153         (DERIVED_FROM_P): Likewise.
7154         (enum base_access): Renumber, add ba_quiet bit mask.
7155         (get_binfo): Remove.
7156         (get_base_distance): Remove.
7157         (binfo_value): Remove.
7158         (ACCESSIBLY_DERIVED_FROM_P): Remove.
7159         * call.c (standard_conversion): Use lookup_base.
7160         * class.c (strictly_overrides): Likewise.
7161         (layout_virtual_bases): Likewise.
7162         (warn_about_ambiguous_direct_bases): Likewise.
7163         (is_base_of_enclosing_class): Likewise.
7164         (add_vcall_offset_vtbl_entries_1): Likewise.
7165         * cvt.c (build_up_reference): Adjust comment.
7166         * init.c (build_member_call): Reformat.
7167         * search.c (get_binfo): Remove.
7168         (get_base_distance_recursive): Remove.
7169         (get_base_distance): Remove.
7170         (lookup_base_r): Tweak.
7171         (lookup_base): Add ba_quiet control. Complete the types here.
7172         (covariant_return_p): Use lookup_base.
7173         * tree.c (binfo_value): Remove.
7174         (maybe_dummy_object): Use lookup_base.
7175         * typeck.c (build_static_cast): Use lookup_base.
7176         (get_delta_difference): Likewise.
7177         * typeck2.c (binfo_or_else): Use lookup_base.
7178         (build_scoped_ref): Add back error_mark_check.
7179         (build_m_component_ref): Use lookup_base.
7181 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7183         * Make-lang.in (c++.generated-manpages): New dummy target.
7185 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7187         * Make-lang.in (cp-lang.o): Depends on c-common.h.
7188         * cp-lang.c (c-common.h): Include.
7189         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
7190         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
7191         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
7193 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7195         * decl2.c (c_language): Move to c-common.c.
7196         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
7197         functions.
7198         (cxx_init): Update.
7200 2001-11-26  Jason Merrill  <jason@redhat.com>
7202         * call.c (joust): Remove COND_EXPR hack.
7204 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
7206         * search.c (lookup_base_r): Declare bk in variable declaration
7207         space.
7209 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
7211         PR g++/3145
7212         * class.c (build_vbase_pointer): Remove.
7213         (build_vbase_path): Remove.
7214         (build_base_path): New function.
7215         * cp-tree.h (base_access, base_kind): New enumerations.
7216         (build_base_path): Declare.
7217         (convert_pointer_to_real): Remove.
7218         (convert_pointer_to): Remove.
7219         (lookup_base): Declare.
7220         (convert_pointer_to_vbase): Remove.
7221         * call.c (build_scoped_method_call): Use lookup_base &
7222         build_base_path instead of convert_pointer_to_real,
7223         get_base_distance & get_binfo.
7224         (build_over_call): Likewise.
7225         * cvt.c (cp_convert_to_pointer): Likewise.
7226         (convert_to_pointer_force): Likewise.
7227         (build_up_reference): Likewise.
7228         (convert_pointer_to_real): Remove.
7229         (convert_pointer_to): Remove.
7230         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
7231         instead of convert_pointer_to_vbase & build_vbase_path.
7232         (emit_base_init): Use build_base_path instead of
7233         convert_pointer_to_real.
7234         (expand_virtual_init): Lose unrequired conversions.
7235         (resolve_offset_ref): Use lookup_base and build_base_path
7236         instead of convert_pointer_to.
7237         * rtti.c (build_dynamic_cast_1): Use lookup_base &
7238         build_base_path instead of get_base_distance & build_vbase_path.
7239         * search.c (get_vbase_1): Remove.
7240         (get_vbase): Remove.
7241         (convert_pointer_to_vbase): Remove.
7242         (lookup_base_r): New function.
7243         (lookup_base): New function.
7244         * typeck.c (require_complete_type): Use lookup_base &
7245         build_base_path instead of convert_pointer_to.
7246         (build_component_ref): Likewise.
7247         (build_x_function_call): Likewise.
7248         (get_member_function_from_ptrfunc): Likewise.
7249         (build_component_addr): Likewise.
7250         * typeck2.c (build_scoped_ref): Likewise.
7252 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7254         * cp-tree.h (CP_TYPE_QUALS): Removed.
7255         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
7256         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
7257         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
7258         * dump.c (cp_dump_tree): Use void* dump_info argument to match
7259         lang-hooks prototype.
7260         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
7261         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
7262         CP_TYPE_QUALS changed to cp_type_quals.
7263         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
7264         (CXX_C_OBJS): Remove c-dump.o.
7266 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
7268         PR c++/3637
7269         * pt.c (lookup_template_class): Ensure that all specializations
7270         are registered on the list corresponding to the most general
7271         template.
7273 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
7275         * call.c (non_reference): Add documentation.
7276         (convert_class_to_reference): Do not strip reference types
7277         from conversion operators.
7278         (maybe_handle_ref_bind): Simplify.
7279         (compare_ics): Correct handling of references.
7281 2001-11-19  John Wilkinson <johnw@research.att.com>
7283         * dump.c (dump_op): New function.
7284         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
7285         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
7286         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
7288 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
7290         PR4629
7291         * semantics.c (finish_sizeof): Make sure that expression created
7292         while processing a template do not have a type.
7293         (finish_alignof): Likewise.
7294         * typeck.c (c_sizeof): Likewise.
7295         (expr_sizeof): Likewise.
7297 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7299         * lex.c (cxx_finish): Call c_common_finish.
7300         (finish_parse): Remove.
7302 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7304         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
7305         when displaying error message about missing array bounds.
7307 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7309         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
7310         CONST_CAST_EXPR.
7311         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
7313 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
7315         * cp-tree.h (print_class_statistics): Restore.
7317 2001-11-15  Jason Merrill  <jason@redhat.com>
7319         * method.c (use_thunk): Don't emit debugging information for thunks.
7321         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
7322         * decl.c (make_typename_type): Handle getting a class template.
7323         * search.c (lookup_field_r): A class template is good enough for
7324         want_type.
7326         * call.c (convert_like_real): Only use cp_convert for the bad part.
7327         (standard_conversion): Also allow bad int->enum.
7328         * typeck.c (ptr_reasonably_similar): Also allow functions to
7329         interconvert.  Pointers to same-size integers are reasonably
7330         similar.
7332         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
7333         give it void type.
7335 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
7337         PR g++/3154
7338         * init.c (sort_base_init): Remove unreachable code.
7339         (expand_member_init): Adjust comment to reflect reality. Simplify
7340         and remove unreachable code.
7342 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
7344         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
7345         (cxx_init): Update prototype.
7346         * decl.c (init_decl_processing): Rename.  Move null node init
7347         to its creation time.
7348         * lex.c (cxx_init_options): Update.
7349         (cxx_init): Combine with old init_parse; also call
7350         cxx_init_decl_processing.
7352 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
7354         * decl.c (check_initializer): Try to complete the type of an
7355         array element before checking whether it's complete.  Don't
7356         complain about arrays with complete element types but an
7357         unknown size.
7358         (cp_finish_decl): Build the hierarchical constructor before
7359         calling maybe_deduce_size_from_array_init.
7361 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
7363         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
7365 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
7367         PR g++/4206
7368         * parse.y (already_scoped_stmt): Remove.
7369         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
7371 2001-11-12  H.J. Lu <hjl@gnu.org>
7373         * cvt.c (ocp_convert): Don't warn the address of a weak
7374         function is always `true'.
7376 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7378         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
7379         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
7380         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
7381         * cp-tree.h (print_class_statistics): Remove.
7382         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
7383         cxx_print_identifier, cxx_set_yydebug): New.
7384         * lex.c (set_yydebug): Rename c_set_yydebug.
7385         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
7386         lang_print_xnode): Rename.
7387         * tree.c (print_lang_statistics): Rename.
7389 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7391         * class.c (dump_array): Fix format specifier warning.
7393 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7395         * cp-lang.c (LANG_HOOKS_NAME): Override.
7396         (struct lang_hooks): Constify.
7397         * lex.c (cxx_init_options): Update.
7398         (lang_identify): Remove.
7399         * parse.y (language_string): Remove.
7401 2001-11-08  Andreas Franck  <afranck@gmx.de>
7403         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
7404         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
7405         suggested by autoconf.
7406         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
7407         (c++.install-common): Use the transformed target alias names.
7409 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7411         * Make-lang.in: Update.
7412         * cp-lang.c: Include langhooks-def.h.
7414 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7416         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
7418 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7420         * lex.c (copy_lang_type): Add static prototype.
7422 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7424         * pt.c (unify): Handle SCOPE_REF.
7426 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
7428         * tree.c (cp_copy_res_decl_for_inlining): Adjust
7429         DECL_ABSTRACT_ORIGIN for the return variable.
7431 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
7433         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
7435 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
7437         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
7438         semantics.c, spew.c: Fix spelling errors.
7440 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7442         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
7444 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
7446         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
7447         pop_everything.
7449 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7451         * cp-lang.c (cxx_get_alias_set): New function.
7452         Point LANG_HOOKS_GET_ALIAS_SET to it.
7454 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7456         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
7457         * cp-tree.h (make_unbound_class_template): Prototype new function.
7458         * decl.c (make_unbound_class_template): New function.
7459         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
7460         * error.c (dump_type): Likewise.
7461         * mangle.c (write_type): Likewise.
7462         * parse.y (template_parm): Likewise.
7463         (template_argument): Use make_unbound_class_template.
7464         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
7465         (tsubst): Likewise.
7466         (tsubst_copy): Likewise.
7467         (unify): Likewise.
7468         * tree.c (walk_tree): Likewise.
7469         * typeck.c (comptypes): Likewise.
7471 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7473         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
7474         extra calls into fewer ones.
7476 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
7478         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
7479         Warn when merging inline with attribute noinline.
7480         (start_decl, start_function): Warn if inline and attribute
7481         noinline appear in the same declaration.
7483 2001-10-16  H.J. Lu <hjl@gnu.org>
7485         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
7486         for tree checking disabled.
7488 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
7490         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
7491         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
7493 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7495         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
7496         (unify): Only handle MINUS_EXPR specially if the above flag is set
7497         and the subtracted constant is 1.  Clear the flag on recursive calls.
7498         Set it when unifying the maximum value in an INTEGER_TYPE's range.
7500 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7502         * decl.c (bad_specifiers): Don't allow exception specifications
7503         on any typedefs.
7505 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7507         * cp/lex.c (init_cp_pragma): Similarly.
7509 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7511         * pt.c (lookup_template_class): Build complete template arguments
7512         for BOUND_TEMPLATE_TEMPLATE_PARM.
7514 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7516         * cp-tree.h (TYPE_BINFO): Update comment.
7517         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
7518         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
7519         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
7520         (copy_type): Prototype new function.
7521         * lex.c (copy_lang_decl): Gather tree node statistics.
7522         (copy_lang_type): New function.
7523         (copy_type): Likewise.
7524         (cp_make_lang_type): Create lang_type for
7525         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
7526         and BOUND_TEMPLATE_TEMPLATE_PARM.
7527         * pt.c (tsubst): Use copy_type instead of copy_node.
7528         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
7530 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7532         * pt.c (determine_specialization): Ignore functions without
7533         DECL_TEMPLATE_INFO.
7535 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7537         PR g++/4476
7538         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
7540 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
7542         * typeck2.c (store_init_value): Don't re-digest a bracketed
7543         initializer.
7545         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
7546         ANON_AGGR_TYPE_P.
7548 2001-10-11  Richard Henderson  <rth@redhat.com>
7550         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
7551         of an asm statement.
7552         (build_vtbl_ref_1): Split out from build_vtbl_ref.
7553         (build_vfn_ref): Use it to handle vtable descriptors before
7554         calling build_vtable_entry_ref.
7555         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
7557 2001-10-10  Richard Henderson  <rth@redhat.com>
7559         * parse.y (asm_operand): Allow named operands.
7560         * semantics.c (finish_asm_stmt): Tweek for changed location
7561         of the operand constraint.
7563 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
7565         * call.c (standard_conversion): Add bad conversion between
7566         integers and pointers.
7567         (convert_like_real): Don't use convert_for_initialization for bad
7568         conversions; complain here and use cp_convert.
7569         (build_over_call): Don't handle bad conversions specially.
7570         (perform_implicit_conversion): Allow bad conversions.
7571         (can_convert_arg_bad): New fn.
7572         * cp-tree.h: Declare it.
7573         * typeck.c (convert_for_assignment): Use it.
7574         (ptr_reasonably_similar): Any target type is similar to void.
7576 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
7578         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
7579         (cp/cp-lang.o): New rule.
7580         * cp-tree.h: Declare hooks.
7581         * tree.c: Make hooks non-static.
7582         (init_tree): Don't initialize hooks here.
7583         * lex.c: Likewise.  Move definition of lang_hooks to...
7584         * cp-lang.c: ... new file.
7586 2001-10-08  Richard Henderson  <rth@redhat.com>
7588         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
7589         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
7591 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7593         * class.c (build_vtable_entry_ref): Const-ify.
7594         * decl.c (predefined_identifier,
7595         initialize_predefined_identifiers): Likewise.
7596         * init.c (build_new_1): Likewise.
7597         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
7598         Likewise.
7600 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
7602         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
7603         (INSNS_PER_STMT): Likewise.
7604         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
7605         (copy_body, initialize_inlined_parameters): Likewise.
7606         (declare_return_variable, inlinable_function_p): Likewise.
7607         (expand_call_inline, expand_calls_inline): Likewise.
7608         (optimize_inline_calls, clone_body): Likewise.
7609         * tree.c (walk_tree): Moved to ../tree-inline.c.
7610         (walk_tree_without_duplicates): Likewise.
7611         (copy_tree_r, remap_save_expr): Likewise.
7613 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
7615         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
7616         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
7617         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
7618         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
7619         (flag_inline_trees): Moved declaration to ../tree-inline.h.
7620         (walk_tree): Moved declaration to ../tree-inline.h.
7621         (walk_tree_without_duplicates, copy_tree_r): Likewise.
7622         (remap_save_expr): Likewise.
7623         * decl.c: Include tree-inline.h.
7624         (lang_mark_tree): Don't mark inlined_fns.
7625         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
7626         * optimize.c: Include tree-inline.h.
7627         (optimize_inline_calls): Move declaration to ../tree.h, as
7628         non-static.
7629         (remap_decl): Use language-independent constructs and hooks.
7630         (remap_block, copy_body_r, declare_return_variable): Likewise.
7631         (inlinable_function_p): Likewise.  Don't test for
7632         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
7633         no longer language-specific.
7634         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
7635         call of dump_function to...
7636         (optimize_function): Here...
7637         (clone_body): New function, extracted from...
7638         (maybe_clone_body): ... here.  Build decl_map locally and pass
7639         it on to clone_body.
7640         * pt.c, semantics.c: Include tree-inline.h.
7641         * tree.c: Likewise.
7642         (cp_walk_subtrees): New language-specific hook for tree inlining.
7643         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
7644         cp_is_overload_p, cp_auto_var_in_fn_p,
7645         cp_copy_res_decl_for_inlining): Likewise.
7646         (walk_tree): Move language-specific constructs into...
7647         (cp_walk_subtrees): this new function.
7648         (copy_tree_r): Use language-independent constructs and hooks.
7649         (init_tree): Initialize tree inlining hooks.
7650         (remap_save_expr): Adjust prototype so that the declaration
7651         does not require the definition of splay_tree.
7653 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7655         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
7656         to build the declaration instead of the declaration itself.
7658 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
7660         * decl2.c (cxx_decode_option): Add 'else'.
7662         * spew.c (end_input): No longer static.
7663         * cp-tree.h: Declare it.
7664         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
7666 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7668         * call.c (build_over_call), typeck.c (build_function_call_real):
7669         Pass type attributes to check_function_format rather than name or
7670         assembler name.  Don't require there to be a name or assembler
7671         name to check formats.
7673 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7675         * decl.c (init_decl_processing): Don't call
7676         init_function_format_info.  Initialize lang_attribute_table
7677         earlier.
7678         (builtin_function): Call decl_attributes.
7679         (insert_default_attributes): New.
7681 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
7683         * decl.c (grokdeclarator): Copy array typedef handling from C
7684         frontend.
7686         * decl.c (grokdeclarator): Copy too-large array handling from C
7687         frontend.
7689 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
7691         * config-lang.in (target_libs): Added target-gperf, so that we
7692         don't try to build it if C++ is disabled.
7694 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
7696         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
7697         (cp/errfn.o): Delete rule.
7698         (cp/error.o): Depend on flags.h.
7699         * errfn.c: Delete file.
7700         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
7701         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
7702         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
7703         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
7704         internal_error respectively.  Make cp_deprecated into a macro.
7705         Don't define cp_printer typedef or declare cp_printers.
7706         * error.c: Include flags.h.
7707         Delete: struct tree_formatting_info, print_function_argument_list,
7708         print_declaration, print_expression, print_function_declaration,
7709         print_function_parameter, print_type_id, print_cv_qualifier_seq,
7710         print_type_specifier_seq, print_simple_type_specifier,
7711         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
7712         print_parameter_declaration_clause, print_exception_specification,
7713         print_nested_name_specifier, and definition of cp_printers.
7714         (locate_error): New function.
7715         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
7716         rewritten in terms of locate_error and diagnostic.c.
7717         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
7718         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
7719         (init_error): Adjust to match.
7721 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7723         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
7725 2001-09-21  Richard Henderson  <rth@redhat.com>
7727         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
7728         (build_vtbl_initializer): Likewise.
7729         (build_vfn_ref): New.
7730         * cp-tree.h: Declare it.
7731         * call.c (build_over_call): Use it.
7732         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
7733         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
7735 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
7737         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
7739 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7741         Table-driven attributes.
7742         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
7743         * decl2.c (cplus_decl_attributes): Only take one attributes
7744         parameter.
7745         * cp-tree.c (cplus_decl_attributes): Update prototype.
7746         * class.c (finish_struct), decl.c (start_decl, start_function),
7747         decl2.c (grokfield), friend.c (do_friend), parse.y
7748         (parse_bitfield): Update calls to cplus_decl_attributes.
7749         * decl.c (grokdeclarator): Take a pointer to a single ordinary
7750         attribute list.
7751         * decl.h (grokdeclarator): Update prototype.
7752         * decl2.c (grokfield): Take a single ordinary attribute list.
7753         * friend.c (do_friend): Likewise.
7754         * decl.c (shadow_tag, groktypename, start_decl,
7755         start_handler_parms, grokdeclarator, grokparms, start_function,
7756         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
7757         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
7758         (process_template_parm, do_decl_instantiation): Pass single
7759         ordinary attribute lists around.
7760         * decl.c (grokdeclarator): Correct handling of nested attributes.
7761         Revert the patch
7762         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7763                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
7764                 not the left.
7765         .
7766         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
7767         (cp_attribute_table): Declare.
7768         * decl.c (valid_lang_attribute): Don't define.
7769         (lang_attribute_table): Define.
7770         (init_decl_processing): Initialize lang_attribute_table instead of
7771         valid_lang_attribute.
7772         * tree.c (cp_valid_lang_attribute): Remove.
7773         (handle_java_interface_attribute, handle_com_interface_attribute,
7774         handle_init_priority_attribute): New functions.
7775         (cp_attribute_table): New array.
7776         * decl2.c (import_export_class): Don't use
7777         targetm.valid_type_attribute.
7779 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7781         * Make-lang.in (cp/error.o): Depend on real.h
7782         * error.c: #include "real.h"
7784 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7786         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
7787         xmalloc/strcpy/strcat.
7789 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7791         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
7792         Const-ification.
7793         * pt.c (tsubst_decl): Likewise.
7795 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7797         * decl2.c (lang_f_options): Const-ification.
7798         * lex.c (cplus_tree_code_name): Likewise.
7799         * spew.c (yyerror): Likewise.
7801 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7803         PR c++/3986
7804         * class.c (force_canonical_binfo_r): Check & move an indirect
7805         primary base first.
7806         (force_canonical_binfo): Check that it's not already
7807         canonical.
7808         (mark_primary_virtual_base): Remove BINFO parameter.
7809         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
7811 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7813         Remove TYPE_NONCOPIED_PARTS.
7814         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
7815         CLASSTYPE_PURE_VIRTUALS.
7816         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
7817         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
7818         (layout_class_type): Don't call fixup_inline_methods here ...
7819         (finish_struct_1): ... call it here.
7821 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
7823         * decl.c (duplicate_decls): Remove code deadling with
7824         DECL_SAVED_INSNS.
7825         * decl2.c (finish_file): Likewise.
7826         * pt.c (instantiate_decl): Likewise.
7827         * semantics.c (expand_body): Don't defer local functions if
7828         they wouldn't be deferred for some other reason.  Don't
7829         generate RTL for functions that will not be emitted.
7830         (genrtl_start_function): Remove code deadling with
7831         DECL_SAVED_INSNS.
7832         (genrtl_finish_function): Likewise.
7834 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7836         PR c++/4203
7837         * call.c (build_over_call): Do not optimize any empty base
7838         construction.
7840 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7842         * error.c (dump_template_decl): Output template parameters
7843         together with their specifiers.
7844         Output `class' prefix for template template parameter.
7845         (dump_decl): Fix formatting.
7847 2001-08-30  Kurt Garloff  <garloff@suse.de>
7849         * optimize.c (inlinable_function_p): Allow only smaller single
7850         functions. Halve inline limit after reaching recursive limit.
7852 2001-08-30  Joern Rennecke <amylaar@redhat.com>
7853             Jason Merrill  <jason_merrill@redhat.com>
7855         * class.c (build_vtable_entry_ref): Subtract in char*, not
7856         ptrdiff_t.
7858 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
7860         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
7861         (build_cplus_array_type): Use cp_build_qualified_type, not
7862         TYPE_MAIN_VARIANT, to get an unqualified version.
7864         * decl2.c (grok_alignof): Lose.
7865         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
7866         * typeck.c (c_alignof): Lose.
7867         * semantics.c (finish_sizeof, finish_alignof): New.
7868         * parse.y: Use them.
7869         * cp-tree.h: Declare them.
7871 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
7873         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
7874         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
7875         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
7877 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
7879         * typeck2.c (add_exception_specifier): Only require complete type if
7880         not in processing template declaration.
7882 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7884         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
7885         GNU_xref_start_scope and GNU_xref_end_scope.
7887         * tree.c (TYPE_HASH): Moved to ../tree.h.
7889 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
7891         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
7892         on COMPOUND_EXPRs.
7894 2001-08-14  Richard Henderson  <rth@redhat.com>
7896         * class.c, cp-tree.h (build_vfn_ref): Remove.
7897         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
7899 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
7901         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
7902         empty class assignment as having side-effects to avoid
7903         spurious warnings.
7905 2001-08-13  Zack Weinberg  <zackw@panix.com>
7907         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
7908         * except.c: Include libfuncs.h.
7910 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7912         * decl.c (grokdeclarator): Clarify diagnostic message.
7914 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7916         * decl2.c (do_nonmember_using_decl): Replace using directive
7917         with using declaration in the error message.
7919 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7921         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
7922         criterion to avoid rebuilding expression tree instead of
7923         processing_template_decl.
7925 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7927         Support named return value optimization for inlines, too.
7928         * decl.c (finish_function): Nullify returns here.
7929         * semantics.c (genrtl_start_function): Not here.
7930         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
7931         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
7932         Also nullify the CLEANUP_STMT for the nrv.
7933         * cp-tree.h: Declare it.
7934         * optimize.c (declare_return_variable): Replace the nrv with the
7935         return variable.
7936         * typeck.c (check_return_expr): Be more flexible on alignment check.
7937         Ignore cv-quals when checking for a matching type.
7939 2001-08-09  Richard Henderson  <rth@redhat.com>
7941         * decl2.c (finish_objects): Use target hooks instead of
7942         assemble_constructor and assemble_destructor.
7944 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7946         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
7948 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
7950         PR c++/3820
7951         Stop using TYPE_NONCOPIED_PARTS.
7952         * call.c (build_over_call): Be careful when copy constructing
7953         or assigning to an empty class.
7954         * class.c (check_bases_and_members): It has a
7955         COMPLEX_ASSIGN_REF if it has a vptr.
7956         (layout_class_type): Don't add empty class padding to
7957         TYPE_NONCOPIED_PARTS.
7958         (finish_struct_1): Don't add the VFIELD either.
7959         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
7960         initialization.
7962 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7964         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
7966 2001-08-06  Richard Henderson  <rth@redhat.com>
7968         * decl2.c (finish_objects): Pass a symbol_ref and priority to
7969         assemble_{constructor,destructor}.  Remove priority handling.
7971 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7973         Don't allow template-id in using-declaration.
7974         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
7975         (do_class_using_decl): Likewise.
7977 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7979         * cp/spew.c (read_token): No need to pop buffers.
7981 2001-08-02  Stan Shebs  <shebs@apple.com>
7983         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
7984         (fnaddr_from_vtable_entry): Remove decl.
7985         * method.c (use_thunk): Update comment.
7987 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
7989         * repo.c (get_base_filename): Change return value to const char
7990         pointer.
7992 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7994         Kill -fhonor-std.
7995         * NEWS: Document.
7996         * cp-tree.h (flag_honor_std): Remove.
7997         (CPTI_FAKE_STD): Remove.
7998         (std_node): Remove comment about it being NULL.
7999         (fake_std_node): Remove.
8000         * decl.c (in_fake_std): Remove.
8001         (walk_namespaces_r): Remove fake_std_node check.
8002         (push_namespace): Remove in_fake_std code.
8003         (pop_namespace): Likewise.
8004         (lookup_name_real): Remove fake_std_node check.
8005         (init_decl_processing): Always create std_node. Always add
8006         std:: things there.
8007         (builtin_function): Always put non '_' fns in std.
8008         * decl2.c (flag_honor_std): Remove.
8009         (lang_f_options): Remove honor-std.
8010         (unsupported_options): Add honor-std.
8011         (set_decl_namespace): Remove fake_std_node check.
8012         (validate_nonmember_using_decl): Likewise.
8013         (do_using_directive): Likewise.
8014         (handle_class_head): Likewise.
8015         * dump.c (cp_dump_tree): Likewise.
8016         * except.c (init_exception_processing): Adjust.
8017         * init.c (build_member_call): Remove fake_std_node check.
8018         (build_offset_ref): Likewise.
8019         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
8020         * rtti.c (init_rtti_processing): Adjust.
8022 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
8024         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
8025         operand while calling cp_tree_equal.
8027 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8029         The 3.0 ABI no longer has vbase pointer fields.
8030         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
8031         FORMAT_VBASE_NAME): Remove.
8032         * method.c (do_build_copy_constructor): Adjust.
8033         (do_build_assign_ref): Adjust.
8034         * search.c (lookup_field_r): Adjust.
8035         * typeck.c (build_component_ref): Adjust.
8037         The 3.0 ABI always has a vtable pointer at the start of every
8038         polymorphic class.
8039         * rtti.c (build_headof_sub): Remove.
8040         (build_headof): Adjust.
8041         (get_tinfo_decl_dynamic): No need to check flag_rtti
8042         here. Adjust.
8043         (create_real_tinfo_var): Explain why we need a hidden name.
8045 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8047         PR c++/3631
8048         * class.c (update_vtable_entry_for_fn): The fixed adjustment
8049         of a virtual thunk should be from declaring base.
8051 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
8053         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
8054         the shared virtual base, so preserving inheritance graph order.
8056 2001-07-30  Andreas Jaeger  <aj@suse.de>
8058         * decl2.c: Remove unused var global_temp_name_counter.
8060 2001-07-28  Richard Henderson  <rth@redhat.com>
8062         * method.c (pending_inlines): Remove.
8064 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8066         * class.c (mark_primary_virtual_base): Don't adjust base
8067         offsets here.
8068         (dfs_unshared_virtual_bases): Adjust them here.
8069         (mark_primary_bases): Explain why we adjust at the end.
8071 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
8073         * class.c (finish_struct_1): When copying the primary base's
8074         VFIELD, make sure we find it is at offset zero.
8076 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8078         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
8079         tsubst_expr for default template arguments.
8081 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8083         PR c++/3621
8084         * spew.c (yylex): Only copy the token's lineno, if it is
8085         nonzero.
8087 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8089         PR c++/3624
8090         * call.c (resolve_args): Simplify, call
8091         convert_from_reference.
8092         (build_new_op): Resolve and convert from reference ARG1
8093         earlier. Adjust ARG2 & ARG3 resolve and conversion.
8095 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
8097         * decl.c (last_function_parm_tags): Remove.
8098         (current_function_parm_tags): Remove.
8099         (init_decl_processing): Adjust.
8100         (start_function): Adjust.
8101         (store_parm_decls): Adjust.
8103         PR c++/3152
8104         * decl.c (grokdeclarator): Detect when a function typedef is
8105         declaring a function, and create last_function_parms correctly.
8107 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
8109         * call.c (joust): Only prefer a non-builtin candidate to a builtin
8110         one if they have the same signature.
8112         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
8113         it rather than toplevel_bindings_p.  Give it a mangled name if static.
8114         (convert_to_reference): Adjust.
8115         * decl2.c (get_temp_name): Lose.
8116         * mangle.c (mangle_ref_init_variable): New fn.
8117         (mangle_guard_variable): Strip the ref-init header.
8118         * cp-tree.h: Adjust.
8119         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
8120         initializer.
8121         (grok_reference_init): Always use DECL_INITIAL.
8123 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8125         PR c++/3416
8126         * call.c (build_conditional_expr): Recheck args after
8127         conversions.
8128         * cp-tree.h (build_conditional_expr): Move to correct file.
8129         * typeck.c (decay_conversion): Diagnose any unknown types
8130         reaching here.
8131         (build_binary_op): Don't do initial decay or default
8132         conversions on overloaded functions.
8133         (build_static_cast): Don't do a decay conversion here.
8135 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8137         PR c++/3543
8138         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
8139         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
8141 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8143         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
8144         (create_vtbl_ptr): ... here.
8146 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8148         * class.c (build_vbase_offset_vbtl_entries): Look for
8149         non-primary base of which we are a sub vtable.
8151 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
8153         * semantics.c (finish_this_expr):  Remove unused code.
8155 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
8157         Simplify rtti, now we've only one ABI.
8158         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
8159         CPTI_TINFO_VAR_ID.
8160         (tinfo_decl_id, tinfo_var_id): Remove.
8161         (get_typeid_1): Remove.
8162         * rtti.c
8163         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
8164         (typeid_ok_p): New function.
8165         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
8166         (get_tinfo_decl): Remove old abi documentation.
8167         (tinfo_from_decl): Remove.
8168         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
8169         (get_typeid_1): Remove.
8170         (get_base_offset): Remove.
8171         (synthesize_tinfo_var): Absorb get_base_offset.
8172         (create_real_tinfo_var): Don't use tinfo_decl_id.
8174 2001-07-23  Graham Stott  <grahams@redhat.com>
8176         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
8177         variable has_two_argument_delete_p.
8179 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
8181         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
8182         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
8183         (CPTI_INDEX_IDENTIFIER): Remove.
8184         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
8185         (delta2_identifier): Remove.
8186         (index_identifier): Remove.
8187         (pfn_or_delta2_identifier): Remove.
8188         (flag_vtable_thunks): Remove.
8189         (VTABLE_DELTA2_NAME): Remove.
8190         (VTABLE_INDEX_NAME): Remove.
8191         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
8192         (vfunc_ptr_type_node): Adjust.
8193         (VTABLE_NAME_PREFIX): Adjust.
8194         (build_vfn_ref): Lose first parameter.
8195         (fixup_all_virtual_upcast_offsets): Remove.
8196         * decl.c (initialize_predefined_identifiers): Remove
8197         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
8198         (init_decl_processing): Remove no-vtable-thunk code.
8199         * decl2.c (flag_vtable_thunks): Remove.
8200         (mark_vtable_entries): Remove no-vtable-thunk code.
8201         * error.c (dump_decl): Remove no-vtable-thunk code.
8202         (dump_expr): Adjust ptr to member function code.
8203         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
8204         code.
8205         * rtti.c (build_headof): Remove no-vtable-thunk code.
8206         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
8207         * search.c (get_base_distance): Remove expand_upcast_fixups case.
8208         (virtual_context) Remove.
8209         (expand_upcast_fixups): Remove.
8210         (fixup_virtual_upcast_offsets): Remove.
8211         (fixup_all_virtual_upcast_offsets): Remove.
8212         * typeck.c (get_member_function_from_ptrfunc): Remove
8213         no-vtable-thunk code.
8214         * call.c (build_over_call): Adjust call to build_vfn_ref.
8215         * class.c (build_vfn_ref): Lose first parameter. Remove
8216         no-vtable-thunk code.
8217         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
8218         (build_vtable_entry): Remove no-vtable-thunk code.
8220 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
8222         Remove old-abi remnants. Remove comments about old abi
8223         behavior. Remove references to 'new-abi' in comments.
8224         * cp-tree.h: Adjust comments.
8225         (vbase_offsets_in_vtable_p): Delete.
8226         (vcall_offsets_in_vtable_p): Delete.
8227         (vptrs_present_everywhere_p): Delete.
8228         (all_overridden_vfuns_in_vtables_p): Delete.
8229         (merge_primary_and_secondary_vtables_p): Delete.
8230         (TYPE_CONTAINS_VPTR_P): Adjust.
8231         (VTT_NAME_PREFIX): Remove.
8232         (CTOR_VTBL_NAME_PREFIX): Remove.
8233         (init_vbase_pointers): Remove.
8234         * class.c: Adjust coments.
8235         (build_vbase_pointer_fields): Delete.
8236         (build_vbase_pointer): Remove old-abi code.
8237         (build_secondary_vtable): Likewise.
8238         (modify_all_vtables): Likewise.
8239         (create_vtable_ptr): Likewise.
8240         (layout_class_type): Likewise.
8241         (finish_struct_1): Likewise.
8242         (finish_vtbls): Likewise.
8243         (dfs_finish_vtbls): Delete.
8244         (build_vbase_offset_vtbl_entries): Remove old-abi code.
8245         * cvt.c: Adjust comments.
8246         * decl.c: Adjust comments.
8247         * decl2.c: Adjust comments.
8248         * init.c: Adjust comments.
8249         (construct_virtual_bases): Remove old-abi code.
8250         * lang-specs.h: Remove -fno-new-abi.
8251         * mangle.c: Adjust comments.
8252         * rtti.c: Adjust comments.
8253         (get_base_offset): Remove old-abi-code.
8254         * search.c: Adjust comments.
8255         (dfs_init_vbase_pointers): Remove.
8256         (dfs_vtable_path_unmark): Remove.
8257         (init_vbase_pointers): Remove.
8258         * semantics.c: Adjust comments.
8259         (emit_associated_thunks): Remove old-abi code.
8260         * typeck.c: Adjust comments.
8262 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
8264         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
8265         params.h.
8267 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
8269         * class.c (finish_struct_anon): Forbid nested classes.
8271 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8273         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
8274         * optimize.c: Include debug.h.
8275         (maybe_clone_body): Use debug hook.
8276         * semantics.c: Include debug.h.
8277         (expand_body): Use debug hook.
8279 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8281         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
8283 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
8285         * class.c (type_requires_array_cookie): New function.
8286         (check_methods): Don't try to figure out whether the type needs a
8287         cookie here.
8288         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
8289         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
8290         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
8291         * pt.c (instantiate_class_template): Don't set
8292         TYPE_VEC_DELETE_TAKES_SIZE.
8293         * NEWS: Document ABI changes from GCC 3.0.
8295 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
8296             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8298         * NEWS (Changes in GCC 3.0): Fix typo.
8300 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
8302         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
8303         which attributes are to be attached, and a flags argument.  Update
8304         call to decl_attributes.
8305         (grokfield): Update call to decl_attributes.
8306         * class.c (finish_struct): Update call to cplus_decl_attributes.
8307         * cp-tree.h (cplus_decl_attributes): Update prototype.
8308         * decl.c (start_decl, grokdeclarator, start_function): Update
8309         calls to decl_attributes and cplus_decl_attributes.
8310         * friend.c (do_friend): Update call to cplus_decl_attributes.
8311         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
8313 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
8315         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
8316         for `register' variables with an asm-specification.
8318 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
8320         * semantics.c (finish_asm_stmt): Mark the output operands
8321         to an asm addressable, if necessary.
8323 2001-07-11  Ben Elliston  <bje@redhat.com>
8325         * Revert this change -- there is a subtle bug.
8327         PR c++/80
8328         * decl.c (finish_enum): New "attributes" argument; pass it to
8329         cplus_decl_attributes.  Use a narrower type if the enum is packed.
8330         * cp-tree.h (finish_enum): Adjust prototype.
8331         * parse.y (enum_head): New non-terminal.
8332         (structsp): Use it. Enums now may be preceded or followed by
8333         optional attributes -- pass their chained tree to finish_enum().
8334         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
8336 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
8338         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
8339         variables.
8341 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
8343         * semantics.c (cp_expand_stmt): Fix for null
8344         current_function_return_value.
8346 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
8348         * call.c (build_op_delete_call): Initialize fn.
8349         (convert_like_real): Delete conditional.
8350         (joust): Initialize *w and *l.
8351         * class.c: Add prototype for binfo_ctor_vtable.
8352         (get_primary_binfo): Initialize result.
8353         * init.c (build_java_class_ref): Initialize name.
8355 2001-07-09  Erik Rozendaal  <dlr@acm.org>
8357         * typeck.c (unary_complex_lvalue): Do not duplicate the
8358         argument to modify, pre-, or post-increment when used as an
8359         lvalue and when the argument has side-effects.
8361 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8363         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8364         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
8365         cplus_decl_attributes even if attrs is NULL.
8366         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
8368 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
8370         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
8371         calls to decl_attributes.
8373 2001-07-06  Ira Ruben   <ira@apple.com>
8375         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
8376         be DECL_TEMPLATE_RESULT.
8378 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8380         * cp-tree.h (copy_template_template_parm): Rename to ...
8381         (bind_template_template_parm): ... here.
8382         * tree.c (copy_template_template_parm): Rename to ...
8383         (bind_template_template_parm): ... here.  Remove the case when
8384         NEWARGS is NULL_TREE.
8385         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
8386         BOUND_TEMPLATE_TEMPLATE_PARM.
8387         * pt.c (lookup_template_class): Adjust.
8389 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
8391         * cvt.c (convert_lvalue): New fn.
8392         * cp-tree.h: Declare it.
8393         * method.c (do_build_assign_ref): Use it.
8394         (do_build_copy_constructor): Convert parm to base types
8395         before calling base constructors.
8397         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
8398         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
8399         optimize.
8400         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
8402 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
8404         * optimize.c (optimize_inline_calls): New function, broken out
8405         of ...
8406         (optimize_function): ... here. Call it. Don't inline if it is
8407         a thunk.
8408         (dump_function): Print name of dump flag causing this dump.
8409         * semantics.c (expand_body): Move thunk inline check to
8410         optimize_function.
8412 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8414         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
8415         (comptypes): Use target.comp_type_attributes.
8417 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8419         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
8421 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8423         * error.c (lang_print_error_function): Add a `diagnostic_context *'
8424         parameter. Tweak.
8426 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8428         * decl2.c (import_export_class): Update.
8430 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8432         * error.c (init_error): Adjust settings.
8434 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
8436         * error.c (init_error): Adjust settings.
8438 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
8440         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
8441         return pointers to data members by reference rather than by value.
8443 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
8445         Implement the Named Return Value optimization.
8446         * cp-tree.h (struct cp_language_function): Add x_return_value.
8447         (current_function_return_value): Now a macro.
8448         * decl.c: Don't define it.
8449         (define_label, finish_case_label): Don't clear it.
8450         (init_decl_processing): Don't register it with GC.
8451         * semantics.c (genrtl_finish_function): Don't check it for
8452         no_return_label.  Copy the RTL from the return value to
8453         current_function_return_value and walk, calling...
8454         (nullify_returns_r): ...this new fn.
8455         * typeck.c (check_return_expr): Set current_function_return_value.
8457 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
8459         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
8460         sharing a ctor vtable with.  Merge code for cases 1 and 2.
8461         (binfo_ctor_vtable): New fn.
8462         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
8464 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
8466         * class.c (dfs_find_final_overrider): Fix logic.
8468         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
8469         virtual thunk instead of non-virtual.
8470         (get_matching_virtual): Uncomment.
8472         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
8473         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
8474         PARM, not ARG.
8476 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
8478         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
8479         we've not emerged from the hierarchy of RTTI_BINFO on reaching
8480         a non-virtual base.
8482 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
8484         * NEWS: Update release number.
8486 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8488         PR c++/3130, c++/3131, c++/3132
8489         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
8490         * class.c (force_canonical_binfo_r): Move
8491         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
8492         virtual bases unless they're primary and what they're primary
8493         too has been moved.
8494         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
8495         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
8496         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
8497         derived binfo.
8498         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
8499         (layout_nonempty_base_or_field): Add most derived type
8500         parameter. Adjust.
8501         (layout_empty_base): Likewise.
8502         (build_base_field): Likewise.
8503         (build_base_fields): Likewise.
8504         (propagate_binfo_offsets): Add most derived type
8505         parameter. Skip non canonical virtual bases too.
8506         (dfs_set_offset_for_unshared_vbases): Don't skip primary
8507         bases. Do skip canonical bases.
8508         (layout_virtual_bases): Adjust.
8509         (layout_class_type): Adjust.
8510         (dfs_get_primary_binfo): Build list of virtual primary base
8511         candidates.
8512         (get_primary_binfo): Check that the shared virtual primary
8513         base candidate was found first.
8514         (accumulate_vtbl_inits): Don't do anything for non-vptr
8515         containing binfos. For case 1 primary virtual bases, keep
8516         checking that we've not emerged from the hierarchy of RTTI_BINFO.
8518 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8520         PR c++/3089
8521         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
8522         hierarchy looking for primary bases for a ctor
8523         vtable. Recursively call oneself, if we meet our primary via
8524         this route and haven't met it yet via inheritance graph order.
8526 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
8528         * lang-options.h: Emit documentation for -fno-honor-std, not
8529         -fhonor-std.
8531 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
8533         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
8534         Don't clobber delta.
8535         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
8537 2001-06-10  Mark Mitchell <mark@codesourcery.com>
8538             Gabriel Dos Reis  <gdr@codesourcery.com>
8540         * Make-lang.in (cp/call.o): Depend on diagnostic.h
8541         (cp/typeck.o): Depend on diagnostic.h
8542         (cp/typeck2.o): Depend on diagnostic.h
8543         (cp/repo.o): Depend on dignostic.h
8544         * typeck.c: #include diagnostic.h
8545         (convert_for_initialization): Remove extern declaration for
8546         warningcount and errorcount.
8548         * call.c: #include diagnostic.h
8549         (convert_like_real): Remove extern declaration for warnincount and
8550         errorcount.
8552         * repo.c: #include diagnostic.h
8553         * typeck2.c: #include diagnostic.h
8555 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8557         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
8558         in previous change.
8560 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8562         PR c++/2929
8563         * friend.c (do_friend): Use push_decl_namespace for classes at
8564         namespace scope.
8566 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8567             Jason Merrill <jason_merrill@redhat.com>
8569         PR c++/3061
8570         * class.c (build_secondary_vtable): Use assert, rather than an error
8571         message.
8572         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
8573         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
8574         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
8575         Don't set BINFO_VTABLE for a primary virtual base.
8577 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
8579         * decl.c (duplicate_decls): Update source position information
8580         when a template function is defined.
8582 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
8584         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
8586 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
8588         PR c++/2914
8589         * decl.c (pushtag): Don't push into a complete type's scope.
8591 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
8593         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
8594         (struct lang_decl_flags): Lose generate_with_vtable_p.
8595         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
8596         * class.c (copy_virtuals): Adjust.
8597         * decl2.c (mark_vtable_entries): Adjust.
8598         * method.c (make_thunk, build_vtable_entry): Adjust.
8599         * class.c (update_vtable_entry_for_fn): Only look as far as the
8600         first defining class.
8601         (build_vtbl_initializer): Put nothing in the slot for a function only
8602         defined in a lost primary virtual base.
8603         (add_vcall_offset_vtbl_entries_1): Use the same code for
8604         the lost primary case and the normal case.
8605         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
8606         (get_vfield_offset, get_derived_offset): Lose.
8607         (dfs_find_final_overrider): Use look_for_overrides_here.
8608         (get_matching_virtual): New fn.
8609         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
8610         not BV_VCALL_INDEX.
8611         * search.c (look_for_overrides_here): Split out from...
8612         (look_for_overrides_r): Here.
8614         * class.c (find_final_overrider): Return error_mark_node on error.
8616         * decl2.c (key_method): #if 0 accidental change.
8618 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8620         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
8621         (build_over_call): Likewise.
8622         * decl.c (grokparms): Likewise.
8623         * pt.c (tsubst_decl): Likewise.
8624         * typeck.c (convert_arguments): Likewise.
8626 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
8628         * semantics.c (begin_class_definition): Robustify.
8630         * pt.c (instantiate_decl): Tell the repository code about the
8631         clones, not the cloned functions.
8632         * repo.c (repo_template_used): Explicitly instantiate the cloned
8633         function, not the clones.
8635 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8637         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
8638         ICS_BAD_FLAG on created conversion.
8639         (compare_ics): Break out rank.
8641 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8643         * decl.c (xref_tag): Remove extraneous %s on dependent name
8644         lookup warning.
8646 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8648         * class.c (layout_vtable_decl): Fix off by one error on
8649         build_index_type.
8650         (build_vtt): Likewise.
8651         (build_ctor_vtbl_group): Likewise.
8653 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8655         * class.c (maybe_indent_hierarchy): New function.
8656         (dump_class_hierarchy_r): Add flags. Dump extra binfo
8657         information, if enabled. Use maybe_indent_hierarchy. Adjust
8658         output format.
8659         (dump_class_hierarchy): Adjust prototype. Adjust output format.
8660         (dump_array, dump_vtable, dump_vtt): New functions.
8661         (finish_struct_1): Adjust hierarchy dumping.
8662         (initialize_vtable): Call dump_vtable.
8663         (build_vtt): Call dump_vtt.
8664         (build_ctor_vtbl_group): Call dump_vtable.
8665         * decl2.c (flag_dump_class_layout): Remove.
8666         (cxx_decode_option): Remove dump translation unit
8667         and dump class hierarchy check. Call dump_switch_p.
8668         (finish_file): Adjust dumping.
8669         (dump.c): Only dump base classes if not TDF_SLIM.
8670         Only dump namespace members if not TDF_SLIM.
8671         * optimize.c (dump_function): New function.
8672         (optimize_function): Call dump_function.
8673         * semantics.c (expand_body): Use dump_enabled_p.
8675 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
8677         PR g++/2936
8678         Part missed from first commit
8679         * decl2.c (finish_anon_union): Copy context.
8681 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
8683         PR g++/2936
8684         * optimize.c (remap_decl): Remap anonymous aggregate members too.
8686 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8688         PR g++/2823
8689         * semantics.c (expand_body): Don't optimize thunks.
8691 2001-05-25  Sam TH  <sam@uchicago.edu>
8693         * cp-tree.h lex.h: Fix header include guards.
8695 2001-05-25  Mark Mitchell <mark@codesourcery.com>
8697         * decl.c (init_decl_processing): Tweak.
8699 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
8701         * decl.c (duplicate_decls): Tidy.
8702         (init_decl_processing): Always set flag_no_builtin.
8704 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8706         PR c++/2184
8707         * decl2.c (do_local_using_decl): Push the decls, even in a
8708         template.
8710 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
8712         * optimize.c (initialize_inlined_parameters): Don't set
8713         TREE_READONLY for a VAR_DECL taking the place of an inlined
8714         PARM_DECL.
8716 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
8718         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
8719         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
8720         attribute.
8722 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
8724         * parse.y: Refer to compound literals as such, not as
8725         constructor-expressions.
8727 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
8729         * call.c (build_op_delete_call): Ignore exception-specifications
8730         when looking for matching delete operators.
8731         * init.c (build_new_1): Compute whether or not the allocation
8732         function used is a placement allocation function or not, and
8733         communicate this information to build_op_delete_call.
8735 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
8737         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
8738         (build_vtbl_ref): Adjust.
8739         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
8740         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
8741         Re-add vtable-gc.
8742         (unsupported_options): Correspondingly.
8744         * decl2.c (maybe_make_one_only): Check flag_weak, not
8745         supports_one_only().
8747         * cp-tree.def (START_CATCH_STMT): Lose.
8748         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
8749         * tree.c (cp_statement_code_p): Don't case it.
8750         * semantics.c (cp_expand_stmt): Likewise.
8751         * cp-tree.h (START_CATCH_TYPE): Lose.
8752         (HANDLER_TYPE): New.
8753         * except.c (expand_start_catch_block): Don't start any blocks.
8754         Return the type.
8755         (expand_end_catch_block): Don't end any blocks.
8756         * parse.y (handler): Don't pass anything from finish_handler_parms
8757         to finish_handler.
8758         * pt.c (tsubst_expr): Likewise.
8759         * semantics.c (begin_handler): Call note_level_for_catch here.
8760         (finish_handler_parms): Don't return anything.
8761         (genrtl_catch_block, begin_catch_block): Lose.
8762         (genrtl_handler): Call expand_start_catch here.
8764 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
8766         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
8767         (get_vtable_decl, build_vtt): Not here.
8769 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
8771         PR c++/2781
8772         * optimize.c (update_cloned_parm): Copy addressability and other
8773         flags.
8775 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8777         * pt.c (determine_specialization): Ignore artificial functions.
8779 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8781         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
8782         (C_RID_CODE): Remove.
8783         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
8784         (init_parse): Don't do it here.
8786 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
8788         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
8789         function declaration to avoid stripping the symbol's attributes.
8791 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
8793         * decl.c (pushdecl): Adjust error string.
8794         (xref_tag): Adjust friend class injection warning. Remove the
8795         inherited name from the class shadowed scope.
8797 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
8799         * except.c (cp_protect_cleanup_actions): New function.
8800         (init_exception_processing): Don't set protect_cleanup_actions
8801         here.  Do set lang_protect_cleanup_actions.
8803 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8805         * spew.c (read_token): Call yyerror on all unexpected tokens.
8807 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8809         * init.c (member_init_ok_or_else): Take a tree rather than
8810         string for name.
8811         (expand_member_init): Adjust.
8813 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
8815         * decl.c (duplicate_decls): Suppress warning about duplicate
8816         decls if the first decl is a friend.
8818 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
8820         * except.c (choose_personality_routine): Export.  Add
8821         explanatory comment.  Take an enum languages, not a boolean.
8822         (initialize_handler_parm): Adjust to match.
8823         * cp-tree.h: Prototype choose_personality_routine.
8824         * lex.c (handle_pragma_java_exceptions): New function.
8825         (init_cp_pragma): Register #pragma GCC java_exceptions.
8827 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8829         * method.c (build_mangled_C99_name): Remove unused prototype.
8831 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
8833         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
8834         * typeck.c (get_member_function_from_ptrfunc,
8835         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
8836         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
8838         Reverted Geoff Keating's 2001-05-03's patch.
8840 2001-05-11  Ira Ruben   <ira@apple.com>
8842         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
8844 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
8846         * cp-tree.h (finish_label_expr, lookup_label): Delete.
8847         * parse.y: Update for '&&'; don't issue warning here.
8848         * semantics.c (finish_label_expr): Delete.
8850 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
8852         * splay-tree.h (splay_tree_max): New function.
8853         (splay_tree_min): Likewise.
8855 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
8857         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
8858         (pfn_vflag_identifier): Define.
8859         Update comment about layout of pointer functions.
8860         (build_ptrmemfunc1): Update prototype.
8861         (expand_ptrmemfunc_cst): Update prototype.
8862         * decl.c (initialize_predefined_identifiers): Initialize
8863         pfn_vflag_identifier.
8864         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
8865         an extra field to the type.
8866         * expr.c (cplus_expand_constant): Pass 'flag' between
8867         expand_ptrmemfunc_cst and build_ptrmemfunc1.
8868         * typeck.c (get_member_function_from_ptrfunc): When
8869         FUNCTION_BOUNDARY < 16, look at additional field to determine
8870         if a pointer-to-member is a real pointer or a vtable offset.
8871         (build_ptrmemfunc1): Add new parameter to contain extra field.
8872         (build_ptrmemfunc): Pass the extra field around.
8873         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
8874         (pfn_from_ptrmemfunc): Ignore the extra field.
8876 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
8878         * cp-tree.h (flag_inline_trees): Update documentation.
8879         * decl.c (init_decl_processing): Adjust handling of
8880         flag_inline_functions and flag_inline_trees to support -O3.
8881         (grokfndecl): Set DECL_INLINE on all functions if that's what
8882         the user requested.
8883         (save_function_data): Clear DECL_INLINE in
8884         current_function_cannot_inline is non-NULL.
8885         * decl2.c (flag_inline_trees): Update documentation.
8887 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
8889         * dump.c (cp_dump_tree, USING_STMT case): New case.
8890         * tree.c (cp_statement_code_p): Add USING_STMT.
8891         * decl2.c (do_using_directive): Add the using directive statement.
8893         * tree.c (walk_tree): Reformat an if block.
8895 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8897         * decl.c (compute_array_index_type): Don't try to do anything with
8898         the indices when processing a template.
8900 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8902         * call.c: NULL_PTR -> NULL.
8903         * class.c: Likewise.
8904         * cvt.c: Likewise.
8905         * decl.c: Likewise.
8906         * decl2.c: Likewise.
8907         * except.c: Likewise.
8908         * init.c: Likewise.
8909         * rtti.c: Likewise.
8910         * search.c: Likewise.
8911         * tree.c: Likewise.
8912         * typeck.c: Likewise.
8913         * typeck2.c: Likewise.
8915 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8917         * decl2.c (do_using_directive): Revert previous patch.
8919 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8921         * cp-tree.def (USING_STMT): New statement node.
8922         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
8923         * decl2.c (do_using_directive): Add USING_STMT to statement
8924         tree. Don't emit errors when processing template decl.
8925         * pt.c (tsubst_expr, USING_STMT case): New case.
8926         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
8928 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8930         * call.c (build_new_op): Convert args from reference here.
8931         (build_conditional_expr): Don't convert here.
8933 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8935         * spew.c (last_token_id): New static variable.
8936         (read_token): Set it here.
8937         (yyerror): Use it here.
8939 2001-04-30  Richard Henderson  <rth@redhat.com>
8941         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
8942         * decl.c: Likewise.
8944 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8946         * gxxint.texi: Remove.
8947         * Make-lang.in: Remove all traces of gxxint.texi.
8949 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
8951         * decl2.c (start_static_initialization_or_destruction): Correct
8952         logic to handle the -fno-use-cxa-atexit case.
8954 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8956         * optimize.c (update_cloned_parm): New function.
8957         (maybe_clone_body): Use it.  Update the `this' parameter too.
8959 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8961         * decl2.c (unsupported_options): Add new-abi.
8962         * lang-options.h: Remove no longer supported options.
8964 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8966         * except.c (can_convert_eh): Don't check template parms,
8967         typename types etc.
8969 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8971         * optimize.c (maybe_clone_body): Copy parameter names and locations.
8973 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8975         * cp-tree.h (adjust_clone_args): Prototype new function.
8976         * class.c (adjust_clone_args): New function.
8977         * decl.c (start_function): Call it for in charge ctors.
8979 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
8981         * method.c (use_thunk): Make sure that thunks really are emitted
8982         when requested.
8984 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
8986         * mangle.c (write_chars): New macro.
8987         (hwint_to_ascii): New function
8988         (write_number): Use it.
8989         (write_integer_cst): Deal with really big numbers.
8991 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
8993         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
8994         the clone.
8996 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
8998         * decl.c (grokdeclarator): Set context of namespace scope
8999         TYPE_DECLS.
9001 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
9003         * cp/optimize.c: Include hashtab.h.
9004         (struct inline_data): Add tree_pruner.
9005         (expand_call_inline, expand_calls_inline): Use it when calling
9006         walk_tree.
9007         (optimize_function): Initialize and free tree_pruner.
9009 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
9011         Lazy __FUNCTION__ generation.
9012         * cp-tree.def (FUNCTION_NAME): Remove.
9013         * cp-tree.h (function_name_declared_p): Remove.
9014         (cp_fname_init): Prototype.
9015         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
9016         don't call declare_function_name. Call start_fname_decls.
9017         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
9018         clobber the line number.
9019         (cp_fname_init): New function.
9020         (start_function): Call start_fname_decls.
9021         (finish_function): Call finish_fname_decls.
9022         * lex.c (reswords): Add slots for __FUNCTION__ et al.
9023         (rid_to_yy): Add mappings for __FUNCTION__ et al.
9024         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
9025         * parse.y (VAR_FUNC_NAME): New token.
9026         (primary): Add VAR_FUNC_NAME.
9027         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
9028         generation.
9029         (tsubst, FUNCTION_NAME case): Remove.
9030         (tsubst_copy, FUNCTION_NAME case): Remove.
9031         (tsubst_expr, DECL_STMT case): Be careful with a
9032         DECL_PRETTY_FUNCTION_P.
9033         (instantiate_decl): Remove function_name_declared_p.
9034         * semantics.c (begin_compound_statement): Don't call
9035         declare_function_name here.
9036         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
9037         (finish_translation_unit): Call finish_fname_decls.
9038         (expand_body): Remove function_name_declared_p.
9039         * typeck2.c (digest_init): Allow any ERROR_MARK.
9041 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
9043         * pt.c (tsubst_decl): Use VOID_TYPE_P.
9044         * semantics.c: Fix some typos.
9046 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
9048         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
9050 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9052         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
9054 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
9056         * except.c (build_throw): Wrap the initialization of the exception
9057         object in a MUST_NOT_THROW_EXPR.
9058         (do_free_exception): #if 0.
9060 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
9062         * cp-tree.h (finish_enum): Change prototype.
9063         * decl.c (finish_enum): Reorganize.
9064         * parse.y (structsp): Adjust calls to finish_enum.
9066 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9068         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
9069         't' case.
9071 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9073         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
9074         (layout_empty_base): Return at end flag.
9075         (build_base_field): Likewise.
9076         (build_base_fields): Likewise.
9077         (layout_virtual_bases): Don't add 1 to eoc value.
9078         (end_of_class): Use full size for empty bases.
9079         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
9080         empty bases. Don't add 1 to eoc value. Only add trailing padding
9081         if we're an empty class with no empty bases.
9082         (dump_class_hierarchy): Dump size and alignment.
9084 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9086         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
9087         ICS_BAD_FLAG.
9089 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
9091         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
9092         is found, look first if name does not match the structure name.
9094 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
9096         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
9097         set.
9098         (SET_DECL_LANGUAGE): New macro.
9099         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
9100         (pushdecl): Likewise.
9101         (build_library_fn_1): Likewise.
9102         (build_cp_library_fn): Likewise.
9103         (grokfndecl): Likewise.
9104         (grokvardecl): Mark `extern "C"' variables as having C linkage.
9105         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
9106         * lex.c (retrofit_lang_decl): Likewise.
9107         * mangle.c (mangle_decl_string): Don't mangle the names of
9108         variables declared with C language linkage.
9109         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
9111 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9113         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
9114         flag_access_control from uninitialized storage.
9116 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
9118         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
9119         * mangle.c (write_pointer_to_member_type): Fix mangling of
9120         pointers to cv-qualified member function types.
9122         * init.c (build_delete): Create a SAVE_EXPR for the address if
9123         we're going to use it more than once.
9125 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
9127         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
9128         (expand_ptremfunc_cst): Change prototype.
9129         (delta2_from_ptrmemfunc): Remove.
9130         * expr.c (cplus_expand_constant): Adjust call to
9131         expand_ptrmemfunc_cst.
9132         * typeck.c (build_ptrmemfunc1): Simplify.
9133         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
9134         results in a constant.
9135         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
9136         (delta2_from_ptrmemfunc): Remove.
9137         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
9139 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
9141         * cp-tree.h (decl_namespace_list): New macro.
9142         (struct saved_scope): Add decl_ns_list.
9143         * decl.c (mark_saved_scope): Mark it.
9144         * decl2.c: Lose static decl_namespace_list.
9145         (init_decl2): Don't save it.
9147 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9149         * cp-tree.h (warn_return_type, yylex): Delete redundant
9150         declarations.
9152         * decl.c (current_class_depth, global_namespace): Likewise.
9154         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
9156         * repo.c (flag_use_repository): Likewise.
9158 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9160         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
9161         set_block, pushdecl, getdecls, gettags, init_decl_processing,
9162         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
9163         lvalue_or_else, print_lang_statistics, comp_target_types,
9164         unsigned_type, signed_type, signed_or_unsigned_type,
9165         build_function_call, mark_addressable, incomplete_type_error):
9166         Delete redundant declarations.
9168 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
9170         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
9171         (TYPE_ANONYMOUS_P): New macro.
9172         (TAGGED_TYPE_P): New macro.
9173         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
9174         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
9175         * tree.c (no_linkage_helper): Likewise.
9176         * semantics.c (begin_class_definition): Likewise.
9177         * pt.c (convert_template_argument): Likewise.
9178         * lex.c (check_for_missing_semicolon): Likewise.
9180 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9182         * class.c (dfs_unshared_virtual_bases): New function.
9183         (mark_primary_bases): Call it.
9184         (check_bases): Ignore virtual bases when determining
9185         nearly-emptiness.
9187 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
9189         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
9191 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
9193         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
9194         cloned function to the clone.
9196 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9198         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
9200         * semantics.c: Include expr.h.
9202 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
9204         * method.c (implicitly_declare_fn): Commonize code for copy ctor
9205         and assignment op. Set TREE_USED for parameter.
9207 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
9209         * class.c (find_final_overrider_data): Add `candidates'.
9210         (dfs_find_final_overrider): Don't issue error messages
9211         prematurely.
9212         (find_final_overrider): Issue error messages here.
9213         (build_base_field): Don't warn about amgibuous direct bases here.
9214         (warn_about_ambiguous_direct_bases): New function.
9215         (layout_class_type): Use it.
9217 2001-04-10  Richard Henderson  <rth@redhat.com>
9219         * typeck.c (build_array_ref): Push the array reference inside
9220         COMPOUND_EXPR and COND_EXPR.
9222 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
9224         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
9225         * decl.c (duplicate_decls): Adjust accordingly.
9226         (maybe_commonize_var): Likewise.
9227         (grokfndecl): Likewise.
9228         (start_function): Likewise.
9229         (start_method): Likewise.
9230         * decl2.c (key_method): Likewise.
9231         (import_export_decl): Likewise.
9232         * method.c (implicitly_declare_fn): Likewise.
9233         * optimize.c (maybe_clone_body): Likewise.
9235 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
9237         * lang-specs.h: Add __DEPRECATED.
9239 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
9241         * search.c (get_dynamic_cast_base_type): When building a new
9242         constant, set its type to ssizetype.
9244 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
9246         * optimize.c (expand_call_inline): Only add newly inlined statements
9247         into inlined_stmts.
9249 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9251         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
9252         (OPERATOR_FORMAT): Likewise.
9253         (OPERATOR_TYPENAME_FORMAT): Likewise.
9254         * operators.def: Remove old name-mangling information.
9255         * decl.c (grok_op_properties): Adjust accordingly.
9256         * lex.c (init_operators): Likewise.
9257         * rtti.c (get_tinfo_decl): Issue error messages about types that
9258         have variable size.
9260 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
9262         * decl2.c (import_export_decl): Don't call import_export_class
9263         when processing an inline member function.
9264         * semantics.c (expand_body): Call import_export_decl before
9265         emitting inline functions.
9267 2001-03-28  Richard Henderson  <rth@redhat.com>
9269         IA-64 ABI Exception Handling:
9270         * cp-tree.def (EH_SPEC_BLOCK): New.
9271         (MUST_NOT_THROW_EXPR): New.
9272         * cp-tree.h: Update changed function declarations.
9273         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
9274         (CPTI_CALL_UNEXPECTED): New.
9275         (struct cp_language_function): Rename x_eh_spec_try_block
9276         to x_eh_spec_block.
9277         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
9278         * decl.c (current_binding_level): If no current function
9279         bindings, revert to scope_chain.
9280         (initialize_predefined_identifiers): Remove __cp_push_exception.
9281         (store_parm_decls): Use begin_eh_spec_block.
9282         (finish_function): Use finish_eh_spec_block.
9283         (mark_lang_function): Update for name changes.
9284         * decl2.c (finish_file): No mark_all_runtime_matches.
9285         * dump.c (cp_dump_tree): Handle new tree codes.
9286         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
9287         * except.c (catch_language_init, catch_language): Remove.
9288         (init_exception_processing): Don't set language code.
9289         Initialize call_unexpected_node, protect_cleanup_actions,
9290         eh_personality_libfunc, lang_eh_runtime_type.
9291         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
9292         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
9293         (prepare_eh_type): Split out type canonicalizations ...
9294         (build_eh_type_type): ... from here.
9295         (build_eh_type_type_ref): Remove.
9296         (mark_all_runtime_matches): Remove.
9297         (build_exc_ptr): New.
9298         (do_begin_catch, do_end_catch): New.
9299         (do_pop_exception): Remove.
9300         (build_terminate_handler): Remove.
9301         (choose_personality_routine): Split out language choice from ...
9302         (initialize_handler_parm): ... here.
9303         Use MUST_NOT_THROW_EXPR.
9304         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
9305         exception object handling.
9306         (expand_start_eh_spec, expand_end_eh_spec): Remove.
9307         (expand_exception_blocks, alloc_eh_object): Remove.
9308         (begin_eh_spec_block, finish_eh_spec_block): New.
9309         (do_allocate_exception, do_free_exception): New.
9310         (expand_throw): Merge into ...
9311         (build_throw): ... here.  Update for abi.
9312         * expr.c (cplus_expand_expr): No expand_internal_throw.
9313         Handle MUST_NOT_THROW_EXPR.
9314         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
9315         * semantics.c (*) Update for except.h name changes.
9316         (genrtl_try_block): No protect_with_terminate.
9317         (genrtl_eh_spec_block): New.
9318         (genrtl_handler): Don't emit the goto here.
9319         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
9320         (genrtl_finish_function): Don't expand_exception_blocks.
9321         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
9323 2001-03-28  Richard Henderson  <rth@redhat.com>
9325         * decl.c (struct named_label_list): Rename eh_region to
9326         in_try_scope, add in_catch_scope.
9327         (struct binding_level): Rename eh_region to is_try_scope,
9328         add is_catch_scope.
9329         (note_level_for_try): Rename from note_level_for_eh.
9330         (note_level_for_catch): New.
9331         (poplevel): Copy both is_try_scope and is_catch_scope to
9332         the named_label_list struct.
9333         (check_previous_goto_1): Don't check for catch block via
9334         DECL_ARTIFICIAL; use in_try_scope instead.
9335         (check_goto): Likewise.
9336         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
9337         * except.c (expand_start_catch_block): Call note_level_for_catch.
9338         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
9340 2001-03-27  Richard Henderson  <rth@redhat.com>
9342         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
9343         exceptions_via_longjmp.
9345 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
9347         * pt.c (check_default_tmpl_args):  Make error messages clearer.
9349 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
9351         * error.c:  Also undefine 'A' macro used for cp_printers definition.
9353 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9355         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
9357 2001-03-26  Mike Yang <yang@research.att.com>
9358             Mark Mitchell  <mark@codesourcery.com>
9360         * dump.c (dump_access): New function.
9361         (cp_dump_tree): Use it.  Dump basetype information for class
9362         types.
9364 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
9366         * Makefile.in (optimize.o): Depend on params.h.
9367         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
9368         (init_decl_processing): Set flag_no_inline when doing
9369         inlining-on-trees.
9370         * optimize.c: Include params.h.
9371         (struct inline_data): Improve documentation of FNS.  Add
9372         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
9373         (INSNS_PER_STMT): New macro.
9374         (remap_block): Use CLONING_P.
9375         (inlinable_function_p): Don't inline big functions.
9376         (expand_call_inline): Keep track of how much inlining we've done.
9377         (optimize_function): Set FIRST_INLINED_FN.
9378         (maybe_clone_body): Set CLONING_P.
9379         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
9380         tree nodes.
9381         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
9382         rest_of_compilation.  Clear DECL_RTL for local variables
9383         afterwards.
9384         (clear_decl_rtl): New function.
9386 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9388         Implement DR 209
9389         * cp-tree.h (skip_type_access_control,
9390         reset_type_access_control): Prototype.
9391         * decl.c (grokdeclarator): Access of friends is not checked.
9392         * parse.y (component_decl_list): Reset type access control.
9393         * semantics.c (decl_type_access_control): Clear
9394         current_type_lookups.
9395         (save_type_access_control): Don't save if not deferring.
9396         (skip_type_access_control, reset_type_access_control): New
9397         functions.
9398         (begin_class_definition): Do type access control for basetypes.
9399         Start deferred access control.
9400         (finish_class_definition): Resume immediate access control if
9401         this is a local class.
9403 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9405         * class.c (add_method): Use memcpy/memmove, not bcopy.
9407         * decl.c (duplicate_decls): Likewise.
9409 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9411         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
9412         not `_'.
9414 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
9416         * decl.c (local_names): Define.
9417         (push_local_name): New.
9418         (grok_reference_init): Return init if initializing static reference
9419         variable with non-constant instead of emitting it.
9420         Move expand_static_init call to cp_finish_decl.
9421         (layout_var_decl): Call push_local_name.
9422         (maybe_commonize_var): Allow inlining functions even if they have
9423         static local variables, use comdat_linkage for them if flag_weak.
9424         (check_initializer): Call obscure_complex_init if
9425         grok_reference_init returned nonzero.
9426         (save_function_data): Clear x_local_names.
9427         (pop_cp_function_context): Free x_local_names.
9428         (mark_inlined_fns): Remove.
9429         (mark_lang_function): Mark x_local_names.
9430         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
9431         Mark inlined_fns as tree, remove call to mark_inlined_fns.
9432         * class.c (alter_access): Ensure DECL_ACCESS is never set if
9433         DECL_DISCRIMINATOR_P.
9434         * cp-tree.h (cp_language_function): Add x_local_names.
9435         (lang_decl_flags): Add discriminator into u2.
9436         (lang_decl_inlined_fns): Remove.
9437         (lang_decl): inlined_fns is now a TREE_VEC.
9438         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
9439         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
9440         TREE_VEC, not a custom structure.
9441         (optimize_function): Likewise.
9442         * mangle.c (discriminator_for_local_entity): Discriminate among
9443         VAR_DECL local entities.
9444         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
9445         is not valid.
9447 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
9449         Add support for Java interface method calls.
9450         * cp-tree.h (struct lang_type): Add java_interface flag.
9451         (TYPE_JAVA_INTERFACE): New macro.
9452         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
9453         by setting TYPE_JAVA_INTERFACE.
9454         * call.c (java_iface_lookup_fn): New static.
9455         (build_over_call): If calling a method declared in a
9456         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
9457         expression which resolves the function address.
9458         (build_java_interface_fn_ref): New function.
9460 2001-03-22  Richard Henderson  <rth@redhat.com>
9462         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
9463         * except.c: Don't include it.
9465 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
9466             based on an idea from Joe Buck <jbuck@synopsys.com>
9468         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
9469         New nonterminals.
9470         (data_def, component_decl): Add reductions to bad_decl.
9472 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
9474         * method.c (do_build_assign_ref): Don't use build_modify_expr for
9475         anonymous aggregates, since they don't have assignment operator
9476         method.
9477         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
9478         assignment operators for anonymous structure fields.
9480 2001-03-21  Jason Merrill  <jason@redhat.com>
9482         * pt.c (instantiate_decl): Abort if we see a member constant
9483         instantiation that doesn't already have its initializer.
9484         Downgrade explicit instantiation without definition to pedwarn.
9486         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
9487         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
9488         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
9490         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
9491         (pending_vtables): Remove.
9492         * decl2.c (pending_vtables): Remove.
9493         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
9494         CLASSTYPE_VTABLE_NEEDS_WRITING.
9495         (import_export_class): Likewise.
9496         (init_decl2): Don't mark pending_vtables.
9497         * lex.c (handle_pragma_vtable): Just sorry.
9498         * pt.c (instantiate_class_template): Don't mess with
9499         CLASSTYPE_VTABLE_NEEDS_WRITING.
9500         (mark_class_instantiated): Likewise.
9501         * ptree.c (print_lang_type): Don't print it.
9502         * semantics.c (begin_class_definition): Don't set it.
9504         * pt.c (template_tail): Replace with last_pending_template.
9505         (maybe_templates, maybe_template_tail): Remove.
9506         (add_pending_template): Adjust.
9507         (instantiate_pending_templates): Adjust.
9509         * cp-tree.h (struct saved_scope): Remove lang_stack field.
9510         (current_lang_stack): Remove.
9511         * decl.c (maybe_push_to_top_level): Don't initialize it.
9512         (duplicate_decls): Use current_lang_depth.
9513         (xref_basetypes): Likewise.
9514         * class.c (current_lang_depth): New fn.
9515         (push_lang_context): Use more varray functionality.
9516         (pop_lang_context): Likewise.
9518         * error.c (GLOBAL_THING): Always use '__'.
9520 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
9522         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
9524         * mangle.c (mangle_decl_string): Mangle the names of overloaded
9525         operators, even when they have `extern "C"' linkage.
9527 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9529         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
9530         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9531         where it's not necessary.
9532         (add_method): Remove optimization involving comparison of
9533         DECL_ASSEMBLER_NAME.
9534         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
9535         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9536         where it's not necessary.
9537         (check_methods): Likewise.
9538         (build_clone): Likewise.
9539         (built_vtt): Likewise.
9540         * cp-tree.h (DECL_NEEDED_P): Likewise.
9541         * decl.c (pushtag): Likewise.
9542         (duplicate_decls): Likewise.
9543         (pushdecl): Likewise.
9544         (builtin_function): Likewise.
9545         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
9546         (build_cp_library_fn): Likewise.
9547         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
9548         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9549         where it's not necessary.
9550         (make_rtl_for_nonlocal_decl): Likewise.
9551         (cp_finish_decl): Likewise.
9552         (grokfndecl): Likewise.
9553         (grokvardecl): Likewise.
9554         (grokdeclarator): Likewise.
9555         (start_function): Likewise.
9556         (cp_missing_return_ok_p): Likewise.
9557         * decl2.c (grokclassfn): Likewise.
9558         (check_classfn): Likewise.
9559         (finish_static_data_member_decl): Likewise.
9560         (grokfield): Likewise.
9561         * error.c (GLOBAL_IORD_P): Remove.
9562         (dump_global_iord): Improve output.
9563         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
9564         * except.c (nothrow_libfn_p): Summarily reject any function not in
9565         namespace-scope.
9566         * init.c (build_java_class_ref): Don't explicitly set
9567         DECL_ASSEMBLER_NAME after calling mangle_decl.
9568         * mangle.c (mangle_decl_string): Handle extern "C" functions.
9569         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
9570         * method.c (set_mangled_name_for_decl): Don't explicitly set
9571         DECL_ASSEMBLER_NAME after calling mangle_decl.
9572         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
9573         IDENTIFIER_GLOBAL_VALUE for the thunk.
9574         * pt.c (set_mangled_name_for_template_decl): Remove.
9575         (check_explicit_specialization): Don't use it.
9576         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
9577         (tsubst_friend_function): Likewise.
9578         (tsubst_decl): Likewise.
9579         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
9580         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
9581         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9582         where it's not necessary.
9583         (tinfo_base_init): Likewise.
9584         (create_real_tinfo_var): Likewise.
9585         * search.c (looup_field_1): Likewise.
9586         * semantics.c (finish_named_return_value): Likewise.
9587         * tree.c (init_tree): Set lang_set_decl_assembler_name.
9589 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9591         Correct semantics restrictions checking in throw-expression.
9592         * except.c (is_admissible_throw_operand): New function.
9593         (build_throw): Use it.
9595 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9597         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
9598         and its ilk.
9600 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9602         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9603         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
9604         * decl.c (duplicate_decls): Likewise.
9605         (builtin_function): Likewise.
9606         (build_library_fn): Likewise.
9607         (build_cp_library_fn): Likewise.
9608         (check_initializer): Likewise.
9609         (cp_finish_decl): Likewise.
9610         * decl2.c (grokfield): Likewise.
9611         (grok_function_init): Remove #if 0'd code.
9612         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9613         * friend.c (do_friend): Likewise.
9614         * init.c (get_temp_regvar): Likewise.
9615         * method.c (make_thunk): Likewise.
9616         * pt.c (tsubst_friend_function): Likewise.
9617         (tsubst_decl): Likewise.
9618         (regenerate_decl_from_template): Likewise.
9619         * semantics.c (genrtl_named_return_value): Likewise.
9620         (expand_body): Likewise.
9621         (genrtl_finish_function): Likewise.
9622         * tree.c (cp_tree_equal): Likewise.
9624 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9626         * call.c (convert_like_real): Add extra semantics to INNER
9627         parameter. Don't convert to temporary if a user conversion
9628         gives us an lvalue that we're about to bind to a reference.
9629         Set INNER to indicate pending reference binding on recursive
9630         calls.
9632 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9634         * cp/lex.c: Delete duplicate pending_lang_change.
9636 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9638         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
9639         Similarly.
9640         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
9641         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
9643 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
9645         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
9647 2001-03-08  Stan Shebs  <shebs@apple.com>
9649         * cp-tree.h (set_identifier_local_value): Remove unused decl.
9651 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
9653         * spew.c: Remove references to CPP_OSTRING.
9655 2001-03-06  Andrew Haley  <aph@redhat.com>
9657         * typeck.c (convert_arguments): Check that we have an fndecl.
9659 2001-03-05  Andrew Haley  <aph@redhat.com>
9661         * typeck.c (convert_arguments): Don't do ellipsis conversion for
9662         __built_in_constant_p.
9664 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9666         * typeck.c (build_static_cast): Allow enum to enum conversions
9667         as per DR 128.
9669 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9671         * class.c (check_field_decls): Pointers to member do not a
9672         non-pod struct make, as per DR 148.
9674 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9676         * call.c (joust): cp_pedwarn when using gnu extension concerning
9677         worst conversion sequences.
9679 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9681         * decl.c: Replace all uses of 'boolean' with 'bool'.
9683 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9685         * lang-specs.h: Add zero initializer for cpp_spec field to
9686         all array elements that need one.  Don't put an #ifdef inside
9687         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
9688         use it.
9690 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9692         Implement using decls inside template functions.
9693         * decl2.c (validate_nonmember_using_decl): Don't special case
9694         fake_std_node in the global namespace. Don't reject early when
9695         processing a template.
9696         (do_local_using_decl): Add to statement tree. Don't do further
9697         processing when building a template.
9698         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
9700 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9702         * decl2.c (do_nonmember_using_decl): Don't complain if we find
9703         same function. Do complain about ambiguating extern "C"
9704         declarations.
9706 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
9708         Remove floating point and complex type template constant parms.
9709         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
9710         COMPLEX_TYPE extensions.
9711         (invalid_nontype_parm_type_p): Likewise.
9713 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
9715         * except.c (call_eh_info): Revert "match_function"'s type.
9717 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
9719         Fix ctor vtable vcall offsets.
9720         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
9721         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
9722         (get_matching_base): Remove.
9723         (get_original_base): New function.
9724         (build_vtbl_initializer): Initialize vid.rtti_binfo.
9725         Use a virtual thunk for a ctor vtable with an index
9726         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
9727         primary base within a constructor vtable. Only set
9728         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
9729         when primary base has been lost.
9730         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
9732 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
9734         * call.c (joust): Ensure more_specialized()'s argument length
9735         parameter has correct value for constructors.
9737 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
9739         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
9741         * decl.c (mark_inlined_fns): Prototype.
9743 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9745         * spew.c (yylex): Correct handling of friends.
9747 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9749         * mangle.c (write_encoding): Pass write_function_type the
9750         FUNCTION_DECL for the function being encoded.
9751         (write_function_type): Pass it along to write_bare_function_type.
9752         (write_bare_function_type): Pass it along to write_method_parms.
9753         (write_method_parms): Don't mangle the compiler-generated
9754         parameters to a constructor or destructor.
9756 2001-02-22  Andreas Jaeger  <aj@suse.de>
9758         * optimize.c: Include toplev.h for
9759         note_deferral_of_defined_inline_function prototype.
9761 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
9763         * cp-tree.h (struct lang_decl_inlined_fns): New.
9764         (struct lang_decls): Add inlined_fns.
9765         (DECL_INLINED_FNS): New macro.
9766         * optimize.c (struct inline_data): Add inlined_fns.
9767         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
9768         (inlinable_function_p): Likewise, fix typo in comment,
9769         function is not inlinable if it already inlined function currently
9770         being optimized.
9771         (expand_call_inline): Add fn to inlined_fns if necessary.
9772         (optimize_function): Initialize inlined_fns.
9773         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
9774         * decl.c (mark_inlined_fns): New function.
9775         (lang_mark_tree): Call it.
9777 2001-02-21  Jason Merrill  <jason@redhat.com>
9779         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
9780         (DECL_UNINLINABLE): Move to middle-end.
9782         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
9783         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
9784         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
9785         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
9786         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
9788         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
9789         second parm of op=.
9791 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
9793         * decl2.c (set_decl_namespace): Allow explicit instantiations in
9794         any namespace.
9796 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9798         * optimize.c (expand_call_inline): Don't walk subtrees of type
9799         nodes.
9801 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
9803         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
9804         for a destructor.
9806 2001-02-18  Jason Merrill  <jason@redhat.com>
9808         Do put the VTT parameter in DECL_ARGUMENTS.
9809         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
9810         (current_vtt_parm): New macro.
9811         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
9812         (DECL_HAS_VTT_PARM_P): New macro.
9813         (DECL_VTT_PARM): Remove.
9814         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
9815         * decl.c (duplicate_decls): Only copy the operator code if
9816         appropriate.
9817         (start_function): Set current_vtt_parm.
9818         (lang_mark_tree): Don't mark vtt_parm.
9819         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
9820         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
9821         * class.c (build_clone): Maybe remove the VTT parm.
9822         * optimize.c (maybe_clone_body): Set up the VTT parm.
9823         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
9824         * call.c (build_over_call): Just allow the VTT arg.
9825         * method.c (make_thunk): Don't set DECL_VTT_PARM.
9826         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
9827         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
9828         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
9829         * error.c (dump_function_decl): Likewise.
9830         * call.c (build_user_type_conversion_1, convert_like_real): Abort
9831         if we try to call a constructor with in-charge or VTT parms.
9832         * method.c (skip_artificial_parms_for): New fn.
9833         * call.c (add_function_candidate, build_over_call): Call it.
9834         * call.c (build_new_method_call): Use current_vtt_parm.
9835         * init.c (expand_virtual_init): Likewise.
9836         * class.c (same_signature_p): No longer static.
9837         * cp-tree.h: Declare it.
9838         * search.c (look_for_overrides_r): Use it.
9840 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9842         * cp-tree.h (new_abi_rtti_p): Remove.
9843         (name_mangling_version): Likewise.
9844         (flag_do_squangling): Likewise.
9845         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
9846         * decl.c (grokfndecl): Likewise.
9847         * decl2.c (name_mangling_version): Remove.
9848         (flag_do_squangling): Likewise.
9849         (lang_f_options): Remove `squangle'.
9850         (unsupported_options): Add `squangle'.
9851         (cxx_decode_option): Issue a warning about uses of
9852         -fname-mangling-version.
9853         (finish_file): Remove old ABI support.
9854         * pt.c (check_explicit_specialization): Likewise.
9855         (tsubst_decl): Likewise.
9856         * rtti.c (init_rtti_processing): Likewise.
9857         (build_headof): Likewise.
9858         (get_tinfo_decl_dynamic): Likewise.
9859         (tinfo_from_decl): Likewise.
9860         (build_dynamic_cast_1): Likewise.
9861         (synthesize_tinfo_var): Likewise.
9862         * init.c (build_new): Allow enumeration types for the array-bounds
9863         in a direct-new-declarator.
9865         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
9867         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
9868         TREE_PROTECTED from the template being specialized.
9870 2001-02-17  Jason Merrill  <jason@redhat.com>
9872         * decl2.c (build_artificial_parm): Set TREE_READONLY.
9874         * decl.c (bad_specifiers): Allow throw specs on things with
9875         pointer-to-function or -member-function type.
9876         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
9877         a pmf.
9879 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9881         * call.c (check_dtor_name): Handle template names correctly.
9883 2001-02-16  Jason Merrill  <jason@redhat.com>
9885         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
9886         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
9887         * optimize.c (maybe_clone_body): Don't substitute it.
9888         * call.c (build_new_method_call): Check in_chrg instead.
9889         * init.c (expand_virtual_init): Likewise.
9891 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
9893         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
9894         class-type introduces at least a type-name.
9896 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
9898         * call.c (convert_like_real): Create a temporary for non-lvalue.
9900 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
9902         * cp-tree.h: Fix typos in comments.
9904 2001-02-16  Jason Merrill  <jason@redhat.com>
9906         * optimize.c (remap_block): If we're compiling a clone, pass the
9907         new block to insert_block.
9909 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
9911         * semantics.c (finish_asm_stmt): Robustify.
9913 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9915         * pt.c (push_template_decl_real): Don't remangle the name of a
9916         class template.
9918 2001-02-15  Jim Meyering  <meyering@lucent.com>
9920         * Make-lang.in (c++.install-common): Depend on installdirs.
9921         (c++.install-info): Likewise.
9922         (c++.install-man): Likewise.
9924 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9926         * typeck2.c (build_m_component_ref): Robustify.
9928 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
9930         * friend.c (do_friend): Don't take the nested [template] class
9931         into account when deciding whether to warn about the friend
9932         function not referring to a template function.
9934 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
9936         * typeck.c (build_unary_op): Clarify error message.
9938 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
9940         * parse.y (component_constructor_declarator): allow optional
9941         parentheses around constructor class name.
9943 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9945         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
9946         section.
9947         * init.c (emit_base_init): Remove incorrect comment about
9948         virtual bases.
9949         * method.c (make_thunk): Fix comment alignment.
9951 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9953         Kill remnants of this is variable.
9954         * cp-tree.h (flag_this_is_variable): Remove.
9955         * decl2.c (flag_this_is_variable): Remove.
9956         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
9957         (build_vbase_path): The path is non-static, even in a cdtor.
9958         (resolves_to_fixed_type_p): Add additional return value.
9959         * search.c (init_vbase_pointers): Adjust.
9960         * tree.c (lvalue_p_1): Adjust.
9961         * typeck.c (mark_addressable): Adjust.
9963 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9965         * pt.c (unify): Don't check cv quals of array types.
9967 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9969         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
9970         check whether we already have the type.
9972 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
9974         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
9975         * call.c (build_op_delete_call): Simplify to remove duplicate
9976         code.
9977         * class.c (clone_function_decl): Don't build the deleting variant
9978         of a non-virtual destructor.
9979         * decl.c (finish_destructor_body): Don't call delete if this is a
9980         non-virtual destructor.
9981         * init.c (build_delete): Explicitly call `operator delete' when
9982         deleting an object with a non-virtual destructor.
9984 2001-02-13  Jason Merrill  <jason@redhat.com>
9986         * lang-specs.h: Add more __EXCEPTIONS.
9988 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9990         * typeck2.c (process_init_constructor): Check
9991         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
9993 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9995         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
9996         Remove spurious information in comment. Allow further
9997         adjustments of REFERENCE_TYPE args.
9999 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
10001         * errfn.c (cp_deprecated): Tweak diagnostic text.
10002         * parse.y (new_initializer): Deprecate initializer lists
10003         extension.
10005 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
10007         Remove old ABI support.
10009 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
10011         * decl2.c (flag_vtable_thunks): Always set it to 1.
10012         (flag_new_abi): Likewise.
10013         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
10015         * Makefile.in (g++spec.o): Fix typo.
10017 2001-02-09  Jason Merrill  <jason@redhat.com>
10019         * lang-specs.h: Restore definition of __EXCEPTIONS.
10021 2001-02-08  Jason Merrill  <jason@redhat.com>
10023         * search.c (shared_member_p): New function.
10024         (lookup_field_r): Use it.
10025         * cp-tree.h (SHARED_MEMBER_P): Remove.
10027         * method.c (process_overload_item): Handle template-dependent array
10028         bounds.
10029         * pt.c (type_unification_real): If we end up with undeduced nontype
10030         parms, try again.
10032         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
10033         types.
10035         * typeck2.c (friendly_abort): Don't say anything if we have
10036         earlier errors or sorries.
10038         * decl.c (check_tag_decl): Notice attempts to redefine bool and
10039         wchar_t.  Ignore if in_system_header.
10041         * decl.c (maybe_push_cleanup_level): New fn...
10042         (start_decl_1): ...split out from here.
10043         * cvt.c (build_up_reference): Use it.
10044         * cp-tree.h: Declare it.
10046 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
10048         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
10049         spec.
10051 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
10053         * pt.c (lookup_template_class): Make sure it's a primary
10054         template or template_template_parm when called from the parser.
10055         (instantiate_template_class): Add assertion.
10057 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
10059         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
10060         from error_mark_node.
10062 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
10064         Fix specification and implementation bugs in V3 ABI
10065         construction vtables.
10066         * cp-tree.h (flag_dump_class_layout): New flag.
10067         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
10068         (BINFO_LOST_PRIMARY_P): New flag.
10069         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
10070         (BINFO_PRIMARY_MARKED_P): Rename to ...
10071         (BINFO_PRIMARY_P): ... here.
10072         (binfo_via_virtual): New prototype.
10073         * decl2.c (flag_dump_class_layout): New flag.
10074         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
10075         use `=' as a file name separator.
10076         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
10077         bases.
10078         (build_vtbl_address): If this is a virtual primary base, then
10079         get the vtbl of what it is ultimately primary for.
10080         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
10081         for BINFO_PRIMARY_P.
10082         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10083         (get_shared_vbase_if_not_primary): Likewise.
10084         (dfs_get_pure_virtuals): Likewise.
10085         (expand_upcast_fixups): Likewise.
10086         (fixup_virtual_upcast_offsets): Likewise.
10087         (dfs_find_vbase_instance): Likewise.
10088         (find_vbase_instance): Likewise.
10089         (binfo_from_vbase): Adjust comment to reflect reality.
10090         (binfo_via_virtual): New function.
10091         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
10092         for binfo walking during VTT construction.
10093         (dfs_mark_primary_bases): Remove.
10094         (force_canonical_binfo_r): New function.
10095         (force_canonical_binfo): New function.
10096         (mark_primary_virtual_base): New function.
10097         (mark_primary_bases): Walk in inheritance graph order, use
10098         mark_primary_virtual_base.
10099         (determine_primary_base): Use some more intermediate variables.
10100         (dfs_find_final_overrider): Don't check for overriding along a
10101         virtual path.
10102         (dfs_modify_vtables): Walk into primary virtual bases too.
10103         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
10104         (build_base_fields): Likewise.
10105         (dfs_set_offset_for_unshared_vbases): Likewise.
10106         (layout_virtual_bases): Likewise.
10107         (end_of_class): Likewise.
10108         (finish_struct_1): Call dump_class_hierarchy, if requested.
10109         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
10110         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
10111         (dump_class_hierarchy): Add file parameter. Append to file, if
10112         required.
10113         (finish_vtbls): Adjust accumulate_vtbl_inits call.
10114         Use canonical base for virtual bases.
10115         (build_vtt): Add more comments. Adjust build_vtt_inits call.
10116         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
10117         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
10118         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
10119         virtual VTTs.
10120         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
10121         from DATA.  We want virtual primary bases and all bases via virtual.
10122         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
10123         virtual base when not a construction vtable.
10124         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
10125         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
10126         Use canonical bases when processing virtual bases.
10127         (accumulate_vtbl_inits): We're interested in any base via a
10128         virtual path.
10129         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
10130         within a construction vtable, determine what is being overridden.
10131         (build_vtbl_initializer): Add more comments
10132         (add_vcall_offset_vtbl_entries_1): Adjust comment.
10133         (build_rtti_vtbl_entries): Check if the base has lost its
10134         primary.
10136 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
10138         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
10140 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10142         * decl.c (pushdecl): Call abort instead of fatal.
10143         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
10144         * init.c (build_new_1): Likewise.
10145         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
10146         * decl.c (build_typename_type): hash_table_init now returns void.
10147         decl.c (init_decl_processing): Make an error non-fatal.
10149 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
10151         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
10152         Document.
10153         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10154         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10155         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10156         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10157         * decl.c (maybe_commonize_var): Use the new name-mangling where
10158         appropriate.
10159         * decl2.c (comdat_linkage): Enhance comments.  Make all
10160         compiler-generated things static, if COMDAT is not available.
10161         (get_tinfo_decl): Do not make typeinfo objects that belong in the
10162         library COMDAT.
10163         (tinfo_base_init): Use the correct mangled name for typeinfo
10164         strings, and push them into the global scope.
10165         (typeinfo_in_lib_p): New function.
10166         (synthesize_tinfo_var): Use it.
10167         (create_real_tinfo_var): Likewise.
10169 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
10171         * decl.c (push_class_binding): Use context_for_name_lookup instead
10172         of CP_DECL_CONTEXT.
10173         * search.c (context_for_name_lookup): Remove static.  Check for NULL
10174         context in the loop.
10175         * cp-tree.h (context_for_name_lookup): Add prototype.
10177 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
10179         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
10180         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
10181         Remove.
10182         * call.c (convert_class_to_reference, build_user_type_conversion_1,
10183         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
10185 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
10187         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
10188         of macros used when compiling g++spec.c.
10189         * g++spec.c (lang_specific_driver): Link with the shared
10190         libgcc by default.
10192 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10194         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
10195         make_reference_declarator, make_call_declarator), method.c
10196         (implicitly_declare_fn), parse.y (namespace_using_decl,
10197         notype_unqualified_id, expr_or_declarator, new_type_id,
10198         after_type_declarator, direct_after_type_declarator,
10199         notype_declarator, complex_notype_declarator,
10200         complex_direct_notype_declarator, qualified_id,
10201         notype_qualified_id, overqualified_id, direct_new_declarator,
10202         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
10203         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
10204         instead of build_parse_node.
10206 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10208         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
10209         (minus_one_node): Moved to top level gcc directory.  Renamed
10210         to integer_minus_one_node.
10212         * init.c (init_init_processing): Don't set minus_one_node.
10213         (build_vec_init): Use integer_minus_one_node.
10215         * rtti.c (get_tinfo_decl_dynamic): Likewise.
10217 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
10219         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
10220         identical and they would be replaced with constant, remove
10221         MODIFY_EXPR from the tree.
10223 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10225         * Make-lang.in: Remove all dependencies on defaults.h.
10226         * call.c: Don't include defaults.h.
10227         * decl.c: Likewise.
10228         * decl2.c: Likewise.
10229         * except.c: Likewise.
10230         * pt.c: Likewise.
10231         * rtti.c: Likewise.
10232         * tree.c: Likewise.
10233         * typeck.c: Likewise.
10235 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
10237         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
10238         operators even in "C" linkage.
10239         * method.c (set_mangled_name_for_decl): Likewise.
10240         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
10241         overloaded operators in "C" linkage.
10243 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10245         * pt.c (tsubst_decl): Remove IN_DECL parameter.
10246         (tsubst_arg_types): Check parameter is not void.
10247         (tsubst): Adjust tsubst_decl call.
10249 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
10251         * call.c (add_builtin_candidate): Quote std properly, from
10252         previous change.
10254 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10256         * pt.c (check_explicit_specialization): Clone constructors and
10257         destructors.
10259 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10261         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
10262         indicates anything special about template depth. Make sure we
10263         only count the user visible template classes.
10265 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
10267         * call.c (build_conv): Typo in comment.
10268         (add_builtin_candidate): Add more explanation.
10269         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
10270         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
10271         when we have enumeral types.
10272         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
10273         candidates for relops and eqops.
10274         (joust): Simplify control flow. Allow a non-template user
10275         function to hide a builtin.
10277 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
10279         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
10280         (more_specialized): Add deduction parameter.
10281         * call.c (joust): Adjust more_specialized call.
10282         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
10283         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
10284         (get_bindings_order): Remove.
10285         (get_bindings_real): Add DEDUCE parameter.
10286         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
10287         REFERENCE_TYPE jig for DEDUCE_ORDER.
10288         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
10289         maybe_adjust_types_for_deduction.
10290         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
10291         directly.
10292         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
10293         (check_cv_quals_for_unify): Use new unify qualifier flags.
10294         (unify): Clear new unify qualifier flags.
10295         (get_bindings_real): Add DEDUCE parameter.
10296         (get_bindings): Adjust call to get_bindings_real.
10297         (get_bindings_overload): Likewise.
10298         (most_specialized_instantiation): Adjust call to
10299         more_specialized.
10301 2001-01-19  Jason Merrill  <jason@redhat.com>
10303         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
10305         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
10306         -fnew-abi.
10308 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
10310         * decl2.c (arg_assoc_class): Fix double iteration logic.
10312 2001-01-19  Jason Merrill  <jason@redhat.com>
10314         * init.c (build_delete): Always call convert_force to strip cv-quals.
10316         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
10317         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
10318         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
10320 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10322         * search.c (get_vbase_1): Count only virtual bases.
10324 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10326         * class.c (duplicate_tag_error): Robustify flag clearing.
10328 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10330         * cp-tree.h (lookup_template_class): Add complain parm.
10331         * decl.c (lookup_namespace_name): Adjust call to
10332         lookup_template_class.
10333         (make_typename_type): Likewise.
10334         * semantics.c (finish_template_type): Likewise.
10335         * pt.c (lookup_template_class): Add complain parm. Adjust.
10336         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
10337         (tsubst): Likewise.
10339 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10341         * pt.c (copy_default_args_to_explicit_spec): Preserve
10342         object's CV quals. Reorganize.
10344 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10346         * typeck.c (build_modify_expr): Say `initialization' for
10347         INIT_EXPRs.
10348         * init.c (build_default_init): Convert to enumeral type, if
10349         needed.
10351 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
10353         * parse.y (nomods_initdcl0): Properly set things up for
10354         initdcl0_innards.
10356 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10358         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
10359         (type_unification_real): Set it.
10360         (unify): Use it.
10362 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10364         * decl.c (finish_destructor_body): Convert to vbase pointer here.
10366 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10368         * semantics.c (begin_class_definition): Check we're not inside a
10369         template parm list.
10371 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
10373         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
10374         BASELINK_P.
10376 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10378         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
10379         * call.c (build_over_call): Add comment.
10381 2001-01-16 Daniel Berlin <dberlin@redhat.com>
10383         * cvt.c (ocp_convert): Handle vector type conversion
10384         * typeck2.c (digest_init): Handle vector type initializations
10386 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
10388         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
10389           was given.
10391 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10393         * pt.c (check_nontype_parm): Rename to ...
10394         (invalid_nontype_parm_type_p): ... here.
10395         (process_template_parm): Adjust.
10396         (convert_template_argument): Adjust.
10398 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
10400         * pt.c (check_nontype_parm): New function.
10401         (process_template_parm): Use it.
10402         (convert_template_argument): Use it.
10403         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
10404         member.
10406 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
10408         * tree.c: Add defaults.h
10409         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
10410         * Make-lang.in (cp/tree.o): Add defaults.h.
10412 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10414         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
10416 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10418         * g++.1: Change to be ".so man1/gcc.1".
10420 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10422         * Make-lang.in (c++.info, c++.install-info): Build and install g++
10423         internals info.
10424         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
10425         ($(srcdir)/cp/g++int.info): New target.
10426         * gxxint.texi: Add info directory entry.  Use @@ in email address.
10427         * .cvsignore: Update.
10429 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10431         * typeck.c (build_c_cast): Do template processing earlier.
10432         Always pedwarn on array casts.
10434 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
10436         * friend.c (make_friend_class): Make sure a templated class is
10437         actually a template.
10439 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10441         * decl2.c (get_guard): Set linkage from guarded decl.
10443 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10445         * call.c (convert_default_arg): Check for unprocessed
10446         DEFAULT_ARG.
10447         * cp-tree.h (replace_defarg): Move to spew.c.
10448         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
10449         spew.c, which is where they really are.
10450         (done_pending_defargs): Declare.
10451         (unprocessed_defarg_fn): Declare.
10452         * decl.c (replace_defarg): Move to spew.c
10453         * parse.y (structsp): Call done_pending_defargs.
10454         * spew.c (defarg_fns): Rearrange list structure.
10455         (defarg_fnsdone): New static variable.
10456         (defarg_depfns): New static variable.
10457         (init_spew): Adjust.
10458         (add_defarg_fn): Store the type in TREE_TYPE.
10459         (do_pending_defargs): Detect and deal with ordering constraints
10460         and circularity.
10461         (done_pending_defargs): New function.
10462         (unprocessed_defarg_fn): New function.
10463         (replace_defarg): Moved from decl.c. Robustify. Don't save
10464         if circularity detected.
10466 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10468         * pt.c (unify): Check array has a domain, before checking
10469         whether it is variable sized.
10471 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10473         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
10474         parameters with pointers to arrays of unknown bound.
10476 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10478         * parse.y (template_parm_header, template_spec_header): New
10479         reductions. Split out from ...
10480         (template_header): ... here. Use them.
10481         (template_template_parm): Use template_parm_header.
10482         * semantics.c (finish_template_template_parm): Add assert.
10484 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10486         * mangle.c (write_builtin_type): Fix thinko.
10488         * pt.c (copy_default_args_to_explicit_spec_1): New function.
10489         (copy_default_args_to_explicit_spec): Likewise.
10490         (check_explicit_specialization): Use it.
10492         * class.c (finish_struct_1):  Remove last argument in call to
10493         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10494         * decl.c (builtin_function): Likewise.
10495         (build_cp_library_fn): Likewise.
10496         (check_initializer): Likewise.
10497         (make_rtl_for_nonlocal_decl): Likewise.
10498         (cp_finish_decl): Likewise.
10499         (start_function): Likewise.
10500         * decl2.c (finish_anon_union): Likewise.
10501         * friend.c (do_friend): Likewise.
10502         * init.c (build_java_class_ref): Likewise.
10503         * method.c (make_thunk): Likewise.
10504         * pt.c (tsubst_friend_function): Likewise.
10505         * semantics.c (expand_body): Likewise.
10507 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10509         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
10510         looking at DECL_CLONED_FUNCTION for non-functions.
10512 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10514         * error.c (dump_template_parameter): Use parm to determine how
10515         to print default value.
10517 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10519         * class.c (duplicate_tag_error): Clear more flags.
10521 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10523         * call.c (build_new_method_call): Use binfo_for_vbase.
10525 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
10527         * cp-tree.h (flag_cond_mismatch): Don't declare.
10528         * decl2.c (flag_cond_mismatch): Don't define.
10529         (lang_f_options): Remove cond-mismatch.
10530         (unsupported_options): Add cond-mismatch.
10532 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
10534         * class.c (handle_using_decl): Reject using of constructor name
10535         of sourcing class. Allow injecting of a method with same name as
10536         nested class. Fixup error messages.
10538 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10540         * decl2.c (lang_decode_option): Handle -Wformat=2.
10542 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10544         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
10545         initialized_in_class.
10546         (DECL_DEFINED_IN_CLASS_P): Rename to ...
10547         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
10548         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
10549         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
10550         * pt.c (check_default_tmpl_args): Adjust for
10551         DECL_INITIALIZED_IN_CLASS_P.
10552         (instantiate_class_template): Likewise.
10553         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
10555         * class.c (finish_struct): Constify saved_filename.
10557 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10559         * class.c (duplicate_tag_error): Adjust diagnostic.
10560         (finish_struct): Locally set location to start of struct.
10561         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
10563 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10565         * decl.c (struct binding_level): Adjust class_shadowed comments
10566         to reflect reality.
10567         (push_class_level_binding): Adjust comments to reflect reality.
10568         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
10569         Don't set TREE_VALUE on the class_shadowed list.
10571 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10573         * decl2.c (acceptable_java_type): Allow references too.
10574         * init.c (build_java_class_ref): When using the new ABI, search
10575         `class$' and have it mangled with `mangle_decl.'
10576         * mangle.c (write_java_integer_type_codes): New function.
10577         (write_builtin_type): Detect and mangle Java integer and real
10578         types.
10580 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
10582         * decl2.c (grokfield): Don't accept `asm' specifiers for
10583         non-static data members.
10585 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10587         * expr.c (cplus_expand_expr): Don't reset `target'.
10589 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
10591         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
10593 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10595         * parse.y (template_datadef): Check for error_mark_node.
10597 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10599         * cp-tree.def (DEFAULT_ARG): Make `x' class.
10601 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10603         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
10604         (record_builtin_type): Make non-static.
10605         (flag_short_double): Don't declare.
10606         (init_decl_processing): Remove the creation of many tree nodes now
10607         in c_common_nodes_and_builtins.
10608         (build_void_list_node): New function.
10609         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
10610         * cp-tree.h (flag_short_wchar): Don't declare.
10612 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
10614         * call.c (build_conv): Don't use build1 for USER_CONV.
10615         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
10617 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10619         * lex.c (lang_init): Call c_common_lang_init.
10621 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10623         * search.c (lookup_fnfields_here): Remove.
10624         (look_for_overrides_r): Use lookup_fnfields_1.
10625         Ignore functions from using declarations.
10627 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10629         Implement exceptions specifiers for implicit member functions.
10630         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
10631         * method.c (synthesize_exception_spec): New function.
10632         (locate_dtor, locate_ctor, locate_copy): New functions.
10633         (implicitly_declare_fn): Generate the exception spec too.
10634         * search.c (check_final_overrider): Check artificial functions
10635         too.
10636         * typeck2.c (merge_exception_specifiers): New function.
10638 2001-01-03  Jason Merrill  <jason@redhat.com>
10640         * init.c (build_default_init): New fn.
10641         (perform_member_init): Split out from here.
10642         (build_new_1): Use it.  Simplify initialization logic.
10643         (build_vec_init): Take an array, rather than a pointer and maxindex.
10644         Speed up simple initializations.  Don't clean up if we're assigning.
10645         * cp-tree.h: Adjust.
10646         * decl2.c (do_static_initialization): Remove TREE_VEC case.
10647         * parse.y (new_initializer): Return void_zero_node for ().
10648         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
10649         * typeck2.c (digest_init): Only complain about user-written
10650         CONSTRUCTORs.
10652 2000-12-22  Mike Stump  <mrs@wrs.com>
10654         * decl2.c: (max_tinst_depth): Increase to 50.
10656 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
10658         * class.c (invalidate_class_lookup_cache): Zero the
10659         previous_class_values.
10660         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
10661         TREE_INT_CST_HIGH.
10662         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
10663         * decl.c (free_bindings): New variable.
10664         (push_binding): Don't create a new binding if we have one on the
10665         free list.
10666         (pop_binding): Put old bindings on the free list.
10667         (init_decl_processing): Use size_int, not build_int_2.
10668         Register free_bindings as a GC root.
10669         (cp_make_fname_decl): Use size_int, not build_int_2.
10670         (push_inline_template_parms_recursive): Likewise.
10671         (end_template_parm_list): Likewise.
10672         (for_each_template_parm): Do not use walk_tree_without_duplicates.
10673         (tsubst_template_parms): Use size_int, not build_int_2.
10674         (tsubst): Likewise.
10675         * rtti.c (get_vmi_pseudo_type_info): Likewise.
10677 2001-01-02  Richard Henderson  <rth@redhat.com>
10679         * parse.y (asm): Set ASM_INPUT_P.
10681 2001-01-02  Jason Merrill  <jason@redhat.com>
10683         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
10684         for v3 ABI.
10686         * typeck.c (cp_truthvalue_conversion): New fn.
10687         * cvt.c (ocp_convert): Use it.
10689         * cp-tree.h: Lose c-common.c decls.
10691         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
10692         * cvt.c (convert_to_void): Use type_unknown_p.
10694         * typeck.c (strip_all_pointer_quals): Also strip quals from
10695         pointer-to-member types.
10697         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
10698         parse.y as C.
10700         * call.c (build_new_method_call): Do evaluate the object parameter
10701         when accessing a static member.
10702         * typeck.c (build_component_ref): Likewise.
10704 2001-01-02  Andreas Jaeger  <aj@suse.de>
10706         * decl.c (cp_missing_noreturn_ok_p): New.
10707         (init_decl_processing): Set lang_missing_noreturn_ok_p.
10709 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
10711         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
10713 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
10715         * class.c (pushclass): Remove #if 0'd code.
10716         * cp-tree.h (overload_template_name): Remove.
10717         * decl.c (store_bindings): Simplify.
10718         (pop_from_top_level): Likewise.
10719         * pt.c (overload_template_name): Remove.
10720         (instantiate_decl): Don't call push_to_top_level if it's not
10721         needed.
10723 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
10725         * pt.c (register_local_specialization): Don't return a value.
10726         (lookup_template_class): Use move-to-front heuristic when looking
10727         up template instantiations.
10728         (instantiate_decl): Only push_to_top_level when we're actually
10729         going to instantiate the template.
10731 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
10733         * search.c (binfo_for_vtable): Return least derived class, not
10734         most.  Handle secondary vtables.
10736 2000-12-22  Jason Merrill  <jason@redhat.com>
10738         * pt.c (more_specialized): Don't optimize len==0.
10739         (fn_type_unification): If we're adding the return type, increase len.
10741         * typeck.c (build_binary_op): Fix pmf comparison logic.
10743         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
10744         DECL_STATIC_FUNCTION_P.
10746         * semantics.c (genrtl_finish_function): Don't try to jump to
10747         return_label unless it exists.
10749         In partial ordering for a call, ignore parms for which we don't have
10750         a real argument.
10751         * call.c (joust): Pass len to more_specialized.
10752         (add_template_candidate_real): Strip 'this', pass len.
10753         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
10754         (get_bindings_order): New fn.  Pass len down.
10755         (get_bindings_real): Strip 'this', pass len.
10756         (fn_type_unification): Likewise.
10757         (type_unification_real): Succeed after checking 'len' args.
10758         (most_specialized_instantiation): Lose explicit_args parm.
10759         * class.c (resolve_address_of_overloaded_function): Strip 'this',
10760         pass len.
10762 2000-12-21  Jason Merrill  <jason@redhat.com>
10764         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
10765         DECL_TEMPLATE_RESULT.
10767         * search.c (lookup_field_r): Call lookup_fnfields_1, not
10768         lookup_fnfields_here.
10770         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
10772         * call.c (build_object_call): Also allow conversions that return
10773         reference to pointer to function.
10774         (add_conv_candidate): Handle totype being ref to ptr to fn.
10775         (build_field_call): Also allow members of type reference to function.
10776         Lose support for calling pointer to METHOD_TYPE fields.
10778         * error.c (dump_expr): Handle *_CAST_EXPR.
10780         * typeck2.c (build_scoped_ref): Always convert to the naming class.
10782         * tree.c (break_out_cleanups): Lose.
10783         * cp-tree.h: Remove prototype.
10784         * typeck.c (build_component_ref): Don't break_out_cleanups.
10785         (build_compound_expr): Likewise.
10786         * semantics.c (finish_expr_stmt): Likewise.
10788 2000-12-20  Richard Henderson  <rth@redhat.com>
10790         * cp-tree.h: Update declarations.
10791         * decl.c (finish_case_label): Return the new stmt node.
10792         * semantics.c (finish_goto_stmt): Likewise.
10793         (finish_expr_stmt, finish_return_stmt): Likewise.
10794         (finish_break_stmt, finish_continue_stmt): Likewise.
10795         (finish_asm_stmt): Likewise.
10796         * parse.y (already_scoped_stmt): Set STMT_LINENO.
10797         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
10798         (simple_if, simple_stmt): Return the new stmt node.
10799         (save_lineno): New.
10801 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10803         * cp-tree.h: Don't declare warn_long_long.
10805 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10807         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
10808         IS_AGGR_TYPE.
10810 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10812         * pt.c (unify): Handle when both ARG and PARM are
10813         BOUND_TEMPLATE_TEMPLATE_PARM.
10815 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10817         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
10818         DECL_TEMPLATE_PARM_P.
10820 2000-12-15  Jason Merrill  <jason@redhat.com>
10822         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
10824         * init.c (build_new_1): Don't strip quals from type.
10826         * decl.c (pushdecl): Don't check for linkage on a non-decl.
10828         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
10830         * call.c (build_new_function_call): Lose space before paren in
10831         error message.
10832         (build_new_method_call): Likewise.
10834         * typeck2.c (build_m_component_ref): Propagate quals from datum.
10836 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10838         * pt.c (check_explicit_specialization): Propagate default
10839         function arguments to explicit specializations.
10841 2000-12-13  DJ Delorie  <dj@redhat.com>
10843         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
10844         and <? operators.
10846 2000-12-08  Jason Merrill  <jason@redhat.com>
10848         * error.c (dump_function_name): Don't let the user see __comp_ctor.
10850         Clean up copy-initialization in overloading code.
10851         * call.c (build_user_type_conversion_1): Die if we are asked to
10852         convert to the same or a base type.
10853         (implicit_conversion): Avoid doing so.  Lose reference binding code.
10854         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
10855         direct-initialization.  Also do direct-init part of copy-init.
10856         (build_user_type_conversion): Don't provide context to convert_like.
10857         * cvt.c (ocp_convert): build_user_type_conversion will now provide
10858         the constructor call for copy-init.
10860         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
10861         instantiation of a member template.
10862         (do_decl_instantiation): Not here.
10864 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10866         * class.c (check_field_decls): Don't special case anonymous
10867         fields in error messages.
10868         (note_name_declared_in_class): Use %D on diagnostic.
10870         * tree.c (pod_type_p): Use strip_array_types.
10871         (cp_valid_lang_attribute): Likewise.
10872         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
10873         multiple evaluations.
10874         (cp_has_mutable_p): Use strip_array_types.
10876 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10878         * cp-tree.h (sufficient_parms_p): Declare new function.
10879         * call.c (sufficient_parms_p): New function, broken out of ...
10880         (add_function_candidate): ... here. Use it.
10881         (add_conv_candidate): Use it.
10882         * decl.c (grok_ctor_properties): Use it.
10884 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
10886         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
10888 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10890         * decl2.c (lang_decode_option): Handle -Wformat-security.
10892 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10894         * pt.c (verify_class_unification): New function.
10895         (get_class_bindings): Use it.
10896         (try_class_unification): Tidy.
10897         (unify): Handle when argument of a template-id is not
10898         template parameter dependent.
10899         (template_args_equal): Handle when TREE_CODE's do not match.
10901 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
10903         * lang-specs.h (c++): When invoking the stand-alone preprocessor
10904         for -save-temps, pass all relevant -Defines to it, and then don't
10905         pass them to cc1plus.
10907 2000-12-05  Will Cohen  <wcohen@redhat.com>
10909         * decl.c (finish_case_label): Cleared
10910         more_cleanups_ok in surrounding function scopes.
10911         (define_label): Likewise.
10913 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10915         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
10916         (get_matching_virtual): Remove.
10917         (look_for_overrides): Declare new function.
10918         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
10919         DECL_VINDEX here.
10920         * class.c (check_for_override): Move base class iteration code
10921         to look_for_overrides.
10922         * search.c (next_baselink): Remove.
10923         (get_virtuals_named_this): Remove.
10924         (get_virtual_destructor): Remove.
10925         (tree_has_any_destructors_p): Remove.
10926         (struct gvnt_info): Remove.
10927         (check_final_overrider): Remove `virtual' from error messages.
10928         (get_matching_virtuals): Remove. Move functionality to ...
10929         (look_for_overrides): ... here, and ...
10930         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
10931         to be overriding.
10933 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10935         * typeck.c (get_delta_difference): If via a virtual base,
10936         return zero.
10937         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
10938         adjustment.
10940 2000-12-04  Richard Henderson  <rth@redhat.com>
10942         * error.c (dump_tree): Use output_add_string not OB_PUTS.
10944 2000-12-04  Jason Merrill  <jason@redhat.com>
10946         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
10947         (write_builtin_type): Pass intSI_type_node and the like through
10948         type_for_mode.
10949         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
10950         Pass intSI_type_node and the like through type_for_mode.
10951         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
10952         * pt.c (tsubst, unify): Likewise.
10953         * tree.c (walk_tree): Likewise.
10954         * error.c (dump_type): Likewise.
10955         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
10957         * Make-lang.in: Tweak top comment for emacs.
10958         (cp/TAGS): Restore.
10960         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
10962         * class.c (clone_function_decl): Robustify.
10964 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
10966         * decl.c (store_bindings): Only search in the non modified
10967         old_bindings for duplicates.
10969 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10971         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
10972         TYPE_POLYMORPHIC_P.
10974         * typeck.c (build_static_cast): Remove unused variable.
10976 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10978         * pt.c: Fix typo in comment.
10980 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10982         * decl2.c (warn_format): Remove definition.
10983         (lang_decode_option): Handle -Wformat-nonliteral,
10984         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
10986 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10988         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
10989         (init_decl_processing): Don't create string_type_node,
10990         const_string_type_node, wint_type_node, intmax_type_node,
10991         uintmax_type_node, default_function_type, ptrdiff_type_node and
10992         unsigned_ptrdiff_type_node.  Adjust position of call to
10993         c_common_nodes_and_builtins.
10994         (identifier_global_value): New function.
10996 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
10998         * call.c (standard_conversion): Reject pointer to member
10999         conversions from ambiguous, inaccessible or virtual bases.
11000         * typeck.c (build_static_cast): Don't check pointers to members
11001         specially.
11003 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11005         * method.c (do_build_copy_constructor): Preserve cv
11006         qualifications when accessing source object members.
11007         (do_build_assign_ref): Likewise. Remove separate diagnostics for
11008         unnamed fields.
11010 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11012         * method.c (do_build_assign_ref): Construct appropriately
11013         CV-qualified base reference. Don't allow const casts in base
11014         conversion.
11016 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
11018         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
11019         incomplete return type.
11021 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11023         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
11024         * semantics.c (finish_base_specifier): Accept a _TYPE not a
11025         _DECL.
11027 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11029         * spew.c (yyerror): Cope if yylval.ttype is NULL.
11031 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11033         * decl.c (grokdeclarator): Diagnose undefined template contexts.
11035 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11037         * decl.c (grokdeclarator): Do type access control on friend
11038         class.
11040 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11042         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
11043         bison parser ickiness.
11044         * pt.c (tsubst_friend_function): Enter namespace scope when
11045         tsubsting the function name.
11046         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
11048 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
11050         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
11051         * cvt.c (cp_convert_to_pointer): Add force parameter.
11052         Allow conversions via virtual base if forced.
11053         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
11054         (ocp_convert): Likewise.
11055         * search.c (binfo_from_vbase): Return the virtual base's binfo.
11056         * typeck.c (get_delta_difference): Adjust handling of virtual
11057         bases.
11059 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
11061         * tree.c (struct list_hash): Remove.
11062         (list_hash_table): Make it be an htab.
11063         (struct list_proxy): New type.
11064         (list_hash_eq): New function.
11065         (list_hash_pieces): Renamed from ...
11066         (list_hash): ... this.
11067         (list_hash_lookup): Remove.
11068         (list_hash_add): Remove.
11069         (hash_tree_cons): Use the generic hashtable.
11070         (mark_list_hash): Remove.
11071         (init_tree): Create the hashtable.
11073 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
11075         * method.c (build_mangled_C9x_name): Rename to
11076         build_mangled_C99_name.  Change C9X references in comments to
11077         refer to C99.
11079 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11081         * parse.y (unary_expr): Move VA_ARG from here ...
11082         (primary): ... to here.
11084 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
11086         * semantics.c (finish_id_expr): If type is error_mark, return
11087         error_mark.
11089 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
11091         * pt.c (lookup_template_class): Simplify loop exit constructs.
11092         Cope when there is no partial instantiation of a template
11093         template member.
11095 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11097         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
11099 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
11101         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
11102         prefix.
11104         * pt.c (do_decl_instantiate): Explicitly clone constructors and
11105         destructors that haven't already been cloned.
11107 2000-11-20  Richard Henderson  <rth@redhat.com>
11109         * parse.y (yyparse_1): Rename the parser entry point.
11111 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
11113         * mangle.c (write_name): Use <unscoped-name> for names directly in
11114         function scope.
11115         (write_unscoped_name): Accept names directly in function scope.
11117 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
11119         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
11120         * parse.y (extdef): Add EXPORT reduction.
11121         * spew.c (yylex): Don't skip export here.
11123 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
11125         * decl.c (init_decl_processing): Correct name of pure virtual
11126         function under the new ABI.
11127         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
11128         (throw_bad_typeid): Likewise for bad typeid function.
11130 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
11132         * decl.c (grokparms): Don't even function types of `void' type,
11133         either.
11134         * mangle.c (write_type): Don't crash when confronted with the
11135         error_mark_node.
11137         * decl.c (grokparms): Don't create parameters of `void' type.
11139 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11141         * lex.c (mark_impl_file_chain): Delete.
11142         (init_parse): Remove call to ggc_add_string_root.  No need to
11143         ggc_strdup a string constant.  Do not add impl_file_chain to GC
11144         roots.
11145         (handle_pragma_implementation): No need to ggc_strdup main_filename.
11147 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11149         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
11151 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11153         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
11154         * decl.c (grokdeclarator): Don't reject void parms here.
11155         (require_complete_types_for_parms): Simplify, use
11156         complete_type_or_else.
11157         (grokparms): Remove bitrot. Remove funcdef parm.
11158         Deal with ellipsis parm lists here.
11159         * semantics.c (finish_parmlist): Don't append void_list_node
11160         here. Set PARMLIST_ELLIPSIS_P.
11162 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11164         * typeck2.c (incomplete_type_error): Reorganize to avoid
11165         excessive diagnostics.
11167 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11169         * lex.c (struct impl_files, internal_filename): Constify a char *.
11171 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
11173         * mangle.c (write_special_name_constructor): Don't generate
11174         assembler junk when confronted with an old-style constructor.
11175         (write_special_name_destructor): Likewise.
11176         (mangle_decl_string): Do it here instead.
11178 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
11180         * call.c (op_error): Make error messages clearer.
11182 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
11184         * decl.c (wrapup_globals_for_namespace): Don't mark things
11185         TREE_ASM_WRITTEN when they're not.
11187 2000-11-15  Jason Merrill  <jason@redhat.com>
11189         * typeck2.c (friendly_abort): Uncount the error before handing
11190         off to fancy_abort.
11192 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11194         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
11196 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
11198         * class.c (build_vtbl_initializer): Fix typo in comment.
11199         * typeck.c (expr_sizeof): Don't crash on errors.
11201 2000-11-14  Jim Wilson  <wilson@redhat.com>
11203         * lang-specs.h: Add %2 after %(cc1_options).
11205 2000-11-14  Richard Henderson  <rth@redhat.com>
11207         * typeck.c (c_sizeof): Be strict about casting result value
11208         back to c_size_type_node.
11209         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
11211 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11213         * typeck.c (build_unary_op): Use boolean_increment from
11214         c-common.c, moving the relevant code there.
11216 2000-11-11  Jason Merrill  <jason@redhat.com>
11218         * typeck.c (mark_addressable): Don't call put_var_into_stack.
11220         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
11221         in inlines.
11223 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11225         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
11226         * lex.c (copy_lang_decl): Likewise.
11228 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
11230         * dump.c (cp_dump_tree): Don't dump function bodies here.
11232         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
11233         (dump.o): Update dependency list.
11234         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
11235         (flag_dump_translation_unit): Likewise.
11236         (CP_TYPE_QUALS): Adjust definition.
11237         (DECL_C_BIT_FIELD): Remove.
11238         (SET_DECL_C_BIT_FIELD): Likewise.
11239         (CLEAR_DECL_C_BIT_FIELD): Likewise.
11240         (add_maybe_template): Likewise.
11241         (strip_array_types): Likewise.
11242         (dump_node_to_file): Likewise.
11243         (cp_dump_tree): New function.
11244         * decl.c (init_decl_processing): Set lang_dump_tree.
11245         * decl2.c (flag_dump_translation_unit): Remove.
11246         * dump.c: Move most of it to ../c-dump.c.
11247         (cp_dump_tree): New function.
11248         * pt.c (add_maybe_template): Remove.
11249         * typeck.c (strip_array_types): Likewise.
11251 2000-11-07  Eric Christopher  <echristo@redhat.com>
11253         * decl.c (init_decl_processing): Change definition of
11254         __wchar_t to wchar_t.  Remove artificial declaration of
11255         wchar_t.
11256         * lex.c: Change instances of __wchar_t to wchar_t.
11258 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
11260         * lex.c (do_identifier): Don't lookup_name for operators.
11261         * parse.y (operator): Save looking_for_typename.
11262         (unoperator): Restore it.
11263         * spew.c (frob_opname): Use nth_token for lookahead.
11265 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
11267         * decl.c (grok_op_properties): Always use coerce_new_type and
11268         coerce_delete_type.
11269         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
11270         exception specification. Tidy up.
11271         (coerce_delete_type): Preserve exception specification. Tidy up.
11273 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11275         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
11276         (push_binding_level), error.c (cp_tree_printer), pt.c
11277         (process_partial_specialization, tsubst_template_arg_vector),
11278         search.c (lookup_member): Use memset () instead of bzero ().
11280 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
11282         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
11284 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11286         * Make-lang.in (c++.distdir): Remove.
11288 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
11290         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
11291         declarations from different namespaces to be combined.
11293 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
11295         * decl.c: Include tm_p.h.
11297 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
11299         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
11301 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11303         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
11304         (build_overload_value), repo.c (open_repo_file), xref.c
11305         (open_xref_file): Use strchr () and strrchr () instead of index ()
11306         and rindex ().
11308 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
11310         * call.c (build_over_call): Call fold on the CALL_EXPR.
11312 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
11314         * error.c (dump_template_decl): Separate template hearders with
11315         space not comma.
11317 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
11319         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
11320         TS_* flags with corresponding TFF_*.  Adjust prototypes of
11321         functions (which used to take a tree_string_flags) to take an int.
11323         * cp-tree.h (enum tree_string_flags): Remove
11324         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
11325         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
11326         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11327         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11328         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
11329         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
11330         (type_as_string, decl_as_string, expr_as_string,
11331         context_as_string): Adjust prototype.
11333         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
11334         instead of TS_PLAIN.
11336         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
11337         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
11338         plain `0'.
11340 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
11342         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
11343         (linkage_kind): New enumeration.
11344         (decl_linkage): New function.
11345         * decl2.c (comdat_linkage): Extend comment.
11346         * error.c (dump_function_decl): Print the arguments used to
11347         instantiate a template, even when not printing the type of the
11348         function.
11349         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
11350         not TREE_PUBLIC, to test for external linkage.
11351         * tree.c (decl_linkage): New function.
11353 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
11355         * pt.c (instantiate_decl): Always instantiate static data members
11356         initialized in-class.
11358 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11360         * Make-lang.in: Move all build rules here from Makefile.in,
11361         adapt to new context.  Wrap all rules that change the current
11362         directory in parentheses.  Expunge all references to $(P).
11363         When one command depends on another and they're run all at
11364         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11365         all object-file generation rules.  Delete obsolete variables.
11367         * Makefile.in: Delete.
11368         * config-lang.in: Delete outputs= line.
11370 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11372         * error.c (dump_function_decl): Print no space between
11373         `ptr-operator' the `type-specifier' of the return type.
11374         (dump_type_prefix): Make sure we put space at the appropriate
11375         place.
11377 2000-10-23  Jason Merrill  <jason@redhat.com>
11379         * call.c (equal_functions): Also call decls_match for extern "C" fns.
11381 2000-10-22  Jason Merrill  <jason@redhat.com>
11383         * call.c (build_conditional_expr): Use ocp_convert to force
11384         rvalue conversion.
11386 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
11388         * call.c (standard_conversion): Use RVALUE_CONVs for all
11389         expressions that satisfy lvalue_p, not just those that satisfy
11390         real_lvalue_p.
11392         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
11394         * typeck.c (c_sizeof): Return an expression of `size_t' type,
11395         not one with TYPE_IS_SIZETYPE set.
11396         (dubious_conversion_warnings): Remove special-case code.
11398 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
11400         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
11401         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
11402         (dump_type_prefix): Print vector-of-int as 'int vector'.
11403         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
11404         * tree.c (walk_tree): Handle VECTOR_TYPE.
11406         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
11408 2000-10-21  Jason Merrill  <jason@redhat.com>
11410         * parse.y (operator): Set got_object from got_scope.
11411         Set looking_for_typename.
11412         * decl.c (lookup_name_real): Clear val after setting from_obj.
11413         Reorganize diagnostic.
11415 2000-10-20  Jason Merrill  <jason@redhat.com>
11417         * tree.c (walk_tree): Don't walk into default args.
11419         * error.c (dump_expr): Use host_integerp.
11421 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
11423         * typeck2.c (abstract_virtuals_error): Use "because" instead of
11424         "since" in error message.
11426 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11428         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
11430 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
11432         * decl.c (revert_static_member_fn): Fixed typo.
11434 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
11436         * class.c (subobject_offset_fn): New type.
11437         (dfs_record_base_offsets): Remove.
11438         (record_base_offsets): Likewise.
11439         (dfs_search_base_offsets): Likewise.
11440         (record_subobject_offset): New function.
11441         (check_subobject_offset): Likewise.
11442         (walk_subobject_offsets): Likewise.
11443         (record_subobject_offsets): Likewise.
11444         (layout_conflict_p): Reimplement.
11445         (layout_nonempty_base_or_field): Correct handling of type
11446         conflicts during layout.
11447         (layout_empty_base): Likewise.
11448         (build_base_field): Adjust to handle new representation of empty
11449         base offset table.
11450         (build_base_fields): Likewise.
11451         (layout_virtual_bases): Likewise.
11452         (splay_tree_compare_integer_csts): New function.
11453         (layout_class_type): Use a splay_tree, rather than a varray, to
11454         represent the offsets of empty bases.
11456         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
11457         * decl.c (select_decl): Don't return declarations that are
11458         DECL_ANTICIPATED.
11460 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
11462         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
11463         (fake_std_node): New macro.
11464         * decl.c (in_std): Rename to ...
11465         (in_fake_std): ... this.
11466         (flag_no_builtin): Remove.
11467         (flag_no_nonansi_builtin): Likewise.
11468         (walk_namespaces_r): Use fake_std_node.
11469         (push_namespace): Use std_identifier.
11470         (pop_namespace): Use in_fake_std.
11471         (lookup_name_real): Use fake_std_node.
11472         (init_decl_processing): When -fhonor-std, create the `std'
11473         namespace.  Don't create a dummy fake_std_node in that case.
11474         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
11475         (builtin_function): Put builtins whose names don't begin
11476         with `_' in the std namespace.
11477         * decl2.c (flag_no_builtin): Remove.
11478         (flag_no_nonansi_builtin): Likewise.
11479         (set_decl_namespace): Use fake_std_node.
11480         (validate_nonmember_using_decl): Likewise.
11481         (do_using_directive): Likewise.
11482         (handle_class_head): Likewise.
11483         * dump.c (dequeue_and_dump): Likewise.
11484         * except.c (init_exception_processing): Use std_identifier.
11485         * init.c (build_member_call): Use fake_std_node.
11486         * rtti.c (init_rtti_processing): Use std_identifier.
11488 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
11490         * cp-tree.h (back_end_hook): Remove declaration.
11491         * decl2.c (back_end_hook): Remove definition.
11493         * dump.c (dequeue_and_dump): Dump TREE_USED.
11495 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
11497         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
11499 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11501         * decl.c (WINT_TYPE): Define.
11502         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
11503         c_size_type_node, signed_size_type_node and wint_type_node.
11505 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11507         * decl2.c (warn_missing_format_attribute): New variable.
11508         (lang_decode_option): Decode -Wmissing-format-attribute.
11510 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
11512         * typeck.c (qualify_type): Remove.
11513         (composite_pointer_type): Fix handling of conversions to `cv void*'.
11515 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11517         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
11519 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11521         * Makefile.in (parse.c, parse.h): Create atomically.
11523 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11525         * class.c (current_obstack): Remove.
11526         * decl.c (ggc_p): Remove.
11527         (start_decl): Don't use decl_tree_cons.
11528         (grokdeclarator): Don't use build_decl_list.
11529         (start_function): Don't use decl_tree_cons.
11530         (finish_function): Don't mess with obstacks.
11531         * decl2.c (grok_x_components): Don't use build_decl_list.
11532         * lex.c (make_call_declarator): Don't call decl_tree_cons.
11533         (implicitly_declare_fn): Don't call build_decl_list.
11534         * parse.y (frob_specs): Don't call build_decl_list or
11535         decl_tree_cons.
11536         (expr_or_declarator_intern): Don't call decl_tree_cons.
11537         (primary): Don't call build_decl_list.
11538         (fcast_or_absdcl): Likewise.
11539         (typed_declspecs): Don't call decl_tree_cons.
11540         (reserved_declspecs): Don't call build_decl_list.
11541         (declmods): Likewise.
11542         (reserved_typespecquals): Likewise.
11543         (aggr): Likewise.
11544         (new_type_id): Likewise.
11545         (cv_qualifiers): Likewise.
11546         (after_type_declarator_intern): Likewise.
11547         (notype_declarator_intern): Likewise.
11548         (absdcl_intern): Likewise.
11549         (named_parm): Likewise.
11550         * pt.c (most_specialized_class): Likewise.
11551         * repo.c (temporary_obstack): Make it a structure, not a pointer.
11552         (init_repo): Initialize it.
11553         * search.c (current_obstack): Remove.
11554         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
11556 2000-10-09  Richard Henderson  <rth@cygnus.com>
11558         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
11559         (c++ language support bits for libgcc): Remove.
11560         (c++.clean): Remove cplib2.txt cleanup.
11561         * config-lang.in (headers, lib2funcs): Remove.
11563         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
11564         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
11565         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
11566         * inc/new.h, inc/typeinfo: Remove files.
11568 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11570         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
11571         defined.
11572         (init_decl_processing): Initialize intmax_type_node and
11573         uintmax_type_node.
11575 2000-10-06  Richard Henderson  <rth@cygnus.com>
11577         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
11578         (original_result_rtx): Remove.
11579         * decl.c (save_function_data): Don't clear x_result_rtx.
11580         (mark_lang_function): Don't mark it either.
11581         * expr.c (fixup_result_decl): Remove.
11582         * semantics.c (genrtl_named_return_value): Frob the return decl
11583         before calling emit_local_var.
11584         (genrtl_finish_function): Don't call fixup_result_decl.
11585         Always emit the jump to return_label.
11587 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
11589         * pt.c (lookup_template_class): Set current access for enum.
11590         (tsubst_enum): Set file & line for enum decl.
11592         * spew.c (yylex): Remove unused variable.
11594 2000-10-05  Richard Henderson  <rth@cygnus.com>
11596         * semantics.c (genrtl_finish_function): Don't init or check
11597         can_reach_end; remove noreturn and return value checks.
11599 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11601         * init.c (build_java_class_ref): Use `build_static_name' with a
11602         suffix, not a prefix, to build the class object's name.
11604 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11606         * cp-tree.h (access_kind): Fix comment typo.
11607         * decl2.c (grokfield): Fix diagnostic typo.
11608         * semantics.c (finish_template_type): Fix comment typo.
11609         (finish_qualified_object_call_expr): Likewise.
11611 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11613         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
11614         tsubsting fails.
11616 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11618         * spew.c (frob_id): New static function.
11619         (frob_opname): Use it.
11620         (yylex): Use it.
11622 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11624         * decl.c (lang_mark_false_label_stack): Remove.
11625         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
11627 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
11629         * gxxint.texi: Use @email for formatting email addresses.
11631 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
11633         * error.c: Remove direct obstack manipulation.  Replace with
11634         output_buffer-based formatting.  Adjust calls to removed macros.
11635         (obstack_chunk_alloc, obstack_chunk_free): Remove.
11636         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
11637         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
11639 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
11641         * ir.texi: Move to ../c-tree.texi.
11643 2000-09-20  Jason Merrill  <jason@redhat.com>
11645         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
11647 2000-09-21  Andreas Jaeger  <aj@suse.de>
11649         * errfn.c: Move declaration of cp_printer and cp_printers to ...
11650         * cp-tree.h: ... here.
11652         * error.c: Remove declaration of cp_printer.
11654 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
11656         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
11658 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
11660         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
11661         users.
11663 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
11665         * decl.c (start_function): Robustify.
11667 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11669         * cp-tree.h (check_function_format): Accept a `status' parameter.
11671         * call.c, typeck.c: Updates calls to `check_function_format'.
11673 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
11675         * decl2.c (handle_class_head): Always push some scope even
11676         in the error case.
11678 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
11680         * cp-tree.h (struct cp_language_function): Remove
11681         x_scope_stmt_stack and name_declared.
11682         (current_scope_stmt_stack): Remove.
11683         (function_name_declared_p): New macro.
11684         (struct lang_decl_flags): Use c_lang_decl as a base class.
11685         (context): Remove.
11686         (struct lang_decl): Replace saved_tree with context.
11687         (DECL_FRIEND_CONTEXT): Adjust accordingly.
11688         (SET_DECL_FRIEND_CONTEXT): Likewise.
11689         (DECL_VIRTUAL_CONTEXT): Likewise.
11690         (DECL_SAVED_TREE): Remove.
11691         (C_DECLARED_LABEL_FLAG): Likewise.
11692         (cplus_expand_expr_stmt): Don't declare.
11693         (add_decl_stmt): Likewise.
11694         (add_scope_stmt): Likewise.
11695         * decl.c (mark_stmt_tree): Remove.
11696         (case_compare): Likewise.
11697         (finish_case_label): Use c_add_case_label.
11698         (init_decl_processing): Set more language-specific hooks.
11699         (build_enumerator): Fix typo in comment.
11700         (cplus_expand_expr_stmt): Remove.
11701         (mark_lang_function): Use mark_c_language_function.
11702         (lang_mark_tree): Use c_mark_lang_decl.
11703         * decl2.c: Change order of inclusion.
11704         * except.c: Likewise.
11705         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
11706         back on c_expand_expr.
11707         * friend.c: Include expr.h.
11708         * init.c: Change order of inclusion.
11709         * Makefile.in: Update dependencies.
11710         * lex.h (free_lang_decl_chain): Remove.
11711         * optimize.c (maybe_clone_body): Use function_name_declared_p.
11712         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
11713         it doesn't exist.
11714         (instantiate_decl): Use function_name_declared_p.
11715         * semantics.c (lang_expand_expr_stmt): Remove.
11716         (set_current_function_name_declared): Likewise.
11717         (current_function_name_declared): Likewise.
11718         (begin_compound_stmt): Use function_name_declared_p.
11719         (add_decl_stmt): Remove.
11720         (setup_vtbl_ptr): Use function_name_declared_p.
11721         (add_scope_stmt): Remove.
11722         (current_scope_stmt_stack): New function.
11723         (cp_expand_stmt): Don't handle SCOPE_STMTs.
11724         (expand_body): Use function_name_declared_p.
11725         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
11726         * typeck.c: Change order of includes.
11727         (convert_sequence): Remove.
11729 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11731         * lex.c (reswords): Add _Complex.
11733 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11735         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
11737 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
11739         * init.c (begin_init_stmts): Don't use // comments.
11741 2000-09-12  Jason Merrill  <jason@redhat.com>
11743         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
11744         all non-extern arrays.
11746         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
11747         typenames, too.  Downgrade complaint to pedwarn.
11748         (xref_tag): Warn about surprising behavior of 'friend struct T'.
11749         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
11750         'class This::Inherited'.
11752 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
11754         * decl.c (finish_case_label): Given the LABEL_DECL a
11755         DECL_CONTEXT.
11757 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
11759         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
11760         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
11761         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11762         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11763         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
11764         New macros.
11765         (sorry_for_unsupported_tree, print_scope_operator,
11766         print_left_paren, print_right_paren, print_left_bracket,
11767         print_right_bracket, print_whitespace): Likewise.
11768         (aggr_variety): Rename to class_key_or_enum.
11769         (print_type): Rename to print_type_id.
11770         (print_type_specifier_seq, print_simple_type_specifier,
11771         print_elaborated_type_specifier,
11772         print_rest_of_abstract_declarator,
11773         print_parameter_declaration_clause, print_exception_specification,
11774         print_nested_name_specifier, print_template_id,
11775         typedef_original_name,  print_template_argument_list_start,
11776         print_template_argument_list_end): New functions.
11778 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
11780         * ir.texi: Add more documentation.
11782 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
11784         * cp-tree.h (struct saved_scope): Remove x_function_parms.
11785         (current_function_parms): Don't define.
11786         (struct cp_language_function): Remove parms_stored.
11787         (current_function_just_assigned_this): Don't define.
11788         (current_function_parms_stored): Likewise.
11789         (static_ctors): Declare.
11790         (static_dtors): Likewise.
11791         (SF_EXPAND): Don't define.
11792         (expand_start_early_try_stmts): Remove declaration.
11793         (store_parm_decls): Likewise.
11794         * decl.c (static_ctors): Don't declare.
11795         (static_dtors): Likewise.
11796         (struct binding_level): Remove this_block.
11797         (poplevel): Remove dead code.
11798         (set_block): Likewise.
11799         (mark_binding_level): Don't mark this_block.
11800         (mark_saved_scope): Don't mark x_function_parms.
11801         (init_decl_processing): Don't add current_function_parms as a GC
11802         root.
11803         (check_function_type): Change prototype.
11804         (start_function): Remove RTL-generation code.
11805         (expand_start_early_try_stmts): Remove.
11806         (store_parm_decls): Give it internal linkage.  Remove
11807         RTL-generation code.
11808         (finish_function): Remove RTL-generation code.
11809         * decl2.c (static_ctors): Fix formatting.
11810         (static_dtors): Likewise.
11811         * method.c (use_thunk): Don't call store_parm_decls.
11812         (synthesize_method): Likewise.
11813         * optimize.c (maybe_clone_body): Likewise.
11814         * parse.y (fn.def2): Likewise.
11815         (.set_base_init): Likewise.
11816         (nodecls): Likewise.
11817         * pt.c (instantiate_decl): Likewise.
11818         * rtti.c (synthesize_tinfo_fn): Likewise.
11819         * semantics.c (genrtl_try_block): Simplify.
11820         (expand_body): Use genrtl_start_function and
11821         genrtl_finish_function.
11822         (genrtl_start_function): New function.
11823         (genrtl_finish_function): Likewise.
11825 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11827         * error.c (cp_tree_printer, case 'P'): Append break.
11829 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11831         * cp-tree.h (frob_opname): Declare.
11832         * parse.y (saved_scopes): New static variable.
11833         (cp_parse_init): Adjust.
11834         (do_id): If lastiddecl is NULL, do do_identifier.
11835         (operator): Save scope information.
11836         (unoperator): New reduction. Restore scope information.
11837         (operator_name): Append unoperator. Call frob_opname.
11838         * spew.c (frob_opname): Define.
11840 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11842         * decl.c, rtti.c: Include defaults.h if not already included.
11843         Don't define the *_TYPE_SIZE macros.
11845 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
11847         * cp-tree.h (push_switch): Change prototype.
11848         (check_cp_case_value): Remove declaration.
11849         (decl_constant_value): Likewise.
11850         * decl.c (struct cp_switch): Add switch_stmt and cases.
11851         (case_compare): New function.
11852         (push_switch): Set switch_stmt.  Initialize cases.
11853         (pop_switch): Clean up cases.
11854         (define_case_label): Rename to ...
11855         (finish_case_label): ... this.  Do semantic analysis for case
11856         labels here.
11857         (start_function): Correct comment.
11858         * decl2.c (check_cp_case_value): Remove.
11859         * expr.c (do_case): Remove.
11860         * pt.c (tsubst_expr): Adjust call to finish_case_label.
11861         * semantics.c (genrtl_do_poplevel): Remove declaration.
11862         (RECHAIN_STMTS): Remove.
11863         (finish_break_stmt): Use build_break_stmt.
11864         (finish_continue_stmt): Use build_continue_stmt.
11865         (finish_switch_cond): Adjust condition here, rater than in
11866         c_expand_start_case.
11867         (finish_case_label): Remove.
11868         * typeck.c (c_expand_return): Remove.
11869         (c_expand_start_case): Likewise.
11871 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
11873         * ir.texi: Document type nodes.
11875 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11877         * cp-tree.h (init_cp_semantics): Declare.
11878         (genrtl_try_block): Don't declare.
11879         (genrtl_handler): Likewise.
11880         (genrtl_catch_block): Likewise.
11881         (genrtl_ctor_stmt): Likewise.
11882         (genrtl_subobject): Likewise.
11883         (genrtl_do_poplevel): Likewise.
11884         (genrtl_named_return_value): Likewise.
11885         * lex.c (init_parse): Call init_cp_semantics.
11886         * semantics.c (genrtl_try_block): Give it internal linkage.
11887         (genrtl_handler): Likewise.
11888         (genrtl_catch_block): Likewise.
11889         (genrtl_ctor_stmt): Likewise.
11890         (genrtl_subobject): Likewise.
11891         (genrtl_do_poplevel): Likewise.
11892         (genrtl_named_return_value): Likewise.
11893         (lang_expand_stmt): Rename to ...
11894         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
11895         (init_cp_semantics): Define.
11897         * decl.c (initialize_local_var): Remove RTL-generating code.
11898         * semantics.c (genrtl_try_block): Fix formatting.
11900         Move statement-tree facilities from C++ to C front-end.
11901         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
11902         (void_zero_node): Remove.
11903         (stmt_tree): Likewise.
11904         (scope_chain): Adjust.
11905         (language_function): Rename to cp_language_function.
11906         (cp_function_chain): Adjust.
11907         (current_stmt_tree): Remove.
11908         (last_tree): Likewise.
11909         (last_expr_type): Likewise.
11910         (struct lang_decl): Adjust.
11911         (STMT_IS_FULL_EXPR_P): Remove.
11912         (add_tree): Remove.
11913         (begin_stmt_tree): Likewise.
11914         (finish_stmt_tree): Likewise.
11915         (walk_tree_fn): Likewise.
11916         (walk_stmt_tree): Likewise.
11917         * class.c (finish_struct): Replace use of add_tree with add_stmt.
11918         * decl.c (mark_stmt_tree): Adjust type.
11919         (init_decl_processing): Don't build void_zero_node.
11920         (initialize_local_var): Adjust usage of current_stmt_tree.
11921         (finish_enum): Use add_stmt, not add_tree.
11922         (save_function_data): Adjust use of language_function.
11923         (finish_constructor_body): Use add_stmt, not add_tree.
11924         (finish_destructor_body): Likewise.
11925         (push_cp_function_context): Adjust use of language_function.
11926         (pop_cp_function_context): Likewise.
11927         (mark_lang_function): Likewise.
11928         (mark_cp_function_context): Likewise.
11929         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
11930         (build_vec_init): Likewise.
11931         * semantics.c (SET_LAST_STMT): Remove.
11932         (RECHAIN_STMTS): Don't use it.
11933         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
11934         (current_stmt_tree): Define.
11935         (add_tree): Remove.
11936         (finish_goto_stmt): Use add_stmt, not add_tree.
11937         (finish_expr_stmt): Likewise.
11938         (begin_if_stmt): Likewise.
11939         (finish_then_clause): Likewise.
11940         (begin_while_stmt): Likewise.
11941         (begin_do_stmt): Likewise.
11942         (finish_return_stmt): Likewise.
11943         (begin_for_stmt): Likewise.
11944         (finish_break_stmt): Likewise.
11945         (finish_continue_stmt): Likewise.
11946         (begin_switch_stmt): Likewise.
11947         (finish_case_label): Likewise.
11948         (begin_try_block): Likewise.
11949         (begin_function_try_block): Likewise.
11950         (begin_handler): Likewise.
11951         (begin_catch_block): Likewise.
11952         (begin_compound_stmt): Likewise.
11953         (begin_asm_stmt): Likewise.
11954         (finish_asm_stmt): Likewise.
11955         (finish_label_stmt): Likewise.
11956         (add_decl_stmt): Likewise.
11957         (finish_subobject): Likewise.
11958         (finish_decl_cleanup): Likewise.
11959         (finish_named_return_value): Likewise.
11960         (setup_vtbl_ptr): Likewise.
11961         (add_scope_stmt): Likewise.
11962         (finish_stmt_expr): Likewise.
11963         (prune_unused_decls): Remove.
11964         (begin_stmt_tree): Likewise.
11965         (finish_stmt_tree): Likewise.
11966         (prep_stmt): Adjust use of current_stmt_tree.
11967         (lang_expand_stmt): Likewise.
11968         * tree.c (statement_code_p): Remove.
11969         (cp_statement_code_p): New function.
11970         (walk_stmt_tree): Remove.
11971         (init_tree): Set lang_statement_code_p.
11973 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
11975         Integrated preprocessor.
11977         * Make-lang.in, Makefile.in: Remove all references to input.c,
11978         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
11979         * gxx.gperf, hash.h, input.c: Delete.
11980         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
11981         initialized properly.
11983         * class.c (fixup_pending_inline): Take a tree, not a
11984         struct pending_inline *.  All callers changed.
11985         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
11986         RID_PROTECTED entries in ridpointers[] array here.
11987         * decl.c (duplicate_decls): Do not refer to struct
11988         pending_inline.
11989         (record_builtin_type, init_decl_processing): Use RID_MAX not
11990         CP_RID_MAX.
11991         (grokdeclarator): Use C_IS_RESERVED_WORD.
11992         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
11993         cpplib.
11994         (grok_x_components): Do not inspect pending_inlines chain.
11996         * cp-tree.h (struct lang_identifier): Add rid_code entry.
11997         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
11998         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
11999         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
12000         TIME_IDENTIFIER_FILEINFO): Kill.
12001         Update prototypes.
12002         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
12003         single 32-bit word.
12004         * parse.y: Call do_pending_inlines unconditionally.
12005         reinit_parse_for_method is now snarf_method.  fn.defpen is no
12006         longer necessary.  Remove unnecessary <itype> annotation on
12007         SCOPE.  Do not refer to end_of_file or struct pending_inline.
12008         * semantics.c (begin_inline_definitions): Call
12009         do_pending_inlines unconditionally.
12011         * lex.c: Remove all code now shared with C front end.
12012         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
12013         into the get_identifier table.  Rewrite pragma handling to
12014         work with the registry.  Move code to save tokens for later
12015         processing to spew.c.
12017         * spew.c: Rewrite everything in terms of token streams instead
12018         of text.  Move routines here from lex.c / input.c as
12019         appropriate.  GC-mark trees hanging off the pending inlines
12020         chain.
12022 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
12024         * NEWS: Mention that the named return value extension has been
12025         deprecated.
12026         * cp-tree.h (original_result_rtx): Define.
12027         (TREE_REFERENCE_EXPR): Remove.
12028         (DECL_VPARENT): Likewise.
12029         (pushdecl_nonclass_level): Likewise.
12030         (store_return_init): Likewise.
12031         (reinit_lang_specific): Likewise.
12032         (genrtl_named_return_value): Change prototype.
12033         * decl.c (original_result_rtx): Remove.
12034         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
12035         Do not generate RTL for local variables here.
12036         (store_return_init): Remove.
12037         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
12038         store_return_init.
12039         (finish_named_return_value): Adjust accordingly.  Warn that this
12040         extension is deprecated.
12041         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
12043 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12045         * pt.c (type_unification_real): Replace switch with if.
12046         (unify): Tsubst non-type parms before comparing.
12048 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12050         * error.c (dump_typename): New function, broken out of ...
12051         (dump_type): ... here. Use it.
12052         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
12054 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12056         * init.c (build_offset_ref): Deal with namespace scoped
12057         TEMPLATE_ID_EXPRs.
12059 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12061         * class.c (resolve_address_of_overloaded_function): Add
12062         explanation message.
12063         * decl.c (define_case_label): Reformat explanation.
12064         * decl2.c (finish_static_data_member_decl): Likewise.
12065         (grokfield): Likewise.
12066         * friend.c (do_friend): Likewise.
12068 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
12070         * tree.c (walk_tree): Expose tail recursion.
12071         (walk_stmt_tree): New function.
12072         * cp-tree.h: Prototype walk_stmt_tree.
12073         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
12074         the BLOCKs directly.  If a BLOCK has no variables after
12075         pruning, discard it.
12076         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
12077         restore the line number.
12079 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
12081         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
12082         (pt.o): Remove dependency on HTAB_H.
12083         * cp-tree.h: Include hashtab.h.
12084         (walk_tree): Change prototype.
12085         (walk_tree_without_duplicates): New function.
12086         * decl.c (check_default_argument): Use it.
12087         * optimize.c (remap_decl): Adjust calls to walk_tree.
12088         (copy_body): Likewise.
12089         (expand_calls_inline): Likewise.
12090         (calls_setjmp_p): Use walk_tree_without_duplicates.
12091         * pt.c: Don't include hashtab.h.
12092         (for_each_template_parm): Use walk_tree_without_duplicates.
12093         * semantics.c (finish-stmt_tree): Likewise.
12094         (expand_body): Likewise.
12095         * tree.c (walk_tree): Add additional parameter.
12096         (walk_tree_without_duplicates): New function.
12097         (count_trees): Use it.
12098         (verify_stmt_tree): Adjust call to walk_tree.
12099         (find_tree): Use walk_tree_without_duplicates.
12100         (no_linkage_check): Likewise.
12101         (break_out_target_exprs): Adjust call to walk_tree.
12102         (cp_unsave): Likewise.
12104 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12106         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
12107         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12108         * cp-tree.h (TYPE_BINFO): Adjust comment.
12109         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
12110         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12111         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12112         (TYPE_TEMPLATE_INFO): Likewise.
12113         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
12114         * class.c (push_nested_class): Likewise.
12115         * decl.c (lookup_name_real): Likewise.
12116         (grokdeclarator): Likewise.
12117         (grok_op_properties): Likewise.
12118         (xref_tag): Likewise.
12119         (xref_basetypes): Likewise.
12120         * decl2.c (constructor_name_full): Likewise.
12121         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
12122         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
12123         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
12124         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12125         (dump_type_suffix): Likewise.
12126         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
12127         instead.
12128         (get_aggr_from_typedef): Likewise.
12129         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
12130         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12131         (write_template_parm): Likewise.
12132         (write_template_template_parm): Check tree code instead of
12133         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12134         * method.c (build_overload_nested_name): Add
12135         BOUND_TEMPLATE_TEMPLATE_PARM.
12136         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
12137         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12138         * pt.c (convert_template_argument): Check tree code instead of
12139         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12140         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
12141         (for_each_template_parm): Adjust comment.
12142         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
12143         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12144         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
12145         template_args_equal to compare template template parameter cases.
12146         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12147         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
12148         instead.
12149         * tree.c (copy_template_template_parm): Decide whether to create
12150         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
12151         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
12152         (copy_tree_r): Likewise.
12153         * typeck.c (comptypes): Likewise.  Check tree code instead of
12154         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
12156 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
12158         * decl.c (finish_function): Move the code for handling functions
12159         marked with the constructor and destructor attributes inside the
12160         expand_p block.
12162 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12164         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
12166 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12168         * pt.c (lookup_template_class): Remove abort.
12169         * tree.c (get_type_decl): Allow error_mark_node.
12171 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12173         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
12174         TEMPLATE_ID_EXPRs.
12176 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
12178         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
12179         new ABI mangling.
12181 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12183         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
12184         union tag mismatch error reporting.
12186 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
12188         * call.c (build_scoped_method_call): Check it is not a namespace.
12190 2000-08-30  Jason Merrill  <jason@redhat.com>
12192         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
12194         * tree.c (bot_manip): Check TREE_CONSTANT rather than
12195         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
12196         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
12198         * decl.c (start_function): Always call make_function_rtl.
12200 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12202         * semantics.c (prune_unused_decls): New function.
12203         (finish_stmt_tree): Call it via walk_tree.
12205 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12207         * class.c (build_secondary_vtable): Constify a char *.
12208         * decl.c (init_decl_processing): Initialize function_id_node,
12209         pretty_function_id_node, and func_id_node.
12210         * input.c (struct input_source): Constify 'str'.
12211         (feed_input): Constify first argument.
12212         * mangle.c (write_identifier): Constify argument.
12213         * pt.c (mangle_class_name_for_template): Constify argument.
12215 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
12217         * typeck.c (mark_addressable): Remove code that pokes around in
12218         RTL.
12220 2000-08-28  Jason Merrill  <jason@redhat.com>
12222         * lex.c (file_name_nondirectory): Move to toplev.c.
12224         * cp-tree.h (LOCAL_CLASS_P): New macro.
12225         * class.c (finish_struct_1): Use it.
12227 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
12229         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
12230         (write_encoding): Pass another argument to write_name.
12231         (write_name): Add ignore_local_scope parameter.  Fix handling of
12232         local names.
12233         (write_nested_name): Use write_unqualified_name.
12234         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
12235         (write_template_prefix): Use write_unqualified_name.
12236         (write_component): Remove.
12237         (write_local_name): Add parameter.  Use direct local entity to
12238         discriminator calculation.
12239         (write_class_enum_type): Pass another argument to write_name.
12240         (write_template_template_arg): Likewise.
12241         (make_guard_variable): Likewise.
12243 2000-08-27  Jason Merrill  <jason@redhat.com>
12245         * decl.c (pushdecl): Matching decls for local externs are found in
12246         the current level.  Propagate linkage information from previous
12247         declarations.
12249 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12251         * ir.texi (Expressions): Fix typo.
12253 2000-08-25  Greg McGary  <greg@mcgary.org>
12255         * tree.c (init_tree): Use ARRAY_SIZE.
12257 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12259         * error.c (cp_tree_printer): Rework.
12261 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
12263         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
12264         dyn-string.o.
12265         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
12266         (cp-demangle.o): Remove target.
12267         (dyn-string.o): Likewise.
12269         * decl.c (grokfndecl): Require that `main' return an `int'.
12270         * mangle.c (write_encoding): Don't mangle return types for
12271         conversion functions.
12273 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12275         * error.c (tree_formatting_info): New data type.
12276         (tree_being_formatted): New macro.
12277         (tree_formatting_flags): Likewise.
12278         (put_whitespace): Likewise.
12279         (print_tree_identifier): Likewise.
12280         (print_identifier): Likewise.
12281         (cp_tree_printer, print_function_argument_list, print_declaration,
12282         print_expression, print_function_declaration,
12283         print_function_parameter, print_type, print_cv_qualifier): New
12284         functions.
12285         (init_error): Initialize lang_printer.
12287 2000-08-24  Jason Merrill  <jason@redhat.com>
12289         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
12290         adjustment necessary.
12292 2000-08-24  Greg McGary  <greg@mcgary.org>
12294         * cp-tree.h (MAIN_NAME_P): Remove macro.
12296 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
12298         * error.c (print_instantiation_context): Don't forget to flush the
12299         buffer.
12301 2000-08-23  Jason Merrill  <jason@redhat.com>
12303         * typeck.c (build_ptrmemfunc): Save the input pmf.
12305         * method.c (process_modifiers): Use same_type_p.
12307 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
12309         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
12310         * mangle.c (write_function_type): Change prototype.
12311         (write_encoding): Don't mangle return types for
12312         constructors or destructors.
12313         (write_type): Adjust call to write_function_type.
12314         * pt.c (instantiate_template): Instantiate alternate entry points
12315         when instantiating the main function.
12317 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12319         * error.c (cp_print_error_function): Don't use embedded '\n' in
12320         output_printf.
12322 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
12324         * decl.c (init_decl_processing): Remove bogus initialization.
12325         * error.c (lang_print_error_function): Restore here.
12326         (init_error): Initialize print_error_function.
12328 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
12330         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
12332 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
12334         * Makefile.in (error.o): Depends on diagnostic.h
12336         * cp-tree.h (problematic_instantiation_changed,
12337         record_last_problematic_instantiation, current_instantiation,
12338         print_instantiation_context): Declare.
12339         (maybe_print_template_context): Remove.
12341         * decl.c (init_decl_processing): Set print_error_function to NULL.
12342         (lang_print_error_function): Remove, since we're using a new
12343         machinery.
12345         * error.c: #include diagnostic.h
12346         (function_category): New function.
12347         (cp_diagnostic_starter): Likewise.
12348         (cp_diagnostic_finalizer): Likewise.
12349         (cp_print_error_function): Likewise.
12350         (maybe_print_instantiation_context): Likewise.
12351         (print_instantiation_full_context): Likewise.
12352         (print_instantiation_partial_context): Likewise.
12353         (print_instantiation_context): Define.
12354         (init_error): Initialize diagnostic pager and finalizer.
12356         * pt.c (problematic_instantiation_changed): Define.
12357         (record_last_problematic_instantiation): Likewise.
12358         (current_instantiation): Likewise.
12359         (maybe_print_template_context): Remove.
12360         (print_template_context): Likewise.
12361         (current_tinst_level): Make static to reflect Brendan Kehoe's
12362         change of 1995-04-13.
12363         (push_tinst_level): Call print_instantiation_context.
12365 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12367         * lang-specs.h: Do not process -o or run the assembler if
12368         -fsyntax-only.
12370 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
12372         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
12373         variables.
12374         * decl2.c (lang_decode_option): Disable gettext attributes for
12375         -ansi.
12377 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
12379         * lex.c (lang_init_options): Default diagnostic message maximum
12380         length to 80, when line-wrapping.
12382 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
12384         * class.c (build_vtbl_initializer): Clear the entire
12385         vtbl_init_data.  Start keeping track of the functions for which we
12386         have created vcall offsets here.
12387         (dfs_build_vcall_offset_vtbl_entries): Remove.
12388         (build_vcall_offset_vtbl_entries): Reimplement.
12389         (add_vcall_offset_vtbl_entries_r): New function.
12390         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
12391         computing when vcall offsets are necessary.
12393 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12395         * decl.c (member_function_or_else): Use cp_error ... %T.
12396         (grokdeclarator): Likewise.
12397         (start_method): Likewise.
12398         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
12400 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12402         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
12403         TYPE_DECLs.
12405 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12407         * cp-tree.h (PTRMEM_OK_P): New macro.
12408         (itf_ptrmem_ok): New enumeration value.
12409         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
12410         argument. Diagnose implicit pointer to member.
12411         (instantiate_type): Don't diagnose implicit pointer to member
12412         here. Pass itf_ptrmem_ok if ok. Adjust calls to
12413         resolve_address_of_overloaded_function.
12414         * init.c (build_offset_ref): Set PTRMEM_OK_P.
12415         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
12416         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
12417         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
12418         (build_unary_op): Deal with single non-static member in
12419         microsoft-land.
12421 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12423         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
12425 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
12427         * cp-tree.h (enum_name_string): Remove prototype.
12428         (report_case_error): Remove prototype.
12429         * cp/typeck2.c (enum_name_string): Remove.
12430         (report_case_error): Remove.
12431         * error.c (dump_expr): Deal with enum values directly.
12432         Correctly negate integer constant.
12434 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12436         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
12437         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
12438         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
12439         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
12440         (__cxa_vec_new): Use __cxa_vec_new2.
12441         (__cxa_vec_delete): Use __cxa_vec_delete2.
12443 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12445         * vec.cc (__cxa_vec_new): Set "C" linkage.
12446         (__cxa_vec_ctor): Likewise.
12447         (__cxa_vec_cctor): Likewise.
12448         (__cxa_vec_dtor): Likewise.
12449         (__cxa_vec_delete): Likewise.
12450         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
12451         (__cxa_vec_ctor): Likewise.
12452         (__cxa_vec_cctor): Likewise.
12453         (__cxa_vec_dtor): Likewise.
12454         (__cxa_vec_delete): Likewise.
12456 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12458         * class.c (instantiate_type): Reinstate local variable
12459         deleted in previous change.
12461         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
12462         itf_no_attributes.
12464 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12466         * cp-tree.h (instantiate_type_flags): New enumeration.
12467         (instantiate_type): Change parameter.
12468         * class.c (instantiate_type): Adjust prototype. Adjust.
12469         * call.c (standard_conversion): Adjust instantiate_type call.
12470         (reference_binding): Likewise.
12471         (build_op_delete_call): Likewise.
12472         (convert_like_real): Likewise.
12473         * cvt.c (cp_convert_to_pointer): Likewise.
12474         (convert_to_reference): Likewise.
12475         * pt.c (convert_nontype_argument): Likewise.
12476         * typeck.c (build_binary_op): Likewise.
12477         (build_ptrmemfunc): Likewise.
12478         (convert_for_assignment): Likewise.
12480 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12482         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
12483         (current_aggr): Define.
12484         * decl.c (grokdeclarator): Make sure a friend class is an
12485         elaborated type specifier.
12486         * parse.y (current_aggr): Remove static definition.
12487         (cp_parse_init): Adjust.
12488         (structsp): Clear and restore current_aggr.
12489         (component_decl_list): Clear current_aggr.
12491         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
12492         aggregate tag on the typename's context.
12494         * pt.c (tsubst_friend_class): Return error_mark_node, if
12495         parms becomes NULL.
12496         (instantiate_class_template): Ignore error_mark_node friend types.
12498 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
12500         * cvt.c (warn_ref_binding): New static function, broken out of ...
12501         (convert_to_reference): ... here. Use it.
12503 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12505         * parse.y (template_arg): Add rule for template qualified with
12506         global scope.
12508 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12510         * decl2.c (add_function): Reorganize.
12511         (arg_assoc): Do not consider function template decls.
12513 2000-08-11  Jason Merrill  <jason@redhat.com>
12515         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
12516         looking inside.
12518 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12520         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
12521         (lookup_nested_tag): Likewise.
12523         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
12524         can be produced.
12526 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12528         * parse.y (named_complex_class_head_sans_basetype): Remove
12529         always true if.
12531 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12533         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
12534         explicit TEMPLATE_ID_EXPR args.
12535         (build_expr_from_tree, case CALL_EXPR): Likewise.
12537 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12539         * decl.c (check_tag_decl): Diagnose typename's which don't
12540         declare anything.
12542 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
12544         * init.c (build_aggr_init): Reject bogus array initializers
12545         early.
12547 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12549         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
12550         runtime.
12551         * cp/tinfo.cc (__dynamic_cast): Likewise.
12552         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
12554 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12556         * cvt.c (convert_to_pointer_force): Fix error message when
12557         attempting to cast from ambiguous base.
12559 2000-08-08  Jason Merrill  <jason@redhat.com>
12561         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
12562         (tsubst_template_arg_vector): Likewise.
12564         * decl2.c (build_anon_union_vars): Choose the largest field; don't
12565         assume that one will be as large as the union.
12567 2000-08-07  Kazu Hirata  <kazu@hxi.com>
12569         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
12570         * decl.c (pop_labels): Likewise.
12572 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
12574         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
12575         specifications.
12576         (__pointer_to_member_type_info): Likewise.
12577         (__base_class_info): Likewise.
12578         (__class_type_info): Likewise.
12579         (__si_class_type_info): Likewise.
12580         (__vmi_class_type_info): Likewise.
12581         * tinfo.cc (__si_class_type_info::__do_find_public_src):
12582         Changed member names to match specifications.
12583         (__vmi_class_type_info::__do_find_public_src): Likewise.
12584         (__si_class_type_info::__do_dyncast): Likewise.
12585         (__vmi_class_type_info::__do_dyncast): Likewise.
12586         (__si_class_type_info::__do_upcast): Likewise.
12587         (__vmi_class_type_info::__do_upcast): Likewise.
12588         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
12589         (__pbase_type_info::__pointer_catch): Likewise.
12590         (__pointer_type_info::__pointer_catch): Likewise.
12591         (__pointer_to_member_type_info::__pointer_catch): Likewise.
12593 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12595         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
12596         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
12597         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
12599 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
12601         * cp-tree.h (add_method): Change prototype.
12602         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
12603         Don't double the size of the method vector in the error case.
12604         (handle_using_decl): Adjust call to add_method.
12605         (add_implicitly_declared_members): Likewise.
12606         (clone_function_decl): Likewise.
12607         * decl2.c (check_classfn): Likewise.
12608         * semantics.c (finish_member_declaration): Likewise.
12610 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12612         * decl.c (flag_isoc94): New variable.
12614 2000-08-02  Jason Merrill  <jason@redhat.com>
12616         * pt.c (do_type_instantiation): Add complain parm; don't complain
12617         if called recursively.
12618         * cp-tree.h, parse.y: Adjust.
12620 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12622         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
12623         -Wno-strict-prototypes.
12625         * g++spec.c: Adjust type of second argument to
12626         lang_specific_driver, and update code as necessary.
12628         * cp-tree.h: Don't prototype min_precision here.
12629         (my_friendly_assert): Cast expression to void.
12630         * semantics.c (do_poplevel): Initialize scope_stmts.
12632 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
12634         * cp-tree.h (DECL_NEEDED_P): Tweak.
12636 2000-07-28  Jason Merrill  <jason@redhat.com>
12638         * lang-specs.h: Use %i in rule for .ii files.
12640 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
12642         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
12644 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
12646         Allow indirect primary bases.
12647         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
12648         primary_base.
12649         (CLASSTYPE_VFIELD_PARENT): Remove.
12650         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
12651         (BINFO_PRIMARY_BINFO): Remove.
12652         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
12653         (BINFO_VBASE_PRIMARY_P): Likewise.
12654         (BINFO_PRIMARY_BASE_OF): New macro.
12655         (BINFO_INDIRECT_PRIMARY_P): Likewise.
12656         (get_primary_binfo): New function.
12657         * decl.c (lang_mark_tree): Make lang_type::primary_base.
12658         * class.c (vcall_offset_data_s): Rename to ...
12659         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
12660         and add ctor_vtbl_p.
12661         (get_derived_offset): Use get_primary_binfo.
12662         (dfs_mark_primary_bases): Adjust handling of virtual primary
12663         bases.
12664         (mark_primary_bases): Likewise.
12665         (set_primary_base): Take a binfo, not an integer, as a
12666         representation of the primary base.
12667         (indirect_primary_base_p): Remove.
12668         (determine_primary_base): Adjust for indirect primary bases.
12669         (dfs_find_final_overrider): Fix typo in coment.
12670         (update_vtable_entry_for_fn): Use get_primary_binfo.
12671         (layout_nonempty_base_or_field): Tweak.
12672         (build_base_fields): Adjust for new primary base semantics.
12673         (dfs_propagate_binfo_offsets): Remove.
12674         (propagate_binfo_offsets): Rewrite.
12675         (dfs_set_offset_for_shared_vbases): Remove.
12676         (layout_virtual_bases): Don't use it.
12677         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
12678         ABI.
12679         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
12680         CLASSTYPE_VFIELD_PARENT.
12681         (dfs_get_primary_binfo): New function.
12682         (get_primary_binfo): Likewise.
12683         (dump_class_hierarchy_r): Tweak printing of primary bases.
12684         (build_vtbl_initializer): Fix typo in comments.  Use
12685         vtbl_init_data.
12686         (build_vcall_and_vbase_vtbl_entries): Likewise.
12687         (build_vbaes_offset_vtbl_entries): Likewise.
12688         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
12689         BV_VCALL_INDEX to handle indirect primary bases.
12690         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
12691         (build_rtti_vtbl_entries): Likewise.
12692         * search.c (get_shared_vbase_if_not_primary): Tweak.
12693         (find_vbase_instance): Likewise.
12694         (binfo_for_vtable): Simplify.
12695         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
12696         (make_binfo): Make it have 11 entries.
12698 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
12700         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
12701         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
12702         ascertaining primaryness.
12703         (G): Remove template_args.
12704         (decl_is_template_id): New function.
12705         (write_encoding): Use decl_is_template_id.
12706         (write_name): Likewise.  Handle type_decls.  Get main variant of
12707         type decls.
12708         (write_nested_name): Likewise.
12709         (write_prefix): Likewise.
12710         (write_template_prefix): Likewise.
12711         (write_special_name_constructor): Remove defunct production from
12712         comment.
12713         (write_bare_function_type): Remove comment about absent parameter.
12714         (write_template_template_arg): Add missing grammar production to
12715         comment.
12717 2000-07-27  Jason Merrill  <jason@redhat.com>
12719         * decl.c (duplicate_decls): If common_type produces a non-typedef
12720         type for a typedef, just use the old type.
12722 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
12724         * cp-tree.h (function_depth): Declare.
12725         (verify_stmt_tree): Likewise.
12726         (find_tree): Likewise.
12727         * decl.c (function_depth): Give it external linkage.
12728         * optimize.c (optimize_function): Increment and decrement it.
12729         * tree.c (verify_stmt_tree_r): New function.
12730         (verify_stmt_tree): Likewise.
12731         (find_tree_r): Likewise.
12732         (find_tree): Likewise.
12734 2000-07-27  Jason Merrill  <jason@redhat.com>
12736         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
12737         TYPE_PTRMEMFUNC_P.
12738         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
12740 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12742         * decl.c (start_cleanup_fn): Mark the function as `inline'.
12743         * decl2.c (get_guard): Call cp_finish_decl, not
12744         rest_of_decl_compilation, for local guards.
12745         * lex.c (do_identifier): Remove unused variable.
12747 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
12749         * parse.y:  Add missing ';'.
12751 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12753         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
12754         of `extern "C++"'.
12756 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12758         Kill strict_prototype. Backwards compatibility only for
12759         non NO_IMPLICIT_EXTERN_C systems.
12760         * cp-tree.h (flag_strict_prototype): Remove.
12761         (strict_prototype): Remove.
12762         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12763         * decl.c (maybe_push_to_top_level): Adjust.
12764         (pop_from_top_level): Adjust.
12765         (decls_match): Only allow sloppy parm matching for ancient
12766         system headers.
12767         (init_decl_processing): Adjust.
12768         (grokdeclarator): Adjust.
12769         * decl2.c (flag_strict_prototype): Remove.
12770         (strict_prototype): Remove.
12771         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12772         (lang_f_options): Remove "strict-prototype".
12773         (unsupported-options): Add "strict-prototype".
12774         * lex.c (do_identifier): Adjust.
12775         (do_scoped_id): Adjust.
12776         * parse.y (empty_parms): Adjust.
12777         * class.c (push_lang_context): Adjust.
12778         (pop_lang_context): Adjust.
12779         * typeck.c (comp_target_parms): Adjust.
12781 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12783         * decl.c (poplevel): Deal with anonymous variables at for scope.
12784         (maybe_inject_for_scope_var): Likewise.
12786 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
12788         * decl.c: Remove all signal handling code, now done in toplev.c.
12790 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
12792         * decl.c (make_rtl_for_nonlocal_decl): Rework.
12794         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
12795         correctly.
12797 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
12799         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
12800         Define my_friendly_assert and my_friendly_abort as macros
12801         which may call friendly_abort.  Prototype friendly abort, not
12802         my_friendly_abort or my_friendly_assert.
12803         * decl.c (signal_catch): Report the signal caught in the error
12804         message.  Call fatal directly.
12805         * typeck2.c (ack, my_friendly_assert): Delete.
12806         (my_friendly_abort): Rename to friendly_abort.  Expect file,
12807         line, and function parameters.  Report the abort code, then
12808         call fancy_abort.  Do not mask an abort if errors have
12809         already occurred.
12811 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
12813         * typeck.c (comp_target_parms): Remove obsolete parameter.
12814         (comp_target_types): Adjust.
12816 2000-07-17  Jason Merrill  <jason@redhat.com>
12818         * typeck.c (mark_addressable): Never set TREE_USED.
12819         * call.c (build_call): Don't abort on calls to library functions
12820         that have been declared normally.
12822         * typeck.c (build_binary_op): Fix grammar in warning.
12824         * exception.cc (__eh_free): Fix prototype.
12826         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
12828         * decl.c (pushdecl): Handle seeing an OVERLOAD in
12829         IDENTIFIER_NAMESPACE_VALUE.
12831 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
12833         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
12834         * method.c (use_thunk): Correct handling of vcall offsets.
12836 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12838         * .cvsignore: parse.h and parse.c have no cp- prefix.
12840 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12842         * .cvsignore: New file.
12844 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12846         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12848 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12850         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
12851         * parse.c: Remove.
12852         * parse.h: Likewise.
12854 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
12856         * class.c (layout_class_type): Add pointers to virtual bases after
12857         base classes under the old ABI.
12859 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
12861         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
12862         (finish_continue_stmt): Likewise.
12863         (begin_for_stmt): Remove call to note_level_for_for.
12864         (finish_goto_stmt): Change call from build_min_nt
12865         to build_stmt.
12866         (finish_expr_stmt): Likewise.
12867         (begin_if_stmt): Likewise.
12868         (begin_while_stmt): Likewise.
12869         (finish_while_stmt): Likewise.
12870         (finish_return_stmt): Likewise.
12871         (begin_for_stmt): Likewise.
12872         (finish_for_stmt): Likewise.
12873         (finish_break_stmt): Likewise.
12874         (begin_switch_stmt): Likewise.
12875         (finish_case_label): Likewise.
12876         (genrtl_try_block): Likewise.
12877         (begin_try_block): Likewise.
12878         (begin_handler): Likewise.
12879         (begin_compound_stmt): Likewise.
12880         (finish_asm_stmt): Likewise.
12881         (finish_label_stmt): Likewise.
12882         (add_decl_stmt): Likewise.
12883         (finish_subobject): Likewise.
12884         (finish_decl_cleanup): Likewise.
12885         (finish_named_return_value): Likewise.
12886         (setup_vtbl_ptr): Likewise.
12887         (add_scope_stmt): Likewise.
12888         * decl.c (finish_constructor_body): Likewise.
12889         (finish_destructor_body): Likewise.
12890         * optimize.c (copy_body_r): Likewise.
12891         (initialize_inlined_parameters): Likewise.
12892         (declare_return_variable): Likewise.
12893         (expand_call_inline): Likewise.
12895 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
12897         * semantics.c (expand_body): Sync interface information
12898         at the end of function body expansion.
12900 2000-07-09  Jason Merrill  <jason@redhat.com>
12902         * init.c (build_new_1): Bail early if the call to new fails.
12904         * decl.c (compute_array_index_type): Check specifically for
12905         an INTEGER_CST, not just TREE_CONSTANT.
12907         * decl.c (duplicate_decls): Don't call duplicate_decls on
12908         the DECL_TEMPLATE_RESULT.
12909         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
12910         codes.
12912         * error.c (dump_template_bindings): Don't crash if we had an
12913         invalid argument list.
12915         * typeck.c (c_expand_start_case): Do narrowing here.
12916         * semantics.c (finish_switch_cond): Not here.
12918 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
12920         * parse.y (asm_clobbers): Do string concatenation.
12922 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12924         * decl.c (pushtag): Don't put local classes in template functions
12925         on the local_classes list.
12927 2000-07-04  Scott Snyder  <snyder@fnal.gov>
12929         * decl2.c (get_guard): Add missing return for old ABI local
12930         variable case.
12932 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12934         * cp-tree.h (char_type_p): New function.
12935         * decl.c (init_decl_processing): Don't initialize
12936         signed_wchar_type_node or unsigned_wchar_type_node.
12937         (complete_array_type): Handle brace-enclosed string-constants.
12938         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
12939         * tree.c (char_type_p): New function.
12940         * typeck2.c (digest_init): Use char_type_p.
12942 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12944         * pt.c (tsubst): Don't layout type, if it's error_mark.
12946 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12948         * pt.c (instantiate_pending_templates): Reset template level.
12950 2000-07-05  Jason Merrill  <jason@redhat.com>
12952         * call.c (joust): Don't complain about `operator char *()' beating
12953         `operator const char *() const'.
12955 2000-07-04  scott snyder  <snyder@fnal.gov>
12956             Jason Merrill  <jason@redhat.com>
12958         * repo.c (repo_get_id): Handle the case where a class with virtual
12959         bases has a null TYPE_BINFO_VTABLE.
12961 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
12962             Jason Merrill  <jason@redhat.com>
12964         * parse.y (member_init): Just pass in the type.
12965         * init.c (expand_member_init): Handle getting a type.
12967 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12968             Jason Merrill  <jason@redhat.com>
12970         * decl.c (finish_function): Warn if a function has no return
12971         statement.
12972         Suggested by Andrew Koenig.
12973         * typeck.c (check_return_expr): Do set current_function_returns_value
12974         if we got an error_mark_node.
12976 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12978         * decl2.c (push_decl_namespace): Push the original namespace.
12980 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12982         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
12983         * semantics.c (begin_class_definition): Clear it.
12985 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
12987         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
12988         (genrtl_expr_stmt): Likewise.
12989         (genrtl_decl_stmt): Likewise.
12990         (genrtl_if_stmt): Likewise.
12991         (genrtl_while_stmt): Likewise.
12992         (genrtl_do_stmt): Likewise.
12993         (genrtl_return_stmt): Likewise.
12994         (genrtl_for_stmt): Likewise.
12995         (genrtl_break_stmt): Likewise.
12996         (genrtl_continue_stmt): Likewise.
12997         (genrtl_scope_stmt): Likewise.
12998         (genrtl_switch_stmt): Likewise.
12999         (genrtl_case_label): Likewise.
13000         (genrtl_begin_compound_stmt): Likewise.
13001         (genrtl_finish_compound_stmt): Likewise.
13002         (genrtl_compound_stmt): Likewise.
13003         (genrtl_asm_stmt): Likewise.
13005         * init.c (begin_init_stmts): Remove call to
13006         genrtl_begin_compound_stmt.
13007         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
13009         * semantics.c (lang_expand_stmt): Changed call to
13010         genrtl_compound_stmt to ignore return value.
13012 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
13014         * mangle.c (canonicalize_for_substitution): Return the canonical
13015         variant of a type.
13017         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
13018         TYPE_DECL.
13019         * typeck.c (commonparms): Remove obstack manipulations.
13021 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
13023         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
13025         * Makefile.in (OBJS): Added ../c-semantics.o.
13026         (OBJDEPS): Likewise.
13028         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
13029         ../c-common.h.
13030         (struct stmt_tree): Added comment.
13031         (current_function_name_declared): Removed.
13032         (stmts_are_full_exprs_p): Likewise.
13033         (genrtl_do_pushlevel): Likewise.
13034         (genrtl_clear_out_block): Likewise.
13035         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
13036         (DECL_ANON_UNION_ELEMS): Likewise.
13037         (emit_local_var): Likewise.
13038         (make_rtl_for_local_static): Likewise.
13039         (do_case): Likewise.
13040         (expand_stmt): Likewise.
13041         (genrtl_decl_cleanup): Likewise.
13042         (c_expand_asm_operands): Likewise.
13043         (c_expand_return): Likewise.
13044         (c_expand_start_case): Likewise.
13046         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
13047         (emit_local_var): Likewise.
13048         (initialize_local_var): Change reference to
13049         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13050         Change reference to stmts_are_full_exprs_p to
13051         current_stmt_tree->stmts_are_full_exprs_p.
13052         (push_cp_function_context): Likewise.
13054         * expect.c (expand_throw): Change reference to
13055         stmts_are_full_exprs_p.
13057         * init.c (build_aggr_init): Change reference to
13058         stmts_are_full_exprs_p.
13059         (build_vec_init): Likewise.
13061         * optimize.c (maybe_clone_body): Change reference to
13062         current_function_name_declared to
13063         cp_function_chain->name_declared.
13065         * pt.c (instantiate_decl): Change reference to
13066         current_function_name_declared to
13067         cp_function_chain->name_declared.
13069         * semantics.c (expand_cond): Moved declaration to c-common.h.
13070         (genrtl_do_pushlevel): Moved to c-semantics.c.
13071         (genrtl_clear_out_block): Likewise.
13072         (genrtl_goto_stmt): Likewise.
13073         (genrtl_expr_stmt): Likewise.
13074         (genrtl_decl_stmt): Likewise.
13075         (gerntl_if_stmt): Likewise.
13076         (genrtl_while_stmt): Likewise.
13077         (genrtl_do_stmt): Likewise.
13078         (genrtl_return_stmt): Likewise.
13079         (genrtl_for_stmt): Likewise.
13080         (genrtl_break_stmt): Likewise.
13081         (genrtl_continue_stmt): Likewise.
13082         (genrtl_scope_stmt): Likewise.
13083         (genrtl_switch_stmt): Likewise.
13084         (genrtl_case_label): Likewise.
13085         (genrtl_begin_compound_stmt): Likewise.
13086         (genrtl_finish_compound_stmt): Likewise.
13087         (genrtl_compound_stmt): Likewise.
13088         (genrtl_asm_stmt): Likewise.
13089         (genrtl_decl_cleanup): Likewise.
13090         (expand_cond): Likewise.
13091         (expand_stmt): Renamed to ...
13092         (lang_expand_stmt): ... this.
13093         (lang_expand_expr_stmt): Initialize.
13094         (set_current_function_name_declared): Likewise.
13095         (stmts_are_full_exprs_p): Likewise.
13096         (current_function_name_declared): Likewise.
13097         (anon_aggr_type_p): Likewise.
13098         (do_poplevel): Change reference to
13099         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
13100         Change reference to stmts_are_full_exprs_p to
13101         current_stmt_tree->stmts_are_full_exprs_p.
13102         (add_tree): Likewise.
13103         (finish_expr_stmt): Likewise.
13104         (prep_stmt): Likewise.
13105         (lang_expand_stmt): Likewise.
13106         (begin_compound_stmt): Change reference to
13107         current_function_name_declared to
13108         cp_function_chain->name_declared and call to
13109         current_function_name_declared().
13110         (setup_vtbl_ptr): Likewise.
13111         (genrtl_do_poplevel): Removed.
13113 2000-06-30  Jason Merrill  <jason@redhat.com>
13115         * init.c (init_init_processing): Go back to aligning like
13116         double_type_node for old ABI.
13117         (get_cookie_size): Make cookie larger if we get a type that needs
13118         more alignment.
13119         (build_vec_delete): Call it.
13121         * typeck.c (qualify_type_recursive): New fn.
13122         (composite_pointer_type): Use it.
13123         (build_binary_op): Use composite_pointer_type.
13125 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
13126             Jason Merrill  <jason@redhat.com>
13128         * typeck.c (check_return_expr): Don't complain about returning
13129         NULL from operator new if -fcheck-new.
13130         * cp-tree.h: Declare flag_check_new here.
13131         * init.c: Not here.
13133 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13135         * mangle.c (find_substitution): Use same_type_p.
13136         (write_encoding): Don't check for substitutions.
13138 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13140         * parse.y (expr_no_comma_rangle): New non-terminal.
13141         (template_parm): Use it for default parameter case.
13142         (template_arg): Use it.
13143         (expr_no_commas): Remove commented out undefined extensions.
13144         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13145         * parse.h, parse.c: Rebuilt.
13147 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
13149         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
13150         (finish_asm_stmt): Do it here, instead.
13152         * cp-tree.h (ridpointers): Don't declare.
13153         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
13154         (record_builtin_java_type): Likewise.
13155         (init_decl_processing): Likewise.
13156         * lex.c: Move inclusion of lex.h.
13157         (ridpointers): Don't define.
13158         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
13159         RID_MAX.
13160         * lex.h (enum rid): Rename to ...
13161         (enum cp_rid): ... this.
13162         (ridpointers): Don't declare.
13163         * parse.y: Move inclusion of lex.h.
13164         * parse.c: Regenerated.
13165         * spew.c: Move inclusion of lex.h.
13167         * cp-tree.h (struct language_function): Remove temp_name_counter.
13168         (temp_name_counter): Remove.
13169         (get_temp_name): Change prototype.
13170         (get_guard): New function.
13171         (get_guard_cond): Likewise.
13172         (set_guard): Likewise.
13173         * cvt.c (build_up_reference): Adjust call to get_temp_name.
13174         * decl.c (expand_static_init): Use get_guard and friends to
13175         implement guard variables.
13176         * decl2.c (get_temp_name): Assume that the variables created are
13177         always static.
13178         (get_sentry): Rename to ...
13179         (get_guard): ... this.  Implement new ABI guard variables.
13180         (get_guard_bits): New function.
13181         (get_guard_cond): Likewise.
13182         (set_guard): Likewise.
13183         (start_static_initialization_or_destruction): Use them.
13184         (do_static_initialization): Replace sentry with guard throughout.
13185         (do_static_destruction): Likewise.
13186         * init.c (create_temporary_var): Add comment.
13188 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
13190         * mangle.c (find_substitution): Use same_type_p.
13191         (write_encoding): Don't check for substitutions.
13193 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
13195         * parse.y (expr_no_comma_rangle): New non-terminal.
13196         (template_parm): Use it for default parameter case.
13197         (template_arg): Use it.
13198         (expr_no_commas): Remove commented out undefined extensions.
13199         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
13200         * parse.h, parse.c: Rebuilt.
13202 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
13204         * cp-tree.h (flag_const_strings): Remove.
13205         (warn_parentheses): Likewise.
13206         (warn_format): Likewise.
13207         (common_type): Likewise.
13208         (default_conversion): Likewise.
13209         (build_binary_op): Likewise.
13210         (cp_build_binary_op): New macro.
13211         * call.c (build_new_op): Use cp_build_binary_op instead of
13212         build_binary_op.
13213         * class.c (build_vtable_entry_ref): Likewise.
13214         * decl.c (expand_static_init): Likewise.
13215         (compute_array_index_type): Likewise.
13216         (build_enumerator): Likewise.
13217         * decl2.c (delete_sanity): Likewise.
13218         (start_static_initialization_or_destruction): Likewise.
13219         * error.c (dump_type_suffix): Likewise.
13220         * init.c (resolve_offset_ref): Likewise.
13221         (build_new): Likewise.
13222         (build_new_1): Likewise.
13223         (build_vec_delete_1): Likewise.
13224         (build_vec_init): Likewise.
13225         (build_delete): Likewise.
13226         * rtti.c (synthesize_tinfo_fn): Likewise.
13227         (synthesize_tinfo_var): Likewise.
13228         * search.c (expand_upcast_fixups): Likewise.
13229         (fixup_all_virtual_upcast_offsets): Likewise.
13230         * typeck.c (build_array_ref): Likewise.
13231         (get_member_function_from_ptrfunc): Likewise.
13232         (build_binary_op): Add parameter.
13233         (pointer_int_sum): Use cp_build_binary_op.
13234         (pointer_diff): Likewise.
13235         (build_modify_expr): Likewise.
13236         (get_delta_difference): Likewise.
13237         (build_ptrmemfunc): Likewise.
13239 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
13241         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
13242         * decl.c (create_implicit_typedef): Adjust.
13243         * decl2.c (build_artificial_parm): Adjust.
13244         * method.c (implicitly_declare_fn): Adjust.
13245         * pt.c (push_inline_template_parms_recursive): Adjust.
13246         (process_template_parm): Adjust.
13247         (overloaded_template_name): Adjust.
13248         * semantics.c (finish_template_template_parm): Adjust.
13250 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
13252         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
13253         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
13254         where to emit thunks.
13255         (build_vtt): Adjust call to build_vtt_inits.
13256         (build_vtt_inits): Add parameter to indicate whether or not
13257         sub-VTTs for virtual bases should be included.  Adjust handling of
13258         construction vtables.
13259         (get_matching_base): New function.
13260         (dfs_build_vtt_inits): Rename to ...
13261         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
13262         construction vtables.
13263         (dfs_fixup_binfo_vtbls): Likewise.
13264         (build_ctor_vtbl_groups): Build construction vtables for virtual
13265         bases, too.
13266         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
13267         to build construction vtbls.
13268         (dfs_accumulate_vtbl_inits): Adjust handling of
13269         construction vtables.
13271         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
13272         types correctly.
13274 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
13276         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
13278 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13280         * search.c (hides): Remove.
13281         (is_subobject_of_p): Add most_derived parameter. Use
13282         CANONICAL_BINFO.
13283         (lookup_field_queue_p): Adjust.
13284         (lookup_field_r): Adjust.
13286 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
13288         * decl2.c (handle_class_head): Bash typedefs to the type's main
13289         decl.
13291 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
13293         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
13294         (begin_global_stmt_expr): ... this.
13295         (genrtl_finish_stmt_expr): Rename to ...
13296         (finish_global_stmt_expr): ... this.
13297         * init.c (begin_init_stmts): Adjust calls.
13298         (finish_init_stmts): Likewise.
13299         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
13300         (begin_global_stmt_expr): ... this.
13301         (genrtl_finish_stmt_expr): Rename to ...
13302         (finish_global_stmt_expr): ... this.
13304 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
13306         * search.c (lookup_member): Fix typo in comment.
13308 2000-06-24  Jason Merrill  <jason@redhat.com>
13310         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
13311         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
13313 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13315         * parse.y (complex_direct_notype_declarator): Support global_scope.
13316         * Makefile.in: Adjust conflict count.
13318 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
13320         * parse.y (template_arg): Convert TEMPLATE_DECL
13321         that is a template template parameter to
13322         TEMPLATE_TEMPLATE_PARM here.
13324         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
13325         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
13326         (copy_template_template_parm): Adjust prototype.
13327         * decl.c (grokdeclarator): Remove dead code.
13328         * pt.c (process_template_parm): Tidy.
13329         (lookup_template_class): Construct nodes in
13330         copy_template_template_parm.
13331         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
13332         lookup_template_class.  Use TYPE_TI_TEMPLATE.
13333         * tree.c (copy_template_template_parm): Add NEWARGS
13334         parameter.
13335         (mapcar): Adjust call to copy_template_template_parm.
13336         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
13337         * method.c (build_template_template_parm_names): Change error
13338         code to avoid compilation warning.
13340         * gxxint.texi: Document template template parameter
13341         name mangling.
13343 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
13345         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
13346         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
13347         (cp-demangle.o): New rule.
13348         (dyn-string.o): Likewise.
13349         * inc/cxxabi.h (__cxa_demangle): New declaration.
13351 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
13353         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
13354         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
13355         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
13356         a tree, not an int.
13357         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
13358         (make_thunk): Change prototype.
13359         (emit_thunk): Rename to use_thunk.
13360         (mangle_thunk): Change prototype.
13361         * class.c (get_derived_offset): Simplify.
13362         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
13363         BV_GENERATE_THUNK_WITH_VTABLE_P.
13364         (build_primary_vtable): Simplify.
13365         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
13366         (dfs_find_base): Remove.
13367         (update_vtable_entry_for_fn): Correct bug in finding the base
13368         where a virtual function was first declared.  Figure out whether
13369         or not to emit a vcall-thunk with the vtables in which it appears.
13370         Correct logic for deciding whether to use an ordinary thunk, or a
13371         vcall thunk.
13372         (finish_struct_1): Remove unnecssary code.
13373         (build_vtbl_initializer): Use ssize_int for the running counter of
13374         negative indices.
13375         (build_vtbl_initializer): Only use vcall thunks where necessary.
13376         Mark thunks as needing to be emitted with their vtables, or not.
13377         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
13378         indices.  Use size_binop.
13379         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
13380         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
13381         size_binop.
13382         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
13383         (build_vtable_entry): Mark thunks as needing to be emitted with
13384         their vtables, or not.
13385         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
13386         * decl2.c (mark_vtable_entries): Use use_thunk instead of
13387         emit_thunk.
13388         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
13389         information.
13390         * error.c (dump_expr): Use BV_FN.
13391         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
13392         not an int.
13393         * method.c (make_thunk): Likewise.
13394         (emit_thunk): Rename to use_thunk.  Allow callers to decide
13395         whether or not to actually emit the thunk.  Adjust for changes in
13396         representation of vcall offsets.
13397         * search.c (dfs_get_pure_virtuals): Use BV_FN.
13398         * semantics.c (emit_associated_thunks): New function.
13399         (expand_body): Use it.
13400         * ir.texi: Adjust decriptions of thunks.
13402 2000-06-22  Jason Merrill  <jason@redhat.com>
13404         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
13405         (tsubst_friend_function): Copy it here.
13407         * decl.c (grok_op_properties): Fix typo.
13409         * decl2.c (delete_sanity): Clarify warning, avoid failure on
13410         deleting void*.
13412         * pt.c (check_explicit_specialization): Clarify error.
13414         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
13415         an old OVERLOAD when we're declaring a non-function.
13416         (pushdecl, destroy_local_var): Check for error_mark_node.
13417         (warn_extern_redeclared_static): Also bail early if
13418         we're a CONST_DECL.
13419         (push_overloaded_decl): Ignore an old error_mark_node.
13421 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
13423         * call.c (build_x_va_arg): Check if in a template decl.
13424         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
13426 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13428         * class.c (push_lang_context): TYPE_NAME gets you to the Java
13429         types DECLs.
13430         * decl.c (check_goto): Computed gotos assumed OK.
13432 2000-06-20  Jason Merrill  <jason@redhat.com>
13434         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
13435         for which we don't need to look for instantiations.
13437 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
13439         * parse.y (program): Always call finish_translation_unit.
13440         * parse.c, parse.h: Rebuilt.
13442 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
13444         * method.c: Don't include hard-reg-set.h.
13446 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13448         * rtti.c (get_base_offset): Cope when vbase field is in a base.
13450 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
13452         * call.c (build_conditional_expr): Use VOID_TYPE_P.
13453         * cvt.c (cp_convert_to_pointer): Likewise.
13454         (convert_to_void): Likewise.
13455         * error.c (dump_expr): Likewise.
13456         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
13457         * init.c (build_delete): Likewise.
13458         * method.c (emit_thunk): Likewise.
13459         * optmize.c (declare_return_variable): Likewise.
13460         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13461         (get_typeid): Likewise.
13462         (build_dynamic_cast_1): Likewise.
13463         * typeck.c (composite_pointer_type): Likewise.
13464         (common_type): Likewise.
13465         (build_indirect_ref): Likewise.
13466         (build_binary_op): Likewise.
13467         (build_x_compound_expr): Likewise.
13468         (check_return_expr): Likewise.
13469         * typeck2.c (add_exception_specifier): Likewise.
13471         * mangle.c (write_method_parms): Use direct comparison for end
13472         of parmlist.
13474 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
13476         * cp-tree.h (genrtl_try_block): Declare function.
13477         (genrtl_handler): Likewise.
13478         (genrtl_catch_block): Likewise.
13479         (genrtl_ctor_stmt): Likewise.
13480         (genrtl_subobject): Likewise.
13481         (genrtl_decl_cleanup): Likewise.
13482         (genrtl_do_poplevel): Likewise.
13483         (genrtl_do_pushlevel): Likewise.
13484         (genrtl_clear_out_block): Likewise.
13485         (genrtl_goto_stmt): Likewise.
13486         (genrtl_expr_stmt): Likewise.
13487         (genrtl_decl_stmt): Likewise.
13488         (genrtl_if_stmt): Likewise.
13489         (genrtl_while_stmt): Likewise.
13490         (genrtl_do_stmt): Likewise.
13491         (genrtl_return_stmt): Likewise.
13492         (genrtl_for_stmt): Likewise.
13493         (genrtl_break_stmt): Likewise.
13494         (genrtl_continue_stmt): Likewise.
13495         (genrtl_scope_stmt): Likewise.
13496         (genrtl_switch_stmt): Likewise.
13497         (genrtl_case_label): Likewise.
13498         (genrtl_begin_compound_stmt): Likewise.
13499         (genrtl_finish_compound_stmt): Likewise.
13500         (genrtl_compound_stmt): Likewise.
13501         (genrtl_asm_stmt): Likewise.
13502         (genrtl_named_return_value): Likewise.
13503         (genrtl_begin_stmt_expr): Likewise.
13504         (genrtl_finish_stmt_expr): Likewise.
13505         (finish_for_stmt): Removed first argument.
13506         (finish_switch_stmt): Likewise.
13508         * semantics.c (genrtl_try_block): Define function.
13509         (genrtl_handler): Likewise.
13510         (genrtl_catch_block): Likewise.
13511         (genrtl_ctor_stmt): Likewise.
13512         (genrtl_subobject): Likewise.
13513         (genrtl_decl_cleanup): Likewise.
13514         (genrtl_do_poplevel): Likewise.
13515         (genrtl_do_pushlevel): Likewise.
13516         (genrtl_clear_out_block): Likewise.
13517         (genrtl_goto_stmt): Likewise.
13518         (genrtl_expr_stmt): Likewise.
13519         (genrtl_decl_stmt): Likewise.
13520         (genrtl_if_stmt): Likewise.
13521         (genrtl_while_stmt): Likewise.
13522         (genrtl_do_stmt): Likewise.
13523         (genrtl_return_stmt): Likewise.
13524         (genrtl_for_stmt): Likewise.
13525         (genrtl_break_stmt): Likewise.
13526         (genrtl_continue_stmt): Likewise.
13527         (genrtl_scope_stmt): Likewise.
13528         (genrtl_switch_stmt): Likewise.
13529         (genrtl_case_label): Likewise.
13530         (genrtl_begin_compound_stmt): Likewise.
13531         (genrtl_finish_compound_stmt): Likewise.
13532         (genrtl_compound_stmt): Likewise.
13533         (genrtl_asm_stmt): Likewise.
13534         (genrtl_named_return_value): Likewise.
13535         (genrtl_begin_stmt_expr): Likewise.
13536         (genrtl_finish_stmt_expr): Likewise.
13537         (finish_for_stmt): Removed first argument and generate rtl
13538         specific code.
13539         (finish_switch_stmt): Likewise.
13540         (do_poplevel): Removed generate rtl specific code.
13541         (do_pushlevel): Likewise.
13542         (add_tree): Likewise.
13543         (finish_goto_stmt): Likewise.
13544         (finish_expr_stmt): Likewise.
13545         (begin_if_stmt): Likewise.
13546         (finish_if_stmt_cond): Likewise.
13547         (finish_then_clause): Likewise.
13548         (begin_else_clause): Likewise.
13549         (finish_else_clause): Likewise.
13550         (finish_if_stmt): Likewise.
13551         (clear_out_block): Likewise.
13552         (begin_while_stmt): Likewise.
13553         (finish_while_stmt_cond): Likewise.
13554         (finish_while_stmt): Likewise.
13555         (begin_do_stmt): Likewise.
13556         (finish_do_body): Likewise.
13557         (finish_do_stmt): Likewise.
13558         (finish_return_stmt): Likewise.
13559         (begin_for_stmt): Likewise.
13560         (finish_for_init_stmt): Likewise.
13561         (finish_for_cond): Likewise.
13562         (finish_for_expr): Likewise.
13563         (finish_break_stmt): Likewise.
13564         (finish_continue_stmt): Likewise.
13565         (begin_switch_stmt): Likewise.
13566         (finish_switch_cond): Likewise.
13567         (finish_case_label): Likewise.
13568         (begin_try_block): Likewise.
13569         (begin_function_try_block): Likewise.
13570         (finish_try_block): Likewise.
13571         (finish_cleanup_try_block): Likewise.
13572         (finish_cleanup): Likewise.
13573         (finish_function_try_block): Likewise.
13574         (finish_handler_sequence): Likewise.
13575         (finish_function_handler_sequence): Likewise.
13576         (begin_handler): Likewise.
13577         (finish_handler_parms): Likewise.
13578         (begin_catch_block): Likewise.
13579         (finish_handler): Likewise.
13580         (begin_compound_stmt): Likewise.
13581         (finish_compound_stmt): Likewise.
13582         (finish_asm_stmt): Likewise.
13583         (finish_label_stmt): Likewise.
13584         (finish_label_decl): Likewise.
13585         (finish_subobject): Likewise.
13586         (finish_decl_cleanup): Likewise.
13587         (finish_named_return_value): Likewise.
13588         (begin_stmt_expr): Likewise.
13589         (finish_stmt_expr): Likewise.
13591         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
13592         to call genrtl_expr_stmt when appropriate.
13594         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
13595         begin_compound_expr to call genrtl_begin_stmt_expr and
13596         genrtl_begin_compound_expr when appropriate.
13597         (finish_init_stmts): Changed calls to finish_compound_expr and
13598         finish_stmt_expr to call genrtl_finish_compound_expr and
13599         genrtl_finish_stmt_expr when appropriate.
13600         (expand_default_init): Changed call to finish_expr_stmt to call
13601         genrtl_expr_stmt when appropriate.
13602         (build_vec_init): Likewise.
13604         * parse.y (simple_stmt): Removed first argument from call to
13605         finish_for_stmt. Removed first argument from call to
13606         finish_switch_stmt.
13608         * parse.c: Regenerated.
13610         * pt.c (tsubst_expr): Removed first argument from call to
13611         finish_for_stmt. Removed first argument from call to
13612         finish_switch_stmt.
13614 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
13616         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
13617         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
13619         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
13620         (cplus_tree_code_length[]): Likewise.
13621         (cplus_tree_code_name[]): Likewise.
13622         (init_parse): Added call to add_c_tree_codes. Changed
13623         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
13625 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
13627         * cp-tree.h (finish_mem_initializers): Declare.
13628         (count_trees): Likewise.
13629         * parse.y (base_init): Use finish_mem_initializers.
13630         * semantics.c (finish_mem_initializers): New function.
13632         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
13633         the number of trees.
13634         (n_trees): Remove.
13635         (count_trees): Don't use it.
13637 2000-06-15  Jason Merrill  <jason@redhat.com>
13639         * tree.c (count_trees): New debugging function.
13641         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
13642         * init.c (build_member_call): Pull out the name of a DECL.
13644         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
13645         * semantics.c (expand_body): Push to TV_INTEGRATION here.
13646         * optimize.c (optimize_function): Not here.
13647         * pt.c (instantiate_decl): Push to TV_PARSE.
13649 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
13651         * cp-tree.h (struct language_function): Remove x_base_init_list
13652         and x_member_init_list.
13653         (current_base_init_list): Remove.
13654         (current_member_init_list): Likewise.
13655         (setup_vtbl_ptr): Change prototype.
13656         (emit_base_init): Likewise.
13657         (expand_member_init): Likewise.
13658         (reinit_parse_for_function): Remove.
13659         * decl.c (save_function_data): Don't clear x_base_init_list and
13660         x_member_init_list.
13661         (mark_language_function): Don't mark them.
13662         * init.c (perform_member_init): Tweak comment.
13663         (sort_member_init): Take the list of initializers as an argument.
13664         (sort_base_init): Likewise.
13665         (emit_base_init): Likewise.
13666         (expand_member_init): Return the initializer.  Don't use global
13667         variables.
13668         * lex.c (reinit_parse_for_function): Remove.
13669         * method.c (build_template_parm_names): Correct substitution.
13670         (do_build_copy_constructor): Don't use current_member_init_list
13671         and current_base_init_list.
13672         (synthesize_method): Likewise.
13673         * parse.y (base_init): Split mem-initializers into
13674         base-initializers and field-initializers.
13675         (member_init_list): Build up the list here.
13676         (member_init): Return the initializer.
13677         (fn.depfn): Don't use reinit_parse_for_function.
13678         * parse.c: Regenerated.
13679         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
13680         ERROR_MARK.
13681         (tsubst_expr): Don't use current_member_init_list
13682         and current_base_init_list.
13683         (tsubst_expr_values): Rename to ...
13684         (tsubst_initializer_list): ... this.  Use convert_from_reference.
13685         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
13686         and current_base_init_list.
13687         (begin_function_definition): Don't call reinit_parse_for_function.
13689         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
13691         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
13692         correctly.
13694         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
13696 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
13698         * cp-tree.h (IF_COND): Move to c-common.h.
13699         (THEN_CLAUSE): Likewise.
13700         (ELSE_CLAUSE): Likewise.
13701         (WHILE_COND): Likewise.
13702         (WHILE_BODY): Likewise.
13703         (DO_COND): Likewise.
13704         (DO_BODY): Likewise.
13705         (RETURN_EXPR): Likewise.
13706         (EXPR_STMT_EXPR): Likewise.
13707         (FOR_INIT_STMT): Likewise.
13708         (FOR_COND): Likewise.
13709         (FOR_EXPR): Likewise.
13710         (FOR_BODY): Likewise.
13711         (SWITCH_COND): Likewise.
13712         (SWITCH_BODY): Likewise.
13713         (CASE_LOW): Likewise.
13714         (CASE_HIGH): Likewise.
13715         (GOTO_DESTINATION): Likewise.
13716         (COMPOUND_BODY): Likewise.
13717         (ASM_CV_QUAL): Likewise.
13718         (ASM_STRING): Likewise.
13719         (ASM_OUTPUTS): Likewise.
13720         (ASM_INPUTS): Likewise.
13721         (ASM_CLOBBERS): Likewise.
13722         (DECL_STMT_DECL): Likewise.
13723         (STMT_EXPR_STMT): Likewise.
13724         (LABEL_STMT_LABEL): Likewise.
13725         (SCOPE_BEGIN_P): Likewise.
13726         (SCOPE_END_P): Likewise.
13727         (SCOPE_STMT_BLOCK): Likewise.
13728         (SCOPE_NULLIFIED_P): Likewise.
13729         (SCOPE_NO_CLEANUPS_P): Likewise.
13730         (SCOPE_PARTIAL_P): Likewise.
13731         (ASM_VOLATILE_P): Likewise.
13732         (STMT_LINENO): Likewise.
13733         (STMT_LINENO_FOR_FN_P): Likewise.
13735         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
13736         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
13737         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
13738         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
13739         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
13741         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
13743         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
13744         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
13746         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
13747         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
13748         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
13750 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
13752         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
13753         * class.c (dfs_find_final_overrider): Set it appropriately.
13754         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
13755         avoid unneeded secondary vptrs.
13757 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13759         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
13760         (check_bitfield_decl, check_field_decl): Likewise.
13761         (build_vtbl_or_vbase_field, build_base_field): Likewise.
13762         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
13763         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
13764         (xfer_tag, finish_enum): Likewise.
13765         * decl2.c (finish_builtin_type): Likewise.
13766         * init.c (init_init_processing): Likewise.
13767         * pt.c (instantiate_class_template): Likewise.
13768         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
13769         * cp-tree.h (struct lang_type): Add user_align member.
13770         (CLASSTYPE_USER_ALIGN): Define.
13772 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
13774         * Make-lang.in (c++.install-common): Install g++-cross in
13775         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
13776         $(target_alias)-g++ and $(target_alias)-c++.
13778 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
13780         * class.c (vcall_offset_data_s): Add last_init and fns.
13781         (overrides): Rename to same_signature_p.
13782         (dfs_find_final_overrider): Adjust accordingly.
13783         (mark_overriders): Likewise.
13784         (warn_hidden): Likewise.
13785         (build_vtbl_initializer): Reorganize machinery for building things
13786         at negative offsets.
13787         (build_vcall_and_vbase_vtbl_entries): Likewise.
13788         (build_vbase_offset_vtbl_entries): Likewise.
13789         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
13790         offset entries.  Do not create two entries for functions with the
13791         same signature.
13792         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
13793         (build_rtti_vtbl_entries): Reorganize machinery for building things
13794         at negative offsets.
13796         * optimize.c (expand_call_inline): Don't recurse into the code
13797         used to initialize the parameters more than once.
13799 2000-06-11  Mark Mitchell <mark@codesourcery.com>
13801         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
13802         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
13803         (find_substitution): Only use the `Sa' substitution for
13804         std::allocator, not instantiations of it.
13805         (write_template_prefix): Move comment.  Only use a TREE_LIST to
13806         represent substitutions for a member template.
13807         (write_array_type): Mangle array dimensions correctly.
13808         * optimize.c (maybe_clone_body): Copy more information from the
13809         cloned function.
13810         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
13811         on the regenerated declaration.
13813 2000-06-11  Chip Salzenberg  <chip@valinux.com>
13814             Mark Mitchell <mark@codesourcery.com>
13816         * class.c (build_vtable): Clarify comment.
13817         (build_ctor_vtbl_group): Pass the most derived type to
13818         build_vtable.
13820 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13822         * decl2.c (compare_options): Don't needlessly cast away const-ness.
13824 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
13826         * decl.c (add_binding): Handle duplicate declarations of external
13827         variables.
13829 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13830             Mark Mitchell <mark@codesourcery.com>
13832         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
13833         argument.
13834         (write_signed_number): New macro.
13835         (write_unsigned_number): Likewise.
13836         (write_source_name): Use them.
13837         (write_number): Handle signed and unsigned values.
13838         (write_integer_cst): Use tree_int_cst_sgn, and use
13839         write_unsigned_number or write_signed_number as appropriate.
13840         (write_discriminator): Use write_unsigned_number or
13841         write_signed_number as appropriate.
13842         (write_template_arg_literal): Likewise.
13843         (write_array_type): Use tree_low_cst.
13844         (write_template_parm):  Use write_unsigned_number or
13845         write_signed_number as appropriate.
13846         (write_substitution): Adjust call to write_number.
13847         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
13848         (write_expression): Handle non-type template arguments of
13849         reference type correctly.
13850         (mangle_thunk): Use write_signed_number.
13852 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13854         * mangle.c (find_substition): Don't mangle objects with typename
13855         substitutions (e.g. "cin" as "Si").
13857 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
13859         * call.c (add_candidate): Use ggc_alloc_cleared.
13860         * decl.c (lookup_label): Likewise.
13861         * lex.c (retrofit_lang_decl): Likewise.
13863 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
13865         * semantics.c (expand_body): Push to TV_EXPAND.
13866         * optimize.c (optimize_function): Push to TV_INTEGRATION.
13867         * decl.c (start_function): Always call announce_function.
13869         * tinfo2.cc: Just declare abort.
13871 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
13873         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
13874         whenever @ is a symbolic name.
13876 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
13878         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
13880 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
13882         * decl.c (pushdecl): Look up functions by DECL_NAME, not
13883         DECL_ASSEMBLER_NAME.
13885 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13887         * decl2.c (c_language): Define.
13889 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
13891         * lex.c (lang_init_options): Tweak.
13893         * decl2.c: Remove #inclusion of diagnostic.h
13894         (lang_decode_option): Move diagnostic formatting options to
13895         toplevel.
13897         * lang-options.h: Remove documentation for diagnostic options.
13899         * Makefile.in (lex.o): Depends upon diagnostic.h
13901 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13903         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
13904         the same DECL_RESULT, it's not a redefinition.
13905         * pt.c (tsubst_decl): Remove code to handle illegal
13906         specializations.
13908 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
13910         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
13912 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
13914         * search.c (maybe_suppress_debug_info): Don't check
13915         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
13917         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
13918         here if extern_p.
13920         Remember instantiation context in deferred instantiations.
13921         * cp-tree.h (struct tinst_level): Remove.
13922         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
13923         * pt.c (current_tinst_level): Now a tree.
13924         (print_template_context, push_tinst_level, pop_tinst_level,
13925         tinst_for_decl): Adjust.
13926         (reopen_tinst_level): New fn.
13927         (init_pt): Register current_tinst_level as a root.
13928         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
13929         of the pending templates list.
13930         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
13931         * lex.c (extract_interface_info): Adjust.
13932         * decl2.c (warn_if_unknown_interface): Adjust.
13934 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
13936         * class.c (indirect_primary_base_p): New function.
13937         (determine_primary_base): Use it.
13939 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13941         Update new-abi dynamic cast algorithm.
13942         * tinfo.cc (__class_type_info::__dyncast_result): Add
13943         whole_details. Adjust constructor.
13944         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
13945         Avoid unnecessary searching.
13946         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
13948 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13950         * decl.c (init_decl_processing): Don't call record_component_aliases.
13951         * tree.c (build_cplus_array_type_1): Likewise.
13953 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
13955         * ir.texi: Correct typo.
13956         * mangle.c (write_expression): Handle non-type template arguments
13957         with reference type.
13958         * method.c (build_overload_value): Likewise.
13959         * pt.c (convert_nontype_argument): Explicitly represent conversion
13960         to a reference with an ADDR_EXPR.
13961         (unify): Always unify arguments in left-to-right order.
13963 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
13964             Mark Mitchell  <mark@codesourcery.com>
13966         * Make-lang.in (CXX_SRCS): Add mangle.c.
13967         * Makefile.in (CXX_OBJS): Add mangle.o.
13968         (mangle.o): New rule.
13970         * class.c (local_classes): New variable.
13971         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
13972         (get_vtt_name): Use mangle_vtt_name for new ABI.
13973         (init_class_processing): Initialize local_classes.
13974         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
13975         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
13976         (std_identifier): New macro.
13977         (DECL_VOLATILE_MEMFUNC_P): New macro.
13978         (DECL_NAMESPACE_STD_P): Likewise.
13979         (local_classes): Declare.
13980         (get_mostly_instantiated_function_type): Declare.
13981         (init_mangle): Declare.
13982         (mangle_decl): Likewise.
13983         (mangle_type_string): Likewise.
13984         (mangle_type): Likewise.
13985         (mangle_typeinfo_for_type): Likewise.
13986         (mangle_typeinfo_string_for_type): Likewise.
13987         (mangle_vtbl_for_type): Likewise.
13988         (mangle_vtt_for_type): Likewise.
13989         (mangle_ctor_vtbl_for_type): Likewise.
13990         (mangle_thunk): Likewise.
13991         (mangle_conv_op_name_for_type): Likewise.
13992         (mangle_guard_variable): Likewise.
13993         * decl.c (pushtag): Keep track of local classes.
13994         (initialize_predefined_identifiers): Initialize std_identifier.
13995         (init_decl_processing): Use std_identifier.
13996         (start_decl): Don't treat instantiations as specializations.
13997         (grokdeclarator): Likewise.
13998         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
13999         name for fully-instantiated templates.
14000         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
14001         destructors with the new ABI.
14002         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
14003         (grokfield): Use mangle_type for new ABI.
14004         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
14005         (get_sentry): Use mangle_guard_variable for new ABI.
14006         (start_static_initialization_or_destruction): Likewise.
14007         * expr.c (extract_aggr_init): Remove.
14008         (extract_scalar_init): Likewise.
14009         (extract_init): Remove #if 0'd code.
14010         * mangle.c: New function.
14011         * method.c (build_mangled_name): Assert not flag_new_abi.
14012         (build_static_name): Likewise.
14013         (build_decl_overload_real): Likewise.
14014         (build_typename_overload): Likewise.
14015         (build_overload_with_type): Likewise.
14016         (build_overload_name): Likewise.
14017         (get_ctor_vtbl_name): Likewise.
14018         (start_squangling): Likewise.
14019         (get_id_2): Likewise.
14020         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
14021         (init_method): Call init_mangle for new ABI.
14022         (make_thunk): Call mangle_thunk for new ABI.
14023         * operators.def: Correct new ABI manglings for the `%' operator.
14024         Add `::' operator.
14025         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
14026         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
14027         (lookup_template_class): Call mangle_decl for new ABI.
14028         (get_mostly_instantiated_function_type): New function.
14029         (set_mangled_name_for_template_decl): Use it.
14030         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
14031         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
14032         conversion op names.
14033         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
14034         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
14035         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
14036         mangle_typeinfo_string_for_type.
14038 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
14040         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
14041         (INNERMOST_TEMPLATE_ARGS): New macro.
14042         (innermost_args): Remove.
14043         (get_innermost_template_args): New function.
14044         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
14045         * error.c (dump_function_decl): Be caution when using
14046         most_general_template.
14047         * method.c (build_template_parm_names):  Use
14048         INNERMOST_TEMPLATE_ARGS.
14049         * pt.c (add_to_template_args): Tidy comment
14050         (get_innermost_template_args): New function.
14051         (check_explicit_specialization): Clear DECL_INITIAL for a new
14052         specialization.
14053         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
14054         Tidy.
14055         (push_template_decl): Always register specializations of the most
14056         general template.
14057         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
14058         (coerce_template_parms): Likewise.
14059         (lookup_template_class): Likewise.
14060         (innermost_args): Remove.
14061         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
14062         (tsubst_decl): Handle tricky specializations.  Use
14063         get_innermost_template_args.
14064         (instantiate_template): Simplify handling of partial
14065         instantiations.
14066         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
14067         (most_general_template): Reimplement, in a more straightforward
14068         manner.
14069         (regenerate_decl_from_template): Tweak formatting.  Use
14070         TMPL_ARGS_DEPTH for clarity.
14071         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
14073         * dump.c (dequeue_and_dump): Dump information about thunks.
14075 2000-06-01  Richard Henderson  <rth@cygnus.com>
14077         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
14079 2000-06-01  Richard Henderson  <rth@cygnus.com>
14081         * decl2.c (unsupported_options): Fix typo, make const.
14082         (lang_decode_option): Fix bsearch argument order.
14084 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
14086         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
14087         on FIELD_DECLs.
14089 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14091         * cp-tree.h (c_get_alias_set): Deleted.
14092         * Makefile.in (decl.o): Include ../expr.h.
14093         * decl.c (expr.h): Include.
14094         (init_decl_processing): Call record_component_aliases for arrays.
14095         (grokdeclarator): Likewise.
14096         Set TREE_ADDRESSABLE for fields that aren't bitfields.
14097         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
14099 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
14101         Remove guiding declaration support.
14102         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
14103         (flag_guiding_decls): Remove.
14104         * call.c (build_user_type_conversion_1): Remove support for
14105         guiding decls.
14106         (build_new_function_call): Likewise.
14107         (build_new_op): Likewise.
14108         (build_new_method_call): Likewise.
14109         * decl.c (start_function): Likewise.
14110         * friend.c (is_friend): Likewise.
14111         (do_friend): Likewise.
14112         * decl2.c ((flag_dump_translation_unit): Make it const.
14113         (flag_guiding_decls): Remove.
14114         (unsupported_options): New variable
14115         (compare_options): New function.
14116         (lang_decode_option): Use them.
14118         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
14120         * method.c (mangle_expression): Adjust test for legal expression
14121         operators.
14123         * pt.c (instantiate_decl): Save and restore the local
14124         specializations list.
14126 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
14128         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
14130 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
14132         * call.c (add_template_candidate_real): Handle member template
14133         constructors for classes with virtual bases.
14134         (build_user_type_conversion_1): Use in_charge_arg_for_name.
14135         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
14137         * ir.texi: Update thunk documentation.
14139         * call.c (joust): Fix handling of overloaded builtin operators.
14141 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
14143         * cp-tree.h (DECL_ANTICIPATED): New macro.
14144         Document new use of DECL_LANG_FLAG_7.
14145         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
14146         in the user namespace.
14147         * lex.c (do_identifier): If the identifier's declaration has
14148         DECL_ANTICIPATED on, it has not yet been declared.  But do not
14149         replace it with an ordinary implicit declaration.
14151         * tinfo2.cc: Include stdlib.h.
14153 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
14155         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
14156         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
14157         CLASSTYPE_ALIGN.
14159 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
14161         * decl2.c (lang_decode_option): Use skip_leading_substring instead
14162         of plain strncmp.
14164 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
14166         * operators.def (<?): Duplicated, should have been...
14167         (>?): this.  Fixed.
14169 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
14170             Mark Mitchell  <mark@codesourcery.com>
14172         * cp-tree.h (ansi_opname): Make it a macro.
14173         (ansi_assopname): Likewise.
14174         (struct lang_decl_flags): Add assignment_operator_p.
14175         (struct lang_decl): Add operator_code.
14176         (DECL_VTT_PARM): Adjust.
14177         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
14178         overloaded operator.
14179         (SET_OVERLOADED_OPERATOR_CODE): New macro.
14180         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
14181         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
14182         (opname_tab): Remove.
14183         (assignop_tab): Likewise.
14184         (operator_name_info_t): New type.
14185         (operator_name_info): New variable.
14186         (assignment_operator_name_info): Likewise.
14187         (build_cp_library_fn): Remove declaration.
14188         (push_cp_library_fn): Likewise.
14189         (operator_name_string): Likewise.
14190         (build_decl_overload): Likewise.
14191         * call.c (print_z_candidates): Simplify.
14192         (build_object_call): Adjust usage of ansi_opname.  Use
14193         DECL_OVERLOADED_OPERATOR_P.
14194         (op_error): Adjust operator name lookup.
14195         (build_conditional_expr): Adjust usage of ansi_opname.
14196         (build_new_op): Likewise.
14197         (build_op_delete_call): Likewise.
14198         (build_over_call): Likewise.
14199         (joust): Use DECL_OVERLOADED_OPERATOR_P.
14200         * decl.c (duplicate_decls): Copy operator_code.
14201         (init_decl_processing): Adjust parameters to push_cp_library_fn.
14202         (builtin_function): Adjust parameters to build_library_fn_1.
14203         (build_library_fn_1): Accept an overloaded operator code.
14204         (build_library_fn): Pass ERROR_MARK.
14205         (build_cp_library_fn): Accept an overloaded operator code.
14206         (push_cp_library_fn): Likewise.
14207         (grokfndecl): Tweak.
14208         (grokdeclarator): Simplify code to compute names of overloaded
14209         operators.  Adjust use of ansi_opname.
14210         (ambi_op_p): Work on tree_codes, not identifiers.
14211         (unary_op_p): Likewise.
14212         (grok_op_properties): Likewise.
14213         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
14214         (lang_mark_tree): Don't try to mark the operator_code.
14215         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
14216         * error.c (dump_decl): Remove special handling for operator
14217         names.
14218         (dump_function_name): Likewise.
14219         (dump_expr): Adjust name lookup of operators.
14220         (op_to_string): Simplify.
14221         (assop_to_string): Likewise.
14222         * init.c (build_new_1): Adjust use of ansi_opname.
14223         * lex.c (opname_tab): Remove.
14224         (assignop_tab): Likewise.
14225         (ansi_opname): Likewise.
14226         (ansi_assopname): Likewise.
14227         (operator_name_string): Likewise.
14228         (reinit_lang_specific): Likewise.
14229         (operator_name_info): New variable.
14230         (assignment_operator_name_info): Likewise.
14231         (init_operators): New function.
14232         (init_parse): Use it.
14233         (do_identifier): Adjust use of ansi_opname.
14234         * method.c (mangle_expression): Don't use ansi_opname for
14235         mangling.
14236         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
14237         (build_decl_overload): Remove.
14238         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
14239         (do_build_assign_ref): Adjust use of ansi_opname.
14240         (synthesize_method): Likewise.
14241         (implicitly_declare_fn): Likewise.
14242         * operators.def: New file.
14243         * parse.y (operator): Adjust use of ansi_opname.
14244         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
14245         (set_mangled_name_for_template_decl): Don't play games with
14246         current_namespace.
14247         (special_function_p): Adjust use of ansi_opname.
14248         * typeck.c (check_return_expr): Likewise.
14249         * Make-lang.in (cc1plus): Depend on operators.def.
14250         * Makefile.in (lex.o): Likewise.
14251         (decl.o): Likewise.
14253 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
14255         * Make-lang.in (cplib2.ready): Eradicate.
14257 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14259         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
14260         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
14261         (built_min, cp_tree_equal): Likewise.
14263 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14265         * class.c (layout_nonempty_base_or_field): Replace
14266         `record_layout_info' with `record_layout_info_s'.
14268 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
14270         Fix goto checking.
14271         * cp-tree.h (struct language_function): x_named_labels is now
14272         a struct named_label_list*.
14273         * decl.c (struct named_label_use_list): Renamed from...
14274         (struct named_label_list): ...this.  New struct.
14275         (push_binding_level): Don't set eh_region.
14276         (note_level_for_eh): New fn.
14277         (pop_label): Take label and old value directly.
14278         (pop_labels): Adjust for new named_labels format.
14279         (lookup_label): Likewise.
14280         (poplevel): Note characteristics of a binding level containing a
14281         named label.  Mess with named label lists earlier.
14282         (mark_named_label_lists): New fn.
14283         (mark_lang_function): Call it.
14284         (use_label): New fn, split out from...
14285         (make_label_decl): ...here.  Don't call it.
14286         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
14287         check_previous_gotos): New fns, split out from...
14288         (define_label): ...here.
14289         (check_switch_goto): New fn.
14290         (define_case_label): Call it.
14291         (check_goto): New fn.
14292         * semantics.c (finish_goto_stmt): Call it and use_label.
14293         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
14294         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
14296 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
14298         * class.c (build_vtable_entry_ref): Correct usage of
14299         get_vtbl_decl_for_binfo.
14301         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
14302         * method.c (implicitly_declare_fn): Not here.
14304 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
14306         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
14307         (CPTI_PTMD_DESC_TYPE): ... here.
14308         (ptmd_desc_type_node): Rename to ...
14309         (ptm_desc_type_node): ... here.
14310         * decl.c: Likewise.
14311         * rtti.c (ptmd_initializer): Rename to ...
14312         (ptm_initializer): ... here.
14313         (sythesize_tinfo_var): Adjust. Deal with pointer to member
14314         function.
14315         (create_tinfo_types): Adjust.
14317 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
14319         Finish implementation of VTTs.
14320         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
14321         CPTI_VTT_PARM_IDENTIFIER.
14322         (vtt_parm_identifier): New macro.
14323         (vtt_parm_type): Likewise.
14324         (BINFO_SUBVTT_INDEX): Likewise.
14325         (BINFO_VPTR_INDEX): Likewise.
14326         (struct lang_decl): Add vtt_parm.
14327         (DECL_VTT_PARM): New macro.
14328         (DECL_USE_VTT_PARM): Likewise.
14329         (DECL_NEEDS_VTT_PARM_P): Likewise.
14330         (get_vtt_name): Declare.
14331         (build_artificial_parm): Likewise.
14332         (fixup_all_virtual_upcast_offsets): Likewise.
14333         (expand_indirect_vtbls_init): Remove.
14334         * call.c (build_new_method_call): Pass the vtt to subobject
14335         constructors and destructors.
14336         * class.c (get_vtt_name): Give it external linkage.
14337         (build_clone): Handle the magic VTT parameters for clones.
14338         (clone_function_decl): Fix typo in comment.
14339         (build_vtt): Keep track of the indices in the VTTs where various
14340         entities are stored.
14341         (build_vtt_inits): Likewise.
14342         (dfs_build_vtt_inits): Likewise.
14343         (build_ctor_vtbl_group): Tweak type of construction vtables.
14344         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
14345         primary bases, when building construction vtables.
14346         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
14347         (initialize_predefined_identifiers): Add vtt_parm_identifier.
14348         (init_decl_processing): Initialize vtt_parm_type.
14349         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
14350         (lang_mark_tree): Make vtt_parm.
14351         * decl2.c (build_artificial_parm): New function.
14352         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
14353         (grokclassfn): Use build_artificial_parm.
14354         * init.c (initialize_vtbl_ptrs): Call
14355         fixup_all_virtual_upcast_offsets directly.
14356         (perform_member_init): Use the complete subobject destructor for
14357         member cleanups.
14358         (build_vtbl_address): New function.
14359         (expand_virtual_init): Handle VTTs.
14360         * optimize (maybe_clone_body): Likewise.
14361         * search.c (fixup_all_virtual_upcast_offsets): Give it external
14362         linkage.
14363         (expand_indirect_vtbls_init): Remove.
14364         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
14365         * tree.c (make_binfo): Make them bigger.
14367 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14369         * inc/cxxabi.h (__pbase_type_info): Define, based on
14370         __pointer_type_info.
14371         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
14372         (__pointer_to_member_type_info): Likewise.
14373         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
14374         (__pointer_to_member_type_info::__is_pointer_p): Remove.
14375         (__pointer_type_info::__do_catch): Rename to ...
14376         (__pbase_type_info::__do_catch): ... here. Adjust.
14377         (__pbase_type_info::__pointer_catch): Implement.
14378         (__pointer_type_info::__pointer_catch): Adjust.
14379         (__pointer_to_member_type_info::__pointer_catch): Adjust.
14381 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
14383         * tinfo.h (__user_type_info::contained_virtual_p): New
14384         predicate.
14385         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
14386         shaped hierarchy.
14387         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
14388         diamond shaped hierarchy. Add early out for mixed diamond and
14389         duplicate shaped hierarchy.
14391 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
14393         * cp-tree.h (build_delete): Change prototype.
14394         (build_vec_delete): Likewise.
14395         * call.c (build_scoped_method_call): Use special_function_kind
14396         values to indicate the kind of destruction to be done.
14397         (build_method_call): Likewise.
14398         * decl.c (finish_destructor_body): Likewise.
14399         (maybe_build_cleanup_1): Likewise.  Rename to ...
14400         (maybe_build_cleanup): ... this.
14401         * decl2.c (delete_sanity): Use special_function_kind
14402         values to indicate the kind of destruction to be done.
14403         (build_cleanup): Likewise.
14404         * init.c (perform_member_init): Likewise.
14405         (build_vec_delete_1): Likewise.
14406         (build_dtor_call): Simplify.
14407         (build_delete): Use special_function_kind
14408         values to indicate the kind of destruction to be done.
14409         (build_vbase_delete): Likewise.
14410         (build_vec_delete): Likewise.
14412         * init.c (sort_member_init): Fix typo in error message generation
14413         code.
14415 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
14417         * semantics.c (begin_class_definition): make the packed
14418         attribute be sensitive to the "-fpack-struct" command line flag
14420 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
14422         Update new-abi upcast algorithm.
14423         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
14424         prototype and meaning of return value.
14425         (__si_class_type_info::__do_upcast): Likewise.
14426         (__vmi_class_type_info::__do_upcast): Likewise.
14427         * tinfo.cc (__class_type_info::__upcast_result): Replace
14428         whole2dst with part2dst. Adjust ctor.
14429         (__class_type_info::__do_upcast): Adjust call of worker function.
14430         (__class_type_info::__do_upcast): Adjust.
14431         (__si_class_type_info::__do_upcast): Adjust. Use parent's
14432         __do_upcast.
14433         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
14434         virtual base in diamond hierarchy bug.
14436 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
14438         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
14439         and bitfield to tinfo_fn_p.
14440         (DECL_TINFO_FN_P): Adjust.
14441         (SET_DECL_TINFO_FN_P): Likewise.
14442         (DECL_MUTABLE_P): Likewise.
14443         (DECL_C_BIT_FIELD): Likewise.
14444         (SET_DECL_C_BIT_FIELD): Likewise.
14445         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14446         (DECL_UNINLINABLE): Likewise.
14447         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
14448         (handle_using_decl): Remove assertion.
14449         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
14450         to build FIELD_DECLs.
14451         (build_base_field): Likewise.
14452         (layout_class_type): Likewise.
14453         * decl.c (init_decl_processing): Likewise.
14454         (build_ptrmemfunc_type): Likewise.
14455         (grokdeclarator): Likewise.
14456         * decl2.c (grok_x_components): Likewise.
14457         * except.c (call_eh_info): Likewise.
14458         * init.c (init_init_processing): Likewise.
14459         * rtti.c (expand_class_desc): Likewise.
14460         (create_pseudo_type_info): Likewise.
14461         (get_vmi_pseudo_type_info): Likewise.
14462         (create_tinfo_types): Likewise.
14463         * ptree.c (print_lang_decl): Adjust.
14464         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
14465         before checking DECL_MUTABLE_P.
14467         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
14468         parameters for template functions.
14469         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
14470         destructors as well as constructors.
14472 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
14474         * class.c (build_ctor_vtbl_group): Set inits.
14475         * optimize.c (maybe_clone_body): Set DECL_INLINE and
14476         DECL_THIS_INLINE appropriately for clones.
14478         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
14479         (DECL_CONV_FN_P): Simplify.
14480         (DECL_OPERATOR): Remove.
14481         (language_to_string): Declare.
14482         * decl.c (duplicate_decls): Fix typo in comment.
14483         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
14484         (grok_op_properties): Use DECL_CONV_FN_P instead of
14485         IDENTIFIER_TYPENAME_P.
14486         * dump.c (dequeue_and_dump): Dump the language linkage of
14487         declarations.
14488         * error.c (language_to_string): Give it external linkage.
14489         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
14490         (implicitly_declare_fn): Set DECL_LANGUAGE.
14491         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
14492         IDENTIFIER_TYPENAME_P.
14493         (tsubst_decl): Likewise.
14494         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
14495         * semantics.c (finish_member_declaration): Don't mark members of
14496         classes declared in an extern "C" region as extern "C".
14498 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14500         * decl2.c (qualified_lookup_using_namespace): Look through
14501         namespace aliases.
14503         * decl.c (push_using_decl): Return the old decl on namespace level.
14505 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
14507         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
14508         (VTT_NAME_PREFIX): New macro.
14509         (CTOR_VTBL_NAME_PREFIX): Likewise.
14510         (get_ctor_vtbl_name): New function.
14511         * class.c (get_vtable_name): Simplify.
14512         (get_vtt_name): New function.
14513         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
14514         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
14515         when a virtual base becomes primary.
14516         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
14517         VTTs.
14518         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
14519         additional parameters.
14520         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
14521         (initialize_array): New function.
14522         (build_vtt): Likewise.
14523         (build_vtt_inits): Likewise.
14524         (dfs_build_vtt_inits): Likewise.
14525         (dfs_fixup_binfo_vtbls): Likewise.
14526         (build_ctor_vtbl_group): Likewise.
14527         (initialize_vtable): Use initialize_array.
14528         (accumulate_vtbl_inits): Reimplement to handle construction
14529         vtables.
14530         (dfs_accumulate_vtbl_inits): Likewise.
14531         (bulid_vtbl_initializer): Adjust parameter name.
14532         * method.c (build_typename_overload): Remove #if 0'd code.
14533         (get_ctor_vtbl_name): New function.
14534         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
14535         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
14537         * cp-tree.h (struct lang_type): Remove search_slot.
14538         (CLASSTYPE_SEARCH_SLOT): Remove.
14539         (emit_base_init): Change prototype.
14540         (initialize_vtbl_ptrs): Likewise.
14541         (expand_indirect_vtbls_init): Likewise.
14542         (clear_search_slots): Remove.
14543         * decl.c (lang_mark_tree): Don't mark search_slot.
14544         * init.c (initialize_vtbl_ptrs): Simplify.
14545         (emit_base_init): Likewise.
14546         * search.c (struct vbase_info): Document decl_ptr.
14547         (convert_pointer_to_single_level): Remove.
14548         (dfs_find_vbases): Remove.
14549         (dfs_init_base_pointers): Simplify.
14550         (dfs_clear_vbase_slots): Remove.
14551         (dfs_vtable_path_unmark): New function.
14552         (init_vbase_pointers): Simplify.
14553         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
14554         (expand_indirect_vtbls_init): Simplify.  Don't call
14555         mark_all_temps_used.
14556         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
14557         initialize_vtbl_ptrs.
14559 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
14561         * except.c: Add static prototypes.
14563 2000-05-20  H.J. Lu  <hjl@gnu.org>
14565         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
14567 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
14569         Don't create a separate copy of virtual bases for the
14570         CLASSTYPE_VBASECLASSES list.
14571         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
14572         (BINFO_FOR_VBASE): Remove.
14573         (CANONICAL_BINFO): Adjust.
14574         (binfo_for_vbase): New function.
14575         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
14576         instead of BINFO_FOR_VBASE.
14577         (build_vbase_pointer): Likewise.
14578         (build_secondary_vtable): Likewise.
14579         (dfs_mark_primary_bases): Likewise.
14580         (mark_primary_bases): Likewise.
14581         (layout_nonempty_base_or_field): Likewise.
14582         (dfs_set_offset_for_shared_vbases): Likewise.
14583         (dfs_set_offset_for_unshared_vbases): Likewise.
14584         (layout_virtual_bases): Likewise.  Adjust for changes to the
14585         CLASSTYPE_VBASECLASSES list.
14586         (dump_class_hierarchy_r): Use binfo_for_vbase
14587         instead of BINFO_FOR_VBASE.
14588         (dump_class_hierarchy): Likewise.
14589         (finish_vtbls): Likewise.
14590         (build_vtbl_initializer): Adjust for changes to the
14591         CLASSTYPE_VBASECLASSES list.
14592         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
14593         * decl.c (finish_destructor_body): Adjust for changes to the
14594         CLASSTYPE_VBASECLASSES list.
14595         * init.c (sort_base_init): Use binfo_for_vbase.
14596         (construct_virtual_bases): Adjust for changes to the
14597         CLASSTYPE_VBASECLASSES list.
14598         (expand_member_init): Use binfo_for_vbase.
14599         (build_vbase_delete):  Adjust for changes to the
14600         CLASSTYPE_VBASECLASSES list.
14601         * method.c (do_build_copy_constructor): Likewise.
14602         * rtti.c (get_base_offset): Use binfo_for_vbase.
14603         (expand_class_desc): Remove #if 0'd code.
14604         * search.c (struct vbase_info): Remove vbase_types.
14605         (get_base_distance):  Use binfo_for_vbase.
14606         (lookup_field_queue_p): Use CANONICAL_BINFO.
14607         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
14608         (get_pure_virtuals): Adjust for changes to the
14609         CLASSTYPE_VBASECLASSES list.
14610         (dfs_find_vbases): Use binfo_for_vbase.
14611         (dfs_init_vbase_pointers): Likewise.
14612         (init_vbase_pointers): Don't initialize vi.vbase_types.
14613         (virtual_context): Use binfo_for_vbase.
14614         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
14615         CLASSTYPE_VBASECLASSES list.
14616         (expand_indirect_vtbls_init): Simplify.
14617         (dfs_get_vbase_types): Don't replicate virtual bases.
14618         (find_vbase_instance): Use binfo_for_vbase.
14619         (binfo_for_vbase): New function.
14620         * typeck.c (get_delta_difference): Use binfo_for_vbase.
14622 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
14624         * decl2.c (finish_anon_union): Generalize error messages to handle
14625         anonymous structures.
14626         * init.c (perform_member_init): Remove `name' parameter.
14627         (build_field_list): New function.
14628         (sort_member_init): Handle anonymous union initialization order
14629         correctly.  Check for multiple initializations of the same union.
14630         (emit_base_init): Don't look up fields by name here.
14631         (expand_member_init): Record the result of name lookup for future
14632         reference.
14633         * typeck.c (build_component_ref): Fix formatting.
14635 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
14637         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
14638         * typeck.c (build_x_compound_expr): Replace warn_unused with
14639         warn_unused_value.
14641         * decl2.c (lang_decode_option): Update -Wall unused flags by
14642         calling set_Wunused.
14644 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
14646         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
14647         * init.c (dfs_vtable_path_unmark): Remove.
14648         * search.c (marked_new_vtable_p): Likewise.
14649         (unmarked_new_vtable_p): Likewise.
14650         (dfs_search_slot_nonempty_p): Likewise.
14651         (dfs_mark): Likewise.
14652         (dfs_vtable_path_unmark): Likewise.
14653         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
14654         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
14655         (dfs_init_vbase_pointers): Remove special-case new ABI code.
14656         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
14657         (init_vbase_pointers): Simplify.
14658         (expand_indirect_vtbls_init): Likewise.
14660         * class.c (copy_virtuals): New function.
14661         (build_primary_table): Use it.
14662         (build_secondary_vtable): Likewise.
14663         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
14664         indicate that no vcall offset is required.
14665         (add_virtual_function): Likewise.
14666         (modify_all_vtables): Likewise.
14667         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14668         (dfs_accumulate_vtbl_inits): Likewise.
14669         (build_vtbl_initializer): Make changes to handle construction
14670         vtables.
14671         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14672         (build_rtti_vtbl_entries): Likewise.
14673         (build_vtable_entries): Handle a NULL vcall_index.
14675 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
14677         * decl2.c (lang_decode_option): Fix thinko.
14679 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
14681         * except.c (check_handlers): New fn.
14682         * cp-tree.h: Declare it.
14683         * semantics.c (finish_handler_sequence): Call it.
14684         (finish_function_handler_sequence): Likewise.
14685         (finish_handler_parms): Set TREE_TYPE on the handler.
14686         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
14687         * search.c (get_base_distance_recursive): If protect>1, ignore
14688         special access.
14689         (get_base_distance): Don't reduce watch_access.
14691 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
14693         * lex.c: #include diagnostic.h.
14694         (lang_init_options): Set default prefixing rules.
14696         * lang-options.h: Add -fdiagnostics-show-location=.
14698         * decl2.c: #include diagnostic.h.
14699         (lang_decode_option): Handle -fdiagnostics-show-location=.
14701 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
14703         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
14704         * vec.cc: Revert my 2000-05-07 change.
14706 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
14708         * class.c (check_field_decls): Complain about non-static data
14709         members with same name as class in class with constructor.
14711 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
14713         * decl.c (grokdeclarator): Allow non-static data members with
14714         same name as class.
14716 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14718         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
14719         and pending_inline.filename.  Update prototypes.
14720         * decl.c (define_label): Constify filename parameter.
14721         * decl2.c (warn_if_unknown_interface): Constify local char *.
14722         * input.c Constify input_source.filename. Don't declare
14723         input_filename or lineno.  Constify filename parameter to feed_input.
14724         * lex.c (init_parse): Constify parameter and return value.
14725         (cp_pragma_interface, cp_pragma_implementation): Constify
14726         filename argument.
14727         (reinit_parse_for_method, reinit_parse_for_block,
14728         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
14729         Constify local char *.
14730         * pt.c: Don't declare lineno or input_filename.
14731         (print_template_context, tsubst_friend_function, tsubst_decl,
14732         tsubst, instantiate_decl): Constify local char *.
14733         * semantics.c (expand_body): Constify local char *.
14734         * tree.c (build_srcloc): Constify filename parameter.
14735         * typeck.c (c_expand_asm_operands): Constify filename
14736         parameter.
14738 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
14740         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
14741         offsetof expansion.
14743 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
14745         * inc/cxxabi.h:  Fix typos in comment.
14746         (__base_class_info::__offset): Use a static_cast.
14748 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
14750         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
14751         of std::size_t and std::ptrdiff_t respectively.
14752         * tinfo.cc: Likewise.
14753         * vec.cc: Likewise.
14755 2000-05-06  Richard Henderson  <rth@cygnus.com>
14757         * typeck.c (build_c_cast): Don't warn integer->pointer size
14758         mismatch for constants.
14760 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
14762         * rtti.c (ptmd_initializer): Set non-public, if class is
14763         incomplete.
14765         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
14766         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14767         __cxa_vec_delete): Likewise.
14768         * tinfo.cc (__dynamic_cast): Likewise.
14769         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14770         __cxa_vec_delete): Likewise.
14772 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14774         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
14775         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
14776         (lang_decl_flags): Add vcall_offset.
14777         (THUNK_VCALL_OFFSET): Use it.
14778         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
14779         * method.c (make_thunk): Create the lang_decl here, not in
14780         emit_thunk.
14781         (emit_thunk): Make generic thunks into ordinary functions once
14782         they have been fed to expand_body.
14783         * semantics.c (expand_body): Set current_function_is_thunk here.
14785 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14787         * class.c (update_vtable_entry_for_fn): Prototype.
14789         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
14790         and `tmpl'.
14792         * search.c (dfs_build_inheritance_graph_order): Prototype.
14794 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14796         * cp-tree.h (special_function_kind): Add various kinds of
14797         destructors.
14798         (special_function_p): New function.
14799         * class.c (overrides): Don't let one kind of destructor override
14800         another.
14801         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
14802         whether or not to instantiate a template.
14803         * tree.c (special_function_p): Define.
14805 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
14807         * cp-tree.def (THUNK_DECL): Remove.
14808         * cp-tree.h (DECL_THUNK_P): New macro.
14809         (DECL_NON_THUNK_FUNCTION_P): Likewise.
14810         (DECL_EXTERN_C_FUNCTION_P): Likewise.
14811         (SET_DECL_THUNK_P): Likewise.
14812         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
14813         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
14814         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
14815         * decl.c (decls_match): Use DECL_EXTERN_C_P.
14816         (duplicate_decls): Likewise.
14817         (pushdecl): Likewise.  Adjust thunk handling.
14818         (grokfndecl): Use DECL_EXTERN_C_P.
14819         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
14820         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
14821         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
14822         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
14823         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
14824         DECL_NO_STATIC_CHAIN.
14825         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
14826         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
14827         * search.c (covariant_return_p): Remove THUNK_DECL handling.
14828         * ir.texi: Update.
14830 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14832         * tree.c (walk_tree): Set lineno.
14834 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14836         * exception.cc: Update license notice.
14837         * new.cc: Likewise.
14838         * new1.cc: Likewise.
14839         * new2.cc: Likewise.
14840         * tinfo.cc: Likewise.
14841         * tinfo2.cc: Likewise.
14842         * vec.cc: Likewise.
14843         * inc/cxxabi.h: Likewise.
14844         * inc/exception: Likewise.
14845         * inc/new: Likewise.
14846         * inc/new.h: Likewise.
14847         * inc/typeinfo: Likewise.
14849 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14851         * tree.c (build_target_expr_with_type): If we already have a
14852         TARGET_EXPR, just return it.
14854         * optimize.c (initialize_inlined_parameters): Don't generate an
14855         EXPR_STMT if we can just use DECL_INITIAL.
14856         * decl.c (emit_local_var): Only make the initialization a
14857         full-expression if stmts_are_full_exprs_p.
14859 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14861         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
14862         macro.
14863         * call.c (standard_conversion): Use it.
14864         (direct_reference_binding): Likewise.
14865         (build_over_call): Likewise.
14866         (is_properly_derived_from): Likewise.
14867         (compare_ics): Likewise.
14868         * class.c (resolves_to_fixed_type_p): Likewise.
14869         * optimize.c (declare_return_variable): Likewise.
14870         * pt.c (is_specialization_of): Likewise.
14871         (unify): Likewise.
14872         * typeck.c (comp_target_parms): Likeiwse.
14873         (build_static_cast): Likewise.
14874         (build_reinterpret_cast): Likewise.
14875         (build_const_cast): Likewise.
14876         (comp_ptr_ttypes_real): Likewise.
14877         (comp_ptr_ttypes_const): Likewise.
14878         * typeck2.c (process_init_constructor): Likewise.
14880 2000-04-30  Scott Snyder <snyder@fnal.gov>
14882         * decl.c (finish_destructor_body): Use the base destructor when
14883         destroying virtual bases.
14885 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
14887         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
14888         STMT_EXPRs.
14889         * optimize.c (struct inline_data): Add target_exprs field.
14890         (declare_return_variable): When a function returns an aggregate,
14891         use the variable declared in the TARGET_EXPR as the remapped
14892         DECL_RESULT.
14893         (expand_call_inline): Update the pending target_exprs stack.
14894         (optimize_function): Initialize the stack.
14896         * decl2.c (finish_file): Fix typo in comment.
14898         * method.c (emit_thunk): Don't try to return a `void' value.
14900         * optimize.c (initialize_inlined_parameters): If the parameter is
14901         addressable, we need to make a new VAR_DECL, even if the
14902         initializer is constant.
14904 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
14906         * decl.c (grok_op_properties): Add an extra check of argtypes.
14908 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
14910         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
14911         variables.
14912         (initialize_inlined_parameters): Try to avoid creating new
14913         VAR_DECLs.
14915 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
14917         * lex.c (my_get_run_time): Remove.
14918         (init_filename_times): Use get_run_time instead of my_get_run_time.
14919         (check_newline): Likewise.
14920         (dump_time_statistics): Likewise.
14921         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
14922         of computing elapsed time explicitly.
14924 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
14926         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
14927         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
14928         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
14929         before calling decl_constant_value.
14930         * class.c (check_bitfield_decl): Likewise.
14931         * cvt.c (ocp_convert): Likewise.
14932         (convert): Likewise.
14933         * decl.c (compute_array_index_type): Likewise.
14934         (build_enumerator): Likewise.
14935         * decl2.c (check_cp_case_value): Likewise.
14936         * pt.c (convert_nontype_argument): Likewise.
14937         (tsubst): Likewise.
14938         * typeck.c (decay_conversion): Likewise.
14939         (build_compound_expr): Likewise.
14940         (build_reinterpret_cast): Likewise.
14941         (build_c_cast): Likewise.
14942         (convert_for_assignment): Likewise.
14944 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
14946         * decl.c (finish_function): Don't play games with DECL_INLINE.
14948 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
14950         * ir.texi: Correct typo.
14952 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14954         * decl.c (grokdeclarator): Reject VLAs as members.
14956 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14958         * call.c (standard_conversion): Accept conversion between
14959         COMPLEX_TYPEs.
14961         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
14963 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
14965         * decl2.c (finish_file): Remove double setup for accounting
14966         compile time.
14968 2000-04-24  Robert Lipe <robertlipe@usa.net>
14970         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
14972 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
14974         * new.cc (set_new_handler): Needs to be in std::.
14976 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
14978         * cp-tree.h (lang_decl): Remove pretty_function_p.
14979         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
14980         language-specific node.
14981         * decl.c (cp_make_fname_decl): Use build_decl, not
14982         build_lang_decl, to build the variables.
14983         (grokvardecl): Don't call build_lang_decl for local variables in
14984         templates.
14985         (grokdeclarator): Don't call build_lang_decl for local type
14986         declarations in templates.
14987         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
14988         zero'd memory, rather than calling memset.
14989         * pt.c: Include hashtab.h.
14990         (local_specializations): New variable.
14991         (retrieve_local_specialization): Use it.
14992         (register_local_specialization): Likewise.
14993         (tsubst_decl): Don't assume local variables have
14994         DECL_LANG_SPECIFIC.
14995         (instantiate_decl): Set up local_specializations.
14996         * Makefile.in (HTAB_H): New variable.
14998 2000-04-23  Richard Henderson  <rth@cygnus.com>
15000         * typeck.c (c_expand_asm_operands): Restore the original
15001         contents of the output list.
15003 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
15005         * ir.texi:  Document complex number representation.
15007 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
15009         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
15010         (target_incomplete_p): New function.
15011         (tinfo_base_init): Create comdat NTBS name variable.
15012         (ptr_initializer): Add non_public parameter. Calculate it.
15013         (ptmd_initializer): Likewise.
15014         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
15015         (create_real_tinfo_var): Add non_public parameter. Use it.
15016         Push proxy into global namespace.
15017         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
15018         New enumeration.
15019         * inc/typeinfo (type_info::before, type_info::operator==):
15020         Compare __name addresses.
15022         * tinfo2.cc: Remove new-abi builtins comment.
15024 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
15026         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
15028         * call.c (joust): Exit early if we get the same function, too.
15030         * decl2.c (key_method): Return NULL_TREE for template classes.
15031         (import_export_class): Don't need to check for template classes.
15033 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
15035         * lex.c: Remove references to cccp.c.
15037 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
15039         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
15040         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
15041         (DECL_DESTRUCTOR_P): Use destructor_attr.
15042         (DECL_CONST_MEMFUNC_P): Reimplement.
15043         (DECL_VOLATILE_MEMFUNC_P): Remove.
15044         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
15045         (overrides): Use DECL_DESTRUCTOR_P.
15046         (check_for_override): Likewise.
15047         * decl.c (start_function): Likewise.
15048         * decl2.c (grokfclassfn): Likewise.
15049         (check_classfn): Likewise.
15050         (grok_function_init): Likewise.
15052 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
15054         * decl2.c (grokfield): Issue error on illegal data member
15055         declaration.
15057 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
15059         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
15061 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
15063         * class.c (build_vtable_entry): Don't build thunks for type-info
15064         functions.
15066 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
15068         * decl.c (decls_match): Allow a redeclaration of a builtin to
15069         specify args while the builtin did not.
15071 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
15073         * cp-tree.def (THUNK_DECL): Add to documentation.
15074         * cp-tree.h (flag_huge_objects): Declare.
15075         * class.c (modify_vtable_entry): Tidy.
15076         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
15077         Calculate delta appropriately for the new ABI.
15078         (dfs_modify_vtables): Use it.
15079         (modify_all_vtables): Fix thinko in code to add overriding copies
15080         of functions to primary vtables.
15081         (build_clone): Fix typo in comment.
15082         (clone_function_decl): Correct order of destructors in vtable.
15083         (build_vbase_offset_vtbl_entries): Adjust comment.
15084         (dfs_vcall_offset_queue_p): Remove.
15085         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
15086         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
15087         (build_vtable_entry): Correct check for pure virtual functions.
15088         Don't declare flag_huge_objects.
15089         * decl.c (flag_huge_objects): Remove declaration.
15090         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
15091         Use int_size_in_bytes.
15092         (emit_thunk): Handle vcall offset thunks.
15094 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15096         * decl2.c (parse_time, varconst_time): Delete declarations.
15097         (finish_file): Delete LINENO declaration.
15098         START_TIME and THIS_TIME now long.
15100 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
15102         * class.c (build_base_field): Reformat comment.
15104         * inc/cxxabi.h (stddef.h): Comment inclusion.
15105         (__base_class_info::__offset): Comment shift.
15107 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
15109         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
15110         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
15111         (cp_push_exception_identifier): New macro.
15112         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
15113         (DECL_BASE_DESTRUCTOR_P): Likewise.
15114         (DECL_DELETING_DESTRUCTOR_P): Likewise.
15115         (get_vtbl_decl_for_binfo): Fix formatting.
15116         (in_charge_arg_for_name): New macro.
15117         (maybe_build_cleanup_and_delete): Remove declaration.
15118         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
15119         (in_charge_arg_for_name): New function.
15120         (build_new_method_call): Use it.  Handle cloned destructors.
15121         (build_clone): Don't make the base constructor virtual.
15122         Automatically defer generated functions.
15123         (clone_function_decl): Handle destructors, too.
15124         (clone_constructors_and_destructors): Likewise.
15125         (create_vtable_ptr): Don't create a vtable entry for a cloned
15126         function.
15127         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
15128         (initialize_predefined_identifiers): Update appropriately.
15129         (finish_destructor_body): Simplify.
15130         (maybe_build_cleanup_and_delete): Remove.
15131         * except.c (expand_throw): Handle new-ABI destructors.
15132         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
15133         (build_dtor_call): New function.
15134         (build_delete): Use it.  Simplify.
15135         * optimize.c (maybe_clone_body): Handle destructors.
15136         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
15138         * exception.cc (cleanup_fn): New typedef.
15139         (CALL_CLEANUP): New macro.
15140         (cp_eh_info): Use them.
15141         (__cp_push_exception): Likewise.
15142         (__cp_pop_exception): Likewise.
15144 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
15146         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
15147         (complete_dtor_identifier): New macro.
15148         (CLASSTYPE_FIRST_CONVERSION): Remove.
15149         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
15150         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
15151         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
15152         (CLASSTYPE_CONSTRUCTORS): Likewise.
15153         (CLASSTYPE_DESTRUCTORS): Likewise.
15154         (lang_decl): Add cloned_function.
15155         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
15156         (DECL_BASE_CONSTRUCTOR_P): Likewise.
15157         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
15158         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
15159         (DECL_CLONED_FUNCTION_P): Likewise.
15160         (DECL_CLONED_FUNCTION): Likewise.
15161         (clone_function_decl): Declare.
15162         (maybe_clone_body): Likewise.
15163         * call.c (build_user_type_conversion_1): Call complete object
15164         constructors in the new ABI.
15165         (build_new_method_call): Don't add in-charge parameters under the
15166         new ABI.
15167         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
15168         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
15169         CLASSTYPE_DESTRUCTOR_SLOT.
15170         (build_clone): New function.
15171         (clone_function_decl): Likewise.
15172         (clone_constructors_and_destructors): Likewise.
15173         (check_bases_and_members): Use it.
15174         * decl.c (iniitialize_predefined_identifiers): Initialize
15175         complete_dtor_identifier.
15176         (finish_function): Don't add extra code to a clone.
15177         (lang_mark_tree): Mark cloned_function.
15178         * decl2.c (mark_used): Don't bother trying to instantiate things
15179         we synthesized.
15180         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
15181         * method.c (set_mangled_name_for_decl): Don't treat clones as
15182         constructors.
15183         (synthesize_method): Sythesize cloned functions, not the clones.
15184         * optimize.c (inline_data): Update comment on ret_label.
15185         (remap_block): Don't assume DECL_INITIAL exists.
15186         (copy_body_r): Allow ret_label to be NULL.
15187         (maybe_clone_body): Define.
15188         * pt.c (tsubst_decl): Handle clones.
15189         (instantiate_clone): New function.
15190         (instantiate_template): Use it.
15191         (set_mangled_name_for_template_decl): Don't treat clones as
15192         constructors.
15193         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
15194         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
15195         * semantics.c (expand_body): Clone function bodies as necessary.
15197         * optimize.c (remap_decl): Avoid sharing structure for arrays
15198         whose size is only known at run-time.
15199         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
15201         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
15202         to has_in_charge_parm_p.
15203         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
15204         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
15205         (DECL_COPY_CONSTRUCTOR_P): New macro.
15206         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
15207         (build_user_type_conversion_1): Likewise.
15208         (convert_like_real): Likewise.
15209         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
15210         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
15211         (copy_args_p): Likewise.
15212         (grok_ctor_properties): Likewise.
15213         (start_function): Likewise.
15214         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
15215         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
15216         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
15217         * method.c (do_build_copy_constructor): Use
15218         DECL_HAS_IN_CHARGE_PARM_P.
15219         (synthesize_method): Likewise.
15220         * pt.c (instantiate_template): Remove goto.
15221         * tree.c (build_cplus_method_type): Remove mention of obstacks in
15222         comment.
15224         * cp-tre.h (finish_function): Change prototype.
15225         * decl.c (end_cleanup_fn): Adjust caller.
15226         (finish_function): Take only one parameter.
15227         * decl2.c (finish_objects): Adjust caller.
15228         (finish_static_storage_duration_function): Likewise.
15229         * method.c (emit_thunk): Likewise.
15230         * parse.y: Likewise.
15231         * parse.c: Regenerated.
15232         * pt.c (instantiate_decl): Likewise.
15233         * rtti.c (synthesize_tinfo_fn): Likewise.
15234         * semantics.c (expand_body): Likewise.
15236         * cp-tree.h (copy_decl): New function.
15237         * class.c (finish_struct_1): Use it.
15238         * lex.c (copy_decl): Define it.
15239         * pt.c (tsubst_decl): Likewise.
15240         * tree.c (copy_template_template_parm): Likewise.
15242         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
15243         has_nonpublic_assign_ref.
15244         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
15245         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
15246         * class.c (finish_struct_methods): Don't set
15247         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
15248         (interface_only): Don't declare.
15249         (interface_unknown): Likewise.
15251 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15253         * tree.h (HAVE_TEMPLATES): Remove definition.
15254         * lang-options.h (-fthis-is-variable): Remove documentation.
15256 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
15258         * class.c (instantiate_type): Handle object-relative template-id.
15260         * semantics.c (finish_expr_stmt): Call convert_to_void here.
15261         * decl.c (cplus_expand_expr_stmt): Not here.
15263         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
15264         Initialize exprtype earlier.
15266         * parse.y (fn.def1): Check for defining types in return types.
15268         * decl.c (check_tag_decl): Notice extra fundamental types.
15269         Diagnose empty decls in classes, too.
15271         * decl.c (grokdeclarator): Don't override an anonymous name if no
15272         declarator was given.
15274         * cvt.c (convert_to_void): Call resolve_offset_ref.
15276         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
15278         * decl2.c (decl_namespace): Handle getting a type.
15280         * typeck.c (build_c_cast): Re-enable warning for cast between
15281         pointer and integer of different size.
15283 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
15285         * inc/cxxabi.h (__pointer_type_info): Add restrict and
15286         incomplete flags.
15287         (__pointer_type_info::__pointer_catch): New virtual function.
15288         (__pointer_to_member_type_info): Derive from
15289         __pointer_type_info. Adjust.
15290         (__pointer_to_member_type_info::__do_catch): Remove.
15291         (__pointer_to_member_type_info::__is_pointer_p): Declare.
15292         (__pointer_to_member_type_info::__pointer_catch): Declare.
15293         * rtti.c (qualifier_flags): Add restrict flag.
15294         (ptmd_initializer): Reorder members.
15295         (create_tinfo_types): Expand comments. Reorder
15296         ptmd_desc_type_node members.
15297         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
15298         Implement.
15299         (__pointer_type_info::__do_catch): Move specific code into
15300         __pointer_catch. Call it.
15301         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
15302         specific catch checking. Fix void conversion check.
15303         (__pointer_to_member_type_info::__do_catch): Remove.
15304         (__pointer_to_member_type_info::__pointer_catch): Implement.
15306 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15308         * lex.c (init_parse): Remove traces of classof and headof.
15309         * decl2.c (flag_operator_names): Default to 1.
15310         (lang_decode_option): Do not set it for -ansi.
15312 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
15314         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
15315         (DECL_MAIN_VARIANT): Remove.
15316         * decl.c (duplicate_decls): Don't set it.
15317         (start_function): Likewise.
15318         (lang_mark_tree): Don't mark it.
15319         * decl2.c (defer_fn): Don't use it.
15320         * lex.c (retrofit_lang_decl): Don't set it.
15321         * pt.c (tsubst_decl): Likewise.
15322         * ptree.c (print_lang_decl): Don't print it.
15323         * typeck.c (mark_addressable): Don't use it.
15325 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15327         * vec.cc: Include <new> and <exception>.
15328         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
15329         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
15330         terminate.
15331         (__cxa_vec_delete): Catch dtor exceptions.
15333 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
15335         Prepend __ to implementation defined names.
15336         * inc/typeinfo (type_info): Rename _name to __name.
15337         (type_info::type_info): Rename parameter.
15338         (type_info::operator==, type_info::operator!=,
15339         type_info::before): Likewise.
15340         (type_info::is_pointer_p, type_info::is_function_p,
15341         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
15342         parameters.
15343         * inc/cxxabi.h
15344         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
15345         (__pointer_type_info::__pointer_type_info): Likewise.
15346         (__pointer_type_info::is_pointer_p,
15347         __pointer_type_info::do_catch): Prepend __. Rename parameters.
15348         (__array_type_info::__array_type_info): Rename parameters.
15349         (__function_type_info::__function_type_info): Likewise.
15350         (__function_type_info::is_function_p): Prepend __.
15351         (__enum_type_info::__enum_type_info): Rename parameters.
15352         (__pointer_to_member_type_info::__pointer_to_member_type_info):
15353         Likewise.
15354         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
15355         parameters.
15356         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
15357         (__class_type_info::__class_type_info): Rename parameters.
15358         (__class_type_info::sub_kind): Prepend __. Adjust member names.
15359         (__class_type_info::upcast_result,
15360         __class_type_info::dyncast_result): Prepend __. Move definition
15361         into tinfo.cc.
15362         (__class_type_info::do_upcast, __class_type_info::do_catch,
15363         __class_type_info::find_public_src,
15364         __class_type_info::do_dyncast,
15365         __class_type_info::do_find_public_src): Prepend __. Rename
15366         parameters.
15367         (__si_class_type_info::__si_class_type_info): Rename parameters.
15368         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
15369         __si_class_type_info::do_find_public_src): Prepent __. Rename
15370         parameters.
15371         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
15372         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
15373         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
15374         parameters.
15375         (__dynamic_cast): Rename parameters.
15376         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
15377         type_info::do_catch, type_info::do_upcast): Prepend __.
15378         (contained_p, public_p, virtual_p, contained_public_p,
15379         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
15380         (__class_type_info::do_catch,
15381         __class_type_info::do_upcast): Prepend __. Adjust.
15382         (__class_type_info::__upcast_result,
15383         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
15384         Adjust.
15385         (__class_type_info::find_public_src): Prepend __. Adjust.
15386         (__class_type_info::do_find_public_src,
15387         __si_class_type_info::do_find_public_src,
15388         __vmi_class_type_info::do_find_public_src): Likewise.
15389         (__class_type_info::do_dyncast,
15390         __si_class_type_info::do_dyncast,
15391         __vmi_class_type_info::do_dyncast): Likewise.
15392         (__class_type_info::do_upcast,
15393         __si_class_type_info::do_upcast,
15394         __vmi_class_type_info::do_upcast): Likewise.
15395         (__dynamic_cast): Adjust.
15396         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
15397         (__function_type_info::is_function_p): Likewise.
15398         (__pointer_type_info::do_catch): Likewise. Adjust.
15399         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
15400         (__throw_type_match_rtti_2): Adjust.
15401         (__is_pointer): Adjust.
15403 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
15405         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
15406         (complete_ctor_identifier): New macro.
15407         (special_function_kind): Add sfk_copy_constructor and
15408         sfk_assignment_operator.
15409         (LOOKUP_HAS_IN_CHARGE): Remove.
15410         (cons_up_default_function): Rename to ...
15411         (implicitly_declare_fn): ... this.
15412         * call.c (build_new_method_call): Add in-charge parameters for
15413         constructors here.
15414         * class.c (add_implicitly_declared_members): Change parameter name
15415         from cant_have_assignment to cant_have_const_assignment.
15416         Replace calls to cons_up_default_function to implicitly_declare_fn.
15417         * cvt.c (ocp_convert): Use complete_ctor_identifier.
15418         * decl.c (initialize_predefined_identifiers): Initialize it.
15419         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
15420         complex expression.
15421         * init.c (expand_default_init): Don't calculate the in-charge
15422         parameter here.
15423         (build_new_1): Likewise.
15424         * lex.c (cons_up_default_function): Move to method.c.
15425         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
15426         (implicitly_declare_fn): New function.
15427         * typeck.c (build_static_cast): Use complete_ctor_identifier.
15428         (build_modify_expr): Likewise.
15429         * typeck2.c (build_functional_cast): Likewise.
15431         Under the new ABI, constructors don't return `this'.
15432         * cp-tree.h (warn_reorder): Declare.
15433         (special_function_kind): New enum.
15434         (global_base_init_list): Remove declaration.
15435         (emit_base_init): Don't return a value.
15436         (check_base_init): Don't declare.
15437         (is_aggr_typedef): Likewise.
15438         * decl.c (check_special_function_return_type): New function.
15439         (return_types): Remove.
15440         (grokdeclarator): Use check_special_function_return_type.
15441         (start_function): Don't initialize ctor_label under the new ABI.
15442         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
15443         * init.c (begin_init_stmts): Move to top of file.
15444         (finish_init_stmts): Likewise.
15445         (warn_reorder): Don't declare.
15446         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
15447         value.
15448         (check_base_init): Remove.
15449         (is_aggr_typedef): Likewise.
15450         (build_new_1): Don't use the return value of a constructor.
15451         * semantics.c (setup_vtbl_ptr): Don't use the return value
15452         of emit_base_init.
15453         * typeck.c (check_return_expr): Don't magically convert return
15454         statements into `return this' in constructors under the new ABI.
15456         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
15457         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
15458         (base_ctor_identifier): New macro.
15459         (base_dtor_identifier): Likewise.
15460         (deleting_dtor_identifier): Likewise.
15461         * decl.c: Don't include obstack.h.
15462         (obstack_chunk_alloc): Don't define.
15463         (obstack_chunk_free): Likewise.
15464         (struct predefined_identifier): New type.
15465         (initialize_predefined_identifiers): New function.
15466         (init_decl_processing): Use it.
15467         (debug_temp_inits): Remove.
15468         (start_method): Don't call preserve_data.
15469         (hack_incomplete_structures): Update comment.
15470         * init.c (init_init_processing): Don't initialize
15471         nelts_identifier.
15472         (build_offset_rf): Remove dead code.
15473         (build_delete): Use CLASSTYPE_N_BASECLASSES.
15474         * search.c (init_search_processing): Don't initialize
15475         vptr_identifier.
15477 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15479         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
15480         some sign_compare warnings.
15482 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15484         Rename abi::__vmi_class_type_info members.
15485         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
15486         base_list, detail_masks members to vmi_flags, vmi_base_count,
15487         vmi_bases and vmi_flags_masks respectively.
15488         (__vmi_class_type_info::vmi_flags_masks): Rename
15489         details_unknown_mask to flags_unknown_mask.
15490         * tinfo.cc (__class_type_info::do_upcast): Adjust.
15491         (__vmi_class_type_info::do_find_public_src): Adjust.
15492         (__vmi_class_type_info::do_dyncast): Adjust.
15493         (__vmi_class_type_info::do_upcast): Adjust.
15495 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15497         * tinfo.cc (convert_to_base): New function.
15498         (get_vbase_offset): Remove. Move into convert_to_base.
15499         (__vmi_class_type_info::do_find_public_src): Adjust.
15500         (__vmi_class_type_info::do_dyncast): Adjust.
15501         (__vmi_class_type_info::do_upcast): Adjust.
15503 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
15505         * tinfo.cc (operator=): Use __builtin_strcmp.
15506         * tinfo2.cc (before): Likewise.
15508 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
15510         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
15511         (DECL_SAVED_INLINE): Rename to ...
15512         (DECL_DEFERRED_FN): ... this.
15513         (in_function_p): Remove declaration.
15514         (mark_inline_for_output): Rename to ...
15515         (defer_fn): ... this.
15516         * decl.c (finish_function): Adjust call to mark_inline_for_output.
15517         (in_function_p): Remove definition.
15518         * decl2.c (saved_inlines): Rename to ...
15519         (deferred_fns): ... this.
15520         (saved_inlines_used): Rename to ...
15521         (deferred_fns_used): ... this.
15522         (mark_inline_for_output): Rename to ...
15523         (defer_fn): ... this.
15524         (finish_file): Adjust accordingly.
15525         (init_decl2): Likewise.
15526         * lex.c (cons_up_default_function): Likewise.
15527         * pt.c (mark_decl_instantiated): Likewise.
15528         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
15529         circumstances.
15530         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
15531         * semantics.c (expand_body): Defer more functions.
15533 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15535         * vec.cc: New file.
15536         * Make-lang.in (CXX_LIB2FUNCS): Add it.
15537         (vec.o): Build it.
15538         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15539         __cxa_vec_delete): Declare.
15541 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15543         * rtti.c (dfs_class_hint_mark): New static function.
15544         (dfs_class_hint_unmark): New static function.
15545         (class_hint_flags): Use them.
15547 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
15549         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
15551 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
15553         * cp-tree.h (instantiate_decl): Change prototype.
15554         * decl2.c (mark_used): Adjust call.
15555         * optimize.c (inlinable_function_p): Adjust handling of templates.
15556         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
15557         (do_type_instantiation): Likewise.
15558         (instantiate_decl): Defer more templates.
15559         (instantiate_pending_templates): Adjust logic to handle inline
15560         friend functions.
15562         * Makefile.in (GGC_H): New variable.  Use it throughout in place
15563         of ggc.h.
15565         * call.c: Don't include obstack.h.  Include ggc.h.
15566         (obstack_chunk_alloc): Don't define.
15567         (obstack_chunk_free): Likewise.
15568         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
15569         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
15570         (pop_switch): Free it.
15572         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
15574         * dump.c (dequeue_and_dump): Don't try to print the bit_position
15575         if we don't have a DECL_FIELD_OFFSET.
15577 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
15579         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
15580         special_function_p.
15582 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15584         * cfns.gperf (hash, libc_name_p): Prototype.
15586         * rtti.c (build_dynamic_cast_1): Constification.
15588         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
15590         * semantics.c (deferred_type_access_control): Prototype.
15592 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
15594         Correct many new ABI issues regarding vbase and vcall offset
15595         layout.
15596         * cp-tree.h (BINFO_VTABLE): Document.
15597         (struct lang_type): Tweak formatting.
15598         (BINFO_PRIMARY_BINFO): Add to documentation.
15599         (CLASSTYPE_VSIZE): Fix typo in comment.
15600         (CLASSTYPE_VBASECLASSES): Update documentation.
15601         (BINFO_VBASE_MARKED): Remove.
15602         (SET_BINFO_VBASE_MARKED): Likewise.
15603         (CLEAR_BINFO_VBASE_MARKED): Likewise.
15604         (BINFO_FIELDS_MARKED): Remove.
15605         (SET_BINFO_FIELDS_MARKED): Likewise.
15606         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
15607         (enum access_kind): New enumeration.
15608         (num_extra_vtbl_entries): Remove declaration.
15609         (size_extra_vtbl_entries): Likewise.
15610         (get_vtbl_decl_for_binfo): New function.
15611         (dfs_vbase_unmark): Remove declaration.
15612         (mark_primary_bases): Likewise.
15613         * class.c (SAME_FN): Remove.
15614         (struct vcall_offset_data_s): Move definition.
15615         (build_vbase_pointer): Use `build', not `build_binary_op', to
15616         access the vbase pointer under the new ABI.
15617         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
15618         (build_primary_vtable): Likewise.
15619         (dfs_mark_primary_bases): Move here from search.c.
15620         (mark_primary_bases): Likewise.
15621         (determine_primary_bases): Under the new ABI, don't make a base
15622         class a primary base just because we don't yet have any virtual
15623         functions.
15624         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
15625         (num_vfun_entries): Remove.
15626         (dfs_count_virtuals): Likewise.
15627         (num_extra_vtbl_entries): Likewise.
15628         (size_extra_vtbl_entries): Likewise.
15629         (layout_virtual_bases): Iterate in inheritance graph order under
15630         the new ABI.
15631         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
15632         indicate that a vfield is present.
15633         (init_class_processing): Initialize access_public_node, etc., from
15634         ak_public, etc.
15635         (get_vtbl_decl_for_binfo): New function.
15636         (dump_class_hierarchy_r): Likewise.
15637         (dump_class_hierarchy): Use it.
15638         (finish_vtbls): Build the vtbls in inheritance graph order.
15639         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15640         (initialize_vtable): Use get_vtbl_decl_for_binfo.
15641         (accumulate_vtbl_inits): Add comments explaining why a pre-order
15642         walk is required.
15643         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
15644         where the vptr points, even for primary vtables.
15645         (build_vtbl_initializer): Adjust handling of vbase and vcall
15646         offsets.
15647         (build_vcall_and_vbase_vtable_entries): New function.
15648         (dfs_build_vbase_offset_vtbl_entries): Remove.
15649         (build_vbase_offset_vtbl_entries): Reimplement.
15650         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
15651         were already handled in a primary base class vtable.
15652         (build_vcall_offset_vtbl_entries): Adjust.
15653         (build_rtti_vtbl_entries): Adjust.
15654         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
15655         * init.c (expand_virtual_init): Simplify.
15656         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
15657         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
15658         * search.c (BINFO_ACCESS): New macro.
15659         (SET_BINFO_ACCESS): Likewise.
15660         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
15661         (access_in_type): Likewise.
15662         (dfs_accessible_p): Likewise.
15663         (protected_accessible_p): Likewise.
15664         (lookup_fnfields_1): Adjust documentation.
15665         (dfs_mark_primary_bases): Move to class.c
15666         (mark_primary_bases): Likewise.
15667         (dfs_vbase_unmark): Remove.
15668         (virtual_context): Use BINFO_FOR_VBASE.
15669         (dfs_get_vbase_types): Simplify.
15670         (dfs_build_inheritance_graph_order): New function.
15671         (get_vbase_types): Use it.
15672         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
15674         * tinfo.cc (get_vbase_offset): New function.
15675         (__vmi_class_type_info::do_find_public_src): Use it.
15676         (__vmi_class_type_info::do_dyncast): Likewise.
15677         (__vmi_class_type_info::do_upcast): Likewise.
15679 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
15681         * lang-specs.h: Pass -fno-show-column to the preprocessor.
15683 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
15685         * rtti.c (class_hint_flags): Rename flags.
15686         (class_initializer): Remove flags.
15687         (synthesize_tinfo_var): Combine offset and flags. Add flags
15688         for __vmi_class_type_info.
15689         (create_tinfo_types): Remove flags from __class_type_info and
15690         __si_class_type_info. Merge flags and offset from
15691         base_class_type_info.
15692         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
15693         (__base_class_info::is_virtual_p): Adjust.
15694         (__base_class_info::is_public_p): Adjust.
15695         (__base_class_info::offset): New accessor.
15696         (__class_type_info::details): Remove member.
15697         (__class_type_info::__class_type_info): Lose details.
15698         (__class_type_info::detail_masks): Remove.
15699         (__si_class_type_info::__si_class_type_info): Lose details.
15700         (__vmi_class_type_info::details): New member.
15701         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
15702         (__vmi_class_type_info::detail_masks): New member.
15703         * tinfo.cc (__class_type_info::do_upcast): Initialize result
15704         with unknown_details_mask.
15705         (__vmi_class_type_info::do_find_public_src): Adjust
15706         (__vmi_class_type_info::do_dyncast): Adjust.
15707         (__vmi_class_type_info::do_upcast): Set result details, if
15708         needed. Adjust.
15709         (__dynamic_cast): Temporarily #if out optimization.
15711 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
15713         * rtti.c (get_tinfo_decl): Mark used.
15714         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
15715         mark as dealt with, if we output it.
15717 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15719         * class.c: Reorganize to put virtual function table initialization
15720         machinery at the end of the file.
15722 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
15724         * class.c (finish_struct): Use bitsize_zero_node.
15725         * pt.c (instantiate_class_template): Likewise.
15727 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15729         Put RTTI entries at negative offsets in new ABI.
15730         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
15731         vbase offset at index -3, not -1.
15732         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
15733         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
15734         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
15735         (build_rtti_vtbl_entries): New function.
15736         (set_rtti_entry): Remove.
15737         (build_primary_vtable): Don't use it.
15738         (build_secondary_vtable): Likewise.
15739         (start_vtable): Remove.
15740         (first_vfun_index): New function.
15741         (set_vindex): Likewise.
15742         (add_virtual_function): Don't call start_vtable.  Do call
15743         set_vindex.
15744         (set_primary_base): Rename parameter.
15745         (determine_primary_base): Likewise.
15746         (num_vfun_entries): Don't use skip_rtti_stuff.
15747         (num_extra_vtbl_entries): Include RTTI information.
15748         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
15749         (skip_rtti_stuff): Remove.
15750         (dfs_modify_vtables): Don't use it.
15751         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
15752         (layout_nonempty_base_or_field): Update size handling.
15753         (create_vtable_ptr): Tweak.
15754         (layout_class_type): Adjust parameter names.
15755         (finish_struct_1): Simplify.
15756         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
15757         (skip_rtti_stuff): Remove.
15758         (first_vfun_index): New function.
15759         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15760         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
15761         (marked_vtable_pathp): Declare.
15762         (unmarked_vtable_pathp): Likewise.
15763         * error.c (dump_expr): Use first_vfun_index to calculate vtable
15764         offsets.
15765         * rtti.c (build_headof): Look for RTTI at negative offsets.
15766         (get_tinfo_decl_dynamic): Likewise.
15767         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
15768         here.
15769         (create_pseudo_type_info): Do it here instead.  Adjust so that
15770         vptr points at first virtual function.
15771         * search.c (marked_vtable_pathp): Make it global.
15772         (unmarked_vtable_pathp): Likewise.
15773         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15774         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15775         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
15776         (get_pure_virtuals): Likewise.
15777         (expand_upcast_fixups): Likewise.
15778         * tree.c (debug_binfo): Likewise.
15779         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
15780         negative offset.
15782 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15784         * class.c (check_field_decl): Fix typo.
15785         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
15786         (check_methods): Likewise.
15787         (check_field_decls): Likewise.
15788         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
15789         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
15790         Use DECL_RESULT_FLD, not DECL_RESULT.
15791         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
15792         * lex.c (identifier_type): Likewise.
15793         * pt.c (determine_specialization, lookup_template_class): Likewise.
15794         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
15795         (resolve_overloaded_unification, more_specialized): Likewise.
15796         * semantics.c (finish_member_declaration): Likewise.
15797         * typeck.c (build_x_function_call): Likewise.
15799 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
15801         * class.c (layout_empty_base): Handle empty bases with non-byte
15802         alignment.
15803         (build_base_field): Likewise.
15804         (layout_virtual_bases): Likewise.
15806         * class.c (finish_struct_1): Fix typo in this change:
15808         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15810 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
15812         * decl.c (grokdeclarator): Count partial specializations when
15813         keeping track of how many template classes have been seen.
15815         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
15817 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15819         * class.c (build_vbase_pointer_fields): layout_field now place_field.
15820         (get_vfield_offset): Use byte_position.
15821         (set_rtti_entry): Set OFFSET to ssizetype zero.
15822         (get_binfo_offset_as_int): Deleted.
15823         (dfs_record_base_offsets): Use tree_low_cst.
15824         (dfs_search_base_offsets): Likewise.
15825         (layout_nonempty_base_or_field): Reflect changes in RLI format
15826         and call byte_position.
15827         (layout_empty_base): Convert offset to ssizetype.
15828         (build_base_field): use rli_size_unit_so_far.
15829         (dfs_propagate_binfo_offsets): Do computation in proper type.
15830         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
15831         (layout_class_type): Reflect changes in RLI names and fields.
15832         (finish_struct_1): Set DECL_FIELD_OFFSET.
15833         * dump.c (dequeue_and_dump): Call bit_position.
15834         * expr.c (cplus_expand_constant): Use byte_position.
15835         * rtti.c (expand_class_desc): Use bitsize_one_node.
15836         * typeck.c (build_component_addr): Use byte_position and don't
15837         special case for zero offset.
15839 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
15841         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
15843         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
15844         tinfo object.
15845         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
15846         vtable.
15848 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15850         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
15851         DECL_P macros.
15852         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
15853         make_typename_type, check_initializer, cp_finish_decl,
15854         xref_tag): Likewise.
15855         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
15856         decl_namespace, arg_assoc_template_arg, arg_assoc,
15857         validate_nonmember_using_decl, do_class_using_decl): Likewise.
15858         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
15859         args_to_string): Likewise.
15860         * friend.c (is_friend): Likewise.
15861         * lex.c (note_got_semicolon, note_list_got_semicolon,
15862         is_global): Likewise.
15863         * method.c (build_overload_nested_name, build_overload_value,
15864         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
15865         * parse.y (typename_sub, typename_sub1): Likewise.
15866         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
15867         process_partial_specialization, convert_template_argument,
15868         template_args_equal, add_pending_template, lookup_template_class,
15869         for_each_template_parm_r, maybe_fold_nontype_arg,
15870         tsubst, instantiate_template, type_unification_real, unify,
15871         instantiate_pending_templates, set_mangled_name_for_template_decl):
15872         Likewise.
15873         * repo.c (repo_get_id, repo_template_used): Likewise.
15874         * search.c (lookup_field_1): Likewise.
15875         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
15876         * xref.c (classname): Likewise.
15878 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
15880         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
15881         (CANONICAL_BINFO): New macro.
15882         (BINFO_NEW_VTABLE_MARKED): Use it.
15883         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
15884         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
15885         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
15886         not TREE_TYPE.
15887         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15888         (build_secondary_vtable): Likewise.
15889         (dfs_finish_vtbls): Likewise.
15890         (dfs_accumulate_vtbl_inits): Likewise.
15891         (accumulate_vtbl_inits): New function.
15892         (finish_vtbls): Make sure that virtual bases come after
15893         non-virtual bases in the vtable group.
15894         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
15895         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15896         * search.c (struct vbase_info): Move definition.
15897         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15898         (unmarked_new_vtable_p): Likewise.
15899         (dfs_mark_vtable_path): Remove.
15900         (dfs_mark_new_vtable): Remove.
15901         (dfs_unmark_new_vtable): Likewise.
15902         (dfs_clear_search_slot): Likewise.
15903         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
15904         (dfs_clear_vbase_slots): Likewise.
15905         (init_vbase_pointers): LIkewise.
15907 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
15909         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
15910         SIZETYPE to a non-SIZETYPE.
15912 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
15914         * class.c (layout_virtual_bases): Adjust names in conditionally
15915         compiled code.
15917         * class.c (record_base_offsets): New function.
15918         (layout_conflict_p): Likewise.
15919         (layout_nonempty_base_or_field): Use it.
15920         (layout_empty_base): New function.
15921         (build_base_field): Use it.
15922         (build_base_fields): Update comment.
15923         (layout_virtual_bases): Fold in a little code form
15924         layout_basetypes.  Use layout_empty_base.
15925         (layout_basetypes): Remove.
15926         (end_of_class): New function.
15927         (layout_class_type): Use it.  Adjust.
15929         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
15930         (fntype_p): Remove.
15931         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
15932         comment.
15933         (dfs_skip_nonprimary_vbases_markedp): Likewise.
15934         * typeck.c (fntype_p): Remove.
15936         * cp-tree.h (TI_SPEC_INFO): Remove.
15937         (CLASSTYPE_TI_SPEC_INFO): Likewise.
15938         * pt.c (process_partial_specialization): Likewise.
15940         * class.c (build_base_field): Fix thinko in computation of binfo
15941         offsets.
15943         * tree.c (mark_local_for_remap_p): Mark variables declared in
15944         TARGET_EXPRs as well.
15946 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15948         * typeck.c (require_complete_type, complete_type,
15949         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
15950         build_array_ref, convert_arguments, pointer_diff,
15951         build_x_unary_op, build_unary_op, build_c_cast,
15952         build_modify_expr): Use COMPLETE_TYPE_P etc.
15953         * call.c (is_complete, convert_like_real,
15954         build_new_method_call): Likewise.
15955         * class.c (build_vbase_pointer_fields, check_bases,
15956         build_base_field, finish_struct_1, pushclass): Likewise.
15957         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
15958         * decl.c (maybe_process_template_type_declaration, pushtag,
15959         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
15960         layout_var_decl, check_initializer, cp_finish_decl,
15961         grokdeclarator, require_complete_types_for_parms,
15962         grok_op_properties, xref_tag, xref_basetypes,
15963         check_function_type): Likewise.
15964         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
15965         * friend.c (do_friend): Likewise.
15966         * init.c (build_offset_ref): Likewise.
15967         * parse.y (structsp): Likewise.
15968         * pt.c (maybe_process_partial_specialization,
15969         tsubst_friend_function, instantiate_class_template, tsubst,
15970         do_type_instantiation, instantiate_pending_templates): Likewise.
15971         * repo.c (repo_get_id): Likewise.
15972         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
15973         synthesize_tinfo_var, emit_support_tinfos): Likewise.
15974         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
15975         * semantics.c (begin_class_definition): Likewise.
15976         * tree.c (build_cplus_method_type): Likewise.
15977         * typeck2.c (digest_init, build_functional_cast,
15978         add_exception_specifier): Likewise.
15979         * parse.h, parse.c: Regenerated.
15981 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15983         * inc/cxxabi.h: New header file. Define new-abi entry points.
15984         (__pointer_type_info::target): Rename member to ...
15985         (__pointer_type_info::type): ... here.
15986         (__base_class_info::type): Rename member to ...
15987         (__base_class_info::base): ... here.
15988         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
15989         * cp-tree.h (CPTI_ABI): New global tree enumeration.
15990         (abi_node): New global tree node.
15991         * decl.c (abi_node): Document.
15992         (init_decl_processing): Initialize abi_node.
15993         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
15994         (get_vmi_pseudo_type_info): Likewise.
15995         (create_tinfo_types): Likewise.
15996         (emit_support_tinfos): Likewise.
15997         * tinfo.h (cxxabi.h): Include for new-abi.
15998         Move rtti class definitions to new header file.
15999         * tinfo.cc (abi): Use the namespace.
16000         (std): Move new abi rtti classes from here ...
16001         (__cxxabiv1): ... to here.
16002         * tinfo2.cc (cxxabi.h): Include for new-abi.
16003         Move rtti class definitions to new header file.
16004         (std): Move new abi rtti classes from here ...
16005         (__cxxabiv1): ... to here.
16006         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
16007         namespace.
16009 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
16010             Jason Merrill  <jason@casey.cygnus.com>
16012         * method.c (build_overload_int): Use host_integerp.
16014 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16016         * init.c (build_offset_ref): Handle the case of a templated member
16017         function.
16019 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16021         * except.c (expand_exception_blocks): Clear catch_clauses_last.
16023 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
16025         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
16026         * class.c (check_bitfield_decl): Turn illegal bitfields into
16027         non-bitfields.
16028         (dfs_propagate_binfo_offsets): Adjust for new size_binop
16029         semantics.
16030         (dfs_offset_for_unshared_vbases): Likewise.
16031         * cvt.c (cp_convert_to_pointer): Convert NULL to a
16032         pointer-to-member correctly under the new ABI.
16033         * expr.c (cplus_expand_constant): Don't use cp_convert when
16034         turning an offset into a pointer-to-member.
16035         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
16036         when dereferencing them under the new ABI.
16037         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
16038         of pointers-to-members under the new ABI.
16040         * class.c (check_bitfield_decl): Remove restriction on really long
16041         bitfields.
16042         (layout_class_type): Implement new ABI handling of bitfields
16043         longer than their types.
16045 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16047         * parse.y (extdefs): Call ggc_collect.
16048         * parse.c: Regenerated.
16050 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
16052         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
16053         (note_name_declared_in_class): Use OVL_CURRENT to get at a
16054         potential overload.
16056 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16058         * class.c (build_vbase_path): Use integer_zerop.
16059         (build_vtable_entry): Use tree_low_cst.
16060         (get_vfield_offset): Use bit_position.
16061         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
16062         Use tree_low_cst.
16063         (check_bitfield_decl): Set DECL_SIZE using convert.
16064         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
16065         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
16066         Use tree_low_cst.
16067         (finish_struct_1): Use bit_position.
16068         (dump_class_hierarchy): Use tree_low_cst.
16069         * cp-tree.h (min_precision): Add declaration.
16070         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
16071         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
16072         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
16073         * expr.c (cplus_expand_constant): Use bit_position.
16074         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
16075         * rtti.c (get_base_offset): Use bit_position.
16076         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
16077         host_integerp, and tree_low_cst.
16078         (pointer_int_sum): Use integer_zerop.
16079         (build_component_addr): Use bit_position.
16081 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
16083         * typeck.c (require_complete_type): Don't assume size_zero_node.
16084         (complete_type_or_else): Likewise.
16086 2000-03-16  Steven Grady <grady@digitaldeck.com>
16087             Jason Merrill  <jason@casey.cygnus.com>
16089         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
16091 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
16093         * decl2.c (grokfield): Bail out if type is error_mark_node.
16095 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16097         * tinfo2.cc (__ptr_to_member_data): Rename to ...
16098         (__pointer_to_member_data): ... here. Adjust.
16099         * rtti.c (create_tinfo_types): Adjust.
16101 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16103         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
16104         * decl.c (ref_desc_type_node): Undocument.
16105         * rtti.c (ptr_ref_initializer): Rename to ...
16106         (ptr_initializer): ... here. Adjust comments.
16107         (ptmd_initializer): Fix comment thinko.
16108         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
16109         (create_tinfo_types): Remove ref_desc_type_node init.
16110         * tinfo2.cc (__reference_type_info): Remove.
16112 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
16114         * decl.c (cp_finish_decl): Remove obsolete comment.
16116         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
16118 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
16120         * cp-tree.h: Tweak documentation.
16121         * class.c (build_vbase_pointer_fields): Layout the fields, too.
16122         (avoid_overlap): Remove.
16123         (get_binfo_offset_as_int): New function.
16124         (dfs_serach_base_offsets): Likewise.
16125         (layout_nonempty_base_or_field): Likewise.
16126         (build_base_field): Layout fields here.  Avoid placing two objects
16127         of the same type at the same address, under the new ABI.
16128         (build_base_fields): Adjust accordingly.
16129         (create_vtable_ptr): Return the new field, but don't attach it to
16130         TYPE_FIELDS.
16131         (remove_base_field): Remove.
16132         (remove_base_fields): Remove.
16133         (layout_basetypes): Adjust accordingly.
16134         (layout_class_type): Call layout_field for each field, rather than
16135         just making a wholesale call to layout_type.
16137 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
16139         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
16141 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
16143         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
16145         * except.c (dtor_nothrow): New fn.
16146         (do_pop_exception): Use it.  Take type parm.
16147         (push_eh_cleanup): Take type parm.
16148         (expand_start_catch_block): Pass it.
16149         (build_eh_type_type_ref): Accept null type.
16151 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
16153         * cp-tree.h (revert_static_member_fn): Change prototype.
16154         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
16155         (grok_op_properties): Likewise.
16156         (start_function): Likewise.
16157         (revert_static_member_fn): Simplify.
16158         * pt.c (check_explicit_specialization): Adjust call to
16159         revert_static_member_fn.
16161 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
16163         * cp-tree.h (scope_kind): New type.
16164         (tmpl_spec_kind): Likewise.
16165         (declare_pseudo_global_level): Remove.
16166         (pseudo_global_level_p): Rename to template_parm_scope_p.
16167         (pushlevel): Remove declaration.
16168         (begin_scope): New function.
16169         (finish_scope): Likewise.
16170         (current_tmpl_spec_kind): Likewise.
16171         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
16172         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
16173         Add template_spec_p.
16174         (toplevel_bindings_p): Adjust.
16175         (declare_pseudo_global_level): Remove.
16176         (pseudo_global_level_p): Rename to template_parm_scope_p.
16177         (current_tmpl_spec_kind): New function.
16178         (begin_scope): Likewise.
16179         (finish_scope): Likewise.
16180         (maybe_push_to_top_level): Adjust.
16181         (maybe_process_template_type_declaration): Likewise.
16182         (pushtag): Likewise.
16183         (pushdecl_nonclass_level): Likewise.
16184         (lookup_tag): Likewise.
16185         (grokfndecl): Handle member template specializations.  Share
16186         constructor and non-constructor code.
16187         * decl2.c (check_classfn): Handle member template specializations.
16188         * pt.c (begin_template_parm_list): Use begin_scope.
16189         (begin_specialization): Likewise.
16190         (end_specialization): Likewise.
16191         (check_explicit_specialization): Use current_tmpl_spec_kind.
16192         Handle member template specializations.
16193         (end_template_decl): Use finish_scope.  Remove call to
16194         get_pending_sizes.
16195         (push_template_decl_real): Remove bogus error message.
16196         (tsubst_decl): Fix typo in code contained in comment.
16197         (instantiate_template): Handle member template specializations.
16198         (most_general_template): Likewise.
16200 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
16202         * lex.c (whitespace_cr): Compress consecutive calls to warning().
16203         (do_identifier): Ditto for error().
16205         * pt.c (convert_nontype_argument): Ditto for cp_error().
16206         (convert_template_argument): Ditto for cp_pedwarn().
16208 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
16210         * exception.cc (__check_null_eh_spec): New fn.
16211         * except.c (expand_end_eh_spec): Call it if the spec is throw().
16213 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16215         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
16216         * except.c (expand_end_eh_spec): Add the return type.
16217         * rtti.c (throw_bad_cast): Add the parmtypes.
16218         (throw_bad_typeid): Likewise.
16220         * semantics.c (expand_stmt): Only leave out rtl for unused
16221         artificials, and set DECL_IGNORED_P on them as well.
16222         * decl.c (wrapup_globals_for_namespace): Likewise.
16224 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
16226         * decl.c (maybe_commonize_var): Skip all artificial decls.
16227         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
16229 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
16231         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
16232         * cp-tree.h: Declare flag_enforce_eh_specs.
16233         * decl.c (store_parm_decls, finish_function): Check it.
16235         C library functions don't throw.
16236         * Makefile.in (cfns.h): New target.
16237         (except.o): Depend on it.
16238         * Make-lang.in (cc1plus): Depend on cfns.gperf.
16239         * cfns.gperf: New file.
16240         * cfns.h: Generated.
16241         * except.c: Include it.
16242         (nothrow_libfn_p): New fn.
16243         * decl.c (grokfndecl): Use it.
16244         * cp-tree.h: Declare it.
16246         * decl.c (push_overloaded_decl_1, auto_function,
16247         define_function): Lose.
16248         (build_library_fn_1): New static fn.
16249         (builtin_function): Use it.
16250         (get_atexit_node): Use build_library_fn_ptr.
16251         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
16252         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
16253         push_void_library_fn, push_throw_library_fn): New fns.
16254         * cp-tree.h: Declare them.
16255         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
16256         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
16257         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
16258         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
16259         * rtti.c (build_runtime_decl): Lose.
16260         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
16261         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
16262         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
16264         * call.c (build_call): Remove result_type parm.
16265         Call mark_used on unused artificial fns.
16266         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
16268 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
16270         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
16271         appropriate.
16272         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
16273         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
16274         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
16275         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
16276         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
16277         expand_generic_desc): Likewise.
16279 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16281         * exception.cc (__cp_pop_exception): Cleanup the original object.
16283 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16285         * decl.c (grok_op_properties): Merge conversion to void warning
16286         with other silly op warnings.
16288 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
16290         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
16291         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
16293 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16295         * decl.c (cp_make_fname_decl): New function.
16296         (wrapup_globals_for_namespace): Don't emit unused static vars.
16297         (init_decl_processing): Remove comment about use of
16298         array_domain_type. Set make_fname_decl.
16299         (cp_finish_decl): Remove __FUNCTION__ nadgering.
16300         * semantics.c (begin_compound_stmt): Remove
16301         current_function_name_declared flagging.
16302         (expand_stmt): Don't emit unused local statics.
16303         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
16304         specially.
16306 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
16308         * typeck.c (convert_for_assignment): Don't look at array
16309         initializer.
16310         * call.c (convert_like_real): Likewise.
16312 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
16314         Add initial support for '\uNNNN' specifier.
16315         * lex.c (read_ucs): New fn.
16316         (readescape, skip_white_space): Call it.
16317         (is_extended_char, is_extended_char_1): New fns.
16318         (utf8_extend_token): New fn, #if 0'd out.
16319         (real_yylex): Treat extended chars like letters.
16321         * search.c (note_debug_info_needed): Walk the bases even if we
16322         weren't deferring the type itself.
16324 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16326         * decl2.c (finish_objects): Constify a char*.
16328         * method.c (emit_thunk): Likewise.
16330 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
16332         * typeck.c (dubious_conversion_warnings): Look through
16333         REFERENCE_TYPE.
16335 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16337         * class.c (dfs_modify_vtables): I is now unsigned.
16338         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
16339         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
16340         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
16341         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
16342         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
16343         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
16344         Call integer_all_onesp.
16345         * typeck2.c (process_init_constructor): Use compare_tree_int.
16347         * lang-specs.h (as): Don't call if -syntax-only.
16349 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
16351         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
16352         RTL_EXPR_HAS_NO_SCOPE after all.
16354 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
16356         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
16357         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
16358         RTL_EXPR_HAS_NO_SCOPE.
16360         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
16361         later.
16363         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
16365 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
16367         * call.c (convert_like): Macrofy.
16368         (convert_like_with_context): New macro.
16369         (convert_like_real): Renamed from convert_like.  Add calling
16370         context parameters, for diagnostics. Add recursive flag.  Call
16371         dubious_conversion_warnings for outer conversion.
16372         (build_user_type_conversion): Use convert_like_with_context.
16373         (build_over_call): Likewise. Don't warn about dubious
16374         conversions here. Adjust convert_default_arg calls.
16375         (convert_default_arg): Add context parameters for diagnostics.
16376         Pass through to convert_like_with_context.
16377         * cp-tree.h (convert_default_arg): Add context parameters.
16378         (dubious_conversion_warnings): Prototype new function.
16379         * typeck.c (convert_arguments): Adjust convert_default_arg call.
16380         (dubious_conversion_warnings): New function, broken
16381         out of convert_for_assignment.
16382         (convert_for_assignment): Adjust.
16384 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
16386         * decl2.c (key_method): Break out from...
16387         (import_export_vtable, import_export_class): ...here.
16389         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
16390         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
16392         * search.c (note_debug_info_needed, dfs_debug_mark,
16393         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
16394         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
16396 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
16398         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
16399         typos.
16401 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
16403         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
16404         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
16405         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
16406         (lang_type): Split gets_new into has_new and has_array_new.
16407         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16408         (TYPE_GETS_NEW): Split into ...
16409         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
16410         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
16411         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
16412         (build_op_new_call): Don't declare.
16413         (build_new_1): Likewise.
16414         * call.c (build_op_new_call): Remove.
16415         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16416         instead of TYPE_NEEDS_DESTRUCTOR.
16417         (finish_struct_bits): Likewise.
16418         (add_implicitly_declared_members): Likewise.
16419         (check_field_decl): Likewise.
16420         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
16421         correctly under the new ABI.
16422         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
16423         instead of TYPE_NEEDS_DESTRUCTOR.
16424         (initialize_local_var): Likewise.
16425         (destroy_local_var): Likewise.
16426         (cp_finish_decl): Likewise.
16427         (register_dtor_fn): Likewise.
16428         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
16429         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
16430         TYPE_VEC_DELETE_TAKES_SIZE here.
16431         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
16432         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
16433         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16434         (finish_destructor_body): Likewise.
16435         (maybe_build_cleanup_1): Likewise.
16436         * decl2.c (do_static_destruction): Likewise.
16437         * init.c (build_new_1): Make it static.
16438         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16439         (expand_cleanup_for_base): Likewise.
16440         (get_cookie_size): New function.
16441         (build_new_1): Handle array-new cookies correctly under the new
16442         ABI.
16443         (build_vec_delete_1): Likewise.
16444         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16445         (build_delete): Likewise.
16446         (build_vec_delete): Handle array-new cookies correctly under the new
16447         ABI.
16448         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16449         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
16450         TYPE_HAS_ARRAY_NEW_OPERATOR.
16451         * ptree.c (print_lang_type): Check them.
16452         * search.c (context_for_name_lookup): Fix typo in comment.
16453         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
16454         * tree.c (break_out_cleanups): Likewise.
16455         (build_cplus_array_test_1): Likewise.
16456         (cp_build_qualified_type_real): Likewise.
16457         * typeck.c (complete_type): Likewise.
16459         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
16460         the command-line, not the end.
16462 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
16464         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
16466 2000-03-02  Tom Tromey  <tromey@cygnus.com>
16468         * cp-tree.h (build_java_class_ref): Declare.
16469         * init.c (build_java_class_ref): No longer static.
16470         * except.c (expand_throw): Generate a Java-style `throw' if the
16471         thrown object is a "Java" object.
16472         (initialize_handler_parm): Generate a Java-style lookup of
16473         exception info if the caught object is a "Java" object.
16474         (catch_language, catch_language_init): New globals.
16475         (decl_is_java_type): New function.
16476         (expand_start_catch_block): Don't call push_eh_info() or
16477         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
16478         class reference to build_catch_block.
16480 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16482         * typeck.c (comptypes): Treat sizetype like its language equivalent.
16484 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
16486         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
16487         to merge reference/pointer code and fix incorrect warnings.
16489 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
16491         * search.c (protected_accessible_p): Use context_for_name_lookup.
16493         * init.c (construct_virtual_bases): Fix thinko.
16494         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
16496 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16498         * decl.c (current_function_decl): Move to toplev.c.
16500 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
16502         * pt.c (fn_type_unification): Unify return type, whenever
16503         provided.
16504         (get_bindings_real): Only pass return type when necessary.
16505         Remove explicit return type check.
16506         * class.c (resolve_address_of_overloaded_function): Pass desired
16507         return type to fn_type_unification.
16509 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16511         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
16512         DECL_FIELD_SIZE.
16513         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
16514         DECL_FIELD_SIZE.
16515         * rtti.c (expand_class_desc): Likewise.
16516         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
16517         (THUNK_VCALL_OFFSET): Likewise.
16518         (THUNK_DELTA): Reflect changes in ../tree.h.
16520 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
16522         * search.c (protected_accessible_p): Also allow the access if
16523         the member is public in DERIVED.  Lose TYPE parm.
16524         (friend_accessible_p): Lose TYPE parm.
16525         (accessible_p): Adjust.
16527 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16529         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
16530         on things that are not sizes; ssize_binop deleted.
16531         Call size_diffop when appropriate.
16532         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16533         (build_primary_vtable, build_secondary_vtable): Likewise.
16534         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
16535         Variable I is HOST_WIDE_INT.
16536         (get_vfield_offset): Pass proper types to size_binop.
16537         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
16538         (finish_struct_1): Likewise.
16539         (skip_rtti_stuff): Arg N is now pointer to signed.
16540         (layout_class_type): Use size_zero_node.
16541         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
16542         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
16543         * decl.c (complete_arry_type): Pass proper types to size_binop.
16544         (xref_basetypes): BINFO_OFFSET is sizetype.
16545         * error.c (dump_expr): Don't use size_binop non-sizes.
16546         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
16547         * init.c (construct_virtual_bases): Fix type error.
16548         (build_vec_delete_1): Pass proper type to size_binop and don't
16549         fold result.
16550         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
16551         * rtti.c (get_base_offset): Pass proper type to size_binop.
16552         * search.c (dfs_find_vbases): Fix type error.
16553         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
16554         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
16555         * tree.c (debug_binfo): Variable N is signed.
16556         Use HOST_WIDE_INT_PRINT_DEC.
16557         * typeck.c (comptypes): sizetype is same as equivalent integer type.
16558         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
16559         size_one_node and size_zero_node.
16560         (c_alignof): Use size_one_node.
16561         (build_component_addr): Pass proper types to size_binop.
16562         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
16564 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
16566         Implement class scope using-declarations for functions.
16567         * class.c (handle_using_decl): Call add_method for used functions.
16568         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
16569         (add_method): Used functions are hidden by local functions.
16570         (check_bases_and_members): Handle using-decls before finalizing
16571         CLASSTYPE_METHOD_VEC.
16572         * call.c (add_function_candidate): Add ctype parm; if nonzero,
16573         override the type of 'this' accordingly.
16574         (add_template_candidate, add_template_candidate_real): Add ctype parm.
16575         (convert_class_to_reference, build_user_type_conversion_1,
16576         build_new_function_call, build_object_call, build_new_op,
16577         build_new_method_call): Pass ctype parm.
16579         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
16580         the baselink.
16581         * call.c (convert_class_to_reference, build_user_type_conversion_1,
16582         build_new_function_call, build_object_call, build_new_op,
16583         build_new_method_call, build_op_delete_call): Don't get basetype_path
16584         from a baselink.
16585         * typeck.c (build_component_ref): Likewise.
16586         * init.c (build_offset_ref): Likewise.
16587         (resolve_offset_ref): Don't call enforce_access.
16588         Call build_scoped_ref.
16589         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
16590         would cause an error or if -pedantic.
16591         * class.c (alter_access): Lose binfo parm.
16593 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16595         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
16596         types.
16598 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
16600         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
16601         pseudo_type_info creation into the std namespace
16603 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16605         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
16606         (import_export_class): Remove declaration.
16607         * decl2.c (import_export_class): Make it static.
16608         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
16609         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
16610         EXPR_WITH_FILE_LOCATION.
16611         * lex.c (check_newline): Tweak filename/lineno setting.
16612         * semantics.c (begin_while_stmt): Fix typo in comment.
16614 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16616         * lang-options.h (-fmessage-length=): Add missing option.
16618         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
16620 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
16622         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
16624 2000-02-25  Jim Wilson  <wilson@cygnus.com>
16626         * optimize.c (expand_call_inline): Emit the return label before
16627         evaluating the return value.
16629 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
16631         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
16632         than duplicating functionality here.
16633         * optimize.c: Include input.h.
16634         (expand_call_inline): Use push_srcloc and pop_srcloc.
16635         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
16636         * parse.c: Regenerated.
16637         * Makefile.in (lex.o): Depend on input.h.
16638         (optimize.o): Likewise.
16640 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
16642         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
16643         function type, rather than ICE.
16645 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
16647         * decl.c (grokdeclarator): Call decl_type_access_control.
16648         * parse.y (parse_end_decl): Don't call decl_type_access_control if
16649         decl is null.
16651 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
16653         * decl.c (decls_match): Remove obsolete static member nadgering.
16655 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16657         * decl.c (grokdeclarator): Change ANSI to ISO.
16658         * lex.c (consume_string, readescape, do_identifier): Likewise.
16659         (parse_float, real_yylex): Likewise.
16660         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
16661         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
16662         new_type_id, maybe_label_decls, simple_stmt,
16663         for.init.statement): Likewise.
16664         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
16665         * semantics.c (finish_named_return_value): Likewise.
16666         * parse.c: Regenerate.
16668 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
16670         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
16671         (CPTI_CLASS_STAR_TYPE): Remove.
16672         (vtable_index_type): Likewise.
16673         (class_star_type_node): Remove.
16674         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
16675         (build_binary_op_nodefault): Remove.
16676         * call.c (build_new_op): Use build_binary_op instead of
16677         build_binary_op_nodefault.
16678         * decl.c (init_decl_processing): Remove class_star_type_node
16679         initialization.  Make delta_type_node ptrdiff_type_node under the
16680         new ABI.  Initialize vtable_index_type.
16681         (build_ptrmemfunc_type): Build different structures for the new
16682         ABI.
16683         (build_enumerator): Use build_binary_op instead of
16684         build_binary_op_nodefault.
16685         * method.c (build_overload_value): Mangle pointers-to-members
16686         appropriately under the new ABI.
16687         * typeck.c (build_array_ref): Use build_binary_op instead of
16688         build_binary_op_nodefault.
16689         (get_member_function_from_ptrfunc): Adjust for the new ABI.
16690         (build_binary_op_nodefault): Rename to ...
16691         (build_binary_op): ... this.  Remove old version.  Adjust for
16692         pointer-to-member comparisons under the new ABI.
16693         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
16694         (build_ptrmemfunc): Adjust for the new ABI.
16695         (expand_ptrmemfunc_cst): Likewise.
16696         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
16697         (pfn_from_ptrmemfunc): Adjust for the new ABI.
16699 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16701         * call.c (build_object_call): Compress consecutive calls to
16702         cp_error.
16703         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
16704         (build_op_delete_call): Adjust message formatting.
16706         * class.c (check_bases): Compress consecutive calls to
16707         cp_pedwarn.
16708         (finish_struct_anon): Say 'ISO C++'.
16710         * decl.c (start_decl): Same here.
16711         (grok_reference_init): Likewise.
16712         (grokfndecl): Correct message formatting.
16713         (grokfndecl): Improve diagnostic.
16714         (check_static_variable_definition): Likewise. Say 'ISO C++'
16715         (compute_array_index_type): Say 'ISO C++'
16716         (create_array_type_for_decl): Compress consecutive calls to
16717         cp_error.
16718         (grokdeclarator): Say 'ISO C++'
16719         (grok_op_properties): Likewise.
16721         * decl2.c (delete_sanity): Clairify diagnostic.
16722         (check_member_template): Same here.
16723         (grok_function_init): Use consistent terminology.
16725         * expr.c (do_case): Say 'ISO C++'
16727         * friend.c (do_friend): Compress consecutive calls to warning.
16729 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
16731         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
16732         * class.c (build_secondary_vtable): Reorganize.  Don't create a
16733         new vtable under the new ABI.
16734         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
16735         computing the size.
16736         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
16737         the initializing elements.
16738         (initialize_vtable): New function.
16739         (dfs_finish_vtbls): Use it.
16740         (dfs_accumulate_vtbl_inits): New function.
16741         (finish_vtbls): Merge primary and secondary vtables under the new
16742         ABI.
16743         (finish_struct_1): Remove redundant call to layout_vtable_decl.
16744         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
16745         aren't VAR_DECLs.
16747         * class.c (build_vtable): New function, split out from ...
16748         (get_vtable_decl): ... here, and ...
16749         (build_secondary_vtable): ... here.
16751         * pt.c (tsubst_decl): Fix formatting.
16753 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16755         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
16756         (avoid_overlap, build_base_field): Likewise.
16757         (build_base_field, build_base_fields, is_empty_class):
16758         Test DECL_SIZE with integer_zero.
16759         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
16760         * cp-tree.h (struct lang_type): New field size_unit.
16761         (CLASSTYPE_SIZE_UNIT): New macro.
16762         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
16763         (cp_finish_decl): Delete -Wlarger-than processing.
16764         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
16765         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
16766         * tree.c (make_binfo): binfo vector is one entry longer.
16767         (walk_tree): Walk DECL_SIZE_UNIT.
16769 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
16771         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
16772         comment.
16773         (build_vtable_entry): Don't assume all vtable entries are
16774         functions.
16775         (build_vtbl_initializer): Adjust accordingly.
16776         (get_vtable_decl): Fix formatting.
16778 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
16780         * semantics.c (deferred_type_access_control): Walk the entire
16781         type_lookups list.
16782         (save_type_access_control): Rename from
16783         initial_deferred_type_access_control.  Just remember the value.
16784         (decl_type_access_control): New fn.
16785         (begin_function_definition): Use deferred_type_access_control, after
16786         we've started the function.  Set type_lookups to error_mark_node.
16787         * parse.y (frob_specs, fn.def1): Adjust.
16788         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
16789         (parse_end_decl, parse_bitfield0, parse_method): New fns.
16790         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
16791         (after_type_component_declarator0): Likewise.
16792         (after_type_component_declarator): Likewise.
16793         (notype_component_declarator): Likewise.
16794         * cp-tree.h: Adjust.
16796         * decl.c (redeclaration_error_message): Allow redeclaration of
16797         namespace-scope decls.
16799 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16801         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
16803 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
16805         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
16806         * decl2.c (grokclassfn): Likewise.
16808         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
16810         * decl2.c (lang_decode_option): Don't set default message length
16811         here.
16812         * lex.c (lang_init_options): Set it here.
16814 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
16816         Make DECL_CONTEXT mean the class in which a member function was
16817         declared, even for a virtual function.
16818         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
16819         (DECL_FRIEND_CONTEXT): New macro.
16820         (DECL_REAL_CONTEXT): Remove.
16821         (SET_DECL_FRIEND_CONTEXT): Likewise.
16822         (DECL_VIRTUAL_CONTEXT): Adjust.
16823         (DECL_CLASS_SCOPE_P): Use TYPE_P.
16824         (add_friends): Remove.
16825         (hack_decl_function_context): Likewise.
16826         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
16827         CP_DECL_CONTEXT.
16828         (build_over_call): Fix indentation.  Use DECL_CONTEXT
16829         instead of DECL_CLASS_CONTEXT.
16830         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
16831         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16832         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16833         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
16834         (build_base_field): Likewise.
16835         (finish_struct_1): Likewise.
16836         (build_self_reference): Likewise.
16837         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
16838         DECL_REAL_CONTEXT.
16839         (pushtag): Use decl_function_context, not
16840         hack_decl_function_context.
16841         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16842         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
16843         (pushdecl): Remove bogus code.
16844         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
16845         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16846         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16847         Use decl_function_context, nothack_decl_function_context.
16848         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
16849         (grokdeclarator): Likewise.  Use decl_function_context, not
16850         hack_decl_function_context.
16851         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
16852         (start_function): Use DECL_FRIEND_CONTEXT, not
16853         DECL_CLASS_CONTEXT.  Use decl_function_context, not
16854         hack_decl_function_context.
16855         (finish_function): Use decl_function_context, not
16856         hack_decl_function_context.
16857         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
16858         DECL_CLASS_CONTEXT.
16859         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
16860         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
16861         (grokfield): Likewise.
16862         (finish_builtin_type): Likewise.
16863         (finish_vtable_vardec): Use decl_function_context, not
16864         hack_decl_function_context.
16865         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16866         (start_static_initialization_or_destruction): Likewise.
16867         (finish_static_initialization_or_destruction): Likewise.
16868         (mark_used): Adjust logic for deciding when to synthesize methods.
16869         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
16870         DECL_REAL_CONTEXT.
16871         * error.c (dump_function_decl): Use DECL_CONTEXT, not
16872         DECL_CLASS_CONTEXT.
16873         * friend.c (is_friend): Likewise.
16874         (add_friends): Remove.
16875         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
16876         * lex.c (begin_definition_of_inclass_inline): Use
16877         decl_function_context, not hack_decl_function_context.
16878         (process_next_inline): Likewise.
16879         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16880         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
16881         DECL_CLASSS_CONTEXT.
16882         (hack_identifier): Likewise.
16883         (synthesize_method):  Use decl_function_context, not
16884         hack_decl_function_context.
16885         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
16886         DECL_REAL_CONTEXT.
16887         (is_member_template): Use decl_function_context, not
16888         hack_decl_function_context.  Use DECL_CONTEXT, not
16889         DECL_CLASS_CONTEXT.
16890         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
16891         DECL_CLASS_CONTEXT.
16892         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
16893         DECL_REAL_CONTEXT.
16894         (push_template_decl_real): Likewise.
16895         (instantiate_class_template): Don't call add_friends.
16896         (tsubst_default_argument): Use DECL_CONTEXT, not
16897         DECL_REAL_CONTEXT.
16898         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16899         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16900         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
16901         DECL_CLASS_CONTEXT.
16902         * repo.c (repo_inline_used): Likewise.
16903         * search.c (current_scope): Adjust for new _CONTEXT macros.
16904         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
16905         DECL_REAL_CONTEXT.
16906         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16907         (lookup_fnfields_here):Likewise.
16908         (check_final_overrider): Likewise.
16909         (init_vbase_pointers): Likewise.
16910         (virtual_context): Likewise.
16911         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
16912         (expand_body): Use decl_function_context, not
16913         hack_decl_function_context.
16914         * tree.c (hack_decl_function_context): Remove.
16915         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
16916         DECL_CLASS_CONTEXT.
16917         * typeck2.c (error_not_base_type): Likewise.
16919 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
16921         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
16923 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16925         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
16927 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
16929         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
16931 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
16933         * decl2.c (lang_decode_option): Enable automatic line wrapping.
16935 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
16937         * parse.y (frob_specs): Split out...
16938         (parse_decl): From here.
16939         (fn.def2): Call initial_deferred_type_access_control.
16940         (after_type_component_declarator0): Call frob_specs.
16941         (notype_component_declarator0): Likewise.
16942         * search.c (friend_accessible_p): Nested classes are friends of their
16943         enclosing classes.
16945 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
16947         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
16948         used to create an implicit temporary.
16950         * class.c (dfs_modify_vtables): Tweak calculation of functions to
16951         override.
16953 2000-02-08  Nathan Sidwell  <nathan@acm.org>
16955         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
16956         strip array element qualifiers too.
16958 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
16960         * decl.c (store_parm_decls): Don't build cleanups for parameters
16961         while processing_template_decl.
16963 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
16965         * cp-tree.h (struct saved_scope): Add incomplete field.
16966         (namespace_scope_incomplete): New macro.
16967         * decl.c (pushdecl): Use it.
16968         (hack_incomplete_structures): Use it.  See through artificial
16969         binding levels.
16970         (mark_saved_scope): Mark it.
16972         Implement access control for nested types.
16973         * search.c (type_access_control): New fn.
16974         (accessible_p): Now we do perform access control for types.
16975         * semantics.c (deferred_type_access_control): New fn.
16976         (initial_deferred_type_access_control): New fn.
16977         (begin_function_definition): Call it.  Add lookups parm.
16978         * decl.c (struct binding_level): Add this_class field.
16979         (pushlevel_class): Set it.
16980         (mark_binding_level): Mark it.
16981         (lookup_name_real): Use it.  Call type_access_control.
16982         (mark_saved_scope): Mark lookups field.
16983         * cp-tree.h (flagged_type_tree): Add lookups field.
16984         (struct saved_scope): Add lookups field.
16985         (type_lookups): New macro.
16986         * parse.y (declmods): Now <ftype>.
16987         (parse_decl): Add lookups parm.  Call
16988         initial_deferred_type_access_control.
16989         (lang_extdef): Clear type_lookups.
16990         (typed_declspecs, declmods, typespec): Set lookups field.
16991         (initdcl): Call deferred_type_access_control.
16992         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
16993         component_decl_1, named_parm): Adjust.
16994         * friend.c (is_friend): Nested classes are friends of their
16995         enclosing classes.
16997         * class.c (currently_open_derived_class): New fn.
16998         * method.c (hack_identifier): Use it.
17000         * lex.c (do_identifier): Remove obsolete code.
17002         * parse.y (typed_typespecs): Propagate new_type_flag properly.
17004 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
17006         * tinfo.h: Remove apostrophes from C++ comment (xgettext
17007         thinks this file is plain C).
17009 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17011         * Makefile.in (call.o): Depend on $(EXPR_H).
17013         * call.c: Include "expr.h".
17015         * class.c (dump_class_hierarchy): Add prototype.
17017         * search.c (dfs_get_pure_virtuals): Likewise.
17019 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
17021         * parse.y (simple_stmt): Allow :: token in asm parameter list.
17022         * parse.c: Rebuilt.
17024 2000-01-31  Jim Wilson  <wilson@cygnus.com>
17026         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
17027         Store it in DECL_FCONTEXT.
17028         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
17030 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
17032         * tinfo.h (old abi): #include "tconfig.h".
17033         * tinfo.cc (convert_to_base): Move into old abi section.
17035 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
17037         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
17038         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
17039         (BINFO_PRIMARY_BINFO): New macro.
17040         (BF_DELTA): Rename to ...
17041         (BV_DELTA): ... this.
17042         (BF_VCALL_INDEX): Rename to ...
17043         (BV_VCALL_INDEX): ... this.
17044         (BF_FN): Rename to ...
17045         (BV_FN): ... this.
17046         * class.c (build_vbase_path): Adjust for changes to reverse_path.
17047         (set_rtti_entry): Rename BF_ macros to BV_ variants.
17048         (modify_vtable_entry): Simplify.
17049         (add_virtual_function): Rename BF_ macros to BV_ variants.
17050         (build_vtable_initializer): Likewise.
17051         (get_class_offset_1): Remove.
17052         (dfs_get_class_offset): Likewise.
17053         (get_class_offset): Likewise.
17054         (dfs_find_final_overrider): New function.
17055         (find_final_overrider): Likewise.
17056         (modify_one_vtable): Remove.
17057         (dfs_find_base): New function.
17058         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
17059         find_final_overrider.
17060         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
17061         virtuals.
17062         (dfs_fixup_vtable_deltas): Remove.
17063         (override_one_vtable): Remove.
17064         (merge_overrides): Likewise.
17065         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
17066         unreal chilren of virtual bases.
17067         (finish_struct_1): Don't use merge_overrides.  Don't use
17068         dfs_fixup_vtable_deltas.
17069         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
17070         BINFOs.
17072 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
17073             Jason Merrill  <jason@yorick.cygnus.com>
17075         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
17077 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
17079         * exception.cc (__throw_bad_typeid): Add missing std::.
17081 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17083         * cp-tree.h (make_thunk): PROTO -> PARAMS.
17085 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
17087         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
17089         Runtime support for new-abi rtti.
17090         * inc/typeinfo (type_info::operator!=): Define in class.
17091         (type_info::before, type_info::name, type_info::operator==,
17092         type_info::operator!=): Define new ABI implementations.
17093         (type_info::is_pointer_p, type_info::is_function_p): Declare
17094         new virtual functions.
17095         (type_info::do_catch, type_info::do_upcast): Likewise.
17097         * tinfo.h (__base_class_info): Define new class.
17098         (__class_type_info): Likewise.
17099         (__si_class_type_info): Likewise.
17100         (__vmi_class_type_info): Likewise.
17101         (__dynamic_cast): Prototype.
17103         * tinfo.cc: Conditionalize old and new rtti mechanisms.
17104         (type_info::is_pointer_p): Define new function.
17105         (type_info::is_function_p): Likewise.
17106         (type_info::do_catch): Likewise.
17107         (type_info::do_upcast): Likewise.
17108         (vtable_prefix): New structure for vtable access.
17109         (adjust_pointer): Define new template function.
17110         (contained_p, public_p, virtual_p, contained_public_p,
17111         contained_nonpublic_p, contained_nonvirtual_p): Define new
17112         functions.
17113         (nonvirtual_base_type): New local variable.
17114         (__class_type_info::~__class_type_info): Define.
17115         (__si_class_type_info::~__si_class_type_info): Likewise.
17116         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
17117         (__class_type_info::do_catch): Define new function.
17118         (__class_type_info::do_upcast): Likewise.
17119         (__class_type_info::find_public_src): Likewise.
17120         (__class_type_info::do_find_public_src): Likewise.
17121         (__si_class_type_info::do_find_public_src): Likewise.
17122         (__vmi_class_type_info::do_find_public_src): Likewise.
17123         (__class_type_info::do_dyncast): Likewise.
17124         (__si_class_type_info::do_dyncast): Likewise.
17125         (__vmi_class_type_info::do_dyncast): Likewise.
17126         (__class_type_info::do_upcast): Likewise.
17127         (__si_class_type_info::do_upcast): Likewise.
17128         (__vmi_class_type_info::do_upcast): Likewise.
17129         (__dynamic_cast): Likewise.
17131         * tinfo2.cc (__fundamental_type_info): Define new class.
17132         (__pointer_type_info): Likewise.
17133         (__reference_type_info): Likewise.
17134         (__array_type_info): Likewise.
17135         (__function_type_info): Likewise.
17136         (__enum_type_info): Likewise.
17137         (__ptr_to_member_type_info): Likewise.
17138         (__fundamental_type_info::~__fundamental_type_info): Define.
17139         (__pointer_type_info::~__pointer_type_info): Likewise.
17140         (__reference_type_info::~__reference_type_info): Likewise.
17141         (__array_type_info::~__array_type_info): Likewise.
17142         (__function_type_info::~__function_type_info): Likewise.
17143         (__enum_type_info::~__enum_type_info): Likewise.
17144         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
17145         (__pointer_type_info::do_catch): Define new function.
17146         (__ptr_to_member_type_info::do_catch): Define new function.
17148         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
17149         (__is_pointer): Likewise.
17151         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
17153 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
17155         * cp/class.c (build_vtable): Rename to build_primary_vtable.
17156         (prepare_fresh_vtable): Rename to build_secondary_vtable.
17157         (make_new_vtable): New function.
17158         (modify_vtable_entry): Handle generation of new vtables correctly.
17159         (modify_one_vtable): Remove unused parameter.
17160         (dfs_fixup_vtable_deltas): Likewise.
17161         (override_one_vtable): Use build_secondary_vtable.
17162         (finish_struct_1): Use build_primary_vtable and
17163         build_secondary_vtable.
17165 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
17167         * cp/decl.c: Adjust variable names, comments, help strings.
17169 2000-01-29  Nathan Sidwell  <nathan@acm.org>
17171         * new2.cc (operator delete[]): Use operator delete, don't assume
17172         implementation.
17174 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
17176         * class.c (build_vtbl_initializer): Add argument to
17177         build_vtable_entry call.
17179 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
17181         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
17182         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
17183         (BF_DELTA): New macro.
17184         (BF_VCALL_INDEX): Likewise.
17185         (BF_FN): Likewise.
17186         (THUNK_VCALL_OFFSET): Likewise.
17187         (make_thunk): Change prototype.
17188         * class.c (build_vtable_entry): Integrate
17189         build_vtable_entry_for_fn.  Handle vcall indices.
17190         (build_vtable_entry_for_fn): Remove.
17191         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
17192         BF_VCALL_INDEX, BF_FN.
17193         (modify_vtable_entry): Integrate common code from
17194         modify_one_vtable and dfs_fixup_vtable_deltas.
17195         (add_virtual_function): Set BF_VCALL_INDEX.
17196         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
17197         and BF_FN.
17198         (modify_one_vtable): Simplify.
17199         (dfs_fixup_vtable_deltas): Likewise.
17200         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
17201         * method.c (make_thunk): Handle vcall indices.
17203 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
17205         Compiler side new abi rtti (not enabled).
17206         * cp-tree.h (new_abi_rtti_p): New macro.
17207         (emit_support_tinfos): Prototype new function.
17208         (tinfo_decl_p): Likewise.
17209         (emit_tinfo_decl): Likwise.
17210         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
17211         macros.
17212         (doing_runtime): New local static.
17213         (init_rtti_processing): Add new-abi initializer.
17214         (get_tinfo_decl): Add new-abi logic.
17215         (tinfo_from_decl): Likewise.
17216         (build_dynamic_cast_1): Likewise.
17217         (qualifier_flags): New static function.
17218         (tinfo_base_init): Likewise.
17219         (generic_initializer): Likewise.
17220         (ptr_ref_initializer): Likewise.
17221         (ptmd_initializer): Likewise.
17222         (class_hint_flags): Likewise.
17223         (class_initializer): Likewise.
17224         (synthesize_tinfo_var): Likewise.
17225         (create_real_tinfo_var): Likewise.
17226         (create_pseudo_type_info): Likewise.
17227         (get_vmi_pseudo_type_info): Likewise.
17228         (create_tinfo_types): Likewise.
17229         (emit_support_tinfos): New global function.
17230         (tinfo_decl_p): New global predicate.
17231         (emit_tinfo_decl): New global function.
17232         * class.c (set_rtti_entry): Generalize for old and new rtti.
17233         (build_vtbl_initializer): Likewise.
17234         * decl2.c (finish_file): Likewise.
17236 2000-01-27  Jim Wilson  <wilson@cygnus.com>
17238         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
17239         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
17241 2000-01-27  Mike Stump  <mrs@wrs.com>
17243         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
17244         for scopes.
17246 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
17248         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
17250 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
17252         * optimize.c (calls_setjmp_r): Supply new argument
17253         to special_function_p.
17255 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17257         * call.c: PROTO -> PARAMS.
17258         * class.c: Likewise.
17259         * cp-tree.h: Likewise.
17260         * cvt.c: Likewise.
17261         * decl.c: Likewise.
17262         * decl.h: Likewise.
17263         * decl2.c: Likewise.
17264         * dump.c: Likewise.
17265         * errfn.c: Likewise.
17266         * error.c: Likewise.
17267         * except.c: Likewise.
17268         * expr.c: Likewise.
17269         * init.c: Likewise.
17270         * input.c: Likewise.
17271         * lex.c: Likewise.
17272         * lex.h: Likewise.
17273         * method.c: Likewise.
17274         * optimize.c: Likewise.
17275         * parse.y: Likewise.
17276         * pt.c: Likewise.
17277         * repo.c: Likewise.
17278         * rtti.c: Likewise.
17279         * search.c: Likewise.
17280         * semantics.c: Likewise.
17281         * spew.c: Likewise.
17282         * tree.c: Likewise.
17283         * typeck.c: Likewise.
17284         * typeck2.c: Likewise.
17285         * xref.c: Likewise.
17287 2000-01-25  Richard Henderson  <rth@cygnus.com>
17289         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
17291 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
17293         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
17294         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
17295         (struct vcall_offset_data_s): New type.
17296         (dfs_vcall_offset_queue_p): New function.
17297         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17298         (build_vcall_offset_vtbl_entries): Likewise.
17299         (layout_vtable_decl): Likewise.
17300         (num_vfun_entries): Likewise.
17301         (num_extra_vtbl_entries): Add the entries for vcall offsets.
17302         (build_vtbl_initializer): Likewise.
17303         (dfs_finish_vtabls): Use layout_vtable_decl.
17304         (modify_one_vtables): Always duplicate vtables under the new ABI.
17305         (finish_struct_1): Use layout_vtable_decl.
17307 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17309         * decl.c (member_function_or_else): Change third arg from a format
17310         specifier to an `enum overload_flags'.  Callers changed.
17312 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
17314         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
17315         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
17316         build_const_cast, get_delta_difference, check_return_expr): Avoid
17317         ANSI string concatenation usage.
17319 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
17321         * class.c (layout_class_type): Put the fields required to make a
17322         class non-empty at the end, not the beginning, of the TYPE_FIELDs
17323         list.
17325 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
17327         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
17328         template.
17330         * decl2.c (mark_used): Do instantiate inlines that have been
17331         explicitly instantiated.
17333 2000-01-24  Richard Henderson  <rth@cygnus.com>
17335         * call.c (build_over_call): Use expand_tree_builtin.
17336         * typeck.c (build_function_call_real): Likewise.
17337         (build_binary_op_nodefault): Handle unordered compares.
17339 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17341         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
17342         cp_tree_index values.
17343         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
17344         New global node #defines for them.
17345         * rtti.c (call_void_fn): Replace with ...
17346         (build_runtime_decl): ... new static function.
17347         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
17348         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
17349         (build_dynamic_cast_1): Always produce correctly typed result.
17350         Explicitly produce type_info addresses. Use dynamic_cast_node.
17351         * exception.cc (__throw_bad_cast): Return `void *'.
17352         (__throw_bad_typeid): Return `const type_info &'.
17354 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17356         * cp-tree.h (get_vtable_decl): Prototype new function.
17357         * class.c (get_vtable_decl): New function. Broken out from ...
17358         (build_vtable): ... here. Use it.
17359         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
17360         by get_vtable_decl.
17362 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
17364         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
17365         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
17366         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
17367         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
17368         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
17369         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
17370         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
17371         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
17372         (CPTI_TINFO_VAR_ID): New enumeration.
17373         (__tp_desc_type_node, __access_mode_type_node,
17374         __bltn_desc_type_node, __user_desc_type_node,
17375         __class_desc_type_node, __ptr_desc_type_node,
17376         __attr_desc_type_node, __func_desc_type_node,
17377         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
17378         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
17379         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
17380         enum_desc_type_node, class_desc_type_node,
17381         si_class_desc_type_node, vmi_class_desc_type_node,
17382         ptmd_desc_type_node, base_desc_type_node): New #defines.
17383         (tinfo_fn_id, tinfo_fn_type): Rename to ...
17384         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
17385         (tinfo_var_id): New enumeration.
17386         (DECL_TINFO_FN_P): Augment comment.
17387         * decl.c (cp_global_trees): Adjust documentation.
17388         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
17389         tinfo_decl_type and tinfo_var_id.
17390         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
17391         (build_typeid): Remove unused variable.
17392         (get_tinfo_var): Use tinfo_var_id.
17393         (tinfo_name): New static function.
17394         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
17395         (tinfo_from_decl): Likewise.
17396         (get_base_offset): New static function, broken out of
17397         expand_class_desc.
17398         (expand_si_desc): Use tinfo_name.
17399         (expand_class_desc): Likewise. Lose local static variable.
17400         Use base_desc_type_node. Use get_base_offset.
17401         (expand_ptr_desc): Use tinfo_name.
17402         (expand_attr_desc): Likewise.
17403         (expand_generic_desc): Likewise.
17405         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
17406         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
17408 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17410         * cp-tree.h (__eprintf): Remove declaration.
17411         * tree.c (__eprintf): Remove definition.
17413 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
17414             Mark Mitchell  <mark@codesourcery.com>
17416         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
17417         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
17419 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
17421         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
17423 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
17425         * cp-tree.h (register_dtor_fn): New function.
17426         * decl.c (destroy_local_static): Rename to ...
17427         (register_dtor_fn): ... this.  Give it external linkage.
17428         (expand_static_init): Use it.
17429         * decl2.c (do_static_initialization): Likewise, if using
17430         __cxa_atexit.
17431         (do_static_destruction): Check that __cxa_atexit is not in use.
17432         (finish_file): Don't call do_static_destruction if using
17433         __cxa_atexit.
17435         * typeck.c (convert_arguments): Restore two-message error
17436         reporting.
17438 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
17440         Remap dynamic cast hint values to be consistent across ABIs.
17441         * search.c (dynamic_cast_base_recurse): Remap generated value.
17442         (get_dynamic_cast_base_type): Adjust documentation.
17443         * tinfo.h (__user_type_info::dyncast): Likewise.
17444         (__user_type_info::find_public_subobj): Remap BOFF meaning.
17445         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
17446         (__class_type_info::do_dyncast): Likewise.
17447         (__class_type_info::do_find_public_subobj): Likewise.
17448         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
17450 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17452         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
17454         * typeck2.c (incomplete_type_error): Restore previous
17455         cp_error and cp_error_at call sequence.
17457 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
17459         * class.c (dump_class_hierarchy): Make format agree with argument;
17460         cast pointer to unsigned long and print with %lx.
17462 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
17464         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
17466         * typeck.c (composite_pointer_type, common_type,
17467         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
17468         build_function_call_real, convert_arguments,
17469         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
17470         build_unary_op, mark_addressable, build_compound_expr,
17471         build_static_cast, build_reinterpret_cast, build_const_cast,
17472         build_c_cast, build_modify_expr, get_delta_difference,
17473         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
17474         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
17475         into a single one.
17476         * typeck2.c (readonly_error, abstract_virtuals_error,
17477         process_init_constructor, check_for_new_type): Likewise.
17479 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
17481         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
17482         VAR_DECLs.
17484 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
17486         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
17487         (build_x_typeid): Likewise.
17488         (get_tinfo_fn): Likewise.
17489         (get_tinfo_fn_unused): Rename to ...
17490         (get_tinfo_decl): ... here.
17491         * rtti.c (build_headof): Replace logic error with assertion.
17492         (get_tinfo_fn_dynamic): Rename to ...
17493         (get_tinfo_decl_dynamic): ... here. Make static. Use
17494         complete_type_or_else.
17495         (build_x_typeid): Move into ...
17496         (build_typeid): ... here. Adjust call to
17497         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
17498         throw_bad_typeid expression.
17499         (get_tinfo_fn_unused): Rename to ...
17500         (get_tinfo_decl): ... here. Adjust comment.
17501         (get_tinfo_fn): Delete.
17502         (tinfo_from_decl): New static function.
17503         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
17504         (get_typeid): Use complete_type_or_else.
17505         (build_dynamic_cast_1): Adjust calls to
17506         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
17507         * parse.y (primary): Adjust call to build_typeid.
17508         * except.c (build_eh_type_type_ref): Adjust call to
17509         get_tinfo_decl. Mark as used.
17510         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
17511         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
17512         * parse.c: Regenerated.
17514 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
17516         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
17517         calling convention.
17518         (resolves_to_fixed_type_p): Document calling convention.
17519         * rtti.c (build_x_typeid): Initialize NONNULL.
17521         * cp-tree.h (build_shared_int_cst): New function.
17522         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
17523         * class.c (modify_vtable_entry): Likewise.
17524         (add_virtual_function): Split out code to generated shared
17525         INTEGER_CSTs to build_share_int_cst.
17526         (modify_all_vtables): Handle all the overridden functions here.
17527         Add overridden functions from non-primary virtual bases to the
17528         primary vtable.
17529         (finish_struct_1): Adjust call to modify_all_vtables.  Add
17530         overridden functions from non-primary bases to the vtable.
17531         * tree.c (build_shared_int_cst): New function.
17533         * cp-tree.h (scratchalloc): Remove.
17534         (build_scratch_list): Likewise.
17535         * call.c (convert_class_to_reference): Replace build_scratch_list
17536         and build_expr_list with build_tree_list.
17537         (add_candidate): Replace scratchalloc with expralloc.  Note memory
17538         leak.
17539         (build_user_type_conversion_1):  Replace build_scratch_list
17540         and build_expr_list with build_tree_list.
17541         (build_new_op): Likewise.
17542         (build_op_delete_call): Likewise.
17543         (convert_like): Likewise.
17544         * cvt.c (ocp_convert): Likewise.
17545         * decl.c (start_decl): Likewise.
17546         (start_function): Likewise.
17547         (finish_destructor_body): Likewise.
17548         (maybe_build_cleanup_1): Likewise.
17549         * decl2.c (reparse_decl_as_expr): Likewise.
17550         * init.c (perform_member_init): Likewise.
17551         (expand_cleanup_for_base): Likewise.
17552         (build_builtin_delete_call): Likewise.
17553         (build_new_1): Likewise.
17554         (build_delete): Likewise.
17555         * method.c (do_build_assign_ref): Likewise.
17556         * parse.y (already_scoped_stmt): Likewise.
17557         (nontrivial_exprlist): Likewise.
17558         (net_initializer): Likewise.
17559         (initlist): Likewise.
17560         * parse.c: Regenerated.
17561         * rtti.c (build_x_typeid): Likewise.
17562         (build_dynamic_cast_1): Likewise.
17563         * typeck.c (build_x_compound_expr): Likewise.
17564         (build_static_cast): Likewise.
17565         (build_modify_expr): Likewise.
17567         * cp-tree.h (DECL_VINDEX): Add documentation.
17568         * class.c (build_vtable_entry): Likewise.
17569         (start_vtable): Add comment.
17570         (add_virtual_function): Replace pending_hard_virtuals with
17571         overridden_virtuals and pending_virtuals with new_virtuals.
17572         Replace redundant assignments with assertions.
17573         (check_for_override): Add comment.
17574         (check_bases_and_members): Replace pending_hard_virtuals with
17575         overridden_virtuals and pending_virtuals with new_virtuals.
17576         (create_vtbl_ptr): Likewise.
17577         (layout_class_type): Likewise.
17578         (finish_struct_1): Likewise.  Add comments.
17580 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
17582         * class.c (finish_struct_1): Replace redundant code with
17583         assertions.
17585         * cp-tree.h (flag_new_abi): Move.
17586         (flag_use_cxa_atexit): Likewise.
17587         (flag_honor_std): Likewise.
17588         (flag_rtti): Likewise.
17589         (vbase_offsets_in_vtable_p): Define.
17590         (vptrs_present_everywhere_p): Likewise.
17591         (TYPE_CONTAINS_VPTR_P): Likewise.
17592         (dfs_walk_real): Declare.
17593         * class.c (build_vbase_pointer_fields): Check
17594         vbase_offsets_in_vtable_p.
17595         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
17596         BINFO_VPTR_FIELD.
17597         (build_vbase_offset_vtbl_entries): Simplify.
17598         (build_vbase_offset_vtbl_entries): Adjust.
17599         (build_vbase_pointer): Add ability to look up vbase offsets in
17600         vtable.
17601         (start_vtable): New function.
17602         (add_virtual_function): Use it.
17603         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
17604         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
17605         (build_vtbl_initializer): Take the type of the complete object as
17606         input.  Use it to correctly calculate vbase offsets.
17607         (dfs_finish_vtbls): Pass the complete type to
17608         build_vtbl_initializer.
17609         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
17610         (create_vtable_ptr): Create a vtable even if there are no
17611         new virtual functions, under the new ABI.
17612         (finish_struct_1): Likewise.
17613         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
17614         * decl.c (exapnd_static_init): Remove call to
17615         preserve_initializer.
17616         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
17617         vtables.
17618         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
17619         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
17620         (construct_virtual_bases): Don't initialize virtual base pointers
17621         under the new ABI.
17622         (build_aggr_init): Clean up comment.
17623         (expand_aggr_init_1): Likewise.
17624         * rtti.c (expand_class_desc): Store the virtual function table
17625         index where the vbase offset lives in the offset field.
17626         * search.c (dfs_walk_real): Make it global.
17627         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
17628         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
17630         * tinfo.h (USItype): Make it signed under the new ABI.
17631         * tinfo.cc (convert_to_base): New function.  Encapsulate base
17632         conversion logic here.
17633         (__class_type_info::do_upcast): Use it.
17634         (__class_type_info::do_dyncast): Likewise.
17635         (__class_type_info::do_find_public_subobj): Likewise.
17637         * init.c (construct_virtual_bases): Don't look up the addresses of
17638         virtual bases at run-time.
17640         * class.c (build_vbase_pointer): Relocate.
17641         (build_vbase_pointer_fields): Likewise.
17642         (dfs_build_vbase_offset_vtbl_entries): Likewise.
17643         (build_vbase_offset_vtbl_entries): Likewise.
17645         * decl.c (init_decl_processing): Complain if -fnew-abi
17646         -fno-vtable-thunks is used.
17648         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
17649         flag_new_abi.
17651 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
17653         * cp-tree.h (num_extra_vtbl_entries): New function.
17654         (size_extra_vtbl_entries): Likewise.
17655         (dfs_vtable_path_unmark): Likewise.
17656         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
17657         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17658         * class.c (num_extra_vtbl_entries): New function.
17659         (size_extra_vtbl_entries): Likewise.
17660         (dfs_build_vbase_offset_vtbl_entries): New function.
17661         (build_vbase_offset_vtbl_entries): Likewise.
17662         (build_vtbl_initializer): Use it.
17663         (finish_struct_1): Adjust vtable sizes (using
17664         num_extra_vtbl_entries).
17665         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
17666         THUNK_DECL is non-NULL before expanding it.
17667         * init.c (expand_virtual_init): Adjust the vtable pointer by
17668         size_extra_vtbl_entries before storing it.
17669         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
17670         Handle TREE_LIST parameters here, not in the dfs_* functions.
17671         (dfs_unmarked_real_bases_queue_p): Adjust.
17672         (dfs_marked_real_bases_queue_p): Likewise.
17673         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
17674         (dfs_vtable_path_marked_real_bases_queue_p): New function.
17675         (dfs_vtable_path_unmark): Likewise.
17677 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
17679         * optimize.c (copy_body_r): Clear the operand three of a
17680         TARGET_EXPR when copying it.
17682 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17684         * method.c (build_decl_overload_real): Check whether we are in ::
17685         before returning __builtin_new/delete.
17687 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
17689         * pt.c (tsubst_friend_function): Improve comment.
17690         (instantiate_decl): Avoid crashing when a "nested" function is
17691         instantiated from the top level.
17693         * dump.c (dqeueue_and_dump): Dump
17694         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
17696 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17698         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
17700 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
17702         * g++spec.c (lang_specific_driver): Add -fnew-abi if
17703         ENABLE_NEW_GXX_ABI defined.
17704         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
17705         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
17706         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
17708 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
17710         * decl.c (start_cleanup_fn): Call pushdecl.
17712         * call.c (convert_class_to_reference): Fix typos.
17713         (build_conditional_expr): Handle errors gracefully.
17714         * class.c (push_nested_class): Likewise.
17715         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
17716         (DECL_THIS_EXTERN): Use it.
17717         (DECL_THIS_STATIC): Likewise.
17718         * cvt.c (convert_to_void): Handle errors gracefully.
17719         (build_expr_type_conversion): Likewise.
17720         * decl.c (maybe_push_decl): Likewise.
17721         (start_decl_1): Likewise.
17722         (require_complete_types_for_parms): Likewise.
17723         * parse.y (structsp): Likewise.
17724         (base_class): Likewise.
17725         * parse.c: Regenerated.
17726         * pt.c (finish_member_template_decl): Likewise.
17727         * typeck.c (decay_conversion): Likewise.
17729         * cp-tree.h (dfs_skip_vbases): New function.
17730         (find_vbase_instance): Likewise.
17731         * class.c (determine_primary_base): Allow a nearly empty base to
17732         serve as a primary base class under the new ABI.
17733         (get_class_offset_1): Rename to ...
17734         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
17735         messages here.
17736         (get_class_offset): Use it.  Issue error messages here.
17737         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
17738         find the right copies of virtual bases.
17739         (fixup_vtable_deltas1): Rename to ...
17740         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
17741         bases as primary bases.
17742         (fixup_vtable_deltas): Remove.
17743         (override_one_vtable): Handle virtual bases as primary bases.
17744         (merge_overrides): Likewise.
17745         (finish_struct_1): Likewise.
17746         (dump_class_hierarchy): Dump primary-ness of bases as well.
17747         * search.c (mark_primary_bases): Use a pre-order traversal to
17748         handle primary virtual bases.
17749         (dfs_skip_vbases): New fiunction.
17750         (expand_upcast_fixups): Adjust to handle primary virtual bases.
17751         (fixup_virtual_upcast_offsets): Likewise.
17752         (fixup_all_virtual_upcast_offsets): Likewise.
17753         (dfs_find_vbase_instances): New function.
17754         (find_vbase_instance): Likewise.
17756 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
17758         * lex.c (DIR_SEPARATOR): Delete macro.
17760 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
17762        * decl2.c (lang_decode_option): Handle automatic line wrapping
17763        option.
17765 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
17767         * friend.c (do_friend): Don't resolve scopes when processing
17768         template declarations, even if the qualifying scope doesn't
17769         involve template parameters.
17771 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
17773         * class.c (dfs_modify_vtables_queue_p): Remove.
17774         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
17775         and dfs_marked_real_bases_queue_p instead of
17776         dfs_modify_vtables_queue_p.
17778         * class.c (build_vbase_path): Simplify.
17779         (dfs_propagate_binfo_offsets): New function.
17780         (propagate_binfo_offsets): Use it.
17781         (remove_base_field): Simplify.
17782         (dfs_set_offset_for_vbases): Remove.
17783         (dfs_set_offset_for_shared_vbases): New function.
17784         (dfs_set_offset_for_unshared_vbases): Likewise.
17785         (layout_virtual_bases): Use them.
17786         (layout_basetypes): Don't call propagate_binfo_offsets.
17787         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
17788         for the vbases.
17790         * class.c (build_base_field): New function, split out from ...
17791         (build_base_fields): ... here.  Use it.  Allocate primary bases
17792         first, under the new ABI.
17793         (get_vtable_entry): Remove.
17794         (remove_base_field): New function, split out from ...
17795         (remove_base_fields): ... here.  Adjust since primary bases come
17796         first under the new ABI.
17798         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
17799         (initialize_vtbl_ptrs): New function.
17800         (expand_indirect_vtbls_init): Change prototype.
17801         (convert_pointer_to_vbase): Declare.
17802         * init.c (expand_direct_vtbls_init): Remove.
17803         (dfs_initialize_vtbl_ptrs): New function.
17804         (initialize_vtbl_ptrs): Likewise.
17805         (emit_base_init): Use initialize_vtbl_ptrs.
17806         * search.c (convert_pointer_to_vbase): Make it global.
17807         (expand_indirect_vtbls_init): Remove vtable initialization code.
17808         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
17810         * class.c (dfs_finish_vtbls): New function.
17811         (finish_vtbls): Use it.
17812         (dump_class_hierarchy): New function.
17814         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
17815         (BINFO_VBASE_PRIMARY_P): New macro.
17816         (BINFO_VIRTUALS): Add to documentation.
17817         (SET_BINFO_PRIMARY_MARKED_P): Remove.
17818         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17819         (dfs_mark_primary_bases_queue_p): Likewise.
17820         (dfs_unmarked_real_bases_queue_p): New function.
17821         (dfs_marked_real_bases_queue_p): Likewise.
17822         * search.c (dfs_mark_primary_bases): Adjust.
17823         (mark_primary_bases): Likewise.
17824         (get_shared_vbase_if_not_primary): New function.
17825         (dfs_unmarked_real_bases_queue_p): Likewise.
17826         (dfs_marked_real_bases_queue_p): Likewise.
17827         (dfs_get_pure_virtuals): Simplify.
17828         (get_pure_virtuals): Likewise.
17830 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17832         * lex.c: Include tm_p.h.
17834 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
17836         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
17838 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
17840         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
17841         * pt.c (instantiate_decl): Defer comdat templates that might not be
17842         needed.
17844         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
17845         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
17846         (finish_file): Likewise.
17848         * decl2.c (import_export_class): Undo 12/14 change.
17850         * error.c (dump_decl): operator new, not operatornew.
17852         * class.c (field_decl_cmp): A nontype is "greater" than a type.
17853         * search.c (lookup_field_1): Look for the last field with the
17854         desired name.
17856 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17858         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
17859         FUNCTION_DECL.
17861 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17863         * typeck.c (build_static_cast): Don't strip target qualifiers
17864         when casting from a class.
17866 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17868         * class.c (warn_hidden): Initialize variable `fndecl'.
17870 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
17872         * decl.c (flag_isoc9x): New variable to be able to use code in
17873         c-common.c.  For now always zero.
17875 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
17877         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
17878         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
17879         or unshare_base_binfos for virtual bases here.
17880         * search.c (dfs_get_vbase_types): Do it here.
17881         (get_vbase_types): Adjust.
17883 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
17885         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
17886         (BINFO_PRIMARY_MARKED_P): Use flag 5.
17887         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17888         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17889         (unmark_primary_bases): Remove declaration.
17890         (unmarkedp): Declare.
17891         (dfs_vbase_unmark): Likewise.
17892         * class.c (determine_primary_base): Return immediately if there
17893         are no base classes.  Call mark_primary_bases here.
17894         (modify_all_direct_vtables): Remove.
17895         (modify_all_indirect_vtables): Remove.
17896         (dfs_modify_vtables_queue_p): New function.
17897         (dfs_modify_vtables): New function.
17898         (modify_all_vtables): Use them.
17899         (build_base_fields): Build FIELD_DECLs for primary virtual base
17900         classes.
17901         (create_vtable_ptr): Don't call determine_primary_base here.
17902         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
17903         (dfs_set_offset_for_vbases): ... this.
17904         (layout_virtual_bases): Use it.
17905         (layout_class_type): Call determine_primary_base here.
17906         * search.c (unmarkedp): Make it global.
17907         (shared_marked_p): Simplify.
17908         (shared_unmarked_p): Likewise.
17909         (dfs_primary_bases_queue_p): Remove.
17910         (dfs_unmark_primary_bases): Likewise.
17911         (unmark_primary_bases): Likewise.
17912         (mark_primary_bases): Simplify.
17913         (get_pure_virtuals): Don't call mark_primary_bases here.
17914         (dfs_vbase_unmark): New function.
17915         (get_vbase_types): Simplify.
17917         * class.c (struct base_info): Remove.
17918         (determine_primary_base): Take has_virtual_p rather than a
17919         base_info as input.  Don't calculate max_has_virtual.
17920         (finish_struct_bits): Remove max_has_virtual argument.
17921         (create_vtable_ptr): Remove max_has_virtual_p argument.
17922         (layout_virtual_bases): Remove max argument.
17923         (layout_basetypes): Likewise.
17924         (layout_class_type): Remove max_has_virtual_p argument.
17925         (finish_struct_1): Remove max_has_virtual.
17927         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
17928         (layout_basetypes): Remove.
17929         * class.c (propagate_binfo_offsets): Moved here from tree.c.
17930         Update to handle primary virtual bases.
17931         (remove_base_fields): New function, split out from
17932         layout_basetypes.
17933         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
17934         (layout_virtual_bases): New function, split out from
17935         layout_basetypes.  Update to handle primary virtual bases.
17936         (layout_basetypes): Moved here from tree.c.  Use
17937         remove_base_fields and layout_virtual_bases.
17938         * search.c (dfs_mark_primary_bases_queue_p): New function.
17939         (mark_primary_bases): Use it.
17940         * tree.c (CEIL): Remove.
17941         (propagate_binfo_offsets): Remove.
17942         (layout_basetypes): Remove.
17944 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17946         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
17947         (BINFO_PRIMARY_MARKED_P): New macro.
17948         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17949         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17950         (mark_primary_bases): New function.
17951         (unmark_primary_bases): Likewise.
17952         * search.c (get_abstract_virtuals_1): Remove.
17953         (dfs_mark_primary_bases): New function.
17954         (mark_primary_bases): Likewise.
17955         (dfs_unmark_primary_bases): Likewise.
17956         (unmark_primary_bases): Likewise.
17957         (dfs_get_pure_virtuals): Likewise.
17959 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17961         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
17962         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
17963         (modify_one_vtable): Adjust.
17964         (fixup_vtable_deltas1): Likewise.
17965         (override_one_vtable): Likewise.
17966         * search.c (get_abstract_virtuals_1): Likewise.
17967         (get_pure_virtuals): Likewise.
17968         (expand_upcast_fixups): Likewise.
17969         * tree.c (debug_binfo): Likewise.
17971         * class.c (build_vtable): Don't return a value.  Don't rebuild
17972         vtables for bases that have already been handled.
17973         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
17974         already been handled.
17975         (modify_one_vtable): Adjust accordingly.
17976         (fixup_vtable_deltas1): Likewise.
17977         (finish_struct_1): Likewise.
17979 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17981         * call.c (build_new_method_call): Also check destructors.