Compile-time improvement: 2/n.
[official-gcc.git] / gcc / cp / ChangeLog
blob10da17a4e78291e09ab65844dc903ae641025026
1 2003-03-15    <gcc@integrable-solutions.net>
2         
3         Compile-time improvement: 2/n.
4         * cp-tree.h (struct cxx_binding): New datatype;
5         (struct lang_identifier): Use it.
6         (LOCAL_BINDING_P): Adjust definition.
7         (INHERITED_VALUE_BINDING_P): Likewise.
8         (BINDING_SCOPE): Likewise.
9         (BINDING_HAS_LEVEL_P): Likewise.
10         (BINDING_VALUE): Likewise.
11         (BINDING_TYPE): Likewise.
12         (IDENTIFIER_VALUE): Likewise.
13         (struct tree_binding): Remove.
14         (TS_CP_BINDING): Likewise.
15         ((union lang_tree_node): Remove field "binding".
16         (cxx_binding_clear): New macro.
17         (binding_for_name): Adjust return type.
18         (qualified_lookup_using_namespace): Adjust prototype.
19         (lookup_using_namespace): Adjust prototype.
20         (cxx_scope_find_binding_for_name): Declare.
21         * cp-tree.def: Remove CPLUS_BINDING definition.
22         * decl.c (push_binding): Adjust local variable type.
23         (add_binding): Likewise.
24         (push_class_binding): Likewise.
25         (pop_binding): Likewise.
26         (poplevel): Likewise.
27         (poplevel_class): Likewise.
28         (free_bindings):  Adjust type.
29         (find_binding): Adjust return type, add a third parameter. Remove
30         non-useful assertion now that we use static typing.  
31         (cxx_scope_find_binding_for_name): New function.
32         (binding_for_name): Use it.  Adjust local variable type. Simplify. 
33         (namespace_binding):  Simplify.
34         (set_namespace_binding): Likewise.
35         (set_identifier_type_value_with_scope): Adjust local variable type.
36         (lookup_tag): Don't type-abuse of local variable 'old'.
37         (lookup_namespace_name): Likewise.  Allocate binding on stack.
38         (select_decl): Adjust prototype.
39         (unqualified_namespace_lookup):  Allocate binding on stack.
40         Don't type-abuse of local variable 'val'.
41         (lookup_name_real): Likewise.
42         (maybe_inject_for_scope_var): Adjust local variable type.
43         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
44         (namespace_binding): Adjust logic, simplify.
45         (BINDING_LEVEL): Adjust definition.
46         (push_class_level_binding): Adjust local variable type.
47         (struct cxx_saved_binding): Adjust field 'binding' type.
48         * decl2.c (ambiguous_decl): Adjust prototype.
49         (lookup_using_namespace): Adjust local variable type.
50         (qualified_lookup_using_namespace): Catch type error and correct
51         ensueing logic error.
52         (do_nonmember_using_decl): Adjust local variable type.  Allocate
53         temporary cxx_binding on stack.
54         (do_toplevel_using_decl): Adjust local variable type.
55         * ptree.c (cxx_print_cxx_binding): New function.
56         (cxx_print_identifier): Use it.
57         (cxx_print_xnode): Delete CPLUS_BINDING case label.
59 2003-03-15  Roger Sayle  <roger@eyesopen.com>
61         * tree.c (count_functions): Fix whitespace.
63 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
65         * Make-lang.in: Update.
67 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
69         PR c++/6440
70         * pt.c (maybe_process_partial_specialization): Handle
71         member class template when enclosing class template is
72         explicit specialized.
73         (most_general_template): Stop looking when DECL is already
74         specialized.
76 2003-03-13  Jason Merrill  <jason@redhat.com>
78         PR c++/9420
79         * search.c (lookup_conversions): Call complete_type here.
80         * call.c (implicit_conversion): Not here.
82 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
84         * decl2.c (do_nonmember_using_decl): Correct handling of
85         simultaneous type/non-type bindings.
87         * call.c (initialize_reference): Remove bogus assertion.
88         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
90 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
92         PR c++/7050
93         * expr.c (cxx_expand_expr): Return const0_rtx for throw
94         expressions.
96 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
98         PR c++/9474
99         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
100         to merge old and new declarations.
102 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
104         * g++.1: Remove.
105         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
106         (cp/g++.1): Build it from scratch in the build tree.
107         (c++.install-man): Depend on it.  Install it from the build tree.
108         (c++.mostlyclean): Clean it.
110 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
112         PR c++/9474
113         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
114         to merge old and new declarations.
116         PR c++/9924
117         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
119 2003-03-11  Jason Merrill  <jason@redhat.com>
121         PR c++/9820
122         * search.c (lookup_member): Fix handling of functions in a class 
123         being defined.
125 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
127         PR c++/8700
128         * call.c (convert_class_to_reference): Adjust usage of
129         splice_viable.
130         (any_viable): Remove.
131         (splice_viable): Combine with any_viable.
132         (print_z_candidates): Avoid printing duplicates.
133         (build_user_type_conversion_1): Adjust usage of splice_viable.
134         (build_new_function_call): Likewise.
135         (build_operator_new_call): Likewise.
136         (build_object_call): Likewise.
137         (build_conditional_expr): Likewise.
138         (build_new_op): Likewise.
139         (build_new_method_call): Likewise.
140         (joust): Remove spurious comment.
141         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
142         * decl2.c (arg_assoc_class): Simplify.
143         * friend.c (add_friend): Likewise.
145 2003-03-11  Jason Merrill  <jason@redhat.com>
147         PR c++/8660
148         * decl2.c (check_classfn): A member template only matches a 
149         member template.
151 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
153         * Make-lang.in (CXX_C_OBJS): Update.
154         * lang-specs.h: Don't define __GNUG__ here.
156 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
158         * call.c (perform_overload_resolution): New function.
159         (build_new_function_call): Use it.
160         (build_operator_new_call): Likewise.
161         (add_candidates): Add explicit_targs and template_only parameters.
162         (build_new_op): Adjust accordingly.
163         * cp-tree.h (build_operator_new_call): New function.
164         (build_function_call_real): Remove.
165         (build_function_call_maybe): Likewise.
166         * init.c (build_new_1): Use build_operator_new_call.
167         * typeck.c (build_function_call_real): Rename to ...
168         (build_function_call): ... this.
170 2003-03-10  Devang Patel  <dpatel@apple.com>
171         
172         PR c++/9394
173         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
175 2003-03-10  Jason Merrill  <jason@redhat.com>
177         PR c++/9798
178         * decl.c (push_using_directive): Push before recursing.
180         PR c++/9868, c++/9524
181         * call.c (resolve_scoped_fn_name): Handle the case of a function
182         pointer member.
184         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
185         argument in the pointer-to-member case.
187 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
189         PR c++/9373
190         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
191         pointers to member functions.
193         PR c++/8534
194         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
195         in pointer-to-member-function types.
197 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
199         * expr.c (cplus_expand_constant): Use C90 prototype style.
200         (cxx_expand_expr): Likewise.
202 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
204         PR c++/9970
205         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
206         functions.
208 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
210         * lang-specs.h (c++-header): Change .pch to .gch.
212 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
214         * cp-tree.h (cxx_init): Update prototype.
215         * lex.c (cxx_init): Similarly.
217 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
219         PR c++/9823
220         * cp-tree.h (begin_mem_initializers): Remove.
221         * parser.c (cp_parser_mem_initializer_list): Inline it here.
222         Do not call finish_mem_initializers if not in a constructor.
223         (cp_parser_class_head): Fix typo in error message.
224         * semantics.c (begin_mem_initializers): Remove.
225         * testsuite/g++.dg/parser/constructor1.C: New test.
227         PR c++/9809
228         * call.c (add_function_candidate): Skip builtin fuctions that have
229         not yet been declared.
231         PR c++/9982
232         * init.c (build_new_1): Correct logic for determining whether or
233         not to use an array cookie.
235         PR c++/9524
236         * parser.c (cp_parser_postfix_expression): Call
237         finish_non_static_data_member, even when processing_template_decl.
239         PR c++/9912
240         * cp-tree.h (is_ancestor): New function.
241         (handle_class_head): Change prototype.
242         * decl2.c (is_namespace_ancestor): Rename to ...
243         (namespace_anecestor): ... this.
244         (set_decl_namespace): Adjust accordingly.
245         (handle_class_head): Remove unncessary parameters.
246         * parser.c (cp_parser_class_head): Check that
247         nested-name-specifiers are used appropriately.
248         
249 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
251         * call.c (reference_binding): Remove REF_IS_VAR parameter.
252         (implicit_conversion): Adjust call to reference_binding.
253         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
254         (initialize_reference): Adjust handling for references bound to
255         rvalues.
256         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
257         prototype.
258         (real_non_cast_lvalue_p): New method.
259         * cvt.c (build_up_reference): Adjust use of
260         make_temporary_var_for_ref_to_temp.
261         * tree.c (real_non_cast_lvalue_p): New method.
262          
263 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
265         * except.c (init_exception_processing): Use C90 prototype style.
266         (cp_protect_cleanup_actions): Likewise.
267         (prepare_eh_type): Likewise.
268         (build_eh_type_type): Likewise.
269         (build_exc_ptr): Likewise.
270         (do_begin_catch): Likewise.
271         (dtor_nothrow): Likewise.
272         (do_end_catch): Likewise.
273         (push_eh_cleanup): Likewise.
274         (decl_is_java_type): Likewise.
275         (choose_personality_routine): Likewise.
276         (initialize_handler_parm): Likewise.
277         (expand_start_catch_block): Likewise.
278         (expand_end_catch_block): Likewise.
279         (begin_eh_spec_block): Likewise.
280         (finish_eh_spec_block): Likewise.
281         (do_allocate_exception): Likewise.
282         (do_free_exception): Likewise.
283         (wrap_cleanups_r): Likewise.
284         (stabilize_throw_expr): Likewise.
285         (build_throw): Likewise.
286         (complete_ptr_ref_or_void_ptr_p): Likewise.
287         (is_admissible_throw_operand): Likewise.
288         (nothrow_libfn_p): Likewise.
289         (can_convert_eh): Likewise.
290         (check_handlers_1): Likewise.
291         (check_handlers): Likewise.
292         
293 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
295         * call.c (merge_conversion_sequences): New function.
296         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
297         (convert_class_to_reference): Correct handling of second
298         standard conversion sequence in a user-defined conversion
299         sequence.
300         (build_user_type_conversion_1): Use merge_conversion_sequences.
301         * cp-tree.def: Add comments for CONV nodes.
302         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
303         
304 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
306         * error.c (init_error): Use C90 prototype style.
307         (dump_scope): Likewise.
308         (dump_qualifiers): Likewise.
309         (dump_template_argument): Likewise.
310         (dump_template_argument_list): Likewise.
311         (dump_template_parameter): Likewise.
312         (dump_template_bindings): Likewise.
313         (dump_type): Likewise.
314         (dump_typename): Likewise.
315         (class_key_or_enum): Likewise.
316         (dump_aggr_type): Likewise.
317         (dump_type_prefix): Likewise.
318         (dump_type_suffix): Likewise.
319         (dump_global_iord): Likewise.
320         (dump_simple_decl): Likewise.
321         (dump_decl): Likewise.
322         (dump_template_decl): Likewise.
323         (dump_function_decl): Likewise.
324         (dump_parameters): Likewise.
325         (dump_exception_spec): Likewise.
326         (dump_function_name): Likewise.
327         (dump_template_parms): Likewise.
328         (dump_char): Likewise.
329         (dump_expr_list): Likewise.
330         (dump_expr): Likewise.
331         (dump_binary_op): Likewise.
332         (dump_unary_op): Likewise.
333         (type_as_string): Likewise.
334         (expr_as_string): Likewise.
335         (decl_as_string): Likewise.
336         (context_as_string): Likewise.
337         (lang_decl_name): Likewise.
338         (cp_file_of): Likewise.
339         (cp_line_of): Likewise.
340         (decl_to_string): Likewise.
341         (expr_to_string): Likewise.
342         (fndecl_to_string): Likewise.
343         (code_to_string): Likewise.
344         (language_to_string): Likewise.
345         (parm_to_string): Likewise.
346         (op_to_string): Likewise.
347         (type_to_string): Likewise.
348         (assop_to_string): Likewise.
349         (args_to_string): Likewise.
350         (cv_to_string): Likewise.
351         (cxx_print_error_function): Likewise.
352         (cp_diagnostic_starter): Likewise.
353         (cp_diagnostic_finalizer): Likewise.
354         (cp_print_error_function): Likewise.
355         (function_category): Likewise.
356         (print_instantiation_full_context): Likewise.
357         (print_instantiation_partial_context): Likewise.
358         (maybe_print_instantiation_context): Likewise.
359         (print_instantiation_context): Likewise.
360         (cp_printer): Likewise.
361         (print_integer): Likewise.
362         (print_non_consecutive_character): Likewise.
363         (locate_error): Likewise.
365 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
367         PR c++/9965
368         * call.c (reference_binding): Add ref_is_var parameter.
369         (implicit_conversion): Adjust call to reference_binding.
370         (initialize_reference): Likewise.
372         PR c++/9400
373         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
374         PARM_DECLs.
376         PR c++/9791
377         * class.c (get_basefndecls): Use lookup_fnfields_1.
379 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
381         PR c++/9188
382         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
383         in error message.
384         (cp_parser_single_declaration): Likewise.
386 2003-03-05  Jason Merrill  <jason@redhat.com>
388         PR c++/9440
389         * call.c (build_conditional_expr): Use convert rather than an
390         explicit NOP_EXPR.
392 2003-03-02  Matt Austern  <austern@apple.com>
394         * decl.c (cp_binding_level): Add static_decls varray member.
395         (add_decl_to_level): Add static/inline namespace scope
396         declarations to static_decls array.
397         (wrapup_global_for_namespace): Pass static_decls only, instead of
398         all decls, to wrapup_global_declarations/check_global_declarations.
399         (push_namespace): Initialize static_decls for ordinary namespaces.
400         (cxx_init_decl_processing): Initialize static_decls for global
401         namespace.
402         
403 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
405         * class.c (end_of_class): Correct thinko.
407 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
409         * config-lang.in: Replace ${libstdcxx_version} by its value.
411 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
413         * cp-tree.h (cxx_saved_binding): Declare.
414         (struct saved_scope): Adjust type of field 'old_binding'.
415         * decl.c (cxx_saved_binding_make): New macro.
416         (struct cxx_saved_binding): Define.
417         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
418         C++ bindings. 
419         (maybe_push_to_top_level): Adjust local variable type.
420         (pop_from_top_level): Likewise.
421         
422 2003-03-04  Tom Tromey  <tromey@redhat.com>
424         * Make-lang.in (c++.tags): New target.
426 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
428         * Make-lang.in: Update.
430 2003-03-03  Jason Merrill  <jason@redhat.com>
432         * decl.c (finish_enum): Do set the type in a template. Simplify.
433         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
435 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
437         PR c++/9878
438         * call.c (convert_class_to_reference): Correct conversion
439         sequences.
440         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
441         (implicit_conversion): Adjust call to reference_binding.
442         (add_candidate): Change type of candidates parameter.
443         (add_function_candidate): Likewise.
444         (add_conv_candidate): Likewise.
445         (build_builtin_candidate): Likewise.
446         (add_builtin_candidate): Likewise.
447         (add_builtin_candidates): Likewise.
448         (add_template_candidate_real): Likewise.
449         (add_template_candidate): Likewise.
450         (add_template_conv_candidate): Likewise.
451         (build_user_type_conversion_1): Adjust accordingly.
452         (build_object_call): Likewise.
453         (build_conditional_expr): Likewise.
454         (add_candidates): Likewise.
455         (build_new_op): Likewise.
456         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
457         (build_new_method_call): Adjust calls to add_function_candidate.
458         (make_temporary_var_for_ref_to_temp): New function.
459         (initialize_reference): Add decl parameter.
460         * class.c (build_rtti_vtbl_entries): Use build_address and
461         build_nop.
462         * cp-tree.h (initialize_reference): Change prototype.
463         (make_temporary_var_for_ref_to_temp): New function.
464         (build_type_conversion): Change prototype.
465         (build_address): New function.
466         (build_nop): Likewise.
467         * cvt.c (cp_convert_to_pointer): Adjust call to
468         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
469         Use build_nop.
470         (convert_to_pointer_force): Use build_nop.
471         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
472         (convert_to_reference): Adjust call to build_type_conversion.
473         (ocp_convert): Likewise.
474         (build_type_conversion): Remove for_sure parameter.
475         * decl.c (grok_reference_init): Use initialize_reference.
476         * typeck.c (build_address): New function.
477         (build_nop): Likewise.
478         (build_unary_op): Use them.
479         (build_ptrmemfunc): Tidy slightly.
480         (convert_for_initialization): Adjust call to
481         initialize_reference.
482         * typeck2.c (store_init_value): Remove #if 0'd code.
483         
484 2003-03-03  Jason Merrill  <jason@redhat.com>
486         * decl.c (start_function): Clear DECL_NUM_STMTS.
488         * class.c (get_vtable_decl): Use vtbl_type_node.
489         (build_primary_vtable): Check for it.
491 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
493         * decl.c (check_initializer): Check for vector_opaque_p.
495 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
497         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
498           invoke an external cpp during compilation.
500 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
502         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
503         that of warning().
504         (start_decl): Likewise.
505         (start_function): Likewise.
507 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
509         * Make-lang.in (CXX_C_OBJS): Update.
511 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
513         PR c++/9892
514         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
515         instantiating it.
517 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
519         * parser.c (cp_parser_init_declarator): Revert opaque
520         vector_opaque_p change.
521         Do not include target.h.
523 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
525         PR c++/9879
526         * cp-tree.h (build_zero_init): Add parameter.
527         * decl.c (cp_finish_decl): Adjust call.
528         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
529         calls.
530         (build_default_init): Add nelts parameter.  Adjust calls to
531         build_zero_init.
532         (build_new_1): Adjust call to build_default_init.
533         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
534         
535 2003-02-26  Devang Patel  <dpatel@apple.com>
537         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if required.
538         Postpone enum setting for template decls.
539         (build_enumerator): Delay copying value node until finish_enum (). Remove
540         #if 0'ed code.
541         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
542         (tsubst_copy): Add check for enum type.
543         
544 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
546         PR c++/9683
547         * decl2.c (prune_vars_needing_no_initialization): Do not throw
548         away initializations for DECL_EXTERNAL VAR_DECLs.
549         (finish_file): Adjust accordingly.
550         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
552 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
554         * decl.c (add_binding): Time TV_NAME_LOOKUP.
555         (push_class_binding): Likewise.
556         (set_namespace_binding): Likewise.
558 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
560         PR c++/9836
561         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
562         specializations back to the main template.
563         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
564         * pt.c (resolve_typename_type): Likewise.
566 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
568         PR c++/9778
569         * pt.c (tsubst_copy_and_build): For a templated function inside a
570         scope, process template arguments.
572 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
574         PR c++/9602
575         * typeck2.c (abstract_virtuals_error): Don't check when
576         TYPE is still template parameter dependent.
578 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
580         PR c++/5333
581         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
582         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
583         * pt.c (instantiate_class_template): Don't try to instantiate
584         dependent types.
585         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
586         
587 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
589         PR c++/9749
590         * decl.c (grokdeclarator): Do not allow parameters with variably
591         modified types.
593 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
595         * search.c (bfs_walk_grow): Remove. Fold into ...
596         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
597         in previous patch.
599 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
601         PR c++/9729
602         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
603         when the G++ 3.2 ABI prevents correct compilation.
605 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
607         Change base class access representation. Share virtual base
608         binfos.
609         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
610         call.
611         * cp/class.c (build_base_path): Likewise.
612         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
613         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
614         (make_new_vtable): Adjust.
615         (force_canonical_binfo_r): Delete.
616         (force_canonical_binfo): Delete.
617         (mark_primary_virtual_base): Delete.
618         (dfs_unshared_virtual_bases): Delete.
619         (mark_primary_bases): Adjust.
620         (maybe_warn_about_overly_private_class): Adjust.
621         (dfs_base_derived_from): Delete.
622         (base_derived_from): Follow the inheritance chain.
623         (struct find_final_overrider_data): Add vpath member.
624         (dfs_find_final_overrider): Adjust.
625         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
626         (find_final_overrider): Adjust.
627         (update_vtable_entry_for_fn): Adjust.
628         (modify_all_vtables): Adjust.
629         (walk_subobject_offsets): Adjust.
630         (layout_nonempty_base_or_field): Adjust.
631         (layout_empty_base): Remove last parameter. Adjust.
632         (build_base_field): Adjust.
633         (build_base_fields): Adjust.
634         (propagate_binfo_offsets): Remove last parameter. Adjust.
635         (dfs_set_offset_for_unshared_vbases): Delete.
636         (layout_virtual_bases): Adjust.
637         (finish_struct_1): Adjust.
638         (init_class_processing): Don't init access nodes.
639         (dfs_get_primary_binfo): Delete.
640         (get_primary_binfo): Adjust.
641         (dump_class_hierarchy_r): Remove most derived arg, add IGO
642         parameter. Adjust.
643         (dump_class_hierarchy): Adjust.
644         (finish_vtbls): Adjust.
645         (get_original_base): Delete.
646         (build_vtt_inits): Adjust.
647         (dfs_build_secondary_vptr_vtt_inits): Adjust.
648         (dfs_ctor_vtable_bases_queue_p): Adjust.
649         (build_ctor_vtbl_group): Adjust.
650         (dfs_accumulate_vtbl_inits): Adjust.
651         (build_vtbl_initializer): Adjust.
652         (build_vbase_offset_vtbl_entries): Adjust.
653         (add_vcall_offset_vtbl_entries_1): Adjust.
654         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
655         (access_*_node): Remove.
656         (CANONICAL_BINFO): Delete.
657         (BINFO_UNSHARED_MARKED): Remove.
658         (BINFO_MARKED): Set LANG_FLAG_0 directly.
659         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
660         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
661         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
662         Delete.
663         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
664         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
665         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
666         Delete.
667         (BINFO_DEPENDENT_BASE_P): New.
668         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
669         index.
670         (markedp, unmarkedp): Adjust.
671         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
672         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
673         find_vbase_instance, binfo_for_vbase): Delete.
674         (copied_binfo, original_binfo): Declare.
675         (finish_base_specifier): Add virtual_p arg.
676         (unshare_base_binfos): Delete.
677         (copy_base_binfos): Declare.
678         (reverse_path): Delete.
679         * cp/decl.c (xref_basetypes): Access and virtuality passed
680         differently. Don't copy direct base binfos here. Call
681         copy_base_binfos.
682         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
683         (initialize_vtbl_ptrs): Adjust.
684         (expand_member_init): Adjust.
685         * cp/parser.c (cp_parser_base_specifier): Adjust.
686         * cp/pt.c (instantiate_class_template): Adjust.
687         (get_template_base_recursive): Adjust.
688         * cp/rtti.c (get_pseudo_ti_init): Adjust.
689         (get_pseudo_ti_desc): Adjust.
690         * cp/tree.c (unshare_base_binfos): Rename to ...
691         (copy_base_binfos): ... here, reimplement.
692         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
693         (reverse_path): Remove.
694         * cp/typeck.c (get_delta_difference): Adjust error messages.
695         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
696         * cp/search.c (lookup_base_r): Adjust.
697         (dynamic_cast_base_recurse): Adjust.
698         (canonical_binfo): Remove.
699         (dfs_canonical_queue): Remove.
700         (dfs_assert_unmarked_p): Remove.
701         (assert_canonical_unmarked): Remove.
702         (shared_marked_p, shared_unmarked_p): Remove.
703         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
704         (dfs_access_in_type): Adjust.
705         (access_in_type): Adjust.
706         (dfs_accessible_queue_p): Adjust.
707         (dfs_accessible_p): Adjust.
708         (is_subobject_of_p_1, is_subobject_of_p): Remove.
709         (struct lookup_field_info): Remove from_dep_base_p field.
710         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
711         (lookup_field_r): Remove dependent base code.
712         (lookup_member): Likewise.
713         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
714         (dfs_unmarked_real_bases_queue_p): Remove.
715         (dfs_marked_real_bases_queue_p): Remove.
716         (dfs_skip_vbases): Remove.
717         (dfs_get_pure_virtuals): Adjust.
718         (markedp, unmarkedp): Adjust.
719         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
720         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
721         (dfs_unmark): Adjust.
722         (dfs_get_vbase_types):Remove.
723         (dfs_build_inheritance_graph_order): Remove.
724         (get_vbase_types): Remove
725         (dfs_find_vbase_instance): Remove.
726         (find_vbase_instance): Remove.
727         (dfs_debug_unmarkedp): Adjust.
728         (dependent_base_p): Remove.
729         (dfs_push_type_decls): Adjust.
730         (dfs_push_decls): Adjust.
731         (dfs_no_overlap_yet): Adjust.
732         (copied_binfo): New function.
733         (original_binfo): New function.
734         (binfo_for_vbase): Remove.
736 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
738         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
739         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
740         vectors, for speed.
742 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
744         PR c++/9704
745         * class.c (layout_class_type): In the 3.2 ABI, take into account
746         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
748 2003-02-18  Matt Austern <austern@apple.com>
749         
750         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
751         nothing for C++.
752         * cp/decl.c (wrapup_globals_for_namespace): Remove special
753         handling of global namespace.
754         
755 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
757         * cp-tree.h (rid_to_yy): Delete.
758         (C_RID_YYCODE): Delete.
759         (finish_file): Delete redundant declaration.
761 2003-02-18  Jason Merrill  <jason@redhat.com>
763         PR c++/9623
764         * decl.c (reshape_init): Don't mess with initializer labels.
766         PR c++/9485
767         * parser.c (cp_parser_postfix_expression): Set idk properly for
768         object->scope::member.
770 2003-02-18  Ben Elliston  <bje@redhat.com>
772         PR other/7350
773         * decl.c (duplicate_decls): Fix typo in comment.
775 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
777         PR debug/9717
778         * class.c (build_base_field): Mark fields for base classes with
779         DECL_IGNORED_P.
781 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
783         PR c++/9457
784         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
785         CONSTRUCTOR_ELTS only once.
787 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
789         PR c++/9459
790         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
791         (dump_type_suffix): Likewise.
793 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
795         * search.c: ANSIfy function declarations and definitions.
796         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
797         * call.c (build_method_call, resolve_scoped_fn_name,
798         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
799         calls.
800         * class.c (handle_using_decl): Likewise.
801         * decl.c (make_typename_type, make_unmound_class_template,
802         start_decl, compute_array_index_type): Likewise.
803         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
804         * init.c (expand_member_init, build_member_call): Likewise.
805         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
806         resolve_typename_type): Likewise.
807         * typeck.c (lookup_destructor, finish_class_member_access_exprm
808         build_prememfunc_access_expr): Likewise.
810 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
812         * decl2.c: Include "timevar.h".
813         (namespace_ancestor): Time name lookup.
814         (add_using_namespace): Likewise.
815         (lookup_using_namespace): Likewise.
816         (qualified_lookup_using_namespace): Likewise.
817         (decl_namespace): Likewise.
818         (lookup_arg_dependent): Likewise.
819         * lex.c (do_identifier): Likewise.
820         (do_scoped_id): Likewise.
821         * pt.c (lookup_template_class): Likewise.
823 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
825         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
826         
827 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
829         * decl.c: Include "timevar.h".
830         (poplevel): Time name lookup.
831         (find_binding): Likewise.
832         (push_namespace): Likewise.
833         (pop_nested_namespace): Likewise.
834         (store_bindings): Likewise.
835         (maybe_push_to_top_level): Likewise.
836         (pop_from_top_level): Likewise.
837         (push_local_name): Likewise.
838         (pushtag): Likewise.
839         (pushdecl): Likewise.
840         (pushdecl_with_scope): Likewise.
841         (pushdecl_namespace_level): Likewise.
842         (pushdecl_top_level): Likewise.
843         (pushdecl_class_level): Likewise.
844         (push_class_level_binding): Likewise.
845         (push_using_decl): Likewise.
846         (push_using_directive): Likewise.
847         (push_overloaded_decl): Likewise.
848         (lookup_label): Likewise.
849         (define_label): Likewise.
850         (lookup_tag): Likewise.
851         (lookup_tag_reverse): Likewise.
852         (lookup_namespace_name): Likewise.
853         (select_decl): Likewise.
854         (unqualified_namespace_lookup): Likewise.
855         (lookup_name_real): Likewise.
856         (lookup_name_current_level): Likewise.
857         (lookup_type_current_level): Likewise.
858         (maybe_inject_for_scope_var): Likewise.
859         (xref_tag): Likewise.
861         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
862         
863 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
865         * decl.c (build_enumerator):  Remove unneeded test.
867 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
869         * cp-tree.h (struct lang_type_header): Make all fields unsigned
870         char.
872 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
874         PR c++/7129
875         * call.c (z_candidate): Add args.
876         (convert_class_to_reference): Set it.
877         (implicit_conversion): Tidy.
878         (add_candidate): Add args parameter.
879         (add_function_candidate): Adjust call to add_candidate.
880         (add_conv_candidate): Likewise.
881         (build_builtin_candidate): Likewise.
882         (build_user_type_conversion_1): Eliminate wasteful tree_cons
883         usage.
884         (build_new_function_call): Likewise.
885         (build_object_call): Likewise.
886         (add_candidates): New function.
887         (build_new_op): Use it.
888         (covert_like_real): Adjust call to build_over_call.
889         (build_over_call): Remove args parameter.
890         * operators.def: Add <?= and >?=.
892 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
894         * typeck.c (build_indirect_ref): Don't check flag_volatile.
896 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
898         PR c++/8849
899         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
901 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
903         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
904         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
905         (BINFO_LANG_ELTS): New #define.
906         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
908 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
910         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
912 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
914         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
915         for class types.
916         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
917         rather than TYPE_LANG_FLAG_0.
918         (TYPE_BUILT_IN): Remove.
919         (TYPE_DEPENDENT_P): New macro.
920         (TYPE_DEPENDENT_P_VALID): Likewise.
921         (lang_type_class): Add fields_readonly.
922         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
923         * pt.c (dependent_type_p_r): New function, split out from ...
924         (dependent_type_p): ... here.  Memoize results.
925         * search.c (dependent_base_p): Use dependent_type_p, not
926         uses_template_parms.
927         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
928         for class types.
930 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
932         * call.c (build_field_call): Use build_new_op, not build_opfncall.
933         (prep_operand): New function.
934         (build_new_op): Use it.  Remove dead code.
935         * class.c (pushclass): Change "modify" parameter type from int to
936         bool.
937         (currently_open_class): Use same_type_p, not pointer equality.
938         (push_nested_class): Adjust calls to pushclass, remove modify
939         parameter.
940         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
941         (pushclass): Change prototype.
942         (push_nested_class): Likewise.
943         (grokoptypename): Remove.
944         (build_opfncall): Remove.
945         (value_dependent_expression_p): Declare.
946         (resolve_typename_type): Likewise.
947         (resolve_typename_type_in_current_instantiation): Likewise.
948         (enter_scope_of): Remove.
949         (tsubst): Remove.
950         (tsubst_expr): Likewise.
951         (tsubst_copy): Likewise.
952         (tsubst_copy_and_build): Likewise.
953         * decl.c (warn_about_implicit_typename_lookup): Remove.
954         (finish_case_label): Return error_mark_node for erroneous labels.
955         (start_decl): Adjust calls to push_nested_class.
956         (grokfndecl): Call push_scope/pop_scope around call to
957         duplicate_decls.
958         (grokdeclarator): Do not call tsubst.
959         (start_function): Adjust calls to push_nested_class.
960         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
961         (check_classfn): Use push_scope/pop_scope around type comparisions.
962         (grokoptypename): Remove.
963         (push_sscope): Adjust call to push_nested_class.
964         * error.c (dump_type): Show cv-qualification of typename types.
965         * init.c (build_member_call): Use build_new_op, not
966         build_opfncall.
967         * method.c (build_opfncall): Remove.
968         * parser.c (cp_parser): Add allow_non_constant_expression_p and
969         non_constant_expression_p.
970         (cp_parser_constant_expression): Adjust prototype.
971         (cp_parser_resolve_typename_type): Remove.
972         (cp_parser_non_constant_expression): New function.
973         (cp_parser_non_constant_id_expression): Likewise.
974         (cp_parser_new): Set allow_non_constant_expression_p and
975         non_constant_expression_p.
976         (cp_parser_primary_expression): Reject `this' and `va_arg' in
977         constant-expressions.  Note that dependent names aren't really
978         constant.
979         (cp_parser_postfix_expression): Reject conversions to non-integral
980         types in constant-expressions.  Neither are increments or
981         decrements.
982         (cp_parser_unary_expression): Reject increments and decrements in
983         constant-expressions.
984         (cp_parser_direct_new_declarator): Adjust call to
985         cp_parser_constant_expression.
986         (cp_parser_cast_expression): Reject conversions to non-integral
987         types in constant-expressions.
988         (cp_parser_assignment_expression): Rejects assignments in
989         constant-expressions.
990         (cp_parser_expression): Reject commas in constant-expressions.
991         (cp_parser_labeled_statement): Adjust call to
992         cp_parser_constant_expression.
993         (cp_parser_direct_declarator): Simplify array bounds, even in
994         templates, when they are non-dependent.  Use
995         resolve_typename_type, not cp_parser_resolve_typename_type.
996         (cp_parser_class_head): Use resolve_typename_type, not
997         cp_parser_resolve_typename_type.
998         (cp_parser_member_declaration): Adjust call to
999         cp_parser_constant_expression.
1000         (cp_parser_constant_initializer): Likewise.
1001         (cp_parser_constructor_declarator): Use resolve_typename_type, not
1002         cp_parser_resolve_typename_type.
1003         (cp_parser_late_parsing_default_args): Adjust call to
1004         push_nested_class.
1005         * pt.c (tsubst): Give it internal linkage.
1006         (tsubst_expr): Likewise.
1007         (tsubst_copy): Likewise.
1008         (tsubst_copy_and_build): Likewise.
1009         (push_access_scope_real): Likewise.
1010         (tsubst_friend_class): Likewise.
1011         (instantiate_class_template): Adjust call to pushclass.
1012         (value_dependent_expression_p): Give it external linkage.
1013         Robustify.
1014         (resolve_typename_type): New function.
1015         * semantics.c (finish_call_expr): Use build_new_op, not
1016         build_opfncall.
1017         (begin_constructor_declarator): Remove.
1018         (begin_class_definition): Adjust call to pushclass.
1019         (enter_scope_of): Remove.
1020         * typeck.c (comptypes): Resolve typename types as appropriate.
1021         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
1022         (build_x_compound_expr): Likewise.
1023         (build_modify_expr): Likewise.
1024         (build_x_modify_expr): Likewise.
1025         * typeck2.c (build_x_arrow): Likewise.
1026         
1027 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
1029         * pt.c (last_pending_template) Declare GTY().
1031 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1033         PR c++/8591
1034         * parser.c (cp_parser_elaborated_type_specifier): Convert
1035         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
1036         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
1038 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
1040         PR c++/9437
1041         * pt.c (unify): Don't unify '*T' with 'U C::*'.
1043         PR c++/3902
1044         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
1045         inside a declarator.
1047 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
1049         * class.c (update_vtable_entry_for_fn): Add index parameter.
1050         Generate vcall thunk for covariant overriding from a virtual
1051         primary base.
1052         (dfs_modify_vtables): Adjust.
1054 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
1056         PR c++/9403
1057         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
1058         template keyword.
1059         (cp_parser_base_specifier): Look for and consume a
1060         TEMPLATE keyword. Replace switch with array index.
1062         PR c++/795
1063         * semantics.c (finish_non_static_data_member): Remember the
1064         field's type even in a template.
1066         PR c++/9415
1067         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
1068         already scoped.
1069         
1070         PR c++/8545
1071         * parser.c (cp_parser_cast_expression): Be more tentative.
1073 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1075         * cp-tree.h (flagged_type_tree_s): Remove.
1076         (check_for_new_type): Likewise.
1077         * typeck2.c (check_for_new_type): Likewise.
1079 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
1081         * dump.c: ANSIfy function declarations and definitions.
1083         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
1085 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1087         PR c++/9354
1088         * init.c (build_new): Set the type of the new-expression, even
1089         when processing_templte_decl.
1091         PR c++/9216
1092         * parser.c (cp_parser_primary_expression): Improve error message
1093         for templates used in an expression context.
1095         PR c++/8696
1096         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
1097         parse when encountering "typedef".
1099 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
1101         * class.c, parser.c: ANSIfy function definitions and declarations.
1103 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1105         PR c++/9328
1106         * error.c (dump_decl): For an OVERLOAD, just print the name of the
1107         function; it doesn't make sense to try to print its type.
1108         * semantics.c (finish_typeof): Issue errors about invalid uses.
1110         PR c++/9298
1111         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
1112         function.
1113         (cp_parser_expression_statement): Use it.
1114         (cp_parser_explicit_instantiation): Likewise.
1115         * pt.c (do_decl_instantiation): Improve error handling logic.
1116         
1117 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
1119         PR c++/9384
1120         * parser.c (cp_parser_using_declaration): Issue error messages
1121         about name resolution failures here.
1123         PR c++/9388
1124         * class.c (currently_open_derived_class): Use dependent_type_p.
1125         * cp-tree.h (dependent_type_p): New function.
1126         (dependent_template_arg_p): Likewise.
1127         (dependent_template_p): Likewise.
1128         (type_dependent_expression_p): Likewise.
1129         * parser.c (cp_parser_dependent_type_p): Remove.
1130         (cp_parser_value_dependent_type_p): Likewise.
1131         (cp_parser_type_dependent_expression_p): Likewise.
1132         (cp_parser_dependent_template_arg_p): Likewise.
1133         (cp_parser_dependent_template_id_p): Likewise.
1134         (cp_parser_dependent_template_p): Likewise.
1135         (cp_parser_diagnose_invalid_type_name): Replace
1136         cp_parser_dependent_type_p with dependent_type_p, etc.
1137         (cp_parser_primary_expresion): Likewise.
1138         (cp_parser_nested_name_specifier_opt): Likewise.
1139         (cp_parser_postfix_expression): Likewise.
1140         (cp_parser_unary_expression): Likewise.
1141         (cp_parser_template_name): Likewise.
1142         (cp_parser_class_name): Likewise.
1143         (cp_parser_lookup_name): Likewise.
1144         * pt.c (dependent_type_p): New function.
1145         (value_dependent_expression_p): Likewise.
1146         (type_dependent_expression_p): Likewise.
1147         (dependent_template_arg_p): Likewise.
1148         (dependent_template_id_p): Likewise.
1149         (dependent_template_p): Likewise.
1150         
1151         PR c++/9285
1152         PR c++/9294
1153         * parser.c (cp_parser_simple_declaration): Return quickly when
1154         encountering errors.
1156 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1158         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
1160 2003-01-17  Jason Merrill  <jason@redhat.com>
1162         PR c++/9167, c++/9358
1163         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
1165 2003-01-17  Jason Merrill  <jason@redhat.com>
1167         PR c++/9342
1168         * call.c (build_conditional_expr): Always do lvalue-rvalue
1169         conversion.
1171 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
1173         PR c++/9294
1174         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
1175         * cp-tree.h (BASELINK_BINFO): Adjust.
1176         (BASELINK_FUNCTIONS): Likewise.
1177         (BASELINK_ACCESS_BINFO): Likewise.
1178         (tree_baselink): New structure.
1179         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
1180         (lang_tree_node): Add baselink.
1181         * decl.c (cp_tree_node_structure): Add BASELINK case.
1182         * search.c (build_baselink): Adjust.
1183         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
1184         test from TREE_LIST case.
1186         PR c++/9272
1187         * parser.c (cp_parser_constructor_declarator_p): Do not assume
1188         that a constructor cannot be declared outside of its own class.
1189         
1190         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
1191         be resolved, neither can the qualified name.
1193         * rtti.c (get_pseudo_ti_desc): Fix thinko.
1195 2003-01-16  Jason Merrill  <jason@redhat.com>
1197         PR c++/8564
1198         * init.c (build_vec_init): Re-add maxindex parm.
1199         (perform_member_init, build_aggr_init): Pass it.
1200         (build_new_1): Pass it. Use an incomplete array type for full_type.
1201         * typeck.c (build_modify_expr): Pass it.
1202         * cp-tree.h: Adjust.
1204 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
1206         * cp-tree.h (tsubst_copy_and_build): New declaration.
1207         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
1208         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
1209         (tsubst_copy_and_build): New function.
1211 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
1213         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
1214         (PARTIAL_INSTANTIATION_P): Remove.
1215         (IMPLICIT_TYPENAME_P): Likewise.
1216         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
1217         (build_typename_type): Remove declaration.
1218         (parmlist_is_exprlist): Likewise.
1219         * decl.c (build_typename_type): Make it static, remove third
1220         parameter.
1221         (push_class_binding): Don't do implicit typename stuff.
1222         (make_typename_type): Likewise.
1223         (lookup_name_real): Likewise.
1224         (grokdeclarator): Don't try to convert declarations into
1225         initializations.  Don't do implicit typename stuff.
1226         (parmlist_is_exprlist): Remove.
1227         (xref_basetypes): Simplify.
1228         * decl2.c (grokfield): Don't try to convert declarations into
1229         initializations.
1230         (build_anon_union_vars): Do this while processing templates, too.
1231         (finish_anon_union): Likewise.
1232         * error.c (dump_type): Remove implicit typename handling.
1233         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
1234         (cp_parser_primary_expression): Correct handling of names not
1235         found by unqualified name lookup in templates.
1236         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
1237         of types when possible.
1238         (cp_parser_simple_declaration): Complain intelligently about some
1239         invalid declarations.
1240         (cp_parser_member_declaration): Likewise.
1241         (cp_parser_constructor_declarator_p): Don't check when we're in a
1242         function scope.
1243         * pt.c (instantiate_class_template): Remove
1244         PARTIAL_INSTANTIATION_P gunk.
1245         * search.c (lookup_field_r): Don't build implicit typenames.
1246         (marked_pushdecls_p): Don't enter dependent base types.
1247         (unmarked_pushdecls_p): Likewise.
1248         * semantics.c (begin_class_definition): Remove implicit typename
1249         stuff.
1251 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
1253         PR c++/9212
1254         * parser.c (cp_parser_direct_declarator): If accepting either
1255         abstract or named, the name must be an unqualified-id.
1257 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1259         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
1261 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1263         * decl2.c (check_classfn): Fix uninitialized warning.
1264         (build_anon_union_vars): Likewise.
1265         * pt.c (tsubst_copy): Likewise.
1267 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
1269         Further conform g++'s __vmi_class_type_info to the C++ ABI
1270         specification.
1271         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
1272         the specification.
1273         (class_hint_flags): Likewise.
1275 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1277         * config-lang.in: Add semantics.c to gtfiles.
1278         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
1279         (saved_scope): Likewise.
1280         (type_lookups): Remove.
1281         (deferred_access): New structure.
1282         (type_access_control): Remove.
1283         (save_type_access_control): Likewise.
1284         (reset_type_access_control): Likewise.
1285         (decl_type_access_control): Likewise.
1286         (push_deferring_access_checks): Declare.
1287         (resume_deferring_access_checks): Likewise.
1288         (stop_deferring_access_checks): Likewise.
1289         (pop_deferring_access_checks): Likewise.
1290         (get_deferred_access_checks): Likewise.
1291         (pop_to_parent_deferring_access_checks): Likewise.
1292         (perform_deferred_access_checks): Likewise.
1293         (perform_or_defer_access_check): Likewise.
1294         * decl.c (make_typename_type): Use perform_or_defer_access_check.
1295         (make_unbound_class_template): Likewise.
1296         (grokdeclarator): Don't call decl_type_access_control.
1297         * parser.c (cp_parser_context): Remove deferred_access_checks
1298         and deferring_access_checks_p fields.
1299         (cp_parser_context_new): Adjust.
1300         (cp_parser): Remove access_checks_lists.
1301         (cp_parser_defer_access_check): Remove.
1302         (cp_parser_start_deferring_access_checks): Remove.
1303         (cp_parser_stop_deferring_access_checks): Remove.
1304         (cp_parser_perform_deferred_access_checks): Remove.
1305         (cp_parser_nested_name_specifier_opt): Use new deferred access
1306         functions.
1307         (cp_parser_simple_declaration): Likewise.
1308         (cp_parser_template_id): Likewise.
1309         (cp_parser_function_definition): Likewise.
1310         (cp_parser_class_specifier): Likewise.
1311         (cp_parser_lookup_name): Likewise.
1312         (cp_parser_single_declaration): Likewise.
1313         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
1314         (cp_parser_parse_tentatively): Likewise.
1315         (cp_parser_parse_definitely): Likewise.
1316         (yyparse): Likewise.
1317         (cp_parser_init_declarator): Remove access_checks parameter.
1318         Use new deferred access functions.
1319         (cp_parser_function_definition_from_specifiers_and_declarator):
1320         Likewise.
1321         (cp_parser_class_head): Remove deferring_access_checks_p and
1322         saved_access_checks parameters.  Use new deferred access functions.
1323         (cp_parser_member_specification_opt): Don't call
1324         reset_type_access_control.
1325         * search.c (type_access_control): Remove.
1326         * semantics.c: Include "gt-cp-semantics.h".
1327         (deferred_type_access_control): Remove.
1328         (deferred_access_stack): New variable.
1329         (deferred_access_free_list): Likewise.
1330         (push_deferring_access_checks): New function.
1331         (resume_deferring_access_checks): Likewise.
1332         (stop_deferring_access_checks): Likewise.
1333         (pop_deferring_access_checks): Likewise.
1334         (get_deferred_access_checks): Likewise.
1335         (pop_to_parent_deferring_access_checks): Likewise.
1336         (perform_deferred_access_checks): New function, adapted from
1337         cp_parser_perform_deferred_access_checks.
1338         (perform_or_defer_access_check): New function, adapted from
1339         cp_parser_defer_access_check.
1340         (current_type_lookups): Remove.
1341         (deferred_type_access_control): Likewise.
1342         (decl_type_access_control): Likewise.
1343         (save_type_access_control): Likewise.
1344         (reset_type_access_control): Likewise.
1345         (begin_function_definition): Adjust.
1346         (begin_class_definiton): Likewise.
1348 2003-01-13  Jason Merrill  <jason@redhat.com>
1350         PR c++/8748
1351         * class.c (build_base_path): Take the address before calling save_expr.
1353         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
1354         all the ambiguous conversions are bad.
1356         * class.c (maybe_warn_about_overly_private_class): Don't stop
1357         searching when we find a nonprivate method.
1359         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
1361 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
1363         * cp-tree.h (get_arglist_len_in_bytes): Remove.
1365         PR c++/9264
1366         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
1367         typeame types more robustly.
1369 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
1371         * parser.c:  Fix comment typos.
1373 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1375         PR c++/9099
1376         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
1377         an object_type which is not a class type.
1379 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
1381         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
1382         (cp_parser_late_parsing_default_args): Likewise.
1384 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
1386         * cfns.gperf: ANSIfy function declarations.
1387         * cfns.h: Regenerate.
1388         * cp-tree.h: ANSIfy function declarations.
1390 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
1392         * cp-tree.h (reparse_absdcl_as_expr): Remove.
1393         (reparse_absdcl_as_casts): Likewise.
1394         (reparse_decl_as_expr): Likewise.
1395         (finish_decl_parsing): Likewise.
1396         * decl2.c (reparse_absdcl_as_expr): Remove.
1397         (reparse_absdcl_as_casts): Likewise.
1398         (repase_decl_as_expr): Likewise.
1399         (finish_decl_parsing): Likewise.
1401         PR c++/9128
1402         PR c++/9153
1403         PR c++/9171
1404         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
1405         function.
1406         (cp_parser_nested_name_specifier_opt): Correct the
1407         check_dependency_p false.
1408         (cp_parser_postfix_expression): Fix formatting.
1409         (cp_parser_decl_specifier_seq): Avoid looking for constructor
1410         declarators when possible.
1411         (cp_parser_template_id): Avoid performing name-lookup when
1412         possible.
1413         (cp_parser_class_head): Do not count specializations when counting
1414         levels of templates.
1415         (cp_parser_constructor_declarator_p): Return immediately if
1416         there's no chance that the tokens form a constructor declarator.
1417         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
1418         expression with reference type.
1419         (get_tinfo_decl_dynamic): Do not return an expression with
1420         reference type.
1421         (build_typeid): Add comment.  Do not return an expression with
1422         reference type.
1423         * typeck.c (build_class_member_access_expr): Improve handling of
1424         conditionals and comma-expressions as objects.
1426 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
1428         * cfns.gperf: ANSIfy function declarations.
1429         * cfns.h: Regenerate.
1430         * cp-tree.h: ANSIfy function declarations.
1431         * parser.c: ANSIfy function declarations & definitions.
1433         * decl.c (bad_specifiers): Fix parameter order error I introduced.
1435 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1437         Merge from pch-branch:
1439         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
1441         Merge to tag pch-merge-20030102:
1442         
1443         * semantics.c (finish_translation_unit): Don't call finish_file.
1444         * parser.c: Don't include ggc.h.
1445         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
1446         read first token here.  Don't allow PCH files after the first
1447         token is read.
1448         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
1449         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
1450         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
1451         (cp_parser_late_parsing_for_member): Don't duplicate call to
1452         cp_lexer_set_source_position_from_token.
1453         (cp_parser_late_parsing_default_args): Likewise.
1454         (yyparse): Call finish_file after clearing the_parser.
1456         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
1458         * Make-lang.in: Remove $(GGC_H) from all dependencies.
1459         (CXX_TREE_H): Add $(GGC_H).
1460         * class.c: Don't include ggc.h. 
1461         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
1462         (method_name_cmp): Likewise.
1463         (resort_data): New variable.
1464         (resort_field_decl_cmp): New.
1465         (resort_method_name_cmp): New.
1466         (resort_sorted_fields): New.
1467         (resort_type_method_vec): New.
1468         (finish_struct_methods): Delete cast.
1469         (finish_struct_1): Delete cast.
1470         * cp-tree.h: Include ggc.h.
1471         (struct lang_type_class): Add reorder attribute to field `methods'.
1472         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
1473         (resort_sorted_fields): New prototype.
1474         (resort_type_method_vec): New prototype.
1475         * call.c: Don't include ggc.h.
1476         * decl.c: Likewise.
1477         * decl2.c: Likewise.
1478         * init.c: Likewise.
1479         * lex.c: Likewise.
1480         * method.c: Likewise.
1481         * optimize.c: Likewise.
1482         * parse.y: Likewise.
1483         * pt.c: Likewise.
1484         * repo.c: Likewise.
1485         * search.c: Likewise.
1486         * semantics.c: Likewise.
1487         * spew.c: Likewise.
1488         * tree.c: Likewise.
1490         * lang-specs.h: Remove comment.
1492         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
1494         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
1495         (operator_name_info): Mark to be saved for PCH, specify size.
1496         (assignment_operator_name_info): Likewise.
1498         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
1500         * decl.c (anon_cnt): Mark to be saved for PCH.
1502         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
1504         * lex.c  (init_reswords): Delete now-untrue comment.
1505         Allocate ridpointers using GGC.
1507         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
1509         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
1511         * g++spec.c (lang_specific_driver): Don't include standard
1512         libraries in `added'.
1514         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
1516         * decl2.c (finish_file): Call c_common_write_pch.
1517         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
1519         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
1521         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
1522         files when using g++.
1523         * lang-specs.h: Handle compiling C++ header files.
1525 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1527         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
1529 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1531         * pt.c (push_access_scope_real): Call push_to_top_level for
1532         function in namespace scope.
1533         (pop_access_scope): Call pop_from_top_level for function in
1534         namespace scope.
1536 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1538         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
1540 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
1542         * Make-lang.in (c++.install-common, c++.install-man,
1543         c++.uninstall): Prepend $(DESTDIR) to destination paths in
1544         all (un)installation commands.
1545         (c++.install-common): Rewrite $(LN) commands to support
1546         DESTDIR with "ln" as well as with "ln -s".
1548 2003-01-08  Jason Merrill  <jason@redhat.com>
1550         * parser.c (cp_parser_primary_expression): See through explicitly
1551         scoped ALIAS_DECLs, too.
1553 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
1555         * decl.c: Remove some #if 0 code.
1557         * decl.c: ANSIfy function declarations.
1559 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
1561         * parser.c (cp_parser_asm_definition): Correct handling of omitted
1562         operands.
1564 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1566         PR c++/9030
1567         * decl.c (make_typename_type): Check access only when tf_error.
1568         (make_unbound_class_template): Likewise.
1569         * pt.c (saved_access_scope): New variable.
1570         (push_access_scope_real): New function.
1571         (push_access_scope): Likewise.
1572         (pop_access_scope): Likewise.
1573         (tsubst_default_argument): Use them.
1574         (instantiate_template): Likewise.
1575         (regenerate_decl_from_template): Likewise.
1576         (instantiate_decl): Likewise.
1577         (get_mostly_instantiated_function_type): Likewise.
1579 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
1581         * tree.c: Delete bogus #if 0 code.
1583 2003-01-07  Andreas Schwab  <schwab@suse.de>
1585         * class.c (layout_class_type): Don't use
1586         PCC_BITFIELD_TYPE_MATTERS if not defined.
1588 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
1590         PR c++/9165
1591         * decl2.c (build_cleanup): Mark the object as used.
1593         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
1594         (hash_local_specialization): New function.
1595         (register_local_specialization): Revert 2003-01-05 change.
1596         (instantiate_decl): Use hash_local_specialization when creating
1597         the local_specializations table.
1598         
1599         * decl2.c (mark_used): Do not synthesize thunks.
1601         * class.c (layout_class_type): Correct handling of unnamed
1602         bitfields wider than their types.
1604         PR c++/9189
1605         * parser.c (cp_parser): Remove default_arg_types.  Update
1606         documentation for unparsed_functions_queues.
1607         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
1608         parameter.
1609         (cp_parser_new): Don't set parser->default_arg_types.
1610         (cp_parser_function_definition): Adjust usage of
1611         unparsed_funtions_queues.
1612         (cp_parser_class_specifier): Don't mess with
1613         parser->default_arg_types.  Handle default argument processing in
1614         a separate phase from function body processing.
1615         (cp_parser_template_declaration_after_export): Adjust usage of
1616         unparsed_functions_queues.
1617         (cp_parser_late_parsing_for_member): Do not handle default
1618         arguments.
1620 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
1622         PR c++/9109
1623         * parser.c (cp_parser_declarator_kind): New enum.
1624         (cp_parser_declarator): Adjust.
1625         (cp_parser_direct_declarator): Adjust. Allow for either named or
1626         abstract declarator. Prefer abstract, if possible. Allow
1627         parenthesized function name.
1628         (cp_parser_condition): Adjust cp_parser_declarator call.
1629         (cp_parser_explicit_instantiation): Likewise.
1630         (cp_parser_init_declarator): Likewise.
1631         (cp_parser_type_id): Likewise.
1632         (cp_parser_function_definition): Likewise.
1633         (cp_parser_member_declaration): Likewise.
1634         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
1635         the tentative parsing.
1636         (cp_parser_exception_declaration): Likewise.
1638 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
1640         * parser.c (cp_parser_template_parameter): Adjust call to
1641         cp_parser_parameter_declaration.
1642         (cp_parser_parameter_declaration_list): Likewise.
1643         (cp_parser_parameter_declaration): Replace
1644         greater_than_is_operator_p with template_parm_p parameter.  Do not
1645         cache tokens for template default arguments.
1647         * pt.c (retrieve_local_specialization): Use htab_find, not
1648         htab_find_with_hash.
1649         (register_local_specialization): Use htab_find_slot, not
1650         htab_find_slot_with_hash.
1651         (instantiate_decl): Pass a hash function to htab_create.
1652         
1653 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1655         * parser.c (cp_parser_binary_expression,
1656         cp_parser_multiplicative_expression,
1657         cp_parser_additive_expression, cp_parser_shift_expression,
1658         cp_parser_relational_expression, cp_parser_equality_expression,
1659         cp_parser_and_expression, cp_parser_exclusive_or_expression,
1660         cp_parser_inclusive_or_expression,
1661         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
1662         cp_parser_binary_expression): Const-ify.
1664 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
1666         * method.c (use_thunk): Disable access control while building the
1667         body of the thunk.
1669 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
1671         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
1672         front end.
1674 2003-01-03  Matt Austern  <austern@apple.com>
1676         * cp-tree.h (struct lang_type_class): add field for key method
1677         (cp_global_trees): rename dynamic_classes to keyed_classes
1678         (key_method): add definition
1679         * class.c (finish_struct_1): compute class's key method, and add
1680         the class to keyed_classes list if there is no key method.
1681         * decl.c (finish_function): add class to keyed_classes list if we
1682         see a definition of the class's key method.
1683         * pt.c (instantiate_class_template): add template specialization
1684         of a dynamic class to keyed_classes list.
1685         * decl2.c (key_method): remove
1686         (finish_file): iterate only through keyed_classes list when
1687         deciding whether to emit vtables, remove class from its list after
1688         we do the emission.
1689         
1690 2003-01-02  Jason Merrill  <jason@redhat.com>
1692         * call.c (build_conditional_expr): Stabilize lvalues properly.
1693         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
1694         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
1695         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
1697         * call.c (convert_like_real): Call decl_constant_value for an
1698         IDENTITY_CONV even if there are no more conversions.
1700         * cvt.c (build_up_reference): Don't push unnamed temps.
1702         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
1704         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
1705         for a backend struct.
1707         * except.c (wrap_cleanups_r, build_throw): Make
1708         MUST_NOT_THROW_EXPRs void.
1709         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
1711         * init.c (build_vec_delete_1): Pre-evaluate the base address.
1713         * init.c (get_temp_regvar): Simplify logic.
1715         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
1716         our replacement is a decl.
1718         * decl.c (cp_make_fname_decl): Push the decls inside the
1719         outermost scope.
1721 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
1723         PR c++/45, c++/3784
1724         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
1725         the same too.
1727 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
1729         * parser.c (struct cp_parser): Add access_checks_lists field
1730         (cp_parser_simple_declaration): Use.
1731         (cp_parser_init_declarator): Likewise. 
1733 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1735         * parser.c (cp_parser_declaration): Accept the __extension__
1736         keyword before the declaration.
1738         PR c++/2843
1739         * parser.c (cp_parser_parameter_declaration): Allow attributes to
1740         appear after the declarator.
1742         * call.c (build_new_method_call): Fix typo in message format
1743         string.
1745 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
1747         * parser.c (cp_lexer_next_token_is): Declare it inline.
1748         (cp_lexer_set_source_position_from_token): Likewise.
1749         (cp_lexer_debugging_p): Likewise.
1750         (cp_parser_parsing_tentatively): Likewise.
1751         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
1752         to the cp_lexer_peek_token.
1754         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
1755         expression.
1757 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
1759         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
1760         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
1761         cp/repo.c: Fix copyright years.
1763 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
1765         * lex.c: Remove superfluous include of cpplib.h.
1766         (CONSTRAINT): Define without conditions.
1767         (init_cp_pragma): Use c_register_pragma.
1769 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1771         * .cvsignore: Remove.
1773 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
1775         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
1776           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
1777           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
1778           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
1779           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
1780           copyright header.
1781         * lex.h: parse.y is dead, so don't mention it.  Also replace the
1782           copyright header with the default GNU copyright header.
1784 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1786         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
1787         (lookup_name_namespace_only): Likewise.
1788         (begin_only_namespace_names): Likewise.
1789         (end_only_namespace_names): Likewise.
1790         * decl.c (only_namespace_names): Remove.
1791         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
1792         (lookup_name_real): Do not check only_namespace_names.
1793         (lookup_name_namespace_only): Remove.
1794         (begin_only_namespace_names): Likewise.
1795         (end_only_namespace_names): Likewise.
1796         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
1797         nested-name-specifiers more gracefully.
1798         (cp_parser_class_or_namespace_name): Avoid looking up namespace
1799         names when they cannot possibly appear.
1800         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
1801         (cp_parser_elaborated_type_specifier): Likewise.
1802         (cp_parser_namespace_name): Only look for namespace names.
1803         (cp_parser_lookup_name): Add is_namespace parameter.
1804         (cp_parser_lookup_name_simple): Adjust call to
1805         cp_parser_lookup_name.
1807         * parser.c (cp_parser_dependent_type_p): Fix thinko.
1809 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1811         * .cvsignore: Update.
1813 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
1815         * class.c (modify_vtable_entry): Remove unused variable.
1816         (get_vcall_index): Always expect a non-thunk.
1817         (update_vtable_entry_for_fn): Combine covariant adjustments, when
1818         overriding a thunk. Pass get_vcall_index a non-thunk.
1820         * decl2.c (finish_file): Mark undefined inlines as extern.
1822 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1824         * cp-tree.def (RETURN_INIT): Remove.
1825         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
1826         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
1827         (note_level_for_for): Remove.
1828         (note_level_for_try): Likewise.
1829         (note_level_for_catch): Likewise.
1830         (finish_named_return_value): Likewise.
1831         (do_pushlevel): Change prototype.
1832         (pending_lang_change): Remove.
1833         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
1834         sk_for.
1835         (note_level_for_for): Remove.
1836         (note_level_for_try): Likewise.
1837         (note_level_for_catch): Likewise.
1838         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
1839         * parser.c (cp_parser_context_free_list): Make it "deletable".
1840         (cp_parser_template_argument): Remove misleading comment.
1841         * pt.c (tsubst_expr): Remove RETURN_INIT code.
1842         * semantics.c (genrtl_named_return_value): Remove.
1843         (do_pushlevel): Take a scope kind as an argument.
1844         (begin_if_stmt): Adjust.
1845         (begin_while_stmt): Likewise.
1846         (begin_for_stmt): Likewise.
1847         (finish_for_init_stmt): Likewise.
1848         (begin_switch_stmt): Likewise.
1849         (begin_handler): Likewise.
1850         (begin_compound_stmt): Likewise.
1851         (finish_named_return_value): Remove.
1852         (cp_expand_stmt): Remove RETURN_INIT case.
1853         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
1855 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1857         PR c++/9112
1858         * parser.c (cp_parser_direct_declarator): Handle erroneous
1859         parenthesized declarators correctly.
1861 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1863         * cp-tree.h (pending_lang_change): Declare.
1865 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1867         * parser.c (cp_parser_context_free_list): New variable.
1868         (cp_parser_context_new): Use it.
1869         (cp_parser_error): Check return code from
1870         cp_parser_simulate_error.
1871         (cp_parser_simulate_error): Return a value.
1872         (cp_parser_id_expression): Optimize common case.
1873         (cp_parser_class_name): Likewise.
1874         (cp_parser_class_specifier): Adjust call to
1875         cp_parser_late_parsing_default_args.
1876         (cp_parser_lookup_name): Optimize common case.
1877         (cp_parser_late_parsing_for_member): Adjust call to
1878         cp_parser_late_parsing_default_args.
1879         (cp_parser_late_parsing_default_args): Add scope parameter.
1880         (cp_parser_require): Avoid creating the error message unless it's
1881         needed.
1882         (cp_parser_parse_definitely): Place free'd contexts on the free
1883         list.
1885         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
1887 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
1889         * parser.c (cp_parser_parameter_declaration_clause): Treat system
1890         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
1892 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1894         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
1895         GCC, not GNU CC.
1897 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1899         * parse.y: Remove.
1900         * spew.c: Likewise.
1901         * Make-lang.in (gt-cp-spew.h): Remove.
1902         * cp-tree.h (do_pending_lang_change): Remove.
1903         (do_identifier): Change prototype.
1904         (finish_id_expr): Remove.
1905         * decl.c (lookup_name_real): Remove yylex variable.
1906         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
1907         * lex.c (init_cpp_parse): Remove.
1908         (reduce_cmp): Likewise.
1909         (token_cmp): Likewise.
1910         (yychar): Likewise.
1911         (lastiddecl): Likewise.
1912         (token_count): Likewise.
1913         (reduce_count): Likewise.
1914         (yyhook): Likewise.
1915         (print_parse_statistics): Likewise.
1916         (do_pending_lang_change): Likewise.
1917         (do_identifier): Remove parsing parameter.
1918         * lex.h (lastiddecl): Remove.
1919         (looking_for_typename): Remove.
1920         (looking_for_template): Likewise.
1921         (pending_lang_change): Likewise.
1922         (yylex): Likewise.
1923         * semantics.c (finish_id_expr): Remove.
1925         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
1926         thread" correctly.
1928 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1930         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
1931         end, not the C front end.
1933 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
1935         * cp-tree.h (THUNK_TARGET): New macro.
1936         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
1937         (finish_thunk): Remove offset parms.
1938         * class.c (find_final_overrider): Look through thunks.
1939         (get_vcall_index): Use THUNK_TARGET.
1940         (update_vtable_entry_for_fn): Look through thunks. Set covariant
1941         fixed offset here. Adjust finish_thunk call.
1942         (build_vtbl_initializer): Adjust finish_thunk calls.
1943         * mangle.c (mangle_call_offset): Remove superfluous if.
1944         (mangle_thunk): Adjust.
1945         * method.c (make_thunk): Adjust.
1946         (finish_thunk): Adjust.
1947         (thunk_adjust): Remove assert.
1948         (use_thunk): Use THUNK_TARGET
1949         * dump1.c (cp_dump_tree): Adjust thunk dumping.
1951         PR c++/9054
1952         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
1953         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
1955 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1957         Remove traditional C constructs 4/n.
1958         * decl2.c (grok_method_quals, warn_if_unknown_interface,
1959         grok_x_components, cp_build_parm_decl, build_artificial_parm,
1960         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
1961         delete_sanity, check_member_template, check_java_method,
1962         check_classfn, finish_static_data_member_decl, grokfield,
1963         grokbitfield, grokoptypename, grok_function_init,
1964         cplus_decl_attributes, constructor_name, defer_fn,
1965         build_anon_union_vars, finish_anon_union, coerce_new_type,
1966         coerce_delete_type, comdat_linkage, maybe_make_one_only,
1967         key_method, import_export_vtable, import_export_class,
1968         output_vtable_inherit, import_export_decl, import_export_tinfo,
1969         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
1970         set_guard, start_objects, finish_objects,
1971         start_static_storage_duration_function,
1972         finish_static_storage_duration_function, get_priority_info,
1973         start_static_initialization_or_destruction,
1974         finish_static_initialization_or_destruction,
1975         do_static_initialization, do_static_destruction,
1976         prune_vars_needing_no_initialization, write_out_vars,
1977         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
1978         add_using_namespace, merge_functions, ambiguous_decl,
1979         lookup_using_namespace, lookup_using_namespace,
1980         qualified_lookup_using_namespace, set_decl_namespace,
1981         decl_namespace, current_decl_namespace, push_decl_namespace,
1982         pop_decl_namespace, push_scope, pop_scope, add_function,
1983         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
1984         lookup_arg_dependent, do_namespace_alias,
1985         validate_nonmember_using_decl, do_nonmember_using_decl,
1986         do_toplevel_using_decl, do_local_using_decl,
1987         do_class_using_decl, do_using_directive, check_default_args,
1988         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
1989         * parser.c (cp_parser_class_head): Use booleanss.
1990         * decl.c (walk_globals, walk_vtables): Likewise.
1991         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
1992         walk_globals): Change return type from 'int' to 'bool'.
1993         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
1994         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
1995         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
1996         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
1997         qualifier_flags, tinfo_base_init, generic_initializer,
1998         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
1999         dfs_class_hint_unmark, class_hint_flags, class_initializer,
2000         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
2001         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
2002         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
2003         * repo.c (repo_compile_flags, repo_template_declared,
2004         repo_template_defined, repo_class_defined, repo_get_id,
2005         repo_template_used, repo_vtable_used, repo_inline_used,
2006         repo_tinfo_used, repo_template_instantiated, extract_string,
2007         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
2008         finish_repo): Likewise.
2009         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
2010         cxx_print_xnode): Likewise..
2011         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
2012         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
2013         * cxxfilt.c (demangle_it, print_demangler_list, usage,
2014         standard_symbol_characters, hp_symbol_characters, main, fatal):
2015         Likewise.
2016         (strip_underscore):  Change type from 'int' to 'bool'.
2017         (main): Use boolean constants.
2019 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2021         Remove traditional C constructs 3/n.
2022         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2023         build_up_reference, warn_ref_binding, convert_to_reference,
2024         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
2025         convert_to_void, convert, convert_force, build_type_conversion,
2026         build_expr_type_conversion, type_promotes_to,
2027         perform_qualification_conversions): Use C90 prototyping style.
2028         * decl2.c (grok_array_decl): Use boolean constant.
2029         (delete_sanity): Likewise.
2030         * typeck.c (build_unary_op): Likewise.
2031         * semantics.c (finish_switch_cond): Likewise.
2032         * parser.c (cp_parser_direct_new_declarator): Likewise.
2033         * init.c (build_new): Likewise.
2035 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
2037         * Make-lang.in (po-generated): Remove parse.c.
2038         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
2039         ($(srcdir)/cp/parse.h): Remove target.
2040         ($(srcdir)/cp/parse.c): Likewise.
2041         (gt-cp-parse.h): Likewise.
2042         (gt-cp-parser.h): New target.
2043         (c++.distclean): Do not remove parse.output.
2044         (c++.maintainer-clean): Do not remove parse.c or parse.h.
2045         (cp/spew.o): Remove target.
2046         (cp/lex.o): Adjust dependencies.
2047         (cp/pt.o): Likewise.
2048         (cp/parse.o): Likewise.
2049         (cp/TAGS): Do not mention parse.c.
2050         (cp/parser.o): New target.
2051         * NEWS: Mention the new parser.
2052         * call.c (build_scoped_method_call): Simplify.
2053         (build_method_call): Likewise.
2054         (build_new_function_call): Adjust calls to add_function_candidate
2055         and add_template_candidate.
2056         (build_new_op): Improve handling of erroroneous operands.
2057         (convert_default_arg): Remove circular argument processing.
2058         (name_as_c_string): New function.
2059         (build_new_method_call): Use it.
2060         (perform_implicit_conversion): Use error_operand_p.
2061         * class.c (finish_struct_anon): Use constructor_name_p.
2062         (check_field_decls): Likewise.
2063         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
2064         (resolve_address_of_overloaded_function): Likewise.
2065         (instantiate_type): Tweak pointer-to-member handling.
2066         (get_primary_binfo): Remove incorrect assertion.
2067         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
2068         * cp-tree.h (DEFARG_TOKENS): New macro.
2069         (default_arg): New structure.
2070         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
2071         (lang_tree_node): Add default_arg.
2072         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
2073         (type_info_ref_type): New macro.
2074         (saved_scope): Make processing_explicit_instantiation a boolean.
2075         (check_access): New field.
2076         (unparsed_text): Remove.
2077         (language_function): Remove unparsed_inlines.
2078         (error_operand_p): New macro.
2079         (lang_decl): Adjust pending_inline_info.
2080         (DEFARG_POINTER): Remove.
2081         (tag_types): Add typenames.
2082         (lookup_ualified_name): Declare.
2083         (lookup_name_real): Likewise.
2084         (shadow_tag): Adjust prototype.
2085         (get_scope_of_declarator): Declare it.
2086         (process_next_inline): Remove it.
2087         (check_for_missing_semicolon): Likewise.
2088         (maybe_get_template_decl_from_type_decl): Declare it.
2089         (finish_label_stmt): Adjust prototype.
2090         (finish_non_static_data_meber): Declare it.
2091         (finish_pseudo_destructor_call_expr): Rename to ...
2092         (finish_pseudo_destructor_expr): ... this.
2093         (finish_compound_literal): Declare it.
2094         (begin_inline_definitions): Remove it.
2095         (init_spew): Remove.
2096         (peekyylex): Likewise.
2097         (arbitrate_lookup): Likewise.
2098         (frob_opname): Likewise.
2099         (maybe_snarf_defarg): Likewise.
2100         (add_defarg_fn): Likewise.
2101         (do_pending_defargs): Likewise.
2102         (done_pending_defargs): Likewise.
2103         (unprocessed_defarg_fn): Likewise.
2104         (replace_defarg): Likewise.
2105         (end_input): Likewise.
2106         (get_overloaded_fn): Likewise.
2107         * cvt.c (convert_to_reference): Improve error handling.
2108         * decl.c (lookup_name_real): Do not declare it static.
2109         (maybe_push_to_top_level): Set check_access.
2110         (identifier_type_value): Adjust call to lookup_name_real.
2111         (lookup_qualified_name): New method.
2112         (lookup_name_real): Remove special-case parsing code.
2113         (lookup_name-nonclass): Adjust call to lookup_name_real.
2114         (lookup_name_namespace_only): Likewise.
2115         (lookup_name): Likewise.
2116         (check_tag_decl): Return the type declared.
2117         (shadow_tag): Likewise.
2118         (register_dtor_fn): Tweak check_access.
2119         (grokfndecl): Use constructor_name_p.
2120         (get_scope_of_declarator): New function.
2121         (grokdeclarator): Obscure tweaks for slightly different declarator
2122         representations.
2123         (start_method): Return error_mark_node to indicate failure.
2124         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
2125         * decl2.c (constructor_name_full): Simplify.
2126         (constructor_name): Use it.
2127         (build_expr_from_tree): Adjust for changes to do new parser.
2128         (push_scope): Improve robustness.
2129         (validate_nonmember_using_decl): Process declarations, not names.
2130         (do_class_using_decl): Likewise.
2131         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
2132         here.
2133         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
2134         * expr.c (cxx_expand_expr): Handle BASELINKs.
2135         * init.c (member_init_ok_or_else): Issue more errors.
2136         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
2137         * lex.c: Do not include parse.h.
2138         (yypring): Do not declare.
2139         (yylval): Likewise.
2140         (make_reference_declarator): Remove error-generating code.
2141         (rid_to_yy): Remove.
2142         (cxx_init): Do not call init_spew.
2143         (yypring): Remove.
2144         (check_for_missing_semicolon): Remove.
2145         * lex.h (got_scope): Remove.
2146         (got_object): Remove.
2147         * method.c (hack_identifier): Use finish_non_static_data_member.
2148         (implicitly_declare_fn): Adjust use of constructor_name.
2149         * parser.c: New file.
2150         * pt.c (parse.h): Do not include it.
2151         (maybe_get_template_decl_from_template): Do not declare it.
2152         (finish_member_template_decl): Tweak.
2153         (begin_explicit_instantiation): Adjust for
2154         processing_explicit_instantiation being boolean.
2155         (end_explicit_instantiation): Likewise.
2156         (maybe_process_partial_specialization): Tighten specialization
2157         test.
2158         (retrieve_local_specialization): Adjust ue of hash table.
2159         (eq_local_specializations): New function.
2160         (register_local_specialization): Likewise.
2161         (push_template_decl_real): Remove unnecessary test.
2162         (maybe_get_template_decl_from_type_decl): Don't make it static.
2163         (for_each_template_parm_r): Handle TYPEOF_TYPE.
2164         (tsubst_copy): Use retrieive_local_specialization to handle
2165         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
2166         Handle COMPONENT_REFs with pseudo-destructor-expressions.
2167         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
2168         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
2169         (unify): Tweak handling of CONST_DECLs.
2170         (regenerate_decl_from_template): Use push_nested_class.
2171         (template_for_substitution): New funciton.
2172         (instantiate_decl): Use it.  Register parameters as local
2173         specializations.
2174         * rtti.c (init_rtti_processing): Set type_info_ref_type.
2175         (build_typeid): Use it.
2176         (get_typeid): Likeise.
2177         * search.c (accessible_p): Use check_access, not
2178         flag_access_control.
2179         (adjust_result_of_qualified_name_lookup): Pay attention to the
2180         context_class.
2181         * semantics.c (finish_asm_stmt): Adjust error handling.
2182         (finish_label_stmt): Return the statement.
2183         (finish_non_static_data_member): New function.
2184         (finish_class_expr): Handle BASELINKs.
2185         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
2186         (finish_object_call_expr): Simplify handling during templates.
2187         (finish_pseudo_destructor_call_expr): Rename to ...
2188         (finish_pseudo_dtor_expr): ... this.
2189         (finish_compound_literal): New function.
2190         (begin_inline_definitions): Remove.
2191         (finish_sizeof): Remove special template handling.
2192         * spew.c: Do not include parse.h.
2193         * tree.c (get_overloaded_fn): Remove.
2194         * typeck.c (build_class_member_access_expr): Handle
2195         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
2196         (lookup_destructor): New function.
2197         (finish_class_member_access_expr): Use it.
2198         (convert_arguments): Simplify.
2199         (build_unary_op): Handle BASELINKs.
2201 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2203         PR c++/4803
2204         * decl2.c (mark_used): Defer inline functions.
2205         (finish_file): Merge deferred_fns loops. Check all used
2206         inline functions have a definition.
2207         * method.c (make_thunk): Thunks are not inline.
2209         PR c++/5116, c++/764
2210         * call.c (build_new_op): Make sure template class operands are
2211         instantiated.
2213 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2215         PR C++/7964
2216         * cp-tree.h (resolve_scoped_fn_name): Prototype.
2217         * call.c (resolve_scoped_fn_name): New function. Deal with
2218         more template expansion. Broken out of ...
2219         * parse.y (parse_finish_call_expr): ... here. Call it.
2220         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
2221         resolve_scoped_fn_name and build_call_from_tree.
2223         PR c++/9053
2224         * decl.c (duplicate_decls): Templates may be disambiguated by
2225         return type.
2227         PR c++/8702
2228         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
2229         conversion operators on failure.
2231 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2233         Remove traditional C constructs 2/n.
2234         * call.c (tourney, build_field_call, equal_functions, joust,
2235         compare_ics, build_over_call, build_java_interface_fn_ref,
2236         convert_like_real, op_error, build_object_call, resolve_args,
2237         build_vfield_ref, check_dtor_name, build_scoped_method_call,
2238         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
2239         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
2240         standard_conversion, reference_related_p,
2241         reference_compatible_p, convert_class_to_reference,
2242         direct_reference_binding, reference_binding,
2243         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
2244         add_template_conv_candidate, any_viable, any_strictly_viable,
2245         build_this, splice_viable, print_z_candidates,
2246         build_user_type_conversion, build_new_function_call,
2247         conditional_conversion, build_conditional_expr, build_new_op,
2248         build_op_delete_call, enforce_access, call_builtin_trap,
2249         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
2250         convert_default_arg, type_passed_as, convert_for_arg_passing,
2251         in_charge_arg_for_name, is_properly_derived_from,
2252         maybe_handle_implicit_object, maybe_handle_ref_bind,
2253         source_type, add_warning, can_convert, can_convert_arg,
2254         perform_implicit_conversion, can_convert_arg_bad,
2255         initialize_reference, add_conv_candidate,
2256         add_template_candidate_real, add_template_candidate): Ansify.
2258 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
2260         PR c++/8572
2261         * cp-tree.h (grokoptypename): Add SCOPE parameter.
2262         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
2263         if in a template scope.
2264         * parse.y (unoperator): Return the scope.
2265         (operator_name): Adjust grokoptypename call.
2267 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2269         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
2270         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
2271         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
2273 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2275         * ChangeLog: Fix a typo.
2276         * class.c: Fix comment typos.
2277         * cp-tree.h: Likewise.
2279 2002-12-18  Jason Merrill  <jason@redhat.com>
2281         Handle anonymous unions at the tree level.
2282         C++ ABI change: Mangle anonymous unions using the name of their
2283         first named field (by depth-first search).  Should not cause
2284         binary compatibility problems, though, as the compiler previously
2285         didn't emit anything for affected unions.
2286         * cp-tree.def (ALIAS_DECL): New tree code.
2287         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
2288         first field, not the largest.
2289         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
2290         push the decl, and write it out at namespace scope.
2291         * decl.c (lookup_name_real): See through an ALIAS_DECL.
2292         (pushdecl): Add namespace bindings for ALIAS_DECLs.
2293         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
2294         of a decl which doesn't have one.
2295         * typeck.c (build_class_member_access_expr): Don't recurse if
2296         we already have the type we want.
2298 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2300         PR c++/8099
2301         * friend.c (make_friend_class): Allow partial specialization
2302         when declaration is not a template friend.
2304 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2306         PR c++/3663
2307         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
2308         TREE_PROTECTED to created decl nodes.
2310 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
2312         * class.c (build_base_field): Do not set DECL_PACKED on the
2313         FIELD_DECL.
2315 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2317         * cp-tree.h (struct tree_srcloc): Use location_t.
2318         (SOURCE_LOCUS): New.
2319         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
2321 2002-12-17  Jason Merrill  <jason@redhat.com>
2323         * decl.c (finish_function): Also complain about no return in
2324         templates.
2325         * semantics.c (finish_return_stmt): Also call check_return_expr in
2326         templates.
2327         * typeck.c (check_return_expr): In a template, just remember that we
2328         saw a return.
2330 2002-12-16  Jason Merrill  <jason@redhat.com>
2332         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
2333         of the CALL_EXPR.
2335         * semantics.c (do_pushlevel): Call pushlevel after adding the
2336         SCOPE_STMT.
2337         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
2338         * parse.y (function_body): Go back to using compstmt.
2339         * decl.c (pushdecl): Skip another level to get to the parms level.
2341         * call.c (build_new_method_call): Use is_dummy_object to determine
2342         whether or not to evaluate the object parameter to a static member
2343         function.
2345 2002-12-14  Jason Merrill  <jason@redhat.com>
2347         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
2348         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
2349         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
2350         don't bother with an AGGR_INIT_EXPR.
2351         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
2352         just generate a new decl normally.  Take return slot parm.
2353         * cp-tree.h: Adjust prototype.
2355 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2357         PR C++/8031
2358         * cvt.c (convert_to_pointer_force): Don't try comparing against
2359         erronous type.
2361 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
2363         * cp-tree.h: Have the multiple-include guards around
2364         the entire file.
2366 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
2368         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
2369         for SPEW_DEBUG.
2370         (snarf_method): Same.
2371         (snarf_defarg): Same.
2373 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
2375         PR c++/8372
2376         * pt.c (tsubst_copy): Handle destructor names more correctly.
2378 2002-12-10  Matt Austern   <austern@apple.com>
2380         * cp-tree.h: get rid of needs_virtual_reinit bit.
2382 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
2384         * NEWS: Document removal of in-class initialization extension for
2385         static data members of non-arithmetic, non-enumeration type.
2386         * decl.c (check_static_variable_definition): Do not allow that
2387         extension.
2388         * decl2.c (grokfield): Do not call digest_init when processing
2389         templates.
2391 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2393         * error.c (dump_expr): Fix format specifier warning.
2395 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
2397         * class.c (finish_struct_1): Correct comment.
2398         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
2400 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2402         PR C++/8799
2403         * error.c (dump_expr): Don't ever try to dump a non-existent
2404         expression.
2406 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2408         Implement covariant returns.
2409         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
2410         (struct lang_decl_flags): Add this_thunk_p flag.
2411         Rename vcall_offset to virtual_offset.
2412         (struct lang_decl): Rename delta to fixed_offset.
2413         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
2414         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
2415         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
2416         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
2417         (make_thunk): Add this_adjusting arg.
2418         (finish_thunk): Declare.
2419         (mangle_thunk): Add this_adjusting arg.
2420         * class.c (get_vcall_index): Use base function for lookup.
2421         (update_vtable_entry_for_fn): Generate covariant thunk.
2422         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
2423         (build_vtbl_initializer): Use base function for lookup.
2424         Finish covariant thunk here. Adjust thunk generation.
2425         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
2426         Adjust thunk dumping.
2427         * mangle.c (mangle_call_offset): New function.
2428         (mangle_thunk): Adjust for covariant thunks.
2429         * method.c (make_thunk): Adjust. Do not set name here.
2430         (finish_thunk): New function. Set name here.
2431         (use_thunk): Generate covariant thunks too.
2432         (thunk_adjust): New function.
2433         * search.c (covariant_return_p): Remove. Fold into ...
2434         (check_final_overrider): ... here. Simplify.
2435         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
2437 2002-12-03  Jason Merrill  <jason@redhat.com>
2439         PR c++/8674
2440         * call.c (build_over_call): Check specifically for TARGET_EXPR
2441         when eliding.
2443         PR c++/8461, c++/8625
2444         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
2445         (cp_convert_parm_for_inlining): Remove.
2446         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
2447         Remove.
2448         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
2449         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
2451         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
2452         an ambiguous conversion.
2454 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
2456         PR c++/8688
2457         * decl.c (reshape_init): Handle erroneous initializers.
2459 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
2461         PR c++/8720
2462         * spew.c (remove_last_token): Make sure that last_chunk is set
2463         correctly.
2465         PR c++/8615
2466         * error.c (dump_expr): Handle character constants with
2467         TREE_OVERFLOW set.
2469 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2471         DR 180
2472         * decl.c (grokdeclarator): Require class-key for all friend class.
2473         Output the correct type and context in the error message.
2475 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2477         PR c++/5919
2478         * pt.c (unify): Use variably_modified_type_p to test validity of
2479         template argument types.
2481         PR c++/8727
2482         * cp-tree.h (lang_type_class): Add typeinfo_var.
2483         (CLASSTYPE_TYPEINFO_VAR): New macro.
2484         * rtti.c (get_tinfo_decl): Use it.
2486         PR c++/8663
2487         * init.c (expand_member_init): Always get the main variant of a
2488         base class.
2490 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
2492         PR c++/8332
2493         PR c++/8493
2494         * decl.c (cxx_init_decl_processing): Use size_type_node, not
2495         c_size_type_node.
2496         * decl2.c (coerce_new_type): Likewise.
2497         * except.c (do_allocate_exception): Likewise.
2499 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
2501         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
2502         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
2503         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
2504         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2505         typeck2.c: Include coretypes.h and tm.h.
2506         * Make-lang.in: Update dependencies.
2508 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
2510         PR c++/8227
2511         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
2512         (check_initializer): Validate the type of the initialized
2513         variable, even if the initializer is absent.
2514         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
2516         PR c++/8214
2517         * typeck.c (convert_for_assignment): Do not use
2518         decl_constant_value on the operand.
2520         PR c++/8511
2521         * pt.c (instantiate_decl): Handle template friends defined outside
2522         of the class correctly.
2524 2002-11-29  Joe Buck <jbuck@synopsys.com>
2526         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
2527         anonymous structs.
2529 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
2531         * class.c (walk_subobject_offsets): Recur on binfos as well as on
2532         types.
2533         (layout_nonempty_base_or_field): Pass it a binfo when processing a
2534         base class.
2535         (layout_empty_base): Likewise.
2536         (build_base_field): Likewise.
2538 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
2540         * class.c (build_base_field): Make sure we get the canonical base
2541         when descending through primary bases.
2543 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
2545         * decl.c (check_initializer): Don't error on initialisation of
2546         a scalar with a brace-enclosed expression.
2548 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
2550         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
2551         (template_parms_equal): Remove prototype.
2552         * typeck.c (buuld_indirect_ref): Reformat.
2554 2002-11-25  Jason Merrill  <jason@redhat.com>
2556         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
2557         and a DO_STMT.
2559 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
2561         * tree.c (cp_build_qualified_type_real): Correct handling of
2562         array types.
2563         * class.c (walk_subobject_offsets): Fix thinko.
2564         (build_base_field): Record offsets of empty bases in primary
2565         virtual bases.
2566         (layout_class_type): Record offsets of empty bases in fields.
2568         * search.c (is_subobject_of_p_1): Fix thinko.
2569         (lookup_field_queue_p): Likewise.
2571 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
2573         * class.c (layout_class_type): Reuse tail padding when laying out
2574         virtual bases.
2576 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
2578         * rtti.c (qualifier_flags): Fix thinko.
2580 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2582         Remove traditional C constructs 1/n.
2583         * cp-tree.h (init_method, set_mangled_name_for_decl,
2584         build_opfncall, hack_identifier, make_thunk, use_thunk,
2585         synthesize_method, implicitly_declare_fn,
2586         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
2587         maybe_clone_body): Remove use of PARAMS.
2589         * method.c (do_build_assign_ref, do_build_copy_constructor,
2590         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
2591         Likewise.
2592         (synthesize_method): Use 'bool' type and constants instead of
2593         'int'.
2594         (locate_copy): Likewise.
2595         (implicitly_declare_fn): Likewise.
2597         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
2598         Remove old-style declaration.
2599         (maybe_clone_body): Use 'bool' type and constants.
2601 2002-11-21  Glen Nakamura  <glen@imodulo.com>
2603         PR c++/8342
2604         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
2605         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
2606         of the branches of a COND_EXPR.
2608 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
2610         * pt.c (for_each_template_parm): Free allocated memory.
2611         * search.c (is_subobject_of_p_1): New function.
2612         (is_subobject_of_p): Avoid walking virtual bases multiple times.
2614 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
2616         * g++spec.c (lang_specific_spec_functions): New.
2618 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
2620         * ChangeLog: Follow spelling conventions.
2621         * class.c: Likewise.
2622         * decl2.c: Likewise.
2624 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
2626         * search.c (dfs_push_decls): Do not try to reorder elements
2627         3..n of method_vec if method_vec has only two elements.
2628         Reverse order of two tests to avoid accessing unallocated
2629         memory.
2631 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
2633         * class.c (dfs_find_final_overrider): Adjust so that the most
2634         derived object is a binfo, rather than a class type.
2635         (find_final_overrider): Likewise.
2636         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
2637         (add_vcall_offset): Likewise.
2639 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2641         PR c++/8389
2642         * pt.c (instantiate_template): Push class scope for member
2643         functions.
2644         (get_mostly_instantiated_function_type): Likewise.  Don't call
2645         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
2646         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
2647         * mangle.c (write_encoding, write_unqualified_name): Adjust.
2649 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2651         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
2652         vcall offfsets.  Split out ...
2653         (add_vcall_offset): ... new function.
2655         PR c++/8338
2656         * pt.c (for_each_template_parm): Add htab parameter.
2657         (process_partial_specialization): Adjust call.
2658         (push_template_decl_real): Likewise.
2659         (pair_fn_data): Add visited.
2660         (for_each_template_parm_r): Avoid walking duplicates more than
2661         once.
2662         (uses_template_parms): Adjust call to for_each_template_parm.
2664 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
2666         * class.c (add_implicitly_declared_members): Put implicitly
2667         declared functions at the end of TYPE_METHODs when -fabi-version
2668         is at least 2.
2670 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
2672         * decl2.c (finish_file): Correct spelling.
2674 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
2676         * call.c (build_special_member_call): Do not try to lookup VTTs by
2677         name.
2678         * class.c (vtbl_init_data): Add generate_vcall_entries.
2679         (get_vtable_decl): Do not look up virtual tables by name.
2680         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
2681         (set_primary_base): Do not set CLASSTYPE_RTTI.
2682         (determine_primary_base): Likewise.
2683         (get_matching_virtual): Remove.
2684         (get_vcall_index): New function.
2685         (update_vtable_entry_for_fn): Do not try to use virtual thunks
2686         when they are not required.  Assign vcall indices at this point.
2687         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
2688         Do update dynamic_classes.
2689         (build_vtt): Do not add VTTs to the symbol table.
2690         (build_ctor_vtbl_group): Likewise.
2691         (build_vtbl_initializer): Simplify handling of vcall indices.
2692         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
2693         for the most derived class.
2694         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
2695         the vtable.
2696         * cp-tree.h (dynamic_classes): New macro.
2697         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
2698         (CLASSTYPE_RTTI): Remove.
2699         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
2700         (CLASSTYPE_VCALL_INDICES): New macro.
2701         (CLASSTYPE_VTABLES): Likewise.
2702         (BV_USE_VCALL_INDEX_P): Remove.
2703         (build_vtable_path): Remove.
2704         * decl2.c (finish_vtable_vardecl): Remove.
2705         (key_method): Remove #if 0'd code.
2706         (finish_vtable_vardecl): Rename to ...
2707         (maybe_emit_vtables): ... this.
2708         (finish_file): Use it.
2709         * search.c (look_for_overrides_here): Update comment.
2711 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
2713         PR c/7353 redux
2714         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
2716 2002-10-30  Jason Merrill  <jason@redhat.com>
2718         PR c++/8186
2719         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
2720         * call.c (convert_for_arg_passing): Set it.
2721         * except.c (stabilize_throw_expr): Recurse for such an arg.
2723 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
2725         * cp-tree.h (lang_decl_flags): Remove init_priority.
2726         (lang_decl): Add delta.
2727         (GLOBAL_INIT_PRIORITY): Remove.
2728         (THUNK_DELTA): Revise definition.
2729         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
2730         * dump.c (cp_dump_tree): Don't dump it.
2732 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
2734         PR c++/8160
2735         * typeck2.c (process_init_constructor): Call complete_array_type.
2737         PR c++/8149
2738         * decl.c (make_typename_type): Issue errors about invalid results.
2740 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2742         Core issue 287, PR c++/7639
2743         * cp-tree.h (lang_type_class): Add decl_list field.
2744         (CLASSTYPE_DECL_LIST): New macro.
2745         (maybe_add_class_template_decl_list): Add declaration.
2746         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
2747         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
2748         (maybe_add_class_template_decl_list): New function.
2749         (add_implicitly_declared_members): Use it.
2750         * decl.c (maybe_process_template_type_declaration): Likewise.
2751         (pushtag): Likewise.
2752         * friend.c (add_friend): Likewise.
2753         (make_friend_class): Likewise.
2754         * semantics.c (finish_member_declaration): Likewise.
2755         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
2756         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
2757         to process members and friends in the order of declaration.
2759 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
2761         PR c++/8287
2762         * decl.c (finish_destructor_body): Create the label to jump to
2763         when returning from a destructor here.
2764         (finish_function_body): Rather than here.
2766 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
2768         PR c++/7266
2769         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
2770         SCOPE_REF is not null before dereferencing it.
2772 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
2774         * call.c (build_over_call): Use DECL_CONTEXT, not
2775         DECL_VIRTUAL_CONTEXT.
2776         * class.c (modify_vtable_entry): Don't mess with
2777         DECL_VIRTUAL_CONTEXT.
2778         (set_vindex): Remove.
2779         (set_primary_base): Remove vfuns_p parameter.
2780         (determine_primary_base): Likewise.
2781         (modify_all_vtables): Likewise.
2782         (layout_class_type): Likewise.  Adjust calls to other functions
2783         accordingly.
2784         (finish_struct_1): Adjust calls to modified functions.  Set
2785         DECL_VINDEX here.
2786         * cp-tree.h (lang_type_class): Remove vsize.
2787         (CLASSTYPE_VSIZE): Remove.
2788         (lang_decl): Remove thunks.
2789         (DECL_THUNKS): Adjust.
2790         (DECL_VIRTUAL_CONTEXT): Remove.
2791         (duplicate_decls): Don't copy it.
2792         * pt.c (build_template_decl): Don't set it.
2793         (tsubst_decl): Likewise.
2794         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
2796         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
2797         (build_vtable_entry): Remove.
2798         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
2799         (lang_decl): Add thunks.
2800         (DECL_THUNKS): New macro.
2801         * decl.c (duplicate_decls): Copy it.
2802         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
2803         * semantics.c (emit_associated_thunks): Simplify.
2805 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
2807         PR c++/7228
2808         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
2809         lang_type structure exists before accessing field.
2810         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
2811         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
2812         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
2813         * class.c (check_field_decls): Use new macros.
2814         * typeck2.c (process_init_constructor): Remove redundant check for
2815         existence of lang_type structure.
2817 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
2819         * class.c (end_of_base): New method.
2820         (end_of_class): Use it.  Check indirect virtual bases.
2822         * class.c (check_field_decls): Fix typo.
2824 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
2826         PR c++/8067
2827         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
2828         related variables.
2830         PR c++/7679
2831         * spew.c (next_token): Do not return an endless stream of
2832         END_OF_SAVED_INPUT tokens.
2833         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
2834         the cached token stream.
2835         (snarf_defarg): Likewise.
2837 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
2839         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
2840         variably_modified_type_p.
2841         * cp-tree.h: Remove prototype of variably_modified_type_p.
2842         * tree.c (variably_modified_type_p): Remove; now implemented
2843         in language-independent code.
2845 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
2847         PR c++/6579
2848         * spew.c (snarf_parenthesized_expression): New function.
2849         (snarf_block): Use it.
2851 2002-10-22  Richard Henderson  <rth@redhat.com>
2853         * method.c (use_thunk): Always compute vcall_value; assert that
2854         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
2855         for vcall thunks as well.
2857 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
2859         * class.c (empty_base_at_nonzero_offset_p): New function.
2860         (layout_nonempty_base_or_field): Do not check for conflicts when
2861         laying out a virtual base using the GCC 3.2 ABI.
2862         (build_base_field): Correct checking for presence of empty classes
2863         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
2865         * class.c (include_empty_classes): Use normalize_rli.
2866         (layout_class_type): Likewise.
2868         * decl.c (reshape_init): Tweak handling of character arrays.
2870         PR c++/8218
2871         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
2872         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
2873         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
2874         (check_field_decls): Likewise.
2875         (layout_class_type): Likewise.
2876         (finish_struct_1): Initialize it.
2877         (walk_subobject_offsets): Use it to prune searches.
2879 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
2881         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
2882         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
2883         TARGET_ASM_OUTPUT_MI_THUNK in comments.
2885 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
2887         * decl.c (start_decl): Point users of the old initialized-
2888         typedef extension at __typeof__.
2890 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2892         * Make-lang.in (method.o): Depend on TARGET_H.
2893         * method.c (target.h): Include it.
2894         (use_thunk): Use target hooks.  Use vcall thunks, if available.
2896 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2898         * class.c (base_derived_from): Make sure return value is a bool.
2900 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2902         * class.c (find_final_overrider_data_s): Remove overriding_fn and
2903         overriding_base.
2904         (dfs_base_derived_from): New function.
2905         (base_derived_from): Likewise.
2906         (dfs_find_final_overrider): Use base_derived_from.
2907         (find_final_overrider): Adjust.
2909 2002-10-18  Jason Merrill  <jason@redhat.com>
2911         PR c++/8080
2912         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
2913         with condition decls in a template.
2915 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
2917         * class.c (add_method): Compare template parms too.
2919 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
2921         PR c++/7584
2922         * class.c (handle_using_decl): Allow the declaration used to be
2923         from an ambiguous base.
2925         * pt.c (convert_template_argument): Revert this change:
2926                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2927                 * pt.c (convert_template_argument): Do not fold non-type
2928                 template rguments when inside a template.
2930         * init.c (expand_default_init): Handle brace-enclosed initializers
2931         correctly.
2933 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2935         * mangle.c (write_expression): Correct handling of enumeration
2936         constants.
2937         (write_template_arg): Likewise.
2938         * pt.c (convert_template_argument): Do not fold non-type template
2939         arguments when inside a template.
2941         PR c++/7478
2942         * cvt.c (convert_to_reference): Allow references as the incoming
2943         type.
2945 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2947         PR c++/7524
2948         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
2949         build_qualified_type.
2951 2002-10-15  Richard Henderson  <rth@redhat.com>
2953         * error.c (dump_expr): Use real_to_decimal directly, and with
2954         the new arguments.
2956 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
2958         * decl.c (reshape_init): Fix typo.
2960         * cp-tree.h (operator_name_info_t): Add arity.
2961         * lex.c (init_operators): Initialize it.
2962         * mangle.c (write_conversion_operator_name): New function.
2963         (write_unqualified_name): Use it.
2964         (write_template_args): Accept template arguments as a TREE_LIST.
2965         (write_expression): Adjust handling of qualified names to match
2966         specification.
2968 2002-10-15  Jason Merrill  <jason@redhat.com>
2970         * call.c (call_builtin_trap): New fn.
2971         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
2972         (build_call): Don't set current_function_returns_abnormally outside
2973         a function.
2975 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2977         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
2978         clear CLASSTYPE_EMPTY_P.
2979         (build_base_field): Likewise.
2980         (build_base_fields): Likewise.
2981         (check_bases_and_members): Likewise.
2982         (create_vtbl_ptr): Likewise.
2983         (layout_class_type): Likewise.  Ensure that empty classes have
2984         size zero when used as base classes in the 3.2 ABI.
2985         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
2986         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
2987         parameter.
2988         (is_empty_class): Correct definition when using post-3.2 ABI.
2989         * cp-tree.h (lang_type_class): Add empty_p.
2990         (CLASSTYPE_EMPTY_P): New macro.
2992 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2994         * init.c (build_delete): Do not apply save_expr for arrays.
2995         (build_vec_delete): Likewise.
2997 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2999         * decl.c (layout_var_decl): Call layout_decl even for variables
3000         whose type is an array with unspecified bounds.
3002         PR c++/7176
3003         * lex.c (do_identifier): Add another option for the parsing
3004         parameter.
3005         * parse.y (do_id): Use it.
3007 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3009         PRs C++/6803, C++/7721 and C++/7803
3010         * decl.c (grokdeclarator): Gracefully handle template-name as
3011         decl-specifier.
3013 2002-10-11  Jason Molenda  <jmolenda@apple.com>
3015         * init.c (build_field_list): Provide uses_unions_p with a default
3016         value.
3018 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
3020         PR c++/5661
3021         * cp-tree.h (variably_modified_type_p): New function.
3022         (grokdeclarator) Tighten check for variably modified types as
3023         fields.
3024         * pt.c (convert_template_argument): Do not allow variably modified
3025         types as template arguments.
3026         * tree.c (variably_modified_type_p): New function.
3028         * NEWS: Document removal of "new X = ..." extension.
3029         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
3030         brace-enclosed initializers.
3031         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
3032         (initialize_local_var): Remove declaration.
3033         (expand_static_init): Likewise.
3034         * decl.c (next_initializable_field): New function.
3035         (reshape_init): Likewise.
3036         (check_initializer): Use them.  Build dynamic initializer for
3037         aggregates here too.
3038         (initialize_local_var): Simplify, and incorporate cleanup
3039         insertion code as well.
3040         (destroy_local_var): Remove.
3041         (cp_finish_decl): Tidy.
3042         (expand_static_init): Fold checks for whether or not a variable
3043         needs initialization into this function.  Simplify.
3044         * decl2.c (do_static_initialization): Simplify.
3045         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
3046         be done for us automatically.
3047         (expand_default_init): Handle brace-enclosed initializers
3048         correctly.
3049         (expand_aggr_init_1): Remove RTL-generation code.
3050         (build_vec_init): Remove "new X = ..." support.
3051         * parse.y (new_initializer): Likewise.
3052         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
3053         brace-enclosed initializer.
3054         (create_pseudo_type_info): Likewise.
3055         * typeck2.c (store_init_value): Don't try to handle digest_init
3056         being called more than once.
3057         (digest_init): Tidy handling of brace-enclosed initializers.
3059 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3061         * decl.c (typename_hash): Use htab_hash_pointer.
3063 2002-10-10  Jim Wilson  <wilson@redhat.com>
3065         * decl.c (duplicate_decls): Don't call decl_attributes.
3067 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
3069         PR c/7353
3070         * decl.c (start_decl): Unconditionally issue error for
3071         'typedef foo = bar'.
3072         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
3073         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
3075 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3077         * decl2.c (prune_vtable_vardecl): Delete unused function.
3079 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3081         PR c++/7754
3082         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3083         procesing template functions.
3084         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3085         type. Call layout_decl.
3086         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3088 2002-10-07  Richard Henderson  <rth@redhat.com>
3090         * decl2.c, pt.c: Revert c++/7754 fix.
3092 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3094         PR c++/7804
3095         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
3097 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3099         PR c++/7931
3100         * pt.c (for_each_template_parm_r): Handle BASELINKs.
3102         PR c++/7754
3103         * decl2.c (finish_anon_union): Do not expand anonymous unions when
3104         procesing template functions.
3105         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
3106         type. Call layout_decl.
3107         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
3109 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
3111         PR c++/8006
3112         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
3113         template parameters.
3114         (globals): Add entity and need_abi_warning.
3115         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
3116         CLASSTYPE_TEMPLATE_INFO.
3117         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
3118         TYPE_TI_TEMPLATE.
3119         (write_prefix): Handle typename types correctly.
3120         (write_template_prefix): Handle template template parameters
3121         correctly.
3122         (start_mangling): Add entity parameter.
3123         (finish_mangling): Warn about names whose mangling will change.
3124         (mangle_decl_string): Adjust.
3125         (mangle_type_string): Likewise.
3126         (mangle_special_for_type): Likewise.
3127         (mangle_ctor_vtbl_for_type): Likewise.
3128         (mangle_thunk): Likewise.
3129         (mangle_guard_variable): Likewise.
3130         (mangle_ref_init_variable): Likewise.
3132 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
3134         PR c++/7188.
3135         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
3136         * cp-tree.h (emit_base_init): Rename to ....
3137         (emit_mem_initializers): ... this.
3138         (expand_member_init): Change prototype.
3139         * init.c (perform_member_init): Compute explicit, rather than
3140         requiring it as a parameter.
3141         (sort_member_init): Rename to ...
3142         (sort_mem_initializers): ... this.  Process bases and data members
3143         together.
3144         (sort_base_init): Remove.
3145         (emit_base_init): Rename to ...
3146         (emit_mem_initializers): ... this.
3147         (expand_aggr_vbase_init_1): Remove.
3148         (construct_virtual_bases): Rename to ...
3149         (construct_virtual_base): ... this.
3150         (expand_member_init): Rework handling of base initializers.
3151         * method.c (do_build_copy_constructor): Use
3152         finish_mem_initializers.
3153         * parse.y (member_init): Adjust calls to expand_member_init.
3154         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
3155         (tsubst_initializer_list): Use expand_member_init.
3156         * semantics.c (finish_mem_intiailizers): Simplify.
3158 2002-10-02  Matt Austern  <austern@apple.com>
3159         * decl.c (walk_vtables_r): Fixed typo that caused result to
3160         never get a nonzero value.
3162 2002-10-02  Roger Sayle  <roger@eyesopen.com>
3164         PR optimization/6627
3165         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
3166         from here, and move it to tree.h.
3167         * decl.c (cxx_init_decl_processing): If storing the vbit
3168         in function pointers, ensure that force_align_functions_log
3169         is atleast one.
3171 2002-10-02  Matt Austern  <austern@apple.com>
3173         * class.c (check_field_decls): Changed warning about const member
3174         variables so that it doesn't get issued for a class aggregate.
3176 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3178         * decl.c (cp_finish_decl): Make sure array types are laid out,
3179         even if the array bounds are unknown.
3181 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
3183         * class.c (build_vtbl_initializer): Change build_c_cast
3184         to build1.
3186 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
3188         * decl.c (cp_finish_decl): Make sure array types are laid out,
3189         even if the array bounds are unknown.
3191         * decl.c (cp_finish_decl): Correct check for dynamic
3192         initialization of thread-local storage.
3194 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
3196         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
3197         overloaded.
3199 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
3201         * class.c (build_vtbl_initializer): Add cast.
3202         (add_vcall_offset_vtbl_entries_1):
3203         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
3205 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
3207         * class.c (walk_subobject_offsets): Correct the calculation of
3208         offsets for virtual bases.  Correct the counting of array
3209         elements.
3210         (layout_nonempty_base_or_field): Simplify.  Correct the
3211         calculation of offsets to be propagated through the binfo
3212         hierarchy.
3213         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
3214         Add the FIELD_DECL to TYPE_FIELDS.
3215         (build_base_fields): Adjust accordingly.
3216         (layout_virtual_bases): Use build_base_field.
3217         (end_of_class): Return a tree, not an integer.
3218         (warn_about_ambiguous_direct_bases): Rename to ...
3219         (warn_about_ambiguous_bases): ... this.
3220         (include_empty_classes): New function.
3221         (layout_class_type): Create an alternative version of the type to
3222         be used when as a base class type.  Do not call
3223         finish_record_layout until we are done laying out the class.
3224         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
3225         as_base.
3226         (CLASSTYPE_SIZE): Reimplement.
3227         (CLASSTYPE_SIZE_UNIT): Likewise.
3228         (CLASSTYPE_ALIGN): Likweise.
3229         (CLASSTYPE_USER_ALIGN): Likewise.
3230         (CLASSTYPE_AS_BASE): New macro.
3231         (DECL_INITIALIZED_P): Likewise.
3232         (extract_init): Remove prototype.
3233         (build_forced_zero_init): Rename to ...
3234         (build_zero_init): ... this.
3235         (force_store_init_value): Remove.
3236         * decl.c (obscure_complex_init): Remove.
3237         (duplicate_decls): Copy DECL_INITIALIZED_P.
3238         (check_initializer): Do not leave junk in DECL_INITIAL.
3239         (cp_finish_decl): Handle zero-initialization of entities with
3240         static storage duration.
3241         * expr.c (extract_init): Remove.
3242         * init.c (build_forced_zero_init): Remove.
3243         (build_zero_init): New function.
3244         (build_default_init): Use it.
3245         (build_field_list): Skip FIELD_DECLs for base subobjects.
3246         (push_base_cleanups): Likewise.
3247         * method.c (do_build_assign_ref): Likewise.
3248         (synthesize_exception_spec): Likewise.
3249         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
3250         (regenerate_decl_from_template): To not set DECL_INITIAL for a
3251         static data member whose initialization took place in its class.
3252         (instantiate_decl): Do not pass an initializer to cp_finish_decl
3253         in that situation.
3254         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
3255         (dfs_unuse_fields): Likewise.
3256         * tree.c (pod_type_p): Handle error_mark_node.
3257         (zero_init_p): Likewise.
3258         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
3259         subobjects.
3260         * typeck2.c (store_init_value): Remove #if 0'd code.
3261         (force_store_init_value): Remove.
3262         (process_init_constructor): Use build_zero_init.
3264 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
3266         PR c++/7788
3267         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
3269 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
3271         * cp-tree.h: Fix comment typos.
3272         * decl.c: Likewise.
3273         * pt.c: Likewise.
3275 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
3277         * cp/class.c (contains_empty_class_p): New method.
3278         (walk_subobject_offsets): Correct computation of field offset.
3279         (layout_empty_base): Correct placement of emtpy base classes.
3280         (layout_class_type): Warn about ABI changes.
3282 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
3284         * cp/class.c (layout_virtual_bases): Do not round the size of the
3285         type to a multiple of the alignment before laying out virtual bases.
3286         (layout_class_type): Correct handling of bit-fields that are wider
3287         than their type inside unions.  Round the size of the type to a
3288         even number of bytes when computing the size without virtual
3289         bases.
3290         * cp/cp-tree.h (abi_version_at_least): New macro.
3292 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
3294         * ChangeLog: Follow spelling conventions.
3295         * ChangeLog.2: Likewise.
3296         * call.c: Likewise.
3297         * class.c: Likewise.
3298         * cp-tree.h: Likewise.
3299         * cvt.c: Likewise.
3300         * decl.c: Likewise.
3301         * decl2.c: Likewise.
3302         * except.c: Likewise.
3303         * friend.c: Likewise.
3304         * g++spec.c: Likewise.
3305         * init.c: Likewise.
3306         * lex.c: Likewise.
3307         * mangle.c: Likewise.
3308         * method.c: Likewise.
3309         * operators.def: Likewise.
3310         * optimize.c: Likewise.
3311         * pt.c: Likewise.
3312         * rtti.c: Likewise.
3313         * search.c: Likewise.
3314         * semantics.c: Likewise.
3315         * spew.c: Likewise.
3316         * tree.c: Likewise.
3317         * typeck.c: Likewise.
3319 2002-09-18  Devang Patel  <dpatel@apple.com>
3321         * cp/cp-tree.h: New prototype for walk_vtabls().
3322         * cp/decl.c (walk_vtables_r): New function.
3323         (struct cp_binding_level): Add new members, namespaces,
3324         names_size and vtables.
3325         (add_decl_to_level): Add decl in namespaces or vtables
3326         chain, if conditions match.
3327         (walk_vtables): New function.
3328         (walk_namespaces_r): Travers separate namespace chain
3329         for namespace decls.
3330         (wrapup_globals_for_namespace): Use names_size instead
3331         of list_length().
3332         * cp/decl2.c (finish_file): Use walk_vtables() instead of
3333         walk_globals() to walk vtable decls.
3335 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
3337         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
3338         ICE with invalid pointers & references.
3340 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
3342         * Make-lang.in: Remove all references to the demangler.
3343         * cxxfilt.c: Moved to binutils.
3345 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3347         PR c++/7718
3348         * pt.c (tsubst_decl): Remove assert.
3350         Remove DR 295 implementation.
3351         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
3352         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
3353         about ignoring volatile qualifiers.
3355         * search.c (lookup_member): Correct documentation.
3357 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
3359         * cp-tree.h (union lang_tree_node): Add chain_next option.
3361 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
3363         * parse.y (parse_finish_call_expr): Check lookup_member result.
3365         PR c++/7015
3366         * semantic.c (finish_asm_stmt): Fix operand/output_operands
3367         thinko.
3368         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
3370 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
3372         PR c++/7919
3373         * call.c (build_over_call): Convert this pointer for fns found by
3374         using decls.
3376 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
3378         * ChangeLog: Follow spelling conventions.
3379         * ChangeLog.1: Likewise.
3381 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
3383         PR c++/7768
3384         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
3386 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
3388         * error.c: Fix comment formatting.
3389         * except.c: Likewise.
3390         * expr.c: Likewise.
3391         * friend.c: Likewise.
3392         * g++spec.c: Likewise.
3393         * init.c: Likewise.
3394         * lex.c: Likewise.
3395         * mangle.c: Likewise.
3396         * method.c: Likewise.
3397         * optimize.c: Likewise.
3398         * pt.c: Likewise.
3399         * rtti.c: Likewise.
3400         * search.c: Likewise.
3401         * semantics.c: Likewise.
3402         * spew.c: Likewise.
3403         * tree.c: Likewise.
3404         * typeck.c: Likewise.
3405         * typeck2.c: Likewise.
3407 2002-09-13  Matt Austern  <austern@apple.com>
3409         PR C++/7828
3410         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
3411         * cp/call.c: Change call-by-const-reference mechanism to use
3412         non_cast_lvalue_p when deciding whether the create a temporary.
3413         We need a temporary when passing, e.g. (long) x by const ref.
3415 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
3417         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
3419 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
3421         * decl.c: Fix comment formatting.
3422         * decl2.c: Likewise.
3424 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
3426         * call.c: Fix comment formatting.
3427         * class.c: Likewise.
3428         * cp-lang.c: Likewise.
3429         * cp-tree.h: Likewise.
3430         * cvt.c: Likewise.
3432 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
3434         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
3435         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
3436         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
3437         minor adjustments (use version_string, eliminate yet another
3438         duplicate of xmalloc)
3440 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3442         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
3444 2002-09-05  Jason Merrill  <jason@redhat.com>
3446         * typeck2.c (add_exception_specifier): Only pedwarn for an
3447         incomplete type.
3448         (require_complete_eh_spec_types): New fn.
3449         (cxx_incomplete_type_diagnostic): Also support pedwarning.
3450         * typeck.c (complete_type_or_diagnostic): Likewise.
3451         * call.c (build_call): Call require_complete_eh_spec_types.
3452         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
3453         on an incomplete type.
3455 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
3457         * decl.c (start_cleanup_fn): Clear interface_only before
3458         start_function, restore it afterwards.
3460 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
3462         * cp-tree.h (finish_builtin_type): Remove.
3463         * decl2.c (finish_builtin_type): Move to common code.
3464         * decl.c (build_ptrmemfunc_type): Adjust.
3465         * rtti.c (create_pseudo_type_info): Adjust.
3466         (create_tinfo_types): Adjust.
3468 2002-08-31  Jason Merrill  <jason@redhat.com>
3470         * cp-lang.c (cp_expr_size): Allow initialization from a
3471         CONSTRUCTOR.
3473 2002-08-30  Richard Henderson  <rth@redhat.com>
3475         PR opt/7515
3476         * tree.c: Include target.h.
3477         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
3478         don't bind locally.
3479         * Makefile.in (tree.o): Update.
3481 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
3483         * class.c (layout_virtual_bases): Warn about bugs in G++ that
3484         result in incorrect object layouts.
3485         (layout_class_type): Likewise.
3487 2002-08-24  Matt Austern  <austern@apple.com>
3489         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
3490         are allowable.
3491         (real_lvalue_p): Update caller.
3492         (lvalue_p): Ditto.
3493         (non_cast_lvalue_or_else): New.
3494         * tree.h: Declare it.
3495         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
3497 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
3499         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
3500         and COND_EXPR specially; fix error message output.
3502 2002-08-22  Jason Merrill  <jason@redhat.com>
3504         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
3505         * semantics.c (nullify_returns_r): Likewise.
3507 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3509         Fix PR/7621
3510         * typeck.c (finish_class_member_access_expr): Diagnose cases where
3511         name lookup finds nothing.
3513 2002-08-15  Jason Merrill  <jason@redhat.com>
3515         * semantics.c (finish_then_clause): Remove redundant assignment.
3516         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
3517         extra binding level outside the if/switch statement.
3518         (finish_while_cond, finish_for_cond): Rewrite complex condition
3519         into the loop body.
3521 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
3523         * parse.y (sizeof, alignof, typeof): New non-terminals to
3524         increment skip_evaluation.  Replace terminals with them and
3525         decrement skip_evaluation at the end of rules using them.
3526         * decl2.c (mark_used): Don't assemble_external if
3527         skipping evaluation.
3529 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
3531         Fix PR/7504
3532         * parse.y (parse_finish_call_expr): Handle incomplete
3533         type used to name a scope.
3535 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
3537         PR c++/7598
3538         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
3539         regression caused by my 2002-08-08 patch.
3541 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
3543         * decl.c (pushdecl_class_level): Honor requests to bind names to
3544         OVERLOADs.
3546 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3548         * decl2.c (build_call_from_tree): Fix uninitialized variable.
3549         * parse.y (parse_finish_call_expr): Likewise.
3550         * repo.c (old_args, old_dir, old_main): Const-ify.
3552 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
3554         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
3555         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
3556         * optimize.c (maybe_clone_body): Likewise.
3557         * pt.c (tsubst_enum): Likewise.
3558         (lookup_template_class): Likewise.
3559         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
3561 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
3563         * lang-specs.h: Remove -ansi.
3565 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
3567         * tree.c (maybe_dummy_object): Replace // with /* */
3569 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
3571         * call.c (standard_conversion): Use build_ptrmem_type.
3572         * cp-tree.h (build_ptrmem_type): New function.
3573         (adjust_result_of_qualified_name_lookup): Likewise.
3574         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
3575         static data members.
3576         (build_ptrmem_type): New function.
3577         (grokdeclarator): Do not use build_offset_type when encountering a
3578         qualified name.
3579         * parse.y (parse_finish_call_expr): Use
3580         adjust_result_of_qualified_name_lookup.
3581         * search.c (adjust_result_of_qualified_name_lookup): New function.
3582         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
3583         accessing OFFSET_TYPEs directly.
3585 2002-08-08  Mike Stump  <mrs@apple.com>
3587         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
3588         (type_decays_to): Likewise.
3589         * class.c (find_final_overrider): Likewise.
3590         (maybe_note_name_used_in_class): Likewise.
3591         * decl.c (current_tmpl_spec_kind): Likewise.
3592         (add_binding): Likewise.
3593         (push_class_binding): Likewise.
3594         (duplicate_decls): Likewise.
3595         (layout_var_decl): Likewise.
3596         (grokfndecl): Likewise.
3597         (grokdeclarator): Likewise.
3598         (check_default_argument): Likewise.
3599         * decl2.c (handle_class_head): Likewise.
3600         * error.c (dump_template_decl): Likewise.
3601         * init.c (build_offset_ref): Likewise.
3602         * pt.c (check_specialization_scope): Likewise.
3603         (determine_specialization): Likewise.
3604         (check_explicit_specialization): Likewise.
3605         (maybe_check_template_type): Likewise.
3606         (process_partial_specialization): Likewise.
3607         (check_default_tmpl_args): Likewise.
3608         (push_template_decl_real): Likewise.
3609         (convert_template_argument): Likewise.
3610         (try_class_unification): Likewise.
3611         (get_bindings_real): Likewise.
3612         (do_decl_instantiation): Likewise.
3613         * semantics.c (begin_function_definition): Likewise.
3614         (finish_member_declaration): Likewise.
3615         (check_multiple_declarators): Likewise.
3616         * typeck.c (comp_array_types): Likewise.
3617         (comptypes): Likewise.
3618         (expr_sizeof): Likewise.
3619         (build_binary_op): Likewise.
3620         (dubious_conversion_warnings): Likewise.
3621         (check_return_expr): Likewise.
3623 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
3625         * typeck.c (build_class_member_access_expr): Do not return
3626         error_mark_node when no error has occurred.
3628 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3630         * typeck.c (build_component_addr): Remove.
3631         (build_unary_op): Just check it's not a bitfield, and then build
3632         an ADDR_EXPR.
3634 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3636         * class.c (convert_to_base): Correct check for error_mark_node.
3637         (create_vtable_ptr): Remove unused VFUNS_P parm.
3639 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3641         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
3643 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
3645         Rework build_component_ref.
3646         * call.c (build_vfield_ref): Do not go through build_component_ref.
3647         (build_field_call): Use build_class_member_access_expr.
3648         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
3649         (build_object_call): Likewise.
3650         * class.c (convert_to_base): New function.
3651         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
3652         (instantiate_type): Handle BASELINKs.
3653         * cp-tree.def (BASELINK): New tree code.
3654         * cp-tree.h (BASELINK_P): Reimplement.
3655         (SET_BASELINK_P): Remove.
3656         (BASELINK_BINFO): Reimplement.
3657         (BASELINK_FUNCTIONS): Likewise.
3658         (BASELINK_ACCESS_BINFO): Likewise.
3659         (BASELINK_OPTYPE): Likewise.
3660         (convert_to_base): New function.
3661         (name_p): Likewise.
3662         (build_object_ref): Remove.
3663         (build_component_ref_1): Likewise.
3664         (build_component_ref): Likewise.
3665         (build_x_component_ref): Likewise.
3666         (build_class_member_access_expr): New function.
3667         (finish_class_member_access_expr): Likewise.
3668         (build_ptrmemfunc_access_expr): Likewise.
3669         * decl.c (grokdeclarator): Handle BASELINKs.
3670         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
3671         finish_class_member_access_expr.
3672         (arg_assoc): Handle BASELINKs.
3673         (do_class_using_decl): Likewise.
3674         * error.c (dump_decl): Likewise.
3675         (dump_expr): Use build_ptrmemfunc_access_expr.
3676         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
3677         destructors.
3678         (build_throw): Use BASELINK_FUNCTIONS.
3679         * init.c (perform_member_init): Use
3680         build_class_member_access_expr.
3681         (build_offset_ref): Handle BASELINKs.  Use
3682         build_class_member_access_expr.
3683         * method.c (hack_identifier): Likewise.
3684         * parse.y (do_id): Use BASELINK, not TREE_LIST.
3685         (primary): Remove uses of build_object_ref.
3686         * pt.c (lookup_template_function): Handle BASELINKs.
3687         (resolve_overloaded_unification): Likewise.
3688         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
3689         (lookup_field): Use BASELINK, not TREE_LIST.
3690         (lookup_fnfiels): Likewise.
3691         (setup_class_bindings): Likewise.
3692         * semantics.c (finish_object_call_expr): Do not use
3693         build_method_call when we already know what function is being
3694         called.
3695         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
3696         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
3697         TREE_CHAIN.
3698         (name_p): New function.
3699         * typeck.c (build_object_ref): Remove.
3700         (build_component_ref_1): Likewise.
3701         (build_x_component_ref): Likewise.
3702         (build_class_member_access_expr): New function.
3703         (finish_class_member_access_expr): Likewise.
3704         (build_ptrmemfunc_access_expr): Likewise.
3705         (get_member_function_from_ptrfunc): Use
3706         build_ptrmemfunc_access_expr.
3707         (build_binary_op): Likewise.
3708         (build_unary_op): Likewise.
3709         (build_ptrmemfunc): Likewise.
3710         (pfn_from_ptrmemfunc): Likewise.
3711         * typeck2.c (build_m_component_ref): Adjust comment.
3713 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
3715         * Make-lang.in (CXX_C_OBJS): Update.
3716         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
3717         * cp-tree.h (cxx_decode_option): Remove.
3718         * decl2.c (compare_options, lang_f_options, unsupported_options,
3719         cxx_decode_option): Remove.
3721 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
3723         * typeck.c (build_x_unary_op): Handle pointer-to-member.
3725 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
3727         * class.c: Don't include obstack.h.
3728         (popclass):
3729         * decl2.c: Delete bogus comment.
3730         * error.c: Don't include obstack.h.
3731         * except.c: Likewise.
3732         (dump_type): Correct comment.
3733         * method.c: Don't include obstack.h.
3734         * tree.c: Likewise.
3736 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
3738         Fix PR/2213
3739         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
3740         expressions to pointer-to-data-member of pointer-to-member-functions.
3742 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
3744         * cvt.c (ocp_convert): Delete obsolete code.
3745         * parse.y (permanent_obstack): Delete declaration.
3746         * pt.c (permanent_obstack): Delete declaration.
3747         * repo.c (permanent_obstack): Delete declaration.
3748         (open_repo_file): Use xmalloc instead of permanent_obstack.
3749         (init_repo): Use xstrdup instead of permanent_obstack.
3751 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
3753         * cp-tree.h (VF_DERIVED_VALUE): Remove.
3754         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
3756 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
3758         PR 7470.
3759         C++ ABI change - vfunc ordering.
3760         * class.c (add_virtual_function): Remove.
3761         (dfs_modify_all_vtables): Take list of all declared
3762         virtuals. Assign all that are not in primary base.
3763         (check_for_override): Adjust comments.
3764         (create_vtable_ptr): Take single list of virtuals. Build chain
3765         of declared virtuals here.
3766         (layout_class_type): Take single list of virtuals. Adjust.
3767         (finish_struct_1): Keep virtuals on single list. Adjust.
3769 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3771         * init.c (build_member_call): Use build_new_method_call, not
3772         build_method_call.
3774 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
3776         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
3778 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
3780         * call.c (build_method_call): Issue a more helpful error message
3781         about ambiguous method names.
3783 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
3785         * tree.c (build_shared_int_cst): Make cache file scope, and
3786         GTY it.
3788 2002-08-02  Jason Merrill  <jason@redhat.com>
3790         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
3791         (cp_expr_size): New fn.
3792         * call.c (build_over_call): Lose empty class hackery.
3793         (convert_arg_to_ellipsis): Promote non-POD warning to error.
3794         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
3796         * semantics.c (expand_body): Do tree optimization in the function
3797         context, too.
3799 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
3801         * cp-tree.h: Move all warning and flag declarations to c-common.h.
3802         * decl.c: Move all warning and flag variables to c-common.c.
3803         * decl2.c: Move all warning and flag variables to c-common.c.
3804         * lex.c (flag_digraphs): Remove.
3805         (warn_traditional): Now in c-common.c.
3807 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
3809         * call.c (build_field_call): Do not look up the field by name.
3810         (build_method_call): Simplify.
3811         (struct z_candidate): Add access_path and conversion_path.  Remove
3812         basetype_path.
3813         (convert_class_to_reference): Adjust use of
3814         add_function_candidate.
3815         (add_candidate): Add conversion_path argument.
3816         (add_function_candidate): Use it.
3817         (add_conv_dndidate): Likewise.
3818         (build_builtin_candidate): Likewise.
3819         (add_template_candidate_real): Add conversion_path argument.
3820         (add_template_conv_candidate): Likewise.
3821         (add_template_candidate): Likewise.
3822         (build_user_type_conversion_1): Use it.
3823         (build_new_function_call): Remove name lookup code.  Adjust use of
3824         add_template_candidate and add_function_candidate.
3825         (build_new_op): Likewise.
3826         (convert_like_real): Use build_special_member_call.
3827         (build_over_call): Use cand->conversion_path.
3828         (build_special_member_call): New method.
3829         (build_new_method_call): Remove name lookup code.
3830         * cp-tree.def (OFFSET_REF): Update documentation.
3831         (TEMPLATE_ID_EXPR): Likewise.
3832         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
3833         (BASELINK_OPTYPE): Likewise.
3834         (build_new_method_call): Adjust prototype.
3835         (build_special_member_call): New method.
3836         (build_baselink): New method.
3837         (build_offset_ref_call_from_tree): Likewise.
3838         (build_call_from_tree): Likewise.
3839         (finish_qualified_call_expr): Remove.
3840         (finish_call_expr): Adjust prototype.
3841         (build_x_function_call): Remove.
3842         * cvt.c (ocp_convert): Use build_special_member_call.
3843         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
3844         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
3845         CALL_EXPR.
3846         (build_offset_ref_call_from_tree): New function.
3847         (build_call_from_tree): Likewise.
3848         * init.c (expand_cleanup): Use build_special_member_call.
3849         (expand_default_init): Likewise.
3850         (build_member_call): Use finish_call_expr.
3851         (build_new_1): Use build_special_member_call.
3852         (push_base_cleanups): Likewise.
3853         * method.c (do_build_assign_ref): Likewise.
3854         * parse.y (template_id): Do not pass a COMPONENT_REF to
3855         lookup_template_function.
3856         (primary): Use parse_finish_call_epxr, not finish_call_expr.
3857         (parse_finish_call_expr): New function.
3858         * pt.c (lookup_template_function): Add assertions.
3859         * search.c (lookup_base): Allow T to be a binfo.
3860         (build_baselink): New function.
3861         (lookup_member): Use it.
3862         * semantics.c (finish_call_expr): Do not do name lookup.
3863         (finish_object_call_expr): Remove #if 0'd code.
3864         (finish_qualified_call_expr): Remove.
3865         * typeck.c (build_x_function_call): Remove.
3866         (build_static_case): Use build_special_member_call.
3867         * typeck2.c (build_functional_cast): Likewise.
3869 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3871         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
3873 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
3875         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
3877 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
3879         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
3880         documentation.
3882 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
3884         * cp-tree.h: Comment typo fix.
3886 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
3888         * spew.c (space_for_token): Allocate zeroed memory for a new token
3889         chunk.
3891 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3893         * decl.c (builtin_function_1): No need to explicitly mark
3894         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
3896 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3898         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
3900 2002-07-26  Jason Merrill  <jason@redhat.com>
3902         * call.c (build_over_call): Likewise.
3903         (cp_convert_parm_for_inlining): New fn.
3904         (convert_for_arg_passing): New fn.
3905         (convert_default_arg, build_over_call): Use it.
3906         (type_passed_as): New fn.
3907         * pt.c (tsubst_decl): Use it.
3908         * decl2.c (cp_build_parm_decl): New fn.
3909         (build_artificial_parm): Use it.
3910         (start_static_storage_duration_function): Likewise.
3911         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
3912         (grokparms): Don't mess with DECL_ARG_TYPE.
3913         * typeck.c (convert_arguments): Use convert_for_arg_passing.
3914         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3915         Define.
3916         * cp-tree.h: Declare new fns.
3918 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
3920         * cp-tree.h (flag_operator_names): Remove.
3921         * decl2.c (flag_operator_names): Remove.
3922         (lang_f_options): Remove operator-names.
3923         * lex.c (D_OPNAME): Remove.
3924         (reswords): Remove operator names.
3925         (rid_to_yy): Remove operator names.
3926         (init_reswords): No need to handle D_OPNAME.
3927         * spew.c (read_process_identifier): There are no operator
3928         names.
3930 2002-07-26  Jason Merrill  <jason@redhat.com>
3932         * dump.c (cp_dump_tree): Call c_dump_tree.
3933         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3935 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3937         * error.c (print_whitespace): Remove.
3938         * g++spec.c (LIBUNWIND): Move.
3939         * mangle.c (mangled_position, write_signed_number): Remove.
3941 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3943         * decl2.c (cxx_decode_option): Similarly.
3945 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
3947         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
3948         (cxx_sizeof_or_alignof_type): Take a third argument.
3949         (cxx_sizeof): Adjust definition.
3950         (cxx_alignof): Likewise.
3951         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
3952         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
3953         complaining.
3954         (c_sizeof_nowarn): Remove definition.
3955         (build_unary_op): Use cxx_sizeof_nowarn.
3957 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
3959         * tree.c (cp_build_qualified_type_real): When copying
3960         pointer-to-method types, unshare the record that holds
3961         the cached pointer-to-member-function type.
3963 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3965         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
3967 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
3969         Fix PR/7363:
3970         * typeck.c (cxx_sizeof_or_alignof_type): New function.
3971         (c_sizeof): Remove definition.
3972         (expr_sizeof): Use cxx_sizeof.
3973         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
3974         * decl.c (finish_destructor_body): Use cxx_sizeof.
3975         * semantics.c (finish_alignof): Likewise.
3976         (finish_alignof): Use cxx_alignof.
3977         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
3978         (cxx_sizeof_or_alignof_type): Declare.
3979         (my_friendly_assert): Move to ../c-common.h.
3981 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3983         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
3985 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3987         PR c++/7347, c++/7348
3988         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
3989         * decl.c (make_typename_type): Use it.
3990         (make_unbound_class_template): Likewise.
3991         (lookup_name_real): Don't call type_access_control if scope is
3992         template parameter dependent.
3993         * parse.y (template_arg): Call make_unbound_class_template with
3994         tf_parsing set.
3995         (nest_name_specifier): Call make_typename_type with tf_parsing set.
3996         (typename_sub0): Likewise.
3997         (typename_sub1): Likewise.
3998         (instantiate_decl): Push class scope.
3999         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
4000         for both static variable and member function template.
4001         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
4002         and arguments.
4003         * search.c (type_access_control): Do type access for TEMPLATE_DECL
4004         too.
4006 2002-07-20  Roger Sayle  <roger@eyesopen.com>
4008         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
4009         test by using positive_option.  Make whitespace consistent.
4011 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
4013         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
4014         members with 'locus'.  Adjust use throughout.
4015         (struct feed):  Likewise.
4016         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
4017         Adjust use.
4018         (snarf_defarg): Use error(), not error_with_file_and_line().
4020 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
4022         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
4023         cpp_options is included.
4025 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4027         PR c++/2862, c++/2863
4028         * pt.c (determine_specialization): Compare the length of
4029         TYPE_ARG_TYPES.  Tidy.
4031 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4033         PR c++/3797
4034         * decl.c (duplicate_decls): Don't propagate inlining parameters from
4035         olddecl to newdecl when newdecl is a specialization of the
4036         instantiation olddecl.
4038 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4040         PR c++/4802, c++/5387
4041         * decl.c (make_typename_type): Use enforce_access.
4043 2002-07-17  Scott Snyder <snyder@fnal.gov>
4045         PR c++/7320
4046         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
4048 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
4050         * class.c (add_method): Correct handling of conversion operators.
4052 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
4054         PR c++/7224
4055         * class.c (add_method): Simplify.
4057 2002-07-11  Jason Merrill  <jason@redhat.com>
4059         PR c++/7279
4060         * tree.c (cp_copy_res_decl_for_inlining): Also copy
4061         TREE_ADDRESSABLE.
4063 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
4065         * pt.c (template_parm_this_level_p, push_template_decl_real):
4066         Pass depth as int pointer.
4068 2002-07-11  Tim Josling  <tej@melbpc.org.au>
4070         Remove front end hard coding from gengtype.c.
4072         * config-lang.in (gtfiles): Add files needed for this front end.
4074 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
4076         * cp-tree.h (unqualified_name_lookup_error): Declare it.
4077         (begin_function_definition): Adjust prototype.
4078         * lex.c (unqualified_name_lookup_error): New function, split out
4079         from ...
4080         (do_identifier): ... here.
4081         * parse.y (parse_begin_function_definition): New function.
4082         (fn.def1): Use it.
4083         * semantics.c (begin_function_definition): Accept decl-specifiers
4084         and attributes as separate parameters.
4086 2002-07-10  Jason Merrill  <jason@redhat.com>
4088         PR c++/6255
4089         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
4090         modifying the old one.
4092 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
4094         * cp-tree.h (constructor_name_p): Declare it.
4095         (check_template_template_default_arg): Likewise.
4096         * class.c (handle_using_decl): Use constructor_name_p.
4097         * decl.c (grokdeclarator): Likewise.
4098         * decl2.c (constructor_name_p): Define it.
4099         * init.c (build_member_call): Use constructor_name_p.
4100         * parse.y (template_parm): Use check_template_template_default_arg.
4101         * pt.c (check_explicit_specialization): Use constructor_name_p.
4102         * semantics.c (check_template_template_default_arg): New function.
4104 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4106         * pt.c (can_complete_type_without_circularity): Add static to
4107         function definition.
4109 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
4111         * cp-tree.h (have_extern_spec): Declare it
4112         * decl.c (have_extern_spec): Define it.
4113         (start_decl): Eliminate use of used_extern_spec.
4114         (start_function): Likewise.
4115         * parse.y (have_extern_spec): Remove declaration.
4116         (used_extern_spec): Likewise.
4117         (frob_specs): Eliminate use of used_extern_spec.
4118         (.hush_warning): Likewise.
4120 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4122         * Make-lang.in (cp/parse.o): Depend on decl.h.
4123         * cp-tree.h (do_decl_instantiation): Change prototype.
4124         * parse.y: Include decl.h.
4125         (parse_decl_instantiation): New function.
4126         (explicit_instantiation): Use it.
4127         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
4128         and DECLSPECS.
4130 2002-07-07  Roger Sayle  <roger@eyesopen.com>
4132         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
4133         constructor and destructor tests when passed a TEMPLATE_DECL.
4135 2002-07-05  Jason Merrill  <jason@redhat.com>
4137         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
4138         pointers.
4140         PR optimization/7145
4141         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
4143 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4145         Repair damage on weak-impared targets caused by my previous patch.
4146         * cp-tree.h (import_export_tinfo): Add parameter.
4147         * decl2.c (import_export_tinfo): Add parameter, post adjust
4148         DECL_COMDAT.
4149         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
4150         import_export_tinfo.
4152 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4154         PR c++/6944
4155         * init.c (build_aggr_init): Remove qualifiers of init before calling
4156         build_vec_init.
4157         (build_vec_init): Flatten multi-dimensional array during cleanup.
4158         (build_vec_delete_1): Abort if the type of each element is array.
4160 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
4162         * pt.c (instantiate_class_template): Fix typo.
4164 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4166         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
4167         by CVS conflict in my last patch.
4169 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4171         PR c++/6716
4172         * pt.c (can_complete_type_without_circularity): New function.
4173         (instantiate_class_template): Use it.
4174         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
4175         message due to incomplete fields.
4177 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
4179         PR c++/7112
4180         * mangle.c (write_expression): Add mangling for sizeof when
4181         applied to a type.
4182         * operators.def: Remove stale comment.
4184 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
4186         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
4187         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
4188         (tinfo_decl_type): Replace with ...
4189         (type_info_ptr_type): ... this.
4190         (import_export_tinfo): Declare.
4191         (tinfo_decl_p): Rename to ...
4192         (unemitted_tinfo_decl_p): ... this.
4193         * decl2.c (import_export_decl): Break out tinfo handling into ...
4194         (import_export_tinfo): ... here. New function.
4195         (finish_file): Adjust.
4196         * rtti.c (TINFO_REAL_NAME): New macro.
4197         (init_rtti_processing): Create the tinfo types.
4198         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
4199         (get_tinfo_decl): Adjust.
4200         (get_tinfo_ptr): New function.
4201         (get_type_id): Use it.
4202         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
4203         (ptr_initializer): Use get_tinfo_ptr.
4204         (ptm_initializer): Likewise.
4205         (synthesize_tinfo_var): Break into ...
4206         (get_pseudo_ti_init): ... this. Just create the initializer.
4207         (get_pseudo_ti_desc): .. and this.
4208         (create_real_tinfo_var): Remove.
4209         (create_pseudo_type_info): Don't create the vtable decl here.
4210         (get_vmi_pseudo_type_info): Remove.
4211         (create_tinfo_types): Adjust.
4212         (tinfo_decl_p): Rename to ...
4213         (unemitted_tinfo_decl_p): ... here. Adjust.
4214         (emit_tinfo_decl): Adjust. Create the initializer.
4216 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
4218         PR c++/6695
4219         * pt.c (tsubst_friend_class): Substitute into the context of the
4220         friend before using it.
4222 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
4224         * cp-tree.h (xref_tag): Change prototype.
4225         (handle_class_head): Likewise.
4226         (build_x_component_ref): Likewise.
4227         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
4228         (xref_tag): Take attributes as a separate parameter.
4229         (xref_tag_from_type): Adjust call to xref_tag.
4230         * decl2.c (build_expr_from_tree): Adjust call to
4231         build_x_component_ref.
4232         (handle_class_head): Take attributes as a separate parameter.
4233         * parse.y (parse_xref_tag): New function.
4234         (parse_handle_class_head): Likewise.
4235         (primary): Use parse_xref_tag.
4236         (class_head_decl): Use parse_handle_class_head.
4237         (class_head_defn): Likewise.
4238         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
4239         (build_dynamic_cast_1): Likewise.
4240         (create_pseudo_type_info): Likewise.
4241         (emit_support_tinfos): Likewise.
4242         * typeck.c (build_object_ref): Adjust call to
4243         build_x_component_ref.
4244         (build_x_component_ref): Remove protect parameter.
4246 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
4248         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
4249         * class.c (handle_using_decl): Likewise.
4250         (instantiate_type): Likewise.
4251         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
4252         (xref_basetypes): Change prototype.
4253         (begin_mem_initializers): New function.
4254         (get_overloaded_fn): Likewise.
4255         * decl.c (xref_basetypes): Simplify.
4256         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
4257         * init.c (build_offset_ref): Likewise.
4258         * parse.y (base_init): Use begin_mem_initializers().
4259         (structsp): Adjust call to xref_basetypes.
4260         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
4261         (instantiate_class_template): Adjust call to xref_basetypes.
4262         * semantics.c (begin_mem_initializers): New function.
4263         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
4264         (really_overlaoded_fn): Likewise.
4265         (get_overloaded_fn): New function.'
4266         (get_first_fn): USe BASELINK_FUNCTIONS.
4268 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
4270         * cp-tree.h (SCALAR_TYPE_P): New macro.
4271         (check_for_out_of_scope_variable): New function.
4272         (at_class_scope_p): Likewise.
4273         (finish_fname): Likewise.
4274         * class.c (finish_struct): Use at_function_scope_p.
4275         * decl.c (check_for_out_of_scope_variable): New function, split
4276         out from do_identifier.
4277         (finish_enum): Use at_function_scope_p.
4278         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
4279         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
4280         (primary): Use at_function_scope_p.
4281         * search.c (at_class_scope_p): New function.
4282         * semantics.c (finish_fname): Likewise.
4283         (check_multiple_declarators): Use at_function_scope_p.
4285 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
4287         * parse.y (parse_scoped_id): New function.
4288         (primary): Use it.
4289         * cp-tree.h (do_scoped_id): Adjust declaration.
4290         * lex.c (do_scoped_id): Remove call to yylex.
4291         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
4292         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
4293         expanding it inline.
4295 2002-06-23  Matt Thomas  <matt@3am-software.com>
4297         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
4298         "#if VMS_TARGET".
4300 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4302         * mangle.c (integer_type_codes): Const-ify.
4304 2002-06-20  Richard Henderson  <rth@redhat.com>
4306         PR c++/6747
4307         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
4308         Call put_var_into_stack.
4310 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4312         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
4313         array size calculation.
4315 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4317         PR c++/6892
4318         * pt.c (tsubst_expr): Handle FILE_STMT.
4320 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4322         PR c++/6723
4323         * pt.c (lookup_template_class): Don't build complete argument of
4324         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
4325         argument.
4327 2002-06-19  Akim Demaille  <akim@epita.fr>
4329         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
4330         decl.h's TYPENAME.
4331         * spew.c, lex.c: Adjust.
4332         * parse.y (explicit_instantiation): Add empty action to override
4333         the default $$ = $1 where it introduces a type clash.
4335 2002-06-14  Jason Merrill  <jason@redhat.com>
4337         * semantics.c (begin_for_stmt): Push the 'for' scope before
4338         adding the FOR_STMT.
4340         C++ ABI changes.
4341         * class.c (build_base_field): Set DECL_PACKED.
4342         (layout_class_type): Don't use tail padding of PODs.
4343         * mangle.c (write_unqualified_name): Fix template conversion op
4344         mangling.
4346 2002-06-16  Richard Henderson  <rth@redhat.com>
4348         PR opt/6793
4349         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
4350         after template instantiation.
4352 2002-06-16  Richard Henderson  <rth@redhat.com>
4354         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
4356 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4358         * cp-tree.h (compiler_error): Remove declaration.
4359         * lex.c (compiler_error): Remove definition.
4361 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
4363         * g++spec.c (LIBUNWIND): New.
4364         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
4366 2002-06-13  Jessica Han  <jessica@cup.hp.com>
4368         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
4369         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
4370         (build_vbase_offset_vtbl_entries): Likewise.
4371         * rtti.c (build_headof): Likewise.
4372         (get_tinfo_decl_dynamic): Likewise.
4373         (create_pseudo_type_info): Likewise.
4375 2002-06-12  Stan Shebs  <shebs@apple.com>
4377         * mpw-config.in: Remove file, no longer used.
4378         * mpw-make.sed: Ditto.
4380 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
4382         * decl2.c: Update call to cpp_handle_option.
4384 2002-06-07  H.J. Lu  (hjl@gnu.org)
4386         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
4388 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
4390         * error.c (cp_error_at): Fix typo.
4392 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
4394         * error.c (cp_diagnostic_starter): Adjust call.
4395         (maybe_print_instantiation_context): Change prototype to take a
4396         'diagnostic_info *'.
4397         (print_instantiation_full_context): Likewise.
4398         (print_instantiation_partial_context): Likewise.
4399         (cp_diagnostic_starter): Likewise.
4400         (cp_diagnostic_finalizer): Likewise.
4401         (cp_print_error_function): Likewise.
4402         (cp_printer): Take a secondary parameter as a 'text_info *'.
4403         Remove output_state savings.  Adjust calls.
4405 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
4407         * pt.c (inline_parm_levels): Mark for GC.
4409         * mangle.c (start_mangling): Allocate G.substitutions here...
4410         (init_mangle): ... rather than here.
4411         (finish_mangling): Clear the varray pointer when done with it.
4412         * spew.c (yylexstring): Don't use VARRAY_FREE.
4413         * search.c (bfs_walk): Don't use VARRAY_FREE.
4414         * decl2.c (pending_statics): Use gengtype to mark.
4415         (deferred_fns): Likewise.
4416         (ssdf_decls): Likewise.
4417         (init_decl2): Delete.
4418         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
4419         (cxx_init_decl_processing): Don't call init_decl2.
4420         (cxx_pop_function_context): Don't use VARRAY_FREE.
4421         * cp-tree.h (struct saved_scope): No need for special marking
4422         of varrays.
4423         (struct language_function): Likewise.
4424         (local_classes): Use gengtype to mark.
4425         (init_decl2): Delete prototype.
4426         * class.c (init_class_processing): Don't use
4427         ggc_add_tree_varray_root.
4428         (build_vtbl_initializer): Don't use VARRAY_FREE.
4430         * decl.c (typename_compare): Don't use same_type_p.
4432         * decl.c: Include hashtab.h instead of hash.h.
4433         (typename_hash): Update to use htab_h.
4434         (typename_compare): Likewise.
4435         (typename_htab): Use gengtype to mark.
4436         (build_typename_type): Update to use htab_h.
4437         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
4439         * Make-lang.in (gt-cp-tree.h): New rule.
4440         (cp/tree.o): Depend on gt-cp-tree.h.
4441         * config-lang.in (gtfiles): Add cp/tree.c.
4442         * tree.c: Include gt-cp-tree.h.
4443         (list_hash_table): Use gengtype to mark.
4444         (init_tree): Use gengtype to mark trees.
4446         * Make-lang.in (cp/decl.o): Add debug.h dependency.
4447         * call.c (struct z_candidate): Use gengtype.
4448         (USER_CONV_CAND): Use WRAPPER_ZC.
4449         (convert_class_to_reference): Use build_zc_wrapper.
4450         (build_type_conversion_1): Likewise.
4451         (build_over_call): Use WRAPPER_ZC.
4452         (add_warning): Use build_zc_wrapper.
4453         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
4454         * cp-tree.h (struct lang_identifier): Use gengtype.
4455         (struct template_parm_index_s): Likewise.
4456         (struct ptrmem_cst): Likewise.
4457         (struct tree_binding): Likewise.
4458         (struct tree_overload): Likewise.
4459         (struct tree_srcloc): Likewise.
4460         (struct tree_wrapper): Likewise.  Also modify to have a pointer
4461         to struct z_candidate rather than void.
4462         (enum cp_tree_node_structure_enum): New.
4463         (union lang_tree_node): New.
4464         (cxx_mark_tree): Delete prototype.
4465         (cp_tree_node_structure): New prototype.
4466         (build_ptr_wrapper): Delete prototype.
4467         (build_int_wrapper): Delete prototype.
4468         (build_zc_wrapper): New prototype.
4469         * decl.c: Include debug.h
4470         (cxx_mark_tree): Delete.
4471         (cp_tree_node_structure): New.
4472         * tree.c (build_ptr_wrapper): Delete.
4473         (build_int_wrapper): Delete.
4474         (build_zc_wrapper): New.
4476         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
4477         Correct typo.  Patch from k_fukui@highway.ne.jp.
4479         * semantics.c (current_stmt_tree): Update for change to
4480         struct language_function.
4481         (finish_mem_initializers): Likewise.
4482         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
4483         * cp-tree.h (struct language_function): Rename from
4484         cp_language_function.  Change all uses.
4485         (cp_function_chain): Don't need to cast.
4487         * class.c (duplicate_tag_error): Reset discriminator.
4488         (check_bases_and_members): Update for data structure changes.
4489         * cp-tree.h (struct lang_id2): Use gengtype.
4490         (flagged_type_tree): Likewise.
4491         (SET_LANG_ID): Use GGC on struct lang_id2.
4492         (struct cp_language_function): Use gengtype.  Remove field
4493         'x_vcalls_possible_p'.
4494         (current_vcalls_possible_p): Delete.
4495         (struct lang_type_header): New.
4496         (struct lang_type_class): Rename from struct lang_type.  Include
4497         struct lang_type_header.
4498         (struct lang_type_ptrmem): New.
4499         (struct lang_type): New.
4500         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
4501         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
4502         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
4503         (struct lang_decl_flags): Use gengtype.  Add discriminators.
4504         (struct lang_decl): Use gengtype.  Add and use discriminators.
4505         Update the macros that reference moved fields.
4506         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
4507         (SET_DECL_THUNK_P): Set discriminator too.
4508         (clear_inline_text_obstack): Delete prototype.
4509         (finish_inline_definitions): Delete prototype.
4510         (mark_pending_inlines): Delete prototype.
4511         (lang_check_failed): New prototype.
4512         * decl.c (struct named_label_use_list): Use gengtype.
4513         (struct named_label_list): Likewise.
4514         (mark_binding_level): Delete.
4515         (mark_named_label_lists): Delete.
4516         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
4517         (cxx_init_decl_processing): Use generated marker routine.
4518         (begin_destructor_body): Delete dead set to
4519         current_vcalls_possible_p.
4520         (mark_lang_function): Delete.
4521         (mark_cp_function_context): Delete.
4522         (lang_mark_tree): Use generated marker routines.
4523         * decl2.c (start_objects): Set discriminator when setting
4524         GLOBAL_INIT_PRIORITY.
4525         * lex.c (retrofit_lang_decl): Set discriminators.
4526         (copy_lang_type): Update for changes to lang_type structure.
4527         (cp_make_lang_type): Set discriminator.
4528         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
4529         * search.c: Include ggc.h.
4530         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
4531         (finish_inline_definitions): Delete.
4532         * spew.c (struct token): Use gengtype.
4533         (struct token_chunk): New.
4534         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
4535         (struct feed): Use gengtype.
4536         (feed_obstack): Delete.
4537         (feed): Mark as GC root.
4538         (pending_inlines): Mark as GC root.
4539         (pending_inlines_tail): Likewise.
4540         (processing_these_inlines): Likewise.
4541         (token_obstack): Make static.
4542         (first_token): Likewise.
4543         (init_spew): Don't initialize deleted things; use gengtype for roots.
4544         (clear_inline_text_obstack): Delete.
4545         (feed_input): Use GC for struct feed.  Update for changes to
4546         struct unparsed_text.
4547         (mark_pending_inlines): Delete.
4548         (next_token): Rename from add_token.  Change all callers.  Update
4549         for changes to struct unparsed_text.
4550         (space_for_token): New.
4551         (remove_last_token): New.
4552         (alloc_unparsed_text): New.
4553         (snarf_block): Take an unparsed_text.  Update for changes to struct
4554         unparsed_text.
4555         (snarf_method): Update for changes to struct unparsed_text.
4556         (snarf_defarg): Update for changes to struct unparsed_text.
4557         * tree.c (lang_check_failed): New.
4559         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
4560         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
4561         (cp/spew.o): Add dependency on gt-<filename>.h.
4562         (cp/decl2.o): Add dependency on gt-<filename>.h.
4563         (cp/call.o): Add dependency on gt-<filename>.h.
4564         (cp/pt.o): Add dependency on gt-<filename>.h.
4565         (cp/repo.o): Add dependency on gt-<filename>.h.
4566         (cp/parse.o): Add dependency on gt-<filename>.h.
4567         * call.c: Use gengtype for roots.
4568         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
4569         decl2.c parse.y pt.c repo.c spew.c.
4570         * cp-tree.h: Use gengtype for roots.
4571         (struct saved_scope): Use GGC, gengtype.
4572         (cp_parse_init): Delete prototype.
4573         (init_pt): Delete prototype.
4574         * decl.c: Use gengtype for roots.
4575         (mark_saved_scope): Delete.
4576         (cxx_init_decl_processing): Don't call deleted initilisation
4577         routines.
4578         (signed_size_zero_node): Delete, unused.
4579         * decl.h: Use gengtype for roots.
4580         * decl2.c: Use gengtype for roots.
4581         * lex.h: Use gengtype for roots.
4582         * parse.y: Use gengtype for roots.
4583         (cp_parse_init): Delete.
4584         * pt.c: Use gengtype for roots.
4585         (init_pt): Delete.
4586         * repo.c: Use gengtype for roots.
4587         * spew.c: Use gengtype for roots.
4589         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
4590         (cp/decl.o): Add dependency on gtype-cp.h.
4591         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
4592         Include gtype-cp.h.  Allow for filename changes.
4594         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
4595         (cp/decl.o): Add cp/gt-decl.h dependency.
4596         * config-lang.in (gtfiles): New.
4597         * tree.h: Rename struct binding_level to struct cp_binding_level.
4598         * decl.c: Rename struct binding_level to struct cp_binding_level.
4599         Include cp/gt-decl.h.
4600         (struct cp_binding_level): Use gengtype.
4601         (make_binding_level): Use GGC on struct cp_binding_level.
4602         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
4603         (cxx_init_decl_processing): Mark free_binding_level as
4604         deletable.
4606         * decl.c (mark_cp_function_context): Update calling sequence.
4608         * decl.c (start_function): Don't free 'struct
4609         cp_language_function'.
4610         (pop_cp_function_context): Likewise.
4611         (save_function_data): Allocate it using GC.
4612         * semantics.c (genrtl_start_function): Don't free 'struct
4613         cp_language_function'.
4615 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
4617         * lang-specs.h: Use cpp_debug_options.
4619 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
4621         * mangle.c, tree.c: Include real.h.
4622         * Make-lang.in: Update dependency lists.
4624 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4626         * lex.c: Don't include c-lex.h.
4627         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
4629 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
4631         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
4633 2002-05-22  Richard Henderson  <rth@redhat.com>
4635         * decl.c (obscure_complex_init): Check for VAR_DECL
4636         before using DECL_THREAD_LOCAL.
4638 2002-05-22  Richard Henderson  <rth@redhat.com>
4640         * decl.c (check_tag_decl): Handle RID_THREAD.
4641         (obscure_complex_init): Reject run-time init of tls.
4642         (grokvardecl, grokdeclarator): Handle RID_THREAD.
4643         * lex.c (reswords): Add __thread.
4644         (rid_to_yy): Map RID_THREAD to SCSPEC.
4646 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
4648         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
4649         * cp-tree.h (cxx_post_options): Kill.
4650         * cp-lex.c (cxx_post_options): Kill.
4652 2002-05-21  Richard Henderson  <rth@redhat.com>
4654         * lex.c (rid_to_yy): Add RID_THREAD.
4656 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
4658         * init.c (build_vec_init): Test for trivial copy-assignment when
4659         copy-assigning arrays.
4661 2002-05-20  Andreas Jaeger  <aj@suse.de>
4663         * init.c (build_default_init): Remove unused variable.
4665 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
4667         * call.c (any_strictly_viable): New.
4668         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
4670 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4672         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
4674 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4676         PR c++/186, DR 259
4677         * pt.c (do_decl_instantiation): Don't complain explicit
4678         instantiation after explicit specialization.
4679         (do_type_instantiation): Likewise.
4681 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
4683         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
4684         renamed from...
4685         (complete_type_or_else): ... this.  Redefined as macro.
4686         (cxx_incomplete_type_diagnostic): Declare.
4687         (cxx_incomplete_type_error): Define as macro.
4688         * init.c (build_delete): Warn about incomplete types other than
4689         void, and use the built-in operator delete for them.
4690         * typeck.c (complete_type_or_diagnostic): Renamed from
4691         complete_type_or_else.  Added warn_only argument, passed to...
4692         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
4693         warnings or errors depending on new warn_only argument.  Renamed
4694         from...
4695         (cxx_incomplete_type_error): ... this.  New implementation in
4696         terms of cxx_incomplete_type_diagnostic.
4698 2002-05-18  Jason Merrill  <jason@redhat.com>
4700         PR c++/6611
4701         * decl2.c (import_export_decl): If we clear
4702         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
4704 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4706         PR c++/6620
4707         * pt.c (verify_class_unification): Don't check if PARM is template
4708         parameter dependent.  Simplify.
4709         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
4710         parameter dependent expression.
4712 2002-05-14  Jason Merrill  <jason@redhat.com>
4714         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
4715         Do set DECL_COMDAT.
4716         (synthesize_tinfo_var): Take the public decl.
4717         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
4718         (emit_tinfo_decl): Adjust.  Call import_export_decl.
4719         * decl2.c (import_export_decl): Simplify tinfo decl handling.
4721 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
4723         * cp-tree.h (struct lang_type): Added non_zero_init.
4724         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
4725         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
4726         * class.c (check_field_decls): Test non_zero_init.
4727         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
4728         zero-to-NULL conversions.
4729         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
4730         type that needs zero-initialization without zeros.
4731         (check_initializer_decl): Compute zero-initializer for types
4732         that require a non-trivial one.
4733         * init.c (build_forced_zero_init): New function.
4734         (build_default_init): Use it.
4735         * tree.c (zero_init_p): New function.
4736         * typeck2.c (force_store_init_value): New function.
4737         (process_init_constructor): Create non-trivial zero-initializers
4738         for array members and class fields.
4740 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
4742         * lang-specs.h: Remove redundant -lang-c++.
4744 2002-05-13  Jason Merrill  <jason@redhat.com>
4746         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
4747         (fixed_type_or_null): See through reference vars.
4748         (build_base_path): Vtable contents are constant.
4749         * typeck.c (get_member_function_from_ptrfunc): Likewise.
4751 2002-05-12  Jason Merrill  <jason@redhat.com>
4753         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
4754         structs are safe.
4756 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
4758         * cp-tree.h (flag_ansi): Remove.
4759         * decl2.c (flag_ansi): Remove.
4760         (cxx_decode_option): Set flag_iso and flag_undef.
4762 2002-05-09  Jason Merrill  <jason@redhat.com>
4764         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
4765         Use subtraction rather than a bitmask to get the index.
4766         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
4768         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
4770 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
4772         * Make-lang.in (decl2.o): Update.
4773         * cp-tree.h (warn_multichar): Remove.
4774         * decl2.c: Include c-common.h.
4775         (warn_multichar): Remove.
4777 2002-05-03  Jason Merrill  <jason@redhat.com>
4779         * tree.c (build_cplus_array_type): Only const and volatile get
4780         special handling.
4782         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
4784 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
4786         ABI change, returning simple classes from functions.
4787         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
4788         TYPE_HAS_TRIVIAL_INIT_REF is false or
4789         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
4791 2002-04-30  Jason Merrill  <jason@redhat.com>
4793         PR debug/6436
4794         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
4795         anonymous class with a typedef if there are attributes.
4797 2002-04-29  Paul Eggert  <eggert@twinsun.com>
4799         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
4801 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
4803         PR c++/6477
4804         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
4805         non-NULL first.
4807 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
4809         PR c++/6492
4810         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
4811         enter that scope before name lookup.
4813         PR c++/6486
4814         * method.c (do_build_copy_constructor): Avoid building
4815         cv-qualified reference types.
4817 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
4819         PR c++/5719
4820         * decl.c (grok_op_properties): Assignment ops don't have to return
4821         by value. operator% should.
4823 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4825         PR c/6343
4826         * decl.c (duplicate_decls): Call merge_weak.
4828 2002-04-26  Richard Henderson  <rth@redhat.com>
4830         * parse.y (malloced_yyss, malloced_yyvs): New.
4831         (yyoverflow): Re-add.  Set them.
4832         (free_parser_stacks): New.
4834 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
4836         PR c++/6497
4837         * method.c (do_build_assign_ref): Pass a derivation to
4838         build_method_call when calling base class assignment operators.
4840 2002-04-26  Richard Henderson  <rth@redhat.com>
4842         * parse.y (yyoverflow): Revert.
4844 2002-04-26  Richard Henderson  <rth@redhat.com>
4846         PR c/3581
4847         * parse.y (string): Remove.  Update all uses to use STRING
4848         instead, and not call combine_strings.
4849         * rtti.c (tinfo_name): Use fix_string_type.
4850         * semantics.c (finish_asm_stmt): Don't call combine_strings.
4851         * spew.c (yylexstring): New.
4852         (read_token): Use it.
4854 2002-04-25  Richard Henderson  <rth@redhat.com>
4856         PR c/2161
4857         * parse.y (yyoverflow): New.
4859 2002-04-25  Jason Merrill  <jason@redhat.com>
4861         PR c++/5607
4862         * search.c (check_final_overrider): No longer static.
4863         * class.c (update_vtable_entry_for_fn): Call it.
4864         * cp-tree.h: Adjust.
4866 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4868         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4869         * cp-tree.h (cxx_set_yydebug): Die.
4870         * lex.c (YYDEBUG): Get from c-lex.h.
4871         (cxx_set_yydebug): Remove.
4872         * parse.y: Include c-lex.h.
4873         (YYDEBUG): Get from c-lex.h.
4875 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
4877         PR c++/6438.
4878         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
4879         void.
4881 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4883         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
4884         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
4885         Redefine.
4886         * cp-tree.h (cp_attribute_table): Rename.
4887         * decl.c (lang_attribute_table): Remove declaration.
4888         (cxx_init_decl_processing): Don't set it.
4889         * tree.c (cp_attribute_table): Rename.
4891 2002-04-24  Jason Merrill  <jason@redhat.com>
4893         PR c++/6331
4894         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
4895         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
4896         The pedwarn for array assignment is now unconditional.
4897         * tree.c (build_cplus_array_type_1): Still process simple array types
4898         normally in templates.
4900         PR c++/6395
4901         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
4902         stuff for comdats.
4904 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
4906         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
4907         node with attributes.
4909 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
4911         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
4912         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
4914 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
4916         PR c++/6256:
4917         * pt.c (tsubst_friend_class): Handle templates with explicit
4918         nested names.
4920         PR c++/6331:
4921         * typeck.c (merge_types): Remember the cv-qualification of pointer
4922         types when merging them.
4924 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4926         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
4927         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
4928         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
4929         cxx_mark_function_context): New.
4930         * decl.c (push_cp_function_context, pop_cp_function_context,
4931         mark_cp_function_context): Rename for consistency.
4932         (cxx_init_decl_processing): Don't set old hooks.
4934 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
4936         * call.c (convert_type_from_ellipsis): Rename, update.
4937         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
4938         * cp-tree.h (convert_type_from_ellipsis): Rename.
4939         * decl.c (cxx_init_decl_processing): Don't set hook.
4941 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4943         * call.c (build_new_method_call): Update.
4944         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
4945         * cp-tree.h (cxx_incomplete_type_error): New.
4946         * decl.c (grokdeclarator, grokparms): Update.
4947         * decl2.c (check_classfn): Update.
4948         * pt.c (tsubst): Update.
4949         * typeck.c (complete_type_or_else, expr_sizeof,
4950         decay_conversion): Update.
4951         * typeck2.c (incomplete_type_error): Rename.
4952         (add_exception_specifier): Update.
4954 2002-04-18  Jason Merrill  <jason@redhat.com>
4956         PR c++/5658
4957         * search.c (setup_class_bindings): A class template qualifies as a
4958         type binding.
4960 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
4962         PR c++/6316
4963         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
4964         before expanding.
4966 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
4968         * init.c (begin_init_stmts): Remove commented out code.
4969         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
4970         * semantics.c (begin_gobal_stmt_expr): Adjust call to
4971         expand_start_stmt_expr.
4973 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
4975         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
4976         dso_handle itself, to __cxa_atexit.
4978 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4980         * error.c (cxx_print_error_function): Adjust call to macros.
4982 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
4984         * class.c (layout_virtual_bases): Do all dsize computation on trees.
4986 2002-04-14  Jason Merrill  <jason@redhat.com>
4988         * typeck.c (get_member_function_from_ptrfunc): Don't do
4989         gratuitious division and multiplication on
4990         ptrmemfunc_vbit_in_delta targets.
4992 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4994         PR c++/5373.
4995         * semantics.c (finish_expr_stmt): Remember the type of the
4996         expression before any conversions are performed.
4998 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5000         PR c++/5189.
5001         * call.c (add_template_candidate_real): Do not treat member
5002         templates as copy constructors.
5004 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
5006         * decl.c (duplicate_decls): Do not copy the RTL for a variable
5007         declaration if the old variable had an incomplete type and the new
5008         variable does not.
5009         (complete_vars): Do not call layout_decl for completed variables.
5011 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
5013         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
5014         with an explicit one.
5015         (follow_tag_typedef): New.
5016         (lookup_tag): Use it to extract the tag of an explicit typedef.
5017         (xref_tag): Likewise.
5019 2002-04-11  Andrew Haley  <aph@redhat.com>
5021         * typeck.c (type_after_usual_arithmetic_conversions):
5022         If two types have the same variant, return immediately.
5023         When two floating-point operands are the same precision:
5024           convert to float if one of the operands is float;
5025           if neither operand is one of the standard types, return the type
5026           of the first operand.
5028 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
5030         PR c++/5507
5031         * decl.c (make_typename_type): Remove implicit typenameness.
5033 2002-04-09  Jason Merrill  <jason@redhat.com>
5035         PR optimization/6189
5036         * semantics.c (genrtl_start_function): Don't free
5037         DECL_SAVED_FUNCTION_DATA for inline functions.
5039         * init.c (build_member_call): For now, don't convert to
5040         intermediate base if it would cause an error.
5042 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
5044         * parse.y (namespace_qualifier, maybe_identifier,
5045         begin_explicit_instantiation, end_explicit_instantiation,
5046         apparent_template_type, .finish_template_type,
5047         do_id, maybe_init, defarg_again, component_decl_1):
5048         Add ending ';', in accordance with POSIX.
5050 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
5052         PR c++/5571
5053         * class.c (layout_class_type): Remember incomplete static
5054         variables.
5055         (finish_struct_1): Call complete_vars, not
5056         hack_incomplete_structures.
5057         * cp-tree.h (hack_incomplete_structures): Rename to ...
5058         (complete_vars): ... this.
5059         (struct saved_scope): Remove incomplete.
5060         (namespace_scope_incomplete): Remove.
5061         * decl.c (struct binding_level): Remove incomplete.
5062         (incomplete_vars): New variable.
5063         (mark_binding_level): Don't mark incomplete.
5064         (print_binding_level): Don't print it.
5065         (mark_saved_scope): Don't mark incomplete.
5066         (pushdecl): Use maybe_register_incopmlete_var.
5067         (cxx_init_decl_processing): Register incomplete_vars for GC.
5068         (start_decl_1): Clarify error message.
5069         (hack_incomplete_vars): Remove.
5070         (maybe_register_incomplete_var): New function.
5071         (complete_vars): Likewise.
5073 2002-04-06  Jason Merrill  <jason@redhat.com>
5075         PR c++/4934
5076         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
5077         set before checking it.
5079         PR c++/525
5080         * init.c (build_member_call): Use build_scoped_ref.
5081         (resolve_offset_ref): Likewise.
5082         * call.c (build_scoped_method_call): Likewise.
5083         * tree.c (maybe_dummy_object): Kludge around current_class_type being
5084         wrong.
5085         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
5086         * cp-tree.h: Adjust.
5088         * init.c (push_base_cleanups): Just use build_scoped_method_call.
5090         PR c++/6179
5091         * method.c (implicitly_declare_fn): Pass unqualified type to
5092         synthesize_exception_spec.
5094 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
5096         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
5097         * cvt.c: Update comment.
5098         * init.c (expand_cleanup_for_base): Update.
5099         * semantics.c (finish_parenthesized_expr): Update.
5100         * typeck.c (cp_truthvalue_conversion): Update.
5102 2002-04-04  Jason Merrill  <jason@redhat.com>
5104         * semantics.c (finish_eh_cleanup): New fn.
5105         * cp-tree.h: Add prototype.
5106         * init.c (perform_member_init, expand_cleanup_for_base): Use
5107         finish_eh_cleanup.
5108         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
5109         * cp-tree.h: Remove references.
5110         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
5111         * dump.c (cp_dump_tree): Likewise.
5112         * pt.c (tsubst_expr): Likewise.
5113         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
5114         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
5115         * tree.c (cp_statement_code_p): Likewise.
5117         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
5119         PR c++/5636
5120         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
5121         cleanup for nrv.
5123         PR c++/5104
5124         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
5125         specifiers.
5126         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
5128 2002-04-03  Richard Henderson  <rth@redhat.com>
5130         * cp-lang.c (cxx_warn_unused_global_decl): New.
5131         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
5133 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5135         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
5136         * tree.c (init_tree): Don't set hook.
5138 2002-04-03  Roger Sayle  <roger@eyesopen.com>
5140         PR c++/5998:
5141         * decl.c (duplicate_decls): Don't mess with assembler names when
5142         redeclaring builtin functions as static.
5144 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5146         * call.c (build_addr_func): Update.
5147         * class.c (resolve_address_of_overloaded_function): Update.
5148         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
5149         * cp-tree.h (cxx_mark_addressable): New.
5150         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
5151         * decl2.c (build_cleanup): Update.
5152         * except.c (build_throw): Update.
5153         * init.c (resolve_offset_ref): Update.
5154         * pt.c (convert_nontype_argument): Update.
5155         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
5156         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
5157         unary_complex_lvalue): Update.
5158         (mark_addressable): Rename.
5160 2002-04-01  Roger Sayle  <roger@eyesopen.com>
5162         PR c++/5998:
5163         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
5164         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
5165         but follow the SET_DECL_RTL idiom used elsewhere in the function.
5167 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5169         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
5170         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
5171         * decl.c (grokdeclarator): Update.
5172         * mangle.c (write_integer_cst): Update.
5173         * typeck.c (build_binary_op): Update.
5175 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5177         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
5178         * lex.c (cxx_init): Don't set hook.
5180 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
5182         * Make-lang.in (error.o): Update.
5183         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
5184         * cp-tree.h (struct diagnostic_context): Predeclare.
5185         (cxx_print_error_function): New.
5186         * error.c: Include langhooks-def.h.
5187         (lang_print_error_function): Rename.  Update.
5188         (init_error): Don't set hook.
5190 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5192         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
5193         Redefine.
5194         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
5195         * decl.c (finish_enum): Similarly.
5196         * error.c (dump_type): Similarly.
5197         * lex.c (cxx_init): Similarly.
5198         * mangle.c (write_builtin_type): Similarly.
5199         * typeck.c (comptypes): Similarly.
5201 2002-03-28  Roger Sayle  <roger@eyesopen.com>
5203         PR c++/5998:
5204         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
5205         in the g++ front-end.
5206         (duplicate_decl): Allow redefinition of anticipated built-ins.
5207         Fix inlining problem by over-writing the old DECL_RTL.
5208         (lookup_namespace_name): Fail to find an identifier in the
5209         specified namespace if its still anticipated.
5210         (builtin_function_1): New function split out from builtin_function
5211         to create a builtin in the current namespace with given context.
5212         (builtin_function): Call builtin_function_1 to define the
5213         appropriate builtins in both the std and global namespaces.
5214         (select_decl): Don't test for anticipated decls here.
5215         (unqualified_namespace_lookup): Instead ignore them whilst
5216         searching through scopes and namespaces.
5217         * decl2.c (do_nonmember_using_decl): If a using declaration
5218         specifies an anticipated built-in function, mark it as no longer
5219         anticipated in that scope.
5220         (ambiguous_decl):  Avoid resolving to an anticipated decl.
5221         * lex.c (do_scoped_id): Fail to find an identifier in the global
5222         namespace if its still anticipated.
5224 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
5226         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
5227         * cp-tree.h (cp_make_lang_type): Rename.
5228         * lex.c (cp_make_lang_type): Rename.
5229         (make_aggr_type): Update.
5230         * tree.c (init_tree): Don't set make_lang_type_fn.
5232 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
5234         PR c++/6073
5235         * class.c (finish_struct_1): Update static field's DECL_MODE even
5236         if its type is a variant of t.
5238 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5240         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
5241         * cp-tree.h (cxx_insert_default_attributes): New.
5242         * decl.c (insert_default_attributes): Rename.
5244 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
5246         PR c++/4884
5247         * call.c (build_op_delete_call): Allow for the fact the placement
5248         may be a COMPOUND_EXPR.
5250 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
5252         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
5253         * cp-tree.h (init_cplus_expand): Remove.
5254         (cxx_expand_expr): New.
5255         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
5256         fix prototype.
5257         (init_cplus_expand): Remove.
5258         * lex.c (cxx_init): Don't call init_cplus_expand.
5260 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
5262         PR c++/4884.
5263         * init.c (build_new_1): Allow for the fact the result of
5264         build_function_call may be a COMPOUND_EXPR.
5266 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
5268         PR c++/5682
5269         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
5270         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5271         (dfs_skip_nonprimary_vbases_markedp): Remove.
5272         * search.c (get_shared_vbase_if_not_primary): Remove.
5273         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
5274         (dfs_skip_nonprimary_vbases_markedp): Remove.
5275         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
5276         (dfs_marked_real_bases_queue_p): Likewise.
5278 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5280         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
5281         * cp-tree.h (cxx_mark_tree): New.
5282         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
5284 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
5286         * cp-tree.h (cxx_maybe_build_cleanup): New.
5287         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
5288         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
5289         * tree.c (build_target_expr): Update.
5290         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
5292 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
5294         * decl2.c (cxx_decode_option): Handle -E.
5295         * lang-specs.h (default_compilers): Preprocess with cc1plus.
5296         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
5298 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
5300         PR c++/6037
5301         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
5303 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5305         * error.c (dump_type): Be careful about implicit typenames.
5307 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
5309         PR C++/3656
5310         * semantics.c (finish_base_specifier): Handle erronous base
5311         classes.
5313 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
5315         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
5316         REAL_IS_NOT_DOUBLE.
5318 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
5320         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
5321         an index into the vtable_entry array regardless of
5322         TARGET_PTRMEMFUNC_VBIT_LOCATION.
5324 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
5326         * tree.c (cp_cannot_inline_tree_fn): Same.
5328 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
5330         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
5331         insert_block, getdecls, global_bindings_p): New.
5333 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
5335         PR c++/4361
5336         * mangle.c (struct globals) Add internal_mangling_p member.
5337         (write_template_param): Do internal mangling, if needed.
5338         (mangle_conv_op_name_for_type): Request internal mangling.
5340 2002-03-20  Jason Merrill  <jason@redhat.com>
5342         PR c++/2136
5343         * init.c (build_delete): Check access for a member op delete here.
5344         * decl2.c (delete_sanity): Not here.
5346 2002-03-19  Jason Merrill  <jason@redhat.com>
5348         PR c++/5118
5349         * class.c (get_vfield_name): Use the constructor_name.
5351 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
5353         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
5354         * cp-tree.h (lang_printable_name): Rename.
5355         * error.c (lang_decl_name): Use new hook.
5356         * lex.c (cxx_init): Remove old hook.
5357         * pt.c (tsubst_decl): Use new hook.
5358         * tree.c (lang_printable_name): Rename.
5360 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
5362         PR c++/3882
5363         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
5364         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
5365         only after recording the declaration.
5367 2002-03-18  Jason Merrill  <jason@redhat.com>
5369         PR c++/2039
5370         * init.c (resolve_offset_ref): Hand off to build_component_ref.
5372         PR c++/4222, c++/5995
5373         * call.c (build_over_call): Fix empty class logic.
5375         PR c++/3870
5376         * cp-tree.h (struct saved_scope): Add last_parms field.
5377         * decl.c (maybe_push_to_top_level): Save last_function_parms.
5378         (pop_from_top_level): Restore it.
5380         PR c++/4377
5381         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
5382         NON_LVALUE_EXPRs.
5384         PR c++/4003
5385         * pt.c (tsubst_friend_function): Use decl_namespace_context.
5387         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
5388         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
5389         type with a nontrivial destructor.
5391 2002-03-17  Jason Merrill  <jason@redhat.com>
5393         PR c++/4460
5394         * class.c (build_base_path): Virtual base layout is fixed in
5395         in-charge [cd]tors.
5397 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
5399         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
5400         * parse.y (yyparse): Remove macro.
5402 2002-03-17  Jason Merrill  <jason@redhat.com>
5404         PR c++/5757
5405         * init.c (build_new_1): Pass the right pointer to op delete.
5407 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5409         PR c++/4361
5410         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
5411         conversion operators go.
5412         (struct lang_decl_flags): Add template_conv_p and unused
5413         bitfields.
5414         (DECL_TEMPLATE_CONV_FN_P): New macro.
5415         * call.c (build_user_type_conversion_1): Don't check second type
5416         conversion of overload set first.
5417         * class.c (add_method): Make sure templated conversion operators
5418         all end up on slot 2.
5419         * lex.c (do_identifier): A conversion operator token might be
5420         satisfied by a templated conversion operator.
5421         * pt.c (check_explicit_specialization): Use
5422         CLASSTYPE_FIRST_CONVERSION_SLOT.
5423         (template_parm_this_level_p): New function.
5424         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
5425         * search.c (lookup_fnfields_1): Template conversions will be on
5426         the first slot.
5427         * typeck.c (build_component_ref): Preserve the type of an
5428         conversion operator name on the overload type.
5429         (build_x_function_call): Retrieve the conversion operator name.
5431 2002-03-15  Richard Henderson  <rth@redhat.com>
5433         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
5435 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
5437         * cp-tree.h (CLEANUP_DECL): Remove.
5438         (CLEANUP_EXPR): Likewise.
5439         * decl.c (destroy_local_var): Simplify.
5440         (maybe_build_cleanup): Tidy.
5441         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
5442         * semantics.c (cp_expand_stmt): Likewise.
5443         * cp/tree.c (cp_statement_code_p): Likewise.
5445 2002-03-15  Jason Merrill  <jason@redhat.com>
5447         PR c++/5857
5448         * decl.c (duplicate_decls): Use merge_types instead of common_type.
5449         * typeck.c (common_type): Just hand off to
5450         type_after_usual_arithmetic_conversions and
5451         composite_pointer_type.
5452         (merge_types): New fn.
5453         (commonparms): Use it instead of common_type.
5454         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
5455         (composite_pointer_type): Also handle attributes.
5456         * cp-tree.h: Declare merge_types.
5458         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
5459         variables.
5460         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
5462 2002-03-14  Richard Henderson  <rth@redhat.com>
5464         * decl.c: Include c-pragma.h.
5465         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
5466         * Make-lang.in: Update dependencies.
5468 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
5470         PR c++/5908
5471         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
5472         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
5474 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5476         * mangle.c (write_builtin_type): Handle 128-bit integers even if
5477         they are not a standard integer type.
5479 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
5481         * cp-tree.h (init_init_processing): Remove declaration.
5482         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
5483         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
5485 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5487         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
5488         Define.
5489         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
5490         tree_code_length.
5491         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
5492         cplus_tree_code_name): Delete.
5493         (cxx_init): Don't call add_c_tree_codes, instead set
5494         lang_unsafe_for_reeval.  Don't try to copy into the various
5495         tree_code arrays.
5497 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
5499         PR c++/5659
5500         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
5501         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
5502         definitions.
5504 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5506         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
5507         DR209 is now not a defect.
5508         * cp-tree.h (skip_type_access_control): Remove.
5509         * decl.c (grokdeclarator): Do type access control for friend
5510         declarations.
5511         * semantics.c (decl_type_access_control): Don't reset
5512         current_type_lookups.
5513         (save_type_access_control): Always save the lookups.
5514         (skip_type_access_control): Remove.
5515         (finish_class_definition): Don't change type_lookups.
5517 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
5519         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
5520         It is incorrect.
5521         * typeck.c (build_static_cast): Compare non-qualified types
5522         with pointer to member conversions.
5524 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
5525             Daniel Berlin  <dan@dberlin.org>
5527         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
5528         (cxx_get_alias_set): Use it.
5530 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5532         * cp-tree.h (stabilize_expr): Prototype.
5534 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5536         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
5537         conditional return void.
5539 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5541         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
5542         * cp-tree.h (cxx_unsave): New.
5543         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
5544         (init_tree): Update.
5546 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5548         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
5549         explicit sizeof/sizeof.
5550         * decl2.c (cxx_decode_option): Likewise.
5551         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
5553 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5555         PR c++/775
5556         * decl.c (lookup_tag): Only reject enum/class mismatch, not
5557         class/union mismatch.
5558         * parse.y (check_class_key): New function.
5559         (structsp): Call it.
5561 2002-03-01  Michael Matz  <matz@suse.de>
5563         * typeck.c (cp_pointer_int_sum): Complete inner type which is
5564         used later by size_in_bytes().
5566 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
5568         * cp-tree.h:  Require __GNUC__ to be #defined.
5569         (build_init):  Add missing prototype.
5571 2002-03-01  Jason Merrill  <jason@redhat.com>
5573         * except.c: Don't include decl.h or obstack.h.  Do include
5574         tree-inline.h.
5575         (build_throw): Destroy temporaries from the thrown
5576         expression before calling __cxa_throw.  Construct a thrown
5577         temporary directly into the exception object.
5578         (stabilize_throw_expr): New function.
5579         (wrap_cleanups_r): New function.
5580         * tree.c (stabilize_expr): New function.
5581         * init.c (build_init): New function.
5582         * Make-lang.in (cp/except.o): Adjust .h deps.
5584 2002-02-28  Jason Merrill  <jason@redhat.com>
5586         * search.c (lookup_base_r): Don't clear is_non_public just because
5587         we found a friendly scope.
5589         * decl.c (finish_function): Only warn about missing return
5590         statement with -Wreturn-type.
5592 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
5594         * class.c (build_clone): Update.
5595         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
5596         * cp-tree.h (cxx_dup_lang_specific_decl): New.
5597         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
5598         (copy_decl): Update.
5599         * method.c (make_thunk): Update.
5601 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
5603         * decl2.c: Delete traditional-mode-related code copied from
5604         the C front end but not used, or used only to permit the
5605         compiler to link.
5607 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
5609         PR c++/4093
5610         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
5611         to void.
5613 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
5615         PR other/5746
5616         * semantics.c (finish_switch_cond): Don't call get_unwidened
5617         if error_mark_node.
5619 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
5621         PR c++/2645, DR 295
5622         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
5623         tf_keep_type_decl.
5624         (make_typename_type): Use tsubst_flags_t.
5625         * decl.c (make_typename_type): Adjust. Return non-artificial
5626         TYPE_DECLs, if required.
5627         (grokdeclarator): Simplify CVR qualification handling. Allow bad
5628         qualifiers on typedef types.
5629         * decl2.c (handle_class_head): Adjust make_typename_type call.
5630         * parse.y (nested_name_specifier): Likewise.
5631         (typename_sub0): Likewise.
5632         (typename_sub1): Likewise.
5633         * pt.c (convert_template_argument): Adjust make_typename_type
5634         return value.
5635         (tsubst): Adjust cp_build_qualified_type_real calls.
5636         (check_cv_quals_for_unify): Cope with allowing bad qualifications
5637         on template type parms.
5638         (instantiate_decl): Recheck substitutions to give warnings on bad
5639         qualifications.
5640         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
5642 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
5644         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
5646         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
5647         unless DECL_ALWAYS_INLINE.
5649 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5651         * typeck.c (cp_pointer_int_sum): Renamed from
5652         pointer_int_sum, call pointer_int_sum.
5654 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
5656         * decl.c (duplicate_decls): Return 0 if issued error about
5657         redeclaration.
5659 2002-02-19  Jason Merrill  <jason@redhat.com>
5661         ABI change: Mangle `void (A::*)() const' as
5662         M1AKFvvE, not MK1AFvvE.
5663         * mangle.c (write_function_type): Write cv-quals for member
5664         function type here.
5665         (write_pointer_to_member_type): Not here.
5667 2002-02-18  Jason Merrill  <jason@redhat.com>
5669         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
5670         (do_decl_instantiation): Likewise.
5672 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5674         PR c++/5685
5675         * decl.c (duplicate_decls): Make warning unconditional
5676         if duplicate default argument declarations are present.
5678 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
5680         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
5681         shortening.
5683 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
5685         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
5686         remove incorrect comment. Move #if 0'd code to common path. Use
5687         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
5689 2002-02-13  Jason Merrill  <jason@redhat.com>
5691         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
5692         (finish_function): Don't warn if current_function_returns_null.
5694         * typeck2.c (digest_init): Do handle values of vector type.
5696         * typeck2.c (digest_init, process_init_constructor): Treat vectors
5697         like arrays.
5699 2002-02-11  Jason Merrill  <jason@redhat.com>
5701         * parse.y (reserved_declspecs): Don't handle attributes.
5702         (reserved_typespecquals): Handle them here.
5703         * Make-lang.in (parse.c): Adjust expected conflicts.
5705 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
5707         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
5708         instead of compstmt.
5709         (compstmt_or_stmtexpr): Renamed from compstmt.
5710         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
5712 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5714         Rename instantiate_type_flags to tsubst_flags_t & expand use.
5715         * cp-tree.h (instantiate_type_flags): Rename to ...
5716         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
5717         add tf_warning flag.
5718         (instantiate_type): Adjust prototype.
5719         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
5720         do_type_instantiation, cp_build_qualified_type_real): Likewise.
5721         cp_build_qualified_type: Adjust.
5722         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
5723         tf_*.
5724         * call.c (standard_conversion): Rename itf_* to tf_*.
5725         (reference_binding): Likewise.
5726         (convert_like_real): Likewise.
5727         * cvt.c (cp_convert_to_pointer): Likewise.
5728         (convert_to_reference): Likewise.
5729         * decl.c (lookup_namespace_name): Use tf_* flags.
5730         (make_typename_type): Likewise.
5731         (grokdeclarator): Likewise.
5732         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
5733         (coerce_template_template_parms, convert_template_argument,
5734         coerce_template_parms, maybe_get_template_decl_from_type_decl,
5735         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
5736         instantiate_class_template, tsubst_template_arg_vector,
5737         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
5738         tsubst_decl, tsubst_arg_types, tsubst_function_type,
5739         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
5740         instantiate_template, fn_type_unification,
5741         resolve_overloaded_unification, verify_class_unification,
5742         unify, get_bindings_real, do_type_instantiation,
5743         regenerate_decl_from_template, instantiate_decl,
5744         tsubst_initializer_list, tsubst_enum,
5745         get_mostly_instantiated_function_type,
5746         invalid_nontype_parm_type_p): Likewise.
5747         * tree.c (cp_build_qualified_type_real): Likewise.
5748         * typeck.c (build_binary_op): Rename itf_* to tf_*.
5749         (build_ptrmemfunc): Likewise.
5750         (convert_for_assignment): Likewise.
5752 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
5754         PR c++/109
5755         * decl.c (grokdeclarator): Allow friend declarations from
5756         dependent types.
5757         * decl2.c (handle_class_head): Don't push into template parm contexts.
5758         * pt.c (push_template_decl_real): Template parm contexts are never
5759         being defined.
5761 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
5763         * class.c: Include target.h.
5764         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
5765         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
5766         bit-field layout.
5767         * Make-lang.in: Adjust deps.
5769 2002-02-05  Jason Merrill  <jason@redhat.com>
5771         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
5773 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
5775         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
5776         (finish_switch_cond): Set SWITCH_TYPE.
5778 2002-02-04  Richard Henderson  <rth@redhat.com>
5780         * method.c (use_thunk): Always initialize the block tree.  Reindent.
5781         * semantics.c (expand_body): Emit thunks after function, not before.
5783 2002-02-04  Jason Merrill  <jason@redhat.com>
5785         * decl.c (start_function): Call cplus_decl_attributes immediately
5786         after grokdeclarator.
5788         * decl.c (start_function): Combine DECL_RESULT handling code.
5790 2002-02-03  Jason Merrill  <jason@redhat.com>
5792         * xref.c: Remove.
5793         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
5794         (cp/xref.o): Remove dependencies.
5795         * class.c (finish_struct_1, check_methods): Don't call xref fns.
5796         (finish_struct_1): Likewise.
5797         * friend.c (make_friend_class): Likewise.
5798         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
5799         * spew.c (read_process_identifier): Likewise.
5801 2002-02-01  Jason Merrill  <jason@redhat.com>
5803         PR c++/4872
5804         * decl.c (finish_function): Warn about a non-void function with
5805         no return statement and no abnormal exit.
5806         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
5807         (current_function_returns_abnormally): New macro.
5808         * call.c (build_call): Set it.
5810         * typeck.c (build_component_ref): Always complain about offsetof
5811         constructs on non-PODs.  Only make it an error for members of
5812         virtual bases.
5814         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
5815         (dump_function_decl): Always dump parms.
5817         * decl2.c (finish_static_data_member_decl): Complain about a local
5818         class with a static data member.
5820         PR c++/4286
5821         * search.c (lookup_field_1): Don't xref a static data member
5822         just because we looked it up.
5824 2002-01-31  Jason Merrill  <jason@redhat.com>
5826         * Make-lang.in (parse.c): Handle .output file.
5828         PR c++/3395
5829         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
5830         not TREE_TYPE.
5831         * semantics.c (finish_class_definition): Adjust.
5833         Allow attributes in parms and casts.
5834         * parse.y (named_parm): Don't strip attrs.
5835         (declmods): Remove 'attributes' production.
5836         (nonempty_cv_qualifiers): Accept attributes.
5837         (ATTRIBUTE): Give precedence.
5838         * decl.c (groktypename): Handle attributes.
5839         (grokparms): Likewise.
5841 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
5843         * decl2.c (cxx_decode_option): Pass 0 as last argument to
5844         cpp_handle_option.
5845         * lang-specs.h: Use cpp_unique_options instead of cpp_options
5846         when used together with cc1_options.
5848 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
5850         PR c++/5132
5851         * typeck2.c (digest_init): Make sure non-array core type is
5852         instantiated.
5853         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
5854         constructor, rather than build a new one.
5855         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
5856         PURPOSE of constructor elts.
5858 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5860         * Make-lang.in (parse.c): Adjust expected number of
5861         shift-reduce conflicts.
5862         (decl.o): Depend on diagnostic.h.
5863         * decl.c: Include diagnostic.h.
5864         (grokdeclarator): Check for null pointer.
5865         (finish_function): Don't abort when
5866         current_binding_level->parm_flag != 1, if errors have
5867         occurred; throw away the statement tree and extra binding
5868         levels, and continue.
5869         * lex.c (note_list_got_semicolon): Check for null pointer.
5870         * method.c (hack_identifier): Just return error_mark_node if
5871         value is error_mark_node.
5872         * parse.y (primary: TYPEID(type_id)): No need to use
5873         TYPE_MAIN_VARIANT here.
5874         (handler_seq): Accept an empty list of catch clauses and
5875         generate a fake handler block to avoid later crashes.
5876         (ansi_raise_identifier): Accept the error token too.
5877         * semantics.c (begin_class_definition,
5878         finish_class_definition): Check for error_mark_node.
5880 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5882         * typeck2.c (friendly_abort): Delete definition.
5883         * cp-tree.h (friendly_abort): Don't prototype.
5884         (my_friendly_assert): Use fancy_abort.
5886 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5888         * cp-tree.h (my_friendly_abort): Remove.
5890 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
5892         * spew.c (pending_inlines, pending_inlines_tail,
5893         processing_these_inlines): Make static.
5894         (mark_pending_inlines): Remove static.
5895         (begin_parsing_inclass_inline): If in function, save pi
5896         for GC to cp_function_chain->unparsed_inlines instead.
5897         (process_next_inline): Likewise.
5898         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
5899         (mark_pending_inlines): Add prototype.
5900         * decl.c (spew_debug): Remove unused extern.
5901         (mark_lang_function): Call mark_pending_inlines.
5903 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5905         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
5906         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
5907         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
5908         Change my_fancy_abort() to abort().
5910 2002-01-23  Jason Merrill  <jason@redhat.com>
5912         PR c++/5453
5913         * class.c (fixed_type_or_null): Fix thinko.
5915         PR c++/3331
5916         * init.c (resolve_offset_ref): Use build_indirect_ref.
5918         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
5920 2002-01-22  Jason Merrill  <jason@redhat.com>
5922         * parse.y (function_body): Suppress the block for the outermost
5923         curly braces.
5924         * decl.c (pushdecl): Don't try to skip it.
5925         (begin_function_body): Keep the block we create, not the next one.
5926         * init.c (emit_base_init): Don't mess with keep_next_level.
5928         * class.c (build_base_path): Tweak formatting.
5930 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5932         Fix regression introduced with patch for c++/775
5933         * parse.y (class_head_defn): Check for template specializations
5934         with a different class-key.
5936 2002-01-17  Jason Merrill  <jason@redhat.com>
5938         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
5939         (begin_function_body): Call them and keep_next_level.
5940         * init.c (emit_base_init): Call keep_next_level.
5941         * semantics.c (setup_vtbl_ptr): Lose.
5942         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
5943         (vtbls_set_up_p): Lose.
5944         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
5945         * method.c (do_build_copy_constructor): Likewise.
5946         (synthesize_method): Call finish_mem_initializers.
5947         * parse.y (nodecls): Likewise.
5949         * error.c (dump_type_suffix): Print the exception specs before
5950         recursing.
5951         (dump_function_decl): Here, too.
5953         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
5955 2002-01-10  Ira Ruben   <ira@apple.com>
5957         PR c++/907
5958         * decl.c (start_method): Handle attrlist.
5960 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
5962         * decl2.c (max_tinst_depth): Increase default limit to 500.
5964 2002-01-10  Graham Stott  <grahams@redhat.com>
5966         * spew.c (YYCHAR): Uppercase macro parameter and add
5967         parenthesis.
5968         (YYCODE): Likewise.
5969         (NAME): Uppercase macro parameter.
5971 2002-01-09  Graham Stott  <grahams@redhat.com>
5973         * decl.h (grokdeclarator): Wrap long line.
5975         * semantics.c (FINISH_COND): Uppercase macro paramaters and
5976         add parenthesis.
5978 2002-01-08  Graham Stott  <grahams@redhat.com>
5980         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
5981         (PALLOC): Uppercase macro parameter and whitespace.
5982         (SALLOC): Uppercase macro parameter.
5983         (SFREE): Uppercase macros parameter, add parenthese and
5984         whitespace.
5985         (STREQL): Uppercase macro parameter and whitespace.
5986         (STRNEQ): Likewise.
5987         (STRLSS): Likewise.
5988         (STRLEQ): Likewise.
5989         (STRGTR): Likewise.
5990         (STRGEQ): Likewise.
5992         * call.c (convert_like): Add parenthesis and wrap.
5993         (convert_like_with_context): Likewise.
5994         (ICS_RANK): Whitespace.
5995         (NEED_TEMPORARY_P): Remove parenthesis.
5997         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
5998         whitespace.
5999         (VTT_MARKED_BINFO_P): Likewise.
6001         * decl.c (BINDING_LEVEL): Add parenthesis.
6002         (DEF_OPERATOR): Likewise.
6004         * mangle.c (MANGLE_TRACE): Add parenthesis.
6005         (MANGLE_TRACE_TREE): Likewise.
6006         (write_signed_number): Likewise.
6007         (write_unsigned_number): Likewise.
6009         * pt.c (ccat): Uppercase macro parameter.
6010         (cat): Likewise
6012         * search.c (SET_BINFO_ACCESS): Add parenthesis.
6014 2002-01-07  Jason Merrill  <jason@redhat.com>
6016         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
6017         to pedwarn.
6019         PR c++/3536
6020         * method.c (make_thunk): If !flag_weak, give the thunk the
6021         function's linkage.
6022         (use_thunk): Here, too.
6024 2002-01-07  Graham Stott  <grahams@redhat.com>
6026         * error.c: Update copyright date.
6027         (print_scope_operator): Add parenthesis.
6028         (print_left_paren): Likewise.
6029         (print_right_paren): Likewise.
6030         (print_left_bracket): Likewise.
6031         (print_right_bracket): Likewise.
6032         (print_template_argument_list_start): Likewise.
6033         (print_template_argument_list_end): Likewise.
6034         (print_non_consecutive_character): Likewise.
6035         (print_tree_identifier): Likewise.
6036         (print_identifier): Likewise.
6037         (NEXT_CODE): Uppercase macro parameter.
6038         (ident_fndecl): Delete unused.
6039         (GLOBAL_THING): Likewise.
6041 2002-01-06  Graham Stott  <grahams@redhat.com>
6043         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
6044         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
6045         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
6046         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
6047         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
6048         (C_IS_RESERVED_WORD): Uppercase macro parameter.
6049         (C_RID_YYCODE) Likewise.
6050         (ptrmem_cst): Use rtx.
6051         (LOCAL_BINDING_P): Add whitespace.
6052         (INHERITED_VALUE_BINDING_P): Likewise.
6053         (BINDING_SCOPE): Wrap long line.
6054         (BINDING_HAS_LEVEL_P): Remove parenthesis.
6055         (BINDING_VALUE): Wrap long line.
6056         (BINDING_TYPE): Whitespace.
6057         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
6058         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
6059         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
6060         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
6061         (same_type_p): Uppercase macro parameters.
6062         (same_type_ignoring_top_level_qualifiers_p): Likewise.
6063         (OVL_FUNCTION): Wrap long line.
6064         (OVL_CHAIN): Whitespace.
6065         (OVL_CURRENT): Add parenthesis and whitespace.
6066         (OVL_NEXT): Whitespace.
6067         (OVL_USED): Likewise.
6068         (IDENTIFIER_TYPE_VALUE): Likewise.
6069         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
6070         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
6071         (LANG_ID_FIELD): Whitespace.
6072         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
6073         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
6074         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
6075         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
6076         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
6077         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
6078         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
6079         (IDENTIFIER_VIRTUAL_P): Likewise.
6080         (IDENTIFIER_OPNAME_P): Likewise.
6081         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
6082         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
6083         (C_SET_EXP_ORIGINAL_CODE): Likewise.
6084         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
6085         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
6086         (IS_AGGR_TYPE): Uppercase macro parameter.
6087         (CLASS_TYPE_P): Likewise.
6088         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
6089         (IS_AGGR_TYPE_2): Whitespace.
6090         (TAGGED_TYPE_P): Uppercase macro parameter.
6091         (TYPE_BUILT_IN): Whitespace.
6092         (TYPE_FOR_JAVA): Likewise.
6093         (FUNCTION_ARG_CHAIN): Remove parenthesis.
6094         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
6095         (FUNCTION_FIRST_USER_PARAM): Likewise.
6096         (PROMOTES_TO_AGGR_TYPE): Whitespace.
6097         (DERIVED_FROM_P): Add parenthesis and wrap.
6098         (UNIQUELY_DERIVED_FROM_P): Likewise.
6099         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
6100         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
6101         (CLASSTYPE_USE_TEMPLATE): Whitespace.
6102         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
6103         (TYPE_GETS_DELETE): Add parenthesis.
6104         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
6105         (TYPE_HAS_ASSIGN_REF): Likewise,
6106         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
6107         (TYPE_HAS_INIT_REF): Likewise.
6108         (TYPE_HAS_CONST_INIT_REF): Likewise.
6109         (TYPE_BEING_DEFINED): Likewise.
6110         (TYPE_LANG_SPECIFIC): Likewise.
6111         (CLASSTYPE_RTTI): Likewise.
6112         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
6113         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
6114         (TYPE_OVERLOADS_ARROW): Likewise.
6115         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
6116         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
6117         (CLASSTYPE_METHOD_VEC): Likewise.
6118         (CLASSTYPE_MARKED_N): Likewise.
6119         (CLASSTYPE_MARKED): Likewise.
6120         (CLASSTYPE_MARKED2): Likewise.
6121         (CLASSTYPE_MARKED3): Likewise.
6122         (CLASSTYPE_MARKED4): Likewise.
6123         (CLASSTYPE_MARKED5): Likewise.
6124         (CLASSTYPE_MARKED6): Likewise.
6125         (SET_CLASSTYPE_MARKED): Whitespace.
6126         (CLEAR_CLASSTYPE_MARKED): Likewise.
6127         (SET_CLASSTYPE_MARKED2): Likewise.
6128         (CLEAR_CLASSTYPE_MARKED2): Likewise.
6129         (SET_CLASSTYPE_MARKED3): Likewise.
6130         (CLEAR_CLASSTYPE_MARKED3): Likewise.
6131         (SET_CLASSTYPE_MARKED4): Likewise.
6132         (CLEAR_CLASSTYPE_MARKED4): Likewise.
6133         (SET_CLASSTYPE_MARKED5): Likewise.
6134         (CLEAR_CLASSTYPE_MARKED5): Likewise.
6135         (SET_CLASSTYPE_MARKED6): Likewise.
6136         (CLEAR_CLASSTYPE_MARKED6): Likewise.
6137         (CLASSTYPE_TAGS): Likewise.
6138         (CLASSTYPE_VSIZE): Likewise.
6139         (CLASSTYPE_VBASECLASSES): Likewise.
6140         (CANONICAL_BINFO): Add parenthesis.
6141         (CLASSTYPE_SIZE(NODE): Likewise.
6142         (CLASSTYPE_SIZE_UNIT): Likewise.
6143         (CLASSTYPE_ALIGN(NODE): Likewise.
6144         (CLASSTYPE_USER_ALIGN): Likewise.
6145         (TYPE_JAVA_INTERFACE): Likewise.
6146         (CLASSTYPE_PURE_VIRTUALS): Likewise.
6147         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
6148         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
6149         (CLASSTYPE_HAS_MUTABLE): Likewise.
6150         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
6151         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
6152         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
6153         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
6154         (CLASSTYPE_INTERFACE_ONLY): Likewise.
6155         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
6156         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6157         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
6158         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
6159         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
6160         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
6161         (BINFO_UNSHARED_MARKED): Whitespace.
6162         (BINFO_MARKED): Whitespace and wrap.
6163         (SET_BINFO_MARKED): Likewise.
6164         (CLEAR_BINFO_MARKED): Likewise.
6165         (BINFO_VTABLE_PATH_MARKED): Likewise.
6166         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
6167         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
6168         (BINFO_SUBVTT_INDEX): Remove parenthesis.
6169         (BINFO_VPTR_INDEX): Likewise.
6170         (BINFO_PRIMARY_BASE_OF): Likewise,
6171         (CLASSTYPE_VFIELDS): Whitespace.
6172         (VF_DERIVED_VALUE): Wrap long line.
6173         (NAMESPACE_LEVEL): Whitespace.
6174         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
6175         (DEFARG_POINTER): Whitespace.
6176         (DECL_NEEDED_P): Remove parenthesis.
6177         (DECL_LANGUAGE): Whitespace.
6178         (SET_DECL_LANGUAGE): Add parenthesis.
6179         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
6180         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
6181         (DECL_IN_AGGR_P): Whitespace.
6182         (DECL_FRIEND_P): Likewise.
6183         (DECL_BEFRIENDING_CLASSES): Likewise.
6184         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
6185         (DECL_NONCONVERTING_P): Whitespace.
6186         (DECL_PURE_VIRTUAL_P): Likewise.
6187         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
6188         (DECL_PENDING_INLINE_INFO): Whitespace.
6189         (DECL_SORTED_FIELDS): Likewise.
6190         (DECL_DEFERRED_FN): Likewise.
6191         (DECL_TEMPLATE_INFO): Likewise.
6192         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
6193         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
6194         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
6195         (TMPL_ARGS_LEVEL): Likewise.
6196         (SET_TMPL_ARGS_LEVEL): Likewise.
6197         (INNERMOST_TEMPLATE_PARMS): Whitespace.
6198         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
6199         (INTEGRAL_CODE_P(CODE): Add parenthesis.
6200         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
6201         (TYPE_HAS_CONSTRUCTOR): Whitespace.
6202         (TREE_HAS_CONSTRUCTOR): Likewise.
6203         (TYPE_HAS_DESTRUCTOR): Likewise.
6204         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
6205         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
6206         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
6207         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
6208         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
6209         (TYPE_PTRMEMFUNC_P): Likewise.
6210         (TYPE_PTRMEMFUNC_FLAG): Likewise.
6211         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
6212         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
6213         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
6214         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
6215         (DECL_ACCESS): Whitespace.
6216         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
6217         (DECL_GLOBAL_DTOR_P): Likewise.
6218         (GLOBAL_INIT_PRIORITY): Likewise.
6219         (DECL_TEMPLATE_PARMS): Likewise.
6220         (DECL_TEMPLATE_RESULT): Likewise.
6221         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
6222         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
6223         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
6224         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6225         (PRIMARY_TEMPLATE_P): Add parenthesis.
6226         (DECL_USE_TEMPLATE): Whitespace.
6227         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6228         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
6229         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6230         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
6231         (CALL_DECLARATOR_PARMS): Remove parenthesis.
6232         (CALL_DECLARATOR_QUALS): Likewise.
6233         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6234         (TEMP_NAME_P): Wrap.
6235         (VFIELD_NAME_P): Likewise.
6236         (B_SET): Uppercase macro parameters and add parenthesis.
6237         (B_CLR): Likewise.
6238         (B_TST): Likewise.
6239         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
6240         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
6241         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
6242         (same_or_base_type_p): Likewise.
6243         (cp_deprecated): Likewise.
6245 2002-01-05  Richard Henderson  <rth@redhat.com>
6247         * semantics.c (expand_body): Revert last change.
6249 2002-01-04  Jason Merrill  <jason@redhat.com>
6251         PR c++/4122
6252         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
6253         lost primary.
6255         * class.c (build_vtbl_initializer): Check for a lost primary
6256         before calculating the vtable entry to throw away.
6258 2002-01-02  Jason Merrill  <jason@redhat.com>
6260         * semantics.c (expand_body): Call outlining_inline_function when
6261         emitting an inline function out of line.
6263 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6265         PR c++/5116, c++/764 reversion
6266         * call.c (build_new_op): Revert the instantiations. They are
6267         incorrect.
6269 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6271         PR c++/5089
6272         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
6274 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6276         PR c++/3716
6277         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
6278         (tsubst, case POINTER_TYPE): Handle pmfs here.
6279         (tsubst, case OFFSET_TYPE): Check it is not an offset to
6280         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
6282 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6284         PR c++/35
6285         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
6286         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
6287         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
6288         PARM_DECL.
6289         (tsubst_template_parms): Break up loop statements.
6290         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
6291         parm PARM_DECLs don't get promoted.
6293 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6295         PR c++/5123
6296         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
6297         (build_x_function_call): Cope with a COMPONENT_REF containing a
6298         TEMPLATE_ID_EXPR.
6300 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6302         PR c++/5213
6303         * pt.c (convert_template_argument): Be more careful determining
6304         when RECORD_TYPE templates are or are not templates.
6306 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6308         PR c++/775
6309         * cp-tree.h (handle_class_head): Adjust prototype.
6310         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
6311         parameters. Use for all class heads.
6312         * parse.y (named_class_head_sans_basetype, named_class_head,
6313         named_complex_class_head_sans_basetype,
6314         named_class_head_sans_basetype_defn,
6315         unnamed_class_head): Remove.
6316         (class_head, class_head_apparent_template): Recognize class heads
6317         (class_head_decl, class_head_defn): New reductions. Process class
6318         heads.
6319         (structsp): Adjust class definition and class declaration
6320         reductions.
6321         (maybe_base_class_list): Give diagnostic on empty list.
6323 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6325         PR c++/4379
6326         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
6327         single non-static member.
6328         (unary_complex_lvalue): If it cannot be a pointer to member, don't
6329         make it so. Check it is not pointer to reference.
6331 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6333         PR c++/5132
6334         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
6335         are processing a template decl.
6337 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
6339         PR c++/5116, c++/764
6340         * call.c (build_new_op): Make sure template class operands are
6341         instantiated. Simplify arglist construction.
6343 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6345         * call.c (build_user_type_conversion_1): Use my_friendly_assert
6346         rather than if ... abort.
6347         * cvt.c (convert_to_reference): Likewise.
6348         * semantics.c (setup_vtbl_ptr): Likewise.
6349         * pt.c (lookup_template_class): Comment typo.
6351 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6353         PR c++/5125
6354         * pt.c (push_template_decl_real): Make sure DECL has
6355         DECL_LANG_SPECIFIC.
6357 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
6359         PR c++/335
6360         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
6361         for non-reference fields.
6362         * typeck.c (require_complete_type): Use resolve_offset_ref).
6364 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6366         PR c++/196
6367         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
6369 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6371         PR c++/160
6372         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
6373         up. Don't stabilize_references when initializing a reference.
6375 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6377         * decl2.c (lang_f_options): Const-ify.
6379 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
6381         * config-lang.in (diff_excludes): Remove.
6383 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
6385         PR c++/90
6386         * typeck.c (build_function_call_real): Use original function
6387         expression for errors.
6389 2001-12-18  Jason Merrill  <jason@redhat.com>
6391         PR c++/3242
6392         * class.c (add_method): Do compare 'this' quals when trying to match a
6393         used function.  Don't defer to another used function.
6395 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6397         * pt.c (instantiate_clone): Remove, fold into ...
6398         (instantiate_template): ... here. Simplify by removing mutual
6399         recursion.
6400         * typeck2.c (build_m_component_ref): Don't cv qualify the function
6401         pointed to by a pointer to function.
6402         * class.c (delete_duplicate_fields_1): Typo.
6404 2001-12-18  Jason Merrill  <jason@redhat.com>
6406         C++ ABI change: destroy value arguments in caller.
6407         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
6408         create an extra binding level for the parameters.
6409         * decl.c (store_parm_decls): Don't do parameter cleanups.
6411 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
6413         * call.c (build_new_method_call): Use '%#V'.
6414         * error.c (cv_to_string): Use V parameter to determine padding.
6416 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
6418         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
6419         spellings in messages.
6421 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
6423         * cp-tree.h: Delete #defines for cp_error, cp_warning,
6424         cp_pedwarn, and cp_compiler_error.
6425         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
6426         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
6427         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
6428         typeck2.c: Change calls to the above macros to use their
6429         language-independent equivalents: error, warning, pedwarn, and
6430         internal_error respectively.
6432 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6434         * decl2.c (finish_file): Remove back_end_hook.
6436 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
6438         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
6439         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
6440         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
6442 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
6444         * lang-options.h: Use American spelling in messages.
6446 2001-12-13  Jason Merrill  <jason@redhat.com>
6448         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
6450         Use cleanups to run base and member destructors.
6451         * init.c (push_base_cleanups): New function, split out from...
6452         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
6453         * decl.c (finish_destructor_body): Move vbase destruction code to
6454         push_base_cleanups.
6455         (begin_function_body, finish_function_body): New fns.
6456         (finish_function): Move [cd]tor handling and call_poplevel to
6457         finish_function_body.
6458         (pushdecl): Skip the new level.
6459         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
6460         (setup_vtbl_ptr): Call push_base_cleanups.
6461         * method.c (synthesize_method): Call {begin,end}_function_body.
6462         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
6463         * cp-tree.h: Declare new fns.
6464         * parse.y (function_body, .begin_function_body): New nonterminals.
6465         (fndef, pending_inline, function_try_block): Use function_body.
6466         (ctor_initializer_opt, function_try_block): No longer has a value.
6467         (base_init): Remove .set_base_init token.
6468         (.set_base_init, compstmt_or_error): Remove.
6469         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
6471         * optimize.c (maybe_clone_body): Fix parameter updating.
6473 2001-12-12  Jason Merrill  <jason@redhat.com>
6475         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
6476         * semantics.c (genrtl_start_function): Don't pass
6477         parms_have_cleanups or push an extra binding level.
6478         (genrtl_finish_function): Lose cleanup_label cruft.
6480         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
6481         (ctor_label): Remove.
6482         * semantics.c (finish_return_stmt): Lose ctor_label support.
6483         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
6484         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
6485         dtor_label.
6487         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
6488         check for [cd]tors.
6489         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
6491         * decl.c (finish_function): Check VMS_TARGET, not VMS.
6493         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
6494         (end_cleanup_fn): And poplevel.
6496         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
6497         if we're in a template.
6499 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
6501         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
6502         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
6503         THIS_NAME_P): Delete.
6504         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
6505         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
6506         with internal naming scheme.
6507         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
6509 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
6511         * decl.c (grokdeclarator): Deprecated implicit typename use.
6513 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
6515         PR g++/51
6516         * parse.y (frob_specs): Indicate it is a language linkage which
6517         contained the extern.
6518         * decl.c (grokdeclarator): Allow extern language linkage with
6519         other specifiers.
6521 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
6523         PR g++/72
6524         * decl.c (add_binding): Don't reject duplicate typedefs involving
6525         template parameters.
6527 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
6529         * parse.y, semantics.c: Similarly.
6531 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
6533         PR g++/87
6534         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
6535         (copy_args_p): Rename to ...
6536         (copy_fn_p): ... here.
6537         (grok_special_member_properties): New function.
6538         (grok_op_properties): Lose VIRTUALP parameter.
6539         (copy_assignment_arg_p): Remove.
6540         * call.c (build_over_call): Use copy_fn_p.
6541         * decl.c (grokfndecl): Reformat. Adjust call to
6542         grok_op_properties.
6543         (copy_args_p): Rename to ...
6544         (copy_fn_p): ... here. Reject template functions. Check for pass
6545         by value.
6546         (grok_special_member_properties): Remember special functions.
6547         (grok_ctor_properties): Don't remember them here, just check.
6548         (grok_op_properties): Likewise.
6549         (start_method): Call grok_special_member_properties.
6550         * decl2.c (grokfield): Likewise.
6551         (copy_assignment_arg_p): Remove.
6552         (grok_function_init): Don't remember abstract assignment here.
6553         * pt.c (instantiate_class_template): Call
6554         grok_special_member_properties.
6555         (tsubst_decl): Adjust grok_op_properties call.
6557 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
6559         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
6560         RID_TYPES_COMPATIBLE_P.
6562 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6564         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
6565         call to build_aggr_init.
6566         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
6568 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
6570         * parse.y: Replace uses of the string non-terminal with STRING.
6571         Don't perform string concatentaion here.
6572         (string): Remove non-terminal.
6573         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
6575 2001-12-05  Jason Merrill  <jason@redhat.com>
6577         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
6578         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
6579         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
6580         * pt.c (push_tinst_level): No longer static.
6581         * cp-tree.h: Declare them.
6583         * init.c (resolve_offset_ref): Don't check access for the base
6584         conversion to access a FIELD_DECL.
6586         * cp-tree.h (TYPE_REFFN_P): New macro.
6587         * decl.c (bad_specifiers): Check it, too.
6589         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
6590         on the __*_type_info type if we haven't seen a definition.
6592 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
6594         * decl.c: Include c-common.h.
6595         (shadow_warning): Move to c-common.c.
6597 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6599         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
6601 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6603         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
6605 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6607         PR g++/164
6608         * init.c (sort_base_init): Allow binfos to be directly specified.
6609         * method.c (do_build_copy_constructor): Explicitly convert to the
6610         base instance.
6611         (do_build_assign_ref): Likewise.
6613 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
6615         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
6616         declaration and initialization.
6618 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
6620         * typeck2.c: Remove leading capital from diagnostic messages, as
6621         per GNU coding standards.
6623 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
6625         PR c++/3394
6626         * decl.c (xref_basetypes): Handle attributes between
6627         'class' and name.
6629 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
6631         PR g++/3381
6632         * parse.y (named_complex_class_head_sans_basetype): Add new
6633         reduction.
6634         * Make-lang.in (parse.c): Adjust expected conflict count.
6636 2001-12-03  Jason Merrill  <jason@redhat.com>
6638         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
6639         immediate binfos for our virtual bases.
6641 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
6643         * call.c (build_java_interface_fn_ref): Similarly.
6644         * except.c (is_admissible_throw_operand): Similarly.
6645         * init.c (build_java_class_ref): Similarly.
6646         * xref.c (open_xref_file): Similarly.
6648 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
6650         * class.c (finish_struct): Remove trailing periods from messages.
6651         * decl.c (check_tag_decl): Similarly.
6652         * lex.c (cxx_set_yydebug): Similarly.
6653         * typeck2.c (friendly_abort): Similarly.
6655 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6657         PR c++/3048
6658         * cp-tree.h (ovl_member): Remove.
6659         * decl2.c (merge_functions): Handle extern "C" functions
6660         specially.
6661         * tree.c (ovl_member): Remove.
6663 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6665         PR c++/4842
6666         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
6667         FUNCTION_DECL, as input.
6668         (mark_overriders): Remove.
6669         (warn_hidden): Rework for the new ABI.
6671 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
6673         PR c++/3471
6674         * call.c (convert_like_real): Do not build additional temporaries
6675         for rvalues of class type.
6677 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6679         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
6680         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
6681         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
6682         (DERIVED_FROM_P): Likewise.
6683         (enum base_access): Renumber, add ba_quiet bit mask.
6684         (get_binfo): Remove.
6685         (get_base_distance): Remove.
6686         (binfo_value): Remove.
6687         (ACCESSIBLY_DERIVED_FROM_P): Remove.
6688         * call.c (standard_conversion): Use lookup_base.
6689         * class.c (strictly_overrides): Likewise.
6690         (layout_virtual_bases): Likewise.
6691         (warn_about_ambiguous_direct_bases): Likewise.
6692         (is_base_of_enclosing_class): Likewise.
6693         (add_vcall_offset_vtbl_entries_1): Likewise.
6694         * cvt.c (build_up_reference): Adjust comment.
6695         * init.c (build_member_call): Reformat.
6696         * search.c (get_binfo): Remove.
6697         (get_base_distance_recursive): Remove.
6698         (get_base_distance): Remove.
6699         (lookup_base_r): Tweak.
6700         (lookup_base): Add ba_quiet control. Complete the types here.
6701         (covariant_return_p): Use lookup_base.
6702         * tree.c (binfo_value): Remove.
6703         (maybe_dummy_object): Use lookup_base.
6704         * typeck.c (build_static_cast): Use lookup_base.
6705         (get_delta_difference): Likewise.
6706         * typeck2.c (binfo_or_else): Use lookup_base.
6707         (build_scoped_ref): Add back error_mark_check.
6708         (build_m_component_ref): Use lookup_base.
6710 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
6712         * Make-lang.in (c++.generated-manpages): New dummy target.
6714 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6716         * Make-lang.in (cp-lang.o): Depends on c-common.h.
6717         * cp-lang.c (c-common.h): Include.
6718         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
6719         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
6720         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
6722 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
6724         * decl2.c (c_language): Move to c-common.c.
6725         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
6726         functions.
6727         (cxx_init): Update.
6729 2001-11-26  Jason Merrill  <jason@redhat.com>
6731         * call.c (joust): Remove COND_EXPR hack.
6733 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
6735         * search.c (lookup_base_r): Declare bk in variable declaration
6736         space.
6738 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
6740         PR g++/3145
6741         * class.c (build_vbase_pointer): Remove.
6742         (build_vbase_path): Remove.
6743         (build_base_path): New function.
6744         * cp-tree.h (base_access, base_kind): New enumerations.
6745         (build_base_path): Declare.
6746         (convert_pointer_to_real): Remove.
6747         (convert_pointer_to): Remove.
6748         (lookup_base): Declare.
6749         (convert_pointer_to_vbase): Remove.
6750         * call.c (build_scoped_method_call): Use lookup_base &
6751         build_base_path instead of convert_pointer_to_real,
6752         get_base_distance & get_binfo.
6753         (build_over_call): Likewise.
6754         * cvt.c (cp_convert_to_pointer): Likewise.
6755         (convert_to_pointer_force): Likewise.
6756         (build_up_reference): Likewise.
6757         (convert_pointer_to_real): Remove.
6758         (convert_pointer_to): Remove.
6759         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
6760         instead of convert_pointer_to_vbase & build_vbase_path.
6761         (emit_base_init): Use build_base_path instead of
6762         convert_pointer_to_real.
6763         (expand_virtual_init): Lose unrequired conversions.
6764         (resolve_offset_ref): Use lookup_base and build_base_path
6765         instead of convert_pointer_to.
6766         * rtti.c (build_dynamic_cast_1): Use lookup_base &
6767         build_base_path instead of get_base_distance & build_vbase_path.
6768         * search.c (get_vbase_1): Remove.
6769         (get_vbase): Remove.
6770         (convert_pointer_to_vbase): Remove.
6771         (lookup_base_r): New function.
6772         (lookup_base): New function.
6773         * typeck.c (require_complete_type): Use lookup_base &
6774         build_base_path instead of convert_pointer_to.
6775         (build_component_ref): Likewise.
6776         (build_x_function_call): Likewise.
6777         (get_member_function_from_ptrfunc): Likewise.
6778         (build_component_addr): Likewise.
6779         * typeck2.c (build_scoped_ref): Likewise.
6781 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
6783         * cp-tree.h (CP_TYPE_QUALS): Removed.
6784         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
6785         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
6786         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
6787         * dump.c (cp_dump_tree): Use void* dump_info argument to match
6788         lang-hooks prototype.
6789         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
6790         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
6791         CP_TYPE_QUALS changed to cp_type_quals.
6792         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
6793         (CXX_C_OBJS): Remove c-dump.o.
6795 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
6797         PR c++/3637
6798         * pt.c (lookup_template_class): Ensure that all specializations
6799         are registered on the list corresponding to the most general
6800         template.
6802 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
6804         * call.c (non_reference): Add documentation.
6805         (convert_class_to_reference): Do not strip reference types
6806         from conversion operators.
6807         (maybe_handle_ref_bind): Simplify.
6808         (compare_ics): Correct handling of references.
6810 2001-11-19  John Wilkinson <johnw@research.att.com>
6812         * dump.c (dump_op): New function.
6813         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
6814         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
6815         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
6817 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
6819         PR4629
6820         * semantics.c (finish_sizeof): Make sure that expression created
6821         while processing a template do not have a type.
6822         (finish_alignof): Likewise.
6823         * typeck.c (c_sizeof): Likewise.
6824         (expr_sizeof): Likewise.
6826 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6828         * lex.c (cxx_finish): Call c_common_finish.
6829         (finish_parse): Remove.
6831 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6833         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
6834         when displaying error message about missing array bounds.
6836 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6838         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
6839         CONST_CAST_EXPR.
6840         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
6842 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6844         * cp-tree.h (print_class_statistics): Restore.
6846 2001-11-15  Jason Merrill  <jason@redhat.com>
6848         * method.c (use_thunk): Don't emit debugging information for thunks.
6850         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
6851         * decl.c (make_typename_type): Handle getting a class template.
6852         * search.c (lookup_field_r): A class template is good enough for
6853         want_type.
6855         * call.c (convert_like_real): Only use cp_convert for the bad part.
6856         (standard_conversion): Also allow bad int->enum.
6857         * typeck.c (ptr_reasonably_similar): Also allow functions to
6858         interconvert.  Pointers to same-size integers are reasonably
6859         similar.
6861         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
6862         give it void type.
6864 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
6866         PR g++/3154
6867         * init.c (sort_base_init): Remove unreachable code.
6868         (expand_member_init): Adjust comment to reflect reality. Simplify
6869         and remove unreachable code.
6871 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
6873         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
6874         (cxx_init): Update prototype.
6875         * decl.c (init_decl_processing): Rename.  Move null node init
6876         to its creation time.
6877         * lex.c (cxx_init_options): Update.
6878         (cxx_init): Combine with old init_parse; also call
6879         cxx_init_decl_processing.
6881 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
6883         * decl.c (check_initializer): Try to complete the type of an
6884         array element before checking whether it's complete.  Don't
6885         complain about arrays with complete element types but an
6886         unknown size.
6887         (cp_finish_decl): Build the hierarchical constructor before
6888         calling maybe_deduce_size_from_array_init.
6890 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6892         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
6894 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
6896         PR g++/4206
6897         * parse.y (already_scoped_stmt): Remove.
6898         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
6900 2001-11-12  H.J. Lu <hjl@gnu.org>
6902         * cvt.c (ocp_convert): Don't warn the address of a weak
6903         function is always `true'.
6905 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6907         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
6908         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
6909         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
6910         * cp-tree.h (print_class_statistics): Remove.
6911         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
6912         cxx_print_identifier, cxx_set_yydebug): New.
6913         * lex.c (set_yydebug): Rename c_set_yydebug.
6914         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
6915         lang_print_xnode): Rename.
6916         * tree.c (print_lang_statistics): Rename.
6918 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6920         * class.c (dump_array): Fix format specifier warning.
6922 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6924         * cp-lang.c (LANG_HOOKS_NAME): Override.
6925         (struct lang_hooks): Constify.
6926         * lex.c (cxx_init_options): Update.
6927         (lang_identify): Remove.
6928         * parse.y (language_string): Remove.
6930 2001-11-08  Andreas Franck  <afranck@gmx.de>
6932         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
6933         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
6934         suggested by autoconf.
6935         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
6936         (c++.install-common): Use the transformed target alias names.
6938 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6940         * Make-lang.in: Update.
6941         * cp-lang.c: Include langhooks-def.h.
6943 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6945         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
6947 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6949         * lex.c (copy_lang_type): Add static prototype.
6951 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6953         * pt.c (unify): Handle SCOPE_REF.
6955 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
6957         * tree.c (cp_copy_res_decl_for_inlining): Adjust
6958         DECL_ABSTRACT_ORIGIN for the return variable.
6960 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
6962         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6964 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
6966         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
6967         semantics.c, spew.c: Fix spelling errors.
6969 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6971         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
6973 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
6975         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
6976         pop_everything.
6978 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6980         * cp-lang.c (cxx_get_alias_set): New function.
6981         Point LANG_HOOKS_GET_ALIAS_SET to it.
6983 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6985         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
6986         * cp-tree.h (make_unbound_class_template): Prototype new function.
6987         * decl.c (make_unbound_class_template): New function.
6988         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
6989         * error.c (dump_type): Likewise.
6990         * mangle.c (write_type): Likewise.
6991         * parse.y (template_parm): Likewise.
6992         (template_argument): Use make_unbound_class_template.
6993         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
6994         (tsubst): Likewise.
6995         (tsubst_copy): Likewise.
6996         (unify): Likewise.
6997         * tree.c (walk_tree): Likewise.
6998         * typeck.c (comptypes): Likewise.
7000 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7002         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
7003         extra calls into fewer ones.
7005 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
7007         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
7008         Warn when merging inline with attribute noinline.
7009         (start_decl, start_function): Warn if inline and attribute
7010         noinline appear in the same declaration.
7012 2001-10-16  H.J. Lu <hjl@gnu.org>
7014         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
7015         for tree checking disabled.
7017 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
7019         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
7020         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
7022 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7024         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
7025         (unify): Only handle MINUS_EXPR specially if the above flag is set
7026         and the subtracted constant is 1.  Clear the flag on recursive calls.
7027         Set it when unifying the maximum value in an INTEGER_TYPE's range.
7029 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
7031         * decl.c (bad_specifiers): Don't allow exception specifications
7032         on any typedefs.
7034 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7036         * cp/lex.c (init_cp_pragma): Similarly.
7038 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7040         * pt.c (lookup_template_class): Build complete template arguments
7041         for BOUND_TEMPLATE_TEMPLATE_PARM.
7043 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7045         * cp-tree.h (TYPE_BINFO): Update comment.
7046         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
7047         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
7048         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
7049         (copy_type): Prototype new function.
7050         * lex.c (copy_lang_decl): Gather tree node statistics.
7051         (copy_lang_type): New function.
7052         (copy_type): Likewise.
7053         (cp_make_lang_type): Create lang_type for
7054         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
7055         and BOUND_TEMPLATE_TEMPLATE_PARM.
7056         * pt.c (tsubst): Use copy_type instead of copy_node.
7057         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
7059 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7061         * pt.c (determine_specialization): Ignore functions without
7062         DECL_TEMPLATE_INFO.
7064 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7066         PR g++/4476
7067         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
7069 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
7071         * typeck2.c (store_init_value): Don't re-digest a bracketed
7072         initializer.
7074         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
7075         ANON_AGGR_TYPE_P.
7077 2001-10-11  Richard Henderson  <rth@redhat.com>
7079         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
7080         of an asm statement.
7081         (build_vtbl_ref_1): Split out from build_vtbl_ref.
7082         (build_vfn_ref): Use it to handle vtable descriptors before
7083         calling build_vtable_entry_ref.
7084         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
7086 2001-10-10  Richard Henderson  <rth@redhat.com>
7088         * parse.y (asm_operand): Allow named operands.
7089         * semantics.c (finish_asm_stmt): Tweek for changed location
7090         of the operand constraint.
7092 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
7094         * call.c (standard_conversion): Add bad conversion between
7095         integers and pointers.
7096         (convert_like_real): Don't use convert_for_initialization for bad
7097         conversions; complain here and use cp_convert.
7098         (build_over_call): Don't handle bad conversions specially.
7099         (perform_implicit_conversion): Allow bad conversions.
7100         (can_convert_arg_bad): New fn.
7101         * cp-tree.h: Declare it.
7102         * typeck.c (convert_for_assignment): Use it.
7103         (ptr_reasonably_similar): Any target type is similar to void.
7105 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
7107         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
7108         (cp/cp-lang.o): New rule.
7109         * cp-tree.h: Declare hooks.
7110         * tree.c: Make hooks non-static.
7111         (init_tree): Don't initialize hooks here.
7112         * lex.c: Likewise.  Move definition of lang_hooks to...
7113         * cp-lang.c: ... new file.
7115 2001-10-08  Richard Henderson  <rth@redhat.com>
7117         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
7118         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
7120 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7122         * class.c (build_vtable_entry_ref): Const-ify.
7123         * decl.c (predefined_identifier,
7124         initialize_predefined_identifiers): Likewise.
7125         * init.c (build_new_1): Likewise.
7126         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
7127         Likewise.
7129 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
7131         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
7132         (INSNS_PER_STMT): Likewise.
7133         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
7134         (copy_body, initialize_inlined_parameters): Likewise.
7135         (declare_return_variable, inlinable_function_p): Likewise.
7136         (expand_call_inline, expand_calls_inline): Likewise.
7137         (optimize_inline_calls, clone_body): Likewise.
7138         * tree.c (walk_tree): Moved to ../tree-inline.c.
7139         (walk_tree_without_duplicates): Likewise.
7140         (copy_tree_r, remap_save_expr): Likewise.
7142 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
7144         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
7145         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
7146         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
7147         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
7148         (flag_inline_trees): Moved declaration to ../tree-inline.h.
7149         (walk_tree): Moved declaration to ../tree-inline.h.
7150         (walk_tree_without_duplicates, copy_tree_r): Likewise.
7151         (remap_save_expr): Likewise.
7152         * decl.c: Include tree-inline.h.
7153         (lang_mark_tree): Don't mark inlined_fns.
7154         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
7155         * optimize.c: Include tree-inline.h.
7156         (optimize_inline_calls): Move declaration to ../tree.h, as
7157         non-static.
7158         (remap_decl): Use language-independent constructs and hooks.
7159         (remap_block, copy_body_r, declare_return_variable): Likewise.
7160         (inlinable_function_p): Likewise.  Don't test for
7161         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
7162         no longer language-specific.
7163         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
7164         call of dump_function to...
7165         (optimize_function): Here...
7166         (clone_body): New function, extracted from...
7167         (maybe_clone_body): ... here.  Build decl_map locally and pass
7168         it on to clone_body.
7169         * pt.c, semantics.c: Include tree-inline.h.
7170         * tree.c: Likewise.
7171         (cp_walk_subtrees): New language-specific hook for tree inlining.
7172         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
7173         cp_is_overload_p, cp_auto_var_in_fn_p,
7174         cp_copy_res_decl_for_inlining): Likewise.
7175         (walk_tree): Move language-specific constructs into...
7176         (cp_walk_subtrees): this new function.
7177         (copy_tree_r): Use language-independent constructs and hooks.
7178         (init_tree): Initialize tree inlining hooks.
7179         (remap_save_expr): Adjust prototype so that the declaration
7180         does not require the definition of splay_tree.
7182 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7184         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
7185         to build the declaration instead of the declaration itself.
7187 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
7189         * decl2.c (cxx_decode_option): Add 'else'.
7191         * spew.c (end_input): No longer static.
7192         * cp-tree.h: Declare it.
7193         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
7195 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7197         * call.c (build_over_call), typeck.c (build_function_call_real):
7198         Pass type attributes to check_function_format rather than name or
7199         assembler name.  Don't require there to be a name or assembler
7200         name to check formats.
7202 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
7204         * decl.c (init_decl_processing): Don't call
7205         init_function_format_info.  Initialize lang_attribute_table
7206         earlier.
7207         (builtin_function): Call decl_attributes.
7208         (insert_default_attributes): New.
7210 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
7212         * decl.c (grokdeclarator): Copy array typedef handling from C
7213         frontend.
7215         * decl.c (grokdeclarator): Copy too-large array handling from C
7216         frontend.
7218 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
7220         * config-lang.in (target_libs): Added target-gperf, so that we
7221         don't try to build it if C++ is disabled.
7223 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
7225         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
7226         (cp/errfn.o): Delete rule.
7227         (cp/error.o): Depend on flags.h.
7228         * errfn.c: Delete file.
7229         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
7230         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
7231         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
7232         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
7233         internal_error respectively.  Make cp_deprecated into a macro.
7234         Don't define cp_printer typedef or declare cp_printers.
7235         * error.c: Include flags.h.
7236         Delete: struct tree_formatting_info, print_function_argument_list,
7237         print_declaration, print_expression, print_function_declaration,
7238         print_function_parameter, print_type_id, print_cv_qualifier_seq,
7239         print_type_specifier_seq, print_simple_type_specifier,
7240         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
7241         print_parameter_declaration_clause, print_exception_specification,
7242         print_nested_name_specifier, and definition of cp_printers.
7243         (locate_error): New function.
7244         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
7245         rewritten in terms of locate_error and diagnostic.c.
7246         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
7247         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
7248         (init_error): Adjust to match.
7250 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7252         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
7254 2001-09-21  Richard Henderson  <rth@redhat.com>
7256         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
7257         (build_vtbl_initializer): Likewise.
7258         (build_vfn_ref): New.
7259         * cp-tree.h: Declare it.
7260         * call.c (build_over_call): Use it.
7261         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
7262         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
7264 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
7266         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
7268 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7270         Table-driven attributes.
7271         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
7272         * decl2.c (cplus_decl_attributes): Only take one attributes
7273         parameter.
7274         * cp-tree.c (cplus_decl_attributes): Update prototype.
7275         * class.c (finish_struct), decl.c (start_decl, start_function),
7276         decl2.c (grokfield), friend.c (do_friend), parse.y
7277         (parse_bitfield): Update calls to cplus_decl_attributes.
7278         * decl.c (grokdeclarator): Take a pointer to a single ordinary
7279         attribute list.
7280         * decl.h (grokdeclarator): Update prototype.
7281         * decl2.c (grokfield): Take a single ordinary attribute list.
7282         * friend.c (do_friend): Likewise.
7283         * decl.c (shadow_tag, groktypename, start_decl,
7284         start_handler_parms, grokdeclarator, grokparms, start_function,
7285         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
7286         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
7287         (process_template_parm, do_decl_instantiation): Pass single
7288         ordinary attribute lists around.
7289         * decl.c (grokdeclarator): Correct handling of nested attributes.
7290         Revert the patch
7291         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
7292                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
7293                 not the left.
7294         .
7295         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
7296         (cp_attribute_table): Declare.
7297         * decl.c (valid_lang_attribute): Don't define.
7298         (lang_attribute_table): Define.
7299         (init_decl_processing): Initialize lang_attribute_table instead of
7300         valid_lang_attribute.
7301         * tree.c (cp_valid_lang_attribute): Remove.
7302         (handle_java_interface_attribute, handle_com_interface_attribute,
7303         handle_init_priority_attribute): New functions.
7304         (cp_attribute_table): New array.
7305         * decl2.c (import_export_class): Don't use
7306         targetm.valid_type_attribute.
7308 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7310         * Make-lang.in (cp/error.o): Depend on real.h
7311         * error.c: #include "real.h"
7313 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7315         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
7316         xmalloc/strcpy/strcat.
7318 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7320         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
7321         Const-ification.
7322         * pt.c (tsubst_decl): Likewise.
7324 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7326         * decl2.c (lang_f_options): Const-ification.
7327         * lex.c (cplus_tree_code_name): Likewise.
7328         * spew.c (yyerror): Likewise.
7330 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7332         PR c++/3986
7333         * class.c (force_canonical_binfo_r): Check & move an indirect
7334         primary base first.
7335         (force_canonical_binfo): Check that it's not already
7336         canonical.
7337         (mark_primary_virtual_base): Remove BINFO parameter.
7338         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
7340 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7342         Remove TYPE_NONCOPIED_PARTS.
7343         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
7344         CLASSTYPE_PURE_VIRTUALS.
7345         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
7346         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
7347         (layout_class_type): Don't call fixup_inline_methods here ...
7348         (finish_struct_1): ... call it here.
7350 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
7352         * decl.c (duplicate_decls): Remove code deadling with
7353         DECL_SAVED_INSNS.
7354         * decl2.c (finish_file): Likewise.
7355         * pt.c (instantiate_decl): Likewise.
7356         * semantics.c (expand_body): Don't defer local functions if
7357         they wouldn't be deferred for some other reason.  Don't
7358         generate RTL for functions that will not be emitted.
7359         (genrtl_start_function): Remove code deadling with
7360         DECL_SAVED_INSNS.
7361         (genrtl_finish_function): Likewise.
7363 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7365         PR c++/4203
7366         * call.c (build_over_call): Do not optimize any empty base
7367         construction.
7369 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7371         * error.c (dump_template_decl): Output template parameters
7372         together with their specifiers.
7373         Output `class' prefix for template template parameter.
7374         (dump_decl): Fix formatting.
7376 2001-08-30  Kurt Garloff  <garloff@suse.de>
7378         * optimize.c (inlinable_function_p): Allow only smaller single
7379         functions. Halve inline limit after reaching recursive limit.
7381 2001-08-30  Joern Rennecke <amylaar@redhat.com>
7382             Jason Merrill  <jason_merrill@redhat.com>
7384         * class.c (build_vtable_entry_ref): Subtract in char*, not
7385         ptrdiff_t.
7387 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
7389         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
7390         (build_cplus_array_type): Use cp_build_qualified_type, not
7391         TYPE_MAIN_VARIANT, to get an unqualified version.
7393         * decl2.c (grok_alignof): Lose.
7394         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
7395         * typeck.c (c_alignof): Lose.
7396         * semantics.c (finish_sizeof, finish_alignof): New.
7397         * parse.y: Use them.
7398         * cp-tree.h: Declare them.
7400 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
7402         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
7403         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
7404         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
7406 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
7408         * typeck2.c (add_exception_specifier): Only require complete type if
7409         not in processing template declaration.
7411 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7413         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
7414         GNU_xref_start_scope and GNU_xref_end_scope.
7416         * tree.c (TYPE_HASH): Moved to ../tree.h.
7418 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
7420         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
7421         on COMPOUND_EXPRs.
7423 2001-08-14  Richard Henderson  <rth@redhat.com>
7425         * class.c, cp-tree.h (build_vfn_ref): Remove.
7426         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
7428 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
7430         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
7431         empty class assignment as having side-effects to avoid
7432         spurious warnings.
7434 2001-08-13  Zack Weinberg  <zackw@panix.com>
7436         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
7437         * except.c: Include libfuncs.h.
7439 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7441         * decl.c (grokdeclarator): Clarify diagnostic message.
7443 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7445         * decl2.c (do_nonmember_using_decl): Replace using directive
7446         with using declaration in the error message.
7448 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7450         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
7451         criterion to avoid rebuilding expression tree instead of
7452         processing_template_decl.
7454 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7456         Support named return value optimization for inlines, too.
7457         * decl.c (finish_function): Nullify returns here.
7458         * semantics.c (genrtl_start_function): Not here.
7459         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
7460         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
7461         Also nullify the CLEANUP_STMT for the nrv.
7462         * cp-tree.h: Declare it.
7463         * optimize.c (declare_return_variable): Replace the nrv with the
7464         return variable.
7465         * typeck.c (check_return_expr): Be more flexible on alignment check.
7466         Ignore cv-quals when checking for a matching type.
7468 2001-08-09  Richard Henderson  <rth@redhat.com>
7470         * decl2.c (finish_objects): Use target hooks instead of
7471         assemble_constructor and assemble_destructor.
7473 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7475         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
7477 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
7479         PR c++/3820
7480         Stop using TYPE_NONCOPIED_PARTS.
7481         * call.c (build_over_call): Be careful when copy constructing
7482         or assigning to an empty class.
7483         * class.c (check_bases_and_members): It has a
7484         COMPLEX_ASSIGN_REF if it has a vptr.
7485         (layout_class_type): Don't add empty class padding to
7486         TYPE_NONCOPIED_PARTS.
7487         (finish_struct_1): Don't add the VFIELD either.
7488         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
7489         initialization.
7491 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
7493         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
7495 2001-08-06  Richard Henderson  <rth@redhat.com>
7497         * decl2.c (finish_objects): Pass a symbol_ref and priority to
7498         assemble_{constructor,destructor}.  Remove priority handling.
7500 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7502         Don't allow template-id in using-declaration.
7503         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
7504         (do_class_using_decl): Likewise.
7506 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7508         * cp/spew.c (read_token): No need to pop buffers.
7510 2001-08-02  Stan Shebs  <shebs@apple.com>
7512         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
7513         (fnaddr_from_vtable_entry): Remove decl.
7514         * method.c (use_thunk): Update comment.
7516 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
7518         * repo.c (get_base_filename): Change return value to const char
7519         pointer.
7521 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7523         Kill -fhonor-std.
7524         * NEWS: Document.
7525         * cp-tree.h (flag_honor_std): Remove.
7526         (CPTI_FAKE_STD): Remove.
7527         (std_node): Remove comment about it being NULL.
7528         (fake_std_node): Remove.
7529         * decl.c (in_fake_std): Remove.
7530         (walk_namespaces_r): Remove fake_std_node check.
7531         (push_namespace): Remove in_fake_std code.
7532         (pop_namespace): Likewise.
7533         (lookup_name_real): Remove fake_std_node check.
7534         (init_decl_processing): Always create std_node. Always add
7535         std:: things there.
7536         (builtin_function): Always put non '_' fns in std.
7537         * decl2.c (flag_honor_std): Remove.
7538         (lang_f_options): Remove honor-std.
7539         (unsupported_options): Add honor-std.
7540         (set_decl_namespace): Remove fake_std_node check.
7541         (validate_nonmember_using_decl): Likewise.
7542         (do_using_directive): Likewise.
7543         (handle_class_head): Likewise.
7544         * dump.c (cp_dump_tree): Likewise.
7545         * except.c (init_exception_processing): Adjust.
7546         * init.c (build_member_call): Remove fake_std_node check.
7547         (build_offset_ref): Likewise.
7548         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
7549         * rtti.c (init_rtti_processing): Adjust.
7551 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
7553         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
7554         operand while calling cp_tree_equal.
7556 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7558         The 3.0 ABI no longer has vbase pointer fields.
7559         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
7560         FORMAT_VBASE_NAME): Remove.
7561         * method.c (do_build_copy_constructor): Adjust.
7562         (do_build_assign_ref): Adjust.
7563         * search.c (lookup_field_r): Adjust.
7564         * typeck.c (build_component_ref): Adjust.
7566         The 3.0 ABI always has a vtable pointer at the start of every
7567         polymorphic class.
7568         * rtti.c (build_headof_sub): Remove.
7569         (build_headof): Adjust.
7570         (get_tinfo_decl_dynamic): No need to check flag_rtti
7571         here. Adjust.
7572         (create_real_tinfo_var): Explain why we need a hidden name.
7574 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7576         PR c++/3631
7577         * class.c (update_vtable_entry_for_fn): The fixed adjustment
7578         of a virtual thunk should be from declaring base.
7580 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
7582         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
7583         the shared virtual base, so preserving inheritance graph order.
7585 2001-07-30  Andreas Jaeger  <aj@suse.de>
7587         * decl2.c: Remove unused var global_temp_name_counter.
7589 2001-07-28  Richard Henderson  <rth@redhat.com>
7591         * method.c (pending_inlines): Remove.
7593 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
7595         * class.c (mark_primary_virtual_base): Don't adjust base
7596         offsets here.
7597         (dfs_unshared_virtual_bases): Adjust them here.
7598         (mark_primary_bases): Explain why we adjust at the end.
7600 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
7602         * class.c (finish_struct_1): When copying the primary base's
7603         VFIELD, make sure we find it is at offset zero.
7605 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7607         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
7608         tsubst_expr for default template arguments.
7610 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7612         PR c++/3621
7613         * spew.c (yylex): Only copy the token's lineno, if it is
7614         nonzero.
7616 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7618         PR c++/3624
7619         * call.c (resolve_args): Simplify, call
7620         convert_from_reference.
7621         (build_new_op): Resolve and convert from reference ARG1
7622         earlier. Adjust ARG2 & ARG3 resolve and conversion.
7624 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
7626         * decl.c (last_function_parm_tags): Remove.
7627         (current_function_parm_tags): Remove.
7628         (init_decl_processing): Adjust.
7629         (start_function): Adjust.
7630         (store_parm_decls): Adjust.
7632         PR c++/3152
7633         * decl.c (grokdeclarator): Detect when a function typedef is
7634         declaring a function, and create last_function_parms correctly.
7636 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
7638         * call.c (joust): Only prefer a non-builtin candidate to a builtin
7639         one if they have the same signature.
7641         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
7642         it rather than toplevel_bindings_p.  Give it a mangled name if static.
7643         (convert_to_reference): Adjust.
7644         * decl2.c (get_temp_name): Lose.
7645         * mangle.c (mangle_ref_init_variable): New fn.
7646         (mangle_guard_variable): Strip the ref-init header.
7647         * cp-tree.h: Adjust.
7648         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
7649         initializer.
7650         (grok_reference_init): Always use DECL_INITIAL.
7652 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7654         PR c++/3416
7655         * call.c (build_conditional_expr): Recheck args after
7656         conversions.
7657         * cp-tree.h (build_conditional_expr): Move to correct file.
7658         * typeck.c (decay_conversion): Diagnose any unknown types
7659         reaching here.
7660         (build_binary_op): Don't do initial decay or default
7661         conversions on overloaded functions.
7662         (build_static_cast): Don't do a decay conversion here.
7664 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7666         PR c++/3543
7667         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
7668         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
7670 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7672         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
7673         (create_vtbl_ptr): ... here.
7675 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7677         * class.c (build_vbase_offset_vbtl_entries): Look for
7678         non-primary base of which we are a sub vtable.
7680 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
7682         * semantics.c (finish_this_expr):  Remove unused code.
7684 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
7686         Simplify rtti, now we've only one ABI.
7687         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
7688         CPTI_TINFO_VAR_ID.
7689         (tinfo_decl_id, tinfo_var_id): Remove.
7690         (get_typeid_1): Remove.
7691         * rtti.c
7692         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
7693         (typeid_ok_p): New function.
7694         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
7695         (get_tinfo_decl): Remove old abi documentation.
7696         (tinfo_from_decl): Remove.
7697         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
7698         (get_typeid_1): Remove.
7699         (get_base_offset): Remove.
7700         (synthesize_tinfo_var): Absorb get_base_offset.
7701         (create_real_tinfo_var): Don't use tinfo_decl_id.
7703 2001-07-23  Graham Stott  <grahams@redhat.com>
7705         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
7706         variable has_two_argument_delete_p.
7708 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
7710         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
7711         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
7712         (CPTI_INDEX_IDENTIFIER): Remove.
7713         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
7714         (delta2_identifier): Remove.
7715         (index_identifier): Remove.
7716         (pfn_or_delta2_identifier): Remove.
7717         (flag_vtable_thunks): Remove.
7718         (VTABLE_DELTA2_NAME): Remove.
7719         (VTABLE_INDEX_NAME): Remove.
7720         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
7721         (vfunc_ptr_type_node): Adjust.
7722         (VTABLE_NAME_PREFIX): Adjust.
7723         (build_vfn_ref): Lose first parameter.
7724         (fixup_all_virtual_upcast_offsets): Remove.
7725         * decl.c (initialize_predefined_identifiers): Remove
7726         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
7727         (init_decl_processing): Remove no-vtable-thunk code.
7728         * decl2.c (flag_vtable_thunks): Remove.
7729         (mark_vtable_entries): Remove no-vtable-thunk code.
7730         * error.c (dump_decl): Remove no-vtable-thunk code.
7731         (dump_expr): Adjust ptr to member function code.
7732         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
7733         code.
7734         * rtti.c (build_headof): Remove no-vtable-thunk code.
7735         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
7736         * search.c (get_base_distance): Remove expand_upcast_fixups case.
7737         (virtual_context) Remove.
7738         (expand_upcast_fixups): Remove.
7739         (fixup_virtual_upcast_offsets): Remove.
7740         (fixup_all_virtual_upcast_offsets): Remove.
7741         * typeck.c (get_member_function_from_ptrfunc): Remove
7742         no-vtable-thunk code.
7743         * call.c (build_over_call): Adjust call to build_vfn_ref.
7744         * class.c (build_vfn_ref): Lose first parameter. Remove
7745         no-vtable-thunk code.
7746         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
7747         (build_vtable_entry): Remove no-vtable-thunk code.
7749 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
7751         Remove old-abi remnants. Remove comments about old abi
7752         behavior. Remove references to 'new-abi' in comments.
7753         * cp-tree.h: Adjust comments.
7754         (vbase_offsets_in_vtable_p): Delete.
7755         (vcall_offsets_in_vtable_p): Delete.
7756         (vptrs_present_everywhere_p): Delete.
7757         (all_overridden_vfuns_in_vtables_p): Delete.
7758         (merge_primary_and_secondary_vtables_p): Delete.
7759         (TYPE_CONTAINS_VPTR_P): Adjust.
7760         (VTT_NAME_PREFIX): Remove.
7761         (CTOR_VTBL_NAME_PREFIX): Remove.
7762         (init_vbase_pointers): Remove.
7763         * class.c: Adjust coments.
7764         (build_vbase_pointer_fields): Delete.
7765         (build_vbase_pointer): Remove old-abi code.
7766         (build_secondary_vtable): Likewise.
7767         (modify_all_vtables): Likewise.
7768         (create_vtable_ptr): Likewise.
7769         (layout_class_type): Likewise.
7770         (finish_struct_1): Likewise.
7771         (finish_vtbls): Likewise.
7772         (dfs_finish_vtbls): Delete.
7773         (build_vbase_offset_vtbl_entries): Remove old-abi code.
7774         * cvt.c: Adjust comments.
7775         * decl.c: Adjust comments.
7776         * decl2.c: Adjust comments.
7777         * init.c: Adjust comments.
7778         (construct_virtual_bases): Remove old-abi code.
7779         * lang-specs.h: Remove -fno-new-abi.
7780         * mangle.c: Adjust comments.
7781         * rtti.c: Adjust comments.
7782         (get_base_offset): Remove old-abi-code.
7783         * search.c: Adjust comments.
7784         (dfs_init_vbase_pointers): Remove.
7785         (dfs_vtable_path_unmark): Remove.
7786         (init_vbase_pointers): Remove.
7787         * semantics.c: Adjust comments.
7788         (emit_associated_thunks): Remove old-abi code.
7789         * typeck.c: Adjust comments.
7791 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
7793         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
7794         params.h.
7796 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
7798         * class.c (finish_struct_anon): Forbid nested classes.
7800 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7802         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
7803         * optimize.c: Include debug.h.
7804         (maybe_clone_body): Use debug hook.
7805         * semantics.c: Include debug.h.
7806         (expand_body): Use debug hook.
7808 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7810         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
7812 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
7814         * class.c (type_requires_array_cookie): New function.
7815         (check_methods): Don't try to figure out whether the type needs a
7816         cookie here.
7817         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
7818         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
7819         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
7820         * pt.c (instantiate_class_template): Don't set
7821         TYPE_VEC_DELETE_TAKES_SIZE.
7822         * NEWS: Document ABI changes from GCC 3.0.
7824 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
7825             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7827         * NEWS (Changes in GCC 3.0): Fix typo.
7829 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7831         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
7832         which attributes are to be attached, and a flags argument.  Update
7833         call to decl_attributes.
7834         (grokfield): Update call to decl_attributes.
7835         * class.c (finish_struct): Update call to cplus_decl_attributes.
7836         * cp-tree.h (cplus_decl_attributes): Update prototype.
7837         * decl.c (start_decl, grokdeclarator, start_function): Update
7838         calls to decl_attributes and cplus_decl_attributes.
7839         * friend.c (do_friend): Update call to cplus_decl_attributes.
7840         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
7842 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
7844         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
7845         for `register' variables with an asm-specification.
7847 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
7849         * semantics.c (finish_asm_stmt): Mark the output operands
7850         to an asm addressable, if necessary.
7852 2001-07-11  Ben Elliston  <bje@redhat.com>
7854         * Revert this change -- there is a subtle bug.
7856         PR c++/80
7857         * decl.c (finish_enum): New "attributes" argument; pass it to
7858         cplus_decl_attributes.  Use a narrower type if the enum is packed.
7859         * cp-tree.h (finish_enum): Adjust prototype.
7860         * parse.y (enum_head): New non-terminal.
7861         (structsp): Use it. Enums now may be preceded or followed by
7862         optional attributes -- pass their chained tree to finish_enum().
7863         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
7865 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
7867         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
7868         variables.
7870 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
7872         * semantics.c (cp_expand_stmt): Fix for null
7873         current_function_return_value.
7875 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
7877         * call.c (build_op_delete_call): Initialize fn.
7878         (convert_like_real): Delete conditional.
7879         (joust): Initialize *w and *l.
7880         * class.c: Add prototype for binfo_ctor_vtable.
7881         (get_primary_binfo): Initialize result.
7882         * init.c (build_java_class_ref): Initialize name.
7884 2001-07-09  Erik Rozendaal  <dlr@acm.org>
7886         * typeck.c (unary_complex_lvalue): Do not duplicate the
7887         argument to modify, pre-, or post-increment when used as an
7888         lvalue and when the argument has side-effects.
7890 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7892         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7893         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
7894         cplus_decl_attributes even if attrs is NULL.
7895         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7897 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7899         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
7900         calls to decl_attributes.
7902 2001-07-06  Ira Ruben   <ira@apple.com>
7904         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
7905         be DECL_TEMPLATE_RESULT.
7907 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7909         * cp-tree.h (copy_template_template_parm): Rename to ...
7910         (bind_template_template_parm): ... here.
7911         * tree.c (copy_template_template_parm): Rename to ...
7912         (bind_template_template_parm): ... here.  Remove the case when
7913         NEWARGS is NULL_TREE.
7914         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
7915         BOUND_TEMPLATE_TEMPLATE_PARM.
7916         * pt.c (lookup_template_class): Adjust.
7918 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
7920         * cvt.c (convert_lvalue): New fn.
7921         * cp-tree.h: Declare it.
7922         * method.c (do_build_assign_ref): Use it.
7923         (do_build_copy_constructor): Convert parm to base types
7924         before calling base constructors.
7926         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
7927         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
7928         optimize.
7929         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
7931 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
7933         * optimize.c (optimize_inline_calls): New function, broken out
7934         of ...
7935         (optimize_function): ... here. Call it. Don't inline if it is
7936         a thunk.
7937         (dump_function): Print name of dump flag causing this dump.
7938         * semantics.c (expand_body): Move thunk inline check to
7939         optimize_function.
7941 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7943         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
7944         (comptypes): Use target.comp_type_attributes.
7946 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
7948         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
7950 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7952         * error.c (lang_print_error_function): Add a `diagnostic_context *'
7953         parameter. Tweak.
7955 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7957         * decl2.c (import_export_class): Update.
7959 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7961         * error.c (init_error): Adjust settings.
7963 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7965         * error.c (init_error): Adjust settings.
7967 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
7969         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
7970         return pointers to data members by reference rather than by value.
7972 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
7974         Implement the Named Return Value optimization.
7975         * cp-tree.h (struct cp_language_function): Add x_return_value.
7976         (current_function_return_value): Now a macro.
7977         * decl.c: Don't define it.
7978         (define_label, finish_case_label): Don't clear it.
7979         (init_decl_processing): Don't register it with GC.
7980         * semantics.c (genrtl_finish_function): Don't check it for
7981         no_return_label.  Copy the RTL from the return value to
7982         current_function_return_value and walk, calling...
7983         (nullify_returns_r): ...this new fn.
7984         * typeck.c (check_return_expr): Set current_function_return_value.
7986 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
7988         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
7989         sharing a ctor vtable with.  Merge code for cases 1 and 2.
7990         (binfo_ctor_vtable): New fn.
7991         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
7993 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
7995         * class.c (dfs_find_final_overrider): Fix logic.
7997         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
7998         virtual thunk instead of non-virtual.
7999         (get_matching_virtual): Uncomment.
8001         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
8002         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
8003         PARM, not ARG.
8005 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
8007         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
8008         we've not emerged from the hierarchy of RTTI_BINFO on reaching
8009         a non-virtual base.
8011 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
8013         * NEWS: Update release number.
8015 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8017         PR c++/3130, c++/3131, c++/3132
8018         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
8019         * class.c (force_canonical_binfo_r): Move
8020         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
8021         virtual bases unless they're primary and what they're primary
8022         too has been moved.
8023         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
8024         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
8025         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
8026         derived binfo.
8027         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
8028         (layout_nonempty_base_or_field): Add most derived type
8029         parameter. Adjust.
8030         (layout_empty_base): Likewise.
8031         (build_base_field): Likewise.
8032         (build_base_fields): Likewise.
8033         (propagate_binfo_offsets): Add most derived type
8034         parameter. Skip non canonical virtual bases too.
8035         (dfs_set_offset_for_unshared_vbases): Don't skip primary
8036         bases. Do skip canonical bases.
8037         (layout_virtual_bases): Adjust.
8038         (layout_class_type): Adjust.
8039         (dfs_get_primary_binfo): Build list of virtual primary base
8040         candidates.
8041         (get_primary_binfo): Check that the shared virtual primary
8042         base candidate was found first.
8043         (accumulate_vtbl_inits): Don't do anything for non-vptr
8044         containing binfos. For case 1 primary virtual bases, keep
8045         checking that we've not emerged from the hierarchy of RTTI_BINFO.
8047 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
8049         PR c++/3089
8050         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
8051         hierarchy looking for primary bases for a ctor
8052         vtable. Recursively call oneself, if we meet our primary via
8053         this route and haven't met it yet via inheritance graph order.
8055 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
8057         * lang-options.h: Emit documentation for -fno-honor-std, not
8058         -fhonor-std.
8060 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
8062         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
8063         Don't clobber delta.
8064         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
8066 2001-06-10  Mark Mitchell <mark@codesourcery.com>
8067             Gabriel Dos Reis  <gdr@codesourcery.com>
8069         * Make-lang.in (cp/call.o): Depend on diagnostic.h
8070         (cp/typeck.o): Depend on diagnostic.h
8071         (cp/typeck2.o): Depend on diagnostic.h
8072         (cp/repo.o): Depend on dignostic.h
8073         * typeck.c: #include diagnostic.h
8074         (convert_for_initialization): Remove extern declaration for
8075         warningcount and errorcount.
8077         * call.c: #include diagnostic.h
8078         (convert_like_real): Remove extern declaration for warnincount and
8079         errorcount.
8081         * repo.c: #include diagnostic.h
8082         * typeck2.c: #include diagnostic.h
8084 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8086         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
8087         in previous change.
8089 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8091         PR c++/2929
8092         * friend.c (do_friend): Use push_decl_namespace for classes at
8093         namespace scope.
8095 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
8096             Jason Merrill <jason_merrill@redhat.com>
8098         PR c++/3061
8099         * class.c (build_secondary_vtable): Use assert, rather than an error
8100         message.
8101         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
8102         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
8103         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
8104         Don't set BINFO_VTABLE for a primary virtual base.
8106 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
8108         * decl.c (duplicate_decls): Update source position information
8109         when a template function is defined.
8111 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
8113         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
8115 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
8117         PR c++/2914
8118         * decl.c (pushtag): Don't push into a complete type's scope.
8120 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
8122         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
8123         (struct lang_decl_flags): Lose generate_with_vtable_p.
8124         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
8125         * class.c (copy_virtuals): Adjust.
8126         * decl2.c (mark_vtable_entries): Adjust.
8127         * method.c (make_thunk, build_vtable_entry): Adjust.
8128         * class.c (update_vtable_entry_for_fn): Only look as far as the
8129         first defining class.
8130         (build_vtbl_initializer): Put nothing in the slot for a function only
8131         defined in a lost primary virtual base.
8132         (add_vcall_offset_vtbl_entries_1): Use the same code for
8133         the lost primary case and the normal case.
8134         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
8135         (get_vfield_offset, get_derived_offset): Lose.
8136         (dfs_find_final_overrider): Use look_for_overrides_here.
8137         (get_matching_virtual): New fn.
8138         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
8139         not BV_VCALL_INDEX.
8140         * search.c (look_for_overrides_here): Split out from...
8141         (look_for_overrides_r): Here.
8143         * class.c (find_final_overrider): Return error_mark_node on error.
8145         * decl2.c (key_method): #if 0 accidental change.
8147 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8149         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
8150         (build_over_call): Likewise.
8151         * decl.c (grokparms): Likewise.
8152         * pt.c (tsubst_decl): Likewise.
8153         * typeck.c (convert_arguments): Likewise.
8155 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
8157         * semantics.c (begin_class_definition): Robustify.
8159         * pt.c (instantiate_decl): Tell the repository code about the
8160         clones, not the cloned functions.
8161         * repo.c (repo_template_used): Explicitly instantiate the cloned
8162         function, not the clones.
8164 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8166         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
8167         ICS_BAD_FLAG on created conversion.
8168         (compare_ics): Break out rank.
8170 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8172         * decl.c (xref_tag): Remove extraneous %s on dependent name
8173         lookup warning.
8175 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8177         * class.c (layout_vtable_decl): Fix off by one error on
8178         build_index_type.
8179         (build_vtt): Likewise.
8180         (build_ctor_vtbl_group): Likewise.
8182 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8184         * class.c (maybe_indent_hierarchy): New function.
8185         (dump_class_hierarchy_r): Add flags. Dump extra binfo
8186         information, if enabled. Use maybe_indent_hierarchy. Adjust
8187         output format.
8188         (dump_class_hierarchy): Adjust prototype. Adjust output format.
8189         (dump_array, dump_vtable, dump_vtt): New functions.
8190         (finish_struct_1): Adjust hierarchy dumping.
8191         (initialize_vtable): Call dump_vtable.
8192         (build_vtt): Call dump_vtt.
8193         (build_ctor_vtbl_group): Call dump_vtable.
8194         * decl2.c (flag_dump_class_layout): Remove.
8195         (cxx_decode_option): Remove dump translation unit
8196         and dump class hierarchy check. Call dump_switch_p.
8197         (finish_file): Adjust dumping.
8198         (dump.c): Only dump base classes if not TDF_SLIM.
8199         Only dump namespace members if not TDF_SLIM.
8200         * optimize.c (dump_function): New function.
8201         (optimize_function): Call dump_function.
8202         * semantics.c (expand_body): Use dump_enabled_p.
8204 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
8206         PR g++/2936
8207         Part missed from first commit
8208         * decl2.c (finish_anon_union): Copy context.
8210 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
8212         PR g++/2936
8213         * optimize.c (remap_decl): Remap anonymous aggregate members too.
8215 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8217         PR g++/2823
8218         * semantics.c (expand_body): Don't optimize thunks.
8220 2001-05-25  Sam TH  <sam@uchicago.edu>
8222         * cp-tree.h lex.h: Fix header include guards.
8224 2001-05-25  Mark Mitchell <mark@codesourcery.com>
8226         * decl.c (init_decl_processing): Tweak.
8228 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
8230         * decl.c (duplicate_decls): Tidy.
8231         (init_decl_processing): Always set flag_no_builtin.
8233 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8235         PR c++/2184
8236         * decl2.c (do_local_using_decl): Push the decls, even in a
8237         template.
8239 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
8241         * optimize.c (initialize_inlined_parameters): Don't set
8242         TREE_READONLY for a VAR_DECL taking the place of an inlined
8243         PARM_DECL.
8245 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
8247         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
8248         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
8249         attribute.
8251 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
8253         * parse.y: Refer to compound literals as such, not as
8254         constructor-expressions.
8256 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
8258         * call.c (build_op_delete_call): Ignore exception-specifications
8259         when looking for matching delete operators.
8260         * init.c (build_new_1): Compute whether or not the allocation
8261         function used is a placement allocation function or not, and
8262         communicate this information to build_op_delete_call.
8264 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
8266         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
8267         (build_vtbl_ref): Adjust.
8268         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
8269         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
8270         Re-add vtable-gc.
8271         (unsupported_options): Correspondingly.
8273         * decl2.c (maybe_make_one_only): Check flag_weak, not
8274         supports_one_only().
8276         * cp-tree.def (START_CATCH_STMT): Lose.
8277         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
8278         * tree.c (cp_statement_code_p): Don't case it.
8279         * semantics.c (cp_expand_stmt): Likewise.
8280         * cp-tree.h (START_CATCH_TYPE): Lose.
8281         (HANDLER_TYPE): New.
8282         * except.c (expand_start_catch_block): Don't start any blocks.
8283         Return the type.
8284         (expand_end_catch_block): Don't end any blocks.
8285         * parse.y (handler): Don't pass anything from finish_handler_parms
8286         to finish_handler.
8287         * pt.c (tsubst_expr): Likewise.
8288         * semantics.c (begin_handler): Call note_level_for_catch here.
8289         (finish_handler_parms): Don't return anything.
8290         (genrtl_catch_block, begin_catch_block): Lose.
8291         (genrtl_handler): Call expand_start_catch here.
8293 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
8295         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
8296         (get_vtable_decl, build_vtt): Not here.
8298 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
8300         PR c++/2781
8301         * optimize.c (update_cloned_parm): Copy addressability and other
8302         flags.
8304 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8306         * pt.c (determine_specialization): Ignore artificial functions.
8308 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8310         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
8311         (C_RID_CODE): Remove.
8312         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
8313         (init_parse): Don't do it here.
8315 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
8317         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
8318         function declaration to avoid stripping the symbol's attributes.
8320 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
8322         * decl.c (pushdecl): Adjust error string.
8323         (xref_tag): Adjust friend class injection warning. Remove the
8324         inherited name from the class shadowed scope.
8326 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
8328         * except.c (cp_protect_cleanup_actions): New function.
8329         (init_exception_processing): Don't set protect_cleanup_actions
8330         here.  Do set lang_protect_cleanup_actions.
8332 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8334         * spew.c (read_token): Call yyerror on all unexpected tokens.
8336 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
8338         * init.c (member_init_ok_or_else): Take a tree rather than
8339         string for name.
8340         (expand_member_init): Adjust.
8342 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
8344         * decl.c (duplicate_decls): Suppress warning about duplicate
8345         decls if the first decl is a friend.
8347 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
8349         * except.c (choose_personality_routine): Export.  Add
8350         explanatory comment.  Take an enum languages, not a boolean.
8351         (initialize_handler_parm): Adjust to match.
8352         * cp-tree.h: Prototype choose_personality_routine.
8353         * lex.c (handle_pragma_java_exceptions): New function.
8354         (init_cp_pragma): Register #pragma GCC java_exceptions.
8356 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
8358         * method.c (build_mangled_C99_name): Remove unused prototype.
8360 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
8362         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
8363         * typeck.c (get_member_function_from_ptrfunc,
8364         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
8365         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
8367         Reverted Geoff Keating's 2001-05-03's patch.
8369 2001-05-11  Ira Ruben   <ira@apple.com>
8371         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
8373 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
8375         * cp-tree.h (finish_label_expr, lookup_label): Delete.
8376         * parse.y: Update for '&&'; don't issue warning here.
8377         * semantics.c (finish_label_expr): Delete.
8379 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
8381         * splay-tree.h (splay_tree_max): New function.
8382         (splay_tree_min): Likewise.
8384 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
8386         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
8387         (pfn_vflag_identifier): Define.
8388         Update comment about layout of pointer functions.
8389         (build_ptrmemfunc1): Update prototype.
8390         (expand_ptrmemfunc_cst): Update prototype.
8391         * decl.c (initialize_predefined_identifiers): Initialize
8392         pfn_vflag_identifier.
8393         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
8394         an extra field to the type.
8395         * expr.c (cplus_expand_constant): Pass 'flag' between
8396         expand_ptrmemfunc_cst and build_ptrmemfunc1.
8397         * typeck.c (get_member_function_from_ptrfunc): When
8398         FUNCTION_BOUNDARY < 16, look at additional field to determine
8399         if a pointer-to-member is a real pointer or a vtable offset.
8400         (build_ptrmemfunc1): Add new parameter to contain extra field.
8401         (build_ptrmemfunc): Pass the extra field around.
8402         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
8403         (pfn_from_ptrmemfunc): Ignore the extra field.
8405 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
8407         * cp-tree.h (flag_inline_trees): Update documentation.
8408         * decl.c (init_decl_processing): Adjust handling of
8409         flag_inline_functions and flag_inline_trees to support -O3.
8410         (grokfndecl): Set DECL_INLINE on all functions if that's what
8411         the user requested.
8412         (save_function_data): Clear DECL_INLINE in
8413         current_function_cannot_inline is non-NULL.
8414         * decl2.c (flag_inline_trees): Update documentation.
8416 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
8418         * dump.c (cp_dump_tree, USING_STMT case): New case.
8419         * tree.c (cp_statement_code_p): Add USING_STMT.
8420         * decl2.c (do_using_directive): Add the using directive statement.
8422         * tree.c (walk_tree): Reformat an if block.
8424 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8426         * decl.c (compute_array_index_type): Don't try to do anything with
8427         the indices when processing a template.
8429 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8431         * call.c: NULL_PTR -> NULL.
8432         * class.c: Likewise.
8433         * cvt.c: Likewise.
8434         * decl.c: Likewise.
8435         * decl2.c: Likewise.
8436         * except.c: Likewise.
8437         * init.c: Likewise.
8438         * rtti.c: Likewise.
8439         * search.c: Likewise.
8440         * tree.c: Likewise.
8441         * typeck.c: Likewise.
8442         * typeck2.c: Likewise.
8444 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
8446         * decl2.c (do_using_directive): Revert previous patch.
8448 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8450         * cp-tree.def (USING_STMT): New statement node.
8451         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
8452         * decl2.c (do_using_directive): Add USING_STMT to statement
8453         tree. Don't emit errors when processing template decl.
8454         * pt.c (tsubst_expr, USING_STMT case): New case.
8455         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
8457 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8459         * call.c (build_new_op): Convert args from reference here.
8460         (build_conditional_expr): Don't convert here.
8462 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
8464         * spew.c (last_token_id): New static variable.
8465         (read_token): Set it here.
8466         (yyerror): Use it here.
8468 2001-04-30  Richard Henderson  <rth@redhat.com>
8470         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
8471         * decl.c: Likewise.
8473 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8475         * gxxint.texi: Remove.
8476         * Make-lang.in: Remove all traces of gxxint.texi.
8478 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
8480         * decl2.c (start_static_initialization_or_destruction): Correct
8481         logic to handle the -fno-use-cxa-atexit case.
8483 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
8485         * optimize.c (update_cloned_parm): New function.
8486         (maybe_clone_body): Use it.  Update the `this' parameter too.
8488 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8490         * decl2.c (unsupported_options): Add new-abi.
8491         * lang-options.h: Remove no longer supported options.
8493 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8495         * except.c (can_convert_eh): Don't check template parms,
8496         typename types etc.
8498 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8500         * optimize.c (maybe_clone_body): Copy parameter names and locations.
8502 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
8504         * cp-tree.h (adjust_clone_args): Prototype new function.
8505         * class.c (adjust_clone_args): New function.
8506         * decl.c (start_function): Call it for in charge ctors.
8508 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
8510         * method.c (use_thunk): Make sure that thunks really are emitted
8511         when requested.
8513 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
8515         * mangle.c (write_chars): New macro.
8516         (hwint_to_ascii): New function
8517         (write_number): Use it.
8518         (write_integer_cst): Deal with really big numbers.
8520 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
8522         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
8523         the clone.
8525 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
8527         * decl.c (grokdeclarator): Set context of namespace scope
8528         TYPE_DECLS.
8530 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
8532         * cp/optimize.c: Include hashtab.h.
8533         (struct inline_data): Add tree_pruner.
8534         (expand_call_inline, expand_calls_inline): Use it when calling
8535         walk_tree.
8536         (optimize_function): Initialize and free tree_pruner.
8538 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
8540         Lazy __FUNCTION__ generation.
8541         * cp-tree.def (FUNCTION_NAME): Remove.
8542         * cp-tree.h (function_name_declared_p): Remove.
8543         (cp_fname_init): Prototype.
8544         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
8545         don't call declare_function_name. Call start_fname_decls.
8546         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
8547         clobber the line number.
8548         (cp_fname_init): New function.
8549         (start_function): Call start_fname_decls.
8550         (finish_function): Call finish_fname_decls.
8551         * lex.c (reswords): Add slots for __FUNCTION__ et al.
8552         (rid_to_yy): Add mappings for __FUNCTION__ et al.
8553         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
8554         * parse.y (VAR_FUNC_NAME): New token.
8555         (primary): Add VAR_FUNC_NAME.
8556         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
8557         generation.
8558         (tsubst, FUNCTION_NAME case): Remove.
8559         (tsubst_copy, FUNCTION_NAME case): Remove.
8560         (tsubst_expr, DECL_STMT case): Be careful with a
8561         DECL_PRETTY_FUNCTION_P.
8562         (instantiate_decl): Remove function_name_declared_p.
8563         * semantics.c (begin_compound_statement): Don't call
8564         declare_function_name here.
8565         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
8566         (finish_translation_unit): Call finish_fname_decls.
8567         (expand_body): Remove function_name_declared_p.
8568         * typeck2.c (digest_init): Allow any ERROR_MARK.
8570 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
8572         * pt.c (tsubst_decl): Use VOID_TYPE_P.
8573         * semantics.c: Fix some typos.
8575 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
8577         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
8579 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8581         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
8583 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
8585         * except.c (build_throw): Wrap the initialization of the exception
8586         object in a MUST_NOT_THROW_EXPR.
8587         (do_free_exception): #if 0.
8589 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
8591         * cp-tree.h (finish_enum): Change prototype.
8592         * decl.c (finish_enum): Reorganize.
8593         * parse.y (structsp): Adjust calls to finish_enum.
8595 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8597         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
8598         't' case.
8600 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
8602         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
8603         (layout_empty_base): Return at end flag.
8604         (build_base_field): Likewise.
8605         (build_base_fields): Likewise.
8606         (layout_virtual_bases): Don't add 1 to eoc value.
8607         (end_of_class): Use full size for empty bases.
8608         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
8609         empty bases. Don't add 1 to eoc value. Only add trailing padding
8610         if we're an empty class with no empty bases.
8611         (dump_class_hierarchy): Dump size and alignment.
8613 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8615         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
8616         ICS_BAD_FLAG.
8618 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
8620         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
8621         is found, look first if name does not match the structure name.
8623 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
8625         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
8626         set.
8627         (SET_DECL_LANGUAGE): New macro.
8628         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
8629         (pushdecl): Likewise.
8630         (build_library_fn_1): Likewise.
8631         (build_cp_library_fn): Likewise.
8632         (grokfndecl): Likewise.
8633         (grokvardecl): Mark `extern "C"' variables as having C linkage.
8634         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
8635         * lex.c (retrofit_lang_decl): Likewise.
8636         * mangle.c (mangle_decl_string): Don't mangle the names of
8637         variables declared with C language linkage.
8638         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
8640 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8642         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
8643         flag_access_control from uninitialized storage.
8645 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
8647         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
8648         * mangle.c (write_pointer_to_member_type): Fix mangling of
8649         pointers to cv-qualified member function types.
8651         * init.c (build_delete): Create a SAVE_EXPR for the address if
8652         we're going to use it more than once.
8654 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
8656         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
8657         (expand_ptremfunc_cst): Change prototype.
8658         (delta2_from_ptrmemfunc): Remove.
8659         * expr.c (cplus_expand_constant): Adjust call to
8660         expand_ptrmemfunc_cst.
8661         * typeck.c (build_ptrmemfunc1): Simplify.
8662         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
8663         results in a constant.
8664         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
8665         (delta2_from_ptrmemfunc): Remove.
8666         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
8668 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
8670         * cp-tree.h (decl_namespace_list): New macro.
8671         (struct saved_scope): Add decl_ns_list.
8672         * decl.c (mark_saved_scope): Mark it.
8673         * decl2.c: Lose static decl_namespace_list.
8674         (init_decl2): Don't save it.
8676 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8678         * cp-tree.h (warn_return_type, yylex): Delete redundant
8679         declarations.
8681         * decl.c (current_class_depth, global_namespace): Likewise.
8683         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
8685         * repo.c (flag_use_repository): Likewise.
8687 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8689         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
8690         set_block, pushdecl, getdecls, gettags, init_decl_processing,
8691         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
8692         lvalue_or_else, print_lang_statistics, comp_target_types,
8693         unsigned_type, signed_type, signed_or_unsigned_type,
8694         build_function_call, mark_addressable, incomplete_type_error):
8695         Delete redundant declarations.
8697 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
8699         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
8700         (TYPE_ANONYMOUS_P): New macro.
8701         (TAGGED_TYPE_P): New macro.
8702         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
8703         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
8704         * tree.c (no_linkage_helper): Likewise.
8705         * semantics.c (begin_class_definition): Likewise.
8706         * pt.c (convert_template_argument): Likewise.
8707         * lex.c (check_for_missing_semicolon): Likewise.
8709 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8711         * class.c (dfs_unshared_virtual_bases): New function.
8712         (mark_primary_bases): Call it.
8713         (check_bases): Ignore virtual bases when determining
8714         nearly-emptiness.
8716 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
8718         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
8720 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
8722         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
8723         cloned function to the clone.
8725 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8727         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
8729         * semantics.c: Include expr.h.
8731 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
8733         * method.c (implicitly_declare_fn): Commonize code for copy ctor
8734         and assignment op. Set TREE_USED for parameter.
8736 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
8738         * class.c (find_final_overrider_data): Add `candidates'.
8739         (dfs_find_final_overrider): Don't issue error messages
8740         prematurely.
8741         (find_final_overrider): Issue error messages here.
8742         (build_base_field): Don't warn about amgibuous direct bases here.
8743         (warn_about_ambiguous_direct_bases): New function.
8744         (layout_class_type): Use it.
8746 2001-04-10  Richard Henderson  <rth@redhat.com>
8748         * typeck.c (build_array_ref): Push the array reference inside
8749         COMPOUND_EXPR and COND_EXPR.
8751 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
8753         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
8754         * decl.c (duplicate_decls): Adjust accordingly.
8755         (maybe_commonize_var): Likewise.
8756         (grokfndecl): Likewise.
8757         (start_function): Likewise.
8758         (start_method): Likewise.
8759         * decl2.c (key_method): Likewise.
8760         (import_export_decl): Likewise.
8761         * method.c (implicitly_declare_fn): Likewise.
8762         * optimize.c (maybe_clone_body): Likewise.
8764 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
8766         * lang-specs.h: Add __DEPRECATED.
8768 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
8770         * search.c (get_dynamic_cast_base_type): When building a new
8771         constant, set its type to ssizetype.
8773 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
8775         * optimize.c (expand_call_inline): Only add newly inlined statements
8776         into inlined_stmts.
8778 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8780         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
8781         (OPERATOR_FORMAT): Likewise.
8782         (OPERATOR_TYPENAME_FORMAT): Likewise.
8783         * operators.def: Remove old name-mangling information.
8784         * decl.c (grok_op_properties): Adjust accordingly.
8785         * lex.c (init_operators): Likewise.
8786         * rtti.c (get_tinfo_decl): Issue error messages about types that
8787         have variable size.
8789 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8791         * decl2.c (import_export_decl): Don't call import_export_class
8792         when processing an inline member function.
8793         * semantics.c (expand_body): Call import_export_decl before
8794         emitting inline functions.
8796 2001-03-28  Richard Henderson  <rth@redhat.com>
8798         IA-64 ABI Exception Handling:
8799         * cp-tree.def (EH_SPEC_BLOCK): New.
8800         (MUST_NOT_THROW_EXPR): New.
8801         * cp-tree.h: Update changed function declarations.
8802         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
8803         (CPTI_CALL_UNEXPECTED): New.
8804         (struct cp_language_function): Rename x_eh_spec_try_block
8805         to x_eh_spec_block.
8806         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
8807         * decl.c (current_binding_level): If no current function
8808         bindings, revert to scope_chain.
8809         (initialize_predefined_identifiers): Remove __cp_push_exception.
8810         (store_parm_decls): Use begin_eh_spec_block.
8811         (finish_function): Use finish_eh_spec_block.
8812         (mark_lang_function): Update for name changes.
8813         * decl2.c (finish_file): No mark_all_runtime_matches.
8814         * dump.c (cp_dump_tree): Handle new tree codes.
8815         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
8816         * except.c (catch_language_init, catch_language): Remove.
8817         (init_exception_processing): Don't set language code.
8818         Initialize call_unexpected_node, protect_cleanup_actions,
8819         eh_personality_libfunc, lang_eh_runtime_type.
8820         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
8821         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
8822         (prepare_eh_type): Split out type canonicalizations ...
8823         (build_eh_type_type): ... from here.
8824         (build_eh_type_type_ref): Remove.
8825         (mark_all_runtime_matches): Remove.
8826         (build_exc_ptr): New.
8827         (do_begin_catch, do_end_catch): New.
8828         (do_pop_exception): Remove.
8829         (build_terminate_handler): Remove.
8830         (choose_personality_routine): Split out language choice from ...
8831         (initialize_handler_parm): ... here.
8832         Use MUST_NOT_THROW_EXPR.
8833         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
8834         exception object handling.
8835         (expand_start_eh_spec, expand_end_eh_spec): Remove.
8836         (expand_exception_blocks, alloc_eh_object): Remove.
8837         (begin_eh_spec_block, finish_eh_spec_block): New.
8838         (do_allocate_exception, do_free_exception): New.
8839         (expand_throw): Merge into ...
8840         (build_throw): ... here.  Update for abi.
8841         * expr.c (cplus_expand_expr): No expand_internal_throw.
8842         Handle MUST_NOT_THROW_EXPR.
8843         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
8844         * semantics.c (*) Update for except.h name changes.
8845         (genrtl_try_block): No protect_with_terminate.
8846         (genrtl_eh_spec_block): New.
8847         (genrtl_handler): Don't emit the goto here.
8848         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
8849         (genrtl_finish_function): Don't expand_exception_blocks.
8850         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
8852 2001-03-28  Richard Henderson  <rth@redhat.com>
8854         * decl.c (struct named_label_list): Rename eh_region to
8855         in_try_scope, add in_catch_scope.
8856         (struct binding_level): Rename eh_region to is_try_scope,
8857         add is_catch_scope.
8858         (note_level_for_try): Rename from note_level_for_eh.
8859         (note_level_for_catch): New.
8860         (poplevel): Copy both is_try_scope and is_catch_scope to
8861         the named_label_list struct.
8862         (check_previous_goto_1): Don't check for catch block via
8863         DECL_ARTIFICIAL; use in_try_scope instead.
8864         (check_goto): Likewise.
8865         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
8866         * except.c (expand_start_catch_block): Call note_level_for_catch.
8867         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
8869 2001-03-27  Richard Henderson  <rth@redhat.com>
8871         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
8872         exceptions_via_longjmp.
8874 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
8876         * pt.c (check_default_tmpl_args):  Make error messages clearer.
8878 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
8880         * error.c:  Also undefine 'A' macro used for cp_printers definition.
8882 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8884         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8886 2001-03-26  Mike Yang <yang@research.att.com>
8887             Mark Mitchell  <mark@codesourcery.com>
8889         * dump.c (dump_access): New function.
8890         (cp_dump_tree): Use it.  Dump basetype information for class
8891         types.
8893 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
8895         * Makefile.in (optimize.o): Depend on params.h.
8896         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
8897         (init_decl_processing): Set flag_no_inline when doing
8898         inlining-on-trees.
8899         * optimize.c: Include params.h.
8900         (struct inline_data): Improve documentation of FNS.  Add
8901         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
8902         (INSNS_PER_STMT): New macro.
8903         (remap_block): Use CLONING_P.
8904         (inlinable_function_p): Don't inline big functions.
8905         (expand_call_inline): Keep track of how much inlining we've done.
8906         (optimize_function): Set FIRST_INLINED_FN.
8907         (maybe_clone_body): Set CLONING_P.
8908         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
8909         tree nodes.
8910         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
8911         rest_of_compilation.  Clear DECL_RTL for local variables
8912         afterwards.
8913         (clear_decl_rtl): New function.
8915 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8917         Implement DR 209
8918         * cp-tree.h (skip_type_access_control,
8919         reset_type_access_control): Prototype.
8920         * decl.c (grokdeclarator): Access of friends is not checked.
8921         * parse.y (component_decl_list): Reset type access control.
8922         * semantics.c (decl_type_access_control): Clear
8923         current_type_lookups.
8924         (save_type_access_control): Don't save if not deferring.
8925         (skip_type_access_control, reset_type_access_control): New
8926         functions.
8927         (begin_class_definition): Do type access control for basetypes.
8928         Start deferred access control.
8929         (finish_class_definition): Resume immediate access control if
8930         this is a local class.
8932 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8934         * class.c (add_method): Use memcpy/memmove, not bcopy.
8936         * decl.c (duplicate_decls): Likewise.
8938 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8940         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
8941         not `_'.
8943 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8945         * decl.c (local_names): Define.
8946         (push_local_name): New.
8947         (grok_reference_init): Return init if initializing static reference
8948         variable with non-constant instead of emitting it.
8949         Move expand_static_init call to cp_finish_decl.
8950         (layout_var_decl): Call push_local_name.
8951         (maybe_commonize_var): Allow inlining functions even if they have
8952         static local variables, use comdat_linkage for them if flag_weak.
8953         (check_initializer): Call obscure_complex_init if
8954         grok_reference_init returned nonzero.
8955         (save_function_data): Clear x_local_names.
8956         (pop_cp_function_context): Free x_local_names.
8957         (mark_inlined_fns): Remove.
8958         (mark_lang_function): Mark x_local_names.
8959         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
8960         Mark inlined_fns as tree, remove call to mark_inlined_fns.
8961         * class.c (alter_access): Ensure DECL_ACCESS is never set if
8962         DECL_DISCRIMINATOR_P.
8963         * cp-tree.h (cp_language_function): Add x_local_names.
8964         (lang_decl_flags): Add discriminator into u2.
8965         (lang_decl_inlined_fns): Remove.
8966         (lang_decl): inlined_fns is now a TREE_VEC.
8967         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
8968         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
8969         TREE_VEC, not a custom structure.
8970         (optimize_function): Likewise.
8971         * mangle.c (discriminator_for_local_entity): Discriminate among
8972         VAR_DECL local entities.
8973         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
8974         is not valid.
8976 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
8978         Add support for Java interface method calls.
8979         * cp-tree.h (struct lang_type): Add java_interface flag.
8980         (TYPE_JAVA_INTERFACE): New macro.
8981         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
8982         by setting TYPE_JAVA_INTERFACE.
8983         * call.c (java_iface_lookup_fn): New static.
8984         (build_over_call): If calling a method declared in a
8985         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
8986         expression which resolves the function address.
8987         (build_java_interface_fn_ref): New function.
8989 2001-03-22  Richard Henderson  <rth@redhat.com>
8991         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
8992         * except.c: Don't include it.
8994 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8995             based on an idea from Joe Buck <jbuck@synopsys.com>
8997         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
8998         New nonterminals.
8999         (data_def, component_decl): Add reductions to bad_decl.
9001 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
9003         * method.c (do_build_assign_ref): Don't use build_modify_expr for
9004         anonymous aggregates, since they don't have assignment operator
9005         method.
9006         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
9007         assignment operators for anonymous structure fields.
9009 2001-03-21  Jason Merrill  <jason@redhat.com>
9011         * pt.c (instantiate_decl): Abort if we see a member constant
9012         instantiation that doesn't already have its initializer.
9013         Downgrade explicit instantiation without definition to pedwarn.
9015         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
9016         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
9017         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
9019         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
9020         (pending_vtables): Remove.
9021         * decl2.c (pending_vtables): Remove.
9022         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
9023         CLASSTYPE_VTABLE_NEEDS_WRITING.
9024         (import_export_class): Likewise.
9025         (init_decl2): Don't mark pending_vtables.
9026         * lex.c (handle_pragma_vtable): Just sorry.
9027         * pt.c (instantiate_class_template): Don't mess with
9028         CLASSTYPE_VTABLE_NEEDS_WRITING.
9029         (mark_class_instantiated): Likewise.
9030         * ptree.c (print_lang_type): Don't print it.
9031         * semantics.c (begin_class_definition): Don't set it.
9033         * pt.c (template_tail): Replace with last_pending_template.
9034         (maybe_templates, maybe_template_tail): Remove.
9035         (add_pending_template): Adjust.
9036         (instantiate_pending_templates): Adjust.
9038         * cp-tree.h (struct saved_scope): Remove lang_stack field.
9039         (current_lang_stack): Remove.
9040         * decl.c (maybe_push_to_top_level): Don't initialize it.
9041         (duplicate_decls): Use current_lang_depth.
9042         (xref_basetypes): Likewise.
9043         * class.c (current_lang_depth): New fn.
9044         (push_lang_context): Use more varray functionality.
9045         (pop_lang_context): Likewise.
9047         * error.c (GLOBAL_THING): Always use '__'.
9049 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
9051         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
9053         * mangle.c (mangle_decl_string): Mangle the names of overloaded
9054         operators, even when they have `extern "C"' linkage.
9056 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
9058         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
9059         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9060         where it's not necessary.
9061         (add_method): Remove optimization involving comparison of
9062         DECL_ASSEMBLER_NAME.
9063         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
9064         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9065         where it's not necessary.
9066         (check_methods): Likewise.
9067         (build_clone): Likewise.
9068         (built_vtt): Likewise.
9069         * cp-tree.h (DECL_NEEDED_P): Likewise.
9070         * decl.c (pushtag): Likewise.
9071         (duplicate_decls): Likewise.
9072         (pushdecl): Likewise.
9073         (builtin_function): Likewise.
9074         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
9075         (build_cp_library_fn): Likewise.
9076         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
9077         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9078         where it's not necessary.
9079         (make_rtl_for_nonlocal_decl): Likewise.
9080         (cp_finish_decl): Likewise.
9081         (grokfndecl): Likewise.
9082         (grokvardecl): Likewise.
9083         (grokdeclarator): Likewise.
9084         (start_function): Likewise.
9085         (cp_missing_return_ok_p): Likewise.
9086         * decl2.c (grokclassfn): Likewise.
9087         (check_classfn): Likewise.
9088         (finish_static_data_member_decl): Likewise.
9089         (grokfield): Likewise.
9090         * error.c (GLOBAL_IORD_P): Remove.
9091         (dump_global_iord): Improve output.
9092         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
9093         * except.c (nothrow_libfn_p): Summarily reject any function not in
9094         namespace-scope.
9095         * init.c (build_java_class_ref): Don't explicitly set
9096         DECL_ASSEMBLER_NAME after calling mangle_decl.
9097         * mangle.c (mangle_decl_string): Handle extern "C" functions.
9098         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
9099         * method.c (set_mangled_name_for_decl): Don't explicitly set
9100         DECL_ASSEMBLER_NAME after calling mangle_decl.
9101         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
9102         IDENTIFIER_GLOBAL_VALUE for the thunk.
9103         * pt.c (set_mangled_name_for_template_decl): Remove.
9104         (check_explicit_specialization): Don't use it.
9105         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
9106         (tsubst_friend_function): Likewise.
9107         (tsubst_decl): Likewise.
9108         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
9109         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
9110         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
9111         where it's not necessary.
9112         (tinfo_base_init): Likewise.
9113         (create_real_tinfo_var): Likewise.
9114         * search.c (looup_field_1): Likewise.
9115         * semantics.c (finish_named_return_value): Likewise.
9116         * tree.c (init_tree): Set lang_set_decl_assembler_name.
9118 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9120         Correct semantics restrictions checking in throw-expression.
9121         * except.c (is_admissible_throw_operand): New function.
9122         (build_throw): Use it.
9124 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9126         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
9127         and its ilk.
9129 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
9131         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9132         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
9133         * decl.c (duplicate_decls): Likewise.
9134         (builtin_function): Likewise.
9135         (build_library_fn): Likewise.
9136         (build_cp_library_fn): Likewise.
9137         (check_initializer): Likewise.
9138         (cp_finish_decl): Likewise.
9139         * decl2.c (grokfield): Likewise.
9140         (grok_function_init): Remove #if 0'd code.
9141         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
9142         * friend.c (do_friend): Likewise.
9143         * init.c (get_temp_regvar): Likewise.
9144         * method.c (make_thunk): Likewise.
9145         * pt.c (tsubst_friend_function): Likewise.
9146         (tsubst_decl): Likewise.
9147         (regenerate_decl_from_template): Likewise.
9148         * semantics.c (genrtl_named_return_value): Likewise.
9149         (expand_body): Likewise.
9150         (genrtl_finish_function): Likewise.
9151         * tree.c (cp_tree_equal): Likewise.
9153 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
9155         * call.c (convert_like_real): Add extra semantics to INNER
9156         parameter. Don't convert to temporary if a user conversion
9157         gives us an lvalue that we're about to bind to a reference.
9158         Set INNER to indicate pending reference binding on recursive
9159         calls.
9161 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9163         * cp/lex.c: Delete duplicate pending_lang_change.
9165 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9167         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
9168         Similarly.
9169         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
9170         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
9172 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
9174         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
9176 2001-03-08  Stan Shebs  <shebs@apple.com>
9178         * cp-tree.h (set_identifier_local_value): Remove unused decl.
9180 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
9182         * spew.c: Remove references to CPP_OSTRING.
9184 2001-03-06  Andrew Haley  <aph@redhat.com>
9186         * typeck.c (convert_arguments): Check that we have an fndecl.
9188 2001-03-05  Andrew Haley  <aph@redhat.com>
9190         * typeck.c (convert_arguments): Don't do ellipsis conversion for
9191         __built_in_constant_p.
9193 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9195         * typeck.c (build_static_cast): Allow enum to enum conversions
9196         as per DR 128.
9198 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9200         * class.c (check_field_decls): Pointers to member do not a
9201         non-pod struct make, as per DR 148.
9203 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9205         * call.c (joust): cp_pedwarn when using gnu extension concerning
9206         worst conversion sequences.
9208 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9210         * decl.c: Replace all uses of 'boolean' with 'bool'.
9212 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
9214         * lang-specs.h: Add zero initializer for cpp_spec field to
9215         all array elements that need one.  Don't put an #ifdef inside
9216         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
9217         use it.
9219 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9221         Implement using decls inside template functions.
9222         * decl2.c (validate_nonmember_using_decl): Don't special case
9223         fake_std_node in the global namespace. Don't reject early when
9224         processing a template.
9225         (do_local_using_decl): Add to statement tree. Don't do further
9226         processing when building a template.
9227         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
9229 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
9231         * decl2.c (do_nonmember_using_decl): Don't complain if we find
9232         same function. Do complain about ambiguating extern "C"
9233         declarations.
9235 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
9237         Remove floating point and complex type template constant parms.
9238         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
9239         COMPLEX_TYPE extensions.
9240         (invalid_nontype_parm_type_p): Likewise.
9242 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
9244         * except.c (call_eh_info): Revert "match_function"'s type.
9246 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
9248         Fix ctor vtable vcall offsets.
9249         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
9250         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
9251         (get_matching_base): Remove.
9252         (get_original_base): New function.
9253         (build_vtbl_initializer): Initialize vid.rtti_binfo.
9254         Use a virtual thunk for a ctor vtable with an index
9255         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
9256         primary base within a constructor vtable. Only set
9257         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
9258         when primary base has been lost.
9259         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
9261 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
9263         * call.c (joust): Ensure more_specialized()'s argument length
9264         parameter has correct value for constructors.
9266 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
9268         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
9270         * decl.c (mark_inlined_fns): Prototype.
9272 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9274         * spew.c (yylex): Correct handling of friends.
9276 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
9278         * mangle.c (write_encoding): Pass write_function_type the
9279         FUNCTION_DECL for the function being encoded.
9280         (write_function_type): Pass it along to write_bare_function_type.
9281         (write_bare_function_type): Pass it along to write_method_parms.
9282         (write_method_parms): Don't mangle the compiler-generated
9283         parameters to a constructor or destructor.
9285 2001-02-22  Andreas Jaeger  <aj@suse.de>
9287         * optimize.c: Include toplev.h for
9288         note_deferral_of_defined_inline_function prototype.
9290 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
9292         * cp-tree.h (struct lang_decl_inlined_fns): New.
9293         (struct lang_decls): Add inlined_fns.
9294         (DECL_INLINED_FNS): New macro.
9295         * optimize.c (struct inline_data): Add inlined_fns.
9296         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
9297         (inlinable_function_p): Likewise, fix typo in comment,
9298         function is not inlinable if it already inlined function currently
9299         being optimized.
9300         (expand_call_inline): Add fn to inlined_fns if necessary.
9301         (optimize_function): Initialize inlined_fns.
9302         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
9303         * decl.c (mark_inlined_fns): New function.
9304         (lang_mark_tree): Call it.
9306 2001-02-21  Jason Merrill  <jason@redhat.com>
9308         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
9309         (DECL_UNINLINABLE): Move to middle-end.
9311         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
9312         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
9313         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
9314         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
9315         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
9317         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
9318         second parm of op=.
9320 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
9322         * decl2.c (set_decl_namespace): Allow explicit instantiations in
9323         any namespace.
9325 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9327         * optimize.c (expand_call_inline): Don't walk subtrees of type
9328         nodes.
9330 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
9332         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
9333         for a destructor.
9335 2001-02-18  Jason Merrill  <jason@redhat.com>
9337         Do put the VTT parameter in DECL_ARGUMENTS.
9338         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
9339         (current_vtt_parm): New macro.
9340         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
9341         (DECL_HAS_VTT_PARM_P): New macro.
9342         (DECL_VTT_PARM): Remove.
9343         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
9344         * decl.c (duplicate_decls): Only copy the operator code if
9345         appropriate.
9346         (start_function): Set current_vtt_parm.
9347         (lang_mark_tree): Don't mark vtt_parm.
9348         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
9349         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
9350         * class.c (build_clone): Maybe remove the VTT parm.
9351         * optimize.c (maybe_clone_body): Set up the VTT parm.
9352         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
9353         * call.c (build_over_call): Just allow the VTT arg.
9354         * method.c (make_thunk): Don't set DECL_VTT_PARM.
9355         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
9356         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
9357         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
9358         * error.c (dump_function_decl): Likewise.
9359         * call.c (build_user_type_conversion_1, convert_like_real): Abort
9360         if we try to call a constructor with in-charge or VTT parms.
9361         * method.c (skip_artificial_parms_for): New fn.
9362         * call.c (add_function_candidate, build_over_call): Call it.
9363         * call.c (build_new_method_call): Use current_vtt_parm.
9364         * init.c (expand_virtual_init): Likewise.
9365         * class.c (same_signature_p): No longer static.
9366         * cp-tree.h: Declare it.
9367         * search.c (look_for_overrides_r): Use it.
9369 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9371         * cp-tree.h (new_abi_rtti_p): Remove.
9372         (name_mangling_version): Likewise.
9373         (flag_do_squangling): Likewise.
9374         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
9375         * decl.c (grokfndecl): Likewise.
9376         * decl2.c (name_mangling_version): Remove.
9377         (flag_do_squangling): Likewise.
9378         (lang_f_options): Remove `squangle'.
9379         (unsupported_options): Add `squangle'.
9380         (cxx_decode_option): Issue a warning about uses of
9381         -fname-mangling-version.
9382         (finish_file): Remove old ABI support.
9383         * pt.c (check_explicit_specialization): Likewise.
9384         (tsubst_decl): Likewise.
9385         * rtti.c (init_rtti_processing): Likewise.
9386         (build_headof): Likewise.
9387         (get_tinfo_decl_dynamic): Likewise.
9388         (tinfo_from_decl): Likewise.
9389         (build_dynamic_cast_1): Likewise.
9390         (synthesize_tinfo_var): Likewise.
9391         * init.c (build_new): Allow enumeration types for the array-bounds
9392         in a direct-new-declarator.
9394         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
9396         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
9397         TREE_PROTECTED from the template being specialized.
9399 2001-02-17  Jason Merrill  <jason@redhat.com>
9401         * decl2.c (build_artificial_parm): Set TREE_READONLY.
9403         * decl.c (bad_specifiers): Allow throw specs on things with
9404         pointer-to-function or -member-function type.
9405         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
9406         a pmf.
9408 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
9410         * call.c (check_dtor_name): Handle template names correctly.
9412 2001-02-16  Jason Merrill  <jason@redhat.com>
9414         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
9415         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
9416         * optimize.c (maybe_clone_body): Don't substitute it.
9417         * call.c (build_new_method_call): Check in_chrg instead.
9418         * init.c (expand_virtual_init): Likewise.
9420 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
9422         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
9423         class-type introduces at least a type-name.
9425 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
9427         * call.c (convert_like_real): Create a temporary for non-lvalue.
9429 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
9431         * cp-tree.h: Fix typos in comments.
9433 2001-02-16  Jason Merrill  <jason@redhat.com>
9435         * optimize.c (remap_block): If we're compiling a clone, pass the
9436         new block to insert_block.
9438 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
9440         * semantics.c (finish_asm_stmt): Robustify.
9442 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9444         * pt.c (push_template_decl_real): Don't remangle the name of a
9445         class template.
9447 2001-02-15  Jim Meyering  <meyering@lucent.com>
9449         * Make-lang.in (c++.install-common): Depend on installdirs.
9450         (c++.install-info): Likewise.
9451         (c++.install-man): Likewise.
9453 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
9455         * typeck2.c (build_m_component_ref): Robustify.
9457 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
9459         * friend.c (do_friend): Don't take the nested [template] class
9460         into account when deciding whether to warn about the friend
9461         function not referring to a template function.
9463 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
9465         * typeck.c (build_unary_op): Clarify error message.
9467 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
9469         * parse.y (component_constructor_declarator): allow optional
9470         parentheses around constructor class name.
9472 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9474         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
9475         section.
9476         * init.c (emit_base_init): Remove incorrect comment about
9477         virtual bases.
9478         * method.c (make_thunk): Fix comment alignment.
9480 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9482         Kill remnants of this is variable.
9483         * cp-tree.h (flag_this_is_variable): Remove.
9484         * decl2.c (flag_this_is_variable): Remove.
9485         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
9486         (build_vbase_path): The path is non-static, even in a cdtor.
9487         (resolves_to_fixed_type_p): Add additional return value.
9488         * search.c (init_vbase_pointers): Adjust.
9489         * tree.c (lvalue_p_1): Adjust.
9490         * typeck.c (mark_addressable): Adjust.
9492 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9494         * pt.c (unify): Don't check cv quals of array types.
9496 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
9498         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
9499         check whether we already have the type.
9501 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
9503         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
9504         * call.c (build_op_delete_call): Simplify to remove duplicate
9505         code.
9506         * class.c (clone_function_decl): Don't build the deleting variant
9507         of a non-virtual destructor.
9508         * decl.c (finish_destructor_body): Don't call delete if this is a
9509         non-virtual destructor.
9510         * init.c (build_delete): Explicitly call `operator delete' when
9511         deleting an object with a non-virtual destructor.
9513 2001-02-13  Jason Merrill  <jason@redhat.com>
9515         * lang-specs.h: Add more __EXCEPTIONS.
9517 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9519         * typeck2.c (process_init_constructor): Check
9520         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
9522 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9524         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
9525         Remove spurious information in comment. Allow further
9526         adjustments of REFERENCE_TYPE args.
9528 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
9530         * errfn.c (cp_deprecated): Tweak diagnostic text.
9531         * parse.y (new_initializer): Deprecate initializer lists
9532         extension.
9534 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
9536         Remove old ABI support.
9538 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
9540         * decl2.c (flag_vtable_thunks): Always set it to 1.
9541         (flag_new_abi): Likewise.
9542         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
9544         * Makefile.in (g++spec.o): Fix typo.
9546 2001-02-09  Jason Merrill  <jason@redhat.com>
9548         * lang-specs.h: Restore definition of __EXCEPTIONS.
9550 2001-02-08  Jason Merrill  <jason@redhat.com>
9552         * search.c (shared_member_p): New function.
9553         (lookup_field_r): Use it.
9554         * cp-tree.h (SHARED_MEMBER_P): Remove.
9556         * method.c (process_overload_item): Handle template-dependent array
9557         bounds.
9558         * pt.c (type_unification_real): If we end up with undeduced nontype
9559         parms, try again.
9561         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
9562         types.
9564         * typeck2.c (friendly_abort): Don't say anything if we have
9565         earlier errors or sorries.
9567         * decl.c (check_tag_decl): Notice attempts to redefine bool and
9568         wchar_t.  Ignore if in_system_header.
9570         * decl.c (maybe_push_cleanup_level): New fn...
9571         (start_decl_1): ...split out from here.
9572         * cvt.c (build_up_reference): Use it.
9573         * cp-tree.h: Declare it.
9575 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
9577         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
9578         spec.
9580 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
9582         * pt.c (lookup_template_class): Make sure it's a primary
9583         template or template_template_parm when called from the parser.
9584         (instantiate_template_class): Add assertion.
9586 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
9588         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
9589         from error_mark_node.
9591 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
9593         Fix specification and implementation bugs in V3 ABI
9594         construction vtables.
9595         * cp-tree.h (flag_dump_class_layout): New flag.
9596         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
9597         (BINFO_LOST_PRIMARY_P): New flag.
9598         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
9599         (BINFO_PRIMARY_MARKED_P): Rename to ...
9600         (BINFO_PRIMARY_P): ... here.
9601         (binfo_via_virtual): New prototype.
9602         * decl2.c (flag_dump_class_layout): New flag.
9603         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
9604         use `=' as a file name separator.
9605         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
9606         bases.
9607         (build_vtbl_address): If this is a virtual primary base, then
9608         get the vtbl of what it is ultimately primary for.
9609         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
9610         for BINFO_PRIMARY_P.
9611         (dfs_skip_nonprimary_vbases_markedp): Likewise.
9612         (get_shared_vbase_if_not_primary): Likewise.
9613         (dfs_get_pure_virtuals): Likewise.
9614         (expand_upcast_fixups): Likewise.
9615         (fixup_virtual_upcast_offsets): Likewise.
9616         (dfs_find_vbase_instance): Likewise.
9617         (find_vbase_instance): Likewise.
9618         (binfo_from_vbase): Adjust comment to reflect reality.
9619         (binfo_via_virtual): New function.
9620         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
9621         for binfo walking during VTT construction.
9622         (dfs_mark_primary_bases): Remove.
9623         (force_canonical_binfo_r): New function.
9624         (force_canonical_binfo): New function.
9625         (mark_primary_virtual_base): New function.
9626         (mark_primary_bases): Walk in inheritance graph order, use
9627         mark_primary_virtual_base.
9628         (determine_primary_base): Use some more intermediate variables.
9629         (dfs_find_final_overrider): Don't check for overriding along a
9630         virtual path.
9631         (dfs_modify_vtables): Walk into primary virtual bases too.
9632         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
9633         (build_base_fields): Likewise.
9634         (dfs_set_offset_for_unshared_vbases): Likewise.
9635         (layout_virtual_bases): Likewise.
9636         (end_of_class): Likewise.
9637         (finish_struct_1): Call dump_class_hierarchy, if requested.
9638         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
9639         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
9640         (dump_class_hierarchy): Add file parameter. Append to file, if
9641         required.
9642         (finish_vtbls): Adjust accumulate_vtbl_inits call.
9643         Use canonical base for virtual bases.
9644         (build_vtt): Add more comments. Adjust build_vtt_inits call.
9645         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
9646         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
9647         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
9648         virtual VTTs.
9649         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
9650         from DATA.  We want virtual primary bases and all bases via virtual.
9651         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
9652         virtual base when not a construction vtable.
9653         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
9654         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
9655         Use canonical bases when processing virtual bases.
9656         (accumulate_vtbl_inits): We're interested in any base via a
9657         virtual path.
9658         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
9659         within a construction vtable, determine what is being overridden.
9660         (build_vtbl_initializer): Add more comments
9661         (add_vcall_offset_vtbl_entries_1): Adjust comment.
9662         (build_rtti_vtbl_entries): Check if the base has lost its
9663         primary.
9665 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
9667         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
9669 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9671         * decl.c (pushdecl): Call abort instead of fatal.
9672         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
9673         * init.c (build_new_1): Likewise.
9674         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
9675         * decl.c (build_typename_type): hash_table_init now returns void.
9676         decl.c (init_decl_processing): Make an error non-fatal.
9678 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
9680         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
9681         Document.
9682         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9683         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9684         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9685         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9686         * decl.c (maybe_commonize_var): Use the new name-mangling where
9687         appropriate.
9688         * decl2.c (comdat_linkage): Enhance comments.  Make all
9689         compiler-generated things static, if COMDAT is not available.
9690         (get_tinfo_decl): Do not make typeinfo objects that belong in the
9691         library COMDAT.
9692         (tinfo_base_init): Use the correct mangled name for typeinfo
9693         strings, and push them into the global scope.
9694         (typeinfo_in_lib_p): New function.
9695         (synthesize_tinfo_var): Use it.
9696         (create_real_tinfo_var): Likewise.
9698 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
9700         * decl.c (push_class_binding): Use context_for_name_lookup instead
9701         of CP_DECL_CONTEXT.
9702         * search.c (context_for_name_lookup): Remove static.  Check for NULL
9703         context in the loop.
9704         * cp-tree.h (context_for_name_lookup): Add prototype.
9706 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
9708         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
9709         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
9710         Remove.
9711         * call.c (convert_class_to_reference, build_user_type_conversion_1,
9712         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
9714 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
9716         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
9717         of macros used when compiling g++spec.c.
9718         * g++spec.c (lang_specific_driver): Link with the shared
9719         libgcc by default.
9721 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9723         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
9724         make_reference_declarator, make_call_declarator), method.c
9725         (implicitly_declare_fn), parse.y (namespace_using_decl,
9726         notype_unqualified_id, expr_or_declarator, new_type_id,
9727         after_type_declarator, direct_after_type_declarator,
9728         notype_declarator, complex_notype_declarator,
9729         complex_direct_notype_declarator, qualified_id,
9730         notype_qualified_id, overqualified_id, direct_new_declarator,
9731         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
9732         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
9733         instead of build_parse_node.
9735 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9737         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
9738         (minus_one_node): Moved to top level gcc directory.  Renamed
9739         to integer_minus_one_node.
9741         * init.c (init_init_processing): Don't set minus_one_node.
9742         (build_vec_init): Use integer_minus_one_node.
9744         * rtti.c (get_tinfo_decl_dynamic): Likewise.
9746 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
9748         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
9749         identical and they would be replaced with constant, remove
9750         MODIFY_EXPR from the tree.
9752 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9754         * Make-lang.in: Remove all dependencies on defaults.h.
9755         * call.c: Don't include defaults.h.
9756         * decl.c: Likewise.
9757         * decl2.c: Likewise.
9758         * except.c: Likewise.
9759         * pt.c: Likewise.
9760         * rtti.c: Likewise.
9761         * tree.c: Likewise.
9762         * typeck.c: Likewise.
9764 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
9766         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
9767         operators even in "C" linkage.
9768         * method.c (set_mangled_name_for_decl): Likewise.
9769         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
9770         overloaded operators in "C" linkage.
9772 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9774         * pt.c (tsubst_decl): Remove IN_DECL parameter.
9775         (tsubst_arg_types): Check parameter is not void.
9776         (tsubst): Adjust tsubst_decl call.
9778 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
9780         * call.c (add_builtin_candidate): Quote std properly, from
9781         previous change.
9783 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9785         * pt.c (check_explicit_specialization): Clone constructors and
9786         destructors.
9788 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9790         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
9791         indicates anything special about template depth. Make sure we
9792         only count the user visible template classes.
9794 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9796         * call.c (build_conv): Typo in comment.
9797         (add_builtin_candidate): Add more explanation.
9798         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
9799         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
9800         when we have enumeral types.
9801         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
9802         candidates for relops and eqops.
9803         (joust): Simplify control flow. Allow a non-template user
9804         function to hide a builtin.
9806 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
9808         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
9809         (more_specialized): Add deduction parameter.
9810         * call.c (joust): Adjust more_specialized call.
9811         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
9812         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
9813         (get_bindings_order): Remove.
9814         (get_bindings_real): Add DEDUCE parameter.
9815         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
9816         REFERENCE_TYPE jig for DEDUCE_ORDER.
9817         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
9818         maybe_adjust_types_for_deduction.
9819         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
9820         directly.
9821         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
9822         (check_cv_quals_for_unify): Use new unify qualifier flags.
9823         (unify): Clear new unify qualifier flags.
9824         (get_bindings_real): Add DEDUCE parameter.
9825         (get_bindings): Adjust call to get_bindings_real.
9826         (get_bindings_overload): Likewise.
9827         (most_specialized_instantiation): Adjust call to
9828         more_specialized.
9830 2001-01-19  Jason Merrill  <jason@redhat.com>
9832         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
9834         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
9835         -fnew-abi.
9837 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
9839         * decl2.c (arg_assoc_class): Fix double iteration logic.
9841 2001-01-19  Jason Merrill  <jason@redhat.com>
9843         * init.c (build_delete): Always call convert_force to strip cv-quals.
9845         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
9846         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
9847         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
9849 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9851         * search.c (get_vbase_1): Count only virtual bases.
9853 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9855         * class.c (duplicate_tag_error): Robustify flag clearing.
9857 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9859         * cp-tree.h (lookup_template_class): Add complain parm.
9860         * decl.c (lookup_namespace_name): Adjust call to
9861         lookup_template_class.
9862         (make_typename_type): Likewise.
9863         * semantics.c (finish_template_type): Likewise.
9864         * pt.c (lookup_template_class): Add complain parm. Adjust.
9865         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
9866         (tsubst): Likewise.
9868 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9870         * pt.c (copy_default_args_to_explicit_spec): Preserve
9871         object's CV quals. Reorganize.
9873 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9875         * typeck.c (build_modify_expr): Say `initialization' for
9876         INIT_EXPRs.
9877         * init.c (build_default_init): Convert to enumeral type, if
9878         needed.
9880 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
9882         * parse.y (nomods_initdcl0): Properly set things up for
9883         initdcl0_innards.
9885 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9887         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
9888         (type_unification_real): Set it.
9889         (unify): Use it.
9891 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9893         * decl.c (finish_destructor_body): Convert to vbase pointer here.
9895 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9897         * semantics.c (begin_class_definition): Check we're not inside a
9898         template parm list.
9900 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9902         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
9903         BASELINK_P.
9905 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9907         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
9908         * call.c (build_over_call): Add comment.
9910 2001-01-16 Daniel Berlin <dberlin@redhat.com>
9912         * cvt.c (ocp_convert): Handle vector type conversion
9913         * typeck2.c (digest_init): Handle vector type initializations
9915 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
9917         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
9918           was given.
9920 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9922         * pt.c (check_nontype_parm): Rename to ...
9923         (invalid_nontype_parm_type_p): ... here.
9924         (process_template_parm): Adjust.
9925         (convert_template_argument): Adjust.
9927 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9929         * pt.c (check_nontype_parm): New function.
9930         (process_template_parm): Use it.
9931         (convert_template_argument): Use it.
9932         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
9933         member.
9935 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
9937         * tree.c: Add defaults.h
9938         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
9939         * Make-lang.in (cp/tree.o): Add defaults.h.
9941 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9943         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
9945 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9947         * g++.1: Change to be ".so man1/gcc.1".
9949 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9951         * Make-lang.in (c++.info, c++.install-info): Build and install g++
9952         internals info.
9953         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
9954         ($(srcdir)/cp/g++int.info): New target.
9955         * gxxint.texi: Add info directory entry.  Use @@ in email address.
9956         * .cvsignore: Update.
9958 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9960         * typeck.c (build_c_cast): Do template processing earlier.
9961         Always pedwarn on array casts.
9963 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9965         * friend.c (make_friend_class): Make sure a templated class is
9966         actually a template.
9968 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9970         * decl2.c (get_guard): Set linkage from guarded decl.
9972 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9974         * call.c (convert_default_arg): Check for unprocessed
9975         DEFAULT_ARG.
9976         * cp-tree.h (replace_defarg): Move to spew.c.
9977         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
9978         spew.c, which is where they really are.
9979         (done_pending_defargs): Declare.
9980         (unprocessed_defarg_fn): Declare.
9981         * decl.c (replace_defarg): Move to spew.c
9982         * parse.y (structsp): Call done_pending_defargs.
9983         * spew.c (defarg_fns): Rearrange list structure.
9984         (defarg_fnsdone): New static variable.
9985         (defarg_depfns): New static variable.
9986         (init_spew): Adjust.
9987         (add_defarg_fn): Store the type in TREE_TYPE.
9988         (do_pending_defargs): Detect and deal with ordering constraints
9989         and circularity.
9990         (done_pending_defargs): New function.
9991         (unprocessed_defarg_fn): New function.
9992         (replace_defarg): Moved from decl.c. Robustify. Don't save
9993         if circularity detected.
9995 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9997         * pt.c (unify): Check array has a domain, before checking
9998         whether it is variable sized.
10000 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10002         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
10003         parameters with pointers to arrays of unknown bound.
10005 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
10007         * parse.y (template_parm_header, template_spec_header): New
10008         reductions. Split out from ...
10009         (template_header): ... here. Use them.
10010         (template_template_parm): Use template_parm_header.
10011         * semantics.c (finish_template_template_parm): Add assert.
10013 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10015         * mangle.c (write_builtin_type): Fix thinko.
10017         * pt.c (copy_default_args_to_explicit_spec_1): New function.
10018         (copy_default_args_to_explicit_spec): Likewise.
10019         (check_explicit_specialization): Use it.
10021         * class.c (finish_struct_1):  Remove last argument in call to
10022         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10023         * decl.c (builtin_function): Likewise.
10024         (build_cp_library_fn): Likewise.
10025         (check_initializer): Likewise.
10026         (make_rtl_for_nonlocal_decl): Likewise.
10027         (cp_finish_decl): Likewise.
10028         (start_function): Likewise.
10029         * decl2.c (finish_anon_union): Likewise.
10030         * friend.c (do_friend): Likewise.
10031         * init.c (build_java_class_ref): Likewise.
10032         * method.c (make_thunk): Likewise.
10033         * pt.c (tsubst_friend_function): Likewise.
10034         * semantics.c (expand_body): Likewise.
10036 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10038         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
10039         looking at DECL_CLONED_FUNCTION for non-functions.
10041 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10043         * error.c (dump_template_parameter): Use parm to determine how
10044         to print default value.
10046 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10048         * class.c (duplicate_tag_error): Clear more flags.
10050 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
10052         * call.c (build_new_method_call): Use binfo_for_vbase.
10054 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
10056         * cp-tree.h (flag_cond_mismatch): Don't declare.
10057         * decl2.c (flag_cond_mismatch): Don't define.
10058         (lang_f_options): Remove cond-mismatch.
10059         (unsupported_options): Add cond-mismatch.
10061 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
10063         * class.c (handle_using_decl): Reject using of constructor name
10064         of sourcing class. Allow injecting of a method with same name as
10065         nested class. Fixup error messages.
10067 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
10069         * decl2.c (lang_decode_option): Handle -Wformat=2.
10071 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10073         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
10074         initialized_in_class.
10075         (DECL_DEFINED_IN_CLASS_P): Rename to ...
10076         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
10077         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
10078         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
10079         * pt.c (check_default_tmpl_args): Adjust for
10080         DECL_INITIALIZED_IN_CLASS_P.
10081         (instantiate_class_template): Likewise.
10082         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
10084         * class.c (finish_struct): Constify saved_filename.
10086 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10088         * class.c (duplicate_tag_error): Adjust diagnostic.
10089         (finish_struct): Locally set location to start of struct.
10090         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
10092 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
10094         * decl.c (struct binding_level): Adjust class_shadowed comments
10095         to reflect reality.
10096         (push_class_level_binding): Adjust comments to reflect reality.
10097         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
10098         Don't set TREE_VALUE on the class_shadowed list.
10100 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10102         * decl2.c (acceptable_java_type): Allow references too.
10103         * init.c (build_java_class_ref): When using the new ABI, search
10104         `class$' and have it mangled with `mangle_decl.'
10105         * mangle.c (write_java_integer_type_codes): New function.
10106         (write_builtin_type): Detect and mangle Java integer and real
10107         types.
10109 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
10111         * decl2.c (grokfield): Don't accept `asm' specifiers for
10112         non-static data members.
10114 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10116         * expr.c (cplus_expand_expr): Don't reset `target'.
10118 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
10120         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
10122 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10124         * parse.y (template_datadef): Check for error_mark_node.
10126 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
10128         * cp-tree.def (DEFAULT_ARG): Make `x' class.
10130 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10132         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
10133         (record_builtin_type): Make non-static.
10134         (flag_short_double): Don't declare.
10135         (init_decl_processing): Remove the creation of many tree nodes now
10136         in c_common_nodes_and_builtins.
10137         (build_void_list_node): New function.
10138         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
10139         * cp-tree.h (flag_short_wchar): Don't declare.
10141 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
10143         * call.c (build_conv): Don't use build1 for USER_CONV.
10144         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
10146 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10148         * lex.c (lang_init): Call c_common_lang_init.
10150 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10152         * search.c (lookup_fnfields_here): Remove.
10153         (look_for_overrides_r): Use lookup_fnfields_1.
10154         Ignore functions from using declarations.
10156 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
10158         Implement exceptions specifiers for implicit member functions.
10159         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
10160         * method.c (synthesize_exception_spec): New function.
10161         (locate_dtor, locate_ctor, locate_copy): New functions.
10162         (implicitly_declare_fn): Generate the exception spec too.
10163         * search.c (check_final_overrider): Check artificial functions
10164         too.
10165         * typeck2.c (merge_exception_specifiers): New function.
10167 2001-01-03  Jason Merrill  <jason@redhat.com>
10169         * init.c (build_default_init): New fn.
10170         (perform_member_init): Split out from here.
10171         (build_new_1): Use it.  Simplify initialization logic.
10172         (build_vec_init): Take an array, rather than a pointer and maxindex.
10173         Speed up simple initializations.  Don't clean up if we're assigning.
10174         * cp-tree.h: Adjust.
10175         * decl2.c (do_static_initialization): Remove TREE_VEC case.
10176         * parse.y (new_initializer): Return void_zero_node for ().
10177         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
10178         * typeck2.c (digest_init): Only complain about user-written
10179         CONSTRUCTORs.
10181 2000-12-22  Mike Stump  <mrs@wrs.com>
10183         * decl2.c: (max_tinst_depth): Increase to 50.
10185 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
10187         * class.c (invalidate_class_lookup_cache): Zero the
10188         previous_class_values.
10189         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
10190         TREE_INT_CST_HIGH.
10191         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
10192         * decl.c (free_bindings): New variable.
10193         (push_binding): Don't create a new binding if we have one on the
10194         free list.
10195         (pop_binding): Put old bindings on the free list.
10196         (init_decl_processing): Use size_int, not build_int_2.
10197         Register free_bindings as a GC root.
10198         (cp_make_fname_decl): Use size_int, not build_int_2.
10199         (push_inline_template_parms_recursive): Likewise.
10200         (end_template_parm_list): Likewise.
10201         (for_each_template_parm): Do not use walk_tree_without_duplicates.
10202         (tsubst_template_parms): Use size_int, not build_int_2.
10203         (tsubst): Likewise.
10204         * rtti.c (get_vmi_pseudo_type_info): Likewise.
10206 2001-01-02  Richard Henderson  <rth@redhat.com>
10208         * parse.y (asm): Set ASM_INPUT_P.
10210 2001-01-02  Jason Merrill  <jason@redhat.com>
10212         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
10213         for v3 ABI.
10215         * typeck.c (cp_truthvalue_conversion): New fn.
10216         * cvt.c (ocp_convert): Use it.
10218         * cp-tree.h: Lose c-common.c decls.
10220         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
10221         * cvt.c (convert_to_void): Use type_unknown_p.
10223         * typeck.c (strip_all_pointer_quals): Also strip quals from
10224         pointer-to-member types.
10226         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
10227         parse.y as C.
10229         * call.c (build_new_method_call): Do evaluate the object parameter
10230         when accessing a static member.
10231         * typeck.c (build_component_ref): Likewise.
10233 2001-01-02  Andreas Jaeger  <aj@suse.de>
10235         * decl.c (cp_missing_noreturn_ok_p): New.
10236         (init_decl_processing): Set lang_missing_noreturn_ok_p.
10238 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
10240         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
10242 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
10244         * class.c (pushclass): Remove #if 0'd code.
10245         * cp-tree.h (overload_template_name): Remove.
10246         * decl.c (store_bindings): Simplify.
10247         (pop_from_top_level): Likewise.
10248         * pt.c (overload_template_name): Remove.
10249         (instantiate_decl): Don't call push_to_top_level if it's not
10250         needed.
10252 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
10254         * pt.c (register_local_specialization): Don't return a value.
10255         (lookup_template_class): Use move-to-front heuristic when looking
10256         up template instantiations.
10257         (instantiate_decl): Only push_to_top_level when we're actually
10258         going to instantiate the template.
10260 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
10262         * search.c (binfo_for_vtable): Return least derived class, not
10263         most.  Handle secondary vtables.
10265 2000-12-22  Jason Merrill  <jason@redhat.com>
10267         * pt.c (more_specialized): Don't optimize len==0.
10268         (fn_type_unification): If we're adding the return type, increase len.
10270         * typeck.c (build_binary_op): Fix pmf comparison logic.
10272         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
10273         DECL_STATIC_FUNCTION_P.
10275         * semantics.c (genrtl_finish_function): Don't try to jump to
10276         return_label unless it exists.
10278         In partial ordering for a call, ignore parms for which we don't have
10279         a real argument.
10280         * call.c (joust): Pass len to more_specialized.
10281         (add_template_candidate_real): Strip 'this', pass len.
10282         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
10283         (get_bindings_order): New fn.  Pass len down.
10284         (get_bindings_real): Strip 'this', pass len.
10285         (fn_type_unification): Likewise.
10286         (type_unification_real): Succeed after checking 'len' args.
10287         (most_specialized_instantiation): Lose explicit_args parm.
10288         * class.c (resolve_address_of_overloaded_function): Strip 'this',
10289         pass len.
10291 2000-12-21  Jason Merrill  <jason@redhat.com>
10293         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
10294         DECL_TEMPLATE_RESULT.
10296         * search.c (lookup_field_r): Call lookup_fnfields_1, not
10297         lookup_fnfields_here.
10299         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
10301         * call.c (build_object_call): Also allow conversions that return
10302         reference to pointer to function.
10303         (add_conv_candidate): Handle totype being ref to ptr to fn.
10304         (build_field_call): Also allow members of type reference to function.
10305         Lose support for calling pointer to METHOD_TYPE fields.
10307         * error.c (dump_expr): Handle *_CAST_EXPR.
10309         * typeck2.c (build_scoped_ref): Always convert to the naming class.
10311         * tree.c (break_out_cleanups): Lose.
10312         * cp-tree.h: Remove prototype.
10313         * typeck.c (build_component_ref): Don't break_out_cleanups.
10314         (build_compound_expr): Likewise.
10315         * semantics.c (finish_expr_stmt): Likewise.
10317 2000-12-20  Richard Henderson  <rth@redhat.com>
10319         * cp-tree.h: Update declarations.
10320         * decl.c (finish_case_label): Return the new stmt node.
10321         * semantics.c (finish_goto_stmt): Likewise.
10322         (finish_expr_stmt, finish_return_stmt): Likewise.
10323         (finish_break_stmt, finish_continue_stmt): Likewise.
10324         (finish_asm_stmt): Likewise.
10325         * parse.y (already_scoped_stmt): Set STMT_LINENO.
10326         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
10327         (simple_if, simple_stmt): Return the new stmt node.
10328         (save_lineno): New.
10330 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
10332         * cp-tree.h: Don't declare warn_long_long.
10334 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10336         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
10337         IS_AGGR_TYPE.
10339 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10341         * pt.c (unify): Handle when both ARG and PARM are
10342         BOUND_TEMPLATE_TEMPLATE_PARM.
10344 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10346         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
10347         DECL_TEMPLATE_PARM_P.
10349 2000-12-15  Jason Merrill  <jason@redhat.com>
10351         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
10353         * init.c (build_new_1): Don't strip quals from type.
10355         * decl.c (pushdecl): Don't check for linkage on a non-decl.
10357         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
10359         * call.c (build_new_function_call): Lose space before paren in
10360         error message.
10361         (build_new_method_call): Likewise.
10363         * typeck2.c (build_m_component_ref): Propagate quals from datum.
10365 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10367         * pt.c (check_explicit_specialization): Propagate default
10368         function arguments to explicit specializations.
10370 2000-12-13  DJ Delorie  <dj@redhat.com>
10372         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
10373         and <? operators.
10375 2000-12-08  Jason Merrill  <jason@redhat.com>
10377         * error.c (dump_function_name): Don't let the user see __comp_ctor.
10379         Clean up copy-initialization in overloading code.
10380         * call.c (build_user_type_conversion_1): Die if we are asked to
10381         convert to the same or a base type.
10382         (implicit_conversion): Avoid doing so.  Lose reference binding code.
10383         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
10384         direct-initialization.  Also do direct-init part of copy-init.
10385         (build_user_type_conversion): Don't provide context to convert_like.
10386         * cvt.c (ocp_convert): build_user_type_conversion will now provide
10387         the constructor call for copy-init.
10389         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
10390         instantiation of a member template.
10391         (do_decl_instantiation): Not here.
10393 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10395         * class.c (check_field_decls): Don't special case anonymous
10396         fields in error messages.
10397         (note_name_declared_in_class): Use %D on diagnostic.
10399         * tree.c (pod_type_p): Use strip_array_types.
10400         (cp_valid_lang_attribute): Likewise.
10401         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
10402         multiple evaluations.
10403         (cp_has_mutable_p): Use strip_array_types.
10405 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
10407         * cp-tree.h (sufficient_parms_p): Declare new function.
10408         * call.c (sufficient_parms_p): New function, broken out of ...
10409         (add_function_candidate): ... here. Use it.
10410         (add_conv_candidate): Use it.
10411         * decl.c (grok_ctor_properties): Use it.
10413 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
10415         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
10417 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10419         * decl2.c (lang_decode_option): Handle -Wformat-security.
10421 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10423         * pt.c (verify_class_unification): New function.
10424         (get_class_bindings): Use it.
10425         (try_class_unification): Tidy.
10426         (unify): Handle when argument of a template-id is not
10427         template parameter dependent.
10428         (template_args_equal): Handle when TREE_CODE's do not match.
10430 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
10432         * lang-specs.h (c++): When invoking the stand-alone preprocessor
10433         for -save-temps, pass all relevant -Defines to it, and then don't
10434         pass them to cc1plus.
10436 2000-12-05  Will Cohen  <wcohen@redhat.com>
10438         * decl.c (finish_case_label): Cleared
10439         more_cleanups_ok in surrounding function scopes.
10440         (define_label): Likewise.
10442 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10444         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
10445         (get_matching_virtual): Remove.
10446         (look_for_overrides): Declare new function.
10447         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
10448         DECL_VINDEX here.
10449         * class.c (check_for_override): Move base class iteration code
10450         to look_for_overrides.
10451         * search.c (next_baselink): Remove.
10452         (get_virtuals_named_this): Remove.
10453         (get_virtual_destructor): Remove.
10454         (tree_has_any_destructors_p): Remove.
10455         (struct gvnt_info): Remove.
10456         (check_final_overrider): Remove `virtual' from error messages.
10457         (get_matching_virtuals): Remove. Move functionality to ...
10458         (look_for_overrides): ... here, and ...
10459         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
10460         to be overriding.
10462 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
10464         * typeck.c (get_delta_difference): If via a virtual base,
10465         return zero.
10466         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
10467         adjustment.
10469 2000-12-04  Richard Henderson  <rth@redhat.com>
10471         * error.c (dump_tree): Use output_add_string not OB_PUTS.
10473 2000-12-04  Jason Merrill  <jason@redhat.com>
10475         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
10476         (write_builtin_type): Pass intSI_type_node and the like through
10477         type_for_mode.
10478         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
10479         Pass intSI_type_node and the like through type_for_mode.
10480         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
10481         * pt.c (tsubst, unify): Likewise.
10482         * tree.c (walk_tree): Likewise.
10483         * error.c (dump_type): Likewise.
10484         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
10486         * Make-lang.in: Tweak top comment for emacs.
10487         (cp/TAGS): Restore.
10489         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
10491         * class.c (clone_function_decl): Robustify.
10493 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
10495         * decl.c (store_bindings): Only search in the non modified
10496         old_bindings for duplicates.
10498 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10500         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
10501         TYPE_POLYMORPHIC_P.
10503         * typeck.c (build_static_cast): Remove unused variable.
10505 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10507         * pt.c: Fix typo in comment.
10509 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10511         * decl2.c (warn_format): Remove definition.
10512         (lang_decode_option): Handle -Wformat-nonliteral,
10513         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
10515 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
10517         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
10518         (init_decl_processing): Don't create string_type_node,
10519         const_string_type_node, wint_type_node, intmax_type_node,
10520         uintmax_type_node, default_function_type, ptrdiff_type_node and
10521         unsigned_ptrdiff_type_node.  Adjust position of call to
10522         c_common_nodes_and_builtins.
10523         (identifier_global_value): New function.
10525 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
10527         * call.c (standard_conversion): Reject pointer to member
10528         conversions from ambiguous, inaccessible or virtual bases.
10529         * typeck.c (build_static_cast): Don't check pointers to members
10530         specially.
10532 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10534         * method.c (do_build_copy_constructor): Preserve cv
10535         qualifications when accessing source object members.
10536         (do_build_assign_ref): Likewise. Remove separate diagnostics for
10537         unnamed fields.
10539 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10541         * method.c (do_build_assign_ref): Construct appropriately
10542         CV-qualified base reference. Don't allow const casts in base
10543         conversion.
10545 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
10547         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
10548         incomplete return type.
10550 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10552         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
10553         * semantics.c (finish_base_specifier): Accept a _TYPE not a
10554         _DECL.
10556 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10558         * spew.c (yyerror): Cope if yylval.ttype is NULL.
10560 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10562         * decl.c (grokdeclarator): Diagnose undefined template contexts.
10564 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10566         * decl.c (grokdeclarator): Do type access control on friend
10567         class.
10569 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
10571         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
10572         bison parser ickiness.
10573         * pt.c (tsubst_friend_function): Enter namespace scope when
10574         tsubsting the function name.
10575         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
10577 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
10579         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
10580         * cvt.c (cp_convert_to_pointer): Add force parameter.
10581         Allow conversions via virtual base if forced.
10582         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
10583         (ocp_convert): Likewise.
10584         * search.c (binfo_from_vbase): Return the virtual base's binfo.
10585         * typeck.c (get_delta_difference): Adjust handling of virtual
10586         bases.
10588 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
10590         * tree.c (struct list_hash): Remove.
10591         (list_hash_table): Make it be an htab.
10592         (struct list_proxy): New type.
10593         (list_hash_eq): New function.
10594         (list_hash_pieces): Renamed from ...
10595         (list_hash): ... this.
10596         (list_hash_lookup): Remove.
10597         (list_hash_add): Remove.
10598         (hash_tree_cons): Use the generic hashtable.
10599         (mark_list_hash): Remove.
10600         (init_tree): Create the hashtable.
10602 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
10604         * method.c (build_mangled_C9x_name): Rename to
10605         build_mangled_C99_name.  Change C9X references in comments to
10606         refer to C99.
10608 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10610         * parse.y (unary_expr): Move VA_ARG from here ...
10611         (primary): ... to here.
10613 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
10615         * semantics.c (finish_id_expr): If type is error_mark, return
10616         error_mark.
10618 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
10620         * pt.c (lookup_template_class): Simplify loop exit constructs.
10621         Cope when there is no partial instantiation of a template
10622         template member.
10624 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
10626         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
10628 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
10630         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
10631         prefix.
10633         * pt.c (do_decl_instantiate): Explicitly clone constructors and
10634         destructors that haven't already been cloned.
10636 2000-11-20  Richard Henderson  <rth@redhat.com>
10638         * parse.y (yyparse_1): Rename the parser entry point.
10640 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
10642         * mangle.c (write_name): Use <unscoped-name> for names directly in
10643         function scope.
10644         (write_unscoped_name): Accept names directly in function scope.
10646 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
10648         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
10649         * parse.y (extdef): Add EXPORT reduction.
10650         * spew.c (yylex): Don't skip export here.
10652 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
10654         * decl.c (init_decl_processing): Correct name of pure virtual
10655         function under the new ABI.
10656         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
10657         (throw_bad_typeid): Likewise for bad typeid function.
10659 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
10661         * decl.c (grokparms): Don't even function types of `void' type,
10662         either.
10663         * mangle.c (write_type): Don't crash when confronted with the
10664         error_mark_node.
10666         * decl.c (grokparms): Don't create parameters of `void' type.
10668 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
10670         * lex.c (mark_impl_file_chain): Delete.
10671         (init_parse): Remove call to ggc_add_string_root.  No need to
10672         ggc_strdup a string constant.  Do not add impl_file_chain to GC
10673         roots.
10674         (handle_pragma_implementation): No need to ggc_strdup main_filename.
10676 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10678         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
10680 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10682         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
10683         * decl.c (grokdeclarator): Don't reject void parms here.
10684         (require_complete_types_for_parms): Simplify, use
10685         complete_type_or_else.
10686         (grokparms): Remove bitrot. Remove funcdef parm.
10687         Deal with ellipsis parm lists here.
10688         * semantics.c (finish_parmlist): Don't append void_list_node
10689         here. Set PARMLIST_ELLIPSIS_P.
10691 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10693         * typeck2.c (incomplete_type_error): Reorganize to avoid
10694         excessive diagnostics.
10696 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
10698         * lex.c (struct impl_files, internal_filename): Constify a char *.
10700 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
10702         * mangle.c (write_special_name_constructor): Don't generate
10703         assembler junk when confronted with an old-style constructor.
10704         (write_special_name_destructor): Likewise.
10705         (mangle_decl_string): Do it here instead.
10707 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
10709         * call.c (op_error): Make error messages clearer.
10711 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
10713         * decl.c (wrapup_globals_for_namespace): Don't mark things
10714         TREE_ASM_WRITTEN when they're not.
10716 2000-11-15  Jason Merrill  <jason@redhat.com>
10718         * typeck2.c (friendly_abort): Uncount the error before handing
10719         off to fancy_abort.
10721 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
10723         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
10725 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
10727         * class.c (build_vtbl_initializer): Fix typo in comment.
10728         * typeck.c (expr_sizeof): Don't crash on errors.
10730 2000-11-14  Jim Wilson  <wilson@redhat.com>
10732         * lang-specs.h: Add %2 after %(cc1_options).
10734 2000-11-14  Richard Henderson  <rth@redhat.com>
10736         * typeck.c (c_sizeof): Be strict about casting result value
10737         back to c_size_type_node.
10738         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
10740 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10742         * typeck.c (build_unary_op): Use boolean_increment from
10743         c-common.c, moving the relevant code there.
10745 2000-11-11  Jason Merrill  <jason@redhat.com>
10747         * typeck.c (mark_addressable): Don't call put_var_into_stack.
10749         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
10750         in inlines.
10752 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10754         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
10755         * lex.c (copy_lang_decl): Likewise.
10757 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
10759         * dump.c (cp_dump_tree): Don't dump function bodies here.
10761         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
10762         (dump.o): Update dependency list.
10763         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
10764         (flag_dump_translation_unit): Likewise.
10765         (CP_TYPE_QUALS): Adjust definition.
10766         (DECL_C_BIT_FIELD): Remove.
10767         (SET_DECL_C_BIT_FIELD): Likewise.
10768         (CLEAR_DECL_C_BIT_FIELD): Likewise.
10769         (add_maybe_template): Likewise.
10770         (strip_array_types): Likewise.
10771         (dump_node_to_file): Likewise.
10772         (cp_dump_tree): New function.
10773         * decl.c (init_decl_processing): Set lang_dump_tree.
10774         * decl2.c (flag_dump_translation_unit): Remove.
10775         * dump.c: Move most of it to ../c-dump.c.
10776         (cp_dump_tree): New function.
10777         * pt.c (add_maybe_template): Remove.
10778         * typeck.c (strip_array_types): Likewise.
10780 2000-11-07  Eric Christopher  <echristo@redhat.com>
10782         * decl.c (init_decl_processing): Change definition of
10783         __wchar_t to wchar_t.  Remove artificial declaration of
10784         wchar_t.
10785         * lex.c: Change instances of __wchar_t to wchar_t.
10787 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
10789         * lex.c (do_identifier): Don't lookup_name for operators.
10790         * parse.y (operator): Save looking_for_typename.
10791         (unoperator): Restore it.
10792         * spew.c (frob_opname): Use nth_token for lookahead.
10794 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
10796         * decl.c (grok_op_properties): Always use coerce_new_type and
10797         coerce_delete_type.
10798         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
10799         exception specification. Tidy up.
10800         (coerce_delete_type): Preserve exception specification. Tidy up.
10802 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10804         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
10805         (push_binding_level), error.c (cp_tree_printer), pt.c
10806         (process_partial_specialization, tsubst_template_arg_vector),
10807         search.c (lookup_member): Use memset () instead of bzero ().
10809 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
10811         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
10813 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10815         * Make-lang.in (c++.distdir): Remove.
10817 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
10819         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
10820         declarations from different namespaces to be combined.
10822 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
10824         * decl.c: Include tm_p.h.
10826 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10828         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
10830 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10832         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
10833         (build_overload_value), repo.c (open_repo_file), xref.c
10834         (open_xref_file): Use strchr () and strrchr () instead of index ()
10835         and rindex ().
10837 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
10839         * call.c (build_over_call): Call fold on the CALL_EXPR.
10841 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
10843         * error.c (dump_template_decl): Separate template hearders with
10844         space not comma.
10846 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
10848         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
10849         TS_* flags with corresponding TFF_*.  Adjust prototypes of
10850         functions (which used to take a tree_string_flags) to take an int.
10852         * cp-tree.h (enum tree_string_flags): Remove
10853         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
10854         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
10855         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10856         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10857         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
10858         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
10859         (type_as_string, decl_as_string, expr_as_string,
10860         context_as_string): Adjust prototype.
10862         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
10863         instead of TS_PLAIN.
10865         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
10866         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
10867         plain `0'.
10869 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
10871         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
10872         (linkage_kind): New enumeration.
10873         (decl_linkage): New function.
10874         * decl2.c (comdat_linkage): Extend comment.
10875         * error.c (dump_function_decl): Print the arguments used to
10876         instantiate a template, even when not printing the type of the
10877         function.
10878         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
10879         not TREE_PUBLIC, to test for external linkage.
10880         * tree.c (decl_linkage): New function.
10882 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
10884         * pt.c (instantiate_decl): Always instantiate static data members
10885         initialized in-class.
10887 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10889         * Make-lang.in: Move all build rules here from Makefile.in,
10890         adapt to new context.  Wrap all rules that change the current
10891         directory in parentheses.  Expunge all references to $(P).
10892         When one command depends on another and they're run all at
10893         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10894         all object-file generation rules.  Delete obsolete variables.
10896         * Makefile.in: Delete.
10897         * config-lang.in: Delete outputs= line.
10899 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10901         * error.c (dump_function_decl): Print no space between
10902         `ptr-operator' the `type-specifier' of the return type.
10903         (dump_type_prefix): Make sure we put space at the appropriate
10904         place.
10906 2000-10-23  Jason Merrill  <jason@redhat.com>
10908         * call.c (equal_functions): Also call decls_match for extern "C" fns.
10910 2000-10-22  Jason Merrill  <jason@redhat.com>
10912         * call.c (build_conditional_expr): Use ocp_convert to force
10913         rvalue conversion.
10915 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
10917         * call.c (standard_conversion): Use RVALUE_CONVs for all
10918         expressions that satisfy lvalue_p, not just those that satisfy
10919         real_lvalue_p.
10921         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
10923         * typeck.c (c_sizeof): Return an expression of `size_t' type,
10924         not one with TYPE_IS_SIZETYPE set.
10925         (dubious_conversion_warnings): Remove special-case code.
10927 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
10929         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
10930         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
10931         (dump_type_prefix): Print vector-of-int as 'int vector'.
10932         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
10933         * tree.c (walk_tree): Handle VECTOR_TYPE.
10935         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
10937 2000-10-21  Jason Merrill  <jason@redhat.com>
10939         * parse.y (operator): Set got_object from got_scope.
10940         Set looking_for_typename.
10941         * decl.c (lookup_name_real): Clear val after setting from_obj.
10942         Reorganize diagnostic.
10944 2000-10-20  Jason Merrill  <jason@redhat.com>
10946         * tree.c (walk_tree): Don't walk into default args.
10948         * error.c (dump_expr): Use host_integerp.
10950 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
10952         * typeck2.c (abstract_virtuals_error): Use "because" instead of
10953         "since" in error message.
10955 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10957         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
10959 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
10961         * decl.c (revert_static_member_fn): Fixed typo.
10963 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
10965         * class.c (subobject_offset_fn): New type.
10966         (dfs_record_base_offsets): Remove.
10967         (record_base_offsets): Likewise.
10968         (dfs_search_base_offsets): Likewise.
10969         (record_subobject_offset): New function.
10970         (check_subobject_offset): Likewise.
10971         (walk_subobject_offsets): Likewise.
10972         (record_subobject_offsets): Likewise.
10973         (layout_conflict_p): Reimplement.
10974         (layout_nonempty_base_or_field): Correct handling of type
10975         conflicts during layout.
10976         (layout_empty_base): Likewise.
10977         (build_base_field): Adjust to handle new representation of empty
10978         base offset table.
10979         (build_base_fields): Likewise.
10980         (layout_virtual_bases): Likewise.
10981         (splay_tree_compare_integer_csts): New function.
10982         (layout_class_type): Use a splay_tree, rather than a varray, to
10983         represent the offsets of empty bases.
10985         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
10986         * decl.c (select_decl): Don't return declarations that are
10987         DECL_ANTICIPATED.
10989 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
10991         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
10992         (fake_std_node): New macro.
10993         * decl.c (in_std): Rename to ...
10994         (in_fake_std): ... this.
10995         (flag_no_builtin): Remove.
10996         (flag_no_nonansi_builtin): Likewise.
10997         (walk_namespaces_r): Use fake_std_node.
10998         (push_namespace): Use std_identifier.
10999         (pop_namespace): Use in_fake_std.
11000         (lookup_name_real): Use fake_std_node.
11001         (init_decl_processing): When -fhonor-std, create the `std'
11002         namespace.  Don't create a dummy fake_std_node in that case.
11003         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
11004         (builtin_function): Put builtins whose names don't begin
11005         with `_' in the std namespace.
11006         * decl2.c (flag_no_builtin): Remove.
11007         (flag_no_nonansi_builtin): Likewise.
11008         (set_decl_namespace): Use fake_std_node.
11009         (validate_nonmember_using_decl): Likewise.
11010         (do_using_directive): Likewise.
11011         (handle_class_head): Likewise.
11012         * dump.c (dequeue_and_dump): Likewise.
11013         * except.c (init_exception_processing): Use std_identifier.
11014         * init.c (build_member_call): Use fake_std_node.
11015         * rtti.c (init_rtti_processing): Use std_identifier.
11017 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
11019         * cp-tree.h (back_end_hook): Remove declaration.
11020         * decl2.c (back_end_hook): Remove definition.
11022         * dump.c (dequeue_and_dump): Dump TREE_USED.
11024 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
11026         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
11028 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11030         * decl.c (WINT_TYPE): Define.
11031         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
11032         c_size_type_node, signed_size_type_node and wint_type_node.
11034 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
11036         * decl2.c (warn_missing_format_attribute): New variable.
11037         (lang_decode_option): Decode -Wmissing-format-attribute.
11039 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
11041         * typeck.c (qualify_type): Remove.
11042         (composite_pointer_type): Fix handling of conversions to `cv void*'.
11044 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11046         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
11048 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11050         * Makefile.in (parse.c, parse.h): Create atomically.
11052 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11054         * class.c (current_obstack): Remove.
11055         * decl.c (ggc_p): Remove.
11056         (start_decl): Don't use decl_tree_cons.
11057         (grokdeclarator): Don't use build_decl_list.
11058         (start_function): Don't use decl_tree_cons.
11059         (finish_function): Don't mess with obstacks.
11060         * decl2.c (grok_x_components): Don't use build_decl_list.
11061         * lex.c (make_call_declarator): Don't call decl_tree_cons.
11062         (implicitly_declare_fn): Don't call build_decl_list.
11063         * parse.y (frob_specs): Don't call build_decl_list or
11064         decl_tree_cons.
11065         (expr_or_declarator_intern): Don't call decl_tree_cons.
11066         (primary): Don't call build_decl_list.
11067         (fcast_or_absdcl): Likewise.
11068         (typed_declspecs): Don't call decl_tree_cons.
11069         (reserved_declspecs): Don't call build_decl_list.
11070         (declmods): Likewise.
11071         (reserved_typespecquals): Likewise.
11072         (aggr): Likewise.
11073         (new_type_id): Likewise.
11074         (cv_qualifiers): Likewise.
11075         (after_type_declarator_intern): Likewise.
11076         (notype_declarator_intern): Likewise.
11077         (absdcl_intern): Likewise.
11078         (named_parm): Likewise.
11079         * pt.c (most_specialized_class): Likewise.
11080         * repo.c (temporary_obstack): Make it a structure, not a pointer.
11081         (init_repo): Initialize it.
11082         * search.c (current_obstack): Remove.
11083         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
11085 2000-10-09  Richard Henderson  <rth@cygnus.com>
11087         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
11088         (c++ language support bits for libgcc): Remove.
11089         (c++.clean): Remove cplib2.txt cleanup.
11090         * config-lang.in (headers, lib2funcs): Remove.
11092         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
11093         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
11094         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
11095         * inc/new.h, inc/typeinfo: Remove files.
11097 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11099         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
11100         defined.
11101         (init_decl_processing): Initialize intmax_type_node and
11102         uintmax_type_node.
11104 2000-10-06  Richard Henderson  <rth@cygnus.com>
11106         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
11107         (original_result_rtx): Remove.
11108         * decl.c (save_function_data): Don't clear x_result_rtx.
11109         (mark_lang_function): Don't mark it either.
11110         * expr.c (fixup_result_decl): Remove.
11111         * semantics.c (genrtl_named_return_value): Frob the return decl
11112         before calling emit_local_var.
11113         (genrtl_finish_function): Don't call fixup_result_decl.
11114         Always emit the jump to return_label.
11116 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
11118         * pt.c (lookup_template_class): Set current access for enum.
11119         (tsubst_enum): Set file & line for enum decl.
11121         * spew.c (yylex): Remove unused variable.
11123 2000-10-05  Richard Henderson  <rth@cygnus.com>
11125         * semantics.c (genrtl_finish_function): Don't init or check
11126         can_reach_end; remove noreturn and return value checks.
11128 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11130         * init.c (build_java_class_ref): Use `build_static_name' with a
11131         suffix, not a prefix, to build the class object's name.
11133 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11135         * cp-tree.h (access_kind): Fix comment typo.
11136         * decl2.c (grokfield): Fix diagnostic typo.
11137         * semantics.c (finish_template_type): Fix comment typo.
11138         (finish_qualified_object_call_expr): Likewise.
11140 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11142         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
11143         tsubsting fails.
11145 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
11147         * spew.c (frob_id): New static function.
11148         (frob_opname): Use it.
11149         (yylex): Use it.
11151 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11153         * decl.c (lang_mark_false_label_stack): Remove.
11154         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
11156 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
11158         * gxxint.texi: Use @email for formatting email addresses.
11160 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
11162         * error.c: Remove direct obstack manipulation.  Replace with
11163         output_buffer-based formatting.  Adjust calls to removed macros.
11164         (obstack_chunk_alloc, obstack_chunk_free): Remove.
11165         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
11166         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
11168 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
11170         * ir.texi: Move to ../c-tree.texi.
11172 2000-09-20  Jason Merrill  <jason@redhat.com>
11174         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
11176 2000-09-21  Andreas Jaeger  <aj@suse.de>
11178         * errfn.c: Move declaration of cp_printer and cp_printers to ...
11179         * cp-tree.h: ... here.
11181         * error.c: Remove declaration of cp_printer.
11183 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
11185         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
11187 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
11189         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
11190         users.
11192 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
11194         * decl.c (start_function): Robustify.
11196 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11198         * cp-tree.h (check_function_format): Accept a `status' parameter.
11200         * call.c, typeck.c: Updates calls to `check_function_format'.
11202 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
11204         * decl2.c (handle_class_head): Always push some scope even
11205         in the error case.
11207 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
11209         * cp-tree.h (struct cp_language_function): Remove
11210         x_scope_stmt_stack and name_declared.
11211         (current_scope_stmt_stack): Remove.
11212         (function_name_declared_p): New macro.
11213         (struct lang_decl_flags): Use c_lang_decl as a base class.
11214         (context): Remove.
11215         (struct lang_decl): Replace saved_tree with context.
11216         (DECL_FRIEND_CONTEXT): Adjust accordingly.
11217         (SET_DECL_FRIEND_CONTEXT): Likewise.
11218         (DECL_VIRTUAL_CONTEXT): Likewise.
11219         (DECL_SAVED_TREE): Remove.
11220         (C_DECLARED_LABEL_FLAG): Likewise.
11221         (cplus_expand_expr_stmt): Don't declare.
11222         (add_decl_stmt): Likewise.
11223         (add_scope_stmt): Likewise.
11224         * decl.c (mark_stmt_tree): Remove.
11225         (case_compare): Likewise.
11226         (finish_case_label): Use c_add_case_label.
11227         (init_decl_processing): Set more language-specific hooks.
11228         (build_enumerator): Fix typo in comment.
11229         (cplus_expand_expr_stmt): Remove.
11230         (mark_lang_function): Use mark_c_language_function.
11231         (lang_mark_tree): Use c_mark_lang_decl.
11232         * decl2.c: Change order of inclusion.
11233         * except.c: Likewise.
11234         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
11235         back on c_expand_expr.
11236         * friend.c: Include expr.h.
11237         * init.c: Change order of inclusion.
11238         * Makefile.in: Update dependencies.
11239         * lex.h (free_lang_decl_chain): Remove.
11240         * optimize.c (maybe_clone_body): Use function_name_declared_p.
11241         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
11242         it doesn't exist.
11243         (instantiate_decl): Use function_name_declared_p.
11244         * semantics.c (lang_expand_expr_stmt): Remove.
11245         (set_current_function_name_declared): Likewise.
11246         (current_function_name_declared): Likewise.
11247         (begin_compound_stmt): Use function_name_declared_p.
11248         (add_decl_stmt): Remove.
11249         (setup_vtbl_ptr): Use function_name_declared_p.
11250         (add_scope_stmt): Remove.
11251         (current_scope_stmt_stack): New function.
11252         (cp_expand_stmt): Don't handle SCOPE_STMTs.
11253         (expand_body): Use function_name_declared_p.
11254         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
11255         * typeck.c: Change order of includes.
11256         (convert_sequence): Remove.
11258 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11260         * lex.c (reswords): Add _Complex.
11262 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11264         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
11266 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
11268         * init.c (begin_init_stmts): Don't use // comments.
11270 2000-09-12  Jason Merrill  <jason@redhat.com>
11272         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
11273         all non-extern arrays.
11275         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
11276         typenames, too.  Downgrade complaint to pedwarn.
11277         (xref_tag): Warn about surprising behavior of 'friend struct T'.
11278         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
11279         'class This::Inherited'.
11281 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
11283         * decl.c (finish_case_label): Given the LABEL_DECL a
11284         DECL_CONTEXT.
11286 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
11288         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
11289         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
11290         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
11291         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
11292         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
11293         New macros.
11294         (sorry_for_unsupported_tree, print_scope_operator,
11295         print_left_paren, print_right_paren, print_left_bracket,
11296         print_right_bracket, print_whitespace): Likewise.
11297         (aggr_variety): Rename to class_key_or_enum.
11298         (print_type): Rename to print_type_id.
11299         (print_type_specifier_seq, print_simple_type_specifier,
11300         print_elaborated_type_specifier,
11301         print_rest_of_abstract_declarator,
11302         print_parameter_declaration_clause, print_exception_specification,
11303         print_nested_name_specifier, print_template_id,
11304         typedef_original_name,  print_template_argument_list_start,
11305         print_template_argument_list_end): New functions.
11307 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
11309         * ir.texi: Add more documentation.
11311 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
11313         * cp-tree.h (struct saved_scope): Remove x_function_parms.
11314         (current_function_parms): Don't define.
11315         (struct cp_language_function): Remove parms_stored.
11316         (current_function_just_assigned_this): Don't define.
11317         (current_function_parms_stored): Likewise.
11318         (static_ctors): Declare.
11319         (static_dtors): Likewise.
11320         (SF_EXPAND): Don't define.
11321         (expand_start_early_try_stmts): Remove declaration.
11322         (store_parm_decls): Likewise.
11323         * decl.c (static_ctors): Don't declare.
11324         (static_dtors): Likewise.
11325         (struct binding_level): Remove this_block.
11326         (poplevel): Remove dead code.
11327         (set_block): Likewise.
11328         (mark_binding_level): Don't mark this_block.
11329         (mark_saved_scope): Don't mark x_function_parms.
11330         (init_decl_processing): Don't add current_function_parms as a GC
11331         root.
11332         (check_function_type): Change prototype.
11333         (start_function): Remove RTL-generation code.
11334         (expand_start_early_try_stmts): Remove.
11335         (store_parm_decls): Give it internal linkage.  Remove
11336         RTL-generation code.
11337         (finish_function): Remove RTL-generation code.
11338         * decl2.c (static_ctors): Fix formatting.
11339         (static_dtors): Likewise.
11340         * method.c (use_thunk): Don't call store_parm_decls.
11341         (synthesize_method): Likewise.
11342         * optimize.c (maybe_clone_body): Likewise.
11343         * parse.y (fn.def2): Likewise.
11344         (.set_base_init): Likewise.
11345         (nodecls): Likewise.
11346         * pt.c (instantiate_decl): Likewise.
11347         * rtti.c (synthesize_tinfo_fn): Likewise.
11348         * semantics.c (genrtl_try_block): Simplify.
11349         (expand_body): Use genrtl_start_function and
11350         genrtl_finish_function.
11351         (genrtl_start_function): New function.
11352         (genrtl_finish_function): Likewise.
11354 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11356         * error.c (cp_tree_printer, case 'P'): Append break.
11358 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
11360         * cp-tree.h (frob_opname): Declare.
11361         * parse.y (saved_scopes): New static variable.
11362         (cp_parse_init): Adjust.
11363         (do_id): If lastiddecl is NULL, do do_identifier.
11364         (operator): Save scope information.
11365         (unoperator): New reduction. Restore scope information.
11366         (operator_name): Append unoperator. Call frob_opname.
11367         * spew.c (frob_opname): Define.
11369 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11371         * decl.c, rtti.c: Include defaults.h if not already included.
11372         Don't define the *_TYPE_SIZE macros.
11374 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
11376         * cp-tree.h (push_switch): Change prototype.
11377         (check_cp_case_value): Remove declaration.
11378         (decl_constant_value): Likewise.
11379         * decl.c (struct cp_switch): Add switch_stmt and cases.
11380         (case_compare): New function.
11381         (push_switch): Set switch_stmt.  Initialize cases.
11382         (pop_switch): Clean up cases.
11383         (define_case_label): Rename to ...
11384         (finish_case_label): ... this.  Do semantic analysis for case
11385         labels here.
11386         (start_function): Correct comment.
11387         * decl2.c (check_cp_case_value): Remove.
11388         * expr.c (do_case): Remove.
11389         * pt.c (tsubst_expr): Adjust call to finish_case_label.
11390         * semantics.c (genrtl_do_poplevel): Remove declaration.
11391         (RECHAIN_STMTS): Remove.
11392         (finish_break_stmt): Use build_break_stmt.
11393         (finish_continue_stmt): Use build_continue_stmt.
11394         (finish_switch_cond): Adjust condition here, rater than in
11395         c_expand_start_case.
11396         (finish_case_label): Remove.
11397         * typeck.c (c_expand_return): Remove.
11398         (c_expand_start_case): Likewise.
11400 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
11402         * ir.texi: Document type nodes.
11404 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11406         * cp-tree.h (init_cp_semantics): Declare.
11407         (genrtl_try_block): Don't declare.
11408         (genrtl_handler): Likewise.
11409         (genrtl_catch_block): Likewise.
11410         (genrtl_ctor_stmt): Likewise.
11411         (genrtl_subobject): Likewise.
11412         (genrtl_do_poplevel): Likewise.
11413         (genrtl_named_return_value): Likewise.
11414         * lex.c (init_parse): Call init_cp_semantics.
11415         * semantics.c (genrtl_try_block): Give it internal linkage.
11416         (genrtl_handler): Likewise.
11417         (genrtl_catch_block): Likewise.
11418         (genrtl_ctor_stmt): Likewise.
11419         (genrtl_subobject): Likewise.
11420         (genrtl_do_poplevel): Likewise.
11421         (genrtl_named_return_value): Likewise.
11422         (lang_expand_stmt): Rename to ...
11423         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
11424         (init_cp_semantics): Define.
11426         * decl.c (initialize_local_var): Remove RTL-generating code.
11427         * semantics.c (genrtl_try_block): Fix formatting.
11429         Move statement-tree facilities from C++ to C front-end.
11430         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
11431         (void_zero_node): Remove.
11432         (stmt_tree): Likewise.
11433         (scope_chain): Adjust.
11434         (language_function): Rename to cp_language_function.
11435         (cp_function_chain): Adjust.
11436         (current_stmt_tree): Remove.
11437         (last_tree): Likewise.
11438         (last_expr_type): Likewise.
11439         (struct lang_decl): Adjust.
11440         (STMT_IS_FULL_EXPR_P): Remove.
11441         (add_tree): Remove.
11442         (begin_stmt_tree): Likewise.
11443         (finish_stmt_tree): Likewise.
11444         (walk_tree_fn): Likewise.
11445         (walk_stmt_tree): Likewise.
11446         * class.c (finish_struct): Replace use of add_tree with add_stmt.
11447         * decl.c (mark_stmt_tree): Adjust type.
11448         (init_decl_processing): Don't build void_zero_node.
11449         (initialize_local_var): Adjust usage of current_stmt_tree.
11450         (finish_enum): Use add_stmt, not add_tree.
11451         (save_function_data): Adjust use of language_function.
11452         (finish_constructor_body): Use add_stmt, not add_tree.
11453         (finish_destructor_body): Likewise.
11454         (push_cp_function_context): Adjust use of language_function.
11455         (pop_cp_function_context): Likewise.
11456         (mark_lang_function): Likewise.
11457         (mark_cp_function_context): Likewise.
11458         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
11459         (build_vec_init): Likewise.
11460         * semantics.c (SET_LAST_STMT): Remove.
11461         (RECHAIN_STMTS): Don't use it.
11462         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
11463         (current_stmt_tree): Define.
11464         (add_tree): Remove.
11465         (finish_goto_stmt): Use add_stmt, not add_tree.
11466         (finish_expr_stmt): Likewise.
11467         (begin_if_stmt): Likewise.
11468         (finish_then_clause): Likewise.
11469         (begin_while_stmt): Likewise.
11470         (begin_do_stmt): Likewise.
11471         (finish_return_stmt): Likewise.
11472         (begin_for_stmt): Likewise.
11473         (finish_break_stmt): Likewise.
11474         (finish_continue_stmt): Likewise.
11475         (begin_switch_stmt): Likewise.
11476         (finish_case_label): Likewise.
11477         (begin_try_block): Likewise.
11478         (begin_function_try_block): Likewise.
11479         (begin_handler): Likewise.
11480         (begin_catch_block): Likewise.
11481         (begin_compound_stmt): Likewise.
11482         (begin_asm_stmt): Likewise.
11483         (finish_asm_stmt): Likewise.
11484         (finish_label_stmt): Likewise.
11485         (add_decl_stmt): Likewise.
11486         (finish_subobject): Likewise.
11487         (finish_decl_cleanup): Likewise.
11488         (finish_named_return_value): Likewise.
11489         (setup_vtbl_ptr): Likewise.
11490         (add_scope_stmt): Likewise.
11491         (finish_stmt_expr): Likewise.
11492         (prune_unused_decls): Remove.
11493         (begin_stmt_tree): Likewise.
11494         (finish_stmt_tree): Likewise.
11495         (prep_stmt): Adjust use of current_stmt_tree.
11496         (lang_expand_stmt): Likewise.
11497         * tree.c (statement_code_p): Remove.
11498         (cp_statement_code_p): New function.
11499         (walk_stmt_tree): Remove.
11500         (init_tree): Set lang_statement_code_p.
11502 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
11504         Integrated preprocessor.
11506         * Make-lang.in, Makefile.in: Remove all references to input.c,
11507         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
11508         * gxx.gperf, hash.h, input.c: Delete.
11509         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
11510         initialized properly.
11512         * class.c (fixup_pending_inline): Take a tree, not a
11513         struct pending_inline *.  All callers changed.
11514         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
11515         RID_PROTECTED entries in ridpointers[] array here.
11516         * decl.c (duplicate_decls): Do not refer to struct
11517         pending_inline.
11518         (record_builtin_type, init_decl_processing): Use RID_MAX not
11519         CP_RID_MAX.
11520         (grokdeclarator): Use C_IS_RESERVED_WORD.
11521         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
11522         cpplib.
11523         (grok_x_components): Do not inspect pending_inlines chain.
11525         * cp-tree.h (struct lang_identifier): Add rid_code entry.
11526         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
11527         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
11528         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
11529         TIME_IDENTIFIER_FILEINFO): Kill.
11530         Update prototypes.
11531         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
11532         single 32-bit word.
11533         * parse.y: Call do_pending_inlines unconditionally.
11534         reinit_parse_for_method is now snarf_method.  fn.defpen is no
11535         longer necessary.  Remove unnecessary <itype> annotation on
11536         SCOPE.  Do not refer to end_of_file or struct pending_inline.
11537         * semantics.c (begin_inline_definitions): Call
11538         do_pending_inlines unconditionally.
11540         * lex.c: Remove all code now shared with C front end.
11541         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
11542         into the get_identifier table.  Rewrite pragma handling to
11543         work with the registry.  Move code to save tokens for later
11544         processing to spew.c.
11546         * spew.c: Rewrite everything in terms of token streams instead
11547         of text.  Move routines here from lex.c / input.c as
11548         appropriate.  GC-mark trees hanging off the pending inlines
11549         chain.
11551 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
11553         * NEWS: Mention that the named return value extension has been
11554         deprecated.
11555         * cp-tree.h (original_result_rtx): Define.
11556         (TREE_REFERENCE_EXPR): Remove.
11557         (DECL_VPARENT): Likewise.
11558         (pushdecl_nonclass_level): Likewise.
11559         (store_return_init): Likewise.
11560         (reinit_lang_specific): Likewise.
11561         (genrtl_named_return_value): Change prototype.
11562         * decl.c (original_result_rtx): Remove.
11563         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
11564         Do not generate RTL for local variables here.
11565         (store_return_init): Remove.
11566         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
11567         store_return_init.
11568         (finish_named_return_value): Adjust accordingly.  Warn that this
11569         extension is deprecated.
11570         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
11572 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11574         * pt.c (type_unification_real): Replace switch with if.
11575         (unify): Tsubst non-type parms before comparing.
11577 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11579         * error.c (dump_typename): New function, broken out of ...
11580         (dump_type): ... here. Use it.
11581         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
11583 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11585         * init.c (build_offset_ref): Deal with namespace scoped
11586         TEMPLATE_ID_EXPRs.
11588 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11590         * class.c (resolve_address_of_overloaded_function): Add
11591         explanation message.
11592         * decl.c (define_case_label): Reformat explanation.
11593         * decl2.c (finish_static_data_member_decl): Likewise.
11594         (grokfield): Likewise.
11595         * friend.c (do_friend): Likewise.
11597 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
11599         * tree.c (walk_tree): Expose tail recursion.
11600         (walk_stmt_tree): New function.
11601         * cp-tree.h: Prototype walk_stmt_tree.
11602         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
11603         the BLOCKs directly.  If a BLOCK has no variables after
11604         pruning, discard it.
11605         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
11606         restore the line number.
11608 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
11610         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
11611         (pt.o): Remove dependency on HTAB_H.
11612         * cp-tree.h: Include hashtab.h.
11613         (walk_tree): Change prototype.
11614         (walk_tree_without_duplicates): New function.
11615         * decl.c (check_default_argument): Use it.
11616         * optimize.c (remap_decl): Adjust calls to walk_tree.
11617         (copy_body): Likewise.
11618         (expand_calls_inline): Likewise.
11619         (calls_setjmp_p): Use walk_tree_without_duplicates.
11620         * pt.c: Don't include hashtab.h.
11621         (for_each_template_parm): Use walk_tree_without_duplicates.
11622         * semantics.c (finish-stmt_tree): Likewise.
11623         (expand_body): Likewise.
11624         * tree.c (walk_tree): Add additional parameter.
11625         (walk_tree_without_duplicates): New function.
11626         (count_trees): Use it.
11627         (verify_stmt_tree): Adjust call to walk_tree.
11628         (find_tree): Use walk_tree_without_duplicates.
11629         (no_linkage_check): Likewise.
11630         (break_out_target_exprs): Adjust call to walk_tree.
11631         (cp_unsave): Likewise.
11633 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11635         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
11636         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11637         * cp-tree.h (TYPE_BINFO): Adjust comment.
11638         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
11639         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
11640         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11641         (TYPE_TEMPLATE_INFO): Likewise.
11642         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
11643         * class.c (push_nested_class): Likewise.
11644         * decl.c (lookup_name_real): Likewise.
11645         (grokdeclarator): Likewise.
11646         (grok_op_properties): Likewise.
11647         (xref_tag): Likewise.
11648         (xref_basetypes): Likewise.
11649         * decl2.c (constructor_name_full): Likewise.
11650         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
11651         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
11652         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
11653         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11654         (dump_type_suffix): Likewise.
11655         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
11656         instead.
11657         (get_aggr_from_typedef): Likewise.
11658         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
11659         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11660         (write_template_parm): Likewise.
11661         (write_template_template_parm): Check tree code instead of
11662         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11663         * method.c (build_overload_nested_name): Add
11664         BOUND_TEMPLATE_TEMPLATE_PARM.
11665         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
11666         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11667         * pt.c (convert_template_argument): Check tree code instead of
11668         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11669         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
11670         (for_each_template_parm): Adjust comment.
11671         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
11672         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11673         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
11674         template_args_equal to compare template template parameter cases.
11675         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11676         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
11677         instead.
11678         * tree.c (copy_template_template_parm): Decide whether to create
11679         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
11680         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
11681         (copy_tree_r): Likewise.
11682         * typeck.c (comptypes): Likewise.  Check tree code instead of
11683         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
11685 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
11687         * decl.c (finish_function): Move the code for handling functions
11688         marked with the constructor and destructor attributes inside the
11689         expand_p block.
11691 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11693         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
11695 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11697         * pt.c (lookup_template_class): Remove abort.
11698         * tree.c (get_type_decl): Allow error_mark_node.
11700 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
11702         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
11703         TEMPLATE_ID_EXPRs.
11705 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
11707         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
11708         new ABI mangling.
11710 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11712         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
11713         union tag mismatch error reporting.
11715 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
11717         * call.c (build_scoped_method_call): Check it is not a namespace.
11719 2000-08-30  Jason Merrill  <jason@redhat.com>
11721         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
11723         * tree.c (bot_manip): Check TREE_CONSTANT rather than
11724         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
11725         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
11727         * decl.c (start_function): Always call make_function_rtl.
11729 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11731         * semantics.c (prune_unused_decls): New function.
11732         (finish_stmt_tree): Call it via walk_tree.
11734 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11736         * class.c (build_secondary_vtable): Constify a char *.
11737         * decl.c (init_decl_processing): Initialize function_id_node,
11738         pretty_function_id_node, and func_id_node.
11739         * input.c (struct input_source): Constify 'str'.
11740         (feed_input): Constify first argument.
11741         * mangle.c (write_identifier): Constify argument.
11742         * pt.c (mangle_class_name_for_template): Constify argument.
11744 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
11746         * typeck.c (mark_addressable): Remove code that pokes around in
11747         RTL.
11749 2000-08-28  Jason Merrill  <jason@redhat.com>
11751         * lex.c (file_name_nondirectory): Move to toplev.c.
11753         * cp-tree.h (LOCAL_CLASS_P): New macro.
11754         * class.c (finish_struct_1): Use it.
11756 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
11758         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
11759         (write_encoding): Pass another argument to write_name.
11760         (write_name): Add ignore_local_scope parameter.  Fix handling of
11761         local names.
11762         (write_nested_name): Use write_unqualified_name.
11763         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
11764         (write_template_prefix): Use write_unqualified_name.
11765         (write_component): Remove.
11766         (write_local_name): Add parameter.  Use direct local entity to
11767         discriminator calculation.
11768         (write_class_enum_type): Pass another argument to write_name.
11769         (write_template_template_arg): Likewise.
11770         (make_guard_variable): Likewise.
11772 2000-08-27  Jason Merrill  <jason@redhat.com>
11774         * decl.c (pushdecl): Matching decls for local externs are found in
11775         the current level.  Propagate linkage information from previous
11776         declarations.
11778 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11780         * ir.texi (Expressions): Fix typo.
11782 2000-08-25  Greg McGary  <greg@mcgary.org>
11784         * tree.c (init_tree): Use ARRAY_SIZE.
11786 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11788         * error.c (cp_tree_printer): Rework.
11790 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
11792         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
11793         dyn-string.o.
11794         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
11795         (cp-demangle.o): Remove target.
11796         (dyn-string.o): Likewise.
11798         * decl.c (grokfndecl): Require that `main' return an `int'.
11799         * mangle.c (write_encoding): Don't mangle return types for
11800         conversion functions.
11802 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11804         * error.c (tree_formatting_info): New data type.
11805         (tree_being_formatted): New macro.
11806         (tree_formatting_flags): Likewise.
11807         (put_whitespace): Likewise.
11808         (print_tree_identifier): Likewise.
11809         (print_identifier): Likewise.
11810         (cp_tree_printer, print_function_argument_list, print_declaration,
11811         print_expression, print_function_declaration,
11812         print_function_parameter, print_type, print_cv_qualifier): New
11813         functions.
11814         (init_error): Initialize lang_printer.
11816 2000-08-24  Jason Merrill  <jason@redhat.com>
11818         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
11819         adjustment necessary.
11821 2000-08-24  Greg McGary  <greg@mcgary.org>
11823         * cp-tree.h (MAIN_NAME_P): Remove macro.
11825 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
11827         * error.c (print_instantiation_context): Don't forget to flush the
11828         buffer.
11830 2000-08-23  Jason Merrill  <jason@redhat.com>
11832         * typeck.c (build_ptrmemfunc): Save the input pmf.
11834         * method.c (process_modifiers): Use same_type_p.
11836 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
11838         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
11839         * mangle.c (write_function_type): Change prototype.
11840         (write_encoding): Don't mangle return types for
11841         constructors or destructors.
11842         (write_type): Adjust call to write_function_type.
11843         * pt.c (instantiate_template): Instantiate alternate entry points
11844         when instantiating the main function.
11846 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11848         * error.c (cp_print_error_function): Don't use embedded '\n' in
11849         output_printf.
11851 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11853         * decl.c (init_decl_processing): Remove bogus initialization.
11854         * error.c (lang_print_error_function): Restore here.
11855         (init_error): Initialize print_error_function.
11857 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
11859         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
11861 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
11863         * Makefile.in (error.o): Depends on diagnostic.h
11865         * cp-tree.h (problematic_instantiation_changed,
11866         record_last_problematic_instantiation, current_instantiation,
11867         print_instantiation_context): Declare.
11868         (maybe_print_template_context): Remove.
11870         * decl.c (init_decl_processing): Set print_error_function to NULL.
11871         (lang_print_error_function): Remove, since we're using a new
11872         machinery.
11874         * error.c: #include diagnostic.h
11875         (function_category): New function.
11876         (cp_diagnostic_starter): Likewise.
11877         (cp_diagnostic_finalizer): Likewise.
11878         (cp_print_error_function): Likewise.
11879         (maybe_print_instantiation_context): Likewise.
11880         (print_instantiation_full_context): Likewise.
11881         (print_instantiation_partial_context): Likewise.
11882         (print_instantiation_context): Define.
11883         (init_error): Initialize diagnostic pager and finalizer.
11885         * pt.c (problematic_instantiation_changed): Define.
11886         (record_last_problematic_instantiation): Likewise.
11887         (current_instantiation): Likewise.
11888         (maybe_print_template_context): Remove.
11889         (print_template_context): Likewise.
11890         (current_tinst_level): Make static to reflect Brendan Kehoe's
11891         change of 1995-04-13.
11892         (push_tinst_level): Call print_instantiation_context.
11894 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11896         * lang-specs.h: Do not process -o or run the assembler if
11897         -fsyntax-only.
11899 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11901         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
11902         variables.
11903         * decl2.c (lang_decode_option): Disable gettext attributes for
11904         -ansi.
11906 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11908         * lex.c (lang_init_options): Default diagnostic message maximum
11909         length to 80, when line-wrapping.
11911 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
11913         * class.c (build_vtbl_initializer): Clear the entire
11914         vtbl_init_data.  Start keeping track of the functions for which we
11915         have created vcall offsets here.
11916         (dfs_build_vcall_offset_vtbl_entries): Remove.
11917         (build_vcall_offset_vtbl_entries): Reimplement.
11918         (add_vcall_offset_vtbl_entries_r): New function.
11919         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
11920         computing when vcall offsets are necessary.
11922 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11924         * decl.c (member_function_or_else): Use cp_error ... %T.
11925         (grokdeclarator): Likewise.
11926         (start_method): Likewise.
11927         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
11929 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11931         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
11932         TYPE_DECLs.
11934 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11936         * cp-tree.h (PTRMEM_OK_P): New macro.
11937         (itf_ptrmem_ok): New enumeration value.
11938         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
11939         argument. Diagnose implicit pointer to member.
11940         (instantiate_type): Don't diagnose implicit pointer to member
11941         here. Pass itf_ptrmem_ok if ok. Adjust calls to
11942         resolve_address_of_overloaded_function.
11943         * init.c (build_offset_ref): Set PTRMEM_OK_P.
11944         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
11945         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
11946         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
11947         (build_unary_op): Deal with single non-static member in
11948         microsoft-land.
11950 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11952         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
11954 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11956         * cp-tree.h (enum_name_string): Remove prototype.
11957         (report_case_error): Remove prototype.
11958         * cp/typeck2.c (enum_name_string): Remove.
11959         (report_case_error): Remove.
11960         * error.c (dump_expr): Deal with enum values directly.
11961         Correctly negate integer constant.
11963 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11965         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
11966         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
11967         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
11968         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
11969         (__cxa_vec_new): Use __cxa_vec_new2.
11970         (__cxa_vec_delete): Use __cxa_vec_delete2.
11972 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11974         * vec.cc (__cxa_vec_new): Set "C" linkage.
11975         (__cxa_vec_ctor): Likewise.
11976         (__cxa_vec_cctor): Likewise.
11977         (__cxa_vec_dtor): Likewise.
11978         (__cxa_vec_delete): Likewise.
11979         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
11980         (__cxa_vec_ctor): Likewise.
11981         (__cxa_vec_cctor): Likewise.
11982         (__cxa_vec_dtor): Likewise.
11983         (__cxa_vec_delete): Likewise.
11985 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11987         * class.c (instantiate_type): Reinstate local variable
11988         deleted in previous change.
11990         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
11991         itf_no_attributes.
11993 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11995         * cp-tree.h (instantiate_type_flags): New enumeration.
11996         (instantiate_type): Change parameter.
11997         * class.c (instantiate_type): Adjust prototype. Adjust.
11998         * call.c (standard_conversion): Adjust instantiate_type call.
11999         (reference_binding): Likewise.
12000         (build_op_delete_call): Likewise.
12001         (convert_like_real): Likewise.
12002         * cvt.c (cp_convert_to_pointer): Likewise.
12003         (convert_to_reference): Likewise.
12004         * pt.c (convert_nontype_argument): Likewise.
12005         * typeck.c (build_binary_op): Likewise.
12006         (build_ptrmemfunc): Likewise.
12007         (convert_for_assignment): Likewise.
12009 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
12011         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
12012         (current_aggr): Define.
12013         * decl.c (grokdeclarator): Make sure a friend class is an
12014         elaborated type specifier.
12015         * parse.y (current_aggr): Remove static definition.
12016         (cp_parse_init): Adjust.
12017         (structsp): Clear and restore current_aggr.
12018         (component_decl_list): Clear current_aggr.
12020         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
12021         aggregate tag on the typename's context.
12023         * pt.c (tsubst_friend_class): Return error_mark_node, if
12024         parms becomes NULL.
12025         (instantiate_class_template): Ignore error_mark_node friend types.
12027 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
12029         * cvt.c (warn_ref_binding): New static function, broken out of ...
12030         (convert_to_reference): ... here. Use it.
12032 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12034         * parse.y (template_arg): Add rule for template qualified with
12035         global scope.
12037 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12039         * decl2.c (add_function): Reorganize.
12040         (arg_assoc): Do not consider function template decls.
12042 2000-08-11  Jason Merrill  <jason@redhat.com>
12044         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
12045         looking inside.
12047 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12049         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
12050         (lookup_nested_tag): Likewise.
12052         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
12053         can be produced.
12055 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12057         * parse.y (named_complex_class_head_sans_basetype): Remove
12058         always true if.
12060 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12062         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
12063         explicit TEMPLATE_ID_EXPR args.
12064         (build_expr_from_tree, case CALL_EXPR): Likewise.
12066 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
12068         * decl.c (check_tag_decl): Diagnose typename's which don't
12069         declare anything.
12071 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
12073         * init.c (build_aggr_init): Reject bogus array initializers
12074         early.
12076 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12078         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
12079         runtime.
12080         * cp/tinfo.cc (__dynamic_cast): Likewise.
12081         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
12083 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
12085         * cvt.c (convert_to_pointer_force): Fix error message when
12086         attempting to cast from ambiguous base.
12088 2000-08-08  Jason Merrill  <jason@redhat.com>
12090         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
12091         (tsubst_template_arg_vector): Likewise.
12093         * decl2.c (build_anon_union_vars): Choose the largest field; don't
12094         assume that one will be as large as the union.
12096 2000-08-07  Kazu Hirata  <kazu@hxi.com>
12098         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
12099         * decl.c (pop_labels): Likewise.
12101 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
12103         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
12104         specifications.
12105         (__pointer_to_member_type_info): Likewise.
12106         (__base_class_info): Likewise.
12107         (__class_type_info): Likewise.
12108         (__si_class_type_info): Likewise.
12109         (__vmi_class_type_info): Likewise.
12110         * tinfo.cc (__si_class_type_info::__do_find_public_src):
12111         Changed member names to match specifications.
12112         (__vmi_class_type_info::__do_find_public_src): Likewise.
12113         (__si_class_type_info::__do_dyncast): Likewise.
12114         (__vmi_class_type_info::__do_dyncast): Likewise.
12115         (__si_class_type_info::__do_upcast): Likewise.
12116         (__vmi_class_type_info::__do_upcast): Likewise.
12117         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
12118         (__pbase_type_info::__pointer_catch): Likewise.
12119         (__pointer_type_info::__pointer_catch): Likewise.
12120         (__pointer_to_member_type_info::__pointer_catch): Likewise.
12122 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12124         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
12125         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
12126         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
12128 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
12130         * cp-tree.h (add_method): Change prototype.
12131         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
12132         Don't double the size of the method vector in the error case.
12133         (handle_using_decl): Adjust call to add_method.
12134         (add_implicitly_declared_members): Likewise.
12135         (clone_function_decl): Likewise.
12136         * decl2.c (check_classfn): Likewise.
12137         * semantics.c (finish_member_declaration): Likewise.
12139 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12141         * decl.c (flag_isoc94): New variable.
12143 2000-08-02  Jason Merrill  <jason@redhat.com>
12145         * pt.c (do_type_instantiation): Add complain parm; don't complain
12146         if called recursively.
12147         * cp-tree.h, parse.y: Adjust.
12149 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12151         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
12152         -Wno-strict-prototypes.
12154         * g++spec.c: Adjust type of second argument to
12155         lang_specific_driver, and update code as necessary.
12157         * cp-tree.h: Don't prototype min_precision here.
12158         (my_friendly_assert): Cast expression to void.
12159         * semantics.c (do_poplevel): Initialize scope_stmts.
12161 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
12163         * cp-tree.h (DECL_NEEDED_P): Tweak.
12165 2000-07-28  Jason Merrill  <jason@redhat.com>
12167         * lang-specs.h: Use %i in rule for .ii files.
12169 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
12171         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
12173 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
12175         Allow indirect primary bases.
12176         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
12177         primary_base.
12178         (CLASSTYPE_VFIELD_PARENT): Remove.
12179         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
12180         (BINFO_PRIMARY_BINFO): Remove.
12181         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
12182         (BINFO_VBASE_PRIMARY_P): Likewise.
12183         (BINFO_PRIMARY_BASE_OF): New macro.
12184         (BINFO_INDIRECT_PRIMARY_P): Likewise.
12185         (get_primary_binfo): New function.
12186         * decl.c (lang_mark_tree): Make lang_type::primary_base.
12187         * class.c (vcall_offset_data_s): Rename to ...
12188         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
12189         and add ctor_vtbl_p.
12190         (get_derived_offset): Use get_primary_binfo.
12191         (dfs_mark_primary_bases): Adjust handling of virtual primary
12192         bases.
12193         (mark_primary_bases): Likewise.
12194         (set_primary_base): Take a binfo, not an integer, as a
12195         representation of the primary base.
12196         (indirect_primary_base_p): Remove.
12197         (determine_primary_base): Adjust for indirect primary bases.
12198         (dfs_find_final_overrider): Fix typo in coment.
12199         (update_vtable_entry_for_fn): Use get_primary_binfo.
12200         (layout_nonempty_base_or_field): Tweak.
12201         (build_base_fields): Adjust for new primary base semantics.
12202         (dfs_propagate_binfo_offsets): Remove.
12203         (propagate_binfo_offsets): Rewrite.
12204         (dfs_set_offset_for_shared_vbases): Remove.
12205         (layout_virtual_bases): Don't use it.
12206         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
12207         ABI.
12208         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
12209         CLASSTYPE_VFIELD_PARENT.
12210         (dfs_get_primary_binfo): New function.
12211         (get_primary_binfo): Likewise.
12212         (dump_class_hierarchy_r): Tweak printing of primary bases.
12213         (build_vtbl_initializer): Fix typo in comments.  Use
12214         vtbl_init_data.
12215         (build_vcall_and_vbase_vtbl_entries): Likewise.
12216         (build_vbaes_offset_vtbl_entries): Likewise.
12217         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
12218         BV_VCALL_INDEX to handle indirect primary bases.
12219         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
12220         (build_rtti_vtbl_entries): Likewise.
12221         * search.c (get_shared_vbase_if_not_primary): Tweak.
12222         (find_vbase_instance): Likewise.
12223         (binfo_for_vtable): Simplify.
12224         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
12225         (make_binfo): Make it have 11 entries.
12227 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
12229         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
12230         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
12231         ascertaining primaryness.
12232         (G): Remove template_args.
12233         (decl_is_template_id): New function.
12234         (write_encoding): Use decl_is_template_id.
12235         (write_name): Likewise.  Handle type_decls.  Get main variant of
12236         type decls.
12237         (write_nested_name): Likewise.
12238         (write_prefix): Likewise.
12239         (write_template_prefix): Likewise.
12240         (write_special_name_constructor): Remove defunct production from
12241         comment.
12242         (write_bare_function_type): Remove comment about absent parameter.
12243         (write_template_template_arg): Add missing grammar production to
12244         comment.
12246 2000-07-27  Jason Merrill  <jason@redhat.com>
12248         * decl.c (duplicate_decls): If common_type produces a non-typedef
12249         type for a typedef, just use the old type.
12251 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
12253         * cp-tree.h (function_depth): Declare.
12254         (verify_stmt_tree): Likewise.
12255         (find_tree): Likewise.
12256         * decl.c (function_depth): Give it external linkage.
12257         * optimize.c (optimize_function): Increment and decrement it.
12258         * tree.c (verify_stmt_tree_r): New function.
12259         (verify_stmt_tree): Likewise.
12260         (find_tree_r): Likewise.
12261         (find_tree): Likewise.
12263 2000-07-27  Jason Merrill  <jason@redhat.com>
12265         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
12266         TYPE_PTRMEMFUNC_P.
12267         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
12269 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12271         * decl.c (start_cleanup_fn): Mark the function as `inline'.
12272         * decl2.c (get_guard): Call cp_finish_decl, not
12273         rest_of_decl_compilation, for local guards.
12274         * lex.c (do_identifier): Remove unused variable.
12276 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
12278         * parse.y:  Add missing ';'.
12280 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
12282         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
12283         of `extern "C++"'.
12285 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12287         Kill strict_prototype. Backwards compatibility only for
12288         non NO_IMPLICIT_EXTERN_C systems.
12289         * cp-tree.h (flag_strict_prototype): Remove.
12290         (strict_prototype): Remove.
12291         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12292         * decl.c (maybe_push_to_top_level): Adjust.
12293         (pop_from_top_level): Adjust.
12294         (decls_match): Only allow sloppy parm matching for ancient
12295         system headers.
12296         (init_decl_processing): Adjust.
12297         (grokdeclarator): Adjust.
12298         * decl2.c (flag_strict_prototype): Remove.
12299         (strict_prototype): Remove.
12300         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
12301         (lang_f_options): Remove "strict-prototype".
12302         (unsupported-options): Add "strict-prototype".
12303         * lex.c (do_identifier): Adjust.
12304         (do_scoped_id): Adjust.
12305         * parse.y (empty_parms): Adjust.
12306         * class.c (push_lang_context): Adjust.
12307         (pop_lang_context): Adjust.
12308         * typeck.c (comp_target_parms): Adjust.
12310 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12312         * decl.c (poplevel): Deal with anonymous variables at for scope.
12313         (maybe_inject_for_scope_var): Likewise.
12315 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
12317         * decl.c: Remove all signal handling code, now done in toplev.c.
12319 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
12321         * decl.c (make_rtl_for_nonlocal_decl): Rework.
12323         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
12324         correctly.
12326 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
12328         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
12329         Define my_friendly_assert and my_friendly_abort as macros
12330         which may call friendly_abort.  Prototype friendly abort, not
12331         my_friendly_abort or my_friendly_assert.
12332         * decl.c (signal_catch): Report the signal caught in the error
12333         message.  Call fatal directly.
12334         * typeck2.c (ack, my_friendly_assert): Delete.
12335         (my_friendly_abort): Rename to friendly_abort.  Expect file,
12336         line, and function parameters.  Report the abort code, then
12337         call fancy_abort.  Do not mask an abort if errors have
12338         already occurred.
12340 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
12342         * typeck.c (comp_target_parms): Remove obsolete parameter.
12343         (comp_target_types): Adjust.
12345 2000-07-17  Jason Merrill  <jason@redhat.com>
12347         * typeck.c (mark_addressable): Never set TREE_USED.
12348         * call.c (build_call): Don't abort on calls to library functions
12349         that have been declared normally.
12351         * typeck.c (build_binary_op): Fix grammar in warning.
12353         * exception.cc (__eh_free): Fix prototype.
12355         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
12357         * decl.c (pushdecl): Handle seeing an OVERLOAD in
12358         IDENTIFIER_NAMESPACE_VALUE.
12360 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
12362         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
12363         * method.c (use_thunk): Correct handling of vcall offsets.
12365 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12367         * .cvsignore: parse.h and parse.c have no cp- prefix.
12369 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12371         * .cvsignore: New file.
12373 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12375         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12377 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12379         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
12380         * parse.c: Remove.
12381         * parse.h: Likewise.
12383 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
12385         * class.c (layout_class_type): Add pointers to virtual bases after
12386         base classes under the old ABI.
12388 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
12390         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
12391         (finish_continue_stmt): Likewise.
12392         (begin_for_stmt): Remove call to note_level_for_for.
12393         (finish_goto_stmt): Change call from build_min_nt
12394         to build_stmt.
12395         (finish_expr_stmt): Likewise.
12396         (begin_if_stmt): Likewise.
12397         (begin_while_stmt): Likewise.
12398         (finish_while_stmt): Likewise.
12399         (finish_return_stmt): Likewise.
12400         (begin_for_stmt): Likewise.
12401         (finish_for_stmt): Likewise.
12402         (finish_break_stmt): Likewise.
12403         (begin_switch_stmt): Likewise.
12404         (finish_case_label): Likewise.
12405         (genrtl_try_block): Likewise.
12406         (begin_try_block): Likewise.
12407         (begin_handler): Likewise.
12408         (begin_compound_stmt): Likewise.
12409         (finish_asm_stmt): Likewise.
12410         (finish_label_stmt): Likewise.
12411         (add_decl_stmt): Likewise.
12412         (finish_subobject): Likewise.
12413         (finish_decl_cleanup): Likewise.
12414         (finish_named_return_value): Likewise.
12415         (setup_vtbl_ptr): Likewise.
12416         (add_scope_stmt): Likewise.
12417         * decl.c (finish_constructor_body): Likewise.
12418         (finish_destructor_body): Likewise.
12419         * optimize.c (copy_body_r): Likewise.
12420         (initialize_inlined_parameters): Likewise.
12421         (declare_return_variable): Likewise.
12422         (expand_call_inline): Likewise.
12424 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
12426         * semantics.c (expand_body): Sync interface information
12427         at the end of function body expansion.
12429 2000-07-09  Jason Merrill  <jason@redhat.com>
12431         * init.c (build_new_1): Bail early if the call to new fails.
12433         * decl.c (compute_array_index_type): Check specifically for
12434         an INTEGER_CST, not just TREE_CONSTANT.
12436         * decl.c (duplicate_decls): Don't call duplicate_decls on
12437         the DECL_TEMPLATE_RESULT.
12438         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
12439         codes.
12441         * error.c (dump_template_bindings): Don't crash if we had an
12442         invalid argument list.
12444         * typeck.c (c_expand_start_case): Do narrowing here.
12445         * semantics.c (finish_switch_cond): Not here.
12447 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
12449         * parse.y (asm_clobbers): Do string concatenation.
12451 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12453         * decl.c (pushtag): Don't put local classes in template functions
12454         on the local_classes list.
12456 2000-07-04  Scott Snyder  <snyder@fnal.gov>
12458         * decl2.c (get_guard): Add missing return for old ABI local
12459         variable case.
12461 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
12463         * cp-tree.h (char_type_p): New function.
12464         * decl.c (init_decl_processing): Don't initialize
12465         signed_wchar_type_node or unsigned_wchar_type_node.
12466         (complete_array_type): Handle brace-enclosed string-constants.
12467         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
12468         * tree.c (char_type_p): New function.
12469         * typeck2.c (digest_init): Use char_type_p.
12471 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12473         * pt.c (tsubst): Don't layout type, if it's error_mark.
12475 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
12477         * pt.c (instantiate_pending_templates): Reset template level.
12479 2000-07-05  Jason Merrill  <jason@redhat.com>
12481         * call.c (joust): Don't complain about `operator char *()' beating
12482         `operator const char *() const'.
12484 2000-07-04  scott snyder  <snyder@fnal.gov>
12485             Jason Merrill  <jason@redhat.com>
12487         * repo.c (repo_get_id): Handle the case where a class with virtual
12488         bases has a null TYPE_BINFO_VTABLE.
12490 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
12491             Jason Merrill  <jason@redhat.com>
12493         * parse.y (member_init): Just pass in the type.
12494         * init.c (expand_member_init): Handle getting a type.
12496 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12497             Jason Merrill  <jason@redhat.com>
12499         * decl.c (finish_function): Warn if a function has no return
12500         statement.
12501         Suggested by Andrew Koenig.
12502         * typeck.c (check_return_expr): Do set current_function_returns_value
12503         if we got an error_mark_node.
12505 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12507         * decl2.c (push_decl_namespace): Push the original namespace.
12509 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
12511         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
12512         * semantics.c (begin_class_definition): Clear it.
12514 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
12516         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
12517         (genrtl_expr_stmt): Likewise.
12518         (genrtl_decl_stmt): Likewise.
12519         (genrtl_if_stmt): Likewise.
12520         (genrtl_while_stmt): Likewise.
12521         (genrtl_do_stmt): Likewise.
12522         (genrtl_return_stmt): Likewise.
12523         (genrtl_for_stmt): Likewise.
12524         (genrtl_break_stmt): Likewise.
12525         (genrtl_continue_stmt): Likewise.
12526         (genrtl_scope_stmt): Likewise.
12527         (genrtl_switch_stmt): Likewise.
12528         (genrtl_case_label): Likewise.
12529         (genrtl_begin_compound_stmt): Likewise.
12530         (genrtl_finish_compound_stmt): Likewise.
12531         (genrtl_compound_stmt): Likewise.
12532         (genrtl_asm_stmt): Likewise.
12534         * init.c (begin_init_stmts): Remove call to
12535         genrtl_begin_compound_stmt.
12536         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
12538         * semantics.c (lang_expand_stmt): Changed call to
12539         genrtl_compound_stmt to ignore return value.
12541 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
12543         * mangle.c (canonicalize_for_substitution): Return the canonical
12544         variant of a type.
12546         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
12547         TYPE_DECL.
12548         * typeck.c (commonparms): Remove obstack manipulations.
12550 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
12552         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
12554         * Makefile.in (OBJS): Added ../c-semantics.o.
12555         (OBJDEPS): Likewise.
12557         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
12558         ../c-common.h.
12559         (struct stmt_tree): Added comment.
12560         (current_function_name_declared): Removed.
12561         (stmts_are_full_exprs_p): Likewise.
12562         (genrtl_do_pushlevel): Likewise.
12563         (genrtl_clear_out_block): Likewise.
12564         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
12565         (DECL_ANON_UNION_ELEMS): Likewise.
12566         (emit_local_var): Likewise.
12567         (make_rtl_for_local_static): Likewise.
12568         (do_case): Likewise.
12569         (expand_stmt): Likewise.
12570         (genrtl_decl_cleanup): Likewise.
12571         (c_expand_asm_operands): Likewise.
12572         (c_expand_return): Likewise.
12573         (c_expand_start_case): Likewise.
12575         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
12576         (emit_local_var): Likewise.
12577         (initialize_local_var): Change reference to
12578         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
12579         Change reference to stmts_are_full_exprs_p to
12580         current_stmt_tree->stmts_are_full_exprs_p.
12581         (push_cp_function_context): Likewise.
12583         * expect.c (expand_throw): Change reference to
12584         stmts_are_full_exprs_p.
12586         * init.c (build_aggr_init): Change reference to
12587         stmts_are_full_exprs_p.
12588         (build_vec_init): Likewise.
12590         * optimize.c (maybe_clone_body): Change reference to
12591         current_function_name_declared to
12592         cp_function_chain->name_declared.
12594         * pt.c (instantiate_decl): Change reference to
12595         current_function_name_declared to
12596         cp_function_chain->name_declared.
12598         * semantics.c (expand_cond): Moved declaration to c-common.h.
12599         (genrtl_do_pushlevel): Moved to c-semantics.c.
12600         (genrtl_clear_out_block): Likewise.
12601         (genrtl_goto_stmt): Likewise.
12602         (genrtl_expr_stmt): Likewise.
12603         (genrtl_decl_stmt): Likewise.
12604         (gerntl_if_stmt): Likewise.
12605         (genrtl_while_stmt): Likewise.
12606         (genrtl_do_stmt): Likewise.
12607         (genrtl_return_stmt): Likewise.
12608         (genrtl_for_stmt): Likewise.
12609         (genrtl_break_stmt): Likewise.
12610         (genrtl_continue_stmt): Likewise.
12611         (genrtl_scope_stmt): Likewise.
12612         (genrtl_switch_stmt): Likewise.
12613         (genrtl_case_label): Likewise.
12614         (genrtl_begin_compound_stmt): Likewise.
12615         (genrtl_finish_compound_stmt): Likewise.
12616         (genrtl_compound_stmt): Likewise.
12617         (genrtl_asm_stmt): Likewise.
12618         (genrtl_decl_cleanup): Likewise.
12619         (expand_cond): Likewise.
12620         (expand_stmt): Renamed to ...
12621         (lang_expand_stmt): ... this.
12622         (lang_expand_expr_stmt): Initialize.
12623         (set_current_function_name_declared): Likewise.
12624         (stmts_are_full_exprs_p): Likewise.
12625         (current_function_name_declared): Likewise.
12626         (anon_aggr_type_p): Likewise.
12627         (do_poplevel): Change reference to
12628         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
12629         Change reference to stmts_are_full_exprs_p to
12630         current_stmt_tree->stmts_are_full_exprs_p.
12631         (add_tree): Likewise.
12632         (finish_expr_stmt): Likewise.
12633         (prep_stmt): Likewise.
12634         (lang_expand_stmt): Likewise.
12635         (begin_compound_stmt): Change reference to
12636         current_function_name_declared to
12637         cp_function_chain->name_declared and call to
12638         current_function_name_declared().
12639         (setup_vtbl_ptr): Likewise.
12640         (genrtl_do_poplevel): Removed.
12642 2000-06-30  Jason Merrill  <jason@redhat.com>
12644         * init.c (init_init_processing): Go back to aligning like
12645         double_type_node for old ABI.
12646         (get_cookie_size): Make cookie larger if we get a type that needs
12647         more alignment.
12648         (build_vec_delete): Call it.
12650         * typeck.c (qualify_type_recursive): New fn.
12651         (composite_pointer_type): Use it.
12652         (build_binary_op): Use composite_pointer_type.
12654 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
12655             Jason Merrill  <jason@redhat.com>
12657         * typeck.c (check_return_expr): Don't complain about returning
12658         NULL from operator new if -fcheck-new.
12659         * cp-tree.h: Declare flag_check_new here.
12660         * init.c: Not here.
12662 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12664         * mangle.c (find_substitution): Use same_type_p.
12665         (write_encoding): Don't check for substitutions.
12667 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12669         * parse.y (expr_no_comma_rangle): New non-terminal.
12670         (template_parm): Use it for default parameter case.
12671         (template_arg): Use it.
12672         (expr_no_commas): Remove commented out undefined extensions.
12673         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12674         * parse.h, parse.c: Rebuilt.
12676 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
12678         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
12679         (finish_asm_stmt): Do it here, instead.
12681         * cp-tree.h (ridpointers): Don't declare.
12682         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
12683         (record_builtin_java_type): Likewise.
12684         (init_decl_processing): Likewise.
12685         * lex.c: Move inclusion of lex.h.
12686         (ridpointers): Don't define.
12687         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
12688         RID_MAX.
12689         * lex.h (enum rid): Rename to ...
12690         (enum cp_rid): ... this.
12691         (ridpointers): Don't declare.
12692         * parse.y: Move inclusion of lex.h.
12693         * parse.c: Regenerated.
12694         * spew.c: Move inclusion of lex.h.
12696         * cp-tree.h (struct language_function): Remove temp_name_counter.
12697         (temp_name_counter): Remove.
12698         (get_temp_name): Change prototype.
12699         (get_guard): New function.
12700         (get_guard_cond): Likewise.
12701         (set_guard): Likewise.
12702         * cvt.c (build_up_reference): Adjust call to get_temp_name.
12703         * decl.c (expand_static_init): Use get_guard and friends to
12704         implement guard variables.
12705         * decl2.c (get_temp_name): Assume that the variables created are
12706         always static.
12707         (get_sentry): Rename to ...
12708         (get_guard): ... this.  Implement new ABI guard variables.
12709         (get_guard_bits): New function.
12710         (get_guard_cond): Likewise.
12711         (set_guard): Likewise.
12712         (start_static_initialization_or_destruction): Use them.
12713         (do_static_initialization): Replace sentry with guard throughout.
12714         (do_static_destruction): Likewise.
12715         * init.c (create_temporary_var): Add comment.
12717 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
12719         * mangle.c (find_substitution): Use same_type_p.
12720         (write_encoding): Don't check for substitutions.
12722 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
12724         * parse.y (expr_no_comma_rangle): New non-terminal.
12725         (template_parm): Use it for default parameter case.
12726         (template_arg): Use it.
12727         (expr_no_commas): Remove commented out undefined extensions.
12728         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
12729         * parse.h, parse.c: Rebuilt.
12731 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
12733         * cp-tree.h (flag_const_strings): Remove.
12734         (warn_parentheses): Likewise.
12735         (warn_format): Likewise.
12736         (common_type): Likewise.
12737         (default_conversion): Likewise.
12738         (build_binary_op): Likewise.
12739         (cp_build_binary_op): New macro.
12740         * call.c (build_new_op): Use cp_build_binary_op instead of
12741         build_binary_op.
12742         * class.c (build_vtable_entry_ref): Likewise.
12743         * decl.c (expand_static_init): Likewise.
12744         (compute_array_index_type): Likewise.
12745         (build_enumerator): Likewise.
12746         * decl2.c (delete_sanity): Likewise.
12747         (start_static_initialization_or_destruction): Likewise.
12748         * error.c (dump_type_suffix): Likewise.
12749         * init.c (resolve_offset_ref): Likewise.
12750         (build_new): Likewise.
12751         (build_new_1): Likewise.
12752         (build_vec_delete_1): Likewise.
12753         (build_vec_init): Likewise.
12754         (build_delete): Likewise.
12755         * rtti.c (synthesize_tinfo_fn): Likewise.
12756         (synthesize_tinfo_var): Likewise.
12757         * search.c (expand_upcast_fixups): Likewise.
12758         (fixup_all_virtual_upcast_offsets): Likewise.
12759         * typeck.c (build_array_ref): Likewise.
12760         (get_member_function_from_ptrfunc): Likewise.
12761         (build_binary_op): Add parameter.
12762         (pointer_int_sum): Use cp_build_binary_op.
12763         (pointer_diff): Likewise.
12764         (build_modify_expr): Likewise.
12765         (get_delta_difference): Likewise.
12766         (build_ptrmemfunc): Likewise.
12768 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12770         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
12771         * decl.c (create_implicit_typedef): Adjust.
12772         * decl2.c (build_artificial_parm): Adjust.
12773         * method.c (implicitly_declare_fn): Adjust.
12774         * pt.c (push_inline_template_parms_recursive): Adjust.
12775         (process_template_parm): Adjust.
12776         (overloaded_template_name): Adjust.
12777         * semantics.c (finish_template_template_parm): Adjust.
12779 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
12781         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
12782         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
12783         where to emit thunks.
12784         (build_vtt): Adjust call to build_vtt_inits.
12785         (build_vtt_inits): Add parameter to indicate whether or not
12786         sub-VTTs for virtual bases should be included.  Adjust handling of
12787         construction vtables.
12788         (get_matching_base): New function.
12789         (dfs_build_vtt_inits): Rename to ...
12790         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
12791         construction vtables.
12792         (dfs_fixup_binfo_vtbls): Likewise.
12793         (build_ctor_vtbl_groups): Build construction vtables for virtual
12794         bases, too.
12795         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
12796         to build construction vtbls.
12797         (dfs_accumulate_vtbl_inits): Adjust handling of
12798         construction vtables.
12800         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
12801         types correctly.
12803 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
12805         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
12807 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12809         * search.c (hides): Remove.
12810         (is_subobject_of_p): Add most_derived parameter. Use
12811         CANONICAL_BINFO.
12812         (lookup_field_queue_p): Adjust.
12813         (lookup_field_r): Adjust.
12815 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12817         * decl2.c (handle_class_head): Bash typedefs to the type's main
12818         decl.
12820 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
12822         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
12823         (begin_global_stmt_expr): ... this.
12824         (genrtl_finish_stmt_expr): Rename to ...
12825         (finish_global_stmt_expr): ... this.
12826         * init.c (begin_init_stmts): Adjust calls.
12827         (finish_init_stmts): Likewise.
12828         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
12829         (begin_global_stmt_expr): ... this.
12830         (genrtl_finish_stmt_expr): Rename to ...
12831         (finish_global_stmt_expr): ... this.
12833 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12835         * search.c (lookup_member): Fix typo in comment.
12837 2000-06-24  Jason Merrill  <jason@redhat.com>
12839         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
12840         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
12842 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12844         * parse.y (complex_direct_notype_declarator): Support global_scope.
12845         * Makefile.in: Adjust conflict count.
12847 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12849         * parse.y (template_arg): Convert TEMPLATE_DECL
12850         that is a template template parameter to
12851         TEMPLATE_TEMPLATE_PARM here.
12853         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12854         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
12855         (copy_template_template_parm): Adjust prototype.
12856         * decl.c (grokdeclarator): Remove dead code.
12857         * pt.c (process_template_parm): Tidy.
12858         (lookup_template_class): Construct nodes in
12859         copy_template_template_parm.
12860         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
12861         lookup_template_class.  Use TYPE_TI_TEMPLATE.
12862         * tree.c (copy_template_template_parm): Add NEWARGS
12863         parameter.
12864         (mapcar): Adjust call to copy_template_template_parm.
12865         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
12866         * method.c (build_template_template_parm_names): Change error
12867         code to avoid compilation warning.
12869         * gxxint.texi: Document template template parameter
12870         name mangling.
12872 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
12874         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
12875         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
12876         (cp-demangle.o): New rule.
12877         (dyn-string.o): Likewise.
12878         * inc/cxxabi.h (__cxa_demangle): New declaration.
12880 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
12882         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
12883         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
12884         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
12885         a tree, not an int.
12886         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
12887         (make_thunk): Change prototype.
12888         (emit_thunk): Rename to use_thunk.
12889         (mangle_thunk): Change prototype.
12890         * class.c (get_derived_offset): Simplify.
12891         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
12892         BV_GENERATE_THUNK_WITH_VTABLE_P.
12893         (build_primary_vtable): Simplify.
12894         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
12895         (dfs_find_base): Remove.
12896         (update_vtable_entry_for_fn): Correct bug in finding the base
12897         where a virtual function was first declared.  Figure out whether
12898         or not to emit a vcall-thunk with the vtables in which it appears.
12899         Correct logic for deciding whether to use an ordinary thunk, or a
12900         vcall thunk.
12901         (finish_struct_1): Remove unnecssary code.
12902         (build_vtbl_initializer): Use ssize_int for the running counter of
12903         negative indices.
12904         (build_vtbl_initializer): Only use vcall thunks where necessary.
12905         Mark thunks as needing to be emitted with their vtables, or not.
12906         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
12907         indices.  Use size_binop.
12908         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
12909         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
12910         size_binop.
12911         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
12912         (build_vtable_entry): Mark thunks as needing to be emitted with
12913         their vtables, or not.
12914         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
12915         * decl2.c (mark_vtable_entries): Use use_thunk instead of
12916         emit_thunk.
12917         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
12918         information.
12919         * error.c (dump_expr): Use BV_FN.
12920         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
12921         not an int.
12922         * method.c (make_thunk): Likewise.
12923         (emit_thunk): Rename to use_thunk.  Allow callers to decide
12924         whether or not to actually emit the thunk.  Adjust for changes in
12925         representation of vcall offsets.
12926         * search.c (dfs_get_pure_virtuals): Use BV_FN.
12927         * semantics.c (emit_associated_thunks): New function.
12928         (expand_body): Use it.
12929         * ir.texi: Adjust decriptions of thunks.
12931 2000-06-22  Jason Merrill  <jason@redhat.com>
12933         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
12934         (tsubst_friend_function): Copy it here.
12936         * decl.c (grok_op_properties): Fix typo.
12938         * decl2.c (delete_sanity): Clarify warning, avoid failure on
12939         deleting void*.
12941         * pt.c (check_explicit_specialization): Clarify error.
12943         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
12944         an old OVERLOAD when we're declaring a non-function.
12945         (pushdecl, destroy_local_var): Check for error_mark_node.
12946         (warn_extern_redeclared_static): Also bail early if
12947         we're a CONST_DECL.
12948         (push_overloaded_decl): Ignore an old error_mark_node.
12950 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
12952         * call.c (build_x_va_arg): Check if in a template decl.
12953         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
12955 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12957         * class.c (push_lang_context): TYPE_NAME gets you to the Java
12958         types DECLs.
12959         * decl.c (check_goto): Computed gotos assumed OK.
12961 2000-06-20  Jason Merrill  <jason@redhat.com>
12963         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
12964         for which we don't need to look for instantiations.
12966 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
12968         * parse.y (program): Always call finish_translation_unit.
12969         * parse.c, parse.h: Rebuilt.
12971 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
12973         * method.c: Don't include hard-reg-set.h.
12975 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12977         * rtti.c (get_base_offset): Cope when vbase field is in a base.
12979 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12981         * call.c (build_conditional_expr): Use VOID_TYPE_P.
12982         * cvt.c (cp_convert_to_pointer): Likewise.
12983         (convert_to_void): Likewise.
12984         * error.c (dump_expr): Likewise.
12985         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
12986         * init.c (build_delete): Likewise.
12987         * method.c (emit_thunk): Likewise.
12988         * optmize.c (declare_return_variable): Likewise.
12989         * rtti.c (get_tinfo_decl_dynamic): Likewise.
12990         (get_typeid): Likewise.
12991         (build_dynamic_cast_1): Likewise.
12992         * typeck.c (composite_pointer_type): Likewise.
12993         (common_type): Likewise.
12994         (build_indirect_ref): Likewise.
12995         (build_binary_op): Likewise.
12996         (build_x_compound_expr): Likewise.
12997         (check_return_expr): Likewise.
12998         * typeck2.c (add_exception_specifier): Likewise.
13000         * mangle.c (write_method_parms): Use direct comparison for end
13001         of parmlist.
13003 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
13005         * cp-tree.h (genrtl_try_block): Declare function.
13006         (genrtl_handler): Likewise.
13007         (genrtl_catch_block): Likewise.
13008         (genrtl_ctor_stmt): Likewise.
13009         (genrtl_subobject): Likewise.
13010         (genrtl_decl_cleanup): Likewise.
13011         (genrtl_do_poplevel): Likewise.
13012         (genrtl_do_pushlevel): Likewise.
13013         (genrtl_clear_out_block): Likewise.
13014         (genrtl_goto_stmt): Likewise.
13015         (genrtl_expr_stmt): Likewise.
13016         (genrtl_decl_stmt): Likewise.
13017         (genrtl_if_stmt): Likewise.
13018         (genrtl_while_stmt): Likewise.
13019         (genrtl_do_stmt): Likewise.
13020         (genrtl_return_stmt): Likewise.
13021         (genrtl_for_stmt): Likewise.
13022         (genrtl_break_stmt): Likewise.
13023         (genrtl_continue_stmt): Likewise.
13024         (genrtl_scope_stmt): Likewise.
13025         (genrtl_switch_stmt): Likewise.
13026         (genrtl_case_label): Likewise.
13027         (genrtl_begin_compound_stmt): Likewise.
13028         (genrtl_finish_compound_stmt): Likewise.
13029         (genrtl_compound_stmt): Likewise.
13030         (genrtl_asm_stmt): Likewise.
13031         (genrtl_named_return_value): Likewise.
13032         (genrtl_begin_stmt_expr): Likewise.
13033         (genrtl_finish_stmt_expr): Likewise.
13034         (finish_for_stmt): Removed first argument.
13035         (finish_switch_stmt): Likewise.
13037         * semantics.c (genrtl_try_block): Define function.
13038         (genrtl_handler): Likewise.
13039         (genrtl_catch_block): Likewise.
13040         (genrtl_ctor_stmt): Likewise.
13041         (genrtl_subobject): Likewise.
13042         (genrtl_decl_cleanup): Likewise.
13043         (genrtl_do_poplevel): Likewise.
13044         (genrtl_do_pushlevel): Likewise.
13045         (genrtl_clear_out_block): Likewise.
13046         (genrtl_goto_stmt): Likewise.
13047         (genrtl_expr_stmt): Likewise.
13048         (genrtl_decl_stmt): Likewise.
13049         (genrtl_if_stmt): Likewise.
13050         (genrtl_while_stmt): Likewise.
13051         (genrtl_do_stmt): Likewise.
13052         (genrtl_return_stmt): Likewise.
13053         (genrtl_for_stmt): Likewise.
13054         (genrtl_break_stmt): Likewise.
13055         (genrtl_continue_stmt): Likewise.
13056         (genrtl_scope_stmt): Likewise.
13057         (genrtl_switch_stmt): Likewise.
13058         (genrtl_case_label): Likewise.
13059         (genrtl_begin_compound_stmt): Likewise.
13060         (genrtl_finish_compound_stmt): Likewise.
13061         (genrtl_compound_stmt): Likewise.
13062         (genrtl_asm_stmt): Likewise.
13063         (genrtl_named_return_value): Likewise.
13064         (genrtl_begin_stmt_expr): Likewise.
13065         (genrtl_finish_stmt_expr): Likewise.
13066         (finish_for_stmt): Removed first argument and generate rtl
13067         specific code.
13068         (finish_switch_stmt): Likewise.
13069         (do_poplevel): Removed generate rtl specific code.
13070         (do_pushlevel): Likewise.
13071         (add_tree): Likewise.
13072         (finish_goto_stmt): Likewise.
13073         (finish_expr_stmt): Likewise.
13074         (begin_if_stmt): Likewise.
13075         (finish_if_stmt_cond): Likewise.
13076         (finish_then_clause): Likewise.
13077         (begin_else_clause): Likewise.
13078         (finish_else_clause): Likewise.
13079         (finish_if_stmt): Likewise.
13080         (clear_out_block): Likewise.
13081         (begin_while_stmt): Likewise.
13082         (finish_while_stmt_cond): Likewise.
13083         (finish_while_stmt): Likewise.
13084         (begin_do_stmt): Likewise.
13085         (finish_do_body): Likewise.
13086         (finish_do_stmt): Likewise.
13087         (finish_return_stmt): Likewise.
13088         (begin_for_stmt): Likewise.
13089         (finish_for_init_stmt): Likewise.
13090         (finish_for_cond): Likewise.
13091         (finish_for_expr): Likewise.
13092         (finish_break_stmt): Likewise.
13093         (finish_continue_stmt): Likewise.
13094         (begin_switch_stmt): Likewise.
13095         (finish_switch_cond): Likewise.
13096         (finish_case_label): Likewise.
13097         (begin_try_block): Likewise.
13098         (begin_function_try_block): Likewise.
13099         (finish_try_block): Likewise.
13100         (finish_cleanup_try_block): Likewise.
13101         (finish_cleanup): Likewise.
13102         (finish_function_try_block): Likewise.
13103         (finish_handler_sequence): Likewise.
13104         (finish_function_handler_sequence): Likewise.
13105         (begin_handler): Likewise.
13106         (finish_handler_parms): Likewise.
13107         (begin_catch_block): Likewise.
13108         (finish_handler): Likewise.
13109         (begin_compound_stmt): Likewise.
13110         (finish_compound_stmt): Likewise.
13111         (finish_asm_stmt): Likewise.
13112         (finish_label_stmt): Likewise.
13113         (finish_label_decl): Likewise.
13114         (finish_subobject): Likewise.
13115         (finish_decl_cleanup): Likewise.
13116         (finish_named_return_value): Likewise.
13117         (begin_stmt_expr): Likewise.
13118         (finish_stmt_expr): Likewise.
13120         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
13121         to call genrtl_expr_stmt when appropriate.
13123         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
13124         begin_compound_expr to call genrtl_begin_stmt_expr and
13125         genrtl_begin_compound_expr when appropriate.
13126         (finish_init_stmts): Changed calls to finish_compound_expr and
13127         finish_stmt_expr to call genrtl_finish_compound_expr and
13128         genrtl_finish_stmt_expr when appropriate.
13129         (expand_default_init): Changed call to finish_expr_stmt to call
13130         genrtl_expr_stmt when appropriate.
13131         (build_vec_init): Likewise.
13133         * parse.y (simple_stmt): Removed first argument from call to
13134         finish_for_stmt. Removed first argument from call to
13135         finish_switch_stmt.
13137         * parse.c: Regenerated.
13139         * pt.c (tsubst_expr): Removed first argument from call to
13140         finish_for_stmt. Removed first argument from call to
13141         finish_switch_stmt.
13143 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
13145         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
13146         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
13148         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
13149         (cplus_tree_code_length[]): Likewise.
13150         (cplus_tree_code_name[]): Likewise.
13151         (init_parse): Added call to add_c_tree_codes. Changed
13152         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
13154 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
13156         * cp-tree.h (finish_mem_initializers): Declare.
13157         (count_trees): Likewise.
13158         * parse.y (base_init): Use finish_mem_initializers.
13159         * semantics.c (finish_mem_initializers): New function.
13161         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
13162         the number of trees.
13163         (n_trees): Remove.
13164         (count_trees): Don't use it.
13166 2000-06-15  Jason Merrill  <jason@redhat.com>
13168         * tree.c (count_trees): New debugging function.
13170         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
13171         * init.c (build_member_call): Pull out the name of a DECL.
13173         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
13174         * semantics.c (expand_body): Push to TV_INTEGRATION here.
13175         * optimize.c (optimize_function): Not here.
13176         * pt.c (instantiate_decl): Push to TV_PARSE.
13178 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
13180         * cp-tree.h (struct language_function): Remove x_base_init_list
13181         and x_member_init_list.
13182         (current_base_init_list): Remove.
13183         (current_member_init_list): Likewise.
13184         (setup_vtbl_ptr): Change prototype.
13185         (emit_base_init): Likewise.
13186         (expand_member_init): Likewise.
13187         (reinit_parse_for_function): Remove.
13188         * decl.c (save_function_data): Don't clear x_base_init_list and
13189         x_member_init_list.
13190         (mark_language_function): Don't mark them.
13191         * init.c (perform_member_init): Tweak comment.
13192         (sort_member_init): Take the list of initializers as an argument.
13193         (sort_base_init): Likewise.
13194         (emit_base_init): Likewise.
13195         (expand_member_init): Return the initializer.  Don't use global
13196         variables.
13197         * lex.c (reinit_parse_for_function): Remove.
13198         * method.c (build_template_parm_names): Correct substitution.
13199         (do_build_copy_constructor): Don't use current_member_init_list
13200         and current_base_init_list.
13201         (synthesize_method): Likewise.
13202         * parse.y (base_init): Split mem-initializers into
13203         base-initializers and field-initializers.
13204         (member_init_list): Build up the list here.
13205         (member_init): Return the initializer.
13206         (fn.depfn): Don't use reinit_parse_for_function.
13207         * parse.c: Regenerated.
13208         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
13209         ERROR_MARK.
13210         (tsubst_expr): Don't use current_member_init_list
13211         and current_base_init_list.
13212         (tsubst_expr_values): Rename to ...
13213         (tsubst_initializer_list): ... this.  Use convert_from_reference.
13214         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
13215         and current_base_init_list.
13216         (begin_function_definition): Don't call reinit_parse_for_function.
13218         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
13220         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
13221         correctly.
13223         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
13225 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
13227         * cp-tree.h (IF_COND): Move to c-common.h.
13228         (THEN_CLAUSE): Likewise.
13229         (ELSE_CLAUSE): Likewise.
13230         (WHILE_COND): Likewise.
13231         (WHILE_BODY): Likewise.
13232         (DO_COND): Likewise.
13233         (DO_BODY): Likewise.
13234         (RETURN_EXPR): Likewise.
13235         (EXPR_STMT_EXPR): Likewise.
13236         (FOR_INIT_STMT): Likewise.
13237         (FOR_COND): Likewise.
13238         (FOR_EXPR): Likewise.
13239         (FOR_BODY): Likewise.
13240         (SWITCH_COND): Likewise.
13241         (SWITCH_BODY): Likewise.
13242         (CASE_LOW): Likewise.
13243         (CASE_HIGH): Likewise.
13244         (GOTO_DESTINATION): Likewise.
13245         (COMPOUND_BODY): Likewise.
13246         (ASM_CV_QUAL): Likewise.
13247         (ASM_STRING): Likewise.
13248         (ASM_OUTPUTS): Likewise.
13249         (ASM_INPUTS): Likewise.
13250         (ASM_CLOBBERS): Likewise.
13251         (DECL_STMT_DECL): Likewise.
13252         (STMT_EXPR_STMT): Likewise.
13253         (LABEL_STMT_LABEL): Likewise.
13254         (SCOPE_BEGIN_P): Likewise.
13255         (SCOPE_END_P): Likewise.
13256         (SCOPE_STMT_BLOCK): Likewise.
13257         (SCOPE_NULLIFIED_P): Likewise.
13258         (SCOPE_NO_CLEANUPS_P): Likewise.
13259         (SCOPE_PARTIAL_P): Likewise.
13260         (ASM_VOLATILE_P): Likewise.
13261         (STMT_LINENO): Likewise.
13262         (STMT_LINENO_FOR_FN_P): Likewise.
13264         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
13265         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
13266         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
13267         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
13268         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
13270         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
13272         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
13273         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
13275         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
13276         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
13277         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
13279 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
13281         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
13282         * class.c (dfs_find_final_overrider): Set it appropriately.
13283         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
13284         avoid unneeded secondary vptrs.
13286 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13288         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
13289         (check_bitfield_decl, check_field_decl): Likewise.
13290         (build_vtbl_or_vbase_field, build_base_field): Likewise.
13291         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
13292         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
13293         (xfer_tag, finish_enum): Likewise.
13294         * decl2.c (finish_builtin_type): Likewise.
13295         * init.c (init_init_processing): Likewise.
13296         * pt.c (instantiate_class_template): Likewise.
13297         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
13298         * cp-tree.h (struct lang_type): Add user_align member.
13299         (CLASSTYPE_USER_ALIGN): Define.
13301 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
13303         * Make-lang.in (c++.install-common): Install g++-cross in
13304         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
13305         $(target_alias)-g++ and $(target_alias)-c++.
13307 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
13309         * class.c (vcall_offset_data_s): Add last_init and fns.
13310         (overrides): Rename to same_signature_p.
13311         (dfs_find_final_overrider): Adjust accordingly.
13312         (mark_overriders): Likewise.
13313         (warn_hidden): Likewise.
13314         (build_vtbl_initializer): Reorganize machinery for building things
13315         at negative offsets.
13316         (build_vcall_and_vbase_vtbl_entries): Likewise.
13317         (build_vbase_offset_vtbl_entries): Likewise.
13318         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
13319         offset entries.  Do not create two entries for functions with the
13320         same signature.
13321         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
13322         (build_rtti_vtbl_entries): Reorganize machinery for building things
13323         at negative offsets.
13325         * optimize.c (expand_call_inline): Don't recurse into the code
13326         used to initialize the parameters more than once.
13328 2000-06-11  Mark Mitchell <mark@codesourcery.com>
13330         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
13331         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
13332         (find_substitution): Only use the `Sa' substitution for
13333         std::allocator, not instantiations of it.
13334         (write_template_prefix): Move comment.  Only use a TREE_LIST to
13335         represent substitutions for a member template.
13336         (write_array_type): Mangle array dimensions correctly.
13337         * optimize.c (maybe_clone_body): Copy more information from the
13338         cloned function.
13339         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
13340         on the regenerated declaration.
13342 2000-06-11  Chip Salzenberg  <chip@valinux.com>
13343             Mark Mitchell <mark@codesourcery.com>
13345         * class.c (build_vtable): Clarify comment.
13346         (build_ctor_vtbl_group): Pass the most derived type to
13347         build_vtable.
13349 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13351         * decl2.c (compare_options): Don't needlessly cast away const-ness.
13353 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
13355         * decl.c (add_binding): Handle duplicate declarations of external
13356         variables.
13358 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13359             Mark Mitchell <mark@codesourcery.com>
13361         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
13362         argument.
13363         (write_signed_number): New macro.
13364         (write_unsigned_number): Likewise.
13365         (write_source_name): Use them.
13366         (write_number): Handle signed and unsigned values.
13367         (write_integer_cst): Use tree_int_cst_sgn, and use
13368         write_unsigned_number or write_signed_number as appropriate.
13369         (write_discriminator): Use write_unsigned_number or
13370         write_signed_number as appropriate.
13371         (write_template_arg_literal): Likewise.
13372         (write_array_type): Use tree_low_cst.
13373         (write_template_parm):  Use write_unsigned_number or
13374         write_signed_number as appropriate.
13375         (write_substitution): Adjust call to write_number.
13376         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
13377         (write_expression): Handle non-type template arguments of
13378         reference type correctly.
13379         (mangle_thunk): Use write_signed_number.
13381 2000-06-09  Chip Salzenberg  <chip@valinux.com>
13383         * mangle.c (find_substition): Don't mangle objects with typename
13384         substitutions (e.g. "cin" as "Si").
13386 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
13388         * call.c (add_candidate): Use ggc_alloc_cleared.
13389         * decl.c (lookup_label): Likewise.
13390         * lex.c (retrofit_lang_decl): Likewise.
13392 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
13394         * semantics.c (expand_body): Push to TV_EXPAND.
13395         * optimize.c (optimize_function): Push to TV_INTEGRATION.
13396         * decl.c (start_function): Always call announce_function.
13398         * tinfo2.cc: Just declare abort.
13400 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
13402         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
13403         whenever @ is a symbolic name.
13405 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
13407         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
13409 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
13411         * decl.c (pushdecl): Look up functions by DECL_NAME, not
13412         DECL_ASSEMBLER_NAME.
13414 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13416         * decl2.c (c_language): Define.
13418 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
13420         * lex.c (lang_init_options): Tweak.
13422         * decl2.c: Remove #inclusion of diagnostic.h
13423         (lang_decode_option): Move diagnostic formatting options to
13424         toplevel.
13426         * lang-options.h: Remove documentation for diagnostic options.
13428         * Makefile.in (lex.o): Depends upon diagnostic.h
13430 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
13432         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
13433         the same DECL_RESULT, it's not a redefinition.
13434         * pt.c (tsubst_decl): Remove code to handle illegal
13435         specializations.
13437 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
13439         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
13441 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
13443         * search.c (maybe_suppress_debug_info): Don't check
13444         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
13446         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
13447         here if extern_p.
13449         Remember instantiation context in deferred instantiations.
13450         * cp-tree.h (struct tinst_level): Remove.
13451         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
13452         * pt.c (current_tinst_level): Now a tree.
13453         (print_template_context, push_tinst_level, pop_tinst_level,
13454         tinst_for_decl): Adjust.
13455         (reopen_tinst_level): New fn.
13456         (init_pt): Register current_tinst_level as a root.
13457         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
13458         of the pending templates list.
13459         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
13460         * lex.c (extract_interface_info): Adjust.
13461         * decl2.c (warn_if_unknown_interface): Adjust.
13463 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
13465         * class.c (indirect_primary_base_p): New function.
13466         (determine_primary_base): Use it.
13468 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
13470         Update new-abi dynamic cast algorithm.
13471         * tinfo.cc (__class_type_info::__dyncast_result): Add
13472         whole_details. Adjust constructor.
13473         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
13474         Avoid unnecessary searching.
13475         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
13477 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13479         * decl.c (init_decl_processing): Don't call record_component_aliases.
13480         * tree.c (build_cplus_array_type_1): Likewise.
13482 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
13484         * ir.texi: Correct typo.
13485         * mangle.c (write_expression): Handle non-type template arguments
13486         with reference type.
13487         * method.c (build_overload_value): Likewise.
13488         * pt.c (convert_nontype_argument): Explicitly represent conversion
13489         to a reference with an ADDR_EXPR.
13490         (unify): Always unify arguments in left-to-right order.
13492 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
13493             Mark Mitchell  <mark@codesourcery.com>
13495         * Make-lang.in (CXX_SRCS): Add mangle.c.
13496         * Makefile.in (CXX_OBJS): Add mangle.o.
13497         (mangle.o): New rule.
13499         * class.c (local_classes): New variable.
13500         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
13501         (get_vtt_name): Use mangle_vtt_name for new ABI.
13502         (init_class_processing): Initialize local_classes.
13503         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
13504         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
13505         (std_identifier): New macro.
13506         (DECL_VOLATILE_MEMFUNC_P): New macro.
13507         (DECL_NAMESPACE_STD_P): Likewise.
13508         (local_classes): Declare.
13509         (get_mostly_instantiated_function_type): Declare.
13510         (init_mangle): Declare.
13511         (mangle_decl): Likewise.
13512         (mangle_type_string): Likewise.
13513         (mangle_type): Likewise.
13514         (mangle_typeinfo_for_type): Likewise.
13515         (mangle_typeinfo_string_for_type): Likewise.
13516         (mangle_vtbl_for_type): Likewise.
13517         (mangle_vtt_for_type): Likewise.
13518         (mangle_ctor_vtbl_for_type): Likewise.
13519         (mangle_thunk): Likewise.
13520         (mangle_conv_op_name_for_type): Likewise.
13521         (mangle_guard_variable): Likewise.
13522         * decl.c (pushtag): Keep track of local classes.
13523         (initialize_predefined_identifiers): Initialize std_identifier.
13524         (init_decl_processing): Use std_identifier.
13525         (start_decl): Don't treat instantiations as specializations.
13526         (grokdeclarator): Likewise.
13527         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
13528         name for fully-instantiated templates.
13529         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
13530         destructors with the new ABI.
13531         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
13532         (grokfield): Use mangle_type for new ABI.
13533         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
13534         (get_sentry): Use mangle_guard_variable for new ABI.
13535         (start_static_initialization_or_destruction): Likewise.
13536         * expr.c (extract_aggr_init): Remove.
13537         (extract_scalar_init): Likewise.
13538         (extract_init): Remove #if 0'd code.
13539         * mangle.c: New function.
13540         * method.c (build_mangled_name): Assert not flag_new_abi.
13541         (build_static_name): Likewise.
13542         (build_decl_overload_real): Likewise.
13543         (build_typename_overload): Likewise.
13544         (build_overload_with_type): Likewise.
13545         (build_overload_name): Likewise.
13546         (get_ctor_vtbl_name): Likewise.
13547         (start_squangling): Likewise.
13548         (get_id_2): Likewise.
13549         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
13550         (init_method): Call init_mangle for new ABI.
13551         (make_thunk): Call mangle_thunk for new ABI.
13552         * operators.def: Correct new ABI manglings for the `%' operator.
13553         Add `::' operator.
13554         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
13555         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
13556         (lookup_template_class): Call mangle_decl for new ABI.
13557         (get_mostly_instantiated_function_type): New function.
13558         (set_mangled_name_for_template_decl): Use it.
13559         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
13560         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
13561         conversion op names.
13562         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
13563         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
13564         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
13565         mangle_typeinfo_string_for_type.
13567 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
13569         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
13570         (INNERMOST_TEMPLATE_ARGS): New macro.
13571         (innermost_args): Remove.
13572         (get_innermost_template_args): New function.
13573         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
13574         * error.c (dump_function_decl): Be caution when using
13575         most_general_template.
13576         * method.c (build_template_parm_names):  Use
13577         INNERMOST_TEMPLATE_ARGS.
13578         * pt.c (add_to_template_args): Tidy comment
13579         (get_innermost_template_args): New function.
13580         (check_explicit_specialization): Clear DECL_INITIAL for a new
13581         specialization.
13582         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
13583         Tidy.
13584         (push_template_decl): Always register specializations of the most
13585         general template.
13586         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
13587         (coerce_template_parms): Likewise.
13588         (lookup_template_class): Likewise.
13589         (innermost_args): Remove.
13590         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
13591         (tsubst_decl): Handle tricky specializations.  Use
13592         get_innermost_template_args.
13593         (instantiate_template): Simplify handling of partial
13594         instantiations.
13595         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
13596         (most_general_template): Reimplement, in a more straightforward
13597         manner.
13598         (regenerate_decl_from_template): Tweak formatting.  Use
13599         TMPL_ARGS_DEPTH for clarity.
13600         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
13602         * dump.c (dequeue_and_dump): Dump information about thunks.
13604 2000-06-01  Richard Henderson  <rth@cygnus.com>
13606         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
13608 2000-06-01  Richard Henderson  <rth@cygnus.com>
13610         * decl2.c (unsupported_options): Fix typo, make const.
13611         (lang_decode_option): Fix bsearch argument order.
13613 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
13615         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
13616         on FIELD_DECLs.
13618 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13620         * cp-tree.h (c_get_alias_set): Deleted.
13621         * Makefile.in (decl.o): Include ../expr.h.
13622         * decl.c (expr.h): Include.
13623         (init_decl_processing): Call record_component_aliases for arrays.
13624         (grokdeclarator): Likewise.
13625         Set TREE_ADDRESSABLE for fields that aren't bitfields.
13626         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
13628 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
13630         Remove guiding declaration support.
13631         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
13632         (flag_guiding_decls): Remove.
13633         * call.c (build_user_type_conversion_1): Remove support for
13634         guiding decls.
13635         (build_new_function_call): Likewise.
13636         (build_new_op): Likewise.
13637         (build_new_method_call): Likewise.
13638         * decl.c (start_function): Likewise.
13639         * friend.c (is_friend): Likewise.
13640         (do_friend): Likewise.
13641         * decl2.c ((flag_dump_translation_unit): Make it const.
13642         (flag_guiding_decls): Remove.
13643         (unsupported_options): New variable
13644         (compare_options): New function.
13645         (lang_decode_option): Use them.
13647         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
13649         * method.c (mangle_expression): Adjust test for legal expression
13650         operators.
13652         * pt.c (instantiate_decl): Save and restore the local
13653         specializations list.
13655 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
13657         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
13659 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
13661         * call.c (add_template_candidate_real): Handle member template
13662         constructors for classes with virtual bases.
13663         (build_user_type_conversion_1): Use in_charge_arg_for_name.
13664         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
13666         * ir.texi: Update thunk documentation.
13668         * call.c (joust): Fix handling of overloaded builtin operators.
13670 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
13672         * cp-tree.h (DECL_ANTICIPATED): New macro.
13673         Document new use of DECL_LANG_FLAG_7.
13674         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
13675         in the user namespace.
13676         * lex.c (do_identifier): If the identifier's declaration has
13677         DECL_ANTICIPATED on, it has not yet been declared.  But do not
13678         replace it with an ordinary implicit declaration.
13680         * tinfo2.cc: Include stdlib.h.
13682 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
13684         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
13685         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
13686         CLASSTYPE_ALIGN.
13688 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
13690         * decl2.c (lang_decode_option): Use skip_leading_substring instead
13691         of plain strncmp.
13693 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
13695         * operators.def (<?): Duplicated, should have been...
13696         (>?): this.  Fixed.
13698 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
13699             Mark Mitchell  <mark@codesourcery.com>
13701         * cp-tree.h (ansi_opname): Make it a macro.
13702         (ansi_assopname): Likewise.
13703         (struct lang_decl_flags): Add assignment_operator_p.
13704         (struct lang_decl): Add operator_code.
13705         (DECL_VTT_PARM): Adjust.
13706         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
13707         overloaded operator.
13708         (SET_OVERLOADED_OPERATOR_CODE): New macro.
13709         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
13710         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
13711         (opname_tab): Remove.
13712         (assignop_tab): Likewise.
13713         (operator_name_info_t): New type.
13714         (operator_name_info): New variable.
13715         (assignment_operator_name_info): Likewise.
13716         (build_cp_library_fn): Remove declaration.
13717         (push_cp_library_fn): Likewise.
13718         (operator_name_string): Likewise.
13719         (build_decl_overload): Likewise.
13720         * call.c (print_z_candidates): Simplify.
13721         (build_object_call): Adjust usage of ansi_opname.  Use
13722         DECL_OVERLOADED_OPERATOR_P.
13723         (op_error): Adjust operator name lookup.
13724         (build_conditional_expr): Adjust usage of ansi_opname.
13725         (build_new_op): Likewise.
13726         (build_op_delete_call): Likewise.
13727         (build_over_call): Likewise.
13728         (joust): Use DECL_OVERLOADED_OPERATOR_P.
13729         * decl.c (duplicate_decls): Copy operator_code.
13730         (init_decl_processing): Adjust parameters to push_cp_library_fn.
13731         (builtin_function): Adjust parameters to build_library_fn_1.
13732         (build_library_fn_1): Accept an overloaded operator code.
13733         (build_library_fn): Pass ERROR_MARK.
13734         (build_cp_library_fn): Accept an overloaded operator code.
13735         (push_cp_library_fn): Likewise.
13736         (grokfndecl): Tweak.
13737         (grokdeclarator): Simplify code to compute names of overloaded
13738         operators.  Adjust use of ansi_opname.
13739         (ambi_op_p): Work on tree_codes, not identifiers.
13740         (unary_op_p): Likewise.
13741         (grok_op_properties): Likewise.
13742         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
13743         (lang_mark_tree): Don't try to mark the operator_code.
13744         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
13745         * error.c (dump_decl): Remove special handling for operator
13746         names.
13747         (dump_function_name): Likewise.
13748         (dump_expr): Adjust name lookup of operators.
13749         (op_to_string): Simplify.
13750         (assop_to_string): Likewise.
13751         * init.c (build_new_1): Adjust use of ansi_opname.
13752         * lex.c (opname_tab): Remove.
13753         (assignop_tab): Likewise.
13754         (ansi_opname): Likewise.
13755         (ansi_assopname): Likewise.
13756         (operator_name_string): Likewise.
13757         (reinit_lang_specific): Likewise.
13758         (operator_name_info): New variable.
13759         (assignment_operator_name_info): Likewise.
13760         (init_operators): New function.
13761         (init_parse): Use it.
13762         (do_identifier): Adjust use of ansi_opname.
13763         * method.c (mangle_expression): Don't use ansi_opname for
13764         mangling.
13765         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
13766         (build_decl_overload): Remove.
13767         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
13768         (do_build_assign_ref): Adjust use of ansi_opname.
13769         (synthesize_method): Likewise.
13770         (implicitly_declare_fn): Likewise.
13771         * operators.def: New file.
13772         * parse.y (operator): Adjust use of ansi_opname.
13773         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
13774         (set_mangled_name_for_template_decl): Don't play games with
13775         current_namespace.
13776         (special_function_p): Adjust use of ansi_opname.
13777         * typeck.c (check_return_expr): Likewise.
13778         * Make-lang.in (cc1plus): Depend on operators.def.
13779         * Makefile.in (lex.o): Likewise.
13780         (decl.o): Likewise.
13782 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
13784         * Make-lang.in (cplib2.ready): Eradicate.
13786 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13788         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
13789         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
13790         (built_min, cp_tree_equal): Likewise.
13792 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13794         * class.c (layout_nonempty_base_or_field): Replace
13795         `record_layout_info' with `record_layout_info_s'.
13797 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
13799         Fix goto checking.
13800         * cp-tree.h (struct language_function): x_named_labels is now
13801         a struct named_label_list*.
13802         * decl.c (struct named_label_use_list): Renamed from...
13803         (struct named_label_list): ...this.  New struct.
13804         (push_binding_level): Don't set eh_region.
13805         (note_level_for_eh): New fn.
13806         (pop_label): Take label and old value directly.
13807         (pop_labels): Adjust for new named_labels format.
13808         (lookup_label): Likewise.
13809         (poplevel): Note characteristics of a binding level containing a
13810         named label.  Mess with named label lists earlier.
13811         (mark_named_label_lists): New fn.
13812         (mark_lang_function): Call it.
13813         (use_label): New fn, split out from...
13814         (make_label_decl): ...here.  Don't call it.
13815         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
13816         check_previous_gotos): New fns, split out from...
13817         (define_label): ...here.
13818         (check_switch_goto): New fn.
13819         (define_case_label): Call it.
13820         (check_goto): New fn.
13821         * semantics.c (finish_goto_stmt): Call it and use_label.
13822         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
13823         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
13825 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13827         * class.c (build_vtable_entry_ref): Correct usage of
13828         get_vtbl_decl_for_binfo.
13830         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
13831         * method.c (implicitly_declare_fn): Not here.
13833 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
13835         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
13836         (CPTI_PTMD_DESC_TYPE): ... here.
13837         (ptmd_desc_type_node): Rename to ...
13838         (ptm_desc_type_node): ... here.
13839         * decl.c: Likewise.
13840         * rtti.c (ptmd_initializer): Rename to ...
13841         (ptm_initializer): ... here.
13842         (sythesize_tinfo_var): Adjust. Deal with pointer to member
13843         function.
13844         (create_tinfo_types): Adjust.
13846 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
13848         Finish implementation of VTTs.
13849         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
13850         CPTI_VTT_PARM_IDENTIFIER.
13851         (vtt_parm_identifier): New macro.
13852         (vtt_parm_type): Likewise.
13853         (BINFO_SUBVTT_INDEX): Likewise.
13854         (BINFO_VPTR_INDEX): Likewise.
13855         (struct lang_decl): Add vtt_parm.
13856         (DECL_VTT_PARM): New macro.
13857         (DECL_USE_VTT_PARM): Likewise.
13858         (DECL_NEEDS_VTT_PARM_P): Likewise.
13859         (get_vtt_name): Declare.
13860         (build_artificial_parm): Likewise.
13861         (fixup_all_virtual_upcast_offsets): Likewise.
13862         (expand_indirect_vtbls_init): Remove.
13863         * call.c (build_new_method_call): Pass the vtt to subobject
13864         constructors and destructors.
13865         * class.c (get_vtt_name): Give it external linkage.
13866         (build_clone): Handle the magic VTT parameters for clones.
13867         (clone_function_decl): Fix typo in comment.
13868         (build_vtt): Keep track of the indices in the VTTs where various
13869         entities are stored.
13870         (build_vtt_inits): Likewise.
13871         (dfs_build_vtt_inits): Likewise.
13872         (build_ctor_vtbl_group): Tweak type of construction vtables.
13873         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
13874         primary bases, when building construction vtables.
13875         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
13876         (initialize_predefined_identifiers): Add vtt_parm_identifier.
13877         (init_decl_processing): Initialize vtt_parm_type.
13878         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
13879         (lang_mark_tree): Make vtt_parm.
13880         * decl2.c (build_artificial_parm): New function.
13881         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
13882         (grokclassfn): Use build_artificial_parm.
13883         * init.c (initialize_vtbl_ptrs): Call
13884         fixup_all_virtual_upcast_offsets directly.
13885         (perform_member_init): Use the complete subobject destructor for
13886         member cleanups.
13887         (build_vtbl_address): New function.
13888         (expand_virtual_init): Handle VTTs.
13889         * optimize (maybe_clone_body): Likewise.
13890         * search.c (fixup_all_virtual_upcast_offsets): Give it external
13891         linkage.
13892         (expand_indirect_vtbls_init): Remove.
13893         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
13894         * tree.c (make_binfo): Make them bigger.
13896 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13898         * inc/cxxabi.h (__pbase_type_info): Define, based on
13899         __pointer_type_info.
13900         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
13901         (__pointer_to_member_type_info): Likewise.
13902         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
13903         (__pointer_to_member_type_info::__is_pointer_p): Remove.
13904         (__pointer_type_info::__do_catch): Rename to ...
13905         (__pbase_type_info::__do_catch): ... here. Adjust.
13906         (__pbase_type_info::__pointer_catch): Implement.
13907         (__pointer_type_info::__pointer_catch): Adjust.
13908         (__pointer_to_member_type_info::__pointer_catch): Adjust.
13910 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13912         * tinfo.h (__user_type_info::contained_virtual_p): New
13913         predicate.
13914         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
13915         shaped hierarchy.
13916         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
13917         diamond shaped hierarchy. Add early out for mixed diamond and
13918         duplicate shaped hierarchy.
13920 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
13922         * cp-tree.h (build_delete): Change prototype.
13923         (build_vec_delete): Likewise.
13924         * call.c (build_scoped_method_call): Use special_function_kind
13925         values to indicate the kind of destruction to be done.
13926         (build_method_call): Likewise.
13927         * decl.c (finish_destructor_body): Likewise.
13928         (maybe_build_cleanup_1): Likewise.  Rename to ...
13929         (maybe_build_cleanup): ... this.
13930         * decl2.c (delete_sanity): Use special_function_kind
13931         values to indicate the kind of destruction to be done.
13932         (build_cleanup): Likewise.
13933         * init.c (perform_member_init): Likewise.
13934         (build_vec_delete_1): Likewise.
13935         (build_dtor_call): Simplify.
13936         (build_delete): Use special_function_kind
13937         values to indicate the kind of destruction to be done.
13938         (build_vbase_delete): Likewise.
13939         (build_vec_delete): Likewise.
13941         * init.c (sort_member_init): Fix typo in error message generation
13942         code.
13944 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
13946         * semantics.c (begin_class_definition): make the packed
13947         attribute be sensitive to the "-fpack-struct" command line flag
13949 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
13951         Update new-abi upcast algorithm.
13952         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
13953         prototype and meaning of return value.
13954         (__si_class_type_info::__do_upcast): Likewise.
13955         (__vmi_class_type_info::__do_upcast): Likewise.
13956         * tinfo.cc (__class_type_info::__upcast_result): Replace
13957         whole2dst with part2dst. Adjust ctor.
13958         (__class_type_info::__do_upcast): Adjust call of worker function.
13959         (__class_type_info::__do_upcast): Adjust.
13960         (__si_class_type_info::__do_upcast): Adjust. Use parent's
13961         __do_upcast.
13962         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
13963         virtual base in diamond hierarchy bug.
13965 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
13967         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
13968         and bitfield to tinfo_fn_p.
13969         (DECL_TINFO_FN_P): Adjust.
13970         (SET_DECL_TINFO_FN_P): Likewise.
13971         (DECL_MUTABLE_P): Likewise.
13972         (DECL_C_BIT_FIELD): Likewise.
13973         (SET_DECL_C_BIT_FIELD): Likewise.
13974         (CLEAR_DECL_C_BIT_FIELD): Likewise.
13975         (DECL_UNINLINABLE): Likewise.
13976         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
13977         (handle_using_decl): Remove assertion.
13978         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
13979         to build FIELD_DECLs.
13980         (build_base_field): Likewise.
13981         (layout_class_type): Likewise.
13982         * decl.c (init_decl_processing): Likewise.
13983         (build_ptrmemfunc_type): Likewise.
13984         (grokdeclarator): Likewise.
13985         * decl2.c (grok_x_components): Likewise.
13986         * except.c (call_eh_info): Likewise.
13987         * init.c (init_init_processing): Likewise.
13988         * rtti.c (expand_class_desc): Likewise.
13989         (create_pseudo_type_info): Likewise.
13990         (get_vmi_pseudo_type_info): Likewise.
13991         (create_tinfo_types): Likewise.
13992         * ptree.c (print_lang_decl): Adjust.
13993         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
13994         before checking DECL_MUTABLE_P.
13996         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
13997         parameters for template functions.
13998         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
13999         destructors as well as constructors.
14001 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
14003         * class.c (build_ctor_vtbl_group): Set inits.
14004         * optimize.c (maybe_clone_body): Set DECL_INLINE and
14005         DECL_THIS_INLINE appropriately for clones.
14007         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
14008         (DECL_CONV_FN_P): Simplify.
14009         (DECL_OPERATOR): Remove.
14010         (language_to_string): Declare.
14011         * decl.c (duplicate_decls): Fix typo in comment.
14012         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
14013         (grok_op_properties): Use DECL_CONV_FN_P instead of
14014         IDENTIFIER_TYPENAME_P.
14015         * dump.c (dequeue_and_dump): Dump the language linkage of
14016         declarations.
14017         * error.c (language_to_string): Give it external linkage.
14018         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
14019         (implicitly_declare_fn): Set DECL_LANGUAGE.
14020         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
14021         IDENTIFIER_TYPENAME_P.
14022         (tsubst_decl): Likewise.
14023         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
14024         * semantics.c (finish_member_declaration): Don't mark members of
14025         classes declared in an extern "C" region as extern "C".
14027 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14029         * decl2.c (qualified_lookup_using_namespace): Look through
14030         namespace aliases.
14032         * decl.c (push_using_decl): Return the old decl on namespace level.
14034 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
14036         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
14037         (VTT_NAME_PREFIX): New macro.
14038         (CTOR_VTBL_NAME_PREFIX): Likewise.
14039         (get_ctor_vtbl_name): New function.
14040         * class.c (get_vtable_name): Simplify.
14041         (get_vtt_name): New function.
14042         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
14043         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
14044         when a virtual base becomes primary.
14045         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
14046         VTTs.
14047         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
14048         additional parameters.
14049         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
14050         (initialize_array): New function.
14051         (build_vtt): Likewise.
14052         (build_vtt_inits): Likewise.
14053         (dfs_build_vtt_inits): Likewise.
14054         (dfs_fixup_binfo_vtbls): Likewise.
14055         (build_ctor_vtbl_group): Likewise.
14056         (initialize_vtable): Use initialize_array.
14057         (accumulate_vtbl_inits): Reimplement to handle construction
14058         vtables.
14059         (dfs_accumulate_vtbl_inits): Likewise.
14060         (bulid_vtbl_initializer): Adjust parameter name.
14061         * method.c (build_typename_overload): Remove #if 0'd code.
14062         (get_ctor_vtbl_name): New function.
14063         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
14064         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
14066         * cp-tree.h (struct lang_type): Remove search_slot.
14067         (CLASSTYPE_SEARCH_SLOT): Remove.
14068         (emit_base_init): Change prototype.
14069         (initialize_vtbl_ptrs): Likewise.
14070         (expand_indirect_vtbls_init): Likewise.
14071         (clear_search_slots): Remove.
14072         * decl.c (lang_mark_tree): Don't mark search_slot.
14073         * init.c (initialize_vtbl_ptrs): Simplify.
14074         (emit_base_init): Likewise.
14075         * search.c (struct vbase_info): Document decl_ptr.
14076         (convert_pointer_to_single_level): Remove.
14077         (dfs_find_vbases): Remove.
14078         (dfs_init_base_pointers): Simplify.
14079         (dfs_clear_vbase_slots): Remove.
14080         (dfs_vtable_path_unmark): New function.
14081         (init_vbase_pointers): Simplify.
14082         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
14083         (expand_indirect_vtbls_init): Simplify.  Don't call
14084         mark_all_temps_used.
14085         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
14086         initialize_vtbl_ptrs.
14088 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
14090         * except.c: Add static prototypes.
14092 2000-05-20  H.J. Lu  <hjl@gnu.org>
14094         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
14096 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
14098         Don't create a separate copy of virtual bases for the
14099         CLASSTYPE_VBASECLASSES list.
14100         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
14101         (BINFO_FOR_VBASE): Remove.
14102         (CANONICAL_BINFO): Adjust.
14103         (binfo_for_vbase): New function.
14104         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
14105         instead of BINFO_FOR_VBASE.
14106         (build_vbase_pointer): Likewise.
14107         (build_secondary_vtable): Likewise.
14108         (dfs_mark_primary_bases): Likewise.
14109         (mark_primary_bases): Likewise.
14110         (layout_nonempty_base_or_field): Likewise.
14111         (dfs_set_offset_for_shared_vbases): Likewise.
14112         (dfs_set_offset_for_unshared_vbases): Likewise.
14113         (layout_virtual_bases): Likewise.  Adjust for changes to the
14114         CLASSTYPE_VBASECLASSES list.
14115         (dump_class_hierarchy_r): Use binfo_for_vbase
14116         instead of BINFO_FOR_VBASE.
14117         (dump_class_hierarchy): Likewise.
14118         (finish_vtbls): Likewise.
14119         (build_vtbl_initializer): Adjust for changes to the
14120         CLASSTYPE_VBASECLASSES list.
14121         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
14122         * decl.c (finish_destructor_body): Adjust for changes to the
14123         CLASSTYPE_VBASECLASSES list.
14124         * init.c (sort_base_init): Use binfo_for_vbase.
14125         (construct_virtual_bases): Adjust for changes to the
14126         CLASSTYPE_VBASECLASSES list.
14127         (expand_member_init): Use binfo_for_vbase.
14128         (build_vbase_delete):  Adjust for changes to the
14129         CLASSTYPE_VBASECLASSES list.
14130         * method.c (do_build_copy_constructor): Likewise.
14131         * rtti.c (get_base_offset): Use binfo_for_vbase.
14132         (expand_class_desc): Remove #if 0'd code.
14133         * search.c (struct vbase_info): Remove vbase_types.
14134         (get_base_distance):  Use binfo_for_vbase.
14135         (lookup_field_queue_p): Use CANONICAL_BINFO.
14136         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
14137         (get_pure_virtuals): Adjust for changes to the
14138         CLASSTYPE_VBASECLASSES list.
14139         (dfs_find_vbases): Use binfo_for_vbase.
14140         (dfs_init_vbase_pointers): Likewise.
14141         (init_vbase_pointers): Don't initialize vi.vbase_types.
14142         (virtual_context): Use binfo_for_vbase.
14143         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
14144         CLASSTYPE_VBASECLASSES list.
14145         (expand_indirect_vtbls_init): Simplify.
14146         (dfs_get_vbase_types): Don't replicate virtual bases.
14147         (find_vbase_instance): Use binfo_for_vbase.
14148         (binfo_for_vbase): New function.
14149         * typeck.c (get_delta_difference): Use binfo_for_vbase.
14151 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
14153         * decl2.c (finish_anon_union): Generalize error messages to handle
14154         anonymous structures.
14155         * init.c (perform_member_init): Remove `name' parameter.
14156         (build_field_list): New function.
14157         (sort_member_init): Handle anonymous union initialization order
14158         correctly.  Check for multiple initializations of the same union.
14159         (emit_base_init): Don't look up fields by name here.
14160         (expand_member_init): Record the result of name lookup for future
14161         reference.
14162         * typeck.c (build_component_ref): Fix formatting.
14164 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
14166         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
14167         * typeck.c (build_x_compound_expr): Replace warn_unused with
14168         warn_unused_value.
14170         * decl2.c (lang_decode_option): Update -Wall unused flags by
14171         calling set_Wunused.
14173 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
14175         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
14176         * init.c (dfs_vtable_path_unmark): Remove.
14177         * search.c (marked_new_vtable_p): Likewise.
14178         (unmarked_new_vtable_p): Likewise.
14179         (dfs_search_slot_nonempty_p): Likewise.
14180         (dfs_mark): Likewise.
14181         (dfs_vtable_path_unmark): Likewise.
14182         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
14183         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
14184         (dfs_init_vbase_pointers): Remove special-case new ABI code.
14185         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
14186         (init_vbase_pointers): Simplify.
14187         (expand_indirect_vtbls_init): Likewise.
14189         * class.c (copy_virtuals): New function.
14190         (build_primary_table): Use it.
14191         (build_secondary_vtable): Likewise.
14192         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
14193         indicate that no vcall offset is required.
14194         (add_virtual_function): Likewise.
14195         (modify_all_vtables): Likewise.
14196         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14197         (dfs_accumulate_vtbl_inits): Likewise.
14198         (build_vtbl_initializer): Make changes to handle construction
14199         vtables.
14200         (dfs_build_vcall_offset_vtbl_entries): Likewise.
14201         (build_rtti_vtbl_entries): Likewise.
14202         (build_vtable_entries): Handle a NULL vcall_index.
14204 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
14206         * decl2.c (lang_decode_option): Fix thinko.
14208 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
14210         * except.c (check_handlers): New fn.
14211         * cp-tree.h: Declare it.
14212         * semantics.c (finish_handler_sequence): Call it.
14213         (finish_function_handler_sequence): Likewise.
14214         (finish_handler_parms): Set TREE_TYPE on the handler.
14215         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
14216         * search.c (get_base_distance_recursive): If protect>1, ignore
14217         special access.
14218         (get_base_distance): Don't reduce watch_access.
14220 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
14222         * lex.c: #include diagnostic.h.
14223         (lang_init_options): Set default prefixing rules.
14225         * lang-options.h: Add -fdiagnostics-show-location=.
14227         * decl2.c: #include diagnostic.h.
14228         (lang_decode_option): Handle -fdiagnostics-show-location=.
14230 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
14232         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
14233         * vec.cc: Revert my 2000-05-07 change.
14235 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
14237         * class.c (check_field_decls): Complain about non-static data
14238         members with same name as class in class with constructor.
14240 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
14242         * decl.c (grokdeclarator): Allow non-static data members with
14243         same name as class.
14245 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
14247         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
14248         and pending_inline.filename.  Update prototypes.
14249         * decl.c (define_label): Constify filename parameter.
14250         * decl2.c (warn_if_unknown_interface): Constify local char *.
14251         * input.c Constify input_source.filename. Don't declare
14252         input_filename or lineno.  Constify filename parameter to feed_input.
14253         * lex.c (init_parse): Constify parameter and return value.
14254         (cp_pragma_interface, cp_pragma_implementation): Constify
14255         filename argument.
14256         (reinit_parse_for_method, reinit_parse_for_block,
14257         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
14258         Constify local char *.
14259         * pt.c: Don't declare lineno or input_filename.
14260         (print_template_context, tsubst_friend_function, tsubst_decl,
14261         tsubst, instantiate_decl): Constify local char *.
14262         * semantics.c (expand_body): Constify local char *.
14263         * tree.c (build_srcloc): Constify filename parameter.
14264         * typeck.c (c_expand_asm_operands): Constify filename
14265         parameter.
14267 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
14269         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
14270         offsetof expansion.
14272 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
14274         * inc/cxxabi.h:  Fix typos in comment.
14275         (__base_class_info::__offset): Use a static_cast.
14277 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
14279         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
14280         of std::size_t and std::ptrdiff_t respectively.
14281         * tinfo.cc: Likewise.
14282         * vec.cc: Likewise.
14284 2000-05-06  Richard Henderson  <rth@cygnus.com>
14286         * typeck.c (build_c_cast): Don't warn integer->pointer size
14287         mismatch for constants.
14289 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
14291         * rtti.c (ptmd_initializer): Set non-public, if class is
14292         incomplete.
14294         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
14295         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14296         __cxa_vec_delete): Likewise.
14297         * tinfo.cc (__dynamic_cast): Likewise.
14298         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14299         __cxa_vec_delete): Likewise.
14301 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14303         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
14304         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
14305         (lang_decl_flags): Add vcall_offset.
14306         (THUNK_VCALL_OFFSET): Use it.
14307         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
14308         * method.c (make_thunk): Create the lang_decl here, not in
14309         emit_thunk.
14310         (emit_thunk): Make generic thunks into ordinary functions once
14311         they have been fed to expand_body.
14312         * semantics.c (expand_body): Set current_function_is_thunk here.
14314 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14316         * class.c (update_vtable_entry_for_fn): Prototype.
14318         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
14319         and `tmpl'.
14321         * search.c (dfs_build_inheritance_graph_order): Prototype.
14323 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
14325         * cp-tree.h (special_function_kind): Add various kinds of
14326         destructors.
14327         (special_function_p): New function.
14328         * class.c (overrides): Don't let one kind of destructor override
14329         another.
14330         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
14331         whether or not to instantiate a template.
14332         * tree.c (special_function_p): Define.
14334 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
14336         * cp-tree.def (THUNK_DECL): Remove.
14337         * cp-tree.h (DECL_THUNK_P): New macro.
14338         (DECL_NON_THUNK_FUNCTION_P): Likewise.
14339         (DECL_EXTERN_C_FUNCTION_P): Likewise.
14340         (SET_DECL_THUNK_P): Likewise.
14341         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
14342         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
14343         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
14344         * decl.c (decls_match): Use DECL_EXTERN_C_P.
14345         (duplicate_decls): Likewise.
14346         (pushdecl): Likewise.  Adjust thunk handling.
14347         (grokfndecl): Use DECL_EXTERN_C_P.
14348         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
14349         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
14350         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
14351         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
14352         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
14353         DECL_NO_STATIC_CHAIN.
14354         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
14355         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
14356         * search.c (covariant_return_p): Remove THUNK_DECL handling.
14357         * ir.texi: Update.
14359 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14361         * tree.c (walk_tree): Set lineno.
14363 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14365         * exception.cc: Update license notice.
14366         * new.cc: Likewise.
14367         * new1.cc: Likewise.
14368         * new2.cc: Likewise.
14369         * tinfo.cc: Likewise.
14370         * tinfo2.cc: Likewise.
14371         * vec.cc: Likewise.
14372         * inc/cxxabi.h: Likewise.
14373         * inc/exception: Likewise.
14374         * inc/new: Likewise.
14375         * inc/new.h: Likewise.
14376         * inc/typeinfo: Likewise.
14378 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
14380         * tree.c (build_target_expr_with_type): If we already have a
14381         TARGET_EXPR, just return it.
14383         * optimize.c (initialize_inlined_parameters): Don't generate an
14384         EXPR_STMT if we can just use DECL_INITIAL.
14385         * decl.c (emit_local_var): Only make the initialization a
14386         full-expression if stmts_are_full_exprs_p.
14388 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
14390         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
14391         macro.
14392         * call.c (standard_conversion): Use it.
14393         (direct_reference_binding): Likewise.
14394         (build_over_call): Likewise.
14395         (is_properly_derived_from): Likewise.
14396         (compare_ics): Likewise.
14397         * class.c (resolves_to_fixed_type_p): Likewise.
14398         * optimize.c (declare_return_variable): Likewise.
14399         * pt.c (is_specialization_of): Likewise.
14400         (unify): Likewise.
14401         * typeck.c (comp_target_parms): Likeiwse.
14402         (build_static_cast): Likewise.
14403         (build_reinterpret_cast): Likewise.
14404         (build_const_cast): Likewise.
14405         (comp_ptr_ttypes_real): Likewise.
14406         (comp_ptr_ttypes_const): Likewise.
14407         * typeck2.c (process_init_constructor): Likewise.
14409 2000-04-30  Scott Snyder <snyder@fnal.gov>
14411         * decl.c (finish_destructor_body): Use the base destructor when
14412         destroying virtual bases.
14414 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
14416         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
14417         STMT_EXPRs.
14418         * optimize.c (struct inline_data): Add target_exprs field.
14419         (declare_return_variable): When a function returns an aggregate,
14420         use the variable declared in the TARGET_EXPR as the remapped
14421         DECL_RESULT.
14422         (expand_call_inline): Update the pending target_exprs stack.
14423         (optimize_function): Initialize the stack.
14425         * decl2.c (finish_file): Fix typo in comment.
14427         * method.c (emit_thunk): Don't try to return a `void' value.
14429         * optimize.c (initialize_inlined_parameters): If the parameter is
14430         addressable, we need to make a new VAR_DECL, even if the
14431         initializer is constant.
14433 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
14435         * decl.c (grok_op_properties): Add an extra check of argtypes.
14437 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
14439         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
14440         variables.
14441         (initialize_inlined_parameters): Try to avoid creating new
14442         VAR_DECLs.
14444 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
14446         * lex.c (my_get_run_time): Remove.
14447         (init_filename_times): Use get_run_time instead of my_get_run_time.
14448         (check_newline): Likewise.
14449         (dump_time_statistics): Likewise.
14450         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
14451         of computing elapsed time explicitly.
14453 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
14455         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
14456         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
14457         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
14458         before calling decl_constant_value.
14459         * class.c (check_bitfield_decl): Likewise.
14460         * cvt.c (ocp_convert): Likewise.
14461         (convert): Likewise.
14462         * decl.c (compute_array_index_type): Likewise.
14463         (build_enumerator): Likewise.
14464         * decl2.c (check_cp_case_value): Likewise.
14465         * pt.c (convert_nontype_argument): Likewise.
14466         (tsubst): Likewise.
14467         * typeck.c (decay_conversion): Likewise.
14468         (build_compound_expr): Likewise.
14469         (build_reinterpret_cast): Likewise.
14470         (build_c_cast): Likewise.
14471         (convert_for_assignment): Likewise.
14473 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
14475         * decl.c (finish_function): Don't play games with DECL_INLINE.
14477 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
14479         * ir.texi: Correct typo.
14481 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14483         * decl.c (grokdeclarator): Reject VLAs as members.
14485 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14487         * call.c (standard_conversion): Accept conversion between
14488         COMPLEX_TYPEs.
14490         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
14492 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
14494         * decl2.c (finish_file): Remove double setup for accounting
14495         compile time.
14497 2000-04-24  Robert Lipe <robertlipe@usa.net>
14499         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
14501 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
14503         * new.cc (set_new_handler): Needs to be in std::.
14505 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
14507         * cp-tree.h (lang_decl): Remove pretty_function_p.
14508         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
14509         language-specific node.
14510         * decl.c (cp_make_fname_decl): Use build_decl, not
14511         build_lang_decl, to build the variables.
14512         (grokvardecl): Don't call build_lang_decl for local variables in
14513         templates.
14514         (grokdeclarator): Don't call build_lang_decl for local type
14515         declarations in templates.
14516         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
14517         zero'd memory, rather than calling memset.
14518         * pt.c: Include hashtab.h.
14519         (local_specializations): New variable.
14520         (retrieve_local_specialization): Use it.
14521         (register_local_specialization): Likewise.
14522         (tsubst_decl): Don't assume local variables have
14523         DECL_LANG_SPECIFIC.
14524         (instantiate_decl): Set up local_specializations.
14525         * Makefile.in (HTAB_H): New variable.
14527 2000-04-23  Richard Henderson  <rth@cygnus.com>
14529         * typeck.c (c_expand_asm_operands): Restore the original
14530         contents of the output list.
14532 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
14534         * ir.texi:  Document complex number representation.
14536 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
14538         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
14539         (target_incomplete_p): New function.
14540         (tinfo_base_init): Create comdat NTBS name variable.
14541         (ptr_initializer): Add non_public parameter. Calculate it.
14542         (ptmd_initializer): Likewise.
14543         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
14544         (create_real_tinfo_var): Add non_public parameter. Use it.
14545         Push proxy into global namespace.
14546         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
14547         New enumeration.
14548         * inc/typeinfo (type_info::before, type_info::operator==):
14549         Compare __name addresses.
14551         * tinfo2.cc: Remove new-abi builtins comment.
14553 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
14555         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
14557         * call.c (joust): Exit early if we get the same function, too.
14559         * decl2.c (key_method): Return NULL_TREE for template classes.
14560         (import_export_class): Don't need to check for template classes.
14562 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
14564         * lex.c: Remove references to cccp.c.
14566 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
14568         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
14569         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
14570         (DECL_DESTRUCTOR_P): Use destructor_attr.
14571         (DECL_CONST_MEMFUNC_P): Reimplement.
14572         (DECL_VOLATILE_MEMFUNC_P): Remove.
14573         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
14574         (overrides): Use DECL_DESTRUCTOR_P.
14575         (check_for_override): Likewise.
14576         * decl.c (start_function): Likewise.
14577         * decl2.c (grokfclassfn): Likewise.
14578         (check_classfn): Likewise.
14579         (grok_function_init): Likewise.
14581 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
14583         * decl2.c (grokfield): Issue error on illegal data member
14584         declaration.
14586 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
14588         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
14590 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
14592         * class.c (build_vtable_entry): Don't build thunks for type-info
14593         functions.
14595 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
14597         * decl.c (decls_match): Allow a redeclaration of a builtin to
14598         specify args while the builtin did not.
14600 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
14602         * cp-tree.def (THUNK_DECL): Add to documentation.
14603         * cp-tree.h (flag_huge_objects): Declare.
14604         * class.c (modify_vtable_entry): Tidy.
14605         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
14606         Calculate delta appropriately for the new ABI.
14607         (dfs_modify_vtables): Use it.
14608         (modify_all_vtables): Fix thinko in code to add overriding copies
14609         of functions to primary vtables.
14610         (build_clone): Fix typo in comment.
14611         (clone_function_decl): Correct order of destructors in vtable.
14612         (build_vbase_offset_vtbl_entries): Adjust comment.
14613         (dfs_vcall_offset_queue_p): Remove.
14614         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
14615         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
14616         (build_vtable_entry): Correct check for pure virtual functions.
14617         Don't declare flag_huge_objects.
14618         * decl.c (flag_huge_objects): Remove declaration.
14619         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
14620         Use int_size_in_bytes.
14621         (emit_thunk): Handle vcall offset thunks.
14623 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14625         * decl2.c (parse_time, varconst_time): Delete declarations.
14626         (finish_file): Delete LINENO declaration.
14627         START_TIME and THIS_TIME now long.
14629 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
14631         * class.c (build_base_field): Reformat comment.
14633         * inc/cxxabi.h (stddef.h): Comment inclusion.
14634         (__base_class_info::__offset): Comment shift.
14636 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
14638         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
14639         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
14640         (cp_push_exception_identifier): New macro.
14641         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
14642         (DECL_BASE_DESTRUCTOR_P): Likewise.
14643         (DECL_DELETING_DESTRUCTOR_P): Likewise.
14644         (get_vtbl_decl_for_binfo): Fix formatting.
14645         (in_charge_arg_for_name): New macro.
14646         (maybe_build_cleanup_and_delete): Remove declaration.
14647         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
14648         (in_charge_arg_for_name): New function.
14649         (build_new_method_call): Use it.  Handle cloned destructors.
14650         (build_clone): Don't make the base constructor virtual.
14651         Automatically defer generated functions.
14652         (clone_function_decl): Handle destructors, too.
14653         (clone_constructors_and_destructors): Likewise.
14654         (create_vtable_ptr): Don't create a vtable entry for a cloned
14655         function.
14656         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
14657         (initialize_predefined_identifiers): Update appropriately.
14658         (finish_destructor_body): Simplify.
14659         (maybe_build_cleanup_and_delete): Remove.
14660         * except.c (expand_throw): Handle new-ABI destructors.
14661         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
14662         (build_dtor_call): New function.
14663         (build_delete): Use it.  Simplify.
14664         * optimize.c (maybe_clone_body): Handle destructors.
14665         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
14667         * exception.cc (cleanup_fn): New typedef.
14668         (CALL_CLEANUP): New macro.
14669         (cp_eh_info): Use them.
14670         (__cp_push_exception): Likewise.
14671         (__cp_pop_exception): Likewise.
14673 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
14675         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
14676         (complete_dtor_identifier): New macro.
14677         (CLASSTYPE_FIRST_CONVERSION): Remove.
14678         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
14679         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
14680         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
14681         (CLASSTYPE_CONSTRUCTORS): Likewise.
14682         (CLASSTYPE_DESTRUCTORS): Likewise.
14683         (lang_decl): Add cloned_function.
14684         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
14685         (DECL_BASE_CONSTRUCTOR_P): Likewise.
14686         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
14687         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
14688         (DECL_CLONED_FUNCTION_P): Likewise.
14689         (DECL_CLONED_FUNCTION): Likewise.
14690         (clone_function_decl): Declare.
14691         (maybe_clone_body): Likewise.
14692         * call.c (build_user_type_conversion_1): Call complete object
14693         constructors in the new ABI.
14694         (build_new_method_call): Don't add in-charge parameters under the
14695         new ABI.
14696         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
14697         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
14698         CLASSTYPE_DESTRUCTOR_SLOT.
14699         (build_clone): New function.
14700         (clone_function_decl): Likewise.
14701         (clone_constructors_and_destructors): Likewise.
14702         (check_bases_and_members): Use it.
14703         * decl.c (iniitialize_predefined_identifiers): Initialize
14704         complete_dtor_identifier.
14705         (finish_function): Don't add extra code to a clone.
14706         (lang_mark_tree): Mark cloned_function.
14707         * decl2.c (mark_used): Don't bother trying to instantiate things
14708         we synthesized.
14709         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
14710         * method.c (set_mangled_name_for_decl): Don't treat clones as
14711         constructors.
14712         (synthesize_method): Sythesize cloned functions, not the clones.
14713         * optimize.c (inline_data): Update comment on ret_label.
14714         (remap_block): Don't assume DECL_INITIAL exists.
14715         (copy_body_r): Allow ret_label to be NULL.
14716         (maybe_clone_body): Define.
14717         * pt.c (tsubst_decl): Handle clones.
14718         (instantiate_clone): New function.
14719         (instantiate_template): Use it.
14720         (set_mangled_name_for_template_decl): Don't treat clones as
14721         constructors.
14722         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
14723         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
14724         * semantics.c (expand_body): Clone function bodies as necessary.
14726         * optimize.c (remap_decl): Avoid sharing structure for arrays
14727         whose size is only known at run-time.
14728         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
14730         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
14731         to has_in_charge_parm_p.
14732         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
14733         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
14734         (DECL_COPY_CONSTRUCTOR_P): New macro.
14735         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
14736         (build_user_type_conversion_1): Likewise.
14737         (convert_like_real): Likewise.
14738         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
14739         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
14740         (copy_args_p): Likewise.
14741         (grok_ctor_properties): Likewise.
14742         (start_function): Likewise.
14743         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
14744         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
14745         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
14746         * method.c (do_build_copy_constructor): Use
14747         DECL_HAS_IN_CHARGE_PARM_P.
14748         (synthesize_method): Likewise.
14749         * pt.c (instantiate_template): Remove goto.
14750         * tree.c (build_cplus_method_type): Remove mention of obstacks in
14751         comment.
14753         * cp-tre.h (finish_function): Change prototype.
14754         * decl.c (end_cleanup_fn): Adjust caller.
14755         (finish_function): Take only one parameter.
14756         * decl2.c (finish_objects): Adjust caller.
14757         (finish_static_storage_duration_function): Likewise.
14758         * method.c (emit_thunk): Likewise.
14759         * parse.y: Likewise.
14760         * parse.c: Regenerated.
14761         * pt.c (instantiate_decl): Likewise.
14762         * rtti.c (synthesize_tinfo_fn): Likewise.
14763         * semantics.c (expand_body): Likewise.
14765         * cp-tree.h (copy_decl): New function.
14766         * class.c (finish_struct_1): Use it.
14767         * lex.c (copy_decl): Define it.
14768         * pt.c (tsubst_decl): Likewise.
14769         * tree.c (copy_template_template_parm): Likewise.
14771         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
14772         has_nonpublic_assign_ref.
14773         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
14774         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
14775         * class.c (finish_struct_methods): Don't set
14776         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
14777         (interface_only): Don't declare.
14778         (interface_unknown): Likewise.
14780 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14782         * tree.h (HAVE_TEMPLATES): Remove definition.
14783         * lang-options.h (-fthis-is-variable): Remove documentation.
14785 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
14787         * class.c (instantiate_type): Handle object-relative template-id.
14789         * semantics.c (finish_expr_stmt): Call convert_to_void here.
14790         * decl.c (cplus_expand_expr_stmt): Not here.
14792         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
14793         Initialize exprtype earlier.
14795         * parse.y (fn.def1): Check for defining types in return types.
14797         * decl.c (check_tag_decl): Notice extra fundamental types.
14798         Diagnose empty decls in classes, too.
14800         * decl.c (grokdeclarator): Don't override an anonymous name if no
14801         declarator was given.
14803         * cvt.c (convert_to_void): Call resolve_offset_ref.
14805         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
14807         * decl2.c (decl_namespace): Handle getting a type.
14809         * typeck.c (build_c_cast): Re-enable warning for cast between
14810         pointer and integer of different size.
14812 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
14814         * inc/cxxabi.h (__pointer_type_info): Add restrict and
14815         incomplete flags.
14816         (__pointer_type_info::__pointer_catch): New virtual function.
14817         (__pointer_to_member_type_info): Derive from
14818         __pointer_type_info. Adjust.
14819         (__pointer_to_member_type_info::__do_catch): Remove.
14820         (__pointer_to_member_type_info::__is_pointer_p): Declare.
14821         (__pointer_to_member_type_info::__pointer_catch): Declare.
14822         * rtti.c (qualifier_flags): Add restrict flag.
14823         (ptmd_initializer): Reorder members.
14824         (create_tinfo_types): Expand comments. Reorder
14825         ptmd_desc_type_node members.
14826         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
14827         Implement.
14828         (__pointer_type_info::__do_catch): Move specific code into
14829         __pointer_catch. Call it.
14830         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
14831         specific catch checking. Fix void conversion check.
14832         (__pointer_to_member_type_info::__do_catch): Remove.
14833         (__pointer_to_member_type_info::__pointer_catch): Implement.
14835 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14837         * lex.c (init_parse): Remove traces of classof and headof.
14838         * decl2.c (flag_operator_names): Default to 1.
14839         (lang_decode_option): Do not set it for -ansi.
14841 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
14843         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
14844         (DECL_MAIN_VARIANT): Remove.
14845         * decl.c (duplicate_decls): Don't set it.
14846         (start_function): Likewise.
14847         (lang_mark_tree): Don't mark it.
14848         * decl2.c (defer_fn): Don't use it.
14849         * lex.c (retrofit_lang_decl): Don't set it.
14850         * pt.c (tsubst_decl): Likewise.
14851         * ptree.c (print_lang_decl): Don't print it.
14852         * typeck.c (mark_addressable): Don't use it.
14854 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14856         * vec.cc: Include <new> and <exception>.
14857         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
14858         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
14859         terminate.
14860         (__cxa_vec_delete): Catch dtor exceptions.
14862 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14864         Prepend __ to implementation defined names.
14865         * inc/typeinfo (type_info): Rename _name to __name.
14866         (type_info::type_info): Rename parameter.
14867         (type_info::operator==, type_info::operator!=,
14868         type_info::before): Likewise.
14869         (type_info::is_pointer_p, type_info::is_function_p,
14870         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
14871         parameters.
14872         * inc/cxxabi.h
14873         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
14874         (__pointer_type_info::__pointer_type_info): Likewise.
14875         (__pointer_type_info::is_pointer_p,
14876         __pointer_type_info::do_catch): Prepend __. Rename parameters.
14877         (__array_type_info::__array_type_info): Rename parameters.
14878         (__function_type_info::__function_type_info): Likewise.
14879         (__function_type_info::is_function_p): Prepend __.
14880         (__enum_type_info::__enum_type_info): Rename parameters.
14881         (__pointer_to_member_type_info::__pointer_to_member_type_info):
14882         Likewise.
14883         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
14884         parameters.
14885         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
14886         (__class_type_info::__class_type_info): Rename parameters.
14887         (__class_type_info::sub_kind): Prepend __. Adjust member names.
14888         (__class_type_info::upcast_result,
14889         __class_type_info::dyncast_result): Prepend __. Move definition
14890         into tinfo.cc.
14891         (__class_type_info::do_upcast, __class_type_info::do_catch,
14892         __class_type_info::find_public_src,
14893         __class_type_info::do_dyncast,
14894         __class_type_info::do_find_public_src): Prepend __. Rename
14895         parameters.
14896         (__si_class_type_info::__si_class_type_info): Rename parameters.
14897         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
14898         __si_class_type_info::do_find_public_src): Prepent __. Rename
14899         parameters.
14900         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
14901         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
14902         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
14903         parameters.
14904         (__dynamic_cast): Rename parameters.
14905         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
14906         type_info::do_catch, type_info::do_upcast): Prepend __.
14907         (contained_p, public_p, virtual_p, contained_public_p,
14908         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
14909         (__class_type_info::do_catch,
14910         __class_type_info::do_upcast): Prepend __. Adjust.
14911         (__class_type_info::__upcast_result,
14912         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
14913         Adjust.
14914         (__class_type_info::find_public_src): Prepend __. Adjust.
14915         (__class_type_info::do_find_public_src,
14916         __si_class_type_info::do_find_public_src,
14917         __vmi_class_type_info::do_find_public_src): Likewise.
14918         (__class_type_info::do_dyncast,
14919         __si_class_type_info::do_dyncast,
14920         __vmi_class_type_info::do_dyncast): Likewise.
14921         (__class_type_info::do_upcast,
14922         __si_class_type_info::do_upcast,
14923         __vmi_class_type_info::do_upcast): Likewise.
14924         (__dynamic_cast): Adjust.
14925         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
14926         (__function_type_info::is_function_p): Likewise.
14927         (__pointer_type_info::do_catch): Likewise. Adjust.
14928         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
14929         (__throw_type_match_rtti_2): Adjust.
14930         (__is_pointer): Adjust.
14932 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
14934         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
14935         (complete_ctor_identifier): New macro.
14936         (special_function_kind): Add sfk_copy_constructor and
14937         sfk_assignment_operator.
14938         (LOOKUP_HAS_IN_CHARGE): Remove.
14939         (cons_up_default_function): Rename to ...
14940         (implicitly_declare_fn): ... this.
14941         * call.c (build_new_method_call): Add in-charge parameters for
14942         constructors here.
14943         * class.c (add_implicitly_declared_members): Change parameter name
14944         from cant_have_assignment to cant_have_const_assignment.
14945         Replace calls to cons_up_default_function to implicitly_declare_fn.
14946         * cvt.c (ocp_convert): Use complete_ctor_identifier.
14947         * decl.c (initialize_predefined_identifiers): Initialize it.
14948         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
14949         complex expression.
14950         * init.c (expand_default_init): Don't calculate the in-charge
14951         parameter here.
14952         (build_new_1): Likewise.
14953         * lex.c (cons_up_default_function): Move to method.c.
14954         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
14955         (implicitly_declare_fn): New function.
14956         * typeck.c (build_static_cast): Use complete_ctor_identifier.
14957         (build_modify_expr): Likewise.
14958         * typeck2.c (build_functional_cast): Likewise.
14960         Under the new ABI, constructors don't return `this'.
14961         * cp-tree.h (warn_reorder): Declare.
14962         (special_function_kind): New enum.
14963         (global_base_init_list): Remove declaration.
14964         (emit_base_init): Don't return a value.
14965         (check_base_init): Don't declare.
14966         (is_aggr_typedef): Likewise.
14967         * decl.c (check_special_function_return_type): New function.
14968         (return_types): Remove.
14969         (grokdeclarator): Use check_special_function_return_type.
14970         (start_function): Don't initialize ctor_label under the new ABI.
14971         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
14972         * init.c (begin_init_stmts): Move to top of file.
14973         (finish_init_stmts): Likewise.
14974         (warn_reorder): Don't declare.
14975         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
14976         value.
14977         (check_base_init): Remove.
14978         (is_aggr_typedef): Likewise.
14979         (build_new_1): Don't use the return value of a constructor.
14980         * semantics.c (setup_vtbl_ptr): Don't use the return value
14981         of emit_base_init.
14982         * typeck.c (check_return_expr): Don't magically convert return
14983         statements into `return this' in constructors under the new ABI.
14985         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
14986         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
14987         (base_ctor_identifier): New macro.
14988         (base_dtor_identifier): Likewise.
14989         (deleting_dtor_identifier): Likewise.
14990         * decl.c: Don't include obstack.h.
14991         (obstack_chunk_alloc): Don't define.
14992         (obstack_chunk_free): Likewise.
14993         (struct predefined_identifier): New type.
14994         (initialize_predefined_identifiers): New function.
14995         (init_decl_processing): Use it.
14996         (debug_temp_inits): Remove.
14997         (start_method): Don't call preserve_data.
14998         (hack_incomplete_structures): Update comment.
14999         * init.c (init_init_processing): Don't initialize
15000         nelts_identifier.
15001         (build_offset_rf): Remove dead code.
15002         (build_delete): Use CLASSTYPE_N_BASECLASSES.
15003         * search.c (init_search_processing): Don't initialize
15004         vptr_identifier.
15006 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15008         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
15009         some sign_compare warnings.
15011 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15013         Rename abi::__vmi_class_type_info members.
15014         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
15015         base_list, detail_masks members to vmi_flags, vmi_base_count,
15016         vmi_bases and vmi_flags_masks respectively.
15017         (__vmi_class_type_info::vmi_flags_masks): Rename
15018         details_unknown_mask to flags_unknown_mask.
15019         * tinfo.cc (__class_type_info::do_upcast): Adjust.
15020         (__vmi_class_type_info::do_find_public_src): Adjust.
15021         (__vmi_class_type_info::do_dyncast): Adjust.
15022         (__vmi_class_type_info::do_upcast): Adjust.
15024 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
15026         * tinfo.cc (convert_to_base): New function.
15027         (get_vbase_offset): Remove. Move into convert_to_base.
15028         (__vmi_class_type_info::do_find_public_src): Adjust.
15029         (__vmi_class_type_info::do_dyncast): Adjust.
15030         (__vmi_class_type_info::do_upcast): Adjust.
15032 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
15034         * tinfo.cc (operator=): Use __builtin_strcmp.
15035         * tinfo2.cc (before): Likewise.
15037 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
15039         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
15040         (DECL_SAVED_INLINE): Rename to ...
15041         (DECL_DEFERRED_FN): ... this.
15042         (in_function_p): Remove declaration.
15043         (mark_inline_for_output): Rename to ...
15044         (defer_fn): ... this.
15045         * decl.c (finish_function): Adjust call to mark_inline_for_output.
15046         (in_function_p): Remove definition.
15047         * decl2.c (saved_inlines): Rename to ...
15048         (deferred_fns): ... this.
15049         (saved_inlines_used): Rename to ...
15050         (deferred_fns_used): ... this.
15051         (mark_inline_for_output): Rename to ...
15052         (defer_fn): ... this.
15053         (finish_file): Adjust accordingly.
15054         (init_decl2): Likewise.
15055         * lex.c (cons_up_default_function): Likewise.
15056         * pt.c (mark_decl_instantiated): Likewise.
15057         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
15058         circumstances.
15059         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
15060         * semantics.c (expand_body): Defer more functions.
15062 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15064         * vec.cc: New file.
15065         * Make-lang.in (CXX_LIB2FUNCS): Add it.
15066         (vec.o): Build it.
15067         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
15068         __cxa_vec_delete): Declare.
15070 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
15072         * rtti.c (dfs_class_hint_mark): New static function.
15073         (dfs_class_hint_unmark): New static function.
15074         (class_hint_flags): Use them.
15076 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
15078         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
15080 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
15082         * cp-tree.h (instantiate_decl): Change prototype.
15083         * decl2.c (mark_used): Adjust call.
15084         * optimize.c (inlinable_function_p): Adjust handling of templates.
15085         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
15086         (do_type_instantiation): Likewise.
15087         (instantiate_decl): Defer more templates.
15088         (instantiate_pending_templates): Adjust logic to handle inline
15089         friend functions.
15091         * Makefile.in (GGC_H): New variable.  Use it throughout in place
15092         of ggc.h.
15094         * call.c: Don't include obstack.h.  Include ggc.h.
15095         (obstack_chunk_alloc): Don't define.
15096         (obstack_chunk_free): Likewise.
15097         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
15098         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
15099         (pop_switch): Free it.
15101         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
15103         * dump.c (dequeue_and_dump): Don't try to print the bit_position
15104         if we don't have a DECL_FIELD_OFFSET.
15106 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
15108         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
15109         special_function_p.
15111 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15113         * cfns.gperf (hash, libc_name_p): Prototype.
15115         * rtti.c (build_dynamic_cast_1): Constification.
15117         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
15119         * semantics.c (deferred_type_access_control): Prototype.
15121 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
15123         Correct many new ABI issues regarding vbase and vcall offset
15124         layout.
15125         * cp-tree.h (BINFO_VTABLE): Document.
15126         (struct lang_type): Tweak formatting.
15127         (BINFO_PRIMARY_BINFO): Add to documentation.
15128         (CLASSTYPE_VSIZE): Fix typo in comment.
15129         (CLASSTYPE_VBASECLASSES): Update documentation.
15130         (BINFO_VBASE_MARKED): Remove.
15131         (SET_BINFO_VBASE_MARKED): Likewise.
15132         (CLEAR_BINFO_VBASE_MARKED): Likewise.
15133         (BINFO_FIELDS_MARKED): Remove.
15134         (SET_BINFO_FIELDS_MARKED): Likewise.
15135         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
15136         (enum access_kind): New enumeration.
15137         (num_extra_vtbl_entries): Remove declaration.
15138         (size_extra_vtbl_entries): Likewise.
15139         (get_vtbl_decl_for_binfo): New function.
15140         (dfs_vbase_unmark): Remove declaration.
15141         (mark_primary_bases): Likewise.
15142         * class.c (SAME_FN): Remove.
15143         (struct vcall_offset_data_s): Move definition.
15144         (build_vbase_pointer): Use `build', not `build_binary_op', to
15145         access the vbase pointer under the new ABI.
15146         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
15147         (build_primary_vtable): Likewise.
15148         (dfs_mark_primary_bases): Move here from search.c.
15149         (mark_primary_bases): Likewise.
15150         (determine_primary_bases): Under the new ABI, don't make a base
15151         class a primary base just because we don't yet have any virtual
15152         functions.
15153         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
15154         (num_vfun_entries): Remove.
15155         (dfs_count_virtuals): Likewise.
15156         (num_extra_vtbl_entries): Likewise.
15157         (size_extra_vtbl_entries): Likewise.
15158         (layout_virtual_bases): Iterate in inheritance graph order under
15159         the new ABI.
15160         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
15161         indicate that a vfield is present.
15162         (init_class_processing): Initialize access_public_node, etc., from
15163         ak_public, etc.
15164         (get_vtbl_decl_for_binfo): New function.
15165         (dump_class_hierarchy_r): Likewise.
15166         (dump_class_hierarchy): Use it.
15167         (finish_vtbls): Build the vtbls in inheritance graph order.
15168         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
15169         (initialize_vtable): Use get_vtbl_decl_for_binfo.
15170         (accumulate_vtbl_inits): Add comments explaining why a pre-order
15171         walk is required.
15172         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
15173         where the vptr points, even for primary vtables.
15174         (build_vtbl_initializer): Adjust handling of vbase and vcall
15175         offsets.
15176         (build_vcall_and_vbase_vtable_entries): New function.
15177         (dfs_build_vbase_offset_vtbl_entries): Remove.
15178         (build_vbase_offset_vtbl_entries): Reimplement.
15179         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
15180         were already handled in a primary base class vtable.
15181         (build_vcall_offset_vtbl_entries): Adjust.
15182         (build_rtti_vtbl_entries): Adjust.
15183         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
15184         * init.c (expand_virtual_init): Simplify.
15185         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
15186         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
15187         * search.c (BINFO_ACCESS): New macro.
15188         (SET_BINFO_ACCESS): Likewise.
15189         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
15190         (access_in_type): Likewise.
15191         (dfs_accessible_p): Likewise.
15192         (protected_accessible_p): Likewise.
15193         (lookup_fnfields_1): Adjust documentation.
15194         (dfs_mark_primary_bases): Move to class.c
15195         (mark_primary_bases): Likewise.
15196         (dfs_vbase_unmark): Remove.
15197         (virtual_context): Use BINFO_FOR_VBASE.
15198         (dfs_get_vbase_types): Simplify.
15199         (dfs_build_inheritance_graph_order): New function.
15200         (get_vbase_types): Use it.
15201         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
15203         * tinfo.cc (get_vbase_offset): New function.
15204         (__vmi_class_type_info::do_find_public_src): Use it.
15205         (__vmi_class_type_info::do_dyncast): Likewise.
15206         (__vmi_class_type_info::do_upcast): Likewise.
15208 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
15210         * lang-specs.h: Pass -fno-show-column to the preprocessor.
15212 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
15214         * rtti.c (class_hint_flags): Rename flags.
15215         (class_initializer): Remove flags.
15216         (synthesize_tinfo_var): Combine offset and flags. Add flags
15217         for __vmi_class_type_info.
15218         (create_tinfo_types): Remove flags from __class_type_info and
15219         __si_class_type_info. Merge flags and offset from
15220         base_class_type_info.
15221         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
15222         (__base_class_info::is_virtual_p): Adjust.
15223         (__base_class_info::is_public_p): Adjust.
15224         (__base_class_info::offset): New accessor.
15225         (__class_type_info::details): Remove member.
15226         (__class_type_info::__class_type_info): Lose details.
15227         (__class_type_info::detail_masks): Remove.
15228         (__si_class_type_info::__si_class_type_info): Lose details.
15229         (__vmi_class_type_info::details): New member.
15230         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
15231         (__vmi_class_type_info::detail_masks): New member.
15232         * tinfo.cc (__class_type_info::do_upcast): Initialize result
15233         with unknown_details_mask.
15234         (__vmi_class_type_info::do_find_public_src): Adjust
15235         (__vmi_class_type_info::do_dyncast): Adjust.
15236         (__vmi_class_type_info::do_upcast): Set result details, if
15237         needed. Adjust.
15238         (__dynamic_cast): Temporarily #if out optimization.
15240 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
15242         * rtti.c (get_tinfo_decl): Mark used.
15243         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
15244         mark as dealt with, if we output it.
15246 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15248         * class.c: Reorganize to put virtual function table initialization
15249         machinery at the end of the file.
15251 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
15253         * class.c (finish_struct): Use bitsize_zero_node.
15254         * pt.c (instantiate_class_template): Likewise.
15256 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
15258         Put RTTI entries at negative offsets in new ABI.
15259         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
15260         vbase offset at index -3, not -1.
15261         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
15262         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
15263         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
15264         (build_rtti_vtbl_entries): New function.
15265         (set_rtti_entry): Remove.
15266         (build_primary_vtable): Don't use it.
15267         (build_secondary_vtable): Likewise.
15268         (start_vtable): Remove.
15269         (first_vfun_index): New function.
15270         (set_vindex): Likewise.
15271         (add_virtual_function): Don't call start_vtable.  Do call
15272         set_vindex.
15273         (set_primary_base): Rename parameter.
15274         (determine_primary_base): Likewise.
15275         (num_vfun_entries): Don't use skip_rtti_stuff.
15276         (num_extra_vtbl_entries): Include RTTI information.
15277         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
15278         (skip_rtti_stuff): Remove.
15279         (dfs_modify_vtables): Don't use it.
15280         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
15281         (layout_nonempty_base_or_field): Update size handling.
15282         (create_vtable_ptr): Tweak.
15283         (layout_class_type): Adjust parameter names.
15284         (finish_struct_1): Simplify.
15285         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
15286         (skip_rtti_stuff): Remove.
15287         (first_vfun_index): New function.
15288         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15289         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
15290         (marked_vtable_pathp): Declare.
15291         (unmarked_vtable_pathp): Likewise.
15292         * error.c (dump_expr): Use first_vfun_index to calculate vtable
15293         offsets.
15294         * rtti.c (build_headof): Look for RTTI at negative offsets.
15295         (get_tinfo_decl_dynamic): Likewise.
15296         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
15297         here.
15298         (create_pseudo_type_info): Do it here instead.  Adjust so that
15299         vptr points at first virtual function.
15300         * search.c (marked_vtable_pathp): Make it global.
15301         (unmarked_vtable_pathp): Likewise.
15302         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
15303         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
15304         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
15305         (get_pure_virtuals): Likewise.
15306         (expand_upcast_fixups): Likewise.
15307         * tree.c (debug_binfo): Likewise.
15308         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
15309         negative offset.
15311 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15313         * class.c (check_field_decl): Fix typo.
15314         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
15315         (check_methods): Likewise.
15316         (check_field_decls): Likewise.
15317         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
15318         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
15319         Use DECL_RESULT_FLD, not DECL_RESULT.
15320         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
15321         * lex.c (identifier_type): Likewise.
15322         * pt.c (determine_specialization, lookup_template_class): Likewise.
15323         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
15324         (resolve_overloaded_unification, more_specialized): Likewise.
15325         * semantics.c (finish_member_declaration): Likewise.
15326         * typeck.c (build_x_function_call): Likewise.
15328 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
15330         * class.c (layout_empty_base): Handle empty bases with non-byte
15331         alignment.
15332         (build_base_field): Likewise.
15333         (layout_virtual_bases): Likewise.
15335         * class.c (finish_struct_1): Fix typo in this change:
15337         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15339 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
15341         * decl.c (grokdeclarator): Count partial specializations when
15342         keeping track of how many template classes have been seen.
15344         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
15346 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15348         * class.c (build_vbase_pointer_fields): layout_field now place_field.
15349         (get_vfield_offset): Use byte_position.
15350         (set_rtti_entry): Set OFFSET to ssizetype zero.
15351         (get_binfo_offset_as_int): Deleted.
15352         (dfs_record_base_offsets): Use tree_low_cst.
15353         (dfs_search_base_offsets): Likewise.
15354         (layout_nonempty_base_or_field): Reflect changes in RLI format
15355         and call byte_position.
15356         (layout_empty_base): Convert offset to ssizetype.
15357         (build_base_field): use rli_size_unit_so_far.
15358         (dfs_propagate_binfo_offsets): Do computation in proper type.
15359         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
15360         (layout_class_type): Reflect changes in RLI names and fields.
15361         (finish_struct_1): Set DECL_FIELD_OFFSET.
15362         * dump.c (dequeue_and_dump): Call bit_position.
15363         * expr.c (cplus_expand_constant): Use byte_position.
15364         * rtti.c (expand_class_desc): Use bitsize_one_node.
15365         * typeck.c (build_component_addr): Use byte_position and don't
15366         special case for zero offset.
15368 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
15370         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
15372         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
15373         tinfo object.
15374         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
15375         vtable.
15377 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15379         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
15380         DECL_P macros.
15381         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
15382         make_typename_type, check_initializer, cp_finish_decl,
15383         xref_tag): Likewise.
15384         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
15385         decl_namespace, arg_assoc_template_arg, arg_assoc,
15386         validate_nonmember_using_decl, do_class_using_decl): Likewise.
15387         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
15388         args_to_string): Likewise.
15389         * friend.c (is_friend): Likewise.
15390         * lex.c (note_got_semicolon, note_list_got_semicolon,
15391         is_global): Likewise.
15392         * method.c (build_overload_nested_name, build_overload_value,
15393         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
15394         * parse.y (typename_sub, typename_sub1): Likewise.
15395         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
15396         process_partial_specialization, convert_template_argument,
15397         template_args_equal, add_pending_template, lookup_template_class,
15398         for_each_template_parm_r, maybe_fold_nontype_arg,
15399         tsubst, instantiate_template, type_unification_real, unify,
15400         instantiate_pending_templates, set_mangled_name_for_template_decl):
15401         Likewise.
15402         * repo.c (repo_get_id, repo_template_used): Likewise.
15403         * search.c (lookup_field_1): Likewise.
15404         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
15405         * xref.c (classname): Likewise.
15407 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
15409         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
15410         (CANONICAL_BINFO): New macro.
15411         (BINFO_NEW_VTABLE_MARKED): Use it.
15412         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
15413         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
15414         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
15415         not TREE_TYPE.
15416         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15417         (build_secondary_vtable): Likewise.
15418         (dfs_finish_vtbls): Likewise.
15419         (dfs_accumulate_vtbl_inits): Likewise.
15420         (accumulate_vtbl_inits): New function.
15421         (finish_vtbls): Make sure that virtual bases come after
15422         non-virtual bases in the vtable group.
15423         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
15424         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15425         * search.c (struct vbase_info): Move definition.
15426         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
15427         (unmarked_new_vtable_p): Likewise.
15428         (dfs_mark_vtable_path): Remove.
15429         (dfs_mark_new_vtable): Remove.
15430         (dfs_unmark_new_vtable): Likewise.
15431         (dfs_clear_search_slot): Likewise.
15432         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
15433         (dfs_clear_vbase_slots): Likewise.
15434         (init_vbase_pointers): LIkewise.
15436 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
15438         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
15439         SIZETYPE to a non-SIZETYPE.
15441 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
15443         * class.c (layout_virtual_bases): Adjust names in conditionally
15444         compiled code.
15446         * class.c (record_base_offsets): New function.
15447         (layout_conflict_p): Likewise.
15448         (layout_nonempty_base_or_field): Use it.
15449         (layout_empty_base): New function.
15450         (build_base_field): Use it.
15451         (build_base_fields): Update comment.
15452         (layout_virtual_bases): Fold in a little code form
15453         layout_basetypes.  Use layout_empty_base.
15454         (layout_basetypes): Remove.
15455         (end_of_class): New function.
15456         (layout_class_type): Use it.  Adjust.
15458         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
15459         (fntype_p): Remove.
15460         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
15461         comment.
15462         (dfs_skip_nonprimary_vbases_markedp): Likewise.
15463         * typeck.c (fntype_p): Remove.
15465         * cp-tree.h (TI_SPEC_INFO): Remove.
15466         (CLASSTYPE_TI_SPEC_INFO): Likewise.
15467         * pt.c (process_partial_specialization): Likewise.
15469         * class.c (build_base_field): Fix thinko in computation of binfo
15470         offsets.
15472         * tree.c (mark_local_for_remap_p): Mark variables declared in
15473         TARGET_EXPRs as well.
15475 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15477         * typeck.c (require_complete_type, complete_type,
15478         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
15479         build_array_ref, convert_arguments, pointer_diff,
15480         build_x_unary_op, build_unary_op, build_c_cast,
15481         build_modify_expr): Use COMPLETE_TYPE_P etc.
15482         * call.c (is_complete, convert_like_real,
15483         build_new_method_call): Likewise.
15484         * class.c (build_vbase_pointer_fields, check_bases,
15485         build_base_field, finish_struct_1, pushclass): Likewise.
15486         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
15487         * decl.c (maybe_process_template_type_declaration, pushtag,
15488         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
15489         layout_var_decl, check_initializer, cp_finish_decl,
15490         grokdeclarator, require_complete_types_for_parms,
15491         grok_op_properties, xref_tag, xref_basetypes,
15492         check_function_type): Likewise.
15493         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
15494         * friend.c (do_friend): Likewise.
15495         * init.c (build_offset_ref): Likewise.
15496         * parse.y (structsp): Likewise.
15497         * pt.c (maybe_process_partial_specialization,
15498         tsubst_friend_function, instantiate_class_template, tsubst,
15499         do_type_instantiation, instantiate_pending_templates): Likewise.
15500         * repo.c (repo_get_id): Likewise.
15501         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
15502         synthesize_tinfo_var, emit_support_tinfos): Likewise.
15503         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
15504         * semantics.c (begin_class_definition): Likewise.
15505         * tree.c (build_cplus_method_type): Likewise.
15506         * typeck2.c (digest_init, build_functional_cast,
15507         add_exception_specifier): Likewise.
15508         * parse.h, parse.c: Regenerated.
15510 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
15512         * inc/cxxabi.h: New header file. Define new-abi entry points.
15513         (__pointer_type_info::target): Rename member to ...
15514         (__pointer_type_info::type): ... here.
15515         (__base_class_info::type): Rename member to ...
15516         (__base_class_info::base): ... here.
15517         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
15518         * cp-tree.h (CPTI_ABI): New global tree enumeration.
15519         (abi_node): New global tree node.
15520         * decl.c (abi_node): Document.
15521         (init_decl_processing): Initialize abi_node.
15522         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
15523         (get_vmi_pseudo_type_info): Likewise.
15524         (create_tinfo_types): Likewise.
15525         (emit_support_tinfos): Likewise.
15526         * tinfo.h (cxxabi.h): Include for new-abi.
15527         Move rtti class definitions to new header file.
15528         * tinfo.cc (abi): Use the namespace.
15529         (std): Move new abi rtti classes from here ...
15530         (__cxxabiv1): ... to here.
15531         * tinfo2.cc (cxxabi.h): Include for new-abi.
15532         Move rtti class definitions to new header file.
15533         (std): Move new abi rtti classes from here ...
15534         (__cxxabiv1): ... to here.
15535         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
15536         namespace.
15538 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
15539             Jason Merrill  <jason@casey.cygnus.com>
15541         * method.c (build_overload_int): Use host_integerp.
15543 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15545         * init.c (build_offset_ref): Handle the case of a templated member
15546         function.
15548 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15550         * except.c (expand_exception_blocks): Clear catch_clauses_last.
15552 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
15554         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
15555         * class.c (check_bitfield_decl): Turn illegal bitfields into
15556         non-bitfields.
15557         (dfs_propagate_binfo_offsets): Adjust for new size_binop
15558         semantics.
15559         (dfs_offset_for_unshared_vbases): Likewise.
15560         * cvt.c (cp_convert_to_pointer): Convert NULL to a
15561         pointer-to-member correctly under the new ABI.
15562         * expr.c (cplus_expand_constant): Don't use cp_convert when
15563         turning an offset into a pointer-to-member.
15564         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
15565         when dereferencing them under the new ABI.
15566         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
15567         of pointers-to-members under the new ABI.
15569         * class.c (check_bitfield_decl): Remove restriction on really long
15570         bitfields.
15571         (layout_class_type): Implement new ABI handling of bitfields
15572         longer than their types.
15574 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15576         * parse.y (extdefs): Call ggc_collect.
15577         * parse.c: Regenerated.
15579 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
15581         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
15582         (note_name_declared_in_class): Use OVL_CURRENT to get at a
15583         potential overload.
15585 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15587         * class.c (build_vbase_path): Use integer_zerop.
15588         (build_vtable_entry): Use tree_low_cst.
15589         (get_vfield_offset): Use bit_position.
15590         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
15591         Use tree_low_cst.
15592         (check_bitfield_decl): Set DECL_SIZE using convert.
15593         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
15594         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
15595         Use tree_low_cst.
15596         (finish_struct_1): Use bit_position.
15597         (dump_class_hierarchy): Use tree_low_cst.
15598         * cp-tree.h (min_precision): Add declaration.
15599         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
15600         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
15601         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
15602         * expr.c (cplus_expand_constant): Use bit_position.
15603         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
15604         * rtti.c (get_base_offset): Use bit_position.
15605         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
15606         host_integerp, and tree_low_cst.
15607         (pointer_int_sum): Use integer_zerop.
15608         (build_component_addr): Use bit_position.
15610 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
15612         * typeck.c (require_complete_type): Don't assume size_zero_node.
15613         (complete_type_or_else): Likewise.
15615 2000-03-16  Steven Grady <grady@digitaldeck.com>
15616             Jason Merrill  <jason@casey.cygnus.com>
15618         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
15620 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
15622         * decl2.c (grokfield): Bail out if type is error_mark_node.
15624 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15626         * tinfo2.cc (__ptr_to_member_data): Rename to ...
15627         (__pointer_to_member_data): ... here. Adjust.
15628         * rtti.c (create_tinfo_types): Adjust.
15630 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15632         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
15633         * decl.c (ref_desc_type_node): Undocument.
15634         * rtti.c (ptr_ref_initializer): Rename to ...
15635         (ptr_initializer): ... here. Adjust comments.
15636         (ptmd_initializer): Fix comment thinko.
15637         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
15638         (create_tinfo_types): Remove ref_desc_type_node init.
15639         * tinfo2.cc (__reference_type_info): Remove.
15641 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
15643         * decl.c (cp_finish_decl): Remove obsolete comment.
15645         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
15647 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
15649         * cp-tree.h: Tweak documentation.
15650         * class.c (build_vbase_pointer_fields): Layout the fields, too.
15651         (avoid_overlap): Remove.
15652         (get_binfo_offset_as_int): New function.
15653         (dfs_serach_base_offsets): Likewise.
15654         (layout_nonempty_base_or_field): Likewise.
15655         (build_base_field): Layout fields here.  Avoid placing two objects
15656         of the same type at the same address, under the new ABI.
15657         (build_base_fields): Adjust accordingly.
15658         (create_vtable_ptr): Return the new field, but don't attach it to
15659         TYPE_FIELDS.
15660         (remove_base_field): Remove.
15661         (remove_base_fields): Remove.
15662         (layout_basetypes): Adjust accordingly.
15663         (layout_class_type): Call layout_field for each field, rather than
15664         just making a wholesale call to layout_type.
15666 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
15668         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
15670 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
15672         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
15674         * except.c (dtor_nothrow): New fn.
15675         (do_pop_exception): Use it.  Take type parm.
15676         (push_eh_cleanup): Take type parm.
15677         (expand_start_catch_block): Pass it.
15678         (build_eh_type_type_ref): Accept null type.
15680 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
15682         * cp-tree.h (revert_static_member_fn): Change prototype.
15683         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
15684         (grok_op_properties): Likewise.
15685         (start_function): Likewise.
15686         (revert_static_member_fn): Simplify.
15687         * pt.c (check_explicit_specialization): Adjust call to
15688         revert_static_member_fn.
15690 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
15692         * cp-tree.h (scope_kind): New type.
15693         (tmpl_spec_kind): Likewise.
15694         (declare_pseudo_global_level): Remove.
15695         (pseudo_global_level_p): Rename to template_parm_scope_p.
15696         (pushlevel): Remove declaration.
15697         (begin_scope): New function.
15698         (finish_scope): Likewise.
15699         (current_tmpl_spec_kind): Likewise.
15700         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
15701         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
15702         Add template_spec_p.
15703         (toplevel_bindings_p): Adjust.
15704         (declare_pseudo_global_level): Remove.
15705         (pseudo_global_level_p): Rename to template_parm_scope_p.
15706         (current_tmpl_spec_kind): New function.
15707         (begin_scope): Likewise.
15708         (finish_scope): Likewise.
15709         (maybe_push_to_top_level): Adjust.
15710         (maybe_process_template_type_declaration): Likewise.
15711         (pushtag): Likewise.
15712         (pushdecl_nonclass_level): Likewise.
15713         (lookup_tag): Likewise.
15714         (grokfndecl): Handle member template specializations.  Share
15715         constructor and non-constructor code.
15716         * decl2.c (check_classfn): Handle member template specializations.
15717         * pt.c (begin_template_parm_list): Use begin_scope.
15718         (begin_specialization): Likewise.
15719         (end_specialization): Likewise.
15720         (check_explicit_specialization): Use current_tmpl_spec_kind.
15721         Handle member template specializations.
15722         (end_template_decl): Use finish_scope.  Remove call to
15723         get_pending_sizes.
15724         (push_template_decl_real): Remove bogus error message.
15725         (tsubst_decl): Fix typo in code contained in comment.
15726         (instantiate_template): Handle member template specializations.
15727         (most_general_template): Likewise.
15729 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15731         * lex.c (whitespace_cr): Compress consecutive calls to warning().
15732         (do_identifier): Ditto for error().
15734         * pt.c (convert_nontype_argument): Ditto for cp_error().
15735         (convert_template_argument): Ditto for cp_pedwarn().
15737 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
15739         * exception.cc (__check_null_eh_spec): New fn.
15740         * except.c (expand_end_eh_spec): Call it if the spec is throw().
15742 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15744         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
15745         * except.c (expand_end_eh_spec): Add the return type.
15746         * rtti.c (throw_bad_cast): Add the parmtypes.
15747         (throw_bad_typeid): Likewise.
15749         * semantics.c (expand_stmt): Only leave out rtl for unused
15750         artificials, and set DECL_IGNORED_P on them as well.
15751         * decl.c (wrapup_globals_for_namespace): Likewise.
15753 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
15755         * decl.c (maybe_commonize_var): Skip all artificial decls.
15756         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
15758 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
15760         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
15761         * cp-tree.h: Declare flag_enforce_eh_specs.
15762         * decl.c (store_parm_decls, finish_function): Check it.
15764         C library functions don't throw.
15765         * Makefile.in (cfns.h): New target.
15766         (except.o): Depend on it.
15767         * Make-lang.in (cc1plus): Depend on cfns.gperf.
15768         * cfns.gperf: New file.
15769         * cfns.h: Generated.
15770         * except.c: Include it.
15771         (nothrow_libfn_p): New fn.
15772         * decl.c (grokfndecl): Use it.
15773         * cp-tree.h: Declare it.
15775         * decl.c (push_overloaded_decl_1, auto_function,
15776         define_function): Lose.
15777         (build_library_fn_1): New static fn.
15778         (builtin_function): Use it.
15779         (get_atexit_node): Use build_library_fn_ptr.
15780         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
15781         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
15782         push_void_library_fn, push_throw_library_fn): New fns.
15783         * cp-tree.h: Declare them.
15784         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
15785         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
15786         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
15787         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
15788         * rtti.c (build_runtime_decl): Lose.
15789         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
15790         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
15791         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
15793         * call.c (build_call): Remove result_type parm.
15794         Call mark_used on unused artificial fns.
15795         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
15797 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
15799         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
15800         appropriate.
15801         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
15802         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
15803         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
15804         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
15805         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
15806         expand_generic_desc): Likewise.
15808 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15810         * exception.cc (__cp_pop_exception): Cleanup the original object.
15812 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15814         * decl.c (grok_op_properties): Merge conversion to void warning
15815         with other silly op warnings.
15817 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
15819         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
15820         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
15822 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15824         * decl.c (cp_make_fname_decl): New function.
15825         (wrapup_globals_for_namespace): Don't emit unused static vars.
15826         (init_decl_processing): Remove comment about use of
15827         array_domain_type. Set make_fname_decl.
15828         (cp_finish_decl): Remove __FUNCTION__ nadgering.
15829         * semantics.c (begin_compound_stmt): Remove
15830         current_function_name_declared flagging.
15831         (expand_stmt): Don't emit unused local statics.
15832         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
15833         specially.
15835 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15837         * typeck.c (convert_for_assignment): Don't look at array
15838         initializer.
15839         * call.c (convert_like_real): Likewise.
15841 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
15843         Add initial support for '\uNNNN' specifier.
15844         * lex.c (read_ucs): New fn.
15845         (readescape, skip_white_space): Call it.
15846         (is_extended_char, is_extended_char_1): New fns.
15847         (utf8_extend_token): New fn, #if 0'd out.
15848         (real_yylex): Treat extended chars like letters.
15850         * search.c (note_debug_info_needed): Walk the bases even if we
15851         weren't deferring the type itself.
15853 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15855         * decl2.c (finish_objects): Constify a char*.
15857         * method.c (emit_thunk): Likewise.
15859 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
15861         * typeck.c (dubious_conversion_warnings): Look through
15862         REFERENCE_TYPE.
15864 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15866         * class.c (dfs_modify_vtables): I is now unsigned.
15867         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
15868         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
15869         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
15870         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
15871         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
15872         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
15873         Call integer_all_onesp.
15874         * typeck2.c (process_init_constructor): Use compare_tree_int.
15876         * lang-specs.h (as): Don't call if -syntax-only.
15878 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
15880         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
15881         RTL_EXPR_HAS_NO_SCOPE after all.
15883 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
15885         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
15886         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
15887         RTL_EXPR_HAS_NO_SCOPE.
15889         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
15890         later.
15892         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
15894 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
15896         * call.c (convert_like): Macrofy.
15897         (convert_like_with_context): New macro.
15898         (convert_like_real): Renamed from convert_like.  Add calling
15899         context parameters, for diagnostics. Add recursive flag.  Call
15900         dubious_conversion_warnings for outer conversion.
15901         (build_user_type_conversion): Use convert_like_with_context.
15902         (build_over_call): Likewise. Don't warn about dubious
15903         conversions here. Adjust convert_default_arg calls.
15904         (convert_default_arg): Add context parameters for diagnostics.
15905         Pass through to convert_like_with_context.
15906         * cp-tree.h (convert_default_arg): Add context parameters.
15907         (dubious_conversion_warnings): Prototype new function.
15908         * typeck.c (convert_arguments): Adjust convert_default_arg call.
15909         (dubious_conversion_warnings): New function, broken
15910         out of convert_for_assignment.
15911         (convert_for_assignment): Adjust.
15913 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
15915         * decl2.c (key_method): Break out from...
15916         (import_export_vtable, import_export_class): ...here.
15918         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
15919         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
15921         * search.c (note_debug_info_needed, dfs_debug_mark,
15922         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
15923         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
15925 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
15927         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
15928         typos.
15930 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
15932         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
15933         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
15934         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
15935         (lang_type): Split gets_new into has_new and has_array_new.
15936         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15937         (TYPE_GETS_NEW): Split into ...
15938         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
15939         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
15940         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
15941         (build_op_new_call): Don't declare.
15942         (build_new_1): Likewise.
15943         * call.c (build_op_new_call): Remove.
15944         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15945         instead of TYPE_NEEDS_DESTRUCTOR.
15946         (finish_struct_bits): Likewise.
15947         (add_implicitly_declared_members): Likewise.
15948         (check_field_decl): Likewise.
15949         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
15950         correctly under the new ABI.
15951         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15952         instead of TYPE_NEEDS_DESTRUCTOR.
15953         (initialize_local_var): Likewise.
15954         (destroy_local_var): Likewise.
15955         (cp_finish_decl): Likewise.
15956         (register_dtor_fn): Likewise.
15957         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
15958         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
15959         TYPE_VEC_DELETE_TAKES_SIZE here.
15960         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
15961         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
15962         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15963         (finish_destructor_body): Likewise.
15964         (maybe_build_cleanup_1): Likewise.
15965         * decl2.c (do_static_destruction): Likewise.
15966         * init.c (build_new_1): Make it static.
15967         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15968         (expand_cleanup_for_base): Likewise.
15969         (get_cookie_size): New function.
15970         (build_new_1): Handle array-new cookies correctly under the new
15971         ABI.
15972         (build_vec_delete_1): Likewise.
15973         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15974         (build_delete): Likewise.
15975         (build_vec_delete): Handle array-new cookies correctly under the new
15976         ABI.
15977         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15978         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
15979         TYPE_HAS_ARRAY_NEW_OPERATOR.
15980         * ptree.c (print_lang_type): Check them.
15981         * search.c (context_for_name_lookup): Fix typo in comment.
15982         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15983         * tree.c (break_out_cleanups): Likewise.
15984         (build_cplus_array_test_1): Likewise.
15985         (cp_build_qualified_type_real): Likewise.
15986         * typeck.c (complete_type): Likewise.
15988         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
15989         the command-line, not the end.
15991 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
15993         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
15995 2000-03-02  Tom Tromey  <tromey@cygnus.com>
15997         * cp-tree.h (build_java_class_ref): Declare.
15998         * init.c (build_java_class_ref): No longer static.
15999         * except.c (expand_throw): Generate a Java-style `throw' if the
16000         thrown object is a "Java" object.
16001         (initialize_handler_parm): Generate a Java-style lookup of
16002         exception info if the caught object is a "Java" object.
16003         (catch_language, catch_language_init): New globals.
16004         (decl_is_java_type): New function.
16005         (expand_start_catch_block): Don't call push_eh_info() or
16006         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
16007         class reference to build_catch_block.
16009 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16011         * typeck.c (comptypes): Treat sizetype like its language equivalent.
16013 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
16015         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
16016         to merge reference/pointer code and fix incorrect warnings.
16018 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
16020         * search.c (protected_accessible_p): Use context_for_name_lookup.
16022         * init.c (construct_virtual_bases): Fix thinko.
16023         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
16025 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16027         * decl.c (current_function_decl): Move to toplev.c.
16029 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
16031         * pt.c (fn_type_unification): Unify return type, whenever
16032         provided.
16033         (get_bindings_real): Only pass return type when necessary.
16034         Remove explicit return type check.
16035         * class.c (resolve_address_of_overloaded_function): Pass desired
16036         return type to fn_type_unification.
16038 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16040         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
16041         DECL_FIELD_SIZE.
16042         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
16043         DECL_FIELD_SIZE.
16044         * rtti.c (expand_class_desc): Likewise.
16045         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
16046         (THUNK_VCALL_OFFSET): Likewise.
16047         (THUNK_DELTA): Reflect changes in ../tree.h.
16049 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
16051         * search.c (protected_accessible_p): Also allow the access if
16052         the member is public in DERIVED.  Lose TYPE parm.
16053         (friend_accessible_p): Lose TYPE parm.
16054         (accessible_p): Adjust.
16056 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16058         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
16059         on things that are not sizes; ssize_binop deleted.
16060         Call size_diffop when appropriate.
16061         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16062         (build_primary_vtable, build_secondary_vtable): Likewise.
16063         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
16064         Variable I is HOST_WIDE_INT.
16065         (get_vfield_offset): Pass proper types to size_binop.
16066         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
16067         (finish_struct_1): Likewise.
16068         (skip_rtti_stuff): Arg N is now pointer to signed.
16069         (layout_class_type): Use size_zero_node.
16070         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
16071         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
16072         * decl.c (complete_arry_type): Pass proper types to size_binop.
16073         (xref_basetypes): BINFO_OFFSET is sizetype.
16074         * error.c (dump_expr): Don't use size_binop non-sizes.
16075         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
16076         * init.c (construct_virtual_bases): Fix type error.
16077         (build_vec_delete_1): Pass proper type to size_binop and don't
16078         fold result.
16079         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
16080         * rtti.c (get_base_offset): Pass proper type to size_binop.
16081         * search.c (dfs_find_vbases): Fix type error.
16082         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
16083         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
16084         * tree.c (debug_binfo): Variable N is signed.
16085         Use HOST_WIDE_INT_PRINT_DEC.
16086         * typeck.c (comptypes): sizetype is same as equivalent integer type.
16087         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
16088         size_one_node and size_zero_node.
16089         (c_alignof): Use size_one_node.
16090         (build_component_addr): Pass proper types to size_binop.
16091         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
16093 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
16095         Implement class scope using-declarations for functions.
16096         * class.c (handle_using_decl): Call add_method for used functions.
16097         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
16098         (add_method): Used functions are hidden by local functions.
16099         (check_bases_and_members): Handle using-decls before finalizing
16100         CLASSTYPE_METHOD_VEC.
16101         * call.c (add_function_candidate): Add ctype parm; if nonzero,
16102         override the type of 'this' accordingly.
16103         (add_template_candidate, add_template_candidate_real): Add ctype parm.
16104         (convert_class_to_reference, build_user_type_conversion_1,
16105         build_new_function_call, build_object_call, build_new_op,
16106         build_new_method_call): Pass ctype parm.
16108         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
16109         the baselink.
16110         * call.c (convert_class_to_reference, build_user_type_conversion_1,
16111         build_new_function_call, build_object_call, build_new_op,
16112         build_new_method_call, build_op_delete_call): Don't get basetype_path
16113         from a baselink.
16114         * typeck.c (build_component_ref): Likewise.
16115         * init.c (build_offset_ref): Likewise.
16116         (resolve_offset_ref): Don't call enforce_access.
16117         Call build_scoped_ref.
16118         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
16119         would cause an error or if -pedantic.
16120         * class.c (alter_access): Lose binfo parm.
16122 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16124         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
16125         types.
16127 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
16129         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
16130         pseudo_type_info creation into the std namespace
16132 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
16134         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
16135         (import_export_class): Remove declaration.
16136         * decl2.c (import_export_class): Make it static.
16137         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
16138         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
16139         EXPR_WITH_FILE_LOCATION.
16140         * lex.c (check_newline): Tweak filename/lineno setting.
16141         * semantics.c (begin_while_stmt): Fix typo in comment.
16143 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16145         * lang-options.h (-fmessage-length=): Add missing option.
16147         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
16149 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
16151         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
16153 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
16155         * optimize.c (expand_call_inline): Emit the return label before
16156         evaluating the return value.
16158 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
16160         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
16161         than duplicating functionality here.
16162         * optimize.c: Include input.h.
16163         (expand_call_inline): Use push_srcloc and pop_srcloc.
16164         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
16165         * parse.c: Regenerated.
16166         * Makefile.in (lex.o): Depend on input.h.
16167         (optimize.o): Likewise.
16169 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
16171         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
16172         function type, rather than ICE.
16174 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
16176         * decl.c (grokdeclarator): Call decl_type_access_control.
16177         * parse.y (parse_end_decl): Don't call decl_type_access_control if
16178         decl is null.
16180 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
16182         * decl.c (decls_match): Remove obsolete static member nadgering.
16184 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16186         * decl.c (grokdeclarator): Change ANSI to ISO.
16187         * lex.c (consume_string, readescape, do_identifier): Likewise.
16188         (parse_float, real_yylex): Likewise.
16189         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
16190         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
16191         new_type_id, maybe_label_decls, simple_stmt,
16192         for.init.statement): Likewise.
16193         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
16194         * semantics.c (finish_named_return_value): Likewise.
16195         * parse.c: Regenerate.
16197 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
16199         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
16200         (CPTI_CLASS_STAR_TYPE): Remove.
16201         (vtable_index_type): Likewise.
16202         (class_star_type_node): Remove.
16203         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
16204         (build_binary_op_nodefault): Remove.
16205         * call.c (build_new_op): Use build_binary_op instead of
16206         build_binary_op_nodefault.
16207         * decl.c (init_decl_processing): Remove class_star_type_node
16208         initialization.  Make delta_type_node ptrdiff_type_node under the
16209         new ABI.  Initialize vtable_index_type.
16210         (build_ptrmemfunc_type): Build different structures for the new
16211         ABI.
16212         (build_enumerator): Use build_binary_op instead of
16213         build_binary_op_nodefault.
16214         * method.c (build_overload_value): Mangle pointers-to-members
16215         appropriately under the new ABI.
16216         * typeck.c (build_array_ref): Use build_binary_op instead of
16217         build_binary_op_nodefault.
16218         (get_member_function_from_ptrfunc): Adjust for the new ABI.
16219         (build_binary_op_nodefault): Rename to ...
16220         (build_binary_op): ... this.  Remove old version.  Adjust for
16221         pointer-to-member comparisons under the new ABI.
16222         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
16223         (build_ptrmemfunc): Adjust for the new ABI.
16224         (expand_ptrmemfunc_cst): Likewise.
16225         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
16226         (pfn_from_ptrmemfunc): Adjust for the new ABI.
16228 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16230         * call.c (build_object_call): Compress consecutive calls to
16231         cp_error.
16232         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
16233         (build_op_delete_call): Adjust message formatting.
16235         * class.c (check_bases): Compress consecutive calls to
16236         cp_pedwarn.
16237         (finish_struct_anon): Say 'ISO C++'.
16239         * decl.c (start_decl): Same here.
16240         (grok_reference_init): Likewise.
16241         (grokfndecl): Correct message formatting.
16242         (grokfndecl): Improve diagnostic.
16243         (check_static_variable_definition): Likewise. Say 'ISO C++'
16244         (compute_array_index_type): Say 'ISO C++'
16245         (create_array_type_for_decl): Compress consecutive calls to
16246         cp_error.
16247         (grokdeclarator): Say 'ISO C++'
16248         (grok_op_properties): Likewise.
16250         * decl2.c (delete_sanity): Clairify diagnostic.
16251         (check_member_template): Same here.
16252         (grok_function_init): Use consistent terminology.
16254         * expr.c (do_case): Say 'ISO C++'
16256         * friend.c (do_friend): Compress consecutive calls to warning.
16258 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
16260         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
16261         * class.c (build_secondary_vtable): Reorganize.  Don't create a
16262         new vtable under the new ABI.
16263         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
16264         computing the size.
16265         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
16266         the initializing elements.
16267         (initialize_vtable): New function.
16268         (dfs_finish_vtbls): Use it.
16269         (dfs_accumulate_vtbl_inits): New function.
16270         (finish_vtbls): Merge primary and secondary vtables under the new
16271         ABI.
16272         (finish_struct_1): Remove redundant call to layout_vtable_decl.
16273         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
16274         aren't VAR_DECLs.
16276         * class.c (build_vtable): New function, split out from ...
16277         (get_vtable_decl): ... here, and ...
16278         (build_secondary_vtable): ... here.
16280         * pt.c (tsubst_decl): Fix formatting.
16282 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16284         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
16285         (avoid_overlap, build_base_field): Likewise.
16286         (build_base_field, build_base_fields, is_empty_class):
16287         Test DECL_SIZE with integer_zero.
16288         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
16289         * cp-tree.h (struct lang_type): New field size_unit.
16290         (CLASSTYPE_SIZE_UNIT): New macro.
16291         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
16292         (cp_finish_decl): Delete -Wlarger-than processing.
16293         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
16294         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
16295         * tree.c (make_binfo): binfo vector is one entry longer.
16296         (walk_tree): Walk DECL_SIZE_UNIT.
16298 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
16300         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
16301         comment.
16302         (build_vtable_entry): Don't assume all vtable entries are
16303         functions.
16304         (build_vtbl_initializer): Adjust accordingly.
16305         (get_vtable_decl): Fix formatting.
16307 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
16309         * semantics.c (deferred_type_access_control): Walk the entire
16310         type_lookups list.
16311         (save_type_access_control): Rename from
16312         initial_deferred_type_access_control.  Just remember the value.
16313         (decl_type_access_control): New fn.
16314         (begin_function_definition): Use deferred_type_access_control, after
16315         we've started the function.  Set type_lookups to error_mark_node.
16316         * parse.y (frob_specs, fn.def1): Adjust.
16317         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
16318         (parse_end_decl, parse_bitfield0, parse_method): New fns.
16319         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
16320         (after_type_component_declarator0): Likewise.
16321         (after_type_component_declarator): Likewise.
16322         (notype_component_declarator): Likewise.
16323         * cp-tree.h: Adjust.
16325         * decl.c (redeclaration_error_message): Allow redeclaration of
16326         namespace-scope decls.
16328 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
16330         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
16332 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
16334         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
16335         * decl2.c (grokclassfn): Likewise.
16337         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
16339         * decl2.c (lang_decode_option): Don't set default message length
16340         here.
16341         * lex.c (lang_init_options): Set it here.
16343 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
16345         Make DECL_CONTEXT mean the class in which a member function was
16346         declared, even for a virtual function.
16347         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
16348         (DECL_FRIEND_CONTEXT): New macro.
16349         (DECL_REAL_CONTEXT): Remove.
16350         (SET_DECL_FRIEND_CONTEXT): Likewise.
16351         (DECL_VIRTUAL_CONTEXT): Adjust.
16352         (DECL_CLASS_SCOPE_P): Use TYPE_P.
16353         (add_friends): Remove.
16354         (hack_decl_function_context): Likewise.
16355         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
16356         CP_DECL_CONTEXT.
16357         (build_over_call): Fix indentation.  Use DECL_CONTEXT
16358         instead of DECL_CLASS_CONTEXT.
16359         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
16360         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16361         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16362         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
16363         (build_base_field): Likewise.
16364         (finish_struct_1): Likewise.
16365         (build_self_reference): Likewise.
16366         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
16367         DECL_REAL_CONTEXT.
16368         (pushtag): Use decl_function_context, not
16369         hack_decl_function_context.
16370         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16371         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
16372         (pushdecl): Remove bogus code.
16373         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
16374         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16375         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16376         Use decl_function_context, nothack_decl_function_context.
16377         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
16378         (grokdeclarator): Likewise.  Use decl_function_context, not
16379         hack_decl_function_context.
16380         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
16381         (start_function): Use DECL_FRIEND_CONTEXT, not
16382         DECL_CLASS_CONTEXT.  Use decl_function_context, not
16383         hack_decl_function_context.
16384         (finish_function): Use decl_function_context, not
16385         hack_decl_function_context.
16386         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
16387         DECL_CLASS_CONTEXT.
16388         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
16389         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
16390         (grokfield): Likewise.
16391         (finish_builtin_type): Likewise.
16392         (finish_vtable_vardec): Use decl_function_context, not
16393         hack_decl_function_context.
16394         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16395         (start_static_initialization_or_destruction): Likewise.
16396         (finish_static_initialization_or_destruction): Likewise.
16397         (mark_used): Adjust logic for deciding when to synthesize methods.
16398         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
16399         DECL_REAL_CONTEXT.
16400         * error.c (dump_function_decl): Use DECL_CONTEXT, not
16401         DECL_CLASS_CONTEXT.
16402         * friend.c (is_friend): Likewise.
16403         (add_friends): Remove.
16404         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
16405         * lex.c (begin_definition_of_inclass_inline): Use
16406         decl_function_context, not hack_decl_function_context.
16407         (process_next_inline): Likewise.
16408         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
16409         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
16410         DECL_CLASSS_CONTEXT.
16411         (hack_identifier): Likewise.
16412         (synthesize_method):  Use decl_function_context, not
16413         hack_decl_function_context.
16414         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
16415         DECL_REAL_CONTEXT.
16416         (is_member_template): Use decl_function_context, not
16417         hack_decl_function_context.  Use DECL_CONTEXT, not
16418         DECL_CLASS_CONTEXT.
16419         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
16420         DECL_CLASS_CONTEXT.
16421         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
16422         DECL_REAL_CONTEXT.
16423         (push_template_decl_real): Likewise.
16424         (instantiate_class_template): Don't call add_friends.
16425         (tsubst_default_argument): Use DECL_CONTEXT, not
16426         DECL_REAL_CONTEXT.
16427         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
16428         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16429         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
16430         DECL_CLASS_CONTEXT.
16431         * repo.c (repo_inline_used): Likewise.
16432         * search.c (current_scope): Adjust for new _CONTEXT macros.
16433         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
16434         DECL_REAL_CONTEXT.
16435         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
16436         (lookup_fnfields_here):Likewise.
16437         (check_final_overrider): Likewise.
16438         (init_vbase_pointers): Likewise.
16439         (virtual_context): Likewise.
16440         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
16441         (expand_body): Use decl_function_context, not
16442         hack_decl_function_context.
16443         * tree.c (hack_decl_function_context): Remove.
16444         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
16445         DECL_CLASS_CONTEXT.
16446         * typeck2.c (error_not_base_type): Likewise.
16448 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
16450         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
16452 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16454         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
16456 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
16458         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
16460 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
16462         * decl2.c (lang_decode_option): Enable automatic line wrapping.
16464 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
16466         * parse.y (frob_specs): Split out...
16467         (parse_decl): From here.
16468         (fn.def2): Call initial_deferred_type_access_control.
16469         (after_type_component_declarator0): Call frob_specs.
16470         (notype_component_declarator0): Likewise.
16471         * search.c (friend_accessible_p): Nested classes are friends of their
16472         enclosing classes.
16474 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
16476         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
16477         used to create an implicit temporary.
16479         * class.c (dfs_modify_vtables): Tweak calculation of functions to
16480         override.
16482 2000-02-08  Nathan Sidwell  <nathan@acm.org>
16484         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
16485         strip array element qualifiers too.
16487 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
16489         * decl.c (store_parm_decls): Don't build cleanups for parameters
16490         while processing_template_decl.
16492 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
16494         * cp-tree.h (struct saved_scope): Add incomplete field.
16495         (namespace_scope_incomplete): New macro.
16496         * decl.c (pushdecl): Use it.
16497         (hack_incomplete_structures): Use it.  See through artificial
16498         binding levels.
16499         (mark_saved_scope): Mark it.
16501         Implement access control for nested types.
16502         * search.c (type_access_control): New fn.
16503         (accessible_p): Now we do perform access control for types.
16504         * semantics.c (deferred_type_access_control): New fn.
16505         (initial_deferred_type_access_control): New fn.
16506         (begin_function_definition): Call it.  Add lookups parm.
16507         * decl.c (struct binding_level): Add this_class field.
16508         (pushlevel_class): Set it.
16509         (mark_binding_level): Mark it.
16510         (lookup_name_real): Use it.  Call type_access_control.
16511         (mark_saved_scope): Mark lookups field.
16512         * cp-tree.h (flagged_type_tree): Add lookups field.
16513         (struct saved_scope): Add lookups field.
16514         (type_lookups): New macro.
16515         * parse.y (declmods): Now <ftype>.
16516         (parse_decl): Add lookups parm.  Call
16517         initial_deferred_type_access_control.
16518         (lang_extdef): Clear type_lookups.
16519         (typed_declspecs, declmods, typespec): Set lookups field.
16520         (initdcl): Call deferred_type_access_control.
16521         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
16522         component_decl_1, named_parm): Adjust.
16523         * friend.c (is_friend): Nested classes are friends of their
16524         enclosing classes.
16526         * class.c (currently_open_derived_class): New fn.
16527         * method.c (hack_identifier): Use it.
16529         * lex.c (do_identifier): Remove obsolete code.
16531         * parse.y (typed_typespecs): Propagate new_type_flag properly.
16533 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
16535         * tinfo.h: Remove apostrophes from C++ comment (xgettext
16536         thinks this file is plain C).
16538 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16540         * Makefile.in (call.o): Depend on $(EXPR_H).
16542         * call.c: Include "expr.h".
16544         * class.c (dump_class_hierarchy): Add prototype.
16546         * search.c (dfs_get_pure_virtuals): Likewise.
16548 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
16550         * parse.y (simple_stmt): Allow :: token in asm parameter list.
16551         * parse.c: Rebuilt.
16553 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
16555         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
16556         Store it in DECL_FCONTEXT.
16557         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
16559 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
16561         * tinfo.h (old abi): #include "tconfig.h".
16562         * tinfo.cc (convert_to_base): Move into old abi section.
16564 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
16566         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
16567         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
16568         (BINFO_PRIMARY_BINFO): New macro.
16569         (BF_DELTA): Rename to ...
16570         (BV_DELTA): ... this.
16571         (BF_VCALL_INDEX): Rename to ...
16572         (BV_VCALL_INDEX): ... this.
16573         (BF_FN): Rename to ...
16574         (BV_FN): ... this.
16575         * class.c (build_vbase_path): Adjust for changes to reverse_path.
16576         (set_rtti_entry): Rename BF_ macros to BV_ variants.
16577         (modify_vtable_entry): Simplify.
16578         (add_virtual_function): Rename BF_ macros to BV_ variants.
16579         (build_vtable_initializer): Likewise.
16580         (get_class_offset_1): Remove.
16581         (dfs_get_class_offset): Likewise.
16582         (get_class_offset): Likewise.
16583         (dfs_find_final_overrider): New function.
16584         (find_final_overrider): Likewise.
16585         (modify_one_vtable): Remove.
16586         (dfs_find_base): New function.
16587         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
16588         find_final_overrider.
16589         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
16590         virtuals.
16591         (dfs_fixup_vtable_deltas): Remove.
16592         (override_one_vtable): Remove.
16593         (merge_overrides): Likewise.
16594         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
16595         unreal chilren of virtual bases.
16596         (finish_struct_1): Don't use merge_overrides.  Don't use
16597         dfs_fixup_vtable_deltas.
16598         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
16599         BINFOs.
16601 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
16602             Jason Merrill  <jason@yorick.cygnus.com>
16604         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
16606 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
16608         * exception.cc (__throw_bad_typeid): Add missing std::.
16610 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16612         * cp-tree.h (make_thunk): PROTO -> PARAMS.
16614 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
16616         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
16618         Runtime support for new-abi rtti.
16619         * inc/typeinfo (type_info::operator!=): Define in class.
16620         (type_info::before, type_info::name, type_info::operator==,
16621         type_info::operator!=): Define new ABI implementations.
16622         (type_info::is_pointer_p, type_info::is_function_p): Declare
16623         new virtual functions.
16624         (type_info::do_catch, type_info::do_upcast): Likewise.
16626         * tinfo.h (__base_class_info): Define new class.
16627         (__class_type_info): Likewise.
16628         (__si_class_type_info): Likewise.
16629         (__vmi_class_type_info): Likewise.
16630         (__dynamic_cast): Prototype.
16632         * tinfo.cc: Conditionalize old and new rtti mechanisms.
16633         (type_info::is_pointer_p): Define new function.
16634         (type_info::is_function_p): Likewise.
16635         (type_info::do_catch): Likewise.
16636         (type_info::do_upcast): Likewise.
16637         (vtable_prefix): New structure for vtable access.
16638         (adjust_pointer): Define new template function.
16639         (contained_p, public_p, virtual_p, contained_public_p,
16640         contained_nonpublic_p, contained_nonvirtual_p): Define new
16641         functions.
16642         (nonvirtual_base_type): New local variable.
16643         (__class_type_info::~__class_type_info): Define.
16644         (__si_class_type_info::~__si_class_type_info): Likewise.
16645         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
16646         (__class_type_info::do_catch): Define new function.
16647         (__class_type_info::do_upcast): Likewise.
16648         (__class_type_info::find_public_src): Likewise.
16649         (__class_type_info::do_find_public_src): Likewise.
16650         (__si_class_type_info::do_find_public_src): Likewise.
16651         (__vmi_class_type_info::do_find_public_src): Likewise.
16652         (__class_type_info::do_dyncast): Likewise.
16653         (__si_class_type_info::do_dyncast): Likewise.
16654         (__vmi_class_type_info::do_dyncast): Likewise.
16655         (__class_type_info::do_upcast): Likewise.
16656         (__si_class_type_info::do_upcast): Likewise.
16657         (__vmi_class_type_info::do_upcast): Likewise.
16658         (__dynamic_cast): Likewise.
16660         * tinfo2.cc (__fundamental_type_info): Define new class.
16661         (__pointer_type_info): Likewise.
16662         (__reference_type_info): Likewise.
16663         (__array_type_info): Likewise.
16664         (__function_type_info): Likewise.
16665         (__enum_type_info): Likewise.
16666         (__ptr_to_member_type_info): Likewise.
16667         (__fundamental_type_info::~__fundamental_type_info): Define.
16668         (__pointer_type_info::~__pointer_type_info): Likewise.
16669         (__reference_type_info::~__reference_type_info): Likewise.
16670         (__array_type_info::~__array_type_info): Likewise.
16671         (__function_type_info::~__function_type_info): Likewise.
16672         (__enum_type_info::~__enum_type_info): Likewise.
16673         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
16674         (__pointer_type_info::do_catch): Define new function.
16675         (__ptr_to_member_type_info::do_catch): Define new function.
16677         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
16678         (__is_pointer): Likewise.
16680         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
16682 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
16684         * cp/class.c (build_vtable): Rename to build_primary_vtable.
16685         (prepare_fresh_vtable): Rename to build_secondary_vtable.
16686         (make_new_vtable): New function.
16687         (modify_vtable_entry): Handle generation of new vtables correctly.
16688         (modify_one_vtable): Remove unused parameter.
16689         (dfs_fixup_vtable_deltas): Likewise.
16690         (override_one_vtable): Use build_secondary_vtable.
16691         (finish_struct_1): Use build_primary_vtable and
16692         build_secondary_vtable.
16694 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
16696         * cp/decl.c: Adjust variable names, comments, help strings.
16698 2000-01-29  Nathan Sidwell  <nathan@acm.org>
16700         * new2.cc (operator delete[]): Use operator delete, don't assume
16701         implementation.
16703 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
16705         * class.c (build_vtbl_initializer): Add argument to
16706         build_vtable_entry call.
16708 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
16710         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
16711         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
16712         (BF_DELTA): New macro.
16713         (BF_VCALL_INDEX): Likewise.
16714         (BF_FN): Likewise.
16715         (THUNK_VCALL_OFFSET): Likewise.
16716         (make_thunk): Change prototype.
16717         * class.c (build_vtable_entry): Integrate
16718         build_vtable_entry_for_fn.  Handle vcall indices.
16719         (build_vtable_entry_for_fn): Remove.
16720         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
16721         BF_VCALL_INDEX, BF_FN.
16722         (modify_vtable_entry): Integrate common code from
16723         modify_one_vtable and dfs_fixup_vtable_deltas.
16724         (add_virtual_function): Set BF_VCALL_INDEX.
16725         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
16726         and BF_FN.
16727         (modify_one_vtable): Simplify.
16728         (dfs_fixup_vtable_deltas): Likewise.
16729         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
16730         * method.c (make_thunk): Handle vcall indices.
16732 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
16734         Compiler side new abi rtti (not enabled).
16735         * cp-tree.h (new_abi_rtti_p): New macro.
16736         (emit_support_tinfos): Prototype new function.
16737         (tinfo_decl_p): Likewise.
16738         (emit_tinfo_decl): Likwise.
16739         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
16740         macros.
16741         (doing_runtime): New local static.
16742         (init_rtti_processing): Add new-abi initializer.
16743         (get_tinfo_decl): Add new-abi logic.
16744         (tinfo_from_decl): Likewise.
16745         (build_dynamic_cast_1): Likewise.
16746         (qualifier_flags): New static function.
16747         (tinfo_base_init): Likewise.
16748         (generic_initializer): Likewise.
16749         (ptr_ref_initializer): Likewise.
16750         (ptmd_initializer): Likewise.
16751         (class_hint_flags): Likewise.
16752         (class_initializer): Likewise.
16753         (synthesize_tinfo_var): Likewise.
16754         (create_real_tinfo_var): Likewise.
16755         (create_pseudo_type_info): Likewise.
16756         (get_vmi_pseudo_type_info): Likewise.
16757         (create_tinfo_types): Likewise.
16758         (emit_support_tinfos): New global function.
16759         (tinfo_decl_p): New global predicate.
16760         (emit_tinfo_decl): New global function.
16761         * class.c (set_rtti_entry): Generalize for old and new rtti.
16762         (build_vtbl_initializer): Likewise.
16763         * decl2.c (finish_file): Likewise.
16765 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
16767         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
16768         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
16770 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
16772         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
16773         for scopes.
16775 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
16777         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
16779 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
16781         * optimize.c (calls_setjmp_r): Supply new argument
16782         to special_function_p.
16784 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16786         * call.c: PROTO -> PARAMS.
16787         * class.c: Likewise.
16788         * cp-tree.h: Likewise.
16789         * cvt.c: Likewise.
16790         * decl.c: Likewise.
16791         * decl.h: Likewise.
16792         * decl2.c: Likewise.
16793         * dump.c: Likewise.
16794         * errfn.c: Likewise.
16795         * error.c: Likewise.
16796         * except.c: Likewise.
16797         * expr.c: Likewise.
16798         * init.c: Likewise.
16799         * input.c: Likewise.
16800         * lex.c: Likewise.
16801         * lex.h: Likewise.
16802         * method.c: Likewise.
16803         * optimize.c: Likewise.
16804         * parse.y: Likewise.
16805         * pt.c: Likewise.
16806         * repo.c: Likewise.
16807         * rtti.c: Likewise.
16808         * search.c: Likewise.
16809         * semantics.c: Likewise.
16810         * spew.c: Likewise.
16811         * tree.c: Likewise.
16812         * typeck.c: Likewise.
16813         * typeck2.c: Likewise.
16814         * xref.c: Likewise.
16816 2000-01-25  Richard Henderson  <rth@cygnus.com>
16818         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
16820 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
16822         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
16823         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
16824         (struct vcall_offset_data_s): New type.
16825         (dfs_vcall_offset_queue_p): New function.
16826         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16827         (build_vcall_offset_vtbl_entries): Likewise.
16828         (layout_vtable_decl): Likewise.
16829         (num_vfun_entries): Likewise.
16830         (num_extra_vtbl_entries): Add the entries for vcall offsets.
16831         (build_vtbl_initializer): Likewise.
16832         (dfs_finish_vtabls): Use layout_vtable_decl.
16833         (modify_one_vtables): Always duplicate vtables under the new ABI.
16834         (finish_struct_1): Use layout_vtable_decl.
16836 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16838         * decl.c (member_function_or_else): Change third arg from a format
16839         specifier to an `enum overload_flags'.  Callers changed.
16841 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16843         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
16844         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
16845         build_const_cast, get_delta_difference, check_return_expr): Avoid
16846         ANSI string concatenation usage.
16848 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
16850         * class.c (layout_class_type): Put the fields required to make a
16851         class non-empty at the end, not the beginning, of the TYPE_FIELDs
16852         list.
16854 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
16856         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
16857         template.
16859         * decl2.c (mark_used): Do instantiate inlines that have been
16860         explicitly instantiated.
16862 2000-01-24  Richard Henderson  <rth@cygnus.com>
16864         * call.c (build_over_call): Use expand_tree_builtin.
16865         * typeck.c (build_function_call_real): Likewise.
16866         (build_binary_op_nodefault): Handle unordered compares.
16868 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16870         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
16871         cp_tree_index values.
16872         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
16873         New global node #defines for them.
16874         * rtti.c (call_void_fn): Replace with ...
16875         (build_runtime_decl): ... new static function.
16876         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
16877         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
16878         (build_dynamic_cast_1): Always produce correctly typed result.
16879         Explicitly produce type_info addresses. Use dynamic_cast_node.
16880         * exception.cc (__throw_bad_cast): Return `void *'.
16881         (__throw_bad_typeid): Return `const type_info &'.
16883 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16885         * cp-tree.h (get_vtable_decl): Prototype new function.
16886         * class.c (get_vtable_decl): New function. Broken out from ...
16887         (build_vtable): ... here. Use it.
16888         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
16889         by get_vtable_decl.
16891 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16893         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
16894         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
16895         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
16896         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
16897         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
16898         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
16899         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
16900         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
16901         (CPTI_TINFO_VAR_ID): New enumeration.
16902         (__tp_desc_type_node, __access_mode_type_node,
16903         __bltn_desc_type_node, __user_desc_type_node,
16904         __class_desc_type_node, __ptr_desc_type_node,
16905         __attr_desc_type_node, __func_desc_type_node,
16906         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
16907         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
16908         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
16909         enum_desc_type_node, class_desc_type_node,
16910         si_class_desc_type_node, vmi_class_desc_type_node,
16911         ptmd_desc_type_node, base_desc_type_node): New #defines.
16912         (tinfo_fn_id, tinfo_fn_type): Rename to ...
16913         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
16914         (tinfo_var_id): New enumeration.
16915         (DECL_TINFO_FN_P): Augment comment.
16916         * decl.c (cp_global_trees): Adjust documentation.
16917         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
16918         tinfo_decl_type and tinfo_var_id.
16919         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
16920         (build_typeid): Remove unused variable.
16921         (get_tinfo_var): Use tinfo_var_id.
16922         (tinfo_name): New static function.
16923         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
16924         (tinfo_from_decl): Likewise.
16925         (get_base_offset): New static function, broken out of
16926         expand_class_desc.
16927         (expand_si_desc): Use tinfo_name.
16928         (expand_class_desc): Likewise. Lose local static variable.
16929         Use base_desc_type_node. Use get_base_offset.
16930         (expand_ptr_desc): Use tinfo_name.
16931         (expand_attr_desc): Likewise.
16932         (expand_generic_desc): Likewise.
16934         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
16935         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
16937 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16939         * cp-tree.h (__eprintf): Remove declaration.
16940         * tree.c (__eprintf): Remove definition.
16942 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
16943             Mark Mitchell  <mark@codesourcery.com>
16945         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
16946         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
16948 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
16950         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
16952 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16954         * cp-tree.h (register_dtor_fn): New function.
16955         * decl.c (destroy_local_static): Rename to ...
16956         (register_dtor_fn): ... this.  Give it external linkage.
16957         (expand_static_init): Use it.
16958         * decl2.c (do_static_initialization): Likewise, if using
16959         __cxa_atexit.
16960         (do_static_destruction): Check that __cxa_atexit is not in use.
16961         (finish_file): Don't call do_static_destruction if using
16962         __cxa_atexit.
16964         * typeck.c (convert_arguments): Restore two-message error
16965         reporting.
16967 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
16969         Remap dynamic cast hint values to be consistent across ABIs.
16970         * search.c (dynamic_cast_base_recurse): Remap generated value.
16971         (get_dynamic_cast_base_type): Adjust documentation.
16972         * tinfo.h (__user_type_info::dyncast): Likewise.
16973         (__user_type_info::find_public_subobj): Remap BOFF meaning.
16974         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
16975         (__class_type_info::do_dyncast): Likewise.
16976         (__class_type_info::do_find_public_subobj): Likewise.
16977         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
16979 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16981         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
16983         * typeck2.c (incomplete_type_error): Restore previous
16984         cp_error and cp_error_at call sequence.
16986 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
16988         * class.c (dump_class_hierarchy): Make format agree with argument;
16989         cast pointer to unsigned long and print with %lx.
16991 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16993         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
16995         * typeck.c (composite_pointer_type, common_type,
16996         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
16997         build_function_call_real, convert_arguments,
16998         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
16999         build_unary_op, mark_addressable, build_compound_expr,
17000         build_static_cast, build_reinterpret_cast, build_const_cast,
17001         build_c_cast, build_modify_expr, get_delta_difference,
17002         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
17003         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
17004         into a single one.
17005         * typeck2.c (readonly_error, abstract_virtuals_error,
17006         process_init_constructor, check_for_new_type): Likewise.
17008 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
17010         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
17011         VAR_DECLs.
17013 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
17015         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
17016         (build_x_typeid): Likewise.
17017         (get_tinfo_fn): Likewise.
17018         (get_tinfo_fn_unused): Rename to ...
17019         (get_tinfo_decl): ... here.
17020         * rtti.c (build_headof): Replace logic error with assertion.
17021         (get_tinfo_fn_dynamic): Rename to ...
17022         (get_tinfo_decl_dynamic): ... here. Make static. Use
17023         complete_type_or_else.
17024         (build_x_typeid): Move into ...
17025         (build_typeid): ... here. Adjust call to
17026         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
17027         throw_bad_typeid expression.
17028         (get_tinfo_fn_unused): Rename to ...
17029         (get_tinfo_decl): ... here. Adjust comment.
17030         (get_tinfo_fn): Delete.
17031         (tinfo_from_decl): New static function.
17032         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
17033         (get_typeid): Use complete_type_or_else.
17034         (build_dynamic_cast_1): Adjust calls to
17035         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
17036         * parse.y (primary): Adjust call to build_typeid.
17037         * except.c (build_eh_type_type_ref): Adjust call to
17038         get_tinfo_decl. Mark as used.
17039         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
17040         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
17041         * parse.c: Regenerated.
17043 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
17045         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
17046         calling convention.
17047         (resolves_to_fixed_type_p): Document calling convention.
17048         * rtti.c (build_x_typeid): Initialize NONNULL.
17050         * cp-tree.h (build_shared_int_cst): New function.
17051         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
17052         * class.c (modify_vtable_entry): Likewise.
17053         (add_virtual_function): Split out code to generated shared
17054         INTEGER_CSTs to build_share_int_cst.
17055         (modify_all_vtables): Handle all the overridden functions here.
17056         Add overridden functions from non-primary virtual bases to the
17057         primary vtable.
17058         (finish_struct_1): Adjust call to modify_all_vtables.  Add
17059         overridden functions from non-primary bases to the vtable.
17060         * tree.c (build_shared_int_cst): New function.
17062         * cp-tree.h (scratchalloc): Remove.
17063         (build_scratch_list): Likewise.
17064         * call.c (convert_class_to_reference): Replace build_scratch_list
17065         and build_expr_list with build_tree_list.
17066         (add_candidate): Replace scratchalloc with expralloc.  Note memory
17067         leak.
17068         (build_user_type_conversion_1):  Replace build_scratch_list
17069         and build_expr_list with build_tree_list.
17070         (build_new_op): Likewise.
17071         (build_op_delete_call): Likewise.
17072         (convert_like): Likewise.
17073         * cvt.c (ocp_convert): Likewise.
17074         * decl.c (start_decl): Likewise.
17075         (start_function): Likewise.
17076         (finish_destructor_body): Likewise.
17077         (maybe_build_cleanup_1): Likewise.
17078         * decl2.c (reparse_decl_as_expr): Likewise.
17079         * init.c (perform_member_init): Likewise.
17080         (expand_cleanup_for_base): Likewise.
17081         (build_builtin_delete_call): Likewise.
17082         (build_new_1): Likewise.
17083         (build_delete): Likewise.
17084         * method.c (do_build_assign_ref): Likewise.
17085         * parse.y (already_scoped_stmt): Likewise.
17086         (nontrivial_exprlist): Likewise.
17087         (net_initializer): Likewise.
17088         (initlist): Likewise.
17089         * parse.c: Regenerated.
17090         * rtti.c (build_x_typeid): Likewise.
17091         (build_dynamic_cast_1): Likewise.
17092         * typeck.c (build_x_compound_expr): Likewise.
17093         (build_static_cast): Likewise.
17094         (build_modify_expr): Likewise.
17096         * cp-tree.h (DECL_VINDEX): Add documentation.
17097         * class.c (build_vtable_entry): Likewise.
17098         (start_vtable): Add comment.
17099         (add_virtual_function): Replace pending_hard_virtuals with
17100         overridden_virtuals and pending_virtuals with new_virtuals.
17101         Replace redundant assignments with assertions.
17102         (check_for_override): Add comment.
17103         (check_bases_and_members): Replace pending_hard_virtuals with
17104         overridden_virtuals and pending_virtuals with new_virtuals.
17105         (create_vtbl_ptr): Likewise.
17106         (layout_class_type): Likewise.
17107         (finish_struct_1): Likewise.  Add comments.
17109 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
17111         * class.c (finish_struct_1): Replace redundant code with
17112         assertions.
17114         * cp-tree.h (flag_new_abi): Move.
17115         (flag_use_cxa_atexit): Likewise.
17116         (flag_honor_std): Likewise.
17117         (flag_rtti): Likewise.
17118         (vbase_offsets_in_vtable_p): Define.
17119         (vptrs_present_everywhere_p): Likewise.
17120         (TYPE_CONTAINS_VPTR_P): Likewise.
17121         (dfs_walk_real): Declare.
17122         * class.c (build_vbase_pointer_fields): Check
17123         vbase_offsets_in_vtable_p.
17124         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
17125         BINFO_VPTR_FIELD.
17126         (build_vbase_offset_vtbl_entries): Simplify.
17127         (build_vbase_offset_vtbl_entries): Adjust.
17128         (build_vbase_pointer): Add ability to look up vbase offsets in
17129         vtable.
17130         (start_vtable): New function.
17131         (add_virtual_function): Use it.
17132         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
17133         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
17134         (build_vtbl_initializer): Take the type of the complete object as
17135         input.  Use it to correctly calculate vbase offsets.
17136         (dfs_finish_vtbls): Pass the complete type to
17137         build_vtbl_initializer.
17138         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
17139         (create_vtable_ptr): Create a vtable even if there are no
17140         new virtual functions, under the new ABI.
17141         (finish_struct_1): Likewise.
17142         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
17143         * decl.c (exapnd_static_init): Remove call to
17144         preserve_initializer.
17145         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
17146         vtables.
17147         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
17148         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
17149         (construct_virtual_bases): Don't initialize virtual base pointers
17150         under the new ABI.
17151         (build_aggr_init): Clean up comment.
17152         (expand_aggr_init_1): Likewise.
17153         * rtti.c (expand_class_desc): Store the virtual function table
17154         index where the vbase offset lives in the offset field.
17155         * search.c (dfs_walk_real): Make it global.
17156         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
17157         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
17159         * tinfo.h (USItype): Make it signed under the new ABI.
17160         * tinfo.cc (convert_to_base): New function.  Encapsulate base
17161         conversion logic here.
17162         (__class_type_info::do_upcast): Use it.
17163         (__class_type_info::do_dyncast): Likewise.
17164         (__class_type_info::do_find_public_subobj): Likewise.
17166         * init.c (construct_virtual_bases): Don't look up the addresses of
17167         virtual bases at run-time.
17169         * class.c (build_vbase_pointer): Relocate.
17170         (build_vbase_pointer_fields): Likewise.
17171         (dfs_build_vbase_offset_vtbl_entries): Likewise.
17172         (build_vbase_offset_vtbl_entries): Likewise.
17174         * decl.c (init_decl_processing): Complain if -fnew-abi
17175         -fno-vtable-thunks is used.
17177         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
17178         flag_new_abi.
17180 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
17182         * cp-tree.h (num_extra_vtbl_entries): New function.
17183         (size_extra_vtbl_entries): Likewise.
17184         (dfs_vtable_path_unmark): Likewise.
17185         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
17186         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17187         * class.c (num_extra_vtbl_entries): New function.
17188         (size_extra_vtbl_entries): Likewise.
17189         (dfs_build_vbase_offset_vtbl_entries): New function.
17190         (build_vbase_offset_vtbl_entries): Likewise.
17191         (build_vtbl_initializer): Use it.
17192         (finish_struct_1): Adjust vtable sizes (using
17193         num_extra_vtbl_entries).
17194         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
17195         THUNK_DECL is non-NULL before expanding it.
17196         * init.c (expand_virtual_init): Adjust the vtable pointer by
17197         size_extra_vtbl_entries before storing it.
17198         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
17199         Handle TREE_LIST parameters here, not in the dfs_* functions.
17200         (dfs_unmarked_real_bases_queue_p): Adjust.
17201         (dfs_marked_real_bases_queue_p): Likewise.
17202         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
17203         (dfs_vtable_path_marked_real_bases_queue_p): New function.
17204         (dfs_vtable_path_unmark): Likewise.
17206 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
17208         * optimize.c (copy_body_r): Clear the operand three of a
17209         TARGET_EXPR when copying it.
17211 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17213         * method.c (build_decl_overload_real): Check whether we are in ::
17214         before returning __builtin_new/delete.
17216 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
17218         * pt.c (tsubst_friend_function): Improve comment.
17219         (instantiate_decl): Avoid crashing when a "nested" function is
17220         instantiated from the top level.
17222         * dump.c (dqeueue_and_dump): Dump
17223         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
17225 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17227         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
17229 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
17231         * g++spec.c (lang_specific_driver): Add -fnew-abi if
17232         ENABLE_NEW_GXX_ABI defined.
17233         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
17234         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
17235         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
17237 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
17239         * decl.c (start_cleanup_fn): Call pushdecl.
17241         * call.c (convert_class_to_reference): Fix typos.
17242         (build_conditional_expr): Handle errors gracefully.
17243         * class.c (push_nested_class): Likewise.
17244         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
17245         (DECL_THIS_EXTERN): Use it.
17246         (DECL_THIS_STATIC): Likewise.
17247         * cvt.c (convert_to_void): Handle errors gracefully.
17248         (build_expr_type_conversion): Likewise.
17249         * decl.c (maybe_push_decl): Likewise.
17250         (start_decl_1): Likewise.
17251         (require_complete_types_for_parms): Likewise.
17252         * parse.y (structsp): Likewise.
17253         (base_class): Likewise.
17254         * parse.c: Regenerated.
17255         * pt.c (finish_member_template_decl): Likewise.
17256         * typeck.c (decay_conversion): Likewise.
17258         * cp-tree.h (dfs_skip_vbases): New function.
17259         (find_vbase_instance): Likewise.
17260         * class.c (determine_primary_base): Allow a nearly empty base to
17261         serve as a primary base class under the new ABI.
17262         (get_class_offset_1): Rename to ...
17263         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
17264         messages here.
17265         (get_class_offset): Use it.  Issue error messages here.
17266         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
17267         find the right copies of virtual bases.
17268         (fixup_vtable_deltas1): Rename to ...
17269         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
17270         bases as primary bases.
17271         (fixup_vtable_deltas): Remove.
17272         (override_one_vtable): Handle virtual bases as primary bases.
17273         (merge_overrides): Likewise.
17274         (finish_struct_1): Likewise.
17275         (dump_class_hierarchy): Dump primary-ness of bases as well.
17276         * search.c (mark_primary_bases): Use a pre-order traversal to
17277         handle primary virtual bases.
17278         (dfs_skip_vbases): New fiunction.
17279         (expand_upcast_fixups): Adjust to handle primary virtual bases.
17280         (fixup_virtual_upcast_offsets): Likewise.
17281         (fixup_all_virtual_upcast_offsets): Likewise.
17282         (dfs_find_vbase_instances): New function.
17283         (find_vbase_instance): Likewise.
17285 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
17287         * lex.c (DIR_SEPARATOR): Delete macro.
17289 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
17291        * decl2.c (lang_decode_option): Handle automatic line wrapping
17292        option.
17294 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
17296         * friend.c (do_friend): Don't resolve scopes when processing
17297         template declarations, even if the qualifying scope doesn't
17298         involve template parameters.
17300 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
17302         * class.c (dfs_modify_vtables_queue_p): Remove.
17303         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
17304         and dfs_marked_real_bases_queue_p instead of
17305         dfs_modify_vtables_queue_p.
17307         * class.c (build_vbase_path): Simplify.
17308         (dfs_propagate_binfo_offsets): New function.
17309         (propagate_binfo_offsets): Use it.
17310         (remove_base_field): Simplify.
17311         (dfs_set_offset_for_vbases): Remove.
17312         (dfs_set_offset_for_shared_vbases): New function.
17313         (dfs_set_offset_for_unshared_vbases): Likewise.
17314         (layout_virtual_bases): Use them.
17315         (layout_basetypes): Don't call propagate_binfo_offsets.
17316         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
17317         for the vbases.
17319         * class.c (build_base_field): New function, split out from ...
17320         (build_base_fields): ... here.  Use it.  Allocate primary bases
17321         first, under the new ABI.
17322         (get_vtable_entry): Remove.
17323         (remove_base_field): New function, split out from ...
17324         (remove_base_fields): ... here.  Adjust since primary bases come
17325         first under the new ABI.
17327         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
17328         (initialize_vtbl_ptrs): New function.
17329         (expand_indirect_vtbls_init): Change prototype.
17330         (convert_pointer_to_vbase): Declare.
17331         * init.c (expand_direct_vtbls_init): Remove.
17332         (dfs_initialize_vtbl_ptrs): New function.
17333         (initialize_vtbl_ptrs): Likewise.
17334         (emit_base_init): Use initialize_vtbl_ptrs.
17335         * search.c (convert_pointer_to_vbase): Make it global.
17336         (expand_indirect_vtbls_init): Remove vtable initialization code.
17337         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
17339         * class.c (dfs_finish_vtbls): New function.
17340         (finish_vtbls): Use it.
17341         (dump_class_hierarchy): New function.
17343         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
17344         (BINFO_VBASE_PRIMARY_P): New macro.
17345         (BINFO_VIRTUALS): Add to documentation.
17346         (SET_BINFO_PRIMARY_MARKED_P): Remove.
17347         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17348         (dfs_mark_primary_bases_queue_p): Likewise.
17349         (dfs_unmarked_real_bases_queue_p): New function.
17350         (dfs_marked_real_bases_queue_p): Likewise.
17351         * search.c (dfs_mark_primary_bases): Adjust.
17352         (mark_primary_bases): Likewise.
17353         (get_shared_vbase_if_not_primary): New function.
17354         (dfs_unmarked_real_bases_queue_p): Likewise.
17355         (dfs_marked_real_bases_queue_p): Likewise.
17356         (dfs_get_pure_virtuals): Simplify.
17357         (get_pure_virtuals): Likewise.
17359 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17361         * lex.c: Include tm_p.h.
17363 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
17365         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
17367 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
17369         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
17370         * pt.c (instantiate_decl): Defer comdat templates that might not be
17371         needed.
17373         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
17374         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
17375         (finish_file): Likewise.
17377         * decl2.c (import_export_class): Undo 12/14 change.
17379         * error.c (dump_decl): operator new, not operatornew.
17381         * class.c (field_decl_cmp): A nontype is "greater" than a type.
17382         * search.c (lookup_field_1): Look for the last field with the
17383         desired name.
17385 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17387         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
17388         FUNCTION_DECL.
17390 2000-01-05  Nathan Sidwell  <nathan@acm.org>
17392         * typeck.c (build_static_cast): Don't strip target qualifiers
17393         when casting from a class.
17395 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17397         * class.c (warn_hidden): Initialize variable `fndecl'.
17399 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
17401         * decl.c (flag_isoc9x): New variable to be able to use code in
17402         c-common.c.  For now always zero.
17404 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
17406         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
17407         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
17408         or unshare_base_binfos for virtual bases here.
17409         * search.c (dfs_get_vbase_types): Do it here.
17410         (get_vbase_types): Adjust.
17412 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
17414         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
17415         (BINFO_PRIMARY_MARKED_P): Use flag 5.
17416         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17417         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17418         (unmark_primary_bases): Remove declaration.
17419         (unmarkedp): Declare.
17420         (dfs_vbase_unmark): Likewise.
17421         * class.c (determine_primary_base): Return immediately if there
17422         are no base classes.  Call mark_primary_bases here.
17423         (modify_all_direct_vtables): Remove.
17424         (modify_all_indirect_vtables): Remove.
17425         (dfs_modify_vtables_queue_p): New function.
17426         (dfs_modify_vtables): New function.
17427         (modify_all_vtables): Use them.
17428         (build_base_fields): Build FIELD_DECLs for primary virtual base
17429         classes.
17430         (create_vtable_ptr): Don't call determine_primary_base here.
17431         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
17432         (dfs_set_offset_for_vbases): ... this.
17433         (layout_virtual_bases): Use it.
17434         (layout_class_type): Call determine_primary_base here.
17435         * search.c (unmarkedp): Make it global.
17436         (shared_marked_p): Simplify.
17437         (shared_unmarked_p): Likewise.
17438         (dfs_primary_bases_queue_p): Remove.
17439         (dfs_unmark_primary_bases): Likewise.
17440         (unmark_primary_bases): Likewise.
17441         (mark_primary_bases): Simplify.
17442         (get_pure_virtuals): Don't call mark_primary_bases here.
17443         (dfs_vbase_unmark): New function.
17444         (get_vbase_types): Simplify.
17446         * class.c (struct base_info): Remove.
17447         (determine_primary_base): Take has_virtual_p rather than a
17448         base_info as input.  Don't calculate max_has_virtual.
17449         (finish_struct_bits): Remove max_has_virtual argument.
17450         (create_vtable_ptr): Remove max_has_virtual_p argument.
17451         (layout_virtual_bases): Remove max argument.
17452         (layout_basetypes): Likewise.
17453         (layout_class_type): Remove max_has_virtual_p argument.
17454         (finish_struct_1): Remove max_has_virtual.
17456         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
17457         (layout_basetypes): Remove.
17458         * class.c (propagate_binfo_offsets): Moved here from tree.c.
17459         Update to handle primary virtual bases.
17460         (remove_base_fields): New function, split out from
17461         layout_basetypes.
17462         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
17463         (layout_virtual_bases): New function, split out from
17464         layout_basetypes.  Update to handle primary virtual bases.
17465         (layout_basetypes): Moved here from tree.c.  Use
17466         remove_base_fields and layout_virtual_bases.
17467         * search.c (dfs_mark_primary_bases_queue_p): New function.
17468         (mark_primary_bases): Use it.
17469         * tree.c (CEIL): Remove.
17470         (propagate_binfo_offsets): Remove.
17471         (layout_basetypes): Remove.
17473 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17475         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
17476         (BINFO_PRIMARY_MARKED_P): New macro.
17477         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
17478         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
17479         (mark_primary_bases): New function.
17480         (unmark_primary_bases): Likewise.
17481         * search.c (get_abstract_virtuals_1): Remove.
17482         (dfs_mark_primary_bases): New function.
17483         (mark_primary_bases): Likewise.
17484         (dfs_unmark_primary_bases): Likewise.
17485         (unmark_primary_bases): Likewise.
17486         (dfs_get_pure_virtuals): Likewise.
17488 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
17490         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
17491         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
17492         (modify_one_vtable): Adjust.
17493         (fixup_vtable_deltas1): Likewise.
17494         (override_one_vtable): Likewise.
17495         * search.c (get_abstract_virtuals_1): Likewise.
17496         (get_pure_virtuals): Likewise.
17497         (expand_upcast_fixups): Likewise.
17498         * tree.c (debug_binfo): Likewise.
17500         * class.c (build_vtable): Don't return a value.  Don't rebuild
17501         vtables for bases that have already been handled.
17502         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
17503         already been handled.
17504         (modify_one_vtable): Adjust accordingly.
17505         (fixup_vtable_deltas1): Likewise.
17506         (finish_struct_1): Likewise.
17508 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17510         * call.c (build_new_method_call): Also check destructors.