libunwind cleanup
[official-gcc.git] / gcc / cp / ChangeLog
blob451b459c323f44d0c9d56ff474a86fbb3dddfb9f
1 2003-12-03  James E Wilson  <wilson@specifixinc.com>
3         * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
4         support.
6 2003-12-03  Mark Mitchell  <mark@codesourcery.com>
8         PR c++/13179
9         * semantics.c (finish_handler_parms): Do not call eh_type_info for
10         types used in templates.
12         PR c++/10771
13         * parser.c (cp_parser_check_for_invalid_template_id): New
14         function.
15         (cp_parser_simple_type_specifier): Use it.
16         (cp_parser_elaborated_type_specifier): Likewise.
17         (cp_parser_class_head): Likewise.
19 2003-12-02  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
21         PR c++/10126\r
22         * pt.c (convert_nontype_argument): Handle default conversions\r
23         while converting a pointer to member function.\r
25 2003-12-02  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
27         PR c++/12573\r
28         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by\r
29         looking into them recursively.\r
31 2003-12-02  Richard Henderson  <rth@redhat.com>
33         * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
34         * parser.c (struct cp_token): Likewise.   
35         (struct cp_parser_token_tree_map_node): Likewise.
36         * lex.c (struct resword): Move const after ENUM_BITFIELD.
38 2003-11-30  Mark Mitchell  <mark@codesourcery.com>
40         PR c++/9849
41         * parser.c (cp_lexer_prev_token): New function.
42         (cp_parser_skip_to_closing_parenthesis): Add consume_paren
43         parameter.
44         (cp_parser_nested_name_specifier_opt): Add is_declaration
45         parameter.
46         (cp_parser_nested_name_specifier): Likewise.
47         (cp_parser_class_or_namespace_name): Likewise.
48         (cp_parser_class_name): Likewise.
49         (cp_parser_template_id): Likewise.
50         (cp_parser_template_name): Likewise.
51         (cp_parser_id_expression): Adjust calls to
52         cp_parser_nested_name_specifier_op, cp_parser_template_id,
53         cp_parser_class_name.
54         (cp_parser_unqualified_id): Likewise.
55         (cp_parser_postfix_expression): Likewise.
56         (cp_parser_pseudo_destructor_name): Likewise.
57         (cp_parser_cast_expression): Likewise.
58         (cp_parser_mem_initializer_id): Likewise.
59         (cp_parser_simple_type_specifier): Likewise.
60         (cp_parser_type_name): Likewise.
61         (cp_parser_elaborated_type_specifier): Likewise.
62         (cp_parser_qualified_namespace_specifier): Likewise.
63         (cp_parser_using_declaration): Likewise.
64         (cp_parser_using_directive): Likewise.
65         (cp_parser_ptr_operator): Likewise.
66         (cp_parser_declarator_id): Likewise.
67         (cp_parser_class_head): Likewise.
68         (cp_parser_base_specifier): Likewise.
69         (cp_parser_constructor_declarator_p): Likewise.
70         (cp_parser_direct_declarator): Fix typo in comment.
71         (cp_parser_parenthesized_expression_list): Adjust call to
72         cp_parser_skip_to_closing_parenthesis.
73         (cp_parser_selection_statement): Likewise.
75 2003-11-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
77         PR c++/12924
78         * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
79         with OVERLOAD and DECL nodes as the first operand.
81 2003-11-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
83         * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
85 2003-11-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
87         PR c++/5369
88         * friend.c (is_friend): Handle member function of a class
89         template as template friend.
90         (do_friend): Likewise.
91         * decl2.c (check_classfn): Add template_header_p parameter.
92         * decl.c (start_decl): Adjust check_classfn call.
93         (grokfndecl): Likewise.
94         * pt.c (is_specialization_of_friend): New function.
95         (uses_template_parms_level): Likewise.
96         (push_template_decl_real): Use uses_template_parms_level.
97         (tsubst_friend_function): Adjust check_classfn call.
98         * cp-tree.h (check_classfn): Adjust declaration.
99         (uses_template_parms_level): Add declaration.
100         (is_specialization_of_friend): Likewise.
102 2003-11-21  Mark Mitchell  <mark@codesourcery.com>
104         PR c++/12515
105         * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
106         operator.
108 2003-11-21  Jan Hubicka  <jh@suse.cz>
110         * parser.c (cp_parser_postfix_expression): Initialize 's' to
111         NULL_TREE.
113 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
115         * Make-lang.in (c++.extraclean): Delete.
117 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
119         * Make-lang.in (check-g++, lang_checks): Add.
121 2003-11-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
123         PR c++/12932
124         * class.c (currently_open_derived_class): Check if
125         current_class_type is NULL_TREE.
126         * semantics.c (finish_call_expr): Check if
127         currently_open_derived_class returns NULL_TREE.
128         * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
129         parameter.
131 2003-11-17  Jason Merrill  <jason@redhat.com>
133         * init.c (build_new_1): Preevaluate placement args.
134         * call.c (build_op_delete_call): Don't expose placement args to
135         overload resolution.
137 2003-11-16  Jason Merrill  <jason@redhat.com>
139         * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
140         and TAGS files that include them for each front end.
142 2003-11-15  Bernardo Innocenti  <bernie@develer.com>
144         PR c++/2294
145         * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
146         build failure on libjava.
148 2003-11-14  Giovanni Bajo  <giovannibajo@libero.it>
150         PR c++/2294
151         * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
152         unless the declaration is a built-in.
153         (set_namespace_binding): While binding OVERLOADs with only one
154         declaration, we still need to call supplement_binding.
156 2003-11-14  Mark Mitchell  <mark@codesourcery.com>
158         PR c++/12762
159         * parser.c (cp_parser_enclosed_template_argument_list): New
160         function.
161         (cp_parser_template_id): Use it.
162         (cp_parser_simple_type_specifier): Recognize invalid template
163         syntax.
165 2003-11-14  Giovanni Bajo  <giovannibajo@libero.it>
167         PR c++/2094
168         * pt.c (unify): Add support for PTRMEM_CST and
169         FIELD_DECL unification.
171 2003-11-13  Richard Earnshaw  <rearnsha@arm.com>
173         * decl.c (grokfndecl): Change OK to type tree.
175 2003-11-12  Mark Mitchell  <mark@codesourcery.com>
177         * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
178         CONSTRUCTOR.
180         * decl.c (cp_make_fname_decl): When creating a top-level
181         __FUNCTION__-like symbol, do register it with pushdecl.
183         * decl.c (finish_case_label): Do not check that we are within a
184         switch statement here.
185         * parser.c (struct cp_parser): Add in_iteration_statement_p and
186         in_switch_statement_p.
187         (cp_parser_new): Initialize them.
188         (cp_parser_labeled_statement): Check validity of case labels
189         here.
190         (cp_parser_selection_statement): Set in_switch_statement_p.
191         (cp_parser_iteration_statement): Set in_iteration_statement_p.
192         (cp_parser_jump_statement): Check validity of break/continue
193         statements here.
195         PR c++/12735
196         * cp-tree.h (duplicate_decls): Return a tree.
197         * decl.c (duplicate_decls): Clarify documentation.  Return
198         error_mark_node to indicate a failed redeclaration.
199         * friend.c (do_friend): Handle that case.
200         * name-lookup.c (pushdecl): Likewise.
202 2003-11-11  Jason Merrill  <jason@redhat.com>
204         * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
205         * name-lookup.c (parse_using_directive): New fn.
206         (is_associated_namespace): New fn.
207         (arg_assoc_namespace): Also check associated namespaces.
208         * name-lookup.h: Declare new fns.
209         * pt.c (maybe_process_partial_specialization): Allow
210         specialization in associated namespace.
211         * parser.c (cp_parser_using_directive): Accept attributes.  Use
212         parse_using_directive.
214 2003-11-10  Richard Henderson  <rth@redhat.com>
216         * cvt.c (convert_to_void): Use void_zero_node after overload failure.
218 2003-11-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
220         PR c++/12832
221         * name-lookup.c (supplement_binding): Gracefully handle names
222         used at non-class scope prior declaration.
224 2003-11-06  Matt Austern  <austern@apple.com>
226         * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
227         * method.c (use_thunk): give thunk same visibility as function.
228         * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
229         
230 2003-11-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
232         PR c++/11616
233         * pt.c (instantiate_pending_templates): Save and restore
234         input_location.
236 2003-11-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
238         PR c++/2019
239         * friend.c (add_friend): Don't display previous declaration in
240         case of duplicate friend warning.
242 2003-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
244         PR c++/9810
245         * call.c (build_over_call): Check access using primary template
246         if FN is a member function template.
248 2003-11-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
250         PR c++/12796
251         * class.c (handle_using_decl): Set input_location before calling
252         error_not_base_type.
254 2003-10-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
256         PR c++/10371
257         * semantics.c (finish_non_static_data_member): Handle when
258         both processing_template_decl and qualifying_scope are true.
260 2003-10-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
262         PR c++/11076
263         * class.c (handle_using_decl): Swap arguments of error_not_base_type.
264         * parser.c (cp_parser_direct_declarator): Only resolve typename for
265         namespace scope declarations.
267 2003-10-24  Nathan Sidwell  <nathan@codesourcery.com>
269         PR c++/12698, c++/12699, c++/12700, c++/12566
270         * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
271         (debug_class, debug_thunks): New.
272         * class.c (dump_class_hierarchy_1): New break out from ...
273         (dump_class_hierarchy): ... here.
274         (dump_thunk, debug_thunks, debug_class): New.
275         (update_vtable_entry_for_fn): Add ssizetype casts. Correct
276         continued search for primary binfo via virtual.
277         (build_vtbl_initializer): Follow covariant thunk alias.
278         * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
279         (finish_thunk): Look for an alias of the covariant thunk and point
280         to it.
281         (use_thunk): We should never use an alias.
282         * semantics.c (emit_associated_thunks): Do not emit aliases.
284         PR c++/12566
285         * cp-tree.h (cp_fname_init): Add TYPE pointer param.
286         * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
287         create an ad-hoc ERROR_MARK.
288         (cp_make_fname_decl): Adjust.
289         * pt.c (tsubst_expr): Adjust.
291 2003-10-23  Jason Merrill  <jason@redhat.com>
293         PR c++/12726
294         * tree.c (build_target_expr_with_type): Don't call force_rvalue
295         for CONSTRUCTORs.
297 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
299         * call.c: Fix comment formatting.
300         * class.c: Likewise.
301         * cxx-pretty-print.c: Likewise.
302         * init.c: Likewise.
303         * parser.c: Likewise.
304         * pt.c: Likewise.
305         * semantics.c: Likewise.
306         * tree.c: Likewise.
307         * typeck.c: Likewise.
308         * typeck2.c: Likewise.
310 2003-10-21  Mark Mitchell  <mark@codesourcery.com>
312         PR c++/11962
313         * typeck.c (build_x_conditional_expr): Handle missing middle
314         operands in templates.
315         * mangle.c (write_expression): Issue errors about attempts to
316         mangle a non-existant middle operator to the ?: operator.
318 2003-10-21  Robert Bowdidge   <bowdidge@apple.com>
319         * decl.c (cp_finish_decl): Remove clause intended for asm directives 
320           in struct or class fields: this code is never executed.
322 2003-10-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
324         * decl.c (start_decl): Exit if push_template_decl returns
325         error_mark_node.
327 2003-10-20  Kazu Hirata  <kazu@cs.umass.edu>
329         * ChangeLog: Fix typos.
330         * call.c: Fix comment typos.
331         * class.c: Likewise.
332         * cp-tree.h: Likewise.
333         * cvt.c: Likewise.
334         * cxx-pretty-print.c: Likewise.
335         * decl.c: Likewise.
336         * decl2.c: Likewise.
337         * init.c: Likewise.
338         * mangle.c: Likewise.
339         * name-lookup.c: Likewise.
340         * parser.c: Likewise.
341         * search.c: Likewise.
342         * semantics.c: Likewise.
343         * tree.c: Likewise.
344         * typeck.c: Likewise.
346 2003-10-20  Jan Hubicka  <jh@suse.cz>
348         * decl.c (start_cleanup_fn):  Set DECL_DECLARED_INLINE_P to deffer
349         the expansion.
351 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
353         * Make-lang.in (c++.install-info): Remove.
355 2003-10-20  Jason Merrill  <jason@redhat.com>
357         * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
358         field.
360 2003-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
362         PR c++/9781, c++/10583, c++/11862
363         * decl.c (cp_finish_decl): Exit immediately if decl is an
364         error_mark_node.
365         * pt.c (push_template_decl_real): Return error_mark_node for
366         invalid template declaration of variable.
368 2003-10-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
370         PR c++/12495
371         * pt.c (lookup_template_class): Handle when current_class_type
372         is a local class.
374 2003-10-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
376         PR c++/2513
377         * decl.c (make_typename_type): Use dependent_type_p.
378         (make_unbound_class_template): Likewise.
379         * pt.c (instantiate_class_template): Increment
380         processing_template_decl during substitution of template friend
381         function.  Preincrement processing_template_decl rather than
382         postincrement.
383         (get_mostly_instantiated_function_type): Increment
384         processing_template_decl during partial substitution of function
385         type.
387 2003-10-15  Jan Hubicka  <jh@suse.cz>
389         PR c++/12574
390         * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
392 2003-10-14  Jason Merrill  <jason@redhat.com>
394         PR c++/11878
395         * tree.c (build_target_expr_with_type): Call force_rvalue for
396         classes with non-trivial copy ctors.
398         PR c++/11063
399         * typeck.c (build_modify_expr): Call convert rather than abort.
401 2003-10-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
403         Breack out decl.c (3/n)
404         * name-lookup.c: Include flags.h
405         (lookup_name_current_level): Make static.
406         (add_decl_to_level): Likewise.
407         (push_local_binding): Likewise.
408         (push_overloaded_decl): Likewise.
409         (lookup_using_namespace): Likewise.
410         (qualified_lookup_using_namespace): Likewise.
411         (lookup_type_current_level): Likewise.
412         (unqualified_namespace_lookup): Likewise.
413         (namespace_ancestor): Likewise.
414         (push_using_directive): Likewise.
415         * decl.c (pushdecl): Move to name-lookup.c.
416         (pushdecl_top_level_1): Likewise.
417         (pushdecl_top_level): Likewise.
418         (pushdecl_top_level_and_finish): Likewise.
419         (maybe_push_decl): Likewise.
420         (push_using_decl): Likewise.
421         (push_overloaded_decl): Likewise.
422         (make_anon_name): Likewise.
423         (anon_cnt): Likewise.
424         (clear_anon_tags): Likewise.
425         (maybe_inject_for_scope_var): Likewise.
426         (check_for_out_of_scope_variable): Likewise.
427         * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
428         * decl.c (warn_extern_redeclared_static): Export.
429         * cp-tree.h (warn_extern_redeclared_static): Declare.
431 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
433         * Make-lang.in: Replace uses of $(target_alias) with
434         $(target_noncanonical).
436 2003-10-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
438         * ChangeLog: Add PR number to patch for PR c++/12370.
440 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
442         * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
443         (binding_for_name): Likewise.
444         (cxx_binding_clear): Move to name-lookup.c.
445         * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
446         (binding_for_name): Likewise.
447         * decl2.c (is_ancestor): Move to name-lookup.c
448         (namespace_ancestor): Likewise.
449         (add_using_namespace): Likewise.
450         (ambiguous_decl): Likewise.
451         (lookup_using_namespace): Likewise.
452         (qualified_lookup_using_namespace): Likewise.
453         (set_decl_namespace): Likewise.
454         (decl_namespace): Likewise.
455         (current_decl_namespace): Likewise.
456         (push_decl_namespace): Likewise.
457         (pop_decl_namespace): Likewise.
458         (push_scope): Likewise.
459         (pop_scope): Likewise.
460         (struct arg_lookup): Likewise.
461         (arg_assoc): Likewise.
462         (arg_assoc_args): Likewise.
463         (arg_assoc_type): Likewise.
464         (add_function): Likewise.
465         (arg_assoc_namespace): Likewise.
466         (arg_assoc_class): Likewise.
467         (arg_assoc_template_arg): Likewise.
468         (do_namespace_alias): Likewise.
469         (validate_nonmember_using_decl): Likewise.
470         (do_nonmember_using_decl): Likewise.
471         (do_toplevel_using_decl): Likewise.
472         (do_local_using_decl): Likewise.
473         (do_class_using_decl): Likewise.
474         (do_using_directive): Likewise.
475         (constructor_name_full): Likewise.
476         (constructor_name): Likewise.
477         (constructor_name_p): Likewise.
479 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
481         Break out decl.c (2/n) 
482         * name-lookup.c: Include diagnostic.h
483         (cxx_binding_free): Make static.
484         (cxx_binding_make): Likewise.
485         (binding_table_new): Likewise
486         (binding_table_free): Likewise.
487         (binding_table_insert): Likewise.
488         (binding_table_find_anon_type): Likewise.
489         (binding_table_reverse_maybe_remap): Likewise.
490         (supplement_binding): Likewise.
491         * name-lookup.h (global_scope_name): Declare extern.
492         (global_type_node): Likewise.
493         (cxx_binding_free): Don't export.
494         (cxx_binding_make): Likewise.
495         (binding_table_new): Likewise.
496         (binding_table_free): Likewise.
497         (binding_table_insert): Likewise.
498         (binding_table_find_anon_type): Likewise.
499         (binding_table_reverse_maybe_remap): Likewise.
500         * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
501         * decl.c (lookup_namespace_name): Move to name-lookup.c
502         (select_decl): Likewise.
503         (unqualified_namespace_lookup): Likewise.
504         (lookup_qualified_name): Likewise.
505         (lookup_name_real): Likewise.
506         (lookup_name_nonclass): Likewise.
507         (lookup_function_nonclass): Likewise.
508         (lookup_name): Likewise.
509         (lookup_name_current_level): Likewise.
510         (lookup_type_current_level): Likewise.
511         (lookup_flags): Likewise.
512         (qualify_lookup): Likewise.
513         (lookup_tag): Likewise.
514         (lookup_tag_reverse): Likewise.
515         (getdecls): Likewise.
516         (storedecls): Remove.
517         (cxx_remember_type_decls): Move to name-lookup.c.
518         (global_bindings_p): Likewise.
519         (innermost_nonclass_level): Likewise.
520         (toplevel_bindings_p): Likewise.
521         (namespace_bindings_p): Likewise.
522         (kept_level_p): Likewise.
523         (innermost_scope_kind): Likewise.
524         (template_parm_scope_p): Likewise.
525         (push_binding): Likewise.
526         (push_local_binding): Likewise.
527         (add_decl_to_level): Likewise.  Make extern.
528         (push_class_binding): Move to name-lookup.c.
529         (resume_level): Likewise.  Rename to resume_scope.
530         (begin_scope): Move to name-lookup.c.
531         (indent): Likewise.
532         (binding_depth): Likewise.
533         (is_class_level): Likewise.
534         (cxx_scope_descriptor): Likewise.
535         (cxx_scope_debug): Likewise.
536         (namespace_scope_ht_size): Likewise.
537         (leave_scope): Likewise.
538         (pushlevel_class): Likewise.
539         (poplevel_class): Likewise.
540         (clear_identifier_class_values): Likewise.
541         (pushdecl_with_scope): Likewise.
542         (pushdecl_namespace_level): Likewise.
543         (pushdecl_class_level): Likewise.
544         (push_class_level_binding): Likewise.
545         (push_using_directive): Likewise.
546         (identifier_global_value): Likewise.
547         (keep_next_level_flag): Likewise.
548         (keep_next_level): Likewise.
549         (free_binding_level): Likewise.
550         (set_class_shadows): Likewise.
551         (maybe_push_cleanup_level): Likewise.
552         (cp_namespace_decls): Likewise.
553         (bt_print_entry): Likewise.
554         (print_binding_level): Likewise.
555         (print_other_binding_stack): Likewise.
556         (print_binding_stack): Likewise.
557         (push_namespace): Likewise.
558         (pop_namespace): Likewise.
559         (push_nested_namespace): Likewise.
560         (pop_nested_namespace): Likewise.
561         (cxx_saved_binding_make): Likewise.
562         (struct cxx_saved_binding_make): Likewise.
563         (store_bindings): Likewise.
564         (maybe_push_to_top_level): Likewise.
565         (push_to_top_level): Likewise.
566         (pop_from_top_level): Likewise.
567         (identifier_type_value): Likewise.
568         (set_identifier_type_value): Likewise.
569         (set_identifier_type_value_with_scope): Likewise.
570         (pop_everything): Likewise.
571         (pushtag): Likewise.
572         (follow_tag_typedef): Likewise.
573         (maybe_process_template_type_declaration): Likewise.
574         (pop_binding): Likewise.
575         * cp-tree.h: Move corresponding declarations to name-lookup.h
576         
577 2003-10-12  Steven Bosscher  <steven@gcc.gnu.org>
579         * cvt.c (ocp_convert): Move warning to C common code.
581 2003-10-09  Jason Merrill  <jason@redhat.com>
583         PR c++/6392
584         * tree.c (build_cplus_array_type): Handle all quals the same.
585         (cp_build_qualified_type_real): Look through arrays first.
587         * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
588         (build_target_expr_with_type): Likewise.
590         * pt.c (instantiate_class_template): Sanity check that our
591         enclosing class has been instantiated.
593 2003-10-08  Giovanni Bajo  <giovannibajo@libero.it>
595         * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
596         * error.c (dump_function_decl): Use it to skip the dump of the
597         arguments.
598         (dump_expr): When dumping a declaration found within an
599         expression, always set TFF_NO_FUNCTION_ARGUMENTS
600         in the flags.
602 2003-10-08  Giovanni Bajo <giovannibajo@libero.it>
604         PR c++/11097
605         * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
606         USING_DECL.
608 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
610         PR c++/10147
611         * call.c (initialize_reference): Tweak error message.
612         * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
613         pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
614         * cxx-pretty-print.c (pp_cxx_id_expression): Always display
615         qualified entities using qualified names.
616         
617         PR c++/12337
618         * init.c (build_new_1): Make sure that the expression returned is
619         not an lvalue.
621         PR c++/12344, c++/12236, c++/8656
622         * decl.c (start_function): Do not ignore attributes embedded in a
623         function declarator.
625 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
627         * Make-lang.in (c++.info): Remove.
628         (c++.dvi): Remove.
629         (c++.generated-manpages): Replace with ...
630         (generated-manpages): ... this.
632 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
634         * decl.c (struct cp_binding_level): Move to name-lookup.h
635         (current_binding_level): Likewise.
636         (class_binding_level): Likewise.
637         * cp-tree.h (enum scope_kind): Likewise.
639 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
641         * name-lookup.c (binding_entry_free): Nullify name and type
642         fields. 
644 2003-10-02  Mark Mitchell  <mark@codesourcery.com>
646         PR c++/12486
647         * typeck.c (finish_class_member_access_expr): Issue diagnostic
648         on erroneous use of qualified name.
650 2003-09-30  Richard Henderson  <rth@redhat.com>
652         PR c++/12370
653         * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
655 2003-09-30  Kelley Cook  <kelleycoook@wideopenwest.com>
657         * g++spec.c: Convert to ISO C90 prototypes.
658         * parser.c: Likewise.
660 2003-09-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
662         * decl.c (pop_binding): Don't mess with nullifying binding->scope
663         here. 
664         * name-lookup.c: Re-format.
665         (cxx_binding_free): Nullify binding->scope.
667 2003-09-29  Jan Hubicka  <jh@suse.cz>
669         PR C++/12047
670         * except.c (build_eh_type_type): Call mark_used on the type.
672 2003-09-28  Richard Henderson  <rth@redhat.com>
674         * typeck.c (c_expand_asm_operands): Take location_t, instead of
675         individual file and line.
677 2003-09-28  Andreas Jaeger  <aj@suse.de>
679         * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
680         definition.
681         * init.c (push_base_cleanups): Likewise.
682         * decl2.c (finish_file): Likewise.
683         * mangle.c (init_mangle): Likewise.
684         (dump_substitution_candidates): Likewise.
685         * search.c: Likewise.
687 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
689         * name-lookup.h (get_global_value_if_present): New function.
690         (is_typename_at_global_scope): Likewise.
691         * except.c (do_begin_catch): Use get_global_value_if_present.
692         (do_end_catch): Likewise.
693         (do_allocate_exception): Likewise.
694         (do_free_exception): Likewise.
695         (build_throw): Likewise.
696         * parser.c (cp_parser_member_declaration): Likewise.
697         * rtti.c (throw_bad_cast): Likewise.
698         (throw_bad_typeid): Likewise.
699         * decl.c (check_tag_decl): Use is_typename_at_global_scope.
700         (grokdeclarator): Likewise.
701         * cp-tree.h (global_namespace): Move to name-lookup.h
702         * call.c (call_builtin_trap): Tidy.
704 2003-09-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
706         PR c++/11415
707         * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
708         error message when parser->scope is global_namespace.
710 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
712         * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
713         macros  BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
715 2003-09-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
717         * decl.c (pop_binding_level, suspend_binding_level,
718         find_class_binding_level): Merge into leave_scope.  Remove.
719         (leave_scope):  New function.
720         (poplevel): Update.
721         (poplevel_class): Likewise.
722         (pop_namespace): Likewise.
724 2003-09-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
726         PR c++/5655
727         * parser.c (cp_parser_check_access_in_redeclaration): New function.
728         (cp_parser_member_declaration): Use it.
729         (cp_parser_template_declaration_after_export): Likewise.
731 2003-09-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
733         * cp-tree.h (scope_kind): Add new enumerator.
734         (keep_next_level): Change parameter type to bool.
735         (begin_scope):  Change prototype.
736         (pushlevel): Remove declaration.
737         * decl.c (push_binding_level): Fold in begin_scope.  Remove.
738         (struct cp_binding_level): Remove tag_tranparent field.  Make keep
739         of bitsize one.
740         (keep_next_level_flag): Make a bool.
741         (cxx_scope_descriptor): Update scope names table
742         (make_cxx_scope): Fold in begin_scope.  Remove..
743         (namespace_scope_ht_size): New function.
744         (begin_scope): Change prototype.  Return a scope.  Tidy.
745         (kept_level_p): Update.
746         (pushlevel): Remove.
747         (maybe_push_cleanup_level): Simplify.
748         (poplevel): Update for sk_cleanup and keep change.
749         (print_binding_level): Likewise.
750         (initial_push_namespace_scope): Fold in begin_scope.  Remove.
751         (push_namespace): Update.
752         (pushtag): Likewise.
753         (lookup_tag): Likewise.
754         (lookup_name_current_level): Likewise.
755         (lookup_type_current_level): Likewise.
756         (cxx_init_decl_processing): Likewise.
757         (start_function): Likewise.
758         (begin_function_body): Likewise.
759         (start_method): Likewise.
760         * pt.c (push_inline_template_parms_recursive): Likewise.
761         (begin_template_parm_list): Likewise.
762         (begin_specialization): Likewise.
763         * semantics.c (do_pushlevel): Likewise.
764         (begin_compound_stmt): Likewise.
765         (begin_stmt_expr): Likewise.
767 2003-09-21  Richard Henderson  <rth@redhat.com>
769         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
770         method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
772 2003-09-21  Richard Henderson  <rth@redhat.com>
774         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
775         method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
776         DECL_SOURCE_LOCATION rename and change to const.
778 2003-09-20  Richard Henderson  <rth@redhat.com>
780         * decl.c, decl2.c, pt.c: Use %J in diagnostics.
782 2003-09-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
784         PR c++/157
785         * parser.c (cp_parser_direct_declarator): Clear
786         parser->num_template_parameter_lists when parsing function
787         parameters.
788         (cp_parser_constructor_declarator_p): Likewise.
790 2003-09-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
792         PR c++/495
793         * pt.c (tsubst_friend_class): Only use innermost template
794         arguments for the injected friend class template.
796 2003-09-19  Nathan Sidwell  <nathan@codesourcery.com>
798         PR c++/12332
799         * pt.c (instantiate_class_template): Increment
800         processing_template_decl around the tsubst of a template member
801         function.
803 2003-09-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
805         * decl.c (cxx_scope_descriptor): Fix thinko.
806         (struct cp_binding_level): Adjust type of binding_depth field. 
808 2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
810         PR c++/12320
811         * call.c (type_passed_as): Check for incomplete type.
812         (convert_for_arg_passing): Likewise.
814 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
816         PR c++/9848
817         * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
818         here.
819         * semantics.c (expand_body): Set it here on the remaining clones.
821 2003-09-18  Roger Sayle  <roger@eyesopen.com>
823         * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
824         * class.c (instantiate_type): Remove FFS_EXPR case.
826 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
828         * ChangeLog: Fix recent commit.
830 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
832         * ChangeLog: Add PR number to patch for PR c++/12316.
834 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
836         * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
837         "C" types. 
838         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
840 2003-09-17  Richard Henderson  <rth@redhat.com>
842         * semantics.c (expand_body): Don't save/restore input_location.
844 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
846         PR c++/12266
847         * cp-tree.h (tsubst_flags_t): Add tf_conv.
848         * class.c (standard_conversion): Pass tf_conv to
849         instantiate_type.
850         (resolve_address_of_overloaded_function): Do not call mark_used
851         when just checking conversions.
853         PR debug/12066
854         * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
855         * cp-tree.h (cxx_builtin_type_decls): Declare.
856         * decl.c (builtin_type_decls): New variables.
857         (cxx_builtin_type_decls): New function.
858         (record_builtin_type): Add to builtin_type_decls.
860 2003-09-17  Richard Henderson  <rth@redhat.com>
862         PR c++/12316
863         * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
865 2003-09-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
867         PR c++/7939
868         * typeck.c (comptypes): Don't ICE when its first argument is
869         error_mark_node.
870         (compparms): Reverse the arguments of same_type_p.
872 2003-09-15  Nathan Sidwell  <nathan@codesourcery.com>
874         PR c++/12184
875         * typeck.c (convert_arguments): Return error_mark_node for an
876         incomplete parameter. Make error message more informative.
878 2003-09-12  Mark Mitchell  <mark@codesourcery.com>
880         PR c++/3907
881         * class.c (maybe_note_name_used_in_class): Refine test for whether
882         or not we are in a class scope.
884         * cp-tree.h (language_function): Remove x_expanding_p.
885         (expanding_p): Remove.
886         (doing_semantic_analysis_p): Remove.
887         (scope_kind): Add sk_function_parms, sk_class,
888         sk_namespace.
889         (innermost_scope_kind): New method.
890         * call.c (cxx_type_promotes_to): Use type_decays_to.
891         * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
892         (LANG_HOOKS_POPLEVEL): Likewise.
893         * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
894         template_spec_p, namespace_p, is_for_scope, is_try_scope, and
895         is_catch_scope.  Add kind and explicit_spec_p.
896         (cxx_scope_descriptor): Use a lookup table.
897         (find_class_binding_level): Use "kind" field in binding_level, not
898         the various flags.
899         (pop_binding_level): Likewise.
900         (innermost_nonclass_level): Likewise.
901         (toplevel_bindings_p): Likewise.
902         (namespace_bindings_p): Likewise.
903         (template_parm_scope_p): Likewise.
904         (innermost_scope_kind): New method.
905         (current_tmpl_spec_kind): Use "kind" field in binding_level, not
906         the various flags.
907         (pushlevel): Remove check for doing_semantic_analysis_p.
908         (begin_scope): Simplify.
909         (add_decl_to_level): Use "kind" field in binding_level, not
910         the various flags.
911         (push_local_binding): Likewise.
912         (pop_label): Remove check for doing_semantic_analysis_p.
913         (poplevel): Use "kind" field in binding_level, not
914         the various flags.
915         (set_block): Remove check for doing_semantic_analysis_p.
916         (pushlevel_class): Use "kind" field in binding_level, not
917         the various flags. 
918         (poplevel_class): Likewise.
919         (initial_push_namespace_scope): Likewise.
920         (maybe_push_to_top_level): Likewise.
921         (set_identifier_type_value_with_scope): Likewise.
922         (pop_everything): Likewise.
923         (maybe_process_template_type_declaration): Likewise.
924         (pushtag): Likewise.
925         (pushdecl): Likewise.
926         (pushdecl_with_scope): Likewise.
927         (check_previous_goto_1): Likewise.
928         (define_label): Likewise.
929         (finish_case_label): Likewise.
930         (lookup_tag): Likewise.
931         (unqualified_namespace_lookup): Likewise.
932         (lookup_name_real): Likewise.
933         (lookup_name_current_level): Likewise.
934         (lookup_type_current_level): Likewise.
935         (record_builtin_type): Likewise.
936         (cp_make_fname_decl): Likewise.
937         (maybe_inject_for_scope_var): Likewise.
938         (cp_finish_decl): Remove check for doing_semantic_analysis_p.
939         (start_function): Use begin_scope, not pushlevel.
940         (finish_function): Use "kind" field in binding_level, not
941         the various flags.
942         (start_method): Use begin_scope, not pushlevel.
943         (make_label_decl): Do not check expanding_p.
944         (save_function-data): Do not set expanding_p.
945         (cxx_push_function_context): Do not clear expanding_p.
946         * semantics.c (cxx_expand_function_start): Do not set expanding_p.
947         
948 2003-09-14  Mark Mitchell  <mark@codesourcery.com>
950         * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
951         an bit-field whose width exceeds that of its type.
953 2003-09-14  Geoffrey Keating  <geoffk@apple.com>
955         * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
957 2003-09-14  Kazu Hirata  <kazu@cs.umass.edu>
959         * ChangeLog: Follow spelling conventions.
960         * parser.c: Likewise.
962 2003-09-13  Richard Henderson  <rth@redhat.com>
964         * decl2.c (finish_file): Check cgraph_assemble_pending_functions
965         during relaxation loop.
967 2003-09-11  David Edelsohn  <edelsohn@gnu.org>
969         * decl2.c (var_finalized_p): Swap arms of conditional.
971 2003-09-10  Nathan Sidwell  <nathan@codesourcery.com>
973         PR c++/11788
974         * typeck.c (build_address): If it is a function, mark it used.
975         (build_unary_op): Do not lose object's side-effects when taking
976         address of static member function.
977         * class.c (resolve_address_of_overloaded_function): Use
978         tsubst_flags_t parameter. Only expect overload sets. Adjust.
979         (instantiate_type): Adjust flags passing. Do not lose object's
980         side-effects when taking address of static member function.
982 2003-09-11  Richard Henderson  <rth@redhat.com>
984         * semantics.c (expand_or_defer_fn): Update for new
985         cgraph_finalize_function argument.
987 2003-09-10  Richard Henderson  <rth@redhat.com>
989         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
991 2003-09-10  Jan Hubicka  <jh@suse.cz>
993         * decl2.c (var_finalized_p): New.
994         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
996 2003-09-10  Richard Henderson  <rth@redhat.com>
998         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
999         mark_member_pointers.
1000         (lower_function): Remove.
1001         * cp-tree.h: Update to match.
1002         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
1003         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
1005 2003-09-09  Richard Henderson  <rth@redhat.com>
1007         * semantics.c (expand_or_defer_fn): Update call to 
1008         cgraph_finalize_function.
1010         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1011         always.
1013         * decl2.c (finish_file): Avoid out-of-bounds array reference
1014         during memmove.
1016 2003-09-09  Richard Henderson  <rth@redhat.com>
1018         * decl2.c (mark_member_pointers): Rename from
1019         mark_member_pointers_and_eh_handlers and don't check eh handlers.
1021 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
1023         PR bootstrap/12168
1024         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1026 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
1028         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1029         c_register_builtin_type.
1031         PR c++/11786
1032         * decl2.c (add_function): Do not complain about seeing the same
1033         non-function twice.
1034         * semantics.c (perform_koenig_lookup): Improve documentation.
1036         PR c++/5296
1037         * pt.c (try_one_overload): Add addr_p parameter.
1038         (resolve_overloaded_unification): Pass it.
1040 2003-09-08  Richard Henderson  <rth@redhat.com>
1042         * optimize.c (maybe_clone_body): Inc/dec function_depth.
1044 2003-09-08  Richard Henderson  <rth@redhat.com>
1046         * decl.c (finish_function): Clear current_function_decl.
1047         * decl2.c (mark_used): Don't push/pop gc context.
1048         * optimize.c (optimize_function): Likewise.
1049         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1050         * pt.c (instantiate_decl): Inc/dec function_depth instead.
1051         * semantics.c (expand_body): Update for tree_rest_of_compilation
1052         nested argument.
1054 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
1056         PR c++/11762
1057         * error.c (dump_decl): Handle namespace-alias-definition.
1058         * decl.c (warn_extern_redeclared_static): There is no point in
1059         checking changes in storage class specifier for a namespace
1060         declaration. 
1061         (duplicate_decls): Tidy diagnostic message.
1062         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1063         (pp_cxx_right_brace): Likewise.
1064         (pp_cxx_original_namespace_definition): New function.
1065         (pp_cxx_namespace_alias_definition): Likewise.
1066         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
1068 2003-09-07  Jan Hubicka  <jh@suse.cz>
1070         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1071         Avoid re-emitting variables in unit-at-a-time mode.
1073 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
1075         PR c++/11867
1076         * call.c (standard_conversion): Improve comments.
1077         (perform_direct_initialization): Make sure we return an expression
1078         of the correct type.
1079         * typeck.c (build_static_cast): Check for ambiguity and
1080         accessibility when performing conversions.
1082 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1084         * cp-tree.h (add_binding): Remove declaration.
1085         * name-lookup.h (supplement_binding): Declare.
1086         * decl.c (add_binding): Move to name-lookup.c.
1087         (push_local_binding): Adjust.
1088         (push_class_binding): Likewise.
1089         (set_identifier_type_value_with_scope): Likewise.
1090         * name-lookup.c (supplement_binding): Rename from add_binding.
1091         Return a bool.  Improve documentation. 
1092         (set_namespace_binding): Adjust.
1093         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1095 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1097         PR c++/11794
1098         * class.c (pushclass): Push dependent using decls for nested
1099         classes of templates too.
1101 2003-09-06  Roger Sayle  <roger@eyesopen.com>
1103         PR c++/11409
1104         * class.c (resolve_address_of_overloaded_function): When building
1105         list of matching non-template function decls, ignore anticipated
1106         declarations of undeclared or shadowed GCC builtins.
1108 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
1110         PR c++/11595
1111         * decl.c (define_label): Remove unreachable timevar pop.
1112         Always return the decl, even if the definition is invalid.
1114 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1116         PR c++/12167
1117         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1118         unparsed functions queue.
1120 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
1122         PR c++/12163
1123         * call.c (perform_direct_initialization): Correct logic for
1124         direct-initialization of a class type.
1126         PR c++/12146
1127         * pt.c (lookup_template_function): Robustify.
1129 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
1131         PR c++/11922
1132         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1133         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1134         is_type_p to lookup_qualified_name.
1136         * semantics.c (finish_call_expr): Refactor some code.
1138         PR c++/12037
1139         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1140         (build_min_non_dep): Declare.
1141         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1142         (build_min_non_dep): New.
1143         * cvt.c (convert_to_void): Don't explicitly copy
1144         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1145         * call.c (build_new_method_call): Use build_min_non_dep.
1146         * decl2.c (grok_array_decl): Likewise.
1147         (build_offset_ref_call_from_tree): Likewise.
1148         * typeck.c (finish_class_member_access_expr,
1149         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1150         build_x_conditional_expr, build_x_compound_expr): Likewise.
1151         (build_static_cast, build_reinterpret_cast,
1152         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1153         * typeck2.c (build_x_arrow): Use build_min_non_dep.
1154         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1155         template.
1156         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1157         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1158         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1160 2003-09-04  Richard Henderson  <rth@redhat.com>
1162         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1163         change in cgraph_mark_needed_node arguments.
1165 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
1167         PR 12161
1168         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1169         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1171 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1173         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1174         (expr_sizeof): Replace with ...
1175         (cxx_sizeof_or_alignof_expr): ... here.
1176         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1177         * parser.c (cp_parser_unary_expression): Commonize alignof and
1178         sizeof handling.
1179         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1180         substitution.
1181         * semantics.c (finish_sizeof, finish_alignof): Remove.
1182         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1183         becomes bool. Set TREE_READONLY.
1184         (expr_sizeof): Replace with ...
1185         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1187 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
1189         Remove cast-as-lvalue extension.
1190         * call.c (build_conditional_expr): Correct formatting.
1191         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1192         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1193         * cp-tree.h (non_cast_lvalue_p): Remove.
1194         (real_non_cast_lvalue_p): Remove.
1195         (non_cast_lvalue_or_else): Remove.
1196         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1197         (real_lvalue_p): Adjust call to lvalue_p_1.
1198         (non_cast_lvalue_p): Remove.
1199         (non_cast_lvalue_or_else): Remove.
1200         (lvalue_p): Adjust call to lvalue_p_1.
1201         (lvalue_or_else): Simplify.
1202         * typeck.c (build_unary_op): Use lvalue_or_else, not
1203         non_cast_lvalue_or_else.
1204         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1206 2003-09-03  DJ Delorie  <dj@redhat.com>
1208         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1210 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
1212         PR c++/12053
1213         * class.c (include_empty_classes): Correct logic for ABI version 1.
1215 2003-09-03  Richard Henderson  <rth@redhat.com>
1217         * optimize.c (optimize_function): Push/pop ggc context around
1218         the call to optimize_inline_calls.
1220 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
1222         PR c++/11553
1223         * parser.c (cp_parser_decl_specifier_seq): Add check for a
1224         duplicate friend decl-specifier.
1226 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
1228         PR c++/11847
1229         * pt.c (convert_nontype_argument): Correct representation of
1230         REFERENCE_TYPE expressions.
1232         PR c++/11808
1233         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1234         (finish_call_expr): Change prototype.
1235         * parser.c (cp_parser_postfix_expression): Adjust call to
1236         finish_call_expr.
1237         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1238         * semantics.c (finish_call_expr): Add koenig_p parameter.
1240 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
1242         PR c++/12114
1243         * cp-tree.h (initialize_reference): Change prototype.
1244         * call.c (initialize_reference): Add cleanup parameter.
1245         * decl.c (grok_reference_init): Likewise.
1246         (check_initializer): Likewise.
1247         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1248         (duplicate_decls): When replacing an anticipated builtin, do not
1249         honor TREE_NOTHROW.
1250         * typeck.c (convert_for_initialization): Correct call to
1251         initialize_reference.
1253         PR c++/11972
1254         * pt.c (dependent_type_p_r): Pass only the innermost template
1255         arguments to any_dependent_template_arguments_p.
1257 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
1259         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1260         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1261         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1262         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1263         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1265 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
1267         PR c++/12093
1268         * pt.c (build_non_dependent_expr): Do not build a
1269         NON_DEPENDENT_EXPR for a STRING_CST.
1271         PR c++/11928
1272         * search.c (add_conversions): Avoid adding two conversion
1273         operators for the same type.
1275 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
1277         PR c++/6196
1278         * pt.c (tsubst_copy_and_build): Correct handling of
1279         address-of-label extension.
1280         * semantics.c (finish_goto_stmt): The address of a label must go
1281         through the lvalue-to-rvalue conversion.
1283 2003-08-29  Richard Henderson  <rth@redhat.com>
1284             Jason Merrill <jason@redhat.com>
1286         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1287         (LANG_HOOKS_RTL_EXPAND_STMT): New.
1288         * cp-tree.h (cxx_expand_function_start): Declare.
1289         * decl.c (start_function): Use allocate_struct_function.
1290         Move stmts_are_full_exprs_p assertion from expand_body.
1291         Do not free_after_parsing or free_after_compilation.
1292         (cxx_push_function_context): Move code to set struct function
1293         data from genrtl_start_function.
1294         * optimize.c (optimize_function): Don't inc/dec function_depth.
1295         * semantics.c (expand_body): Use tree_rest_of_compilation.
1296         (cxx_expand_function_start): Rename from genrtl_start_function,
1297         omit bits done by tree_rest_of_compilation.
1298         (genrtl_finish_function): Remove.
1299         (clear_decl_rtl): Move to ../tree-optimize.c.
1301 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1303         PR c++/11811
1304         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1305         function. 
1306         * cxx-pretty-print.h: Declare.
1307         * error.c (dump_template_parameter): Use it.
1308         (dump_type): Likewise.
1310 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
1312         * init.c (decl_constant_value): Deal with COND_EXPR specially.
1313         * call.c (build_conditional_expr): Revert previous patch.
1315         PR optimization/5079
1316         * call.c (build_conditional_expr): Use decl_constant_value to
1317         simplify the arguments.
1319 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
1321         * parser.c (struct cp_token): Use enum bitfields.
1322         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1323         512B allocation unit.
1324         (cp_parser_token_tree_map_node): Use enum bitfields.
1326 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
1328         PR c++/11871
1329         * decl.c (push_class_level_binding): Correct old_decl value from
1330         my 2003-07-29 reorganization.
1332         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1333         (build_new_method_call): Add goto finish.
1334         * semantics.c (simplify_aggr_init_exprs_r): Don't set
1335         TREE_SIDE_EFFECTS on a call.
1337 2003-08-25  Richard Henderson  <rth@redhat.com>
1339         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1341 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1343         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1344         (cxx_pretty_printer): Adjust base type.
1345         (pp_cxx_function_specifier): Declare.
1346         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1347         (pp_cxx_left_paren): Likewise.
1348         (pp_cxx_right_paren): Likewise.
1349         (pp_cxx_dot): Likewise.
1350         (pp_cxx_arrow): Likewise.
1351         (pp_cxx_semicolon): Likewise.
1352         (pp_cxx_identifier): Likewise.
1353         (pp_cxx_cv_qualifier_seq): Likewise.
1354         (pp_cxx_storage_class_specifier): Likewise.
1355         (pp_cxx_expression_list): Likewise.
1356         (pp_cxx_space_for_pointer_operator): Likewise.
1357         (pp_cxx_init_declarator): Likewise.
1358         (pp_cxx_call_argument_list): Likewise.
1359         (pp_cxx_nonconsecutive_character): Tidy.
1360         (pp_cxx_conversion_function_id): New function.
1361         (pp_cxx_template_id): Likewise.
1362         (pp_cxx_template_keyword_if_needed): Likewise.
1363         (pp_cxx_nested_name_specifier): Likewise.
1364         (pp_cxx_unqualified_id): Tidy
1365         (pp_cxx_qualified_id): Handle more nodes.
1366         (pp_cxx_primary_expression): Tidy.
1367         (pp_cxx_postfix_expression): Likewise.
1368         (pp_cxx_new_expression): Tidy.
1369         (pp_cxx_delete_expression): Likewise.
1370         (pp_cxx_cast_expression): New function.
1371         (pp_cxx_pm_expression): Tidy.
1372         (pp_cxx_conditional_expression): Likewise.
1373         (pp_cxx_assignment_operator): New function.
1374         (pp_cxx_assignment_expression): Tidy.
1375         (pp_cxx_expression): New function.
1376         (pp_cxx_function_specifier): Likewise.
1377         (pp_cxx_decl_specifier_seq): Likewise.
1378         (pp_cxx_simple_type_specifier): Tidy.
1379         (pp_cxx_type_specifier_seq): Likewise.
1380         (pp_cxx_ptr_operator): New function.
1381         (pp_cxx_implicit_parameter_type): Likewise.
1382         (pp_cxx_parameter_declaration): Tidy.
1383         (pp_cxx_parameter_declaration_clause): New function.
1384         (pp_cxx_exception_specification): Likewise.
1385         (pp_cxx_direct_declarator): Tidy.
1386         (pp_cxx_declarator): Likewise.
1387         (pp_cxx_ctor_initializer): New function.
1388         (pp_cxx_function_definition): Likewise.
1389         (pp_cxx_abstract_declarator): Tidy.
1390         (pp_cxx_direct_abstract_declarator): Likewise.
1391         (pp_cxx_type_id): Likewise.
1392         (pp_cxx_exception_declaration): New function.
1393         (pp_cxx_statement): Likewise.
1394         (pp_cxx_simple_declaration): Likewise.
1395         (pp_cxx_template_parameter_list): Likewise.
1396         (pp_cxx_template_parameter): Likewise.
1397         (pp_cxx_template_declaration): Likewise.
1398         (pp_cxx_explicit_specialization): Likewise.
1399         (pp_cxx_explicit_instantiation): Likewise.
1400         (pp_cxx_declaration): Tidy.
1401         (pp_cxx_pretty_printer_init): Initialize more fields.
1403 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
1405         PR c++/8795
1406         * cp-tree.h (build_cplus_method_type): Remove.
1407         * call.c (standard_conversion): Use build_method_type_directly
1408         instead of build_cplus_method_type.
1409         * class.c (build_clone): Likewise.
1410         (adjust_clone_args): Likewise.
1411         * decl.c (build_ptrmem_type): Likewise.
1412         (grokdeclarator): Likewise.
1413         (check_function_type): Likewise.
1414         * decl2.c (grok_method_quals): Likewise.
1415         (maybe_retrofit_in_chrg): Likewise.
1416         * pt.c (copy_default_args_to_explicit_spec): Likewise.
1417         (tsubst_function_type): Likewise.
1418         (tsubst): Likewise.
1419         * tree.c (build_cplus_method_type): Remove.
1420         * typeck.c (merge_types): Use build_method_type_directly.
1422 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1424         PR c++/3765
1425         * search.c (dfs_access_in_type): Fix typo in comment.
1426         (dfs_accessible_queue_p): Likewise.
1427         (dfs_accessible_p): Only terminate when a friend is found.
1428         (accessible_p): Return immediately if access_in_type allows
1429         access.
1431 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1433         PR c++/641, c++/11876
1434         * friend.c (add_friend): Add complain parameter.
1435         (make_friend_class): Likewise.
1436         (do_friend): Adjust add_friend call.
1437         * decl.c (grokdeclarator): Adjust make_friend_class call.
1438         * parser.c (cp_parser_member_declaration): Likewise.
1439         (cp_parser_template_declaration_after_export): Likewise.
1440         * pt.c (instantiate_class_template): Adjust make_friend_class
1441         and add_friend call.
1442         * cp-tree.h (make_friend_class): Adjust declaration.
1443         (add_friend): Likewise.
1445 2003-08-21  Jason Merrill  <jason@redhat.com>
1447         PR c++/11283
1448         * call.c (build_conditional_expr): Ignore cv-qual differences for
1449         non-class types.
1451 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
1453         PR c++/11551
1454         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1455         (cp_parser_primary_expression): Adjust call to
1456         cp_parser_id_expression.
1457         (cp_parser_unqualified_id): Complain about the use of
1458         typedef-names in a destructor declarator.
1459         (cp_parser_postfix_expression): Adjust call to
1460         cp_parser_id_expression.
1461         (cp_parser_type_parameter): Likewise.
1462         (cp_parser_template_argument): Likewise.
1463         (cp_parser_declarator_id): Likewise.
1465         PR c++/11919
1466         * call.c (standard_conversion): Use same_type_p, not pointer
1467         equality, to compare types.
1469         PR c++/10762
1470         * parser.c (cp_parser_using_declaration): Check for invalid uses
1471         of template-ids here...
1472         * decl2.c (do_class_using_decl): ... rather than here.
1474 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
1476         PR c++/11834
1477         * pt.c (more_specialized): Bump processing_template_decl.
1479 2003-08-21  Jason Merrill  <jason@redhat.com>
1481         PR c++/11614
1482         * decl.c (grokdeclarator): Recognize a flexible array based on the
1483         type, not the form of the declarator.
1485 2003-08-20  Jason Merrill  <jason@redhat.com>
1487         * semantics.c (simplify_aggr_init_expr): Split out from
1488         simplify_aggr_init_exprs_r.  Convert slot address to match
1489         the return type.
1490         * cp-tree.h: Declare it.
1491         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1492         DECL_NAME of a user variable.
1494 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1496         PR c++/11945
1497         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1498         COMPOUND_EXPR.
1499         * semantics.c (finish_expr_stmt): Always convert to void.
1500         * typeck.c (build_x_compound_exp): Always convert to void.
1502 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
1504         PR c++/11684
1505         * cp-tree.h (grok_op_properties): Change prototype.
1506         * decl.c (grok_op_properties): Add complain parameter.
1507         (grokfndecl): Pass it.
1508         * pt.c (tsubst_decl): Adjust accordingly.
1510         PR c++/10926
1511         * decl.c (start_method): Return immediately if push_template_decl
1512         does not like the declaration.
1513         * pt.c (push_template_decl_real): Disallow member template
1514         destructors.
1516         PR c++/11036
1517         * cp-tree.h (add_binding): Add prototype.
1518         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1519         (maybe_warn_about_overly_private_class): Use
1520         CLASSTYPE_DESTRUCTORS.
1521         (pushclass): Adjust call to set_identifier_type_value.
1522         * decl.c (add_binding): Give it external linkage.
1523         (push_local_binding): Adjust call to add_binding.
1524         (push_class_binding): Likewise.
1525         (set_identifier_type_value_with_scope): Change prototype.  Use
1526         add_binding for global bindings.
1527         (set_identifier_type_value): Adjust accordingly.
1528         (pushtag): Likewise.
1529         (pushdecl): Use set_identifier_type_value, not
1530         set_identifier_type_value_with_scope.
1531         (pushdecl_namespace_level): Adjust calls to
1532         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1533         (pushdecl_class_level): Likewise.
1534         (lookup_tag): Use select_decl.
1535         (select_decl): Improve comment.
1536         (record_builtin_type): Do not call pushdecl.
1537         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1538         (cp_finish_decl): Adjust call to set_identifier_type_value.
1539         (check_elaborated_type_specifier): Improve checks for invalid uses
1540         of typedefs.
1541         (xref_tag): Adjust call to check_elaborated_type_specifier.
1542         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1543         * name-lookup.c (set_namespace_binding): Use add_binding.
1544         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1545         rather than an IDENTIFIER_NODE, to represent built-in types, if
1546         requested by the caller.
1547         (cp_parser_postfix_expression): Adjust call.
1548         (cp_parser_type_specifier): Likewise.
1549         (cp_parser_elaborated_type_specifier): Adjust call to
1550         check_elaborated_type_specifier.
1551         * typeck2.c (build_functional_cast): Do not perform name lookups.
1553         PR c++/10717
1554         * decl.c (expand_static_init): Remove unnecessary code.
1556 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
1558         PR c++/10538, PR c/5582
1559         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1561 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1563         PR c++/11174
1564         * init.c (build_offset_ref): Perform access checking for
1565         pointer to member correctly.
1567 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1569         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1571 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1573         PR c++/11957
1574         * cp-tree.h (finish_stmt_expr): Add bool parameter.
1575         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1576         adjust the stmt_expr here.
1577         (build_vec_init): Use finish_stmt_expr_expr, convert result to
1578         array type.
1579         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1580         call.
1581         * pt.c (tsubst_copy): Likewise.
1582         * semantics.c (finish_stmt_expr): Add parameter.
1584         * pt.c (instantiate_class_template): Push to class's scope before
1585         tsubsting base.
1587 2003-08-17  Jan Hubicka  <jh@suse.cz>
1589         PR C++/11702
1590         * semantics.c (finish_id_expression): Mark all functions as used.
1592 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
1594         PR c++/11512
1595         * cvt.c (convert_to_void): Indicate which side of conditional has
1596         no effects, and rhs of comma operator. Test for no sideeffect
1597         expressions here and always build a convert expr.
1598         * init.c (expand_default_init): Convert the init to void.
1599         * typeck.c (build_x_compound_expr): Do not check for side effects
1600         here.
1601         (build_compound_expr): Do not convert lhs when building a
1602         template.
1604 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1606         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1607         * decl2.c (build_offset_ref_call_from_tree): Use
1608         build_non_dependent_expr.
1609         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1610         * pt.c (build_non_dependent_expr): Set operand.
1612 2003-08-14  Jan Hubicka  <jh@suse.cz>
1614         * decl2.c (mark_member_pointers): Rename to...
1615         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1616         (lower_function): Update call.
1617         * except.c (eh_type_info): Break out from ...
1618         (build_eh_type): ... here; tinfo is already used.
1619         (finish_eh_spec_block): Mark tinfos as used.
1620         * semantics.c (finish_handler_params): Mark tinfo as used.
1621         * cp-tree.h (eh_type_info): Declare.
1623 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1625         * pt.c (instantiate_class_template): Set location before
1626         substuting bases.
1628         * decl.c (make_typename_type): Use my_friendly_assert.
1629         * pt.c (tsubst_aggr_type): Rearrange context substitution.
1631 2003-08-14  Jan Hubicka  <jh@suse.cz>
1633         * method.c (use_thunk): Expand body directly.
1635 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
1637         PR c++/11703
1638         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1639         determine whether or not to promote types.
1640         (convert_for_arg_passing): Likewise.
1641         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1642         templates.
1643         * pt.c (tsubst_decl): Do not expect it to be set.
1645         PR c++/9512
1646         PR c++/10923
1647         * cp-tree.h (check_elaborated_type_specifier): Declare.
1648         (handle_class_head): Remove.
1649         (note_got_semicolon): Likewise.
1650         (note_list_got_semicolon): Likewise.
1651         (finish_class_definition): Likewise.
1652         * decl.c (check_elaborated_type_specifier): Make it public.
1653         Robustify.
1654         (handle_class_head): Remove.
1655         * parser.c (cp_parser_elaborated_type_specifier): Use
1656         check_elaborated_type_specifier.
1657         (cp_parser_class_specifier): Do not call finish_class_definition.
1658         (cp_parser_class_head): Or handle_class_head.  Check for
1659         over-qualified names.
1660         * semantics.c (finish_class_definition): Remove.
1662         * parser.c (cp_parser_check_for_definition_in_return_type): New
1663         function.
1664         (cp_parser_simple_declaration): Adjust call to
1665         cp_parser_init_declarator.
1666         (cp_parser_decl_specifier_seq): Change type of
1667         declares_class_or_enum parameter.
1668         (cp_parser_explicit_instantiation): Adjust accordingly.
1669         (cp_parser_type_specifier): Change type of
1670         declares_class_or_enum parameter.
1671         (cp_parser_init_declarator): Add declares_class_or_enum
1672         parameter.
1673         (cp_parser_parameter_declaration): Adjust call to
1674         cp_parser_decl_specifier_seq.
1675         (cp_parser_function_definition): Likewise.
1676         (cp_parser_member_declaration): Likewise.
1677         (cp_parser_single_declaration): Likewise.
1679         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1680         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1681         (TYPE_OVERLOADS_CALL_EXPR): Remove.
1682         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1683         (TYPE_OVERLOADS_ARROW): Likewise.
1684         (CLASSTYPE_GOT_SEMICOLON): Likewise.
1685         * class.c (check_bases): Do not set them.
1686         (finish_struct_1): Likewise.
1687         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1688         (build_ptrmemfunc_type): Likewise.
1689         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1690         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1691         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1692         * lex.c (note_got_semicolon): Remove.
1693         (note_list_got_semicolon): Likewise.
1694         * parser.c (cp_parser_simple_declaration): Do not call
1695         note_list_got_semicolon.
1696         * pt.c (list_eq): Remove.
1697         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1698         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1699         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1700         * ptree.c (cxx_print_type): Do not print them.
1701         * semantics.c (finish_member_class_template): Do not call
1702         note_list_got_semicolon.
1704 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
1706         * call.c (standard_conversion): Opaque pointers interconvert.
1708         * testsuite/g++.dg/other/opaque-3.C: New.
1710 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
1712         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1713         types correctly.
1715 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
1717         PR c++/11789
1718         * cp-tree.h (get_vbase): Remove.
1719         (get_vbase_types): Remove.
1720         * init.c (expand_member_init): Correct logic for looking up base
1721         classes.
1723 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1725         * error.c (dump_expr): Tidy.
1726         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1727         (pp_cxx_begin_template_argument_list): Likewise.
1728         (pp_cxx_end_template_argument_list): Likewise.
1729         (is_destructor_name): Likewise.
1730         (pp_cxx_unqualified_id): Likewise.
1731         (pp_cxx_qualified_id): Likewise.
1732         (pp_cxx_id_expression): Likewise.
1733         (pp_cxx_new_expression): Likewise.
1734         (pp_cxx_delete_expression): Likewise.
1735         (pp_cxx_pm_expression): Likewise.
1736         (pp_cxx_type_specifier): Rework.
1737         (pp_cxx_type_id): Likewise.
1738         (pp_cxx_primary_expression): Likewise.
1739         (pp_cxx_postfix_expression): Likewise.
1740         (pp_cxx_unary_expression): Likewise.
1741         (pp_cxx_multiplicative_expression): Likewise.
1742         (pp_cxx_conditional_expression): Likewise.
1743         (pp_cxx_assignment_expression): Likewise.
1744         (pp_cxx_pretty_printer_init): Tidy.
1746 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1748         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1749         NODE is always a TREE_VEC of nonzero size.
1750         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1751         * decl2.c (arg_assoc): Template args will be a vec.
1752         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1753         dump_template_argument_list.
1754         (dump_template_parms): Args will be a vec.
1755         * parser.c (cp_parser_template_argument_list): Produce a
1756         vector, not a list.
1757         * pt.c (coerce_template_parms): Args are always vectors.
1758         (mangle_class_name_for_template): Likewise.
1759         (lookup_template_function): Likewise.
1760         (lookup_template_class): Likewise.
1761         (tsubst_template_args): Likewise.
1762         (tsubst_baselink): Use tsubst_template_args.
1763         (tsubst_qualified_id): Likewise.
1764         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1765         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1766         (any_dependent_template_args_p):  Args are always vectors.
1767         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1769         PR c++/11670
1770         * call.c (convert_like_real): Add rvalue binding error message.
1771         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1772         really a cast.
1774         PR c++/10530
1775         * pt.c (dependent_type_p_r): A dependent template-id is a class
1776         type with dependent template arguments, or a bound template
1777         template parameter.
1778         (type_dependent_expression_p): A template function decl cannot
1779         have a dependent context.
1781 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1783         PR c++/5767
1784         * parser.c (cp_parser_class_name): Return immediately when scope
1785         is error_mark_node.
1787 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
1789         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1791         * cp/call.c (standard_conversion): Support opaque types.
1792         Include target.h.
1793         (strip_top_quals): Use cp_build_qualified_type instead of
1794         TYPE_MAIN_VARIANT.
1796         * cp/typeck.c (convert_for_assignment): Support opaque types.
1798         * testsuite/g++.dg/other/opaque-1.C: New.
1800         * testsuite/g++.dg/other/opaque-2.C: New.
1802 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
1804         * decl.c (grokparms): Use cp_build_qualified_type instead
1805         TYPE_MAIN_VARIANT.
1807 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1809         * cxx-pretty-print.h: New file.
1810         * cxx-pretty-print.c: Likewise.
1811         * error.c (scratch_pretty_printer): Change type.
1812         (init_error): Tidy.
1813         (dump_aggr_type): Likewise.
1814         (dump_global_iord): Likewise.
1815         (dump_expr): Likewise.
1816         (dump_char): Remove.
1817         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1818         (cxx_initialize_diagnostics): New function.
1819         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1820         (CXX_PRETTY_PRINT_H): New variable.
1821         (cp/cxx-pretty-print.o): New rule.
1822         (cp/cp-lang.o): Update dependence.
1823         (cp/error.o): Likewise.
1825 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1827         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1828         (DECL_DECLARED_INLINE_P): Remove.
1829         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1830         if decl is a FUNCTION_DECL.  This never made sense, but now it is
1831         required to avoid a tree check failure.
1832         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1833         * optimize.c (maybe_clone_body): Likewise.
1835 2003-08-04  Roger Sayle  <roger@eyesopen.com>
1837         * decl.c (cxx_insert_default_attributes): Delete.
1838         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1839         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1841 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
1843         PR c++/11704
1844         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1845         unknown type.
1847         PR c++/11766
1848         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1849         member functions.
1851 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1853         PR c++/9447
1854         * cp-tree.def (USING_DECL): Document its type.
1855         * class.c (pushclass): If we're entering a template, push any
1856         dependent using decls it has.
1857         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1858         a dependent scope.
1859         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1860         (tsubst): Remove USING_DECL checks.
1861         (type_dependent_expression_p): Remove USING_DECL case.
1862         * semantics.c (finish_member_declaration): A USING_DECL's type
1863         indicates whether it is dependent.
1865 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1867         * cp-tree.h (pushclass): Remove unneeded parameter.
1868         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1869         (push_nested_class): Adjust pushclass call.
1870         * pt.c (instantiate_class_template): Likewise.
1871         * semantics.c (begin_class_definition): Likewise.
1873 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
1875         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1877 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
1879         PR c++/11697
1880         * decl.c (decls_match): Don't ignore the types of template
1881         classes.
1883         PR c++/11744
1884         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1886 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1888         PR c++/8442, c++/8806
1889         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1890         preferred.
1891         (check_elaborated_type_specifier): Add allow_template_p
1892         parameter.  Check tag mismatch and class template.
1893         (xref_tag): Add template_header_p parameter.  Add assertion
1894         that name is an IDENTIFIER_NODE.  Remove implicit typename
1895         warning.  Simplify lookup process if globalize is true.
1896         (cxx_init_decl_processing): Adjust call to xref_tag.
1897         (xref_tag_from_type): Likewise.
1898         * decl2.c (handle_class_head): Likewise.
1899         * parser.c (cp_parser_elaborated_type_specifier,
1900         cp_parser_class_head): Likewise.
1901         * rtti.c (init_rtti_processing, build_dynamic_cast1,
1902         tinfo_base_init, emit_support_tinfos): Likewise.
1903         * class.c (is_base_of_enclosing_class): Remove.
1904         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1905         template template argument.
1906         * cp-tree.h (xref_tag): Adjust declaration.
1907         (is_base_of_enclosing_class): Remove.
1908         * NEWS: Document template template argument change.
1910 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
1912         * parser.c (cp_parser_init_declarator,
1913         cp_paser_member_declaration): Reformat.
1914         * pt.c (lookup_template_class, type_unification_real, unify,
1915         type_dependent_expression_p): Reformat.
1917         PR c++/11295
1918         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1919         tf_stmt_expr_body.
1920         (finish_stmt_expr_expr): Declare.
1921         * parser.c (cp_parser_primary_expression): Tell
1922         cp_parser_compount_statement that it is a statement expression.
1923         (cp_parser_statement, cp_parser_labeled_statement,
1924         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1925         in_statement_expr_p parameter.
1926         (cp_parser_expression_statement): Likewise. Call
1927         finish_stmt_expr_expr for final expression of a statement
1928         expression.
1929         (cp_parser_for_init_statement,
1930         cp_parser_implicitly_scoped_statement,
1931         cp_parser_already_scoped_statement, cp_parser_function_definition,
1932         cp_parser_try_block, cp_parser_handled): Adjust.
1933         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1934         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1935         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1936         * semantics.c (finish_expr_stmt): Do not deal with statement
1937         expressions.
1938         (begin_stmt_expr): Clear last_expr_type.
1939         (finish_stmt_expr_expr): New.
1940         (finish_stmt_expr): Process the value expression.
1942         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1943         compound expr inside the target's initializer.
1945         PR c++/11525
1946         * parser.c (cp_parser_primary_expression): Do not set
1947         non-constant-p merely because it is a dependent scope.
1949         PR c++/9447
1950         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1951         * semantics.c (finish_expr_stmt): Do not convert to void in a
1952         template.
1954 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1956         * pt.c (coerce_template_parms): Refactor.
1957         (fn_type_unification): Increment processing_template_decl when
1958         tsubsting an incomplete set of explicit args.
1960         PR c++/11347
1961         * pt.c (instantiate_class_template): Increment
1962         processing_template_decl around the tsubst of a template member
1963         class.
1964         (tsubst_qualified_id): Assert we do not have a dependent scope.
1966         * pt.c (coerce_template_template_parms, lookup_template_class,
1967         can_complete_type_without_circularity, instantiate_class_template,
1968         tsubst_decl, unify): Reformat.
1970 2003-07-31  Jan Hubicka  <jh@suse.cz>
1972         * decl2.c (maybe_make_one_only): Use mark_referenced.
1973         * method.c (use_thunk): Likewsie.
1975 2003-07-30  Jan Hubicka  <jh@suse.cz>
1977         * class.c (build_vtable_entry_ref): Kill.
1978         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1979         (build_vfn_ref): Do not call build_vtable_entry_ref.
1980         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1981         * cp-tree.h (prepare_assemble_variable): Kill.
1982         * cp-decl.c (prepare_assemble_variable): Kill.
1984 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
1986         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
1987         of setting valid_pch by hand.
1989 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1991         * decl.c (finish_enum): Initialize underlying_type.
1993 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
1995         PR c++/9447
1996         * decl.c (add_binding): Add bval local variable.
1997         (push_class_level_binding): Likewise. Allow a USING_DECL to be
1998         pushed.
1999         * decl2.c (do_class_using_decl):  The type of a using decl is
2000         unknown.
2001         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
2002         function call lookup code.
2003         * pt.c (tsubst): A USING_DECL will have unknown type.
2004         (tsubst_copy_and_build): Allow a using decl.
2005         (type_dependent_expression_p): A USING_DECL will make it
2006         dependent.
2007         * semantics.c (finish_member_declaration): Push a dependent using
2008         declaration.
2010 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
2012         PR c++/11530
2013         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2014         * semantics.c (finish_id_expression): Call mark_used for all
2015         declarations.
2017 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
2019         PR c++/11667
2020         * call.c (standard_conversion): Allow all integral->enumeral
2021         conversions, after marking them as bad.
2022         * decl.c (finish_enum): Make sure that all enumerators are
2023         properly converted to the underlying type.
2024         (build_enumerator): Set DECL_CONTEXT for namespace-scope
2025         enumeration types.
2026         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2027         (tsubst_enum): Tidy.
2029         * Make-lang.in (typeck.o): Depend on convert.h.
2030         (class.o): Likewise.
2031         (rtti.o): Likewise.
2032         * call.c: Include convert.h.
2033         (convert_arg_to_ellipsis): Use convert_to_real.
2034         * class.c: Include convert.h.
2035         (build_base_path): Use convert_to_integer.
2036         * rtti.c: Include convert.h.
2037         (build_headof): Use convert_to_integer.
2038         * typeck.c: Include convert.h.
2039         (decay_conversion): Use convert_to_integer.
2040         (build_unary_op): Use build_nop.
2041         (get_delta_difference): Use convert_to_integer.
2042         (build_ptrmemfunc): Avoid unnecessary conversions.
2044 2003-07-28  Jan Hubicka  <jh@suse.cz>
2046         * decl2.c (mark_member_pointers): Verify that member pointer points to
2047         the function.
2049 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
2051         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2052         (finish_compound_stmt): Remove no scope arg.
2053         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2054         end_compound_stmt calls.
2055         (expand_static_init, begin_destructor_body, begin_function_body,
2056         finish_function_body): Likewise.
2057         * decl2.c (start_objects, finish_objects,
2058         start_static_storage_duration_function,
2059         finish_static_storage_duration_function): Likewise.
2060         * init.c (begin_init_stmts, finish_init_stmts,
2061         construct_virtual_base, build_vec_init): Likewise.
2062         * method.c (do_build_assign_ref, synthesize_method): Likewise.
2063         * parser.c (cp_parser_compound_statement,
2064         cp_parser_implicitly_scoped_statement,
2065         cp_parser_already_scoped_statement): Likewise.
2066         * pt.c (tsubst_expr): Likewise.
2067         * semantics.c (begin_compound_stmt): No scope arg is a bool.
2068         (finish_compound_stmt): Remove no scope arg.
2070         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2071         always dyadic.
2073 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
2075         * call.c (standard_conversion): Tweak handling of
2076         pointer-to-member types.
2077         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2078         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2079         pointer-to-data member types.
2081 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2083         * parser.c (cp_parser_type_parameter): Reformat.
2084         (cp_parser_parameter_declaration): Deprecate default args where
2085         not allowed.
2087 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2089         * cfns.h: Rebuilt.
2091         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2092         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2093         * init.c (begin_init_stmts): Make static. Return is_global
2094         value. Always call begin_stmt_expr.
2095         (finish_init_stmts): Make static. Add is_global parm. Always
2096         building a stmt tree.
2097         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2098         (build_vec_init): Likewise. Always building a stmt tree.
2099         (expand_default_init): Always building a stmt tree.
2100         (get_temp_regvar): Likewise.
2101         * semantics.c (begin_global_stmt_expr,
2102         finish_global_stmt_expr): Remove.
2104 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2106         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2107         (build_x_compound_expr_from_list): Declare.
2108         * typeck.c (build_x_compound_expr_from_list): New.
2109         (build_x_compound_expr): Adjust.
2110         (build_compound_expr): Remove unreachable code. Take two
2111         parameters, adjust.
2112         * decl.c (grok_reference_init): Use
2113         build_x_compound_expr_from_list.
2114         (expand_static_init): Adjust build_compound_expr call.
2115         (cxx_maybe_build_cleanup): Likewise.
2116         * init.c (perform_member_init): Use
2117         build_x_compound_expr_from_list.
2118         (build_new_1): Likewise.
2119         (build_vec_delete): Adjust build_compound_expr calls.
2120         (build_vbase_delete): Likewise.
2121         * typeck2.c (store_init_value): Use
2122         build_x_compound_expr_from_list.
2123         (build_functional_cast): Likewise.
2125 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2127         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2128         * decl.c (make_typename_type): Pass it.
2129         * pt.c (lookup_template_class): Use it.
2130         (resolve_typename_type): Pass it.
2131         * semantics.c (finish_template_type): Pass it.
2133 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2135         PR c++/11617
2136         * cp-tree.h (qualified_name_lookup_error): Declare.
2137         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2138         errors.
2139         (tsubst_expr) <DECL_STMT case>: Likewise.
2140         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2141         * semantics.c (qualified_name_lookup_error): New, broken out of ...
2142         (finish_id_expression): ... here. Use it.
2144 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
2146         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2148 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2150         PR c++/11596
2151         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2152         (tsubst_template_arg): New.
2153         (tsubst_template_arg_vector): Rename to ...
2154         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2155         tsubst_template_arg.
2156         (coerce_template_parms): Use tsubst_template_arg for default
2157         value.
2158         (tsubst_template_parms): Likewise.
2159         (tsubst_aggr_type): Adjust.
2160         (tsubst_decl): Likewise.
2161         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2162         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2164 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
2166         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2167         * error.c: Use the new pretty-printer framework.
2169 2003-07-24  Per Bothner  <pbothner@apple.com>
2171         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2172         which causes errors messages to incorrectly mention included files.
2174 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
2176         * cp-tree.h (convert_to_base_statically): Declare.
2177         * call.c (build_special_member_call): Convert INSTANCE to the base
2178         type.
2179         * class.c (convert_to_base_statically): New method.
2180         * init.c (construct_virtual_base): Use it.
2181         * method.c (do_build_assign_ref): Fix typo in comment.
2183 2003-07-24  Jason Merrill  <jason@redhat.com>
2185         * decl.c: Just set truthvalue_* to boolean_*.
2187 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2189         * decl.c (reshape_init): Remove unreachable code.
2191 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2193         PR c++/11513
2194         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2196 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
2198         PR c++/11645
2199         * cp-tree.h (accessible_base_p): Declare.
2200         * call.c (build_over_call): Use it.
2201         * search.c (accessible_base_p): New function, split out from ...
2202         (lookup_base): ... here.
2204         PR c++/11517
2205         * call.c (build_conditional_expr): Use perform_implicit_conversion
2206         and error_operand_p.  Robustify.
2207         * typeck.c (build_unary_op): Use perform_implicit_conversion.
2209 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
2211         PR c++/10953
2212         * parser.c (cp_parser_nested_name_specifier): Reset scope on
2213         failure.
2214         (cp_parser_elaborated_type_specifier): Likewise.
2216 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
2218         Eliminate use of POINTER_TYPE for pointers-to-members.
2219         * call.c (standard_conversion): Rework pointer-to-member handling.
2220         Add comments.
2221         (add_builtin_candidate): Likewise.
2222         (resolve_scoped_fn_name): Remove.
2223         (build_conditional_expr): Rework pointer-to-member handling.
2224         (compare_ics): Likewise.
2225         * class.c (check_field_decls): Use TYPE_PTR_P.
2226         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2227         handling.
2228         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2229         (TYPE_PTRMEM_P): Add comment.
2230         (TYPE_PTR_P): Simplify.
2231         (TYPE_PTROB_P): Correct definition.
2232         (TYPE_PTR_TO_MEMBER_P): New macro.
2233         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2234         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2235         (resolved_scoped_fn_name): Remove declaration.
2236         (build_offset_ref): Change prototype.
2237         (resolve_offset_ref): Remove.
2238         (comp_target_types): Remove.
2239         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2240         handling.
2241         (convert_to_reference): Use can_convert.
2242         (ocp_convert): Improve error handling.  Rework pointer-to-member
2243         handling.
2244         (perform_qualification_conversions): Rework pointer-to-member
2245         handling.
2246         * decl.c (build_ptrmem_type): Handle functions too.
2247         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2248         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2249         (grokparms): Remove OFFSET_TYPE error message.
2250         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2251         * error.c (dump_type_prefix): Likewise.
2252         * expr.c (cplus_expand_constant): Use build_nop.
2253         * init.c (build_offset_ref): Add address_p parameter.  Fold in
2254         necessary bits from resolve_offset_ref.
2255         (resolve_offset_ref): Remove.
2256         * parser.c (cp_parser_postfix_expression): Remove special case
2257         code for OFFSET_TYPE.
2258         * pt.c (convert_nontype_argument): Rework pointer-to-member
2259         handling.
2260         (convert_template_argument): Likewise.
2261         (unify): Likewise.
2262         (invalid_nontype_parm_type_p): Likewise.
2263         (dependent_type_p_r): Likewise.
2264         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2265         (target_incomplete_p_): Rework pointer-to-member
2266         handling.
2267         (get_pseudo_ti_init): Likewise.
2268         (get_pseudo_ti_desc): Likewise.
2269         * semantics.c (finish_qualified_id_expr): Adjust call to
2270         build_offset_ref.  Remove use of resolve_offset_ref.
2271         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2272         * typeck.c (target_type): Use TYPE_PTRMEM_P.
2273         (type_unknown_p): Remove obsolete code about the time before
2274         non-dependent expressions were handled correctly.
2275         (qualify_type_recursive): Remove.
2276         (composite_pointer_type_r): New function.
2277         (composite_pointer_type): Use it.
2278         (merge_types): Remove dead comments.
2279         (comp_cv_target_types): Remove.
2280         (comp_target_types): Likewise.
2281         (comp_target_parms): Likewise.
2282         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2283         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2284         (build_binary_op): Do not use of comp_target_types.
2285         (pointer_diff): Remove OFFSET_TYPE case.
2286         (build_unary_op): Adjust pointer-to-member handling.
2287         (unary_complex_lvalue): Likewise.
2288         (check_for_casting_away_constness): Add description parameter.
2289         (build_static_cast): Pass it.
2290         (build_reinterpret_cast): Use check_for_casting_away_constness.
2291         (build_const_cast): Adjust pointer-to-member handling.
2292         (build_c_cast): Likewise.
2293         (convert_for_assignment): Remove OFFSET_TYPE error message.
2294         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2295         (comp_ptr_ttypes_reinterpret): Remove.
2296         (casts_away_constness_r): Adjust pointer-to-member handling.
2297         (casts_away_constness): Liekwise.
2298         (strip_all_pointer_quals): Remove.
2299         * typeck2.c (digest_init): Adjust pointer-to-member handling.
2300         (build_m_component_ref): Likewise.
2302 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
2304         * lex.c (unqualified_fn_lookup_error): Mention that the error
2305         message needs to be kept in synch with the manual.
2307 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2309         PR c++/11614
2310         * decl.c (grokdeclarator): An array member is only a flexible
2311         array member if the field itself is the array.
2313 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2315         PR c++/10793
2316         * decl.c (xref_basetypes): Handle error_mark_node.
2318 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2320         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2321         * tree.c (lvalue_p_1): Set it.
2322         * class.c (check_field): Don't allow non-packed non-POD fields to
2323         be packed.
2324         * call.c (reference_binding): Need a temporary for all bitfield
2325         and packed fields.
2326         (convert_like_real): Check it is ok to make a temporary here.
2328 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
2330         * cp-tree.h (hack_identifier): Remove.
2331         * method.c (hack_identifier): Remove.
2332         * semantics.c (finish_id_expression): Expand hack_identifier
2333         here. Simplify.
2335 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2337         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2338         semantics.c typeck.c: Remove unnecessary casts.
2340 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2342         * cp-tree.h (hack_identifier): Remove.
2343         * method.c (hack_identifier): Remove.
2344         * semantics.c (finish_id_expression): Expand hack_identifier
2345         here. Simplify.
2347 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2349         * cp-tree.h (finish_non_static_data_member): Add object param.
2350         * method.c (hack_identifier): Adjust.
2351         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2352         again for a FIELD_DECL.
2353         * semantics.c (finish_non_static_data_member): Add object
2354         parameter. Always save the DECL in the COMPONENT_REF.
2355         * call.c (resolve_scoped_fn_name): Adjust.
2357 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
2359         * pt.c (get_bindings): Make definition consistent with
2360         forward declaration.
2362 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2364         PR c++/7809
2365         * friend.c (add_friend): Check access for member functions
2366         and templates.
2368 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2370         PR c++/10668
2371         * typeck.c (build_class_member_access_expr): Improve diagnostic.
2373 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
2375         PR c++/11547
2376         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2377         macro.
2378         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2379         * decl.c (duplicate_decls): Merge
2380         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2381         * parser.c (cp_parser_postfix_expression): Adjust call to
2382         cp_parser_initializer_list and
2383         cp_parser_parenthesized_expression_list.
2384         (cp_parser_parenthesized_expression_list): Add non_constant_p.
2385         (cp_parser_new_placement): Adjust call to
2386         cp_parser_parenthesized_expression_list.
2387         (cp_parser_direct_new_declarator): Likewise.
2388         (cp_parser_conditional_expression): Remove.
2389         (cp_parser_constant_expression): Parse an assignment-expression,
2390         not a conditional-expression.
2391         (cp_parser_simple_declaration): Resolve expression/declaration
2392         ambiguity more quickly.
2393         (cp_parser_mem_initializer): Adjust call to
2394         cp_parser_parenthesized_expression_list.
2395         (cp_parser_init_declarator): Keep track of whether or not the
2396         initializer is a constant-expression.
2397         (cp_parser_initializer): Add non_constant_p parameter.
2398         (cp_parser_initializer_clause): Likewise.
2399         (cp_parser_initializer_list): Likewise.
2400         (cp_parser_attribute_list): Adjust call to
2401         cp_parser_parenthesized_expression_list.
2402         (cp_parser_functional_cast): Likewise.
2403         * pt.c (tsubst_decl): Copy
2404         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2405         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2406         * semantics.c (finish_id_expression): Use
2407         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2409 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
2411         * lang-options.h: Remove.
2413 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
2415         PR c/10962
2416         * class.c (field_decl_cmp): Remove.
2417         (resort_field_decl_cmp): Remove.
2418         (resort_sorted_fields): Remove.
2419         (add_fields_to_vec): Rename to ...
2420         (add_fields_to_record_type): this.
2421         (finish_struct_1): Change to be using
2422         sorted_fields_type's fields.
2423         * cp-tree.h (lang_decl): In lang_decl_u3
2424         change sorted_fields to be a pointer to
2425         sorted_fields_type.
2426         (resort_sorted_fields): Remove prototype.
2427         * search.c (lookup_field_1): Change to be using
2428         sorted_fields_type's fields.
2430 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2432         PR c++/5421
2433         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2434         is a member of other class.
2435         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2436         is a specialization of function template.
2438 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2440         PR c++/10903
2441         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2442         Improve.
2444 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
2446         * cp-tree.def (LOOKUP_EXPR): Remove.
2447         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2448         (LOOKUP_EXPR_GLOBAL): Remove.
2449         (get_bindings): Remove.
2450         (is_aggr_type_2): Remove.
2451         * call.c (resolved_scoped_fn_name): Remove support for
2452         LOOKUP_EXPR.
2453         * decl.c (grokfndecl): Likewise.
2454         (grokdeclarator): Likewise.
2455         * error.c (dump_decl): Likewise.
2456         (dump_expr): Likewise.
2457         * friend.c (do_friend): Likewise.
2458         * init.c (build_offset_ref): Likewise.
2459         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
2460         LOOKUP_EXPRs
2461         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2462         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2463         test.
2464         * pt.c (get_bindings): Give it internal linkage.
2465         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2466         (lookup_template_function): Likewise.
2467         (for_each_tempalte_parm_r): Likewise.
2468         (tsubst_decl): Likewise.
2469         (tsubst_qualified_id): Handle template template parameters.
2470         (tsubst_copy): Remove support for LOOKUP_EXPR.
2471         (tsubst_copy_and_build): Likewise.
2472         (most_general_template): Likewise.
2473         (value_dependent_expression_p): Likewise.
2474         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2475         always dependent.
2476         * semantics.c (perform_koenig_lookup): Do not create
2477         IDENTIFIER_NODEs.
2478         (finish_fname): Likewise.
2479         (finish_id_expression): Likewise.
2480         * tree.c (is_aggr_type_2): Remove.
2482 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2484         PR c++/11531
2485         * typeck.c (check_return_expr): Fix thinko in diagnostic.
2487 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2489         PR c++/10108
2490         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2491         error_mark_node.
2493 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
2495         PR c++/11509
2496         * pt.c (dependent_scope_ref_p): New function.
2497         (value_dependent_expression_p): Use it.
2498         (type_dependent_expression_p): Likewise.
2500         * pt.c (tsubst_friend_function): Use reregister_specialization.
2502         PR c++/7019
2503         * cp-tree.h (lookup_qualified_name): Adjust prototype.
2504         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
2505         call to is_aggr_type.
2506         * parser.c (cp_parser_lookup_name): Adjust call to
2507         lookup_qualified_name.
2508         * pt.c (tsubst_qualified_id): Likewise.
2509         (tsubst_copy_and_build): Likewise.
2510         * semantics.c (finish_qualified_id_expr): Deal with erroneous
2511         expressions.
2513 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2515         PR c++/11510
2516         * call.c (op_error): Properly format  REALPART_EXPR and
2517         IMAGPART_EXPR.
2518         * error.c (dump_expr): Likewise.
2520 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2522         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2524 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2526         PR c++/5293
2527         * call.c (initialize_reference): Improve diagnostic.
2529 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2531         PR c++/11154
2532         * pt.c (more_specialized_class): Add full_args parameter.
2533         (most_specialized_class): Adjust calls to more_specialized_class.
2534         * cp-tree.h (more_specialized_class): Adjust declaration.
2536 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
2538         * lex.c (enum tree_node_kind): Delete.
2540 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
2542         PR c++/11503
2543         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2544         (SET_DECL_SELF_REFERENCE_P): Likewise.
2545         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2546         * pt.c (tsubst_decl): Copy it.
2547         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2549         * pt.c (reregister_specialization): Fix thinko in previous change.
2551         * cp-tree.h (cp_id_kind): New type.
2552         (unqualified_name_lookup_error): Change prototype.
2553         (unqualified_fn_lookup_error): New function.
2554         (do_identifier): Remove.
2555         (do_scoped_id): Likewise.
2556         (tsubst_copy_and_build): Change prototype.
2557         (reregister_specialization): New function.
2558         (perform_koenig_lookup): Likewise.
2559         (finish_id_expression): Likewise.
2560         * call.c (build_method_call): Adjust call to
2561         unqualified_name_lookup_error.
2562         * decl.c (duplicate_decls): Use reregister_specialization.
2563         * lex.c (is_global): Remove.
2564         (unqualified_name_lookup_error): Return a value.
2565         (do_identifier): Remove.
2566         (do_scoped_id): Likewise.
2567         (identifier_typedecl_value): Remove.
2568         (unqualified_fn_lookup_error): New function.
2569         * parser.c (cp_parser_id_kind): Remove.
2570         (cp_parser_non_constant_id_expression): Remove.
2571         (cp_parser_primary_expression): Use finish_id_expression.
2572         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2573         cp_parser_id_kind.
2574         (cp_parser_postfix_expression): Use perform_koenig_lookup.
2575         (cp_parser_template_argument): Use cp_id_kind.
2576         (cp_parser_fold_non_dependent_expr): Adjust call to
2577         tsubst_copy_and_build.
2578         * pt.c (unregister_specialization): Rename to ...
2579         (reregister_specialization): This.
2580         (tsubst_friend_function): Use it.
2581         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2582         (tsubst_qualified_id): Likewise.
2583         (tsubst_expr): Likewise.
2584         (tsubst_copy_and_build): Add function_p parameter.  Use
2585         finish_id_expression.  Introduce RECUR macro.
2586         (tsubst_non_call_postfix_expression): New function.
2587         (regenerate_decl_from_template): Use reregister_specialization.
2588         * semantics.c (perform_koenig_lookup): New function.
2589         (finish_id_expression): Likewise.
2591 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2593         * pt.c (push_access_scope_real): Remove.
2594         (push_access_scope): Move code from push_access_scope_real.
2595         (pop_access_scope): Don't check for TEMPLATE_DECL.
2596         (instantiate_template): Defer access checking during template
2597         substitution.
2598         (regenerate_decl_from_template): Tidy.
2600 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
2602         PR c++/11437
2603         * operators.def: Add definitions for __imag__, __real__.
2605 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
2607         PR c++/11050
2608         * parser.c (cp_parser_expression_list): Rename to ...
2609         (cp_parser_parenthesized_expression_list): ... here. Add attribute
2610         parameter, parse the surounding parentheses.
2611         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2612         parameters. Return int.
2613         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2614         (cp_parser_postfix_expression): Adjust function call parsing.
2615         (cp_parser_new_placement): Adjust.
2616         (cp_parser_new_initializer): Likewise.
2617         (cp_parser_cast_expression): Likewise.
2618         (cp_parser_selection_statement): Likewise.
2619         (cp_parser_mem_initializer): Likewise.
2620         (cp_parser_asm_definition): Likewise.
2621         (cp_parser_init_declarator): Likewise.
2622         (cp_parser_declarator): Make
2623         cdtor_or_conv_p an int ptr.
2624         (cp_parser_direct_declarator): Likewise. Check for a parameter
2625         list on cdtors & conv functions.
2626         (cp_parser_initializer): Adjust.
2627         (cp_parser_member_declaration): Adjust.
2628         (cp_parser_attribute_list): Move code into
2629         cp_parser_parens_expression_list.
2630         (cp_parser_functional_cast): Adjust.
2631         * pt.c (type_dependent_expression_p): Erroneous expressions are
2632         non-dependent.
2634 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
2636         * decl.c (cp_finish_decl): Handle 'used' attribute.
2638         * cp-lang.c (c_reset_state): New dummy routine.
2639         * cp-tree.h (finish_file): Move prototype to c-common.h.
2640         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2642 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
2644         PR c++/8327
2645         * pt.c (tsubst_qualified_id): Implement suggested resolution for
2646         Core Issue 2.
2647         (type_dependent_expression_p): Likewise.
2649 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
2651         * typeck.c (build_binary_op): Do not warn about signed
2652         vs. unsigned comparisons in the bodies of templates.
2654         PR c++/9411
2655         * parser.c (cp_parser_postfix_expression): Check dependency of
2656         functions.
2658 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2660         PR c++/10032
2661         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2662         still errors.
2664         PR c++/10527
2665         * error.c (decl_to_string): Do not print default argument
2666         expressions.
2668         * cp-tree.h (break_out_calls): Remove declaration.
2669         * tree.c (break_out_calls): Remove.
2670         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2672 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
2674         PR c++ 9483
2675         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2676         * decl2.c (constructor_name_p): Avoid repeated constructor_name
2677         calls.
2678         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2680 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2682         * typeck.c (build_x_unary_op): Take note of the fact that
2683         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2684         trees.
2686         * parser.c (cp_parser_primary_expression): Preserve the form of
2687         qualified expressions in templates, even if they are not
2688         dependent.
2689         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2690         (tsubst_qualified_id): Likewise.
2691         * search.c (accessible_p): Treat everything in the body of a
2692         template as accessible.
2694 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
2696         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2697         * cp-tree.h (build_call_from_tree): Remove.
2698         (build_member_call): Likewise.
2699         (dependent_template_arg_p): Remove.
2700         (any_dependent_template_arguments_p): New function.
2701         (dependent_template_id_p): Likewise.
2702         (any_type_dependent_arguments_p): Likewise.
2703         (build_non_dependent_expr): Likewise.
2704         (build_non_dependent_args): Likewise.
2705         (build_x_compound_expr): Adjust prototype.
2706         * call.c (build_new_method_call): Handle non-dependent expressions
2707         correctly.
2708         * decl2.c (grok_array_decl): Likewise.
2709         (build_offset_ref_call_from_tree): Likewise.
2710         (build_call_from_tree): Remove.
2711         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2712         (dump_expr): Likewise.
2713         * init.c (build_member_call): Remove.
2714         * mangle.c (write_expression): Update handling for template-ids.
2715         * parser.c (cp_parser_primary_expression): Use
2716         any_dependent_template_arguments_p.  Update constant-expression
2717         handling.
2718         (cp_parser_postfix_expression): Use
2719         any_type_dependent_arguments_p.  Simplify call processing.
2720         (cp_parser_unary_expression): Simplify.
2721         (cp_parser_expression): Adjust for changes to
2722         build_x_compound_expr.
2723         (cp_parser_template_argument): Implement standard-conforming
2724         parsing of non-type template arguments.
2725         (cp_parser_direct_declarator): Use
2726         cp_parser_fold_non_dependent_expr.
2727         (cp_parser_fold_non_dependent_expr): New function.
2728         (cp_parser_next_token_ends_template_argument_p): Likewise.
2729         * pt.c (convert_template_argument): Do not call
2730         maybe_fold_nontype_arg.
2731         (tsubst_baselink): Likewise.
2732         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
2733         processing work correctly for non-dependent expressions.  Adjust
2734         handling of COMPOUND_EXPR.  Simplify call processing.
2735         (value_dependent_expression_p): Deal with functional casts and
2736         sizeof/alignof correctly.
2737         (type_dependent_expression_p): Handle overloaded functions.
2738         (any_type_dependent_arguments_p): New function.
2739         (any_dependent_template_arguments_p): Likewise.
2740         (dependent_template_p): Treat SCOPE_REFs as dependent.
2741         (dependent_template_id_p): Simplify.
2742         (build_non_dependent_expr): New function.
2743         (build_non_dependent_args): Likewise.
2744         * semantics.c (finish_stmt_expr): Don't make dependent
2745         statement-expresions have void type.
2746         (finish_call_expr): Handle non-dependent expressions
2747         correctly.
2748         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2749         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2750         type size_t, even in templates.
2751         (expr_sizeof): Likewise.
2752         (finish_class_member_access_expr): Handle non-dependent expressions
2753         correctly.
2754         (build_x_indirect_ref): Likewise.
2755         (build_x_binary_op): Likewise.
2756         (build_x_unary_op): Likewise.
2757         (build_x_conditional_expr): Likewise.
2758         (build_x_compound_expr): Likewise.
2759         * typeck2.c (build_x_arrow): Likewise.
2761 2003-07-09  Jan Hubicka  <jh@suse.cz>
2763         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2764         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2765         (start_function): Use DECL_ESTIMATED_INSNS.
2766         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2768         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2769         unit-at-a-time
2771 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2773         PR c++/11030
2774         * pt.c (instantiate_class_template): Don't call xref_tag to
2775         inject name when the friend class is a specialization.
2777 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
2779         * cp-tree.h (build_scoped_method_call): Remove.
2780         (lookup_qualified_name): Remove parameter.
2781         (tsubst_copy_and_build): Declare.
2782         (finish_qualified_object_call_expr): Remove.
2783         (check_accessibility_of_qualified_id): New function.
2784         (finish_qualified_id_expr): Likewise.
2785         (non_reference): Likewise.
2786         (build_expr_from-tree): Remove.
2787         * call.c (non_reference): Remove.
2788         (build_scoped_method_call): Likewise.
2789         (build_method_call): Use error_operand_p.  Assert that we are not
2790         processing a template.
2791         (standard_conversion): Use non_reference.
2792         * class.c (build_vtbl_entry_ref): Likewise.
2793         (build_vtbl_ref_1): Likewise.
2794         * cvt.c (build_expr_type_conversion): Use non_reference.
2795         * decl.c (lookup_qualified_name): Remove flags parameter.
2796         (grok_op_properties): Use non_reference.
2797         * decl2.c (grok_array_decl): Likewise.
2798         (build_expr_from_tree): Remove.
2799         (build_offset_ref_call_from_tree): Update comment.
2800         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2801         * except.c (prepare_eh_types): Use non_reference.
2802         (can_convert_eh): Likewise.
2803         * init.c (build_dtor_call): Avoid using build_method_call.
2804         * mangle.c (write_template_param): Remove misleading comment.
2805         * method.c (locate_copy): Use non_reference.
2806         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2807         (cp_parser_primary_expression): Do not create SCOPE_REFs is
2808         non-dependent contexts.
2809         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2810         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2811         build_expr_from_tree.
2812         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2813         Use check_accessibility_of_qualified_id.
2814         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2815         build_expr_from_tree.
2816         (tsubst_baselink): New function.
2817         (tsubst_qualified_id): Likewise.
2818         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
2819         (tsubst_expr): Adjust call to lookup_qualified_name.
2820         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
2821         handling of CALL_EXPRs.
2822         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2823         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2824         * search.c (check_final_overrider): Likewise.
2825         * semantics.c (check_accessibility_of_qualified_id): New function.
2826         (finish_qualified_object_call_expr): Remove.
2827         * typeck.c (target_type): Use non_reference.
2828         (cxx_sizeof_or_alignof_type): Likewise.
2829         (dubious_conversion_warnings): Likewise.
2830         (convert_for_initialization): Likewise.
2831         (non_reference): New function.
2833 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2835         * decl.c (print_binding_level, print_other_binding_stack,
2836         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2837         stdio calls.
2838         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2840 2003-07-07  Andreas Jaeger  <aj@suse.de>
2842         * friend.c: Convert to ISO C90 prototypes.
2844         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2845         language.
2846         * cfns.h: Regenerate.
2848         * typeck.c: Convert remaining prototypes to ISO C90.
2849         * search.c: Likewise.
2851         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2852         * semantics.c (expand_or_defer_fn): Likewise
2853         * mangle.c (discriminator_for_string_literal): Likewise.
2854         * g++spec.c (lang_specific_driver): Likewise.
2856         * search.c (lookup_base_r): Remove unused variable.
2858 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2860         * semantics.c: (genrtl_try_block) Adjust emit_line_note
2861         calls.
2863 2003-07-07  Andreas Jaeger  <aj@suse.de>
2865         * search.c (lookup_base_r): Remove unused variable.
2867 2003-07-06  Michael Chastain  <mec@shout.net>
2869         PR debug/10055
2870         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2871         assigning to input_filename directly.
2873 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
2875         * call.c: Fix comment formatting.
2876         * class.c: Likewise.
2877         * cp-tree.h: Likewise.
2878         * decl.c: Likewise.
2879         * decl2.c: Likewise.
2880         * error.c: Likewise.
2881         * method.c: Likewise.
2882         * name-lookup.c: Likewise.
2883         * parser.c: Likewise.
2884         * pt.c: Likewise.
2885         * rtti.c: Likewise.
2886         * search.c: Likewise.
2887         * typeck.c: Likewise.
2889 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
2891         PR c++/11345
2892         * search.c (lookup_base_r): Remove is_non_public and
2893         within_current_scope parameters.  Remove other dead code.
2894         (lookup_base): Adjust call to lookup_base_r.
2895         (adjust_result_of_qualified_name_lookup): Improve comment.
2896         * semantics.c (finish_call_expr): Use maybe_dummy_object.
2898 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
2900         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2901         LANG_HOOKS_MISSING_ARGUMENT): Override.
2903 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
2905         PR c++/11431
2906         * typeck.c (build_static_cast): Check for reference conversions
2907         earlier.
2909 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
2911         * cp-tree.h (perform_integral_promotions): Declare.
2912         * call.c (build_addr_func): Use decay_conversion.
2913         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
2914         (convert_for_arg_passing): Use perform_integral_promotions.
2915         * cvt.c (build_expr_type_conversion): Use decay_conversion.
2916         (type_promotes_to): Do not return a cv-qualified type.
2917         * decl.c (grok_reference_init): Fix formatting.
2918         (get_atexit_node): Use decay_conversion.
2919         (build_enumerator): Use perform_integral_promotions.
2920         * init.c (build_vec_init): Use decay_conversion.
2921         * semantics.c (finish_expr_stmt): Likewise.
2922         (finish_switch_cond): Use perform_integral_promotions.
2923         * typeck.c (default_conversion): Likewise.
2924         (perform_integral_promotions): New function.
2925         (build_indirect_ref): Use decay_conversion.
2926         (build_array_ref): Use perform_integral_promotions.
2927         (convert_arguments): Use decay_conversion.
2928         (build_unary_op): Use perform_integral_promotions.
2929         (build_c_cast): Use decay_conversion.
2930         (build_modify_expr): Likewise.
2931         (convert_for_initialization): Likewise.
2932         * typeck2.c (build_x_arrow): Likewise.
2934 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
2936         * call.c: Fix comment typos.
2937         * class.c: Likewise.
2938         * cp-tree.h: Likewise.
2939         * cvt.c: Likewise.
2940         * decl2.c: Likewise.
2941         * decl.c: Likewise.
2942         * init.c: Likewise.
2943         * mangle.c: Likewise.
2944         * parser.c: Likewise.
2945         * pt.c: Likewise.
2946         * search.c: Likewise.
2947         * semantics.c: Likewise.
2948         * tree.c: Likewise.
2949         * typeck.c: Likewise.
2951 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
2953         * parser.c (cp_lexer_read_token): No need to handle string
2954         constant concatenation.
2956 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2958         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2959         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2960         ATTRIBUTE_GCC_CXXDIAG.
2962 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
2964         * call.c (build_addr_func): Handle bound pointers-to-members.
2965         (build_method_call): Do not call resolve_offset_ref.
2966         (implicit_conversion): Likewise.
2967         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2968         resolve_offset_ref.
2969         (resolve_args): Do not call resolve_offset_ref.
2970         (build_conditional_expr): Likewise.
2971         (build_new_method_call): Likewise.
2972         * cp-tree.def (OFFSET_REF): Update documentation.
2973         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2974         pointers to members to pointers.
2975         (ocp_convert): Do not call resolve_offset_ref.
2976         (convert_to_void): Likewise.
2977         (build_expr_type_conversion): Likewise.
2978         * decl2.c (delete_sanity): Likewise.
2979         * init.c (resolve_offset_ref): Simplify greatly.
2980         (build_vec_delete): Do not call resolve_offset_ref.
2981         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2982         if appropriate.
2983         (cp_parser_unary_expression): Use
2984         cp_parser_simple_cast_expression.
2985         (cp_parser_delete_expression): Likewise.
2986         (cp_parser_cast_expression): Likewise.
2987         (cp_parser_pm_expression): Use cp_parser_binary_op.
2988         (cp_parser_simple_cast_expression): New function.
2989         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
2990         * semantics.c (finish_increment_expr): Likewise.
2991         (finish_typeof): Likewise.
2992         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
2993         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
2994         (decay_conversion): Do not call resolve_offset_ref.
2995         (finish_class_member_access_expr): Likewise.
2996         (convert_arguments): Likewise.
2997         (build_x_binary_op): Handle DOTSTAR_EXPR.
2998         (condition_conversion): Do not call resolve_offset_ref.
2999         (unary_complex_lvalue): Likewise.
3000         (build_static_cast): Likewise.
3001         (build_reinterpret_cast): Likewise.
3002         (build_const_cast): Likewise.
3003         (build_c_cast): Likewise.
3004         (build_modify_expr): Likewise.
3005         (convert_for_assignment): Likewise.
3006         (convert_for_initialization): Likewise.
3007         * typeck2.c (build_x_arrow): Likewise.
3008         (build_m_component_ref): Simplify.
3010         * call.c (build_scoped_method_call): Use convert_to_void.
3011         (build_method_call): Likewise.
3012         * class.c (check_field_decls): Remove dead code.
3013         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3014         * decl2.c (grok_array_decl): Remove dead code.
3015         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3016         as pointer-to-member representation.
3017         * init.c (build_offset_ref): Tidy.
3018         (build_vec_delete_1): Use convert_to_void.
3019         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3020         as pointer-to-member representation.
3022 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
3024         PR c++/9162
3025         * decl.c (grokdeclarator): Return friend decls, not
3026         void_type_node.
3027         * decl2.c (grokfield): Alter friend decl check.
3028         * parser.c (struct cp_parser): Document default_arg chain on
3029         unparsed_functions_queue.
3030         (cp_parser_save_default_args): New.
3031         (cp_parser_init_declarator, cp_parser_function_definition,
3032         cp_parser_member_declaration): Call it.
3033         (cp_parser_class_specifier): Remove unused variable. Alter
3034         processing of unparsed_functions_queue.
3036 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3038         * class.c (add_method, check_field_decl): Fix format specifier.
3039         * decl.c (duplicate_decls, pushdecl, check_goto,
3040         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3041         start_enum): Likewise.
3042         * decl2.c (ambiguous_decl): Likewise.
3043         * pt.c (redeclare_class_template): Likewise.
3045 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
3047         PR c++/10219
3048         * pt.c (type_unification_real): Don't unify exprs of error type.
3049         * tree.c (error_type): Don't die on error_type.
3051         PR c++/9779
3052         * decl2.c (arg_assoc_class): Don't die on NULL type.
3053         * typeck.c (type_unknown_p): Don't die on untyped expressions.
3055 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3057         PR c++/6949
3058         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3059         classes.
3061 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3063         * error.c (locate_error): %P takes an `int', not a `tree'.
3065 2003-07-02  Jan Hubicka  <jh@suse.cz>
3067         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3068         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3069         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3070         massaging.
3072         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3073         (expand_or_defer_fn): Declare.
3074         (lower_function): Declare.
3075         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3076         * decl2.c: Include cgraph.h and varpool.h
3077         (maybe_emit_vtables):  Make explicit instantations as needed.
3078         (mark_member_pointers, lower_function): New functions.
3079         (finish_file): Do unit-at-a-time.
3080         * method.c (synthesize_method): Use expand_or_defer_fn.
3081         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3082         * parser.c (cp_parser_function_definition_after_decl): Use
3083         expand_or_defer_fn.
3084         * pt.c (instantiate_decl): Likewise.
3085         * semantics.c: Include cgraph.h
3086         (expand_or_defer_fn): Break out from ...
3087         (expand_body): ... here; deal with unit-at-a-time.
3088         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3089         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3091 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3093         * call.c (resolve_scoped_fn_name): Return error_mark_node for
3094         erroneous cases.
3096 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3098         PR c++/11149
3099         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3100         is a class type.
3102 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
3104         PR c++/8046
3105         * error.c (dump_decl): Handle BIT_NOT_EXPR as
3106         pseudo destructor calls.
3108 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
3110         * cp-tree.h (define_label): Replace filename and lineno
3111         arguments with a location_t.
3112         * decl.c (pop_label): Adjust define_label call.
3113         (define_label): Replace filename and lineno arguments with a
3114         location_t.
3115         * semantics.c (finish_label): Adjust define_label call.
3117 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3119         PR c++/9559
3120         * decl2.c (grokfield): Do not build NOP_EXPRs around the
3121         error_mark_node.
3123 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
3125         * Make-lang.in: Update.
3126         * cp-lang.c (c_language): Define.
3127         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3128         * cp-tree.h (cxx_init_options): Remove.
3129         * lex.c: Don't include diagnostic.h.
3130         (cxx_init_options): Remove.
3132 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3134         PR c++/4933
3135         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3136         tree generated within a template. Use dump_expr to dump an
3137         expression sizeof.
3139 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3141         * mangle.c (write_expression): Exit gracefully when trying to
3142         mangle a CALL_EXPR.
3144 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3146         PR c++/10750
3147         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3148         (value- or type-) dependent expression as DECL_INITIAL is a
3149         valid constant-expression (at parser time).
3151 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
3153         PR c++/11106
3154         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3155         USING_DECL, instead of print_tree_identifier.
3157 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3159         * cp-tree.h (language_to_string): Adjust declaration.
3160         * dump.c (cp_dump_tree): Adjust usage.
3161         * error.c (dump_char): Use output_formatted_scalar. Tidy.
3162         (parm_to_string): Lose unused parameter.  Tidy.
3163         (expr_to_string): Likewise.
3164         (code_to_string): Likewise.
3165         (language_to_string): Likewise.
3166         (op_to_string): Likewise.
3167         (assop_to_string): Likewise.
3168         (digit_buffer): Remove.
3169         (dump_type): Format builtin vector type as __vector__.
3171 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3173         * error.c (print_integer): Remove.
3174         (dump_type_suffix): Adjust.
3175         (dump_expr): Likewise.
3177 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3179         * error.c (print_instantiation_partial_context): Take a
3180         location_t.
3181         (print_instantiation_full_context): Adjust.
3182         (print_instantiation_context): Adjust.
3184         * cp-tree.h (cp_line_of, cp_file_of): Remove.
3185         * error.c (cp_line_of, cp_file_of): Merge into ...
3186         (location_of): ... here. Make static, return a location_t.
3187         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3189 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3191         PR c++/10784
3192         * call.c (joust): Move warn_conversion check outwards.
3194 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
3196         * decl.c (build_typename_type)
3197         * mangle.c (write_template_template_arg)
3198         * parser.c (cp_parser_scope_through_which_access_occurs)
3199         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3200         * repo.c (get_base_filename)
3201         * semantics.c (maybe_convert_cond):
3202         Mark the definition static, matching the forward declaration.
3204 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
3206         PR c++/10468
3207         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3209 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
3211         PR c++/10796
3212         * decl.c (finish_enum): Implement DR377.
3214         * decl.c (cp_finish_decl): Don't make variables with reference
3215         type readonly while they are being initialized.
3217 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
3219         PR c++/11332
3220         * typeck.c (build_static_cast): Avoid returning expressions with
3221         reference type.
3223 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
3225         * call.c (build_op_delete_call): Use strip_array_call. Correct
3226         error message to say 'delete' or 'delete[]'.
3228 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
3230         PR c++/8266
3231         * pt.c (check_explicit_specialization): When looking up a
3232         template function from an identifier outside class-scope, bind
3233         it to CP_DECL_CONTEXT.
3235 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
3237         PR c++/10990
3238         * search.c (lookup_base_r): Rely on accessible_p, rather than
3239         trying to emulate that logic here.
3241         PR c++/10931
3242         * call.c (convert_like): Pass issue_conversion_warnings.
3243         (convert_like_with_context): Likewise.
3244         (convert_like_real): Add issue_conversion_warnings parameter.
3245         (perform_direct_initialization_if_possible): New function.
3246         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3247         * typeck.c (check_for_casting_away_constness): New function.
3248         (build_static_cast): Rewrite.
3250 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
3252         * call.c (enforce_access): Assert we get a binfo.
3253         (build_op_delete_call): Pass a binfo to
3254         perform_or_defer_access_check.
3255         * class.c (alter_access): Likewise.
3256         * decl.c (make_typename_type): Likewise.
3257         (make_unbound_class_template): Likewise.
3258         * lex.c (do_identifier): Likewise.
3259         * method.c (hack_identifier): Likewise.
3260         * parser.c (cp_parser_lookup_name): Likewise.
3261         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3262         test.
3263         * semantics.c (finish_non_static_data_member): Likewise.
3264         (perform_or_defer_access_check): Expect a binfo.
3265         * typeck.c (comptypes): Expect types.
3267         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3268         * friend.c (make_friend_class): Likewise.
3269         * pt.c (check_default_tmpl_args): Likewise.
3270         (lookup_template_class): Likewise.
3272 2003-06-24  Jan Hubicka  <jh@suse.cz>
3274         * method.c (thunk_labelno): Move outside ifdef block to make garbage
3275         collector happy.
3277 2003-06-24  Jan Hubicka  <jh@suse.cz>
3279         * class.c (build_vtable): Make vtables.
3280         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3281         * decl2.c (output_vtable_inherit): Rename to ...
3282         (prepare_assemble_variable): ... this one; change interface.
3283         (maybe_emit_vtables): Do not call output_vtable_inherit.
3284         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3285         * cp-tree.h (prepare_assemble_variable): New.
3287 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
3289         * method.c: add prototype for make_alias_for_thunk.
3290         (thunk_labelno, make_alias_for_thunk): only define
3291         if ASM_OUTPUT_DEF is defined.
3293 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
3295         * method.c (thunk_labelno): New variable.
3296         (make_alias_for_thunk): New function.
3297         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
3298         into the same section as the function it is calling.
3299         Include gt-cp-method.h.
3300         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3301         (cp/method.o): Depend on gt-cp-method.h.
3302         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3304 2003-06-23  Jan Hubicka  <jh@suse.cz>
3306         * decl.c (register_dtor_fn): Mark cleanup as used.
3307         * decl2.c (mark_vtable_entries): Skip nops.
3308         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3309         (build_dynamic_cast_1): Likewise.
3310         (tinfo_base_init): Likewise.
3311         (emit_tinfo_decl): Likewise.
3313 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
3315         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3316         to it.
3318 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
3320         PR c++/10784
3321         * call.c (joust): Warn about choosing conversion sequence only if
3322         -Wconversion.
3324 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3326         PR c++/10864
3327         * call.c (op_error): Tidy.
3328         * error.c (dump_expr): Properly format 'T()' when T is an
3329         aggregate type.
3331 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
3333         PR c++/10915
3334         * decl.c (grok_op_properties): Warn possible confusing conversion
3335         only if -Wconversion.
3337 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
3339         PR c++/10749
3340         * parser.c (cp_parser_class_head): See through dependent names
3341         when parsing a class-head.
3343         PR c++/10845
3344         * pt.c (try_class_unification): Correct handling of member class
3345         templates.
3347 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3349         * semantics.c (genrtl_finish_function): Adjust
3350         expand_function_end call.
3352 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
3354         PR c++/10939
3355         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3356         functions.
3357         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3359         PR c++/9649
3360         * cp-tree.h (pushdecl_class_level): Change prototype.
3361         (push_class_level_binding): Likewise.
3362         * decl.c (add_binding): Reject duplicate static data members.
3363         (pushdecl_class_level): Return a value indicating whether or not
3364         the binding was valid.
3365         (push_class_level_binding): Likewise.
3366         * semantics.c (finish_member_declaration): Don't keep invalid
3367         declarations.
3369         PR c++/11041
3370         * call.c (initialize_reference): Do not use cp_finish_decl to emit
3371         temporary variables.
3372         * cp-tree.h (static_aggregates): Declare.
3373         (pushdecl_top_level_and_finish): Likewise.
3374         * decl.c (pushdecl_top_level_1): New function.
3375         (pushdecl_top_level): Use it.
3376         (pushdecl_top_level_and_finish): New function.
3377         (initialize_local_var): Remove redundant code.
3378         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
3379         building_stmt_tree.
3380         * decl.h (static_aggregates): Remove.
3381         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3382         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3383         (tinfo_base_init): Likewise.
3385 2003-06-19  Matt Austern  <austern@apple.com>
3387         PR c++/11228
3388         * init.c (build_zero_init): Assert that number of array elements
3389         is an integer constant.
3390         (build_default_init) Don't use build_zero_init for arrays with
3391         variable number of elements.
3393 2003-06-19  Andreas Jaeger  <aj@suse.de>
3395         * cp-tree.h: Remove duplicated declarations.
3397 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
3399         * pt.c: Convert to ISO C.
3400         * semantics.c: Convert to ISO C.
3402 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3404         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3405         at_least_as_qualified_p, more_qualified_p): Return bool.
3406         * typeck.c: ANSIFY function definitions.
3407         (comp_array_types): Take redeclaration bool parameter.
3408         (comptypes): Rearrange STRICT handling.
3409         (at_least_as_qualified_p, more_qualified_p,
3410         comp_cv_qualification): Cache cv quals.
3411         (compparms): Rearrange loop.
3413 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3415         * cp-tree.h (COMPARE_RELAXED): Rename to ...
3416         (COMPARE_DERIVED): ... here. Adjust comment.
3417         (resolve_typename_type_in_current_instantiation): Remove.
3418         (cp_tree_equal, comptypes): Return a bool.
3419         * cvt.c (convert_to_reference): Adjust comptypes call.
3420         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3421         (resolve_typename_type_in_current_instantiation): Remove.
3422         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3423         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3424         calls. Refactor code.
3425         * typeck.c (comp_array_types): Return bool. Lose callback.
3426         parameter. Adjust cp_tree_equal calls.
3427         (comptypes): Return bool. Adjust strict handling. Remove relaxed
3428         enumeration and java type handling. Deal with typename types here.
3429         Adjust recursive and cp_tree_equals calls. Adjust base and derived
3430         checking.
3431         (comp_target_types): Remove unreachable code. Adjust
3432         same_or_base_type_p calls.
3433         (ptr_reasonably_similar): Adjust base and derived check.
3435         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3436         unused calculation.
3437         (check_return_expr): Adjust error messages.
3438         * cp-tree.def (SCOPE_REF): Correct comment.
3440 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3442         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3443         string again.
3445 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
3447         * optimize.c (dump_function): Form complete flag name by
3448         prefixing 'fdump-' to string returned by dump_flag_name().
3450 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3452         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3453         string.
3455 2003-06-17  Jason Merrill  <jason@redhat.com>
3457         PR c++/10929
3458         * decl.c (grokfndecl): Don't mark a function inline for
3459         -finline-functions if it isn't defined.
3461 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3463         PR c++/10712
3464         * class.c (handle_using_decl): Robustify.
3466         PR c++/11105
3467         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3468         * mangle.c (struct globals): Remove internal_mangling_p.
3469         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3470         (write_template_parm): Don't write out the level number.
3471         (conv_type_names): New variable.
3472         (hash_type): New function.
3473         (compare_type): Likewise.
3474         (mangle_conv_op_name_for_type): Don't try to mangle conversion
3475         operator names.
3476         * search.c (lookup_conversion_operator): New function.
3477         (lookup_fnfields_1): Use it.
3479 2003-06-17  Andreas Jaeger  <aj@suse.de>
3481         * except.c: Remove duplicate declaration of push_eh_cleanup.
3483         * call.c: Remove extra declaration of inhibit_warnings.
3485 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3487         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
3488         * mangle.c: Convert to ISO C.
3490 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3492         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3493         macro.
3495 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3497         * tree.c: Convert to ISO C.
3499 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
3501         * cp-tree.h: Follow spelling conventions.
3502         * mangle.c: Likewise.
3503         * method.c: Likewise.
3504         * parser.c: Likewise.
3506 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3508         * decl.c (start_function): Adjust init_function_start call.
3509         * method.c (use_thunk): Likewise.
3510         * semantics.c (genrtl_start_function): Likewise.
3512 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3514         * Make-lang.in: Remove c-options.o.
3516 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
3518         * lex.c: Convert to ISO C.
3520         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
3521         * init.c: removes use of PARAMS macro.  Use ISO style function
3522         declarations.  (Not copyright-significant change.)
3524         * rtti.c: Remove PARAMS.
3526         * typeck2.c: Convert to ISO C.
3528 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
3530         PR c++/10635
3531         * typeck.c (build_c_cast): Check that the destination type is
3532         complete.
3534 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3536         PR c++/10432
3537         * cp-tree.h (finish_declarator): Remove.
3538         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3539         erroneous declarations.
3540         * semantics.c (finish_declarator): Remove.
3542 2003-06-11  Roger Sayle  <roger@eyesopen.com>
3544         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3545         global static constructor/destructor if it will be empty, i.e.
3546         either doesn't call any ctors/dtors or only calls pure or const
3547         ctors/dtors.
3549 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3551         * mangle.c (tm_p.h): Include it.
3552         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3554         PR c++/11131
3555         * tree.c (cp_cannot_inline_fn): Check for "inline" before
3556         instantiation.
3558 2003-06-10  Jason Merrill  <jason@redhat.com>
3560         PR c++/10968
3561         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3563 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
3565         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3566         (start_cleanup_cnt): New.
3568 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
3570         PR c++/11131
3571         * cp-tree.h (template_for_substitution): Declare.
3572         * decl2.c (mark_used): Use it when figuring out whether or not a
3573         function is inline.
3574         * pt.c (template_for_substitution): Give it external linkage.
3575         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3576         possible.
3578 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
3580         PR 8861
3581         * mangle.c (write_real_cst): New function.  Implement
3582         ABI-compliant mangling of floating-point literals when
3583         -fabi-version>=2; provide backward compatibility with 3.3 when
3584         -fabi-version=1 (with warning).  Clarify commentary.
3585         (write_template_arg_literal): Use write_real_cst.
3587 2003-06-07  Andreas Jaeger  <aj@suse.de>
3589         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3591 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
3593         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3594         (LANG_HOOKS_HANDLE_OPTION): Override.
3595         * cp-tree.h (cxx_init_options): Update.
3596         * lex.c (cxx_init_options): Update.
3598 2003-06-05  Jan Hubicka  <jh@suse.cz>
3600         * Make-lang.in:  Add support for stageprofile and stagefeedback
3602 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
3604         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3606 2003-06-04  Andreas Jaeger  <aj@suse.de>
3608         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3610 2003-06-03  Jason Merrill  <jason@redhat.com>
3612         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3614         * cp/decl.c (reshape_init): Handle vectors.
3616         * testsuite/g++.dg/init/array10.C: New.
3618 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3620         PR c++/10940
3621         * pt.c (check_explicit_specialization): Check for 'static'
3622         earlier.
3624 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
3626         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3627         the operand of a CONSTRUCTOR node.
3629 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
3631         * decl.c (cp_binding_level::this_entity): Rename from this_class.
3632         (cxx_scope_descriptor): New function.
3633         (cxx_scope_debug): Likewise.
3634         (push_binding_level): Use it.
3635         (pop_binding_level): Likewise.
3636         (suspend_binding_level): Likewise.
3637         (resume_binding_level): Likewise.
3638         (pushlevel_class): Adjust use of this_class.
3639         (pushtag): Likewise.
3640         (lookup_name_real): Likewise.
3641         (global_scope_name): New variable.
3642         (initialize_predefined_identifiers): Initialize it.
3643         (push_namespace): Use it.
3644         (make_cxx_scope): New function.
3645         (pushlevel): Use it.
3646         (pushlevel_class): Likewise.
3647         (push_binding_level): Simplify.  Loose the last two arguments.
3648         (make_binding_level): Remove.
3649         (initial_push__namespace_scope): New function.
3650         (push_namespace): Use it.  Simplify.
3651         (cxx_init_decl_processing): Likewise.
3652         (declare_namespace_level): Remove.
3654 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3656         PR c++/10956
3657         * pt.c (instantiate_decl): Don't use full template arguments if
3658         we are dealing with specializations.
3660 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3662         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3663         (binding_depth): Unconditionally define.
3664         (is_class_level): Likewise.
3665         (indent): Likewise.  Take an indenting parameter.
3666         (push_binding_level): Remove conditional definittion.
3667         (pop_binding_level): Likewise.
3668         (suspend_binding_level): Likewise.
3669         (resume_binding_level): Likewise.
3670         (pushlevel): Likewise.
3671         (pushlevel_class): Likewise.
3672         (poplevel_class): Likewise.
3673         (pop_everything): Likewise.
3675 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
3677         * name-lookup.h (global_scope_p): New macro.
3678         * decl.c (pop_binding_level): Use it.  Don't refer directly to
3679         global_binding_level.
3680         (suspend_binding_level): Likewise.
3681         (global_bindings_p): Likewise.
3682         (print_other_binding_stack): Likewise.
3683         (print_binding_stack): Likewise.
3684         (maybe_push_to_top_level): Likewise.
3685         (pushdecl_namespace_level): Likewise.
3686         (cxx_init_decl_processing): Likewise.
3687         (start_decl): Likewise.
3688         (cp_finish_decl): Likewise.
3689         (start_function): Likewise.
3690         (global_binding_level): Remove.
3692 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3694         * parser.c (cp_parser_explicit_instantiation): Restore old
3695         access before template instantiation.
3697 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
3699         * lang-specs.h: Use -o to specify preprocessor's output file.
3700         Make -no-integrated-cpp work when building PCH files.
3702 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3704         PR c++/10682
3705         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3706         check for implicitly created typedef to an enum.
3708 2003-05-21  Jason Merrill  <jason@redhat.com>
3710         * init.c (build_vec_delete): Copy the address into a temporary
3711         variable before calling build_vec_delete_1.
3712         * decl2.c (delete_sanity): Don't call stabilize_reference.
3714 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
3716         * pt.c (register_specialization): Update the decl's location,
3717         if necessary.
3718         (check_explicit_specialization): Likewise.
3720 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3722         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3724 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
3726         PR c++/9738
3727         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3728         if the old decl had instantiated DECL_RTL.
3729         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3731 2003-05-19  Matt Austern  <austern@apple.com>
3733         * lang-options.h: Document -Wno-invalid-offsetof
3734         * typeck.c (build_class_member_access_expr): Don't complain about
3735         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3737 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3739         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3740         (binding_entry_make): Make entry->chain NULL after getting an entry.
3741         fix the spelling of chain in a comment.
3742         (binding_table_free): speed up by having temporary variable.
3743         (binding_table_new): set table->chain to be NULL after allocating
3744         a table.
3745         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3746         binding->previous to NULL after getting an binding for speed.
3748 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3750         * cp-tree.h (struct lang_type_class): Replace data member tags
3751         with hash-table nested_udts.
3752         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3753         * class.c (unreverse_member_declarations): Don't touch
3754         CLASSTYPE_TAGS.
3755         (pushclass): Use cxx_remember_type_decls.
3756         * decl.c (struct cp_binding_level): Replace data member tags with
3757         hash-table type_decls.
3758         (pop_binding_level): Handle level->type_decls.
3759         (kept_level_p): Adjust.
3760         (poplevel): Remove unused local variable.
3761         (bt_print_entry): New function.
3762         (print_binding_level): Use it.
3763         (push_namespace): Build current_binding_level->type_decls.
3764         (maybe_process_template_type_declaration): Adjust.
3765         (pushtag): Likewise.
3766         (clear_anon_tags): Use binding_table_remove_anonymous_types.
3767         (gettags): Remove.
3768         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
3769         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
3770         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3771         (cxx_init_decl_processing): Build global_binding_level->type_decls.
3772         (store_parm_decls): Remove pointless code.
3773         * name-lookup.c (free_binding_entry): New variable.
3774         (ENTRY_INDEX): New macro.
3775         (struct binding_table_s): New datatype.
3776         (binding_entry_make): New function.
3777         (binding_entry_free): Likewise.
3778         (binding_table_construct): Likewise.
3779         (binding_table_free): Likewise.
3780         (binding_table_new): Likewise.
3781         (binding_table_expand): Likewise.
3782         (binding_table_insert): Likewise.
3783         (binding_table_find): Likewise.
3784         (binding_table_find_anon_type): Likewise.
3785         (binding_table_reverse_maybe_remap): Likewise.
3786         (binding_table_remove_anonymous_types): Likewise.
3787         (binding_table_foreach): Likewise.
3788         * name-lookup.h (binding_table): New type.
3789         (binding_entry): Likewise.
3790         (bt_foreach_proc): Likewise.
3791         (struct binding_entry_s): New datatype.
3792         (SCOPE_DEFAULT_HT_SIZE): New macro.
3793         (CLASS_SCOPE_HT_SIZE): Likewise.
3794         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3795         (NAMESPACE_STD_HT_SIZE): Likewise.
3796         (GLOBAL_SCOPE_HT_SIZE): Likewise.
3797         (binding_table_new): Declare.
3798         (binding_table_free): Likewise.
3799         (binding_table_insert): Likewise.
3800         (binding_table_find_anon_type): Likewise.
3801         (binding_table_reverse_maybe_remap): Likewise.
3802         (binding_table_remove_anonymous_types): Likewise.
3803         (binding_table_foreach): Likewise.
3804         (binding_table_find): Likewise.
3805         (cxx_remember_type_decls): Likewise.
3806         * pt.c (bt_instantiate_type_proc): New function.
3807         (do_type_instantiation): Use it.
3808         * search.c (lookup_field_r): Use binding_table_find.
3810 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3812         * semantics.c (perform_deferred_access_checks): Don't discard
3813         checked access.
3815 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3817         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3818         libiberty VA_ macros, always use stdarg.
3819         * rtti.c (create_pseudo_type_info): Likewise.
3820         * tree.c (build_min_nt, build_min): Likewise.
3822 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3824         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3825         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3826         collapse multiple function calls into one.
3827         * tree.c (debug_binfo): Likewise.
3829 2003-05-15  Jason Merrill  <jason@redhat.com>
3831         PR c++/5388
3832         * call.c (conditional_conversion): Don't consider implicit
3833         conversions if T2 is a base of T1.
3834         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3835         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3837         * parser.c (cp_parser_primary_expression): Convert a static data
3838         member from reference.
3840 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
3842         * call.c (build_op_delete_call): Avoid creating unnecessary types.
3843         * class.c (instantiate_type): Remove tests for tf_no_attributes.
3844         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3845         (COMPARE_NO_ATTRIBUTES): Remove.
3846         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3848         PR c++/8385
3849         * semantics.c (finish_typeof): Refine type-dependency check.
3851 2003-05-13  Jason Merrill  <jason@redhat.com>
3853         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3854         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3856 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3858         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3860 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3862         PR c++/10230, c++/10481
3863         * semantics.c (finish_non_static_data_member): Handle when the
3864         non-static member is not from a base of the current class type.
3866 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3868         PR c++/10552
3869         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3870         template and has dependent context.
3872 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3874         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3876 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3878         PR c++/9252
3879         * cp-tree.h (saved_scope): Remove check_access field.
3880         (tsubst_flags_t): Remove tf_parsing.
3881         * decl.c (maybe_push_to_top_level): Don't initialize
3882         scope_chain->check_access.
3883         (make_typename_type, make_unbound_class_template): Don't use
3884         tf_parsing.
3885         (register_dtor_fn): Use push/pop_deferring_access_checks
3886         instead of scope_chain->check_access.
3887         * method.c (use_thunk): Likewise.
3888         * parser.c (cp_parser_explicit_instantiation
3889         (cp_parser_constructor_declarator_p): Don't call
3890         push/pop_deferring_access_checks here.
3891         (cp_parser_template_argument, cp_parser_class_name): Don't use
3892         tf_parsing.
3893         (yyparse): Check flag_access_control.
3894         * pt.c (instantiate_class_template): Call
3895         push/pop_deferring_access_checks.
3896         * semantics.c (push_deferring_access_checks): Propagate
3897         dk_no_check.
3898         (perform_or_defer_access_check): Make sure basetype_path is
3899         a type before comparison.
3900         * call.c (build_op_delete_call, build_over_call): Use
3901         perform_or_defer_access_check.
3902         * class.c (alter_access): Likewise.
3903         * init.c (build_offset_ref): Likewise.
3904         * lex.c (do_identifier): Likewise.
3905         * method.c (hack_identifier): Likewise.
3906         * search.c (lookup_member): Likewise.
3907         * semantics.c (finish_non_static_data_member): Likewise.
3908         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3909         instead of flag_access_control.
3911 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3913         PR c++/9554
3914         * parser.c (cp_parser_class_name): Remove check_access parameter.
3915         All caller adjusted.  Update declaration.
3916         (cp_parser_lookup_name): Likewise.
3917         * semantics.c (push_deferring_access_checks): Change parameter type
3918         to enum deferring_kind.  All caller adjusted.
3919         (resume_deferring_access_checks): Adjust to use new enum.
3920         (stop_deferring_access_checks): Likewise.
3921         (perform_or_defer_access_check): Likewise.
3922         * cp-tree.h (deferring_kind): New enum.
3923         (deferred_access): Adjust field type.
3924         (push_deferring_access_checks): Update declaration.
3926 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3928         PR c++/10555, c++/10576
3929         * pt.c (lookup_template_class): Handle class template with
3930         multiple levels of parameters when one of the levels contain
3931         errors.
3933 2003-05-08  Jason Merrill  <jason@redhat.com>
3935         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3936         expression.  Undo some of the recent reorg.
3938 2003-05-07  Richard Henderson  <rth@redhat.com>
3940         PR c++/10570
3941         * cfns.gperf: Comment out POSIX thread cancellation points,
3942         plus abort and raise.
3943         * cfns.h: Regenerate.
3945 2003-05-07  Jason Merrill  <jason@redhat.com>
3947         * call.c (build_conditional_expr): Don't assume that the folded
3948         expression has result_type.
3950 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3952         * typeck.c (build_unary_op): Deal with const qualifier in
3953         invalid pointer-to-member earlier.
3955 2003-05-05  Jason Merrill  <jason@redhat.com>
3957         PR c++/9537
3958         * call.c (conditional_conversion): Build an RVALUE_CONV if
3959         we're just changing the cv-quals.
3960         (build_conditional_expr): Don't call convert to change
3961         cv-quals.
3963 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3965         PR c++/10496
3966         * typeck.c (build_unary_op): Don't output const qualifier when
3967         output invalid pointer-to-member diagnostics.
3969 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3971         * decl.c: Fix typos.
3973 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3975         PR c++/4494
3976         * decl.c (start_function): Use same_type_p to check return type
3977         of main.
3979 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
3981         PR c/10604
3982         * cp/typeck.c (build_x_compound_expr): No need to check
3983         extra_warnings as well as warn_unused_value.
3985 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3987         PR c++/9364, c++/10553, c++/10586
3988         * decl.c (make_typename_type): Don't crash on illegal code.
3990 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3992         * class.c (finish_struct): Use location_t and input_location
3993         directly.
3994         * decl.c (make_label_decl): Likewise.
3995         (use_label): Likewise.
3996         * decl2.c (warn_if_unknown_interface): Likewise.
3997         (start_static_initialization_or_destruction): Likewise.
3998         (generate_ctor_or_dtor_function): Likewise.
3999         (finish_file): Likewise.
4000         * error.c (print_instantiation_full_context): Likewise.
4001         * init.c (create_temporary_var): Likewise.
4002         * method.c (synthesize_method): Likewise.
4003         * parser.c (cp_token): Likewise.
4004         (cp_lexer_set_source_position_from_token): Likewise.
4005         (cp_lexer_get_preprocessor_token): Likewise.
4006         (cp_parser_statement): Likewise.
4007         * pt.c (tsubst_friend_function): Likewise.
4008         (instantiate_class_template): Likewise.
4009         (tsubst_decl): Likewise.
4010         (tsubst): Likewise.
4011         (instantiate_decl): Likewise.
4012         * semantics.c (begin_class_definition): Likewise.
4013         (expand_body): Likewise.
4015 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4017         * class.c (finish_struct): Rename lineno to input_line.
4018         * decl.c (push_binding_level, pop_binding_level,
4019         suspend_binding_level, resume_binding_level, make_label_decl,
4020         use_label, start_function): Likewise.
4021         * decl2.c (warn_if_unknown_interface,
4022         start_static_initialization_or_destruction,
4023         generate_ctor_or_dtor_function, finish_file): Likewise.
4024         * error.c (cp_line_of, print_instantiation_full_context,
4025         print_instantiation_context): Likewise.
4026         * except.c (check_handlers_1, check_handlers): Likewise.
4027         * init.c (create_temporary_var): Likewise.
4028         * method.c (use_thunk, synthesize_method): Likewise.
4029         * parser.c (cp_lexer_set_source_position_from_token,
4030         cp_lexer_get_preprocessor_token): Likewise.
4031         * pt.c (push_tinst_level, pop_tinst_level,
4032         tsubst_friend_function, instantiate_class_template, tsubst_decl,
4033         tsubst, tsubst_expr, instantiate_decl): Likewise.
4034         * semantics.c (genrtl_try_block, finish_label_stmt,
4035         begin_class_definition, expand_body,
4036         genrtl_finish_function): Likewise.
4037         * tree.c (build_min_nt, build_min): Likewise.
4039 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
4041         * decl2.c (comdat_linkage): Don't externalize explicit
4042         instantiations.
4044 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4046         PR c++/10554
4047         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4048         is not NULL.
4050 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
4052         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
4053         (struct lang_identifier): ... to here.
4054         (LANG_ID_FIELD): Remove.
4055         (SET_LANG_ID): Remove.
4056         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4057         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4058         (IDENTIFIER_IMPLICIT_DECL): Likewise.
4059         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4060         (IDENTIFIER_ERROR_LOCUS): Likewise.
4061         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4063 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4065         PR c++/8772
4066         * pt.c (convert_template_argument): Correct diagnostic.
4068 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4070         PR c++/9432, c++/9528
4071         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4073 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
4075         * decl.c (check_previous_goto_1): Adjust prototype.
4076         (check_previous_goto): Adjust use.
4077         (check_switch_goto): Likewise.
4078         (use_label): Adjust.
4079         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4080         (struct named_label_use_list): Use location_t datatype.
4082 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4084         PR c++/10551
4085         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4086         that have not yet been written out.
4088 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4090         PR c++/10549
4091         * class.c (layout_class_type): Mark overlong bitfields as having
4092         the maximum size permitted by their type, after layout.
4094         PR c++/10527
4095         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4097 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4099         * call.c (build_operator_new_call): Fix typo.
4100         * lang-options.h: Likewise.
4102 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4104         PR c++/10515
4105         * cp-tree.h (lookup_field_1): Declare it.
4106         * search.c (lookup_field_1): Make it public.
4107         * decl.c (reshape_init): Handle designated initializers.
4109         * decl.c (maybe_commonize_var): Further tweak support for systems
4110         without weak symbols.
4112 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
4114         * decl.c (maybe_commonize_var): Fix thinko in last patch.
4116 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
4118         PR c++/10506
4119         * method.c (use_thunk): Decrement immediate_size_expand.
4121         PR c++/10503
4122         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4123         (DECL_MAYBE_TEMPLATE): Remove.
4124         * class.c (fixed_type_or_null): Avoid infinite recursion.
4126         * decl.c (maybe_commonize_var): Make the code match the comments.
4127         * pt.c (instantiate_decl): Move call to import_export_decl.
4129 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
4131         * decl2.c (finish_file): Fix merge botch.
4133 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
4135         * decl2.c (finish_file): Don't call import_export_decl for
4136         functions that are not defined.
4137         (handle_class_head): Robustify.
4138         * pt.c (instantiate_decl): Do not call cp_finish_decl for
4139         variables that are not defined.
4141 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
4143         * call.c (print_z_candidates): Fix off by one error.
4145 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
4147         PR c++/10337
4148         * call.c (joust): Don't warn about conversion ops that are exact
4149         or cv-conversions. Rearrange to avoid multiple type comparisons.
4151 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
4153         PR c++/10471
4154         * call.c (build_cxx_call): Robustify.
4156 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
4158         * Make-lang.in (lex.o): Remove mbchar.h.
4159         * lex.c (MULTIBYTE_CHARS): Lose.
4160         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4161         in c-lex.c.
4163 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
4165         PR c++/9847
4166         * cp-tree.h (duplicate_tag_error): Remove.
4167         * class.c (duplicate_tag_error): Remove.
4168         * semantics.c (begin_class_definition): Return immediately for a
4169         duplicate class definition.
4171         PR c++/10451
4172         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4174 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
4176         PR c++/10446
4177         * search.c (lookup_fnfields_1): Handle empty slots in the method
4178         vector.
4180         PR c++/10428
4181         * decl.c (check_elaborated_type_specifier): New function, split
4182         out from ...
4183         (xref_tag): ... here.  Use the new function in more places.
4185         * rtti.c (throw_bad_typeid): Use build_cxx_call.
4187 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
4189         * call.c (build_over_call): Use build_cxx_call.
4190         (build_cxx_call): New method, split out of build_over_call.
4191         * cp-tree.h (language_function): Add can_throw.
4192         (build_cxx_call): Declare it.
4193         * decl.c (finish_function): If a function does not contain any
4194         calls to functions that can throw an exception, indicate that
4195         fact.
4196         * decl2.c (mark_used): Do not defer the instantiation of
4197         functions, if the current function does not throw.
4198         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4199         * pt.c (instantiate_decl): Make sure import_export_decl is called
4200         before emitting things.
4201         * rtti.c (throw_bad_cast): Use build_cxx_call.
4202         (build_dynamic_cast_1): Likewise.
4203         * typeck.c (build_function_call): Likewise.
4205 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
4207         PR c++/9881
4208         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4209         expressions. Reverts my 2002-08-08 patch.
4211         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4212         cheaper early exit.
4214 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4216         * cp/decl2.c (start_static_storage_duration_function): Take count
4217         arg, don't check if it wraps round.
4218         (generate_ctor_or_dtor_function): Add locus arg, use it.
4219         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4220         locus.
4221         (finish_file): Set line numbers to past EOF for synthesized
4222         functions.
4224 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4226         PR c++/10405
4227         * search.c (lookup_field_1): Final scan goes backwards for
4228         types, forwards for non-types.
4230 2003-04-17  Roger Sayle  <roger@eyesopen.com>
4232         PR c/10375
4233         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4234         "nothrow" function attributes.
4236 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4238         PR c++/10347
4239         * pt.c (type_dependent_expression_p): Handle array new.
4241 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
4243         PR c++/10381
4244         * parser.c (cp_parser_primary_expression): Reorganize logic for
4245         dealing with name lookup failures.
4247 2003-04-15  Jason Merrill  <jason@redhat.com>
4249         * decl2.c (mark_used): Don't instantiate anything if
4250         skip_evaluation.
4252 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
4254         * tree.c (build_cplus_array_type_1): Do not call
4255         uses_template_parms() on a NULL index_type.
4257 2003-04-13  Roger Sayle  <roger@eyesopen.com>
4259         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4261 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
4263         PR c++/10300
4264         * init.c (build_new_1): Reorganize.
4266 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4268         * class.c (initialize_array)
4269         * decl.c (reshape_init)
4270         * decl2.c (build_expr_from_tree)
4271         * init.c (build_zero_init)
4272         * pt.c (tsubst_copy, tsubst_copy_and_build)
4273         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4274         (ptm_initializer, class_initializer, get_pseudo_ti_init)
4275         * semantics.c (finish_compound_literal)
4276         * typeck.c (build_ptrmemfunc1)
4277         * typeck2.c (store_init_value, process_init_constructor)
4278         (build_functional_cast): Use build_constructor.
4280 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4282         * call.c (print_z_candidates): Use gcc_gettext_width, not
4283         strlen, to determine how much padding to use.
4285 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
4287         * decl.c: Update all calls to shadow_warning.
4289 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
4291         * class.c (layout_class_type): Correct handling for overlong
4292         bit-fields whose width is the same as an integer type.
4294 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
4296         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4297         * cp-lang.c (cp_tree_size): New function.
4298         (LANG_HOOKS_TREE_SIZE): Override.
4300         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4301         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4302         (union lang_tree_node): Remove common and srcloc members.
4303         (build_srcloc_here): Don't prototype.
4304         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4305         * pt.c (pending_templates): Correct comment.
4306         * tree.c (build_srcloc, build_srcloc_here): Kill.
4308 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
4310         * call.c: Include intl.h.
4311         (print_z_candidate): Always use inform; get rid of errfn
4312         argument. Reorganize so that all the strings get picked up
4313         by xgettext.  Note obligation of caller to pass first argument
4314         through gettext.
4315         (print_z_candidates): Update to match.  Indent second and
4316         successive candidates by strlen() of translated message.
4317         (joust): Restructure ambiguous-conversion pedwarn so that
4318         translators see a complete sentence.  Update calls to
4319         print_z_candidate.
4321         * Make-lang.in (cp/call.o): Update dependencies.
4323 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4325         * decl.c (set_current_binding_level): Delete, revert last change.
4326         (current_binding_level): Modify to allow it as as lvalue.
4328 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4330         * name-lookup.c (find_binding): Pass appropriate pointer type to
4331         POP_TIMEVAR_AND_RETURN.
4333 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4335         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4336         * cp-tree.h: Don't insist on having GNUC.
4338 2003-04-03  Jason Merrill  <jason@redhat.com>
4340         * cvt.c (ocp_convert): Only abort if we try to convert an object
4341         of TREE_ADDRESSABLE type.
4343         * class.c (build_vtable): Set DECL_ALIGN here.
4344         (get_vtable_decl): Not here.
4345         (layout_vtable_decl): Or here.
4346         (create_vtable_ptr): Or here.
4347         (layout_class_type): Or here.
4348         (check_bitfield_decl): Don't mess with field alignment.
4350 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4352         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4353         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4354         * rtti.c (dfs_class_hint_mark): Likewise.
4356         * decl.c (push_local_name, push_class_level_binding,
4357         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4358         functions returning void.
4359         * decl2.c (add_using_namespace): Likewise.
4361         * decl.c (print_binding_level, print_other_binding_stack,
4362         print_binding_stack): Cast argument of %p specifier to void*.
4363         * ptree.c (cxx_print_decl): Likewise.
4365         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4366         VAR_FUNCTION_OR_PARM_DECL_CHECK,
4367         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4368         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4369         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4371         * decl.c (set_current_binding_level): New macro.  Use throughout
4372         when setting the current binding level.
4374         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4375         in enum.
4376         * method.c (mangling_flags): Likewise.
4378         * cp-tree.h (lang_type_header): Add __extension__ and use
4379         CHAR_BITFIELD for members.
4381 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
4383         PR other/9274
4384         * mangle.c: Include gt-cp-mangle.h.
4385         (subst_identifiers): Mark with GTY.
4386         * config-lang.in (gtfiles): Add cp/mangle.c.
4387         * Make-lang.in: (gt-cp-mangle.h): New rule.
4388         (cp/mangle.o): Depends on gt-cp-mangle.h.
4390 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
4392         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4393         after \$(srcdir)/cp/name-lookup.h.
4394         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4395         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
4396         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4397         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4399 2003-03-31  Jason Merrill  <jason@redhat.com>
4401         PR java/10145
4402         * class.c (check_field_decl): Don't set DECL_ALIGN.
4404 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
4406         PR c++/7647
4407         * decl.c (grokdeclarator): Tidy, slightly.
4408         * search.c (lookup_field_1): Add want_type parameter.
4409         (lookup_field_r): Adjust call to lookup_field_1.
4411 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4413         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4415 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
4417         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
4418         prototype.
4419         (cxx_scope_find_binding_for_name): Likewise.
4420         * decl.c (find_binding: Move to name-lookup.c.
4421         (binding_for_name): Likewise.
4422         (cxx_scope_find_binding_for_name): Likewise.
4423         (BINDING_LEVEL):  Remove.
4424         (push_binding): Tidy.
4425         (push_class_binding): Likewise.
4426         (pop_binding): Likewise.
4427         (poplevel): Likewise.
4428         (poplevel_class): Likewise.
4429         (set_identifier_type_value_with_scope): Likewise.
4430         (push_overloaded_decl): Likewise.
4431         (lookup_tag): Likewise.
4432         (unqualified_namespace_lookup): Likewise.
4433         (lookup_name_current_level): Likewise.
4434         (maybe_inject_for_scope_var): Likewise.
4435         (namespace_binding): Move to name-lookup.c.
4436         (set_namespace_binding): Likewise.
4437         * decl2.c (lookup_using_namespace): Tidy.
4438         (qualified_lookup_using_namespace): Likewise.
4439         (do_toplevel_using_decl): Likewise.
4440         * name-lookup.c: Include "timevar.h"
4441         * name-lookup.h (cxx_scope):  Declare.
4442         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
4443         member declaration.
4444         (BINDING_SCOPE): Adjust definition.
4445         (BINDING_HAS_LEVEL_P): Remove.
4447 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4449         * name-lookup.c: New file.
4450         * name-lookup.h: Likewise..
4451         * decl.c (push_binding): Adjust use cxx_binding_make.
4452         (free_bindings): Move to name-lookup.c
4453         (pop_binding): Use cxx_binding_free.
4454         (binding_for_name): Tidy.
4455         * cp-tree.h: Include "name-lookup.h"
4456         (cxx_binding_make): Move to name-lookup.h
4457         (cxx_binding_clear): Likewise.
4458         (struct cxx_binding): Likewise.
4459         (LOCAL_BINDING_P): Likewise.
4460         (INHERITED_VALUE_BINDING_P): Likewise.
4461         (BINDING_SCOPE): Likewise.
4462         (BINDING_HAS_LEVEL_P): Likewise.
4463         (BINDING_VALUE): Likewise.
4464         (BINDING_TYPE): Likewise.
4465         * config-lang.in (gtfiles): Add cp/name-lookup.h
4466         * Make-lang.in (cp/name-lookup.o): New rule.
4467         (CXX_OBJS): Add cp/name-lookup.o
4468         (CXX_TREE_H): Add cp/name-lookup.h
4470 2003-03-28  Jason Merrill  <jason@redhat.com>
4472         PR c++/10245
4473         * cvt.c (force_rvalue): New fn.
4474         * call.c (build_conditional_expr): Use it.
4475         * cp-tree.h: Declare it.
4477 2003-03-28  Mike Stump  <mrs@apple.com>
4479         * error.c (dump_expr): Add 0x to printed hex numbers to make
4480         output match source code better.
4482 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
4484         PR c++/10218
4485         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4486         definitions.
4488         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4489         non-existant ssdf_decls array.
4490         (finish_file): Call generator_ctor_or_dtor_function when there are
4491         static constructors or destructors and no other static
4492         initializations.
4494 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
4496         PR c++/10047
4497         * decl2.c (finish_file): Don't warn about explicitly instantiated
4498         inline decls.
4500 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4502         PR c++/10224
4503         * pt.c (lookup_template_class): Only check instantiated args if
4504         they do not contain template parameters.
4506 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4508         PR c++/10158
4509         * parser.c (cp_parser_function_definition): Set
4510         DECL_INITIALIZED_IN_CLASS for members.
4511         * pt.c (instantiate_decl): Only reduce the template args for
4512         friends that are not defined in class.
4514 2003-03-25  Jason Merrill  <jason@redhat.com>
4516         * call.c (print_z_candidate): Change name of first arg to msgid.
4517         (joust): Add comment for translators.
4519 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4521         PR c++/9898, PR c++/383, DR 322
4522         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4523         through reference types on both PARM and ARG.
4525 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4527         PR c++/10119
4528         * error.c (dump_expr) <BASELINK>: Use dump_expr.
4529         * pt.c (maybe_fold_nontype_args): New function.
4530         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4531         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4532         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4533         maybe_fold_nontype_args.
4535 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4537         PR c++/10026
4538         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4540 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
4542         PR c++/7086
4543         * typeck.c (cxx_mark_addressable):  Adjust call to
4544         gen_mem_addressof or put_var_into_stack.
4546 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
4548         PR c++/9978, c++/9708
4549         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4550         * call.c (add_template_candidate_real): Adjust
4551         instantiate_template call.
4552         * class.c (resolve_address_of_overloaded_function): Likewise.
4553         * decl.c (build_enumerator): Set TREE_CONSTANT.
4554         * pt.c (check_instantiated_args): New.
4555         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4556         TREE_READONLY.
4557         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4558         (reduce_template_parm_level): Likewise.
4559         (process_template_parm): Likewise.
4560         (check_explicit_specialization): Adjust instantiate_template call.
4561         (convert_template_argument): Don't check non-type argument here.
4562         (lookup_template_class): Check them here.
4563         (tsubst_friend_function): Adjust instantiate_template call.
4564         (instantiate_template): Add tsubst_flags parameter, use it. Check
4565         instantiated args.
4567 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
4569         * decl.c: Update calls to shadow_warning.
4571 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
4573         PR c++/9898
4574         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4575         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4577 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
4579         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4580         friends.
4581         * cp/pt.c (instantiate_class_template): Fix formatting.
4583 2003-03-14  Matt Austern  <austern@apple.com>
4585         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4586         (unemitted_tinfo_decl_p): Remove.
4587         (emit_tinfo_decl): Change declaration to remove unused parameter.
4588         * decl2.c (finish_file): Change tinfo emission to loop through
4589         unemitted_tinfo_decls array instead of looping through all decls.
4590         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4591         unused second parameter.
4592         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4593         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4594         (emit_tinfo_decl): remove unused second parameter, add assertion
4595         that decl hasn't already been emitted.
4597 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
4599         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4600         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4601         return statements.
4603 2003-03-19  Jason Merrill  <jason@redhat.com>
4605         PR c++/8316, c++/9315, c++/10136
4606         * call.c (print_z_candidate): Split out from...
4607         (print_z_candidiates): ...here.
4608         (joust): Use it.
4610 2003-03-17  Roger Sayle  <roger@eyesopen.com>
4612         PR c++/10031
4613         * decl.c (duplicate_decls): Use the new type when prototyping
4614         anticipated decls, even when the types match.  This defines the
4615         exception list for the built-in function.
4617 2003-03-17  Jason Merrill  <jason@redhat.com>
4619         PR c++/10091
4620         * typeck.c (build_class_member_access_expr): Compare
4621         TYPE_MAIN_VARIANTs.
4623 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
4625         PR c++/9639
4626         * parser.c (cp_parser_declarator_id): Clear parser->scope.
4628 2003-03-16  Jason Merrill  <jason@redhat.com>
4630         PR c++/9993
4631         * decl.c (finish_function): Only allow the NRVO to use variables
4632         declared at function scope.
4634 2003-03-17  Andreas Jaeger  <aj@suse.de>
4636         * Make-lang.in (cp/TAGS): Remove.
4638 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4640         PR c++/9629
4641         * cp-tree.h (struct language_function): Add in_base_initializer.
4642         (in_base_initializer): define it.
4643         (expand_member_init): Remove INIT param.
4644         * init.c (expand_member_init): Remove INIT param, return the member.
4645         (emit_mem_initializers): Set in_base_initializer.
4646         * class.c (build_base_path): Check in_base_initializer.
4647         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4648         * pt.c (tsubst_initializer_list): Likewise.
4650 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
4652         * decl.c (binding_for_name): Fix initialization thinko.
4654 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
4656         Compile-time improvement: 2/n.
4657         * cp-tree.h (struct cxx_binding): New datatype;
4658         (struct lang_identifier): Use it.
4659         (LOCAL_BINDING_P): Adjust definition.
4660         (INHERITED_VALUE_BINDING_P): Likewise.
4661         (BINDING_SCOPE): Likewise.
4662         (BINDING_HAS_LEVEL_P): Likewise.
4663         (BINDING_VALUE): Likewise.
4664         (BINDING_TYPE): Likewise.
4665         (IDENTIFIER_VALUE): Likewise.
4666         (struct tree_binding): Remove.
4667         (TS_CP_BINDING): Likewise.
4668         ((union lang_tree_node): Remove field "binding".
4669         (cxx_binding_clear): New macro.
4670         (binding_for_name): Adjust return type.
4671         (qualified_lookup_using_namespace): Adjust prototype.
4672         (lookup_using_namespace): Adjust prototype.
4673         (cxx_scope_find_binding_for_name): Declare.
4674         * cp-tree.def: Remove CPLUS_BINDING definition.
4675         * decl.c (push_binding): Adjust local variable type.
4676         (add_binding): Likewise.
4677         (push_class_binding): Likewise.
4678         (pop_binding): Likewise.
4679         (poplevel): Likewise.
4680         (poplevel_class): Likewise.
4681         (free_bindings):  Adjust type.
4682         (find_binding): Adjust return type, add a third parameter. Remove
4683         non-useful assertion now that we use static typing.
4684         (cxx_scope_find_binding_for_name): New function.
4685         (binding_for_name): Use it.  Adjust local variable type. Simplify.
4686         (namespace_binding):  Simplify.
4687         (set_namespace_binding): Likewise.
4688         (set_identifier_type_value_with_scope): Adjust local variable type.
4689         (lookup_tag): Don't type-abuse of local variable 'old'.
4690         (lookup_namespace_name): Likewise.  Allocate binding on stack.
4691         (select_decl): Adjust prototype.
4692         (unqualified_namespace_lookup):  Allocate binding on stack.
4693         Don't type-abuse of local variable 'val'.
4694         (lookup_name_real): Likewise.
4695         (maybe_inject_for_scope_var): Adjust local variable type.
4696         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4697         (namespace_binding): Adjust logic, simplify.
4698         (BINDING_LEVEL): Adjust definition.
4699         (push_class_level_binding): Adjust local variable type.
4700         (struct cxx_saved_binding): Adjust field 'binding' type.
4701         * decl2.c (ambiguous_decl): Adjust prototype.
4702         (lookup_using_namespace): Adjust local variable type.
4703         (qualified_lookup_using_namespace): Catch type error and correct
4704         ensueing logic error.
4705         (do_nonmember_using_decl): Adjust local variable type.  Allocate
4706         temporary cxx_binding on stack.
4707         (do_toplevel_using_decl): Adjust local variable type.
4708         * ptree.c (cxx_print_cxx_binding): New function.
4709         (cxx_print_identifier): Use it.
4710         (cxx_print_xnode): Delete CPLUS_BINDING case label.
4712 2003-03-15  Roger Sayle  <roger@eyesopen.com>
4714         * tree.c (count_functions): Fix whitespace.
4716 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
4718         * Make-lang.in: Update.
4720 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4722         PR c++/6440
4723         * pt.c (maybe_process_partial_specialization): Handle
4724         member class template when enclosing class template is
4725         explicit specialized.
4726         (most_general_template): Stop looking when DECL is already
4727         specialized.
4729 2003-03-13  Jason Merrill  <jason@redhat.com>
4731         PR c++/9420
4732         * search.c (lookup_conversions): Call complete_type here.
4733         * call.c (implicit_conversion): Not here.
4735 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
4737         * decl2.c (do_nonmember_using_decl): Correct handling of
4738         simultaneous type/non-type bindings.
4740         * call.c (initialize_reference): Remove bogus assertion.
4741         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4743 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
4745         PR c++/7050
4746         * expr.c (cxx_expand_expr): Return const0_rtx for throw
4747         expressions.
4749 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4751         PR c++/9474
4752         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4753         to merge old and new declarations.
4755 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
4757         * g++.1: Remove.
4758         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4759         (cp/g++.1): Build it from scratch in the build tree.
4760         (c++.install-man): Depend on it.  Install it from the build tree.
4761         (c++.mostlyclean): Clean it.
4763 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4765         PR c++/9474
4766         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4767         to merge old and new declarations.
4769         PR c++/9924
4770         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4772 2003-03-11  Jason Merrill  <jason@redhat.com>
4774         PR c++/9820
4775         * search.c (lookup_member): Fix handling of functions in a class
4776         being defined.
4778 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4780         PR c++/8700
4781         * call.c (convert_class_to_reference): Adjust usage of
4782         splice_viable.
4783         (any_viable): Remove.
4784         (splice_viable): Combine with any_viable.
4785         (print_z_candidates): Avoid printing duplicates.
4786         (build_user_type_conversion_1): Adjust usage of splice_viable.
4787         (build_new_function_call): Likewise.
4788         (build_operator_new_call): Likewise.
4789         (build_object_call): Likewise.
4790         (build_conditional_expr): Likewise.
4791         (build_new_op): Likewise.
4792         (build_new_method_call): Likewise.
4793         (joust): Remove spurious comment.
4794         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4795         * decl2.c (arg_assoc_class): Simplify.
4796         * friend.c (add_friend): Likewise.
4798 2003-03-11  Jason Merrill  <jason@redhat.com>
4800         PR c++/8660
4801         * decl2.c (check_classfn): A member template only matches a
4802         member template.
4804 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
4806         * Make-lang.in (CXX_C_OBJS): Update.
4807         * lang-specs.h: Don't define __GNUG__ here.
4809 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
4811         * call.c (perform_overload_resolution): New function.
4812         (build_new_function_call): Use it.
4813         (build_operator_new_call): Likewise.
4814         (add_candidates): Add explicit_targs and template_only parameters.
4815         (build_new_op): Adjust accordingly.
4816         * cp-tree.h (build_operator_new_call): New function.
4817         (build_function_call_real): Remove.
4818         (build_function_call_maybe): Likewise.
4819         * init.c (build_new_1): Use build_operator_new_call.
4820         * typeck.c (build_function_call_real): Rename to ...
4821         (build_function_call): ... this.
4823 2003-03-10  Devang Patel  <dpatel@apple.com>
4825         PR c++/9394
4826         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4828 2003-03-10  Jason Merrill  <jason@redhat.com>
4830         PR c++/9798
4831         * decl.c (push_using_directive): Push before recursing.
4833         PR c++/9868, c++/9524
4834         * call.c (resolve_scoped_fn_name): Handle the case of a function
4835         pointer member.
4837         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4838         argument in the pointer-to-member case.
4840 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
4842         PR c++/9373
4843         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4844         pointers to member functions.
4846         PR c++/8534
4847         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4848         in pointer-to-member-function types.
4850 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4852         * expr.c (cplus_expand_constant): Use C90 prototype style.
4853         (cxx_expand_expr): Likewise.
4855 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4857         PR c++/9970
4858         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4859         functions.
4861 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
4863         * lang-specs.h (c++-header): Change .pch to .gch.
4865 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
4867         * cp-tree.h (cxx_init): Update prototype.
4868         * lex.c (cxx_init): Similarly.
4870 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
4872         PR c++/9823
4873         * cp-tree.h (begin_mem_initializers): Remove.
4874         * parser.c (cp_parser_mem_initializer_list): Inline it here.
4875         Do not call finish_mem_initializers if not in a constructor.
4876         (cp_parser_class_head): Fix typo in error message.
4877         * semantics.c (begin_mem_initializers): Remove.
4878         * testsuite/g++.dg/parser/constructor1.C: New test.
4880         PR c++/9809
4881         * call.c (add_function_candidate): Skip builtin fuctions that have
4882         not yet been declared.
4884         PR c++/9982
4885         * init.c (build_new_1): Correct logic for determining whether or
4886         not to use an array cookie.
4888         PR c++/9524
4889         * parser.c (cp_parser_postfix_expression): Call
4890         finish_non_static_data_member, even when processing_template_decl.
4892         PR c++/9912
4893         * cp-tree.h (is_ancestor): New function.
4894         (handle_class_head): Change prototype.
4895         * decl2.c (is_namespace_ancestor): Rename to ...
4896         (namespace_anecestor): ... this.
4897         (set_decl_namespace): Adjust accordingly.
4898         (handle_class_head): Remove unnecessary parameters.
4899         * parser.c (cp_parser_class_head): Check that
4900         nested-name-specifiers are used appropriately.
4902 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
4904         * call.c (reference_binding): Remove REF_IS_VAR parameter.
4905         (implicit_conversion): Adjust call to reference_binding.
4906         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4907         (initialize_reference): Adjust handling for references bound to
4908         rvalues.
4909         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4910         prototype.
4911         (real_non_cast_lvalue_p): New method.
4912         * cvt.c (build_up_reference): Adjust use of
4913         make_temporary_var_for_ref_to_temp.
4914         * tree.c (real_non_cast_lvalue_p): New method.
4916 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4918         * except.c (init_exception_processing): Use C90 prototype style.
4919         (cp_protect_cleanup_actions): Likewise.
4920         (prepare_eh_type): Likewise.
4921         (build_eh_type_type): Likewise.
4922         (build_exc_ptr): Likewise.
4923         (do_begin_catch): Likewise.
4924         (dtor_nothrow): Likewise.
4925         (do_end_catch): Likewise.
4926         (push_eh_cleanup): Likewise.
4927         (decl_is_java_type): Likewise.
4928         (choose_personality_routine): Likewise.
4929         (initialize_handler_parm): Likewise.
4930         (expand_start_catch_block): Likewise.
4931         (expand_end_catch_block): Likewise.
4932         (begin_eh_spec_block): Likewise.
4933         (finish_eh_spec_block): Likewise.
4934         (do_allocate_exception): Likewise.
4935         (do_free_exception): Likewise.
4936         (wrap_cleanups_r): Likewise.
4937         (stabilize_throw_expr): Likewise.
4938         (build_throw): Likewise.
4939         (complete_ptr_ref_or_void_ptr_p): Likewise.
4940         (is_admissible_throw_operand): Likewise.
4941         (nothrow_libfn_p): Likewise.
4942         (can_convert_eh): Likewise.
4943         (check_handlers_1): Likewise.
4944         (check_handlers): Likewise.
4946 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4948         * call.c (merge_conversion_sequences): New function.
4949         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4950         (convert_class_to_reference): Correct handling of second
4951         standard conversion sequence in a user-defined conversion
4952         sequence.
4953         (build_user_type_conversion_1): Use merge_conversion_sequences.
4954         * cp-tree.def: Add comments for CONV nodes.
4955         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4957 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4959         * error.c (init_error): Use C90 prototype style.
4960         (dump_scope): Likewise.
4961         (dump_qualifiers): Likewise.
4962         (dump_template_argument): Likewise.
4963         (dump_template_argument_list): Likewise.
4964         (dump_template_parameter): Likewise.
4965         (dump_template_bindings): Likewise.
4966         (dump_type): Likewise.
4967         (dump_typename): Likewise.
4968         (class_key_or_enum): Likewise.
4969         (dump_aggr_type): Likewise.
4970         (dump_type_prefix): Likewise.
4971         (dump_type_suffix): Likewise.
4972         (dump_global_iord): Likewise.
4973         (dump_simple_decl): Likewise.
4974         (dump_decl): Likewise.
4975         (dump_template_decl): Likewise.
4976         (dump_function_decl): Likewise.
4977         (dump_parameters): Likewise.
4978         (dump_exception_spec): Likewise.
4979         (dump_function_name): Likewise.
4980         (dump_template_parms): Likewise.
4981         (dump_char): Likewise.
4982         (dump_expr_list): Likewise.
4983         (dump_expr): Likewise.
4984         (dump_binary_op): Likewise.
4985         (dump_unary_op): Likewise.
4986         (type_as_string): Likewise.
4987         (expr_as_string): Likewise.
4988         (decl_as_string): Likewise.
4989         (context_as_string): Likewise.
4990         (lang_decl_name): Likewise.
4991         (cp_file_of): Likewise.
4992         (cp_line_of): Likewise.
4993         (decl_to_string): Likewise.
4994         (expr_to_string): Likewise.
4995         (fndecl_to_string): Likewise.
4996         (code_to_string): Likewise.
4997         (language_to_string): Likewise.
4998         (parm_to_string): Likewise.
4999         (op_to_string): Likewise.
5000         (type_to_string): Likewise.
5001         (assop_to_string): Likewise.
5002         (args_to_string): Likewise.
5003         (cv_to_string): Likewise.
5004         (cxx_print_error_function): Likewise.
5005         (cp_diagnostic_starter): Likewise.
5006         (cp_diagnostic_finalizer): Likewise.
5007         (cp_print_error_function): Likewise.
5008         (function_category): Likewise.
5009         (print_instantiation_full_context): Likewise.
5010         (print_instantiation_partial_context): Likewise.
5011         (maybe_print_instantiation_context): Likewise.
5012         (print_instantiation_context): Likewise.
5013         (cp_printer): Likewise.
5014         (print_integer): Likewise.
5015         (print_non_consecutive_character): Likewise.
5016         (locate_error): Likewise.
5018 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
5020         PR c++/9965
5021         * call.c (reference_binding): Add ref_is_var parameter.
5022         (implicit_conversion): Adjust call to reference_binding.
5023         (initialize_reference): Likewise.
5025         PR c++/9400
5026         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5027         PARM_DECLs.
5029         PR c++/9791
5030         * class.c (get_basefndecls): Use lookup_fnfields_1.
5032 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5034         PR c++/9188
5035         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5036         in error message.
5037         (cp_parser_single_declaration): Likewise.
5039 2003-03-05  Jason Merrill  <jason@redhat.com>
5041         PR c++/9440
5042         * call.c (build_conditional_expr): Use convert rather than an
5043         explicit NOP_EXPR.
5045 2003-03-02  Matt Austern  <austern@apple.com>
5047         * decl.c (cp_binding_level): Add static_decls varray member.
5048         (add_decl_to_level): Add static/inline namespace scope
5049         declarations to static_decls array.
5050         (wrapup_global_for_namespace): Pass static_decls only, instead of
5051         all decls, to wrapup_global_declarations/check_global_declarations.
5052         (push_namespace): Initialize static_decls for ordinary namespaces.
5053         (cxx_init_decl_processing): Initialize static_decls for global
5054         namespace.
5056 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
5058         * class.c (end_of_class): Correct thinko.
5060 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
5062         * config-lang.in: Replace ${libstdcxx_version} by its value.
5064 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
5066         * cp-tree.h (cxx_saved_binding): Declare.
5067         (struct saved_scope): Adjust type of field 'old_binding'.
5068         * decl.c (cxx_saved_binding_make): New macro.
5069         (struct cxx_saved_binding): Define.
5070         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
5071         C++ bindings.
5072         (maybe_push_to_top_level): Adjust local variable type.
5073         (pop_from_top_level): Likewise.
5075 2003-03-04  Tom Tromey  <tromey@redhat.com>
5077         * Make-lang.in (c++.tags): New target.
5079 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
5081         * Make-lang.in: Update.
5083 2003-03-03  Jason Merrill  <jason@redhat.com>
5085         * decl.c (finish_enum): Do set the type in a template. Simplify.
5086         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5088 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
5090         PR c++/9878
5091         * call.c (convert_class_to_reference): Correct conversion
5092         sequences.
5093         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5094         (implicit_conversion): Adjust call to reference_binding.
5095         (add_candidate): Change type of candidates parameter.
5096         (add_function_candidate): Likewise.
5097         (add_conv_candidate): Likewise.
5098         (build_builtin_candidate): Likewise.
5099         (add_builtin_candidate): Likewise.
5100         (add_builtin_candidates): Likewise.
5101         (add_template_candidate_real): Likewise.
5102         (add_template_candidate): Likewise.
5103         (add_template_conv_candidate): Likewise.
5104         (build_user_type_conversion_1): Adjust accordingly.
5105         (build_object_call): Likewise.
5106         (build_conditional_expr): Likewise.
5107         (add_candidates): Likewise.
5108         (build_new_op): Likewise.
5109         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
5110         (build_new_method_call): Adjust calls to add_function_candidate.
5111         (make_temporary_var_for_ref_to_temp): New function.
5112         (initialize_reference): Add decl parameter.
5113         * class.c (build_rtti_vtbl_entries): Use build_address and
5114         build_nop.
5115         * cp-tree.h (initialize_reference): Change prototype.
5116         (make_temporary_var_for_ref_to_temp): New function.
5117         (build_type_conversion): Change prototype.
5118         (build_address): New function.
5119         (build_nop): Likewise.
5120         * cvt.c (cp_convert_to_pointer): Adjust call to
5121         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
5122         Use build_nop.
5123         (convert_to_pointer_force): Use build_nop.
5124         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5125         (convert_to_reference): Adjust call to build_type_conversion.
5126         (ocp_convert): Likewise.
5127         (build_type_conversion): Remove for_sure parameter.
5128         * decl.c (grok_reference_init): Use initialize_reference.
5129         * typeck.c (build_address): New function.
5130         (build_nop): Likewise.
5131         (build_unary_op): Use them.
5132         (build_ptrmemfunc): Tidy slightly.
5133         (convert_for_initialization): Adjust call to
5134         initialize_reference.
5135         * typeck2.c (store_init_value): Remove #if 0'd code.
5137 2003-03-03  Jason Merrill  <jason@redhat.com>
5139         * decl.c (start_function): Clear DECL_NUM_STMTS.
5141         * class.c (get_vtable_decl): Use vtbl_type_node.
5142         (build_primary_vtable): Check for it.
5144 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
5146         * decl.c (check_initializer): Check for vector_opaque_p.
5148 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
5150         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5151           invoke an external cpp during compilation.
5153 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5155         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5156         that of warning().
5157         (start_decl): Likewise.
5158         (start_function): Likewise.
5160 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
5162         * Make-lang.in (CXX_C_OBJS): Update.
5164 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
5166         PR c++/9892
5167         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5168         instantiating it.
5170 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
5172         * parser.c (cp_parser_init_declarator): Revert opaque
5173         vector_opaque_p change.
5174         Do not include target.h.
5176 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
5178         PR c++/9879
5179         * cp-tree.h (build_zero_init): Add parameter.
5180         * decl.c (cp_finish_decl): Adjust call.
5181         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
5182         calls.
5183         (build_default_init): Add nelts parameter.  Adjust calls to
5184         build_zero_init.
5185         (build_new_1): Adjust call to build_default_init.
5186         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5188 2003-02-26  Devang Patel  <dpatel@apple.com>
5190         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5191         required.  Postpone enum setting for template decls.
5192         (build_enumerator): Delay copying value node until finish_enum
5193         (). Remove #if 0'ed code.
5194         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5195         (tsubst_copy): Add check for enum type.
5197 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
5199         PR c++/9683
5200         * decl2.c (prune_vars_needing_no_initialization): Do not throw
5201         away initializations for DECL_EXTERNAL VAR_DECLs.
5202         (finish_file): Adjust accordingly.
5203         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5205 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
5207         * decl.c (add_binding): Time TV_NAME_LOOKUP.
5208         (push_class_binding): Likewise.
5209         (set_namespace_binding): Likewise.
5211 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
5213         PR c++/9836
5214         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5215         specializations back to the main template.
5216         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5217         * pt.c (resolve_typename_type): Likewise.
5219 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
5221         PR c++/9778
5222         * pt.c (tsubst_copy_and_build): For a templated function inside a
5223         scope, process template arguments.
5225 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5227         PR c++/9602
5228         * typeck2.c (abstract_virtuals_error): Don't check when
5229         TYPE is still template parameter dependent.
5231 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
5233         PR c++/5333
5234         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5235         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5236         * pt.c (instantiate_class_template): Don't try to instantiate
5237         dependent types.
5238         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5240 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
5242         PR c++/9749
5243         * decl.c (grokdeclarator): Do not allow parameters with variably
5244         modified types.
5246 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
5248         * search.c (grow_bfs_bases): Remove. Fold into ...
5249         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5250         in previous patch.
5252 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
5254         PR c++/9729
5255         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5256         when the G++ 3.2 ABI prevents correct compilation.
5258 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
5260         Change base class access representation. Share virtual base
5261         binfos.
5262         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5263         call.
5264         * cp/class.c (build_base_path): Likewise.
5265         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5266         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5267         (make_new_vtable): Adjust.
5268         (force_canonical_binfo_r): Delete.
5269         (force_canonical_binfo): Delete.
5270         (mark_primary_virtual_base): Delete.
5271         (dfs_unshared_virtual_bases): Delete.
5272         (mark_primary_bases): Adjust.
5273         (maybe_warn_about_overly_private_class): Adjust.
5274         (dfs_base_derived_from): Delete.
5275         (base_derived_from): Follow the inheritance chain.
5276         (struct find_final_overrider_data): Add vpath member.
5277         (dfs_find_final_overrider): Adjust.
5278         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5279         (find_final_overrider): Adjust.
5280         (update_vtable_entry_for_fn): Adjust.
5281         (modify_all_vtables): Adjust.
5282         (walk_subobject_offsets): Adjust.
5283         (layout_nonempty_base_or_field): Adjust.
5284         (layout_empty_base): Remove last parameter. Adjust.
5285         (build_base_field): Adjust.
5286         (build_base_fields): Adjust.
5287         (propagate_binfo_offsets): Remove last parameter. Adjust.
5288         (dfs_set_offset_for_unshared_vbases): Delete.
5289         (layout_virtual_bases): Adjust.
5290         (finish_struct_1): Adjust.
5291         (init_class_processing): Don't init access nodes.
5292         (dfs_get_primary_binfo): Delete.
5293         (get_primary_binfo): Adjust.
5294         (dump_class_hierarchy_r): Remove most derived arg, add IGO
5295         parameter. Adjust.
5296         (dump_class_hierarchy): Adjust.
5297         (finish_vtbls): Adjust.
5298         (get_original_base): Delete.
5299         (build_vtt_inits): Adjust.
5300         (dfs_build_secondary_vptr_vtt_inits): Adjust.
5301         (dfs_ctor_vtable_bases_queue_p): Adjust.
5302         (build_ctor_vtbl_group): Adjust.
5303         (dfs_accumulate_vtbl_inits): Adjust.
5304         (build_vtbl_initializer): Adjust.
5305         (build_vbase_offset_vtbl_entries): Adjust.
5306         (add_vcall_offset_vtbl_entries_1): Adjust.
5307         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5308         (access_*_node): Remove.
5309         (CANONICAL_BINFO): Delete.
5310         (BINFO_UNSHARED_MARKED): Remove.
5311         (BINFO_MARKED): Set LANG_FLAG_0 directly.
5312         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5313         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5314         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5315         Delete.
5316         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5317         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5318         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5319         Delete.
5320         (BINFO_DEPENDENT_BASE_P): New.
5321         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5322         index.
5323         (markedp, unmarkedp): Adjust.
5324         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5325         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5326         find_vbase_instance, binfo_for_vbase): Delete.
5327         (copied_binfo, original_binfo): Declare.
5328         (finish_base_specifier): Add virtual_p arg.
5329         (unshare_base_binfos): Delete.
5330         (copy_base_binfos): Declare.
5331         (reverse_path): Delete.
5332         * cp/decl.c (xref_basetypes): Access and virtuality passed
5333         differently. Don't copy direct base binfos here. Call
5334         copy_base_binfos.
5335         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5336         (initialize_vtbl_ptrs): Adjust.
5337         (expand_member_init): Adjust.
5338         * cp/parser.c (cp_parser_base_specifier): Adjust.
5339         * cp/pt.c (instantiate_class_template): Adjust.
5340         (get_template_base_recursive): Adjust.
5341         * cp/rtti.c (get_pseudo_ti_init): Adjust.
5342         (get_pseudo_ti_desc): Adjust.
5343         * cp/tree.c (unshare_base_binfos): Rename to ...
5344         (copy_base_binfos): ... here, reimplement.
5345         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5346         (reverse_path): Remove.
5347         * cp/typeck.c (get_delta_difference): Adjust error messages.
5348         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5349         * cp/search.c (lookup_base_r): Adjust.
5350         (dynamic_cast_base_recurse): Adjust.
5351         (canonical_binfo): Remove.
5352         (dfs_canonical_queue): Remove.
5353         (dfs_assert_unmarked_p): Remove.
5354         (assert_canonical_unmarked): Remove.
5355         (shared_marked_p, shared_unmarked_p): Remove.
5356         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5357         (dfs_access_in_type): Adjust.
5358         (access_in_type): Adjust.
5359         (dfs_accessible_queue_p): Adjust.
5360         (dfs_accessible_p): Adjust.
5361         (is_subobject_of_p_1, is_subobject_of_p): Remove.
5362         (struct lookup_field_info): Remove from_dep_base_p field.
5363         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5364         (lookup_field_r): Remove dependent base code.
5365         (lookup_member): Likewise.
5366         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5367         (dfs_unmarked_real_bases_queue_p): Remove.
5368         (dfs_marked_real_bases_queue_p): Remove.
5369         (dfs_skip_vbases): Remove.
5370         (dfs_get_pure_virtuals): Adjust.
5371         (markedp, unmarkedp): Adjust.
5372         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5373         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5374         (dfs_unmark): Adjust.
5375         (dfs_get_vbase_types):Remove.
5376         (dfs_build_inheritance_graph_order): Remove.
5377         (get_vbase_types): Remove
5378         (dfs_find_vbase_instance): Remove.
5379         (find_vbase_instance): Remove.
5380         (dfs_debug_unmarkedp): Adjust.
5381         (dependent_base_p): Remove.
5382         (dfs_push_type_decls): Adjust.
5383         (dfs_push_decls): Adjust.
5384         (dfs_no_overlap_yet): Adjust.
5385         (copied_binfo): New function.
5386         (original_binfo): New function.
5387         (binfo_for_vbase): Remove.
5389 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
5391         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5392         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5393         vectors, for speed.
5395 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
5397         PR c++/9704
5398         * class.c (layout_class_type): In the 3.2 ABI, take into account
5399         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5401 2003-02-18  Matt Austern <austern@apple.com>
5403         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5404         nothing for C++.
5405         * cp/decl.c (wrapup_globals_for_namespace): Remove special
5406         handling of global namespace.
5408 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
5410         * cp-tree.h (rid_to_yy): Delete.
5411         (C_RID_YYCODE): Delete.
5412         (finish_file): Delete redundant declaration.
5414 2003-02-18  Jason Merrill  <jason@redhat.com>
5416         PR c++/9623
5417         * decl.c (reshape_init): Don't mess with initializer labels.
5419         PR c++/9485
5420         * parser.c (cp_parser_postfix_expression): Set idk properly for
5421         object->scope::member.
5423 2003-02-18  Ben Elliston  <bje@redhat.com>
5425         PR other/7350
5426         * decl.c (duplicate_decls): Fix typo in comment.
5428 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
5430         PR debug/9717
5431         * class.c (build_base_field): Mark fields for base classes with
5432         DECL_IGNORED_P.
5434 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5436         PR c++/9457
5437         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5438         CONSTRUCTOR_ELTS only once.
5440 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5442         PR c++/9459
5443         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5444         (dump_type_suffix): Likewise.
5446 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5448         * search.c: ANSIfy function declarations and definitions.
5449         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5450         * call.c (build_method_call, resolve_scoped_fn_name,
5451         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5452         calls.
5453         * class.c (handle_using_decl): Likewise.
5454         * decl.c (make_typename_type, make_unmound_class_template,
5455         start_decl, compute_array_index_type): Likewise.
5456         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5457         * init.c (expand_member_init, build_member_call): Likewise.
5458         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5459         resolve_typename_type): Likewise.
5460         * typeck.c (lookup_destructor, finish_class_member_access_exprm
5461         build_prememfunc_access_expr): Likewise.
5463 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
5465         * decl2.c: Include "timevar.h".
5466         (namespace_ancestor): Time name lookup.
5467         (add_using_namespace): Likewise.
5468         (lookup_using_namespace): Likewise.
5469         (qualified_lookup_using_namespace): Likewise.
5470         (decl_namespace): Likewise.
5471         (lookup_arg_dependent): Likewise.
5472         * lex.c (do_identifier): Likewise.
5473         (do_scoped_id): Likewise.
5474         * pt.c (lookup_template_class): Likewise.
5476 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
5478         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5480 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5482         * decl.c: Include "timevar.h".
5483         (poplevel): Time name lookup.
5484         (find_binding): Likewise.
5485         (push_namespace): Likewise.
5486         (pop_nested_namespace): Likewise.
5487         (store_bindings): Likewise.
5488         (maybe_push_to_top_level): Likewise.
5489         (pop_from_top_level): Likewise.
5490         (push_local_name): Likewise.
5491         (pushtag): Likewise.
5492         (pushdecl): Likewise.
5493         (pushdecl_with_scope): Likewise.
5494         (pushdecl_namespace_level): Likewise.
5495         (pushdecl_top_level): Likewise.
5496         (pushdecl_class_level): Likewise.
5497         (push_class_level_binding): Likewise.
5498         (push_using_decl): Likewise.
5499         (push_using_directive): Likewise.
5500         (push_overloaded_decl): Likewise.
5501         (lookup_label): Likewise.
5502         (define_label): Likewise.
5503         (lookup_tag): Likewise.
5504         (lookup_tag_reverse): Likewise.
5505         (lookup_namespace_name): Likewise.
5506         (select_decl): Likewise.
5507         (unqualified_namespace_lookup): Likewise.
5508         (lookup_name_real): Likewise.
5509         (lookup_name_current_level): Likewise.
5510         (lookup_type_current_level): Likewise.
5511         (maybe_inject_for_scope_var): Likewise.
5512         (xref_tag): Likewise.
5514         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5516 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
5518         * decl.c (build_enumerator):  Remove unneeded test.
5520 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
5522         * cp-tree.h (struct lang_type_header): Make all fields unsigned
5523         char.
5525 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
5527         PR c++/7129
5528         * call.c (z_candidate): Add args.
5529         (convert_class_to_reference): Set it.
5530         (implicit_conversion): Tidy.
5531         (add_candidate): Add args parameter.
5532         (add_function_candidate): Adjust call to add_candidate.
5533         (add_conv_candidate): Likewise.
5534         (build_builtin_candidate): Likewise.
5535         (build_user_type_conversion_1): Eliminate wasteful tree_cons
5536         usage.
5537         (build_new_function_call): Likewise.
5538         (build_object_call): Likewise.
5539         (add_candidates): New function.
5540         (build_new_op): Use it.
5541         (covert_like_real): Adjust call to build_over_call.
5542         (build_over_call): Remove args parameter.
5543         * operators.def: Add <?= and >?=.
5545 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
5547         * typeck.c (build_indirect_ref): Don't check flag_volatile.
5549 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5551         PR c++/8849
5552         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5554 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
5556         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5557         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5558         (BINFO_LANG_ELTS): New #define.
5559         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5561 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
5563         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5565 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
5567         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5568         for class types.
5569         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5570         rather than TYPE_LANG_FLAG_0.
5571         (TYPE_BUILT_IN): Remove.
5572         (TYPE_DEPENDENT_P): New macro.
5573         (TYPE_DEPENDENT_P_VALID): Likewise.
5574         (lang_type_class): Add fields_readonly.
5575         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5576         * pt.c (dependent_type_p_r): New function, split out from ...
5577         (dependent_type_p): ... here.  Memoize results.
5578         * search.c (dependent_base_p): Use dependent_type_p, not
5579         uses_template_parms.
5580         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5581         for class types.
5583 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
5585         * call.c (build_field_call): Use build_new_op, not build_opfncall.
5586         (prep_operand): New function.
5587         (build_new_op): Use it.  Remove dead code.
5588         * class.c (pushclass): Change "modify" parameter type from int to
5589         bool.
5590         (currently_open_class): Use same_type_p, not pointer equality.
5591         (push_nested_class): Adjust calls to pushclass, remove modify
5592         parameter.
5593         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5594         (pushclass): Change prototype.
5595         (push_nested_class): Likewise.
5596         (grokoptypename): Remove.
5597         (build_opfncall): Remove.
5598         (value_dependent_expression_p): Declare.
5599         (resolve_typename_type): Likewise.
5600         (resolve_typename_type_in_current_instantiation): Likewise.
5601         (enter_scope_of): Remove.
5602         (tsubst): Remove.
5603         (tsubst_expr): Likewise.
5604         (tsubst_copy): Likewise.
5605         (tsubst_copy_and_build): Likewise.
5606         * decl.c (warn_about_implicit_typename_lookup): Remove.
5607         (finish_case_label): Return error_mark_node for erroneous labels.
5608         (start_decl): Adjust calls to push_nested_class.
5609         (grokfndecl): Call push_scope/pop_scope around call to
5610         duplicate_decls.
5611         (grokdeclarator): Do not call tsubst.
5612         (start_function): Adjust calls to push_nested_class.
5613         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5614         (check_classfn): Use push_scope/pop_scope around type comparisions.
5615         (grokoptypename): Remove.
5616         (push_sscope): Adjust call to push_nested_class.
5617         * error.c (dump_type): Show cv-qualification of typename types.
5618         * init.c (build_member_call): Use build_new_op, not
5619         build_opfncall.
5620         * method.c (build_opfncall): Remove.
5621         * parser.c (cp_parser): Add allow_non_constant_expression_p and
5622         non_constant_expression_p.
5623         (cp_parser_constant_expression): Adjust prototype.
5624         (cp_parser_resolve_typename_type): Remove.
5625         (cp_parser_non_constant_expression): New function.
5626         (cp_parser_non_constant_id_expression): Likewise.
5627         (cp_parser_new): Set allow_non_constant_expression_p and
5628         non_constant_expression_p.
5629         (cp_parser_primary_expression): Reject `this' and `va_arg' in
5630         constant-expressions.  Note that dependent names aren't really
5631         constant.
5632         (cp_parser_postfix_expression): Reject conversions to non-integral
5633         types in constant-expressions.  Neither are increments or
5634         decrements.
5635         (cp_parser_unary_expression): Reject increments and decrements in
5636         constant-expressions.
5637         (cp_parser_direct_new_declarator): Adjust call to
5638         cp_parser_constant_expression.
5639         (cp_parser_cast_expression): Reject conversions to non-integral
5640         types in constant-expressions.
5641         (cp_parser_assignment_expression): Rejects assignments in
5642         constant-expressions.
5643         (cp_parser_expression): Reject commas in constant-expressions.
5644         (cp_parser_labeled_statement): Adjust call to
5645         cp_parser_constant_expression.
5646         (cp_parser_direct_declarator): Simplify array bounds, even in
5647         templates, when they are non-dependent.  Use
5648         resolve_typename_type, not cp_parser_resolve_typename_type.
5649         (cp_parser_class_head): Use resolve_typename_type, not
5650         cp_parser_resolve_typename_type.
5651         (cp_parser_member_declaration): Adjust call to
5652         cp_parser_constant_expression.
5653         (cp_parser_constant_initializer): Likewise.
5654         (cp_parser_constructor_declarator): Use resolve_typename_type, not
5655         cp_parser_resolve_typename_type.
5656         (cp_parser_late_parsing_default_args): Adjust call to
5657         push_nested_class.
5658         * pt.c (tsubst): Give it internal linkage.
5659         (tsubst_expr): Likewise.
5660         (tsubst_copy): Likewise.
5661         (tsubst_copy_and_build): Likewise.
5662         (push_access_scope_real): Likewise.
5663         (tsubst_friend_class): Likewise.
5664         (instantiate_class_template): Adjust call to pushclass.
5665         (value_dependent_expression_p): Give it external linkage.
5666         Robustify.
5667         (resolve_typename_type): New function.
5668         * semantics.c (finish_call_expr): Use build_new_op, not
5669         build_opfncall.
5670         (begin_constructor_declarator): Remove.
5671         (begin_class_definition): Adjust call to pushclass.
5672         (enter_scope_of): Remove.
5673         * typeck.c (comptypes): Resolve typename types as appropriate.
5674         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5675         (build_x_compound_expr): Likewise.
5676         (build_modify_expr): Likewise.
5677         (build_x_modify_expr): Likewise.
5678         * typeck2.c (build_x_arrow): Likewise.
5680 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
5682         * pt.c (last_pending_template) Declare GTY().
5684 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5686         PR c++/8591
5687         * parser.c (cp_parser_elaborated_type_specifier): Convert
5688         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5689         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5691 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
5693         PR c++/9437
5694         * pt.c (unify): Don't unify '*T' with 'U C::*'.
5696         PR c++/3902
5697         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5698         inside a declarator.
5700 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
5702         * class.c (update_vtable_entry_for_fn): Add index parameter.
5703         Generate vcall thunk for covariant overriding from a virtual
5704         primary base.
5705         (dfs_modify_vtables): Adjust.
5707 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
5709         PR c++/9403
5710         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5711         template keyword.
5712         (cp_parser_base_specifier): Look for and consume a
5713         TEMPLATE keyword. Replace switch with array index.
5715         PR c++/795
5716         * semantics.c (finish_non_static_data_member): Remember the
5717         field's type even in a template.
5719         PR c++/9415
5720         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5721         already scoped.
5723         PR c++/8545
5724         * parser.c (cp_parser_cast_expression): Be more tentative.
5726 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5728         * cp-tree.h (flagged_type_tree_s): Remove.
5729         (check_for_new_type): Likewise.
5730         * typeck2.c (check_for_new_type): Likewise.
5732 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5734         * dump.c: ANSIfy function declarations and definitions.
5736         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
5738 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5740         PR c++/9354
5741         * init.c (build_new): Set the type of the new-expression, even
5742         when processing_templte_decl.
5744         PR c++/9216
5745         * parser.c (cp_parser_primary_expression): Improve error message
5746         for templates used in an expression context.
5748         PR c++/8696
5749         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5750         parse when encountering "typedef".
5752 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
5754         * class.c, parser.c: ANSIfy function definitions and declarations.
5756 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5758         PR c++/9328
5759         * error.c (dump_decl): For an OVERLOAD, just print the name of the
5760         function; it doesn't make sense to try to print its type.
5761         * semantics.c (finish_typeof): Issue errors about invalid uses.
5763         PR c++/9298
5764         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5765         function.
5766         (cp_parser_expression_statement): Use it.
5767         (cp_parser_explicit_instantiation): Likewise.
5768         * pt.c (do_decl_instantiation): Improve error handling logic.
5770 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5772         PR c++/9384
5773         * parser.c (cp_parser_using_declaration): Issue error messages
5774         about name resolution failures here.
5776         PR c++/9388
5777         * class.c (currently_open_derived_class): Use dependent_type_p.
5778         * cp-tree.h (dependent_type_p): New function.
5779         (dependent_template_arg_p): Likewise.
5780         (dependent_template_p): Likewise.
5781         (type_dependent_expression_p): Likewise.
5782         * parser.c (cp_parser_dependent_type_p): Remove.
5783         (cp_parser_value_dependent_type_p): Likewise.
5784         (cp_parser_type_dependent_expression_p): Likewise.
5785         (cp_parser_dependent_template_arg_p): Likewise.
5786         (cp_parser_dependent_template_id_p): Likewise.
5787         (cp_parser_dependent_template_p): Likewise.
5788         (cp_parser_diagnose_invalid_type_name): Replace
5789         cp_parser_dependent_type_p with dependent_type_p, etc.
5790         (cp_parser_primary_expresion): Likewise.
5791         (cp_parser_nested_name_specifier_opt): Likewise.
5792         (cp_parser_postfix_expression): Likewise.
5793         (cp_parser_unary_expression): Likewise.
5794         (cp_parser_template_name): Likewise.
5795         (cp_parser_class_name): Likewise.
5796         (cp_parser_lookup_name): Likewise.
5797         * pt.c (dependent_type_p): New function.
5798         (value_dependent_expression_p): Likewise.
5799         (type_dependent_expression_p): Likewise.
5800         (dependent_template_arg_p): Likewise.
5801         (dependent_template_id_p): Likewise.
5802         (dependent_template_p): Likewise.
5804         PR c++/9285
5805         PR c++/9294
5806         * parser.c (cp_parser_simple_declaration): Return quickly when
5807         encountering errors.
5809 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5811         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5813 2003-01-17  Jason Merrill  <jason@redhat.com>
5815         PR c++/9167, c++/9358
5816         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5818 2003-01-17  Jason Merrill  <jason@redhat.com>
5820         PR c++/9342
5821         * call.c (build_conditional_expr): Always do lvalue-rvalue
5822         conversion.
5824 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
5826         PR c++/9294
5827         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5828         * cp-tree.h (BASELINK_BINFO): Adjust.
5829         (BASELINK_FUNCTIONS): Likewise.
5830         (BASELINK_ACCESS_BINFO): Likewise.
5831         (tree_baselink): New structure.
5832         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5833         (lang_tree_node): Add baselink.
5834         * decl.c (cp_tree_node_structure): Add BASELINK case.
5835         * search.c (build_baselink): Adjust.
5836         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
5837         test from TREE_LIST case.
5839         PR c++/9272
5840         * parser.c (cp_parser_constructor_declarator_p): Do not assume
5841         that a constructor cannot be declared outside of its own class.
5843         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5844         be resolved, neither can the qualified name.
5846         * rtti.c (get_pseudo_ti_desc): Fix thinko.
5848 2003-01-16  Jason Merrill  <jason@redhat.com>
5850         PR c++/8564
5851         * init.c (build_vec_init): Re-add maxindex parm.
5852         (perform_member_init, build_aggr_init): Pass it.
5853         (build_new_1): Pass it. Use an incomplete array type for full_type.
5854         * typeck.c (build_modify_expr): Pass it.
5855         * cp-tree.h: Adjust.
5857 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
5859         * cp-tree.h (tsubst_copy_and_build): New declaration.
5860         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5861         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
5862         (tsubst_copy_and_build): New function.
5864 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
5866         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5867         (PARTIAL_INSTANTIATION_P): Remove.
5868         (IMPLICIT_TYPENAME_P): Likewise.
5869         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5870         (build_typename_type): Remove declaration.
5871         (parmlist_is_exprlist): Likewise.
5872         * decl.c (build_typename_type): Make it static, remove third
5873         parameter.
5874         (push_class_binding): Don't do implicit typename stuff.
5875         (make_typename_type): Likewise.
5876         (lookup_name_real): Likewise.
5877         (grokdeclarator): Don't try to convert declarations into
5878         initializations.  Don't do implicit typename stuff.
5879         (parmlist_is_exprlist): Remove.
5880         (xref_basetypes): Simplify.
5881         * decl2.c (grokfield): Don't try to convert declarations into
5882         initializations.
5883         (build_anon_union_vars): Do this while processing templates, too.
5884         (finish_anon_union): Likewise.
5885         * error.c (dump_type): Remove implicit typename handling.
5886         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5887         (cp_parser_primary_expression): Correct handling of names not
5888         found by unqualified name lookup in templates.
5889         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5890         of types when possible.
5891         (cp_parser_simple_declaration): Complain intelligently about some
5892         invalid declarations.
5893         (cp_parser_member_declaration): Likewise.
5894         (cp_parser_constructor_declarator_p): Don't check when we're in a
5895         function scope.
5896         * pt.c (instantiate_class_template): Remove
5897         PARTIAL_INSTANTIATION_P gunk.
5898         * search.c (lookup_field_r): Don't build implicit typenames.
5899         (marked_pushdecls_p): Don't enter dependent base types.
5900         (unmarked_pushdecls_p): Likewise.
5901         * semantics.c (begin_class_definition): Remove implicit typename
5902         stuff.
5904 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
5906         PR c++/9212
5907         * parser.c (cp_parser_direct_declarator): If accepting either
5908         abstract or named, the name must be an unqualified-id.
5910 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5912         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5914 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5916         * decl2.c (check_classfn): Fix uninitialized warning.
5917         (build_anon_union_vars): Likewise.
5918         * pt.c (tsubst_copy): Likewise.
5920 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
5922         Further conform g++'s __vmi_class_type_info to the C++ ABI
5923         specification.
5924         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5925         the specification.
5926         (class_hint_flags): Likewise.
5928 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5930         * config-lang.in: Add semantics.c to gtfiles.
5931         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5932         (saved_scope): Likewise.
5933         (type_lookups): Remove.
5934         (deferred_access): New structure.
5935         (type_access_control): Remove.
5936         (save_type_access_control): Likewise.
5937         (reset_type_access_control): Likewise.
5938         (decl_type_access_control): Likewise.
5939         (push_deferring_access_checks): Declare.
5940         (resume_deferring_access_checks): Likewise.
5941         (stop_deferring_access_checks): Likewise.
5942         (pop_deferring_access_checks): Likewise.
5943         (get_deferred_access_checks): Likewise.
5944         (pop_to_parent_deferring_access_checks): Likewise.
5945         (perform_deferred_access_checks): Likewise.
5946         (perform_or_defer_access_check): Likewise.
5947         * decl.c (make_typename_type): Use perform_or_defer_access_check.
5948         (make_unbound_class_template): Likewise.
5949         (grokdeclarator): Don't call decl_type_access_control.
5950         * parser.c (cp_parser_context): Remove deferred_access_checks
5951         and deferring_access_checks_p fields.
5952         (cp_parser_context_new): Adjust.
5953         (cp_parser): Remove access_checks_lists.
5954         (cp_parser_defer_access_check): Remove.
5955         (cp_parser_start_deferring_access_checks): Remove.
5956         (cp_parser_stop_deferring_access_checks): Remove.
5957         (cp_parser_perform_deferred_access_checks): Remove.
5958         (cp_parser_nested_name_specifier_opt): Use new deferred access
5959         functions.
5960         (cp_parser_simple_declaration): Likewise.
5961         (cp_parser_template_id): Likewise.
5962         (cp_parser_function_definition): Likewise.
5963         (cp_parser_class_specifier): Likewise.
5964         (cp_parser_lookup_name): Likewise.
5965         (cp_parser_single_declaration): Likewise.
5966         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5967         (cp_parser_parse_tentatively): Likewise.
5968         (cp_parser_parse_definitely): Likewise.
5969         (yyparse): Likewise.
5970         (cp_parser_init_declarator): Remove access_checks parameter.
5971         Use new deferred access functions.
5972         (cp_parser_function_definition_from_specifiers_and_declarator):
5973         Likewise.
5974         (cp_parser_class_head): Remove deferring_access_checks_p and
5975         saved_access_checks parameters.  Use new deferred access functions.
5976         (cp_parser_member_specification_opt): Don't call
5977         reset_type_access_control.
5978         * search.c (type_access_control): Remove.
5979         * semantics.c: Include "gt-cp-semantics.h".
5980         (deferred_type_access_control): Remove.
5981         (deferred_access_stack): New variable.
5982         (deferred_access_free_list): Likewise.
5983         (push_deferring_access_checks): New function.
5984         (resume_deferring_access_checks): Likewise.
5985         (stop_deferring_access_checks): Likewise.
5986         (pop_deferring_access_checks): Likewise.
5987         (get_deferred_access_checks): Likewise.
5988         (pop_to_parent_deferring_access_checks): Likewise.
5989         (perform_deferred_access_checks): New function, adapted from
5990         cp_parser_perform_deferred_access_checks.
5991         (perform_or_defer_access_check): New function, adapted from
5992         cp_parser_defer_access_check.
5993         (current_type_lookups): Remove.
5994         (deferred_type_access_control): Likewise.
5995         (decl_type_access_control): Likewise.
5996         (save_type_access_control): Likewise.
5997         (reset_type_access_control): Likewise.
5998         (begin_function_definition): Adjust.
5999         (begin_class_definiton): Likewise.
6001 2003-01-13  Jason Merrill  <jason@redhat.com>
6003         PR c++/8748
6004         * class.c (build_base_path): Take the address before calling save_expr.
6006         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6007         all the ambiguous conversions are bad.
6009         * class.c (maybe_warn_about_overly_private_class): Don't stop
6010         searching when we find a nonprivate method.
6012         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6014 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
6016         * cp-tree.h (get_arglist_len_in_bytes): Remove.
6018         PR c++/9264
6019         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6020         typeame types more robustly.
6022 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
6024         * parser.c:  Fix comment typos.
6026 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
6028         PR c++/9099
6029         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6030         an object_type which is not a class type.
6032 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
6034         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6035         (cp_parser_late_parsing_default_args): Likewise.
6037 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
6039         * cfns.gperf: ANSIfy function declarations.
6040         * cfns.h: Regenerate.
6041         * cp-tree.h: ANSIfy function declarations.
6043 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
6045         * cp-tree.h (reparse_absdcl_as_expr): Remove.
6046         (reparse_absdcl_as_casts): Likewise.
6047         (reparse_decl_as_expr): Likewise.
6048         (finish_decl_parsing): Likewise.
6049         * decl2.c (reparse_absdcl_as_expr): Remove.
6050         (reparse_absdcl_as_casts): Likewise.
6051         (repase_decl_as_expr): Likewise.
6052         (finish_decl_parsing): Likewise.
6054         PR c++/9128
6055         PR c++/9153
6056         PR c++/9171
6057         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6058         function.
6059         (cp_parser_nested_name_specifier_opt): Correct the
6060         check_dependency_p false.
6061         (cp_parser_postfix_expression): Fix formatting.
6062         (cp_parser_decl_specifier_seq): Avoid looking for constructor
6063         declarators when possible.
6064         (cp_parser_template_id): Avoid performing name-lookup when
6065         possible.
6066         (cp_parser_class_head): Do not count specializations when counting
6067         levels of templates.
6068         (cp_parser_constructor_declarator_p): Return immediately if
6069         there's no chance that the tokens form a constructor declarator.
6070         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
6071         expression with reference type.
6072         (get_tinfo_decl_dynamic): Do not return an expression with
6073         reference type.
6074         (build_typeid): Add comment.  Do not return an expression with
6075         reference type.
6076         * typeck.c (build_class_member_access_expr): Improve handling of
6077         conditionals and comma-expressions as objects.
6079 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6081         * cfns.gperf: ANSIfy function declarations.
6082         * cfns.h: Regenerate.
6083         * cp-tree.h: ANSIfy function declarations.
6084         * parser.c: ANSIfy function declarations & definitions.
6086         * decl.c (bad_specifiers): Fix parameter order error I introduced.
6088 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6090         Merge from pch-branch:
6092         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6094         Merge to tag pch-merge-20030102:
6096         * semantics.c (finish_translation_unit): Don't call finish_file.
6097         * parser.c: Don't include ggc.h.
6098         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6099         read first token here.  Don't allow PCH files after the first
6100         token is read.
6101         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6102         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6103         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6104         (cp_parser_late_parsing_for_member): Don't duplicate call to
6105         cp_lexer_set_source_position_from_token.
6106         (cp_parser_late_parsing_default_args): Likewise.
6107         (yyparse): Call finish_file after clearing the_parser.
6109         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
6111         * Make-lang.in: Remove $(GGC_H) from all dependencies.
6112         (CXX_TREE_H): Add $(GGC_H).
6113         * class.c: Don't include ggc.h.
6114         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6115         (method_name_cmp): Likewise.
6116         (resort_data): New variable.
6117         (resort_field_decl_cmp): New.
6118         (resort_method_name_cmp): New.
6119         (resort_sorted_fields): New.
6120         (resort_type_method_vec): New.
6121         (finish_struct_methods): Delete cast.
6122         (finish_struct_1): Delete cast.
6123         * cp-tree.h: Include ggc.h.
6124         (struct lang_type_class): Add reorder attribute to field `methods'.
6125         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6126         (resort_sorted_fields): New prototype.
6127         (resort_type_method_vec): New prototype.
6128         * call.c: Don't include ggc.h.
6129         * decl.c: Likewise.
6130         * decl2.c: Likewise.
6131         * init.c: Likewise.
6132         * lex.c: Likewise.
6133         * method.c: Likewise.
6134         * optimize.c: Likewise.
6135         * parse.y: Likewise.
6136         * pt.c: Likewise.
6137         * repo.c: Likewise.
6138         * search.c: Likewise.
6139         * semantics.c: Likewise.
6140         * spew.c: Likewise.
6141         * tree.c: Likewise.
6143         * lang-specs.h: Remove comment.
6145         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
6147         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6148         (operator_name_info): Mark to be saved for PCH, specify size.
6149         (assignment_operator_name_info): Likewise.
6151         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
6153         * decl.c (anon_cnt): Mark to be saved for PCH.
6155         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
6157         * lex.c  (init_reswords): Delete now-untrue comment.
6158         Allocate ridpointers using GGC.
6160         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
6162         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6164         * g++spec.c (lang_specific_driver): Don't include standard
6165         libraries in `added'.
6167         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
6169         * decl2.c (finish_file): Call c_common_write_pch.
6170         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6172         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
6174         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6175         files when using g++.
6176         * lang-specs.h: Handle compiling C++ header files.
6178 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
6180         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6182 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6184         * pt.c (push_access_scope_real): Call push_to_top_level for
6185         function in namespace scope.
6186         (pop_access_scope): Call pop_from_top_level for function in
6187         namespace scope.
6189 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
6191         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6193 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6195         * Make-lang.in (c++.install-common, c++.install-man,
6196         c++.uninstall): Prepend $(DESTDIR) to destination paths in
6197         all (un)installation commands.
6198         (c++.install-common): Rewrite $(LN) commands to support
6199         DESTDIR with "ln" as well as with "ln -s".
6201 2003-01-08  Jason Merrill  <jason@redhat.com>
6203         * parser.c (cp_parser_primary_expression): See through explicitly
6204         scoped ALIAS_DECLs, too.
6206 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6208         * decl.c: Remove some #if 0 code.
6210         * decl.c: ANSIfy function declarations.
6212 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
6214         * parser.c (cp_parser_asm_definition): Correct handling of omitted
6215         operands.
6217 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6219         PR c++/9030
6220         * decl.c (make_typename_type): Check access only when tf_error.
6221         (make_unbound_class_template): Likewise.
6222         * pt.c (saved_access_scope): New variable.
6223         (push_access_scope_real): New function.
6224         (push_access_scope): Likewise.
6225         (pop_access_scope): Likewise.
6226         (tsubst_default_argument): Use them.
6227         (instantiate_template): Likewise.
6228         (regenerate_decl_from_template): Likewise.
6229         (instantiate_decl): Likewise.
6230         (get_mostly_instantiated_function_type): Likewise.
6232 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
6234         * tree.c: Delete bogus #if 0 code.
6236 2003-01-07  Andreas Schwab  <schwab@suse.de>
6238         * class.c (layout_class_type): Don't use
6239         PCC_BITFIELD_TYPE_MATTERS if not defined.
6241 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
6243         PR c++/9165
6244         * decl2.c (build_cleanup): Mark the object as used.
6246         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6247         (hash_local_specialization): New function.
6248         (register_local_specialization): Revert 2003-01-05 change.
6249         (instantiate_decl): Use hash_local_specialization when creating
6250         the local_specializations table.
6252         * decl2.c (mark_used): Do not synthesize thunks.
6254         * class.c (layout_class_type): Correct handling of unnamed
6255         bitfields wider than their types.
6257         PR c++/9189
6258         * parser.c (cp_parser): Remove default_arg_types.  Update
6259         documentation for unparsed_functions_queues.
6260         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6261         parameter.
6262         (cp_parser_new): Don't set parser->default_arg_types.
6263         (cp_parser_function_definition): Adjust usage of
6264         unparsed_funtions_queues.
6265         (cp_parser_class_specifier): Don't mess with
6266         parser->default_arg_types.  Handle default argument processing in
6267         a separate phase from function body processing.
6268         (cp_parser_template_declaration_after_export): Adjust usage of
6269         unparsed_functions_queues.
6270         (cp_parser_late_parsing_for_member): Do not handle default
6271         arguments.
6273 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
6275         PR c++/9109
6276         * parser.c (cp_parser_declarator_kind): New enum.
6277         (cp_parser_declarator): Adjust.
6278         (cp_parser_direct_declarator): Adjust. Allow for either named or
6279         abstract declarator. Prefer abstract, if possible. Allow
6280         parenthesized function name.
6281         (cp_parser_condition): Adjust cp_parser_declarator call.
6282         (cp_parser_explicit_instantiation): Likewise.
6283         (cp_parser_init_declarator): Likewise.
6284         (cp_parser_type_id): Likewise.
6285         (cp_parser_function_definition): Likewise.
6286         (cp_parser_member_declaration): Likewise.
6287         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6288         the tentative parsing.
6289         (cp_parser_exception_declaration): Likewise.
6291 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
6293         * parser.c (cp_parser_template_parameter): Adjust call to
6294         cp_parser_parameter_declaration.
6295         (cp_parser_parameter_declaration_list): Likewise.
6296         (cp_parser_parameter_declaration): Replace
6297         greater_than_is_operator_p with template_parm_p parameter.  Do not
6298         cache tokens for template default arguments.
6300         * pt.c (retrieve_local_specialization): Use htab_find, not
6301         htab_find_with_hash.
6302         (register_local_specialization): Use htab_find_slot, not
6303         htab_find_slot_with_hash.
6304         (instantiate_decl): Pass a hash function to htab_create.
6306 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6308         * parser.c (cp_parser_binary_expression,
6309         cp_parser_multiplicative_expression,
6310         cp_parser_additive_expression, cp_parser_shift_expression,
6311         cp_parser_relational_expression, cp_parser_equality_expression,
6312         cp_parser_and_expression, cp_parser_exclusive_or_expression,
6313         cp_parser_inclusive_or_expression,
6314         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6315         cp_parser_binary_expression): Const-ify.
6317 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
6319         * method.c (use_thunk): Disable access control while building the
6320         body of the thunk.
6322 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
6324         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6325         front end.
6327 2003-01-03  Matt Austern  <austern@apple.com>
6329         * cp-tree.h (struct lang_type_class): add field for key method
6330         (cp_global_trees): rename dynamic_classes to keyed_classes
6331         (key_method): add definition
6332         * class.c (finish_struct_1): compute class's key method, and add
6333         the class to keyed_classes list if there is no key method.
6334         * decl.c (finish_function): add class to keyed_classes list if we
6335         see a definition of the class's key method.
6336         * pt.c (instantiate_class_template): add template specialization
6337         of a dynamic class to keyed_classes list.
6338         * decl2.c (key_method): remove
6339         (finish_file): iterate only through keyed_classes list when
6340         deciding whether to emit vtables, remove class from its list after
6341         we do the emission.
6343 2003-01-02  Jason Merrill  <jason@redhat.com>
6345         * call.c (build_conditional_expr): Stabilize lvalues properly.
6346         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6347         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6348         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6350         * call.c (convert_like_real): Call decl_constant_value for an
6351         IDENTITY_CONV even if there are no more conversions.
6353         * cvt.c (build_up_reference): Don't push unnamed temps.
6355         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6357         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6358         for a backend struct.
6360         * except.c (wrap_cleanups_r, build_throw): Make
6361         MUST_NOT_THROW_EXPRs void.
6362         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6364         * init.c (build_vec_delete_1): Pre-evaluate the base address.
6366         * init.c (get_temp_regvar): Simplify logic.
6368         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6369         our replacement is a decl.
6371         * decl.c (cp_make_fname_decl): Push the decls inside the
6372         outermost scope.
6374 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
6376         PR c++/45, c++/3784
6377         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6378         the same too.
6380 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
6382         * parser.c (struct cp_parser): Add access_checks_lists field
6383         (cp_parser_simple_declaration): Use.
6384         (cp_parser_init_declarator): Likewise.
6386 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6388         * parser.c (cp_parser_declaration): Accept the __extension__
6389         keyword before the declaration.
6391         PR c++/2843
6392         * parser.c (cp_parser_parameter_declaration): Allow attributes to
6393         appear after the declarator.
6395         * call.c (build_new_method_call): Fix typo in message format
6396         string.
6398 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6400         * parser.c (cp_lexer_next_token_is): Declare it inline.
6401         (cp_lexer_set_source_position_from_token): Likewise.
6402         (cp_lexer_debugging_p): Likewise.
6403         (cp_parser_parsing_tentatively): Likewise.
6404         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6405         to the cp_lexer_peek_token.
6407         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6408         expression.
6410 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6412         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6413         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6414         cp/repo.c: Fix copyright years.
6416 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
6418         * lex.c: Remove superfluous include of cpplib.h.
6419         (CONSTRAINT): Define without conditions.
6420         (init_cp_pragma): Use c_register_pragma.
6422 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
6424         * .cvsignore: Remove.
6426 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6428         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6429           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6430           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6431           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6432           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6433           copyright header.
6434         * lex.h: parse.y is dead, so don't mention it.  Also replace the
6435           copyright header with the default GNU copyright header.
6437 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6439         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6440         (lookup_name_namespace_only): Likewise.
6441         (begin_only_namespace_names): Likewise.
6442         (end_only_namespace_names): Likewise.
6443         * decl.c (only_namespace_names): Remove.
6444         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6445         (lookup_name_real): Do not check only_namespace_names.
6446         (lookup_name_namespace_only): Remove.
6447         (begin_only_namespace_names): Likewise.
6448         (end_only_namespace_names): Likewise.
6449         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6450         nested-name-specifiers more gracefully.
6451         (cp_parser_class_or_namespace_name): Avoid looking up namespace
6452         names when they cannot possibly appear.
6453         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6454         (cp_parser_elaborated_type_specifier): Likewise.
6455         (cp_parser_namespace_name): Only look for namespace names.
6456         (cp_parser_lookup_name): Add is_namespace parameter.
6457         (cp_parser_lookup_name_simple): Adjust call to
6458         cp_parser_lookup_name.
6460         * parser.c (cp_parser_dependent_type_p): Fix thinko.
6462 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
6464         * .cvsignore: Update.
6466 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
6468         * class.c (modify_vtable_entry): Remove unused variable.
6469         (get_vcall_index): Always expect a non-thunk.
6470         (update_vtable_entry_for_fn): Combine covariant adjustments, when
6471         overriding a thunk. Pass get_vcall_index a non-thunk.
6473         * decl2.c (finish_file): Mark undefined inlines as extern.
6475 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6477         * cp-tree.def (RETURN_INIT): Remove.
6478         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6479         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6480         (note_level_for_for): Remove.
6481         (note_level_for_try): Likewise.
6482         (note_level_for_catch): Likewise.
6483         (finish_named_return_value): Likewise.
6484         (do_pushlevel): Change prototype.
6485         (pending_lang_change): Remove.
6486         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6487         sk_for.
6488         (note_level_for_for): Remove.
6489         (note_level_for_try): Likewise.
6490         (note_level_for_catch): Likewise.
6491         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6492         * parser.c (cp_parser_context_free_list): Make it "deletable".
6493         (cp_parser_template_argument): Remove misleading comment.
6494         * pt.c (tsubst_expr): Remove RETURN_INIT code.
6495         * semantics.c (genrtl_named_return_value): Remove.
6496         (do_pushlevel): Take a scope kind as an argument.
6497         (begin_if_stmt): Adjust.
6498         (begin_while_stmt): Likewise.
6499         (begin_for_stmt): Likewise.
6500         (finish_for_init_stmt): Likewise.
6501         (begin_switch_stmt): Likewise.
6502         (begin_handler): Likewise.
6503         (begin_compound_stmt): Likewise.
6504         (finish_named_return_value): Remove.
6505         (cp_expand_stmt): Remove RETURN_INIT case.
6506         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6508 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6510         PR c++/9112
6511         * parser.c (cp_parser_direct_declarator): Handle erroneous
6512         parenthesized declarators correctly.
6514 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6516         * cp-tree.h (pending_lang_change): Declare.
6518 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6520         * parser.c (cp_parser_context_free_list): New variable.
6521         (cp_parser_context_new): Use it.
6522         (cp_parser_error): Check return code from
6523         cp_parser_simulate_error.
6524         (cp_parser_simulate_error): Return a value.
6525         (cp_parser_id_expression): Optimize common case.
6526         (cp_parser_class_name): Likewise.
6527         (cp_parser_class_specifier): Adjust call to
6528         cp_parser_late_parsing_default_args.
6529         (cp_parser_lookup_name): Optimize common case.
6530         (cp_parser_late_parsing_for_member): Adjust call to
6531         cp_parser_late_parsing_default_args.
6532         (cp_parser_late_parsing_default_args): Add scope parameter.
6533         (cp_parser_require): Avoid creating the error message unless it's
6534         needed.
6535         (cp_parser_parse_definitely): Place free'd contexts on the free
6536         list.
6538         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6540 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
6542         * parser.c (cp_parser_parameter_declaration_clause): Treat system
6543         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6545 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6547         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6548         GCC, not GNU CC.
6550 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6552         * parse.y: Remove.
6553         * spew.c: Likewise.
6554         * Make-lang.in (gt-cp-spew.h): Remove.
6555         * cp-tree.h (do_pending_lang_change): Remove.
6556         (do_identifier): Change prototype.
6557         (finish_id_expr): Remove.
6558         * decl.c (lookup_name_real): Remove yylex variable.
6559         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6560         * lex.c (init_cpp_parse): Remove.
6561         (reduce_cmp): Likewise.
6562         (token_cmp): Likewise.
6563         (yychar): Likewise.
6564         (lastiddecl): Likewise.
6565         (token_count): Likewise.
6566         (reduce_count): Likewise.
6567         (yyhook): Likewise.
6568         (print_parse_statistics): Likewise.
6569         (do_pending_lang_change): Likewise.
6570         (do_identifier): Remove parsing parameter.
6571         * lex.h (lastiddecl): Remove.
6572         (looking_for_typename): Remove.
6573         (looking_for_template): Likewise.
6574         (pending_lang_change): Likewise.
6575         (yylex): Likewise.
6576         * semantics.c (finish_id_expr): Remove.
6578         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6579         thread" correctly.
6581 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6583         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
6584         end, not the C front end.
6586 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
6588         * cp-tree.h (THUNK_TARGET): New macro.
6589         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6590         (finish_thunk): Remove offset parms.
6591         * class.c (find_final_overrider): Look through thunks.
6592         (get_vcall_index): Use THUNK_TARGET.
6593         (update_vtable_entry_for_fn): Look through thunks. Set covariant
6594         fixed offset here. Adjust finish_thunk call.
6595         (build_vtbl_initializer): Adjust finish_thunk calls.
6596         * mangle.c (mangle_call_offset): Remove superfluous if.
6597         (mangle_thunk): Adjust.
6598         * method.c (make_thunk): Adjust.
6599         (finish_thunk): Adjust.
6600         (thunk_adjust): Remove assert.
6601         (use_thunk): Use THUNK_TARGET
6602         * dump1.c (cp_dump_tree): Adjust thunk dumping.
6604         PR c++/9054
6605         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6606         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6608 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6610         Remove traditional C constructs 4/n.
6611         * decl2.c (grok_method_quals, warn_if_unknown_interface,
6612         grok_x_components, cp_build_parm_decl, build_artificial_parm,
6613         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6614         delete_sanity, check_member_template, check_java_method,
6615         check_classfn, finish_static_data_member_decl, grokfield,
6616         grokbitfield, grokoptypename, grok_function_init,
6617         cplus_decl_attributes, constructor_name, defer_fn,
6618         build_anon_union_vars, finish_anon_union, coerce_new_type,
6619         coerce_delete_type, comdat_linkage, maybe_make_one_only,
6620         key_method, import_export_vtable, import_export_class,
6621         output_vtable_inherit, import_export_decl, import_export_tinfo,
6622         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6623         set_guard, start_objects, finish_objects,
6624         start_static_storage_duration_function,
6625         finish_static_storage_duration_function, get_priority_info,
6626         start_static_initialization_or_destruction,
6627         finish_static_initialization_or_destruction,
6628         do_static_initialization, do_static_destruction,
6629         prune_vars_needing_no_initialization, write_out_vars,
6630         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6631         add_using_namespace, merge_functions, ambiguous_decl,
6632         lookup_using_namespace, lookup_using_namespace,
6633         qualified_lookup_using_namespace, set_decl_namespace,
6634         decl_namespace, current_decl_namespace, push_decl_namespace,
6635         pop_decl_namespace, push_scope, pop_scope, add_function,
6636         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6637         lookup_arg_dependent, do_namespace_alias,
6638         validate_nonmember_using_decl, do_nonmember_using_decl,
6639         do_toplevel_using_decl, do_local_using_decl,
6640         do_class_using_decl, do_using_directive, check_default_args,
6641         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
6642         * parser.c (cp_parser_class_head): Use booleanss.
6643         * decl.c (walk_globals, walk_vtables): Likewise.
6644         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6645         walk_globals): Change return type from 'int' to 'bool'.
6646         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6647         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6648         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6649         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6650         qualifier_flags, tinfo_base_init, generic_initializer,
6651         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6652         dfs_class_hint_unmark, class_hint_flags, class_initializer,
6653         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6654         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6655         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6656         * repo.c (repo_compile_flags, repo_template_declared,
6657         repo_template_defined, repo_class_defined, repo_get_id,
6658         repo_template_used, repo_vtable_used, repo_inline_used,
6659         repo_tinfo_used, repo_template_instantiated, extract_string,
6660         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6661         finish_repo): Likewise.
6662         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6663         cxx_print_xnode): Likewise..
6664         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6665         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6666         * cxxfilt.c (demangle_it, print_demangler_list, usage,
6667         standard_symbol_characters, hp_symbol_characters, main, fatal):
6668         Likewise.
6669         (strip_underscore):  Change type from 'int' to 'bool'.
6670         (main): Use boolean constants.
6672 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6674         Remove traditional C constructs 3/n.
6675         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6676         build_up_reference, warn_ref_binding, convert_to_reference,
6677         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6678         convert_to_void, convert, convert_force, build_type_conversion,
6679         build_expr_type_conversion, type_promotes_to,
6680         perform_qualification_conversions): Use C90 prototyping style.
6681         * decl2.c (grok_array_decl): Use boolean constant.
6682         (delete_sanity): Likewise.
6683         * typeck.c (build_unary_op): Likewise.
6684         * semantics.c (finish_switch_cond): Likewise.
6685         * parser.c (cp_parser_direct_new_declarator): Likewise.
6686         * init.c (build_new): Likewise.
6688 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6690         * Make-lang.in (po-generated): Remove parse.c.
6691         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
6692         ($(srcdir)/cp/parse.h): Remove target.
6693         ($(srcdir)/cp/parse.c): Likewise.
6694         (gt-cp-parse.h): Likewise.
6695         (gt-cp-parser.h): New target.
6696         (c++.distclean): Do not remove parse.output.
6697         (c++.maintainer-clean): Do not remove parse.c or parse.h.
6698         (cp/spew.o): Remove target.
6699         (cp/lex.o): Adjust dependencies.
6700         (cp/pt.o): Likewise.
6701         (cp/parse.o): Likewise.
6702         (cp/TAGS): Do not mention parse.c.
6703         (cp/parser.o): New target.
6704         * NEWS: Mention the new parser.
6705         * call.c (build_scoped_method_call): Simplify.
6706         (build_method_call): Likewise.
6707         (build_new_function_call): Adjust calls to add_function_candidate
6708         and add_template_candidate.
6709         (build_new_op): Improve handling of erroroneous operands.
6710         (convert_default_arg): Remove circular argument processing.
6711         (name_as_c_string): New function.
6712         (build_new_method_call): Use it.
6713         (perform_implicit_conversion): Use error_operand_p.
6714         * class.c (finish_struct_anon): Use constructor_name_p.
6715         (check_field_decls): Likewise.
6716         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6717         (resolve_address_of_overloaded_function): Likewise.
6718         (instantiate_type): Tweak pointer-to-member handling.
6719         (get_primary_binfo): Remove incorrect assertion.
6720         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6721         * cp-tree.h (DEFARG_TOKENS): New macro.
6722         (default_arg): New structure.
6723         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6724         (lang_tree_node): Add default_arg.
6725         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6726         (type_info_ref_type): New macro.
6727         (saved_scope): Make processing_explicit_instantiation a boolean.
6728         (check_access): New field.
6729         (unparsed_text): Remove.
6730         (language_function): Remove unparsed_inlines.
6731         (error_operand_p): New macro.
6732         (lang_decl): Adjust pending_inline_info.
6733         (DEFARG_POINTER): Remove.
6734         (tag_types): Add typenames.
6735         (lookup_ualified_name): Declare.
6736         (lookup_name_real): Likewise.
6737         (shadow_tag): Adjust prototype.
6738         (get_scope_of_declarator): Declare it.
6739         (process_next_inline): Remove it.
6740         (check_for_missing_semicolon): Likewise.
6741         (maybe_get_template_decl_from_type_decl): Declare it.
6742         (finish_label_stmt): Adjust prototype.
6743         (finish_non_static_data_meber): Declare it.
6744         (finish_pseudo_destructor_call_expr): Rename to ...
6745         (finish_pseudo_destructor_expr): ... this.
6746         (finish_compound_literal): Declare it.
6747         (begin_inline_definitions): Remove it.
6748         (init_spew): Remove.
6749         (peekyylex): Likewise.
6750         (arbitrate_lookup): Likewise.
6751         (frob_opname): Likewise.
6752         (maybe_snarf_defarg): Likewise.
6753         (add_defarg_fn): Likewise.
6754         (do_pending_defargs): Likewise.
6755         (done_pending_defargs): Likewise.
6756         (unprocessed_defarg_fn): Likewise.
6757         (replace_defarg): Likewise.
6758         (end_input): Likewise.
6759         (get_overloaded_fn): Likewise.
6760         * cvt.c (convert_to_reference): Improve error handling.
6761         * decl.c (lookup_name_real): Do not declare it static.
6762         (maybe_push_to_top_level): Set check_access.
6763         (identifier_type_value): Adjust call to lookup_name_real.
6764         (lookup_qualified_name): New method.
6765         (lookup_name_real): Remove special-case parsing code.
6766         (lookup_name-nonclass): Adjust call to lookup_name_real.
6767         (lookup_name_namespace_only): Likewise.
6768         (lookup_name): Likewise.
6769         (check_tag_decl): Return the type declared.
6770         (shadow_tag): Likewise.
6771         (register_dtor_fn): Tweak check_access.
6772         (grokfndecl): Use constructor_name_p.
6773         (get_scope_of_declarator): New function.
6774         (grokdeclarator): Obscure tweaks for slightly different declarator
6775         representations.
6776         (start_method): Return error_mark_node to indicate failure.
6777         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6778         * decl2.c (constructor_name_full): Simplify.
6779         (constructor_name): Use it.
6780         (build_expr_from_tree): Adjust for changes to do new parser.
6781         (push_scope): Improve robustness.
6782         (validate_nonmember_using_decl): Process declarations, not names.
6783         (do_class_using_decl): Likewise.
6784         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6785         here.
6786         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6787         * expr.c (cxx_expand_expr): Handle BASELINKs.
6788         * init.c (member_init_ok_or_else): Issue more errors.
6789         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6790         * lex.c: Do not include parse.h.
6791         (yypring): Do not declare.
6792         (yylval): Likewise.
6793         (make_reference_declarator): Remove error-generating code.
6794         (rid_to_yy): Remove.
6795         (cxx_init): Do not call init_spew.
6796         (yypring): Remove.
6797         (check_for_missing_semicolon): Remove.
6798         * lex.h (got_scope): Remove.
6799         (got_object): Remove.
6800         * method.c (hack_identifier): Use finish_non_static_data_member.
6801         (implicitly_declare_fn): Adjust use of constructor_name.
6802         * parser.c: New file.
6803         * pt.c (parse.h): Do not include it.
6804         (maybe_get_template_decl_from_template): Do not declare it.
6805         (finish_member_template_decl): Tweak.
6806         (begin_explicit_instantiation): Adjust for
6807         processing_explicit_instantiation being boolean.
6808         (end_explicit_instantiation): Likewise.
6809         (maybe_process_partial_specialization): Tighten specialization
6810         test.
6811         (retrieve_local_specialization): Adjust ue of hash table.
6812         (eq_local_specializations): New function.
6813         (register_local_specialization): Likewise.
6814         (push_template_decl_real): Remove unnecessary test.
6815         (maybe_get_template_decl_from_type_decl): Don't make it static.
6816         (for_each_template_parm_r): Handle TYPEOF_TYPE.
6817         (tsubst_copy): Use retrieive_local_specialization to handle
6818         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
6819         Handle COMPONENT_REFs with pseudo-destructor-expressions.
6820         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6821         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6822         (unify): Tweak handling of CONST_DECLs.
6823         (regenerate_decl_from_template): Use push_nested_class.
6824         (template_for_substitution): New funciton.
6825         (instantiate_decl): Use it.  Register parameters as local
6826         specializations.
6827         * rtti.c (init_rtti_processing): Set type_info_ref_type.
6828         (build_typeid): Use it.
6829         (get_typeid): Likeise.
6830         * search.c (accessible_p): Use check_access, not
6831         flag_access_control.
6832         (adjust_result_of_qualified_name_lookup): Pay attention to the
6833         context_class.
6834         * semantics.c (finish_asm_stmt): Adjust error handling.
6835         (finish_label_stmt): Return the statement.
6836         (finish_non_static_data_member): New function.
6837         (finish_class_expr): Handle BASELINKs.
6838         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6839         (finish_object_call_expr): Simplify handling during templates.
6840         (finish_pseudo_destructor_call_expr): Rename to ...
6841         (finish_pseudo_dtor_expr): ... this.
6842         (finish_compound_literal): New function.
6843         (begin_inline_definitions): Remove.
6844         (finish_sizeof): Remove special template handling.
6845         * spew.c: Do not include parse.h.
6846         * tree.c (get_overloaded_fn): Remove.
6847         * typeck.c (build_class_member_access_expr): Handle
6848         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
6849         (lookup_destructor): New function.
6850         (finish_class_member_access_expr): Use it.
6851         (convert_arguments): Simplify.
6852         (build_unary_op): Handle BASELINKs.
6854 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6856         PR c++/4803
6857         * decl2.c (mark_used): Defer inline functions.
6858         (finish_file): Merge deferred_fns loops. Check all used
6859         inline functions have a definition.
6860         * method.c (make_thunk): Thunks are not inline.
6862         PR c++/5116, c++/764
6863         * call.c (build_new_op): Make sure template class operands are
6864         instantiated.
6866 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6868         PR C++/7964
6869         * cp-tree.h (resolve_scoped_fn_name): Prototype.
6870         * call.c (resolve_scoped_fn_name): New function. Deal with
6871         more template expansion. Broken out of ...
6872         * parse.y (parse_finish_call_expr): ... here. Call it.
6873         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6874         resolve_scoped_fn_name and build_call_from_tree.
6876         PR c++/9053
6877         * decl.c (duplicate_decls): Templates may be disambiguated by
6878         return type.
6880         PR c++/8702
6881         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6882         conversion operators on failure.
6884 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6886         Remove traditional C constructs 2/n.
6887         * call.c (tourney, build_field_call, equal_functions, joust,
6888         compare_ics, build_over_call, build_java_interface_fn_ref,
6889         convert_like_real, op_error, build_object_call, resolve_args,
6890         build_vfield_ref, check_dtor_name, build_scoped_method_call,
6891         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6892         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6893         standard_conversion, reference_related_p,
6894         reference_compatible_p, convert_class_to_reference,
6895         direct_reference_binding, reference_binding,
6896         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6897         add_template_conv_candidate, any_viable, any_strictly_viable,
6898         build_this, splice_viable, print_z_candidates,
6899         build_user_type_conversion, build_new_function_call,
6900         conditional_conversion, build_conditional_expr, build_new_op,
6901         build_op_delete_call, enforce_access, call_builtin_trap,
6902         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6903         convert_default_arg, type_passed_as, convert_for_arg_passing,
6904         in_charge_arg_for_name, is_properly_derived_from,
6905         maybe_handle_implicit_object, maybe_handle_ref_bind,
6906         source_type, add_warning, can_convert, can_convert_arg,
6907         perform_implicit_conversion, can_convert_arg_bad,
6908         initialize_reference, add_conv_candidate,
6909         add_template_candidate_real, add_template_candidate): Ansify.
6911 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
6913         PR c++/8572
6914         * cp-tree.h (grokoptypename): Add SCOPE parameter.
6915         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6916         if in a template scope.
6917         * parse.y (unoperator): Return the scope.
6918         (operator_name): Adjust grokoptypename call.
6920 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6922         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6923         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
6924         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6926 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6928         * ChangeLog: Fix a typo.
6929         * class.c: Fix comment typos.
6930         * cp-tree.h: Likewise.
6932 2002-12-18  Jason Merrill  <jason@redhat.com>
6934         Handle anonymous unions at the tree level.
6935         C++ ABI change: Mangle anonymous unions using the name of their
6936         first named field (by depth-first search).  Should not cause
6937         binary compatibility problems, though, as the compiler previously
6938         didn't emit anything for affected unions.
6939         * cp-tree.def (ALIAS_DECL): New tree code.
6940         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
6941         first field, not the largest.
6942         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
6943         push the decl, and write it out at namespace scope.
6944         * decl.c (lookup_name_real): See through an ALIAS_DECL.
6945         (pushdecl): Add namespace bindings for ALIAS_DECLs.
6946         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6947         of a decl which doesn't have one.
6948         * typeck.c (build_class_member_access_expr): Don't recurse if
6949         we already have the type we want.
6951 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6953         PR c++/8099
6954         * friend.c (make_friend_class): Allow partial specialization
6955         when declaration is not a template friend.
6957 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6959         PR c++/3663
6960         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6961         TREE_PROTECTED to created decl nodes.
6963 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
6965         * class.c (build_base_field): Do not set DECL_PACKED on the
6966         FIELD_DECL.
6968 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6970         * cp-tree.h (struct tree_srcloc): Use location_t.
6971         (SOURCE_LOCUS): New.
6972         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6974 2002-12-17  Jason Merrill  <jason@redhat.com>
6976         * decl.c (finish_function): Also complain about no return in
6977         templates.
6978         * semantics.c (finish_return_stmt): Also call check_return_expr in
6979         templates.
6980         * typeck.c (check_return_expr): In a template, just remember that we
6981         saw a return.
6983 2002-12-16  Jason Merrill  <jason@redhat.com>
6985         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6986         of the CALL_EXPR.
6988         * semantics.c (do_pushlevel): Call pushlevel after adding the
6989         SCOPE_STMT.
6990         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
6991         * parse.y (function_body): Go back to using compstmt.
6992         * decl.c (pushdecl): Skip another level to get to the parms level.
6994         * call.c (build_new_method_call): Use is_dummy_object to determine
6995         whether or not to evaluate the object parameter to a static member
6996         function.
6998 2002-12-14  Jason Merrill  <jason@redhat.com>
7000         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
7001         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
7002         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
7003         don't bother with an AGGR_INIT_EXPR.
7004         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
7005         just generate a new decl normally.  Take return slot parm.
7006         * cp-tree.h: Adjust prototype.
7008 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7010         PR C++/8031
7011         * cvt.c (convert_to_pointer_force): Don't try comparing against
7012         erronous type.
7014 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
7016         * cp-tree.h: Have the multiple-include guards around
7017         the entire file.
7019 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
7021         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
7022         for SPEW_DEBUG.
7023         (snarf_method): Same.
7024         (snarf_defarg): Same.
7026 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
7028         PR c++/8372
7029         * pt.c (tsubst_copy): Handle destructor names more correctly.
7031 2002-12-10  Matt Austern   <austern@apple.com>
7033         * cp-tree.h: get rid of needs_virtual_reinit bit.
7035 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
7037         * NEWS: Document removal of in-class initialization extension for
7038         static data members of non-arithmetic, non-enumeration type.
7039         * decl.c (check_static_variable_definition): Do not allow that
7040         extension.
7041         * decl2.c (grokfield): Do not call digest_init when processing
7042         templates.
7044 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7046         * error.c (dump_expr): Fix format specifier warning.
7048 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
7050         * class.c (finish_struct_1): Correct comment.
7051         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
7053 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7055         PR C++/8799
7056         * error.c (dump_expr): Don't ever try to dump a non-existent
7057         expression.
7059 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7061         Implement covariant returns.
7062         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
7063         (struct lang_decl_flags): Add this_thunk_p flag.
7064         Rename vcall_offset to virtual_offset.
7065         (struct lang_decl): Rename delta to fixed_offset.
7066         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
7067         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
7068         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
7069         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
7070         (make_thunk): Add this_adjusting arg.
7071         (finish_thunk): Declare.
7072         (mangle_thunk): Add this_adjusting arg.
7073         * class.c (get_vcall_index): Use base function for lookup.
7074         (update_vtable_entry_for_fn): Generate covariant thunk.
7075         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
7076         (build_vtbl_initializer): Use base function for lookup.
7077         Finish covariant thunk here. Adjust thunk generation.
7078         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
7079         Adjust thunk dumping.
7080         * mangle.c (mangle_call_offset): New function.
7081         (mangle_thunk): Adjust for covariant thunks.
7082         * method.c (make_thunk): Adjust. Do not set name here.
7083         (finish_thunk): New function. Set name here.
7084         (use_thunk): Generate covariant thunks too.
7085         (thunk_adjust): New function.
7086         * search.c (covariant_return_p): Remove. Fold into ...
7087         (check_final_overrider): ... here. Simplify.
7088         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7090 2002-12-03  Jason Merrill  <jason@redhat.com>
7092         PR c++/8674
7093         * call.c (build_over_call): Check specifically for TARGET_EXPR
7094         when eliding.
7096         PR c++/8461, c++/8625
7097         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7098         (cp_convert_parm_for_inlining): Remove.
7099         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7100         Remove.
7101         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7102         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7104         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7105         an ambiguous conversion.
7107 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
7109         PR c++/8688
7110         * decl.c (reshape_init): Handle erroneous initializers.
7112 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
7114         PR c++/8720
7115         * spew.c (remove_last_token): Make sure that last_chunk is set
7116         correctly.
7118         PR c++/8615
7119         * error.c (dump_expr): Handle character constants with
7120         TREE_OVERFLOW set.
7122 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7124         DR 180
7125         * decl.c (grokdeclarator): Require class-key for all friend class.
7126         Output the correct type and context in the error message.
7128 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
7130         PR c++/5919
7131         * pt.c (unify): Use variably_modified_type_p to test validity of
7132         template argument types.
7134         PR c++/8727
7135         * cp-tree.h (lang_type_class): Add typeinfo_var.
7136         (CLASSTYPE_TYPEINFO_VAR): New macro.
7137         * rtti.c (get_tinfo_decl): Use it.
7139         PR c++/8663
7140         * init.c (expand_member_init): Always get the main variant of a
7141         base class.
7143 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
7145         PR c++/8332
7146         PR c++/8493
7147         * decl.c (cxx_init_decl_processing): Use size_type_node, not
7148         c_size_type_node.
7149         * decl2.c (coerce_new_type): Likewise.
7150         * except.c (do_allocate_exception): Likewise.
7152 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
7154         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7155         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7156         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7157         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7158         typeck2.c: Include coretypes.h and tm.h.
7159         * Make-lang.in: Update dependencies.
7161 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
7163         PR c++/8227
7164         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7165         (check_initializer): Validate the type of the initialized
7166         variable, even if the initializer is absent.
7167         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7169         PR c++/8214
7170         * typeck.c (convert_for_assignment): Do not use
7171         decl_constant_value on the operand.
7173         PR c++/8511
7174         * pt.c (instantiate_decl): Handle template friends defined outside
7175         of the class correctly.
7177 2002-11-29  Joe Buck <jbuck@synopsys.com>
7179         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7180         anonymous structs.
7182 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
7184         * class.c (walk_subobject_offsets): Recur on binfos as well as on
7185         types.
7186         (layout_nonempty_base_or_field): Pass it a binfo when processing a
7187         base class.
7188         (layout_empty_base): Likewise.
7189         (build_base_field): Likewise.
7191 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
7193         * class.c (build_base_field): Make sure we get the canonical base
7194         when descending through primary bases.
7196 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
7198         * decl.c (check_initializer): Don't error on initialisation of
7199         a scalar with a brace-enclosed expression.
7201 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
7203         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7204         (template_parms_equal): Remove prototype.
7205         * typeck.c (buuld_indirect_ref): Reformat.
7207 2002-11-25  Jason Merrill  <jason@redhat.com>
7209         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7210         and a DO_STMT.
7212 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
7214         * tree.c (cp_build_qualified_type_real): Correct handling of
7215         array types.
7216         * class.c (walk_subobject_offsets): Fix thinko.
7217         (build_base_field): Record offsets of empty bases in primary
7218         virtual bases.
7219         (layout_class_type): Record offsets of empty bases in fields.
7221         * search.c (is_subobject_of_p_1): Fix thinko.
7222         (lookup_field_queue_p): Likewise.
7224 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
7226         * class.c (layout_class_type): Reuse tail padding when laying out
7227         virtual bases.
7229 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
7231         * rtti.c (qualifier_flags): Fix thinko.
7233 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7235         Remove traditional C constructs 1/n.
7236         * cp-tree.h (init_method, set_mangled_name_for_decl,
7237         build_opfncall, hack_identifier, make_thunk, use_thunk,
7238         synthesize_method, implicitly_declare_fn,
7239         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7240         maybe_clone_body): Remove use of PARAMS.
7242         * method.c (do_build_assign_ref, do_build_copy_constructor,
7243         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7244         Likewise.
7245         (synthesize_method): Use 'bool' type and constants instead of
7246         'int'.
7247         (locate_copy): Likewise.
7248         (implicitly_declare_fn): Likewise.
7250         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7251         Remove old-style declaration.
7252         (maybe_clone_body): Use 'bool' type and constants.
7254 2002-11-21  Glen Nakamura  <glen@imodulo.com>
7256         PR c++/8342
7257         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7258         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7259         of the branches of a COND_EXPR.
7261 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
7263         * pt.c (for_each_template_parm): Free allocated memory.
7264         * search.c (is_subobject_of_p_1): New function.
7265         (is_subobject_of_p): Avoid walking virtual bases multiple times.
7267 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
7269         * g++spec.c (lang_specific_spec_functions): New.
7271 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
7273         * ChangeLog: Follow spelling conventions.
7274         * class.c: Likewise.
7275         * decl2.c: Likewise.
7277 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
7279         * search.c (dfs_push_decls): Do not try to reorder elements
7280         3..n of method_vec if method_vec has only two elements.
7281         Reverse order of two tests to avoid accessing unallocated
7282         memory.
7284 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
7286         * class.c (dfs_find_final_overrider): Adjust so that the most
7287         derived object is a binfo, rather than a class type.
7288         (find_final_overrider): Likewise.
7289         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7290         (add_vcall_offset): Likewise.
7292 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7294         PR c++/8389
7295         * pt.c (instantiate_template): Push class scope for member
7296         functions.
7297         (get_mostly_instantiated_function_type): Likewise.  Don't call
7298         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
7299         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7300         * mangle.c (write_encoding, write_unqualified_name): Adjust.
7302 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
7304         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7305         vcall offfsets.  Split out ...
7306         (add_vcall_offset): ... new function.
7308         PR c++/8338
7309         * pt.c (for_each_template_parm): Add htab parameter.
7310         (process_partial_specialization): Adjust call.
7311         (push_template_decl_real): Likewise.
7312         (pair_fn_data): Add visited.
7313         (for_each_template_parm_r): Avoid walking duplicates more than
7314         once.
7315         (uses_template_parms): Adjust call to for_each_template_parm.
7317 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
7319         * class.c (add_implicitly_declared_members): Put implicitly
7320         declared functions at the end of TYPE_METHODs when -fabi-version
7321         is at least 2.
7323 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
7325         * decl2.c (finish_file): Correct spelling.
7327 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
7329         * call.c (build_special_member_call): Do not try to lookup VTTs by
7330         name.
7331         * class.c (vtbl_init_data): Add generate_vcall_entries.
7332         (get_vtable_decl): Do not look up virtual tables by name.
7333         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7334         (set_primary_base): Do not set CLASSTYPE_RTTI.
7335         (determine_primary_base): Likewise.
7336         (get_matching_virtual): Remove.
7337         (get_vcall_index): New function.
7338         (update_vtable_entry_for_fn): Do not try to use virtual thunks
7339         when they are not required.  Assign vcall indices at this point.
7340         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7341         Do update dynamic_classes.
7342         (build_vtt): Do not add VTTs to the symbol table.
7343         (build_ctor_vtbl_group): Likewise.
7344         (build_vtbl_initializer): Simplify handling of vcall indices.
7345         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7346         for the most derived class.
7347         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7348         the vtable.
7349         * cp-tree.h (dynamic_classes): New macro.
7350         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
7351         (CLASSTYPE_RTTI): Remove.
7352         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7353         (CLASSTYPE_VCALL_INDICES): New macro.
7354         (CLASSTYPE_VTABLES): Likewise.
7355         (BV_USE_VCALL_INDEX_P): Remove.
7356         (build_vtable_path): Remove.
7357         * decl2.c (finish_vtable_vardecl): Remove.
7358         (key_method): Remove #if 0'd code.
7359         (finish_vtable_vardecl): Rename to ...
7360         (maybe_emit_vtables): ... this.
7361         (finish_file): Use it.
7362         * search.c (look_for_overrides_here): Update comment.
7364 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
7366         PR c/7353 redux
7367         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7369 2002-10-30  Jason Merrill  <jason@redhat.com>
7371         PR c++/8186
7372         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7373         * call.c (convert_for_arg_passing): Set it.
7374         * except.c (stabilize_throw_expr): Recurse for such an arg.
7376 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
7378         * cp-tree.h (lang_decl_flags): Remove init_priority.
7379         (lang_decl): Add delta.
7380         (GLOBAL_INIT_PRIORITY): Remove.
7381         (THUNK_DELTA): Revise definition.
7382         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7383         * dump.c (cp_dump_tree): Don't dump it.
7385 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
7387         PR c++/8160
7388         * typeck2.c (process_init_constructor): Call complete_array_type.
7390         PR c++/8149
7391         * decl.c (make_typename_type): Issue errors about invalid results.
7393 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7395         Core issue 287, PR c++/7639
7396         * cp-tree.h (lang_type_class): Add decl_list field.
7397         (CLASSTYPE_DECL_LIST): New macro.
7398         (maybe_add_class_template_decl_list): Add declaration.
7399         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7400         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7401         (maybe_add_class_template_decl_list): New function.
7402         (add_implicitly_declared_members): Use it.
7403         * decl.c (maybe_process_template_type_declaration): Likewise.
7404         (pushtag): Likewise.
7405         * friend.c (add_friend): Likewise.
7406         (make_friend_class): Likewise.
7407         * semantics.c (finish_member_declaration): Likewise.
7408         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7409         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7410         to process members and friends in the order of declaration.
7412 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
7414         PR c++/8287
7415         * decl.c (finish_destructor_body): Create the label to jump to
7416         when returning from a destructor here.
7417         (finish_function_body): Rather than here.
7419 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
7421         PR c++/7266
7422         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7423         SCOPE_REF is not null before dereferencing it.
7425 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
7427         * call.c (build_over_call): Use DECL_CONTEXT, not
7428         DECL_VIRTUAL_CONTEXT.
7429         * class.c (modify_vtable_entry): Don't mess with
7430         DECL_VIRTUAL_CONTEXT.
7431         (set_vindex): Remove.
7432         (set_primary_base): Remove vfuns_p parameter.
7433         (determine_primary_base): Likewise.
7434         (modify_all_vtables): Likewise.
7435         (layout_class_type): Likewise.  Adjust calls to other functions
7436         accordingly.
7437         (finish_struct_1): Adjust calls to modified functions.  Set
7438         DECL_VINDEX here.
7439         * cp-tree.h (lang_type_class): Remove vsize.
7440         (CLASSTYPE_VSIZE): Remove.
7441         (lang_decl): Remove thunks.
7442         (DECL_THUNKS): Adjust.
7443         (DECL_VIRTUAL_CONTEXT): Remove.
7444         (duplicate_decls): Don't copy it.
7445         * pt.c (build_template_decl): Don't set it.
7446         (tsubst_decl): Likewise.
7447         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7449         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7450         (build_vtable_entry): Remove.
7451         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7452         (lang_decl): Add thunks.
7453         (DECL_THUNKS): New macro.
7454         * decl.c (duplicate_decls): Copy it.
7455         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7456         * semantics.c (emit_associated_thunks): Simplify.
7458 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
7460         PR c++/7228
7461         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7462         lang_type structure exists before accessing field.
7463         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7464         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7465         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7466         * class.c (check_field_decls): Use new macros.
7467         * typeck2.c (process_init_constructor): Remove redundant check for
7468         existence of lang_type structure.
7470 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
7472         * class.c (end_of_base): New method.
7473         (end_of_class): Use it.  Check indirect virtual bases.
7475         * class.c (check_field_decls): Fix typo.
7477 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
7479         PR c++/8067
7480         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7481         related variables.
7483         PR c++/7679
7484         * spew.c (next_token): Do not return an endless stream of
7485         END_OF_SAVED_INPUT tokens.
7486         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7487         the cached token stream.
7488         (snarf_defarg): Likewise.
7490 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
7492         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7493         variably_modified_type_p.
7494         * cp-tree.h: Remove prototype of variably_modified_type_p.
7495         * tree.c (variably_modified_type_p): Remove; now implemented
7496         in language-independent code.
7498 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
7500         PR c++/6579
7501         * spew.c (snarf_parenthesized_expression): New function.
7502         (snarf_block): Use it.
7504 2002-10-22  Richard Henderson  <rth@redhat.com>
7506         * method.c (use_thunk): Always compute vcall_value; assert that
7507         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
7508         for vcall thunks as well.
7510 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
7512         * class.c (empty_base_at_nonzero_offset_p): New function.
7513         (layout_nonempty_base_or_field): Do not check for conflicts when
7514         laying out a virtual base using the GCC 3.2 ABI.
7515         (build_base_field): Correct checking for presence of empty classes
7516         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7518         * class.c (include_empty_classes): Use normalize_rli.
7519         (layout_class_type): Likewise.
7521         * decl.c (reshape_init): Tweak handling of character arrays.
7523         PR c++/8218
7524         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7525         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7526         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7527         (check_field_decls): Likewise.
7528         (layout_class_type): Likewise.
7529         (finish_struct_1): Initialize it.
7530         (walk_subobject_offsets): Use it to prune searches.
7532 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
7534         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7535         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7536         TARGET_ASM_OUTPUT_MI_THUNK in comments.
7538 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
7540         * decl.c (start_decl): Point users of the old initialized-
7541         typedef extension at __typeof__.
7543 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7545         * Make-lang.in (method.o): Depend on TARGET_H.
7546         * method.c (target.h): Include it.
7547         (use_thunk): Use target hooks.  Use vcall thunks, if available.
7549 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7551         * class.c (base_derived_from): Make sure return value is a bool.
7553 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7555         * class.c (find_final_overrider_data_s): Remove overriding_fn and
7556         overriding_base.
7557         (dfs_base_derived_from): New function.
7558         (base_derived_from): Likewise.
7559         (dfs_find_final_overrider): Use base_derived_from.
7560         (find_final_overrider): Adjust.
7562 2002-10-18  Jason Merrill  <jason@redhat.com>
7564         PR c++/8080
7565         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7566         with condition decls in a template.
7568 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
7570         * class.c (add_method): Compare template parms too.
7572 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
7574         PR c++/7584
7575         * class.c (handle_using_decl): Allow the declaration used to be
7576         from an ambiguous base.
7578         * pt.c (convert_template_argument): Revert this change:
7579                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7580                 * pt.c (convert_template_argument): Do not fold non-type
7581                 template rguments when inside a template.
7583         * init.c (expand_default_init): Handle brace-enclosed initializers
7584         correctly.
7586 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7588         * mangle.c (write_expression): Correct handling of enumeration
7589         constants.
7590         (write_template_arg): Likewise.
7591         * pt.c (convert_template_argument): Do not fold non-type template
7592         arguments when inside a template.
7594         PR c++/7478
7595         * cvt.c (convert_to_reference): Allow references as the incoming
7596         type.
7598 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7600         PR c++/7524
7601         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7602         build_qualified_type.
7604 2002-10-15  Richard Henderson  <rth@redhat.com>
7606         * error.c (dump_expr): Use real_to_decimal directly, and with
7607         the new arguments.
7609 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
7611         * decl.c (reshape_init): Fix typo.
7613         * cp-tree.h (operator_name_info_t): Add arity.
7614         * lex.c (init_operators): Initialize it.
7615         * mangle.c (write_conversion_operator_name): New function.
7616         (write_unqualified_name): Use it.
7617         (write_template_args): Accept template arguments as a TREE_LIST.
7618         (write_expression): Adjust handling of qualified names to match
7619         specification.
7621 2002-10-15  Jason Merrill  <jason@redhat.com>
7623         * call.c (call_builtin_trap): New fn.
7624         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
7625         (build_call): Don't set current_function_returns_abnormally outside
7626         a function.
7628 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7630         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
7631         clear CLASSTYPE_EMPTY_P.
7632         (build_base_field): Likewise.
7633         (build_base_fields): Likewise.
7634         (check_bases_and_members): Likewise.
7635         (create_vtbl_ptr): Likewise.
7636         (layout_class_type): Likewise.  Ensure that empty classes have
7637         size zero when used as base classes in the 3.2 ABI.
7638         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7639         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
7640         parameter.
7641         (is_empty_class): Correct definition when using post-3.2 ABI.
7642         * cp-tree.h (lang_type_class): Add empty_p.
7643         (CLASSTYPE_EMPTY_P): New macro.
7645 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7647         * init.c (build_delete): Do not apply save_expr for arrays.
7648         (build_vec_delete): Likewise.
7650 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7652         * decl.c (layout_var_decl): Call layout_decl even for variables
7653         whose type is an array with unspecified bounds.
7655         PR c++/7176
7656         * lex.c (do_identifier): Add another option for the parsing
7657         parameter.
7658         * parse.y (do_id): Use it.
7660 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7662         PRs C++/6803, C++/7721 and C++/7803
7663         * decl.c (grokdeclarator): Gracefully handle template-name as
7664         decl-specifier.
7666 2002-10-11  Jason Molenda  <jmolenda@apple.com>
7668         * init.c (build_field_list): Provide uses_unions_p with a default
7669         value.
7671 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
7673         PR c++/5661
7674         * cp-tree.h (variably_modified_type_p): New function.
7675         (grokdeclarator) Tighten check for variably modified types as
7676         fields.
7677         * pt.c (convert_template_argument): Do not allow variably modified
7678         types as template arguments.
7679         * tree.c (variably_modified_type_p): New function.
7681         * NEWS: Document removal of "new X = ..." extension.
7682         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7683         brace-enclosed initializers.
7684         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7685         (initialize_local_var): Remove declaration.
7686         (expand_static_init): Likewise.
7687         * decl.c (next_initializable_field): New function.
7688         (reshape_init): Likewise.
7689         (check_initializer): Use them.  Build dynamic initializer for
7690         aggregates here too.
7691         (initialize_local_var): Simplify, and incorporate cleanup
7692         insertion code as well.
7693         (destroy_local_var): Remove.
7694         (cp_finish_decl): Tidy.
7695         (expand_static_init): Fold checks for whether or not a variable
7696         needs initialization into this function.  Simplify.
7697         * decl2.c (do_static_initialization): Simplify.
7698         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7699         be done for us automatically.
7700         (expand_default_init): Handle brace-enclosed initializers
7701         correctly.
7702         (expand_aggr_init_1): Remove RTL-generation code.
7703         (build_vec_init): Remove "new X = ..." support.
7704         * parse.y (new_initializer): Likewise.
7705         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7706         brace-enclosed initializer.
7707         (create_pseudo_type_info): Likewise.
7708         * typeck2.c (store_init_value): Don't try to handle digest_init
7709         being called more than once.
7710         (digest_init): Tidy handling of brace-enclosed initializers.
7712 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7714         * decl.c (typename_hash): Use htab_hash_pointer.
7716 2002-10-10  Jim Wilson  <wilson@redhat.com>
7718         * decl.c (duplicate_decls): Don't call decl_attributes.
7720 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
7722         PR c/7353
7723         * decl.c (start_decl): Unconditionally issue error for
7724         'typedef foo = bar'.
7725         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7726         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7728 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7730         * decl2.c (prune_vtable_vardecl): Delete unused function.
7732 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7734         PR c++/7754
7735         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7736         procesing template functions.
7737         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7738         type. Call layout_decl.
7739         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7741 2002-10-07  Richard Henderson  <rth@redhat.com>
7743         * decl2.c, pt.c: Revert c++/7754 fix.
7745 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7747         PR c++/7804
7748         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7750 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7752         PR c++/7931
7753         * pt.c (for_each_template_parm_r): Handle BASELINKs.
7755         PR c++/7754
7756         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7757         procesing template functions.
7758         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7759         type. Call layout_decl.
7760         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7762 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7764         PR c++/8006
7765         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7766         template parameters.
7767         (globals): Add entity and need_abi_warning.
7768         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7769         CLASSTYPE_TEMPLATE_INFO.
7770         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7771         TYPE_TI_TEMPLATE.
7772         (write_prefix): Handle typename types correctly.
7773         (write_template_prefix): Handle template template parameters
7774         correctly.
7775         (start_mangling): Add entity parameter.
7776         (finish_mangling): Warn about names whose mangling will change.
7777         (mangle_decl_string): Adjust.
7778         (mangle_type_string): Likewise.
7779         (mangle_special_for_type): Likewise.
7780         (mangle_ctor_vtbl_for_type): Likewise.
7781         (mangle_thunk): Likewise.
7782         (mangle_guard_variable): Likewise.
7783         (mangle_ref_init_variable): Likewise.
7785 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
7787         PR c++/7188.
7788         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7789         * cp-tree.h (emit_base_init): Rename to ....
7790         (emit_mem_initializers): ... this.
7791         (expand_member_init): Change prototype.
7792         * init.c (perform_member_init): Compute explicit, rather than
7793         requiring it as a parameter.
7794         (sort_member_init): Rename to ...
7795         (sort_mem_initializers): ... this.  Process bases and data members
7796         together.
7797         (sort_base_init): Remove.
7798         (emit_base_init): Rename to ...
7799         (emit_mem_initializers): ... this.
7800         (expand_aggr_vbase_init_1): Remove.
7801         (construct_virtual_bases): Rename to ...
7802         (construct_virtual_base): ... this.
7803         (expand_member_init): Rework handling of base initializers.
7804         * method.c (do_build_copy_constructor): Use
7805         finish_mem_initializers.
7806         * parse.y (member_init): Adjust calls to expand_member_init.
7807         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7808         (tsubst_initializer_list): Use expand_member_init.
7809         * semantics.c (finish_mem_intiailizers): Simplify.
7811 2002-10-02  Matt Austern  <austern@apple.com>
7812         * decl.c (walk_vtables_r): Fixed typo that caused result to
7813         never get a nonzero value.
7815 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7817         PR optimization/6627
7818         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7819         from here, and move it to tree.h.
7820         * decl.c (cxx_init_decl_processing): If storing the vbit
7821         in function pointers, ensure that force_align_functions_log
7822         is atleast one.
7824 2002-10-02  Matt Austern  <austern@apple.com>
7826         * class.c (check_field_decls): Changed warning about const member
7827         variables so that it doesn't get issued for a class aggregate.
7829 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7831         * decl.c (cp_finish_decl): Make sure array types are laid out,
7832         even if the array bounds are unknown.
7834 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
7836         * class.c (build_vtbl_initializer): Change build_c_cast
7837         to build1.
7839 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7841         * decl.c (cp_finish_decl): Make sure array types are laid out,
7842         even if the array bounds are unknown.
7844         * decl.c (cp_finish_decl): Correct check for dynamic
7845         initialization of thread-local storage.
7847 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
7849         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7850         overloaded.
7852 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
7854         * class.c (build_vtbl_initializer): Add cast.
7855         (add_vcall_offset_vtbl_entries_1):
7856         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7858 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
7860         * class.c (walk_subobject_offsets): Correct the calculation of
7861         offsets for virtual bases.  Correct the counting of array
7862         elements.
7863         (layout_nonempty_base_or_field): Simplify.  Correct the
7864         calculation of offsets to be propagated through the binfo
7865         hierarchy.
7866         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7867         Add the FIELD_DECL to TYPE_FIELDS.
7868         (build_base_fields): Adjust accordingly.
7869         (layout_virtual_bases): Use build_base_field.
7870         (end_of_class): Return a tree, not an integer.
7871         (warn_about_ambiguous_direct_bases): Rename to ...
7872         (warn_about_ambiguous_bases): ... this.
7873         (include_empty_classes): New function.
7874         (layout_class_type): Create an alternative version of the type to
7875         be used when as a base class type.  Do not call
7876         finish_record_layout until we are done laying out the class.
7877         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
7878         as_base.
7879         (CLASSTYPE_SIZE): Reimplement.
7880         (CLASSTYPE_SIZE_UNIT): Likewise.
7881         (CLASSTYPE_ALIGN): Likweise.
7882         (CLASSTYPE_USER_ALIGN): Likewise.
7883         (CLASSTYPE_AS_BASE): New macro.
7884         (DECL_INITIALIZED_P): Likewise.
7885         (extract_init): Remove prototype.
7886         (build_forced_zero_init): Rename to ...
7887         (build_zero_init): ... this.
7888         (force_store_init_value): Remove.
7889         * decl.c (obscure_complex_init): Remove.
7890         (duplicate_decls): Copy DECL_INITIALIZED_P.
7891         (check_initializer): Do not leave junk in DECL_INITIAL.
7892         (cp_finish_decl): Handle zero-initialization of entities with
7893         static storage duration.
7894         * expr.c (extract_init): Remove.
7895         * init.c (build_forced_zero_init): Remove.
7896         (build_zero_init): New function.
7897         (build_default_init): Use it.
7898         (build_field_list): Skip FIELD_DECLs for base subobjects.
7899         (push_base_cleanups): Likewise.
7900         * method.c (do_build_assign_ref): Likewise.
7901         (synthesize_exception_spec): Likewise.
7902         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7903         (regenerate_decl_from_template): To not set DECL_INITIAL for a
7904         static data member whose initialization took place in its class.
7905         (instantiate_decl): Do not pass an initializer to cp_finish_decl
7906         in that situation.
7907         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7908         (dfs_unuse_fields): Likewise.
7909         * tree.c (pod_type_p): Handle error_mark_node.
7910         (zero_init_p): Likewise.
7911         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7912         subobjects.
7913         * typeck2.c (store_init_value): Remove #if 0'd code.
7914         (force_store_init_value): Remove.
7915         (process_init_constructor): Use build_zero_init.
7917 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
7919         PR c++/7788
7920         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7922 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
7924         * cp-tree.h: Fix comment typos.
7925         * decl.c: Likewise.
7926         * pt.c: Likewise.
7928 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
7930         * cp/class.c (contains_empty_class_p): New method.
7931         (walk_subobject_offsets): Correct computation of field offset.
7932         (layout_empty_base): Correct placement of emtpy base classes.
7933         (layout_class_type): Warn about ABI changes.
7935 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
7937         * cp/class.c (layout_virtual_bases): Do not round the size of the
7938         type to a multiple of the alignment before laying out virtual bases.
7939         (layout_class_type): Correct handling of bit-fields that are wider
7940         than their type inside unions.  Round the size of the type to a
7941         even number of bytes when computing the size without virtual
7942         bases.
7943         * cp/cp-tree.h (abi_version_at_least): New macro.
7945 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
7947         * ChangeLog: Follow spelling conventions.
7948         * ChangeLog.2: Likewise.
7949         * call.c: Likewise.
7950         * class.c: Likewise.
7951         * cp-tree.h: Likewise.
7952         * cvt.c: Likewise.
7953         * decl.c: Likewise.
7954         * decl2.c: Likewise.
7955         * except.c: Likewise.
7956         * friend.c: Likewise.
7957         * g++spec.c: Likewise.
7958         * init.c: Likewise.
7959         * lex.c: Likewise.
7960         * mangle.c: Likewise.
7961         * method.c: Likewise.
7962         * operators.def: Likewise.
7963         * optimize.c: Likewise.
7964         * pt.c: Likewise.
7965         * rtti.c: Likewise.
7966         * search.c: Likewise.
7967         * semantics.c: Likewise.
7968         * spew.c: Likewise.
7969         * tree.c: Likewise.
7970         * typeck.c: Likewise.
7972 2002-09-18  Devang Patel  <dpatel@apple.com>
7974         * cp/cp-tree.h: New prototype for walk_vtabls().
7975         * cp/decl.c (walk_vtables_r): New function.
7976         (struct cp_binding_level): Add new members, namespaces,
7977         names_size and vtables.
7978         (add_decl_to_level): Add decl in namespaces or vtables
7979         chain, if conditions match.
7980         (walk_vtables): New function.
7981         (walk_namespaces_r): Travers separate namespace chain
7982         for namespace decls.
7983         (wrapup_globals_for_namespace): Use names_size instead
7984         of list_length().
7985         * cp/decl2.c (finish_file): Use walk_vtables() instead of
7986         walk_globals() to walk vtable decls.
7988 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
7990         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
7991         ICE with invalid pointers & references.
7993 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
7995         * Make-lang.in: Remove all references to the demangler.
7996         * cxxfilt.c: Moved to binutils.
7998 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
8000         PR c++/7718
8001         * pt.c (tsubst_decl): Remove assert.
8003         Remove DR 295 implementation.
8004         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
8005         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
8006         about ignoring volatile qualifiers.
8008         * search.c (lookup_member): Correct documentation.
8010 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
8012         * cp-tree.h (union lang_tree_node): Add chain_next option.
8014 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
8016         * parse.y (parse_finish_call_expr): Check lookup_member result.
8018         PR c++/7015
8019         * semantic.c (finish_asm_stmt): Fix operand/output_operands
8020         thinko.
8021         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
8023 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
8025         PR c++/7919
8026         * call.c (build_over_call): Convert this pointer for fns found by
8027         using decls.
8029 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
8031         * ChangeLog: Follow spelling conventions.
8032         * ChangeLog.1: Likewise.
8034 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
8036         PR c++/7768
8037         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
8039 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
8041         * error.c: Fix comment formatting.
8042         * except.c: Likewise.
8043         * expr.c: Likewise.
8044         * friend.c: Likewise.
8045         * g++spec.c: Likewise.
8046         * init.c: Likewise.
8047         * lex.c: Likewise.
8048         * mangle.c: Likewise.
8049         * method.c: Likewise.
8050         * optimize.c: Likewise.
8051         * pt.c: Likewise.
8052         * rtti.c: Likewise.
8053         * search.c: Likewise.
8054         * semantics.c: Likewise.
8055         * spew.c: Likewise.
8056         * tree.c: Likewise.
8057         * typeck.c: Likewise.
8058         * typeck2.c: Likewise.
8060 2002-09-13  Matt Austern  <austern@apple.com>
8062         PR C++/7828
8063         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
8064         * cp/call.c: Change call-by-const-reference mechanism to use
8065         non_cast_lvalue_p when deciding whether the create a temporary.
8066         We need a temporary when passing, e.g. (long) x by const ref.
8068 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
8070         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
8072 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
8074         * decl.c: Fix comment formatting.
8075         * decl2.c: Likewise.
8077 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
8079         * call.c: Fix comment formatting.
8080         * class.c: Likewise.
8081         * cp-lang.c: Likewise.
8082         * cp-tree.h: Likewise.
8083         * cvt.c: Likewise.
8085 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
8087         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8088         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8089         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8090         minor adjustments (use version_string, eliminate yet another
8091         duplicate of xmalloc)
8093 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8095         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8097 2002-09-05  Jason Merrill  <jason@redhat.com>
8099         * typeck2.c (add_exception_specifier): Only pedwarn for an
8100         incomplete type.
8101         (require_complete_eh_spec_types): New fn.
8102         (cxx_incomplete_type_diagnostic): Also support pedwarning.
8103         * typeck.c (complete_type_or_diagnostic): Likewise.
8104         * call.c (build_call): Call require_complete_eh_spec_types.
8105         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8106         on an incomplete type.
8108 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
8110         * decl.c (start_cleanup_fn): Clear interface_only before
8111         start_function, restore it afterwards.
8113 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
8115         * cp-tree.h (finish_builtin_type): Remove.
8116         * decl2.c (finish_builtin_type): Move to common code.
8117         * decl.c (build_ptrmemfunc_type): Adjust.
8118         * rtti.c (create_pseudo_type_info): Adjust.
8119         (create_tinfo_types): Adjust.
8121 2002-08-31  Jason Merrill  <jason@redhat.com>
8123         * cp-lang.c (cp_expr_size): Allow initialization from a
8124         CONSTRUCTOR.
8126 2002-08-30  Richard Henderson  <rth@redhat.com>
8128         PR opt/7515
8129         * tree.c: Include target.h.
8130         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8131         don't bind locally.
8132         * Makefile.in (tree.o): Update.
8134 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
8136         * class.c (layout_virtual_bases): Warn about bugs in G++ that
8137         result in incorrect object layouts.
8138         (layout_class_type): Likewise.
8140 2002-08-24  Matt Austern  <austern@apple.com>
8142         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8143         are allowable.
8144         (real_lvalue_p): Update caller.
8145         (lvalue_p): Ditto.
8146         (non_cast_lvalue_or_else): New.
8147         * tree.h: Declare it.
8148         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8150 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
8152         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8153         and COND_EXPR specially; fix error message output.
8155 2002-08-22  Jason Merrill  <jason@redhat.com>
8157         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8158         * semantics.c (nullify_returns_r): Likewise.
8160 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
8162         Fix PR/7621
8163         * typeck.c (finish_class_member_access_expr): Diagnose cases where
8164         name lookup finds nothing.
8166 2002-08-15  Jason Merrill  <jason@redhat.com>
8168         * semantics.c (finish_then_clause): Remove redundant assignment.
8169         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8170         extra binding level outside the if/switch statement.
8171         (finish_while_cond, finish_for_cond): Rewrite complex condition
8172         into the loop body.
8174 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
8176         * parse.y (sizeof, alignof, typeof): New non-terminals to
8177         increment skip_evaluation.  Replace terminals with them and
8178         decrement skip_evaluation at the end of rules using them.
8179         * decl2.c (mark_used): Don't assemble_external if
8180         skipping evaluation.
8182 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
8184         Fix PR/7504
8185         * parse.y (parse_finish_call_expr): Handle incomplete
8186         type used to name a scope.
8188 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
8190         PR c++/7598
8191         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8192         regression caused by my 2002-08-08 patch.
8194 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
8196         * decl.c (pushdecl_class_level): Honor requests to bind names to
8197         OVERLOADs.
8199 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8201         * decl2.c (build_call_from_tree): Fix uninitialized variable.
8202         * parse.y (parse_finish_call_expr): Likewise.
8203         * repo.c (old_args, old_dir, old_main): Const-ify.
8205 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
8207         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8208         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8209         * optimize.c (maybe_clone_body): Likewise.
8210         * pt.c (tsubst_enum): Likewise.
8211         (lookup_template_class): Likewise.
8212         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8214 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
8216         * lang-specs.h: Remove -ansi.
8218 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
8220         * tree.c (maybe_dummy_object): Replace // with /* */
8222 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
8224         * call.c (standard_conversion): Use build_ptrmem_type.
8225         * cp-tree.h (build_ptrmem_type): New function.
8226         (adjust_result_of_qualified_name_lookup): Likewise.
8227         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8228         static data members.
8229         (build_ptrmem_type): New function.
8230         (grokdeclarator): Do not use build_offset_type when encountering a
8231         qualified name.
8232         * parse.y (parse_finish_call_expr): Use
8233         adjust_result_of_qualified_name_lookup.
8234         * search.c (adjust_result_of_qualified_name_lookup): New function.
8235         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8236         accessing OFFSET_TYPEs directly.
8238 2002-08-08  Mike Stump  <mrs@apple.com>
8240         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8241         (type_decays_to): Likewise.
8242         * class.c (find_final_overrider): Likewise.
8243         (maybe_note_name_used_in_class): Likewise.
8244         * decl.c (current_tmpl_spec_kind): Likewise.
8245         (add_binding): Likewise.
8246         (push_class_binding): Likewise.
8247         (duplicate_decls): Likewise.
8248         (layout_var_decl): Likewise.
8249         (grokfndecl): Likewise.
8250         (grokdeclarator): Likewise.
8251         (check_default_argument): Likewise.
8252         * decl2.c (handle_class_head): Likewise.
8253         * error.c (dump_template_decl): Likewise.
8254         * init.c (build_offset_ref): Likewise.
8255         * pt.c (check_specialization_scope): Likewise.
8256         (determine_specialization): Likewise.
8257         (check_explicit_specialization): Likewise.
8258         (maybe_check_template_type): Likewise.
8259         (process_partial_specialization): Likewise.
8260         (check_default_tmpl_args): Likewise.
8261         (push_template_decl_real): Likewise.
8262         (convert_template_argument): Likewise.
8263         (try_class_unification): Likewise.
8264         (get_bindings_real): Likewise.
8265         (do_decl_instantiation): Likewise.
8266         * semantics.c (begin_function_definition): Likewise.
8267         (finish_member_declaration): Likewise.
8268         (check_multiple_declarators): Likewise.
8269         * typeck.c (comp_array_types): Likewise.
8270         (comptypes): Likewise.
8271         (expr_sizeof): Likewise.
8272         (build_binary_op): Likewise.
8273         (dubious_conversion_warnings): Likewise.
8274         (check_return_expr): Likewise.
8276 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
8278         * typeck.c (build_class_member_access_expr): Do not return
8279         error_mark_node when no error has occurred.
8281 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8283         * typeck.c (build_component_addr): Remove.
8284         (build_unary_op): Just check it's not a bitfield, and then build
8285         an ADDR_EXPR.
8287 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8289         * class.c (convert_to_base): Correct check for error_mark_node.
8290         (create_vtable_ptr): Remove unused VFUNS_P parm.
8292 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8294         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8296 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
8298         Rework build_component_ref.
8299         * call.c (build_vfield_ref): Do not go through build_component_ref.
8300         (build_field_call): Use build_class_member_access_expr.
8301         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8302         (build_object_call): Likewise.
8303         * class.c (convert_to_base): New function.
8304         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8305         (instantiate_type): Handle BASELINKs.
8306         * cp-tree.def (BASELINK): New tree code.
8307         * cp-tree.h (BASELINK_P): Reimplement.
8308         (SET_BASELINK_P): Remove.
8309         (BASELINK_BINFO): Reimplement.
8310         (BASELINK_FUNCTIONS): Likewise.
8311         (BASELINK_ACCESS_BINFO): Likewise.
8312         (BASELINK_OPTYPE): Likewise.
8313         (convert_to_base): New function.
8314         (name_p): Likewise.
8315         (build_object_ref): Remove.
8316         (build_component_ref_1): Likewise.
8317         (build_component_ref): Likewise.
8318         (build_x_component_ref): Likewise.
8319         (build_class_member_access_expr): New function.
8320         (finish_class_member_access_expr): Likewise.
8321         (build_ptrmemfunc_access_expr): Likewise.
8322         * decl.c (grokdeclarator): Handle BASELINKs.
8323         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8324         finish_class_member_access_expr.
8325         (arg_assoc): Handle BASELINKs.
8326         (do_class_using_decl): Likewise.
8327         * error.c (dump_decl): Likewise.
8328         (dump_expr): Use build_ptrmemfunc_access_expr.
8329         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8330         destructors.
8331         (build_throw): Use BASELINK_FUNCTIONS.
8332         * init.c (perform_member_init): Use
8333         build_class_member_access_expr.
8334         (build_offset_ref): Handle BASELINKs.  Use
8335         build_class_member_access_expr.
8336         * method.c (hack_identifier): Likewise.
8337         * parse.y (do_id): Use BASELINK, not TREE_LIST.
8338         (primary): Remove uses of build_object_ref.
8339         * pt.c (lookup_template_function): Handle BASELINKs.
8340         (resolve_overloaded_unification): Likewise.
8341         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8342         (lookup_field): Use BASELINK, not TREE_LIST.
8343         (lookup_fnfiels): Likewise.
8344         (setup_class_bindings): Likewise.
8345         * semantics.c (finish_object_call_expr): Do not use
8346         build_method_call when we already know what function is being
8347         called.
8348         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8349         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8350         TREE_CHAIN.
8351         (name_p): New function.
8352         * typeck.c (build_object_ref): Remove.
8353         (build_component_ref_1): Likewise.
8354         (build_x_component_ref): Likewise.
8355         (build_class_member_access_expr): New function.
8356         (finish_class_member_access_expr): Likewise.
8357         (build_ptrmemfunc_access_expr): Likewise.
8358         (get_member_function_from_ptrfunc): Use
8359         build_ptrmemfunc_access_expr.
8360         (build_binary_op): Likewise.
8361         (build_unary_op): Likewise.
8362         (build_ptrmemfunc): Likewise.
8363         (pfn_from_ptrmemfunc): Likewise.
8364         * typeck2.c (build_m_component_ref): Adjust comment.
8366 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
8368         * Make-lang.in (CXX_C_OBJS): Update.
8369         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8370         * cp-tree.h (cxx_decode_option): Remove.
8371         * decl2.c (compare_options, lang_f_options, unsupported_options,
8372         cxx_decode_option): Remove.
8374 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
8376         * typeck.c (build_x_unary_op): Handle pointer-to-member.
8378 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
8380         * class.c: Don't include obstack.h.
8381         (popclass):
8382         * decl2.c: Delete bogus comment.
8383         * error.c: Don't include obstack.h.
8384         * except.c: Likewise.
8385         (dump_type): Correct comment.
8386         * method.c: Don't include obstack.h.
8387         * tree.c: Likewise.
8389 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
8391         Fix PR/2213
8392         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8393         expressions to pointer-to-data-member of pointer-to-member-functions.
8395 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
8397         * cvt.c (ocp_convert): Delete obsolete code.
8398         * parse.y (permanent_obstack): Delete declaration.
8399         * pt.c (permanent_obstack): Delete declaration.
8400         * repo.c (permanent_obstack): Delete declaration.
8401         (open_repo_file): Use xmalloc instead of permanent_obstack.
8402         (init_repo): Use xstrdup instead of permanent_obstack.
8404 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
8406         * cp-tree.h (VF_DERIVED_VALUE): Remove.
8407         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8409 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
8411         PR 7470.
8412         C++ ABI change - vfunc ordering.
8413         * class.c (add_virtual_function): Remove.
8414         (dfs_modify_all_vtables): Take list of all declared
8415         virtuals. Assign all that are not in primary base.
8416         (check_for_override): Adjust comments.
8417         (create_vtable_ptr): Take single list of virtuals. Build chain
8418         of declared virtuals here.
8419         (layout_class_type): Take single list of virtuals. Adjust.
8420         (finish_struct_1): Keep virtuals on single list. Adjust.
8422 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
8424         * init.c (build_member_call): Use build_new_method_call, not
8425         build_method_call.
8427 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
8429         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8431 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
8433         * call.c (build_method_call): Issue a more helpful error message
8434         about ambiguous method names.
8436 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8438         * tree.c (build_shared_int_cst): Make cache file scope, and
8439         GTY it.
8441 2002-08-02  Jason Merrill  <jason@redhat.com>
8443         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8444         (cp_expr_size): New fn.
8445         * call.c (build_over_call): Lose empty class hackery.
8446         (convert_arg_to_ellipsis): Promote non-POD warning to error.
8447         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8449         * semantics.c (expand_body): Do tree optimization in the function
8450         context, too.
8452 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
8454         * cp-tree.h: Move all warning and flag declarations to c-common.h.
8455         * decl.c: Move all warning and flag variables to c-common.c.
8456         * decl2.c: Move all warning and flag variables to c-common.c.
8457         * lex.c (flag_digraphs): Remove.
8458         (warn_traditional): Now in c-common.c.
8460 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
8462         * call.c (build_field_call): Do not look up the field by name.
8463         (build_method_call): Simplify.
8464         (struct z_candidate): Add access_path and conversion_path.  Remove
8465         basetype_path.
8466         (convert_class_to_reference): Adjust use of
8467         add_function_candidate.
8468         (add_candidate): Add conversion_path argument.
8469         (add_function_candidate): Use it.
8470         (add_conv_dndidate): Likewise.
8471         (build_builtin_candidate): Likewise.
8472         (add_template_candidate_real): Add conversion_path argument.
8473         (add_template_conv_candidate): Likewise.
8474         (add_template_candidate): Likewise.
8475         (build_user_type_conversion_1): Use it.
8476         (build_new_function_call): Remove name lookup code.  Adjust use of
8477         add_template_candidate and add_function_candidate.
8478         (build_new_op): Likewise.
8479         (convert_like_real): Use build_special_member_call.
8480         (build_over_call): Use cand->conversion_path.
8481         (build_special_member_call): New method.
8482         (build_new_method_call): Remove name lookup code.
8483         * cp-tree.def (OFFSET_REF): Update documentation.
8484         (TEMPLATE_ID_EXPR): Likewise.
8485         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8486         (BASELINK_OPTYPE): Likewise.
8487         (build_new_method_call): Adjust prototype.
8488         (build_special_member_call): New method.
8489         (build_baselink): New method.
8490         (build_offset_ref_call_from_tree): Likewise.
8491         (build_call_from_tree): Likewise.
8492         (finish_qualified_call_expr): Remove.
8493         (finish_call_expr): Adjust prototype.
8494         (build_x_function_call): Remove.
8495         * cvt.c (ocp_convert): Use build_special_member_call.
8496         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8497         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8498         CALL_EXPR.
8499         (build_offset_ref_call_from_tree): New function.
8500         (build_call_from_tree): Likewise.
8501         * init.c (expand_cleanup): Use build_special_member_call.
8502         (expand_default_init): Likewise.
8503         (build_member_call): Use finish_call_expr.
8504         (build_new_1): Use build_special_member_call.
8505         (push_base_cleanups): Likewise.
8506         * method.c (do_build_assign_ref): Likewise.
8507         * parse.y (template_id): Do not pass a COMPONENT_REF to
8508         lookup_template_function.
8509         (primary): Use parse_finish_call_epxr, not finish_call_expr.
8510         (parse_finish_call_expr): New function.
8511         * pt.c (lookup_template_function): Add assertions.
8512         * search.c (lookup_base): Allow T to be a binfo.
8513         (build_baselink): New function.
8514         (lookup_member): Use it.
8515         * semantics.c (finish_call_expr): Do not do name lookup.
8516         (finish_object_call_expr): Remove #if 0'd code.
8517         (finish_qualified_call_expr): Remove.
8518         * typeck.c (build_x_function_call): Remove.
8519         (build_static_case): Use build_special_member_call.
8520         * typeck2.c (build_functional_cast): Likewise.
8522 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8524         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8526 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
8528         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8530 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
8532         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8533         documentation.
8535 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
8537         * cp-tree.h: Comment typo fix.
8539 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
8541         * spew.c (space_for_token): Allocate zeroed memory for a new token
8542         chunk.
8544 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8546         * decl.c (builtin_function_1): No need to explicitly mark
8547         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8549 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8551         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8553 2002-07-26  Jason Merrill  <jason@redhat.com>
8555         * call.c (build_over_call): Likewise.
8556         (cp_convert_parm_for_inlining): New fn.
8557         (convert_for_arg_passing): New fn.
8558         (convert_default_arg, build_over_call): Use it.
8559         (type_passed_as): New fn.
8560         * pt.c (tsubst_decl): Use it.
8561         * decl2.c (cp_build_parm_decl): New fn.
8562         (build_artificial_parm): Use it.
8563         (start_static_storage_duration_function): Likewise.
8564         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8565         (grokparms): Don't mess with DECL_ARG_TYPE.
8566         * typeck.c (convert_arguments): Use convert_for_arg_passing.
8567         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8568         Define.
8569         * cp-tree.h: Declare new fns.
8571 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
8573         * cp-tree.h (flag_operator_names): Remove.
8574         * decl2.c (flag_operator_names): Remove.
8575         (lang_f_options): Remove operator-names.
8576         * lex.c (D_OPNAME): Remove.
8577         (reswords): Remove operator names.
8578         (rid_to_yy): Remove operator names.
8579         (init_reswords): No need to handle D_OPNAME.
8580         * spew.c (read_process_identifier): There are no operator
8581         names.
8583 2002-07-26  Jason Merrill  <jason@redhat.com>
8585         * dump.c (cp_dump_tree): Call c_dump_tree.
8586         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8588 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8590         * error.c (print_whitespace): Remove.
8591         * g++spec.c (LIBUNWIND): Move.
8592         * mangle.c (mangled_position, write_signed_number): Remove.
8594 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8596         * decl2.c (cxx_decode_option): Similarly.
8598 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
8600         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8601         (cxx_sizeof_or_alignof_type): Take a third argument.
8602         (cxx_sizeof): Adjust definition.
8603         (cxx_alignof): Likewise.
8604         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8605         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8606         complaining.
8607         (c_sizeof_nowarn): Remove definition.
8608         (build_unary_op): Use cxx_sizeof_nowarn.
8610 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
8612         * tree.c (cp_build_qualified_type_real): When copying
8613         pointer-to-method types, unshare the record that holds
8614         the cached pointer-to-member-function type.
8616 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8618         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8620 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
8622         Fix PR/7363:
8623         * typeck.c (cxx_sizeof_or_alignof_type): New function.
8624         (c_sizeof): Remove definition.
8625         (expr_sizeof): Use cxx_sizeof.
8626         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8627         * decl.c (finish_destructor_body): Use cxx_sizeof.
8628         * semantics.c (finish_alignof): Likewise.
8629         (finish_alignof): Use cxx_alignof.
8630         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8631         (cxx_sizeof_or_alignof_type): Declare.
8632         (my_friendly_assert): Move to ../c-common.h.
8634 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8636         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8638 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8640         PR c++/7347, c++/7348
8641         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8642         * decl.c (make_typename_type): Use it.
8643         (make_unbound_class_template): Likewise.
8644         (lookup_name_real): Don't call type_access_control if scope is
8645         template parameter dependent.
8646         * parse.y (template_arg): Call make_unbound_class_template with
8647         tf_parsing set.
8648         (nest_name_specifier): Call make_typename_type with tf_parsing set.
8649         (typename_sub0): Likewise.
8650         (typename_sub1): Likewise.
8651         (instantiate_decl): Push class scope.
8652         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8653         for both static variable and member function template.
8654         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8655         and arguments.
8656         * search.c (type_access_control): Do type access for TEMPLATE_DECL
8657         too.
8659 2002-07-20  Roger Sayle  <roger@eyesopen.com>
8661         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8662         test by using positive_option.  Make whitespace consistent.
8664 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
8666         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8667         members with 'locus'.  Adjust use throughout.
8668         (struct feed):  Likewise.
8669         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8670         Adjust use.
8671         (snarf_defarg): Use error(), not error_with_file_and_line().
8673 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
8675         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8676         cpp_options is included.
8678 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8680         PR c++/2862, c++/2863
8681         * pt.c (determine_specialization): Compare the length of
8682         TYPE_ARG_TYPES.  Tidy.
8684 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8686         PR c++/3797
8687         * decl.c (duplicate_decls): Don't propagate inlining parameters from
8688         olddecl to newdecl when newdecl is a specialization of the
8689         instantiation olddecl.
8691 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8693         PR c++/4802, c++/5387
8694         * decl.c (make_typename_type): Use enforce_access.
8696 2002-07-17  Scott Snyder <snyder@fnal.gov>
8698         PR c++/7320
8699         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8701 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
8703         * class.c (add_method): Correct handling of conversion operators.
8705 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
8707         PR c++/7224
8708         * class.c (add_method): Simplify.
8710 2002-07-11  Jason Merrill  <jason@redhat.com>
8712         PR c++/7279
8713         * tree.c (cp_copy_res_decl_for_inlining): Also copy
8714         TREE_ADDRESSABLE.
8716 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
8718         * pt.c (template_parm_this_level_p, push_template_decl_real):
8719         Pass depth as int pointer.
8721 2002-07-11  Tim Josling  <tej@melbpc.org.au>
8723         Remove front end hard coding from gengtype.c.
8725         * config-lang.in (gtfiles): Add files needed for this front end.
8727 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
8729         * cp-tree.h (unqualified_name_lookup_error): Declare it.
8730         (begin_function_definition): Adjust prototype.
8731         * lex.c (unqualified_name_lookup_error): New function, split out
8732         from ...
8733         (do_identifier): ... here.
8734         * parse.y (parse_begin_function_definition): New function.
8735         (fn.def1): Use it.
8736         * semantics.c (begin_function_definition): Accept decl-specifiers
8737         and attributes as separate parameters.
8739 2002-07-10  Jason Merrill  <jason@redhat.com>
8741         PR c++/6255
8742         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8743         modifying the old one.
8745 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
8747         * cp-tree.h (constructor_name_p): Declare it.
8748         (check_template_template_default_arg): Likewise.
8749         * class.c (handle_using_decl): Use constructor_name_p.
8750         * decl.c (grokdeclarator): Likewise.
8751         * decl2.c (constructor_name_p): Define it.
8752         * init.c (build_member_call): Use constructor_name_p.
8753         * parse.y (template_parm): Use check_template_template_default_arg.
8754         * pt.c (check_explicit_specialization): Use constructor_name_p.
8755         * semantics.c (check_template_template_default_arg): New function.
8757 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8759         * pt.c (can_complete_type_without_circularity): Add static to
8760         function definition.
8762 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
8764         * cp-tree.h (have_extern_spec): Declare it
8765         * decl.c (have_extern_spec): Define it.
8766         (start_decl): Eliminate use of used_extern_spec.
8767         (start_function): Likewise.
8768         * parse.y (have_extern_spec): Remove declaration.
8769         (used_extern_spec): Likewise.
8770         (frob_specs): Eliminate use of used_extern_spec.
8771         (.hush_warning): Likewise.
8773 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
8775         * Make-lang.in (cp/parse.o): Depend on decl.h.
8776         * cp-tree.h (do_decl_instantiation): Change prototype.
8777         * parse.y: Include decl.h.
8778         (parse_decl_instantiation): New function.
8779         (explicit_instantiation): Use it.
8780         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8781         and DECLSPECS.
8783 2002-07-07  Roger Sayle  <roger@eyesopen.com>
8785         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8786         constructor and destructor tests when passed a TEMPLATE_DECL.
8788 2002-07-05  Jason Merrill  <jason@redhat.com>
8790         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8791         pointers.
8793         PR optimization/7145
8794         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8796 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
8798         Repair damage on weak-impared targets caused by my previous patch.
8799         * cp-tree.h (import_export_tinfo): Add parameter.
8800         * decl2.c (import_export_tinfo): Add parameter, post adjust
8801         DECL_COMDAT.
8802         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8803         import_export_tinfo.
8805 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8807         PR c++/6944
8808         * init.c (build_aggr_init): Remove qualifiers of init before calling
8809         build_vec_init.
8810         (build_vec_init): Flatten multi-dimensional array during cleanup.
8811         (build_vec_delete_1): Abort if the type of each element is array.
8813 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
8815         * pt.c (instantiate_class_template): Fix typo.
8817 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8819         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8820         by CVS conflict in my last patch.
8822 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8824         PR c++/6716
8825         * pt.c (can_complete_type_without_circularity): New function.
8826         (instantiate_class_template): Use it.
8827         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8828         message due to incomplete fields.
8830 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
8832         PR c++/7112
8833         * mangle.c (write_expression): Add mangling for sizeof when
8834         applied to a type.
8835         * operators.def: Remove stale comment.
8837 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8839         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8840         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8841         (tinfo_decl_type): Replace with ...
8842         (type_info_ptr_type): ... this.
8843         (import_export_tinfo): Declare.
8844         (tinfo_decl_p): Rename to ...
8845         (unemitted_tinfo_decl_p): ... this.
8846         * decl2.c (import_export_decl): Break out tinfo handling into ...
8847         (import_export_tinfo): ... here. New function.
8848         (finish_file): Adjust.
8849         * rtti.c (TINFO_REAL_NAME): New macro.
8850         (init_rtti_processing): Create the tinfo types.
8851         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8852         (get_tinfo_decl): Adjust.
8853         (get_tinfo_ptr): New function.
8854         (get_type_id): Use it.
8855         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8856         (ptr_initializer): Use get_tinfo_ptr.
8857         (ptm_initializer): Likewise.
8858         (synthesize_tinfo_var): Break into ...
8859         (get_pseudo_ti_init): ... this. Just create the initializer.
8860         (get_pseudo_ti_desc): .. and this.
8861         (create_real_tinfo_var): Remove.
8862         (create_pseudo_type_info): Don't create the vtable decl here.
8863         (get_vmi_pseudo_type_info): Remove.
8864         (create_tinfo_types): Adjust.
8865         (tinfo_decl_p): Rename to ...
8866         (unemitted_tinfo_decl_p): ... here. Adjust.
8867         (emit_tinfo_decl): Adjust. Create the initializer.
8869 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
8871         PR c++/6695
8872         * pt.c (tsubst_friend_class): Substitute into the context of the
8873         friend before using it.
8875 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
8877         * cp-tree.h (xref_tag): Change prototype.
8878         (handle_class_head): Likewise.
8879         (build_x_component_ref): Likewise.
8880         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8881         (xref_tag): Take attributes as a separate parameter.
8882         (xref_tag_from_type): Adjust call to xref_tag.
8883         * decl2.c (build_expr_from_tree): Adjust call to
8884         build_x_component_ref.
8885         (handle_class_head): Take attributes as a separate parameter.
8886         * parse.y (parse_xref_tag): New function.
8887         (parse_handle_class_head): Likewise.
8888         (primary): Use parse_xref_tag.
8889         (class_head_decl): Use parse_handle_class_head.
8890         (class_head_defn): Likewise.
8891         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8892         (build_dynamic_cast_1): Likewise.
8893         (create_pseudo_type_info): Likewise.
8894         (emit_support_tinfos): Likewise.
8895         * typeck.c (build_object_ref): Adjust call to
8896         build_x_component_ref.
8897         (build_x_component_ref): Remove protect parameter.
8899 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
8901         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8902         * class.c (handle_using_decl): Likewise.
8903         (instantiate_type): Likewise.
8904         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8905         (xref_basetypes): Change prototype.
8906         (begin_mem_initializers): New function.
8907         (get_overloaded_fn): Likewise.
8908         * decl.c (xref_basetypes): Simplify.
8909         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8910         * init.c (build_offset_ref): Likewise.
8911         * parse.y (base_init): Use begin_mem_initializers().
8912         (structsp): Adjust call to xref_basetypes.
8913         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8914         (instantiate_class_template): Adjust call to xref_basetypes.
8915         * semantics.c (begin_mem_initializers): New function.
8916         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8917         (really_overloaded_fn): Likewise.
8918         (get_overloaded_fn): New function.'
8919         (get_first_fn): USe BASELINK_FUNCTIONS.
8921 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
8923         * cp-tree.h (SCALAR_TYPE_P): New macro.
8924         (check_for_out_of_scope_variable): New function.
8925         (at_class_scope_p): Likewise.
8926         (finish_fname): Likewise.
8927         * class.c (finish_struct): Use at_function_scope_p.
8928         * decl.c (check_for_out_of_scope_variable): New function, split
8929         out from do_identifier.
8930         (finish_enum): Use at_function_scope_p.
8931         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8932         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
8933         (primary): Use at_function_scope_p.
8934         * search.c (at_class_scope_p): New function.
8935         * semantics.c (finish_fname): Likewise.
8936         (check_multiple_declarators): Use at_function_scope_p.
8938 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
8940         * parse.y (parse_scoped_id): New function.
8941         (primary): Use it.
8942         * cp-tree.h (do_scoped_id): Adjust declaration.
8943         * lex.c (do_scoped_id): Remove call to yylex.
8944         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8945         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8946         expanding it inline.
8948 2002-06-23  Matt Thomas  <matt@3am-software.com>
8950         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8951         "#if VMS_TARGET".
8953 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8955         * mangle.c (integer_type_codes): Const-ify.
8957 2002-06-20  Richard Henderson  <rth@redhat.com>
8959         PR c++/6747
8960         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8961         Call put_var_into_stack.
8963 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8965         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8966         array size calculation.
8968 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8970         PR c++/6892
8971         * pt.c (tsubst_expr): Handle FILE_STMT.
8973 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8975         PR c++/6723
8976         * pt.c (lookup_template_class): Don't build complete argument of
8977         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8978         argument.
8980 2002-06-19  Akim Demaille  <akim@epita.fr>
8982         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8983         decl.h's TYPENAME.
8984         * spew.c, lex.c: Adjust.
8985         * parse.y (explicit_instantiation): Add empty action to override
8986         the default $$ = $1 where it introduces a type clash.
8988 2002-06-14  Jason Merrill  <jason@redhat.com>
8990         * semantics.c (begin_for_stmt): Push the 'for' scope before
8991         adding the FOR_STMT.
8993         C++ ABI changes.
8994         * class.c (build_base_field): Set DECL_PACKED.
8995         (layout_class_type): Don't use tail padding of PODs.
8996         * mangle.c (write_unqualified_name): Fix template conversion op
8997         mangling.
8999 2002-06-16  Richard Henderson  <rth@redhat.com>
9001         PR opt/6793
9002         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
9003         after template instantiation.
9005 2002-06-16  Richard Henderson  <rth@redhat.com>
9007         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
9009 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9011         * cp-tree.h (compiler_error): Remove declaration.
9012         * lex.c (compiler_error): Remove definition.
9014 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
9016         * g++spec.c (LIBUNWIND): New.
9017         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
9019 2002-06-13  Jessica Han  <jessica@cup.hp.com>
9021         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
9022         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
9023         (build_vbase_offset_vtbl_entries): Likewise.
9024         * rtti.c (build_headof): Likewise.
9025         (get_tinfo_decl_dynamic): Likewise.
9026         (create_pseudo_type_info): Likewise.
9028 2002-06-12  Stan Shebs  <shebs@apple.com>
9030         * mpw-config.in: Remove file, no longer used.
9031         * mpw-make.sed: Ditto.
9033 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
9035         * decl2.c: Update call to cpp_handle_option.
9037 2002-06-07  H.J. Lu  (hjl@gnu.org)
9039         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
9041 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
9043         * error.c (cp_error_at): Fix typo.
9045 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
9047         * error.c (cp_diagnostic_starter): Adjust call.
9048         (maybe_print_instantiation_context): Change prototype to take a
9049         'diagnostic_info *'.
9050         (print_instantiation_full_context): Likewise.
9051         (print_instantiation_partial_context): Likewise.
9052         (cp_diagnostic_starter): Likewise.
9053         (cp_diagnostic_finalizer): Likewise.
9054         (cp_print_error_function): Likewise.
9055         (cp_printer): Take a secondary parameter as a 'text_info *'.
9056         Remove output_state savings.  Adjust calls.
9058 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
9060         * pt.c (inline_parm_levels): Mark for GC.
9062         * mangle.c (start_mangling): Allocate G.substitutions here...
9063         (init_mangle): ... rather than here.
9064         (finish_mangling): Clear the varray pointer when done with it.
9065         * spew.c (yylexstring): Don't use VARRAY_FREE.
9066         * search.c (bfs_walk): Don't use VARRAY_FREE.
9067         * decl2.c (pending_statics): Use gengtype to mark.
9068         (deferred_fns): Likewise.
9069         (ssdf_decls): Likewise.
9070         (init_decl2): Delete.
9071         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
9072         (cxx_init_decl_processing): Don't call init_decl2.
9073         (cxx_pop_function_context): Don't use VARRAY_FREE.
9074         * cp-tree.h (struct saved_scope): No need for special marking
9075         of varrays.
9076         (struct language_function): Likewise.
9077         (local_classes): Use gengtype to mark.
9078         (init_decl2): Delete prototype.
9079         * class.c (init_class_processing): Don't use
9080         ggc_add_tree_varray_root.
9081         (build_vtbl_initializer): Don't use VARRAY_FREE.
9083         * decl.c (typename_compare): Don't use same_type_p.
9085         * decl.c: Include hashtab.h instead of hash.h.
9086         (typename_hash): Update to use htab_h.
9087         (typename_compare): Likewise.
9088         (typename_htab): Use gengtype to mark.
9089         (build_typename_type): Update to use htab_h.
9090         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9092         * Make-lang.in (gt-cp-tree.h): New rule.
9093         (cp/tree.o): Depend on gt-cp-tree.h.
9094         * config-lang.in (gtfiles): Add cp/tree.c.
9095         * tree.c: Include gt-cp-tree.h.
9096         (list_hash_table): Use gengtype to mark.
9097         (init_tree): Use gengtype to mark trees.
9099         * Make-lang.in (cp/decl.o): Add debug.h dependency.
9100         * call.c (struct z_candidate): Use gengtype.
9101         (USER_CONV_CAND): Use WRAPPER_ZC.
9102         (convert_class_to_reference): Use build_zc_wrapper.
9103         (build_type_conversion_1): Likewise.
9104         (build_over_call): Use WRAPPER_ZC.
9105         (add_warning): Use build_zc_wrapper.
9106         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9107         * cp-tree.h (struct lang_identifier): Use gengtype.
9108         (struct template_parm_index_s): Likewise.
9109         (struct ptrmem_cst): Likewise.
9110         (struct tree_binding): Likewise.
9111         (struct tree_overload): Likewise.
9112         (struct tree_srcloc): Likewise.
9113         (struct tree_wrapper): Likewise.  Also modify to have a pointer
9114         to struct z_candidate rather than void.
9115         (enum cp_tree_node_structure_enum): New.
9116         (union lang_tree_node): New.
9117         (cxx_mark_tree): Delete prototype.
9118         (cp_tree_node_structure): New prototype.
9119         (build_ptr_wrapper): Delete prototype.
9120         (build_int_wrapper): Delete prototype.
9121         (build_zc_wrapper): New prototype.
9122         * decl.c: Include debug.h
9123         (cxx_mark_tree): Delete.
9124         (cp_tree_node_structure): New.
9125         * tree.c (build_ptr_wrapper): Delete.
9126         (build_int_wrapper): Delete.
9127         (build_zc_wrapper): New.
9129         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9130         Correct typo.  Patch from k_fukui@highway.ne.jp.
9132         * semantics.c (current_stmt_tree): Update for change to
9133         struct language_function.
9134         (finish_mem_initializers): Likewise.
9135         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9136         * cp-tree.h (struct language_function): Rename from
9137         cp_language_function.  Change all uses.
9138         (cp_function_chain): Don't need to cast.
9140         * class.c (duplicate_tag_error): Reset discriminator.
9141         (check_bases_and_members): Update for data structure changes.
9142         * cp-tree.h (struct lang_id2): Use gengtype.
9143         (flagged_type_tree): Likewise.
9144         (SET_LANG_ID): Use GGC on struct lang_id2.
9145         (struct cp_language_function): Use gengtype.  Remove field
9146         'x_vcalls_possible_p'.
9147         (current_vcalls_possible_p): Delete.
9148         (struct lang_type_header): New.
9149         (struct lang_type_class): Rename from struct lang_type.  Include
9150         struct lang_type_header.
9151         (struct lang_type_ptrmem): New.
9152         (struct lang_type): New.
9153         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
9154         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
9155         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9156         (struct lang_decl_flags): Use gengtype.  Add discriminators.
9157         (struct lang_decl): Use gengtype.  Add and use discriminators.
9158         Update the macros that reference moved fields.
9159         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
9160         (SET_DECL_THUNK_P): Set discriminator too.
9161         (clear_inline_text_obstack): Delete prototype.
9162         (finish_inline_definitions): Delete prototype.
9163         (mark_pending_inlines): Delete prototype.
9164         (lang_check_failed): New prototype.
9165         * decl.c (struct named_label_use_list): Use gengtype.
9166         (struct named_label_list): Likewise.
9167         (mark_binding_level): Delete.
9168         (mark_named_label_lists): Delete.
9169         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9170         (cxx_init_decl_processing): Use generated marker routine.
9171         (begin_destructor_body): Delete dead set to
9172         current_vcalls_possible_p.
9173         (mark_lang_function): Delete.
9174         (mark_cp_function_context): Delete.
9175         (lang_mark_tree): Use generated marker routines.
9176         * decl2.c (start_objects): Set discriminator when setting
9177         GLOBAL_INIT_PRIORITY.
9178         * lex.c (retrofit_lang_decl): Set discriminators.
9179         (copy_lang_type): Update for changes to lang_type structure.
9180         (cp_make_lang_type): Set discriminator.
9181         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
9182         * search.c: Include ggc.h.
9183         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9184         (finish_inline_definitions): Delete.
9185         * spew.c (struct token): Use gengtype.
9186         (struct token_chunk): New.
9187         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
9188         (struct feed): Use gengtype.
9189         (feed_obstack): Delete.
9190         (feed): Mark as GC root.
9191         (pending_inlines): Mark as GC root.
9192         (pending_inlines_tail): Likewise.
9193         (processing_these_inlines): Likewise.
9194         (token_obstack): Make static.
9195         (first_token): Likewise.
9196         (init_spew): Don't initialize deleted things; use gengtype for roots.
9197         (clear_inline_text_obstack): Delete.
9198         (feed_input): Use GC for struct feed.  Update for changes to
9199         struct unparsed_text.
9200         (mark_pending_inlines): Delete.
9201         (next_token): Rename from add_token.  Change all callers.  Update
9202         for changes to struct unparsed_text.
9203         (space_for_token): New.
9204         (remove_last_token): New.
9205         (alloc_unparsed_text): New.
9206         (snarf_block): Take an unparsed_text.  Update for changes to struct
9207         unparsed_text.
9208         (snarf_method): Update for changes to struct unparsed_text.
9209         (snarf_defarg): Update for changes to struct unparsed_text.
9210         * tree.c (lang_check_failed): New.
9212         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9213         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9214         (cp/spew.o): Add dependency on gt-<filename>.h.
9215         (cp/decl2.o): Add dependency on gt-<filename>.h.
9216         (cp/call.o): Add dependency on gt-<filename>.h.
9217         (cp/pt.o): Add dependency on gt-<filename>.h.
9218         (cp/repo.o): Add dependency on gt-<filename>.h.
9219         (cp/parse.o): Add dependency on gt-<filename>.h.
9220         * call.c: Use gengtype for roots.
9221         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9222         decl2.c parse.y pt.c repo.c spew.c.
9223         * cp-tree.h: Use gengtype for roots.
9224         (struct saved_scope): Use GGC, gengtype.
9225         (cp_parse_init): Delete prototype.
9226         (init_pt): Delete prototype.
9227         * decl.c: Use gengtype for roots.
9228         (mark_saved_scope): Delete.
9229         (cxx_init_decl_processing): Don't call deleted initilisation
9230         routines.
9231         (signed_size_zero_node): Delete, unused.
9232         * decl.h: Use gengtype for roots.
9233         * decl2.c: Use gengtype for roots.
9234         * lex.h: Use gengtype for roots.
9235         * parse.y: Use gengtype for roots.
9236         (cp_parse_init): Delete.
9237         * pt.c: Use gengtype for roots.
9238         (init_pt): Delete.
9239         * repo.c: Use gengtype for roots.
9240         * spew.c: Use gengtype for roots.
9242         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
9243         (cp/decl.o): Add dependency on gtype-cp.h.
9244         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9245         Include gtype-cp.h.  Allow for filename changes.
9247         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9248         (cp/decl.o): Add cp/gt-decl.h dependency.
9249         * config-lang.in (gtfiles): New.
9250         * tree.h: Rename struct binding_level to struct cp_binding_level.
9251         * decl.c: Rename struct binding_level to struct cp_binding_level.
9252         Include cp/gt-decl.h.
9253         (struct cp_binding_level): Use gengtype.
9254         (make_binding_level): Use GGC on struct cp_binding_level.
9255         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9256         (cxx_init_decl_processing): Mark free_binding_level as
9257         deletable.
9259         * decl.c (mark_cp_function_context): Update calling sequence.
9261         * decl.c (start_function): Don't free 'struct
9262         cp_language_function'.
9263         (pop_cp_function_context): Likewise.
9264         (save_function_data): Allocate it using GC.
9265         * semantics.c (genrtl_start_function): Don't free 'struct
9266         cp_language_function'.
9268 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
9270         * lang-specs.h: Use cpp_debug_options.
9272 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
9274         * mangle.c, tree.c: Include real.h.
9275         * Make-lang.in: Update dependency lists.
9277 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9279         * lex.c: Don't include c-lex.h.
9280         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9282 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
9284         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9286 2002-05-22  Richard Henderson  <rth@redhat.com>
9288         * decl.c (obscure_complex_init): Check for VAR_DECL
9289         before using DECL_THREAD_LOCAL.
9291 2002-05-22  Richard Henderson  <rth@redhat.com>
9293         * decl.c (check_tag_decl): Handle RID_THREAD.
9294         (obscure_complex_init): Reject run-time init of tls.
9295         (grokvardecl, grokdeclarator): Handle RID_THREAD.
9296         * lex.c (reswords): Add __thread.
9297         (rid_to_yy): Map RID_THREAD to SCSPEC.
9299 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
9301         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9302         * cp-tree.h (cxx_post_options): Kill.
9303         * cp-lex.c (cxx_post_options): Kill.
9305 2002-05-21  Richard Henderson  <rth@redhat.com>
9307         * lex.c (rid_to_yy): Add RID_THREAD.
9309 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
9311         * init.c (build_vec_init): Test for trivial copy-assignment when
9312         copy-assigning arrays.
9314 2002-05-20  Andreas Jaeger  <aj@suse.de>
9316         * init.c (build_default_init): Remove unused variable.
9318 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
9320         * call.c (any_strictly_viable): New.
9321         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9323 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9325         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9327 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9329         PR c++/186, DR 259
9330         * pt.c (do_decl_instantiation): Don't complain explicit
9331         instantiation after explicit specialization.
9332         (do_type_instantiation): Likewise.
9334 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
9336         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9337         renamed from...
9338         (complete_type_or_else): ... this.  Redefined as macro.
9339         (cxx_incomplete_type_diagnostic): Declare.
9340         (cxx_incomplete_type_error): Define as macro.
9341         * init.c (build_delete): Warn about incomplete types other than
9342         void, and use the built-in operator delete for them.
9343         * typeck.c (complete_type_or_diagnostic): Renamed from
9344         complete_type_or_else.  Added warn_only argument, passed to...
9345         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
9346         warnings or errors depending on new warn_only argument.  Renamed
9347         from...
9348         (cxx_incomplete_type_error): ... this.  New implementation in
9349         terms of cxx_incomplete_type_diagnostic.
9351 2002-05-18  Jason Merrill  <jason@redhat.com>
9353         PR c++/6611
9354         * decl2.c (import_export_decl): If we clear
9355         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9357 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9359         PR c++/6620
9360         * pt.c (verify_class_unification): Don't check if PARM is template
9361         parameter dependent.  Simplify.
9362         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9363         parameter dependent expression.
9365 2002-05-14  Jason Merrill  <jason@redhat.com>
9367         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9368         Do set DECL_COMDAT.
9369         (synthesize_tinfo_var): Take the public decl.
9370         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
9371         (emit_tinfo_decl): Adjust.  Call import_export_decl.
9372         * decl2.c (import_export_decl): Simplify tinfo decl handling.
9374 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
9376         * cp-tree.h (struct lang_type): Added non_zero_init.
9377         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9378         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9379         * class.c (check_field_decls): Test non_zero_init.
9380         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9381         zero-to-NULL conversions.
9382         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9383         type that needs zero-initialization without zeros.
9384         (check_initializer_decl): Compute zero-initializer for types
9385         that require a non-trivial one.
9386         * init.c (build_forced_zero_init): New function.
9387         (build_default_init): Use it.
9388         * tree.c (zero_init_p): New function.
9389         * typeck2.c (force_store_init_value): New function.
9390         (process_init_constructor): Create non-trivial zero-initializers
9391         for array members and class fields.
9393 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
9395         * lang-specs.h: Remove redundant -lang-c++.
9397 2002-05-13  Jason Merrill  <jason@redhat.com>
9399         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9400         (fixed_type_or_null): See through reference vars.
9401         (build_base_path): Vtable contents are constant.
9402         * typeck.c (get_member_function_from_ptrfunc): Likewise.
9404 2002-05-12  Jason Merrill  <jason@redhat.com>
9406         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9407         structs are safe.
9409 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9411         * cp-tree.h (flag_ansi): Remove.
9412         * decl2.c (flag_ansi): Remove.
9413         (cxx_decode_option): Set flag_iso and flag_undef.
9415 2002-05-09  Jason Merrill  <jason@redhat.com>
9417         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9418         Use subtraction rather than a bitmask to get the index.
9419         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9421         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9423 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9425         * Make-lang.in (decl2.o): Update.
9426         * cp-tree.h (warn_multichar): Remove.
9427         * decl2.c: Include c-common.h.
9428         (warn_multichar): Remove.
9430 2002-05-03  Jason Merrill  <jason@redhat.com>
9432         * tree.c (build_cplus_array_type): Only const and volatile get
9433         special handling.
9435         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9437 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
9439         ABI change, returning simple classes from functions.
9440         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9441         TYPE_HAS_TRIVIAL_INIT_REF is false or
9442         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9444 2002-04-30  Jason Merrill  <jason@redhat.com>
9446         PR debug/6436
9447         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9448         anonymous class with a typedef if there are attributes.
9450 2002-04-29  Paul Eggert  <eggert@twinsun.com>
9452         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9454 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
9456         PR c++/6477
9457         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9458         non-NULL first.
9460 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
9462         PR c++/6492
9463         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9464         enter that scope before name lookup.
9466         PR c++/6486
9467         * method.c (do_build_copy_constructor): Avoid building
9468         cv-qualified reference types.
9470 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
9472         PR c++/5719
9473         * decl.c (grok_op_properties): Assignment ops don't have to return
9474         by value. operator% should.
9476 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
9478         PR c/6343
9479         * decl.c (duplicate_decls): Call merge_weak.
9481 2002-04-26  Richard Henderson  <rth@redhat.com>
9483         * parse.y (malloced_yyss, malloced_yyvs): New.
9484         (yyoverflow): Re-add.  Set them.
9485         (free_parser_stacks): New.
9487 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
9489         PR c++/6497
9490         * method.c (do_build_assign_ref): Pass a derivation to
9491         build_method_call when calling base class assignment operators.
9493 2002-04-26  Richard Henderson  <rth@redhat.com>
9495         * parse.y (yyoverflow): Revert.
9497 2002-04-26  Richard Henderson  <rth@redhat.com>
9499         PR c/3581
9500         * parse.y (string): Remove.  Update all uses to use STRING
9501         instead, and not call combine_strings.
9502         * rtti.c (tinfo_name): Use fix_string_type.
9503         * semantics.c (finish_asm_stmt): Don't call combine_strings.
9504         * spew.c (yylexstring): New.
9505         (read_token): Use it.
9507 2002-04-25  Richard Henderson  <rth@redhat.com>
9509         PR c/2161
9510         * parse.y (yyoverflow): New.
9512 2002-04-25  Jason Merrill  <jason@redhat.com>
9514         PR c++/5607
9515         * search.c (check_final_overrider): No longer static.
9516         * class.c (update_vtable_entry_for_fn): Call it.
9517         * cp-tree.h: Adjust.
9519 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9521         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9522         * cp-tree.h (cxx_set_yydebug): Die.
9523         * lex.c (YYDEBUG): Get from c-lex.h.
9524         (cxx_set_yydebug): Remove.
9525         * parse.y: Include c-lex.h.
9526         (YYDEBUG): Get from c-lex.h.
9528 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
9530         PR c++/6438.
9531         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9532         void.
9534 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9536         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9537         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9538         Redefine.
9539         * cp-tree.h (cp_attribute_table): Rename.
9540         * decl.c (lang_attribute_table): Remove declaration.
9541         (cxx_init_decl_processing): Don't set it.
9542         * tree.c (cp_attribute_table): Rename.
9544 2002-04-24  Jason Merrill  <jason@redhat.com>
9546         PR c++/6331
9547         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9548         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9549         The pedwarn for array assignment is now unconditional.
9550         * tree.c (build_cplus_array_type_1): Still process simple array types
9551         normally in templates.
9553         PR c++/6395
9554         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9555         stuff for comdats.
9557 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
9559         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9560         node with attributes.
9562 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
9564         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9565         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9567 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
9569         PR c++/6256:
9570         * pt.c (tsubst_friend_class): Handle templates with explicit
9571         nested names.
9573         PR c++/6331:
9574         * typeck.c (merge_types): Remember the cv-qualification of pointer
9575         types when merging them.
9577 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9579         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9580         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9581         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9582         cxx_mark_function_context): New.
9583         * decl.c (push_cp_function_context, pop_cp_function_context,
9584         mark_cp_function_context): Rename for consistency.
9585         (cxx_init_decl_processing): Don't set old hooks.
9587 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
9589         * call.c (convert_type_from_ellipsis): Rename, update.
9590         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9591         * cp-tree.h (convert_type_from_ellipsis): Rename.
9592         * decl.c (cxx_init_decl_processing): Don't set hook.
9594 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9596         * call.c (build_new_method_call): Update.
9597         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9598         * cp-tree.h (cxx_incomplete_type_error): New.
9599         * decl.c (grokdeclarator, grokparms): Update.
9600         * decl2.c (check_classfn): Update.
9601         * pt.c (tsubst): Update.
9602         * typeck.c (complete_type_or_else, expr_sizeof,
9603         decay_conversion): Update.
9604         * typeck2.c (incomplete_type_error): Rename.
9605         (add_exception_specifier): Update.
9607 2002-04-18  Jason Merrill  <jason@redhat.com>
9609         PR c++/5658
9610         * search.c (setup_class_bindings): A class template qualifies as a
9611         type binding.
9613 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
9615         PR c++/6316
9616         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9617         before expanding.
9619 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
9621         * init.c (begin_init_stmts): Remove commented out code.
9622         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9623         * semantics.c (begin_gobal_stmt_expr): Adjust call to
9624         expand_start_stmt_expr.
9626 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
9628         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9629         dso_handle itself, to __cxa_atexit.
9631 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9633         * error.c (cxx_print_error_function): Adjust call to macros.
9635 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
9637         * class.c (layout_virtual_bases): Do all dsize computation on trees.
9639 2002-04-14  Jason Merrill  <jason@redhat.com>
9641         * typeck.c (get_member_function_from_ptrfunc): Don't do
9642         gratuitious division and multiplication on
9643         ptrmemfunc_vbit_in_delta targets.
9645 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9647         PR c++/5373.
9648         * semantics.c (finish_expr_stmt): Remember the type of the
9649         expression before any conversions are performed.
9651 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9653         PR c++/5189.
9654         * call.c (add_template_candidate_real): Do not treat member
9655         templates as copy constructors.
9657 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9659         * decl.c (duplicate_decls): Do not copy the RTL for a variable
9660         declaration if the old variable had an incomplete type and the new
9661         variable does not.
9662         (complete_vars): Do not call layout_decl for completed variables.
9664 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
9666         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9667         with an explicit one.
9668         (follow_tag_typedef): New.
9669         (lookup_tag): Use it to extract the tag of an explicit typedef.
9670         (xref_tag): Likewise.
9672 2002-04-11  Andrew Haley  <aph@redhat.com>
9674         * typeck.c (type_after_usual_arithmetic_conversions):
9675         If two types have the same variant, return immediately.
9676         When two floating-point operands are the same precision:
9677           convert to float if one of the operands is float;
9678           if neither operand is one of the standard types, return the type
9679           of the first operand.
9681 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
9683         PR c++/5507
9684         * decl.c (make_typename_type): Remove implicit typenameness.
9686 2002-04-09  Jason Merrill  <jason@redhat.com>
9688         PR optimization/6189
9689         * semantics.c (genrtl_start_function): Don't free
9690         DECL_SAVED_FUNCTION_DATA for inline functions.
9692         * init.c (build_member_call): For now, don't convert to
9693         intermediate base if it would cause an error.
9695 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
9697         * parse.y (namespace_qualifier, maybe_identifier,
9698         begin_explicit_instantiation, end_explicit_instantiation,
9699         apparent_template_type, .finish_template_type,
9700         do_id, maybe_init, defarg_again, component_decl_1):
9701         Add ending ';', in accordance with POSIX.
9703 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
9705         PR c++/5571
9706         * class.c (layout_class_type): Remember incomplete static
9707         variables.
9708         (finish_struct_1): Call complete_vars, not
9709         hack_incomplete_structures.
9710         * cp-tree.h (hack_incomplete_structures): Rename to ...
9711         (complete_vars): ... this.
9712         (struct saved_scope): Remove incomplete.
9713         (namespace_scope_incomplete): Remove.
9714         * decl.c (struct binding_level): Remove incomplete.
9715         (incomplete_vars): New variable.
9716         (mark_binding_level): Don't mark incomplete.
9717         (print_binding_level): Don't print it.
9718         (mark_saved_scope): Don't mark incomplete.
9719         (pushdecl): Use maybe_register_incopmlete_var.
9720         (cxx_init_decl_processing): Register incomplete_vars for GC.
9721         (start_decl_1): Clarify error message.
9722         (hack_incomplete_vars): Remove.
9723         (maybe_register_incomplete_var): New function.
9724         (complete_vars): Likewise.
9726 2002-04-06  Jason Merrill  <jason@redhat.com>
9728         PR c++/4934
9729         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9730         set before checking it.
9732         PR c++/525
9733         * init.c (build_member_call): Use build_scoped_ref.
9734         (resolve_offset_ref): Likewise.
9735         * call.c (build_scoped_method_call): Likewise.
9736         * tree.c (maybe_dummy_object): Kludge around current_class_type being
9737         wrong.
9738         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9739         * cp-tree.h: Adjust.
9741         * init.c (push_base_cleanups): Just use build_scoped_method_call.
9743         PR c++/6179
9744         * method.c (implicitly_declare_fn): Pass unqualified type to
9745         synthesize_exception_spec.
9747 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9749         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9750         * cvt.c: Update comment.
9751         * init.c (expand_cleanup_for_base): Update.
9752         * semantics.c (finish_parenthesized_expr): Update.
9753         * typeck.c (cp_truthvalue_conversion): Update.
9755 2002-04-04  Jason Merrill  <jason@redhat.com>
9757         * semantics.c (finish_eh_cleanup): New fn.
9758         * cp-tree.h: Add prototype.
9759         * init.c (perform_member_init, expand_cleanup_for_base): Use
9760         finish_eh_cleanup.
9761         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9762         * cp-tree.h: Remove references.
9763         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9764         * dump.c (cp_dump_tree): Likewise.
9765         * pt.c (tsubst_expr): Likewise.
9766         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9767         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9768         * tree.c (cp_statement_code_p): Likewise.
9770         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9772         PR c++/5636
9773         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9774         cleanup for nrv.
9776         PR c++/5104
9777         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9778         specifiers.
9779         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9781 2002-04-03  Richard Henderson  <rth@redhat.com>
9783         * cp-lang.c (cxx_warn_unused_global_decl): New.
9784         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9786 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9788         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9789         * tree.c (init_tree): Don't set hook.
9791 2002-04-03  Roger Sayle  <roger@eyesopen.com>
9793         PR c++/5998:
9794         * decl.c (duplicate_decls): Don't mess with assembler names when
9795         redeclaring builtin functions as static.
9797 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9799         * call.c (build_addr_func): Update.
9800         * class.c (resolve_address_of_overloaded_function): Update.
9801         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9802         * cp-tree.h (cxx_mark_addressable): New.
9803         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9804         * decl2.c (build_cleanup): Update.
9805         * except.c (build_throw): Update.
9806         * init.c (resolve_offset_ref): Update.
9807         * pt.c (convert_nontype_argument): Update.
9808         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9809         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9810         unary_complex_lvalue): Update.
9811         (mark_addressable): Rename.
9813 2002-04-01  Roger Sayle  <roger@eyesopen.com>
9815         PR c++/5998:
9816         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
9817         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
9818         but follow the SET_DECL_RTL idiom used elsewhere in the function.
9820 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9822         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9823         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9824         * decl.c (grokdeclarator): Update.
9825         * mangle.c (write_integer_cst): Update.
9826         * typeck.c (build_binary_op): Update.
9828 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9830         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9831         * lex.c (cxx_init): Don't set hook.
9833 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9835         * Make-lang.in (error.o): Update.
9836         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9837         * cp-tree.h (struct diagnostic_context): Predeclare.
9838         (cxx_print_error_function): New.
9839         * error.c: Include langhooks-def.h.
9840         (lang_print_error_function): Rename.  Update.
9841         (init_error): Don't set hook.
9843 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9845         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9846         Redefine.
9847         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9848         * decl.c (finish_enum): Similarly.
9849         * error.c (dump_type): Similarly.
9850         * lex.c (cxx_init): Similarly.
9851         * mangle.c (write_builtin_type): Similarly.
9852         * typeck.c (comptypes): Similarly.
9854 2002-03-28  Roger Sayle  <roger@eyesopen.com>
9856         PR c++/5998:
9857         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9858         in the g++ front-end.
9859         (duplicate_decl): Allow redefinition of anticipated built-ins.
9860         Fix inlining problem by over-writing the old DECL_RTL.
9861         (lookup_namespace_name): Fail to find an identifier in the
9862         specified namespace if its still anticipated.
9863         (builtin_function_1): New function split out from builtin_function
9864         to create a builtin in the current namespace with given context.
9865         (builtin_function): Call builtin_function_1 to define the
9866         appropriate builtins in both the std and global namespaces.
9867         (select_decl): Don't test for anticipated decls here.
9868         (unqualified_namespace_lookup): Instead ignore them whilst
9869         searching through scopes and namespaces.
9870         * decl2.c (do_nonmember_using_decl): If a using declaration
9871         specifies an anticipated built-in function, mark it as no longer
9872         anticipated in that scope.
9873         (ambiguous_decl):  Avoid resolving to an anticipated decl.
9874         * lex.c (do_scoped_id): Fail to find an identifier in the global
9875         namespace if its still anticipated.
9877 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9879         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9880         * cp-tree.h (cp_make_lang_type): Rename.
9881         * lex.c (cp_make_lang_type): Rename.
9882         (make_aggr_type): Update.
9883         * tree.c (init_tree): Don't set make_lang_type_fn.
9885 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
9887         PR c++/6073
9888         * class.c (finish_struct_1): Update static field's DECL_MODE even
9889         if its type is a variant of t.
9891 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9893         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9894         * cp-tree.h (cxx_insert_default_attributes): New.
9895         * decl.c (insert_default_attributes): Rename.
9897 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
9899         PR c++/4884
9900         * call.c (build_op_delete_call): Allow for the fact the placement
9901         may be a COMPOUND_EXPR.
9903 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9905         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9906         * cp-tree.h (init_cplus_expand): Remove.
9907         (cxx_expand_expr): New.
9908         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9909         fix prototype.
9910         (init_cplus_expand): Remove.
9911         * lex.c (cxx_init): Don't call init_cplus_expand.
9913 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
9915         PR c++/4884.
9916         * init.c (build_new_1): Allow for the fact the result of
9917         build_function_call may be a COMPOUND_EXPR.
9919 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9921         PR c++/5682
9922         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9923         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9924         (dfs_skip_nonprimary_vbases_markedp): Remove.
9925         * search.c (get_shared_vbase_if_not_primary): Remove.
9926         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9927         (dfs_skip_nonprimary_vbases_markedp): Remove.
9928         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9929         (dfs_marked_real_bases_queue_p): Likewise.
9931 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9933         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9934         * cp-tree.h (cxx_mark_tree): New.
9935         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9937 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9939         * cp-tree.h (cxx_maybe_build_cleanup): New.
9940         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9941         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9942         * tree.c (build_target_expr): Update.
9943         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9945 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9947         * decl2.c (cxx_decode_option): Handle -E.
9948         * lang-specs.h (default_compilers): Preprocess with cc1plus.
9949         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9951 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
9953         PR c++/6037
9954         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9956 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9958         * error.c (dump_type): Be careful about implicit typenames.
9960 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9962         PR C++/3656
9963         * semantics.c (finish_base_specifier): Handle erronous base
9964         classes.
9966 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
9968         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9969         REAL_IS_NOT_DOUBLE.
9971 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
9973         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9974         an index into the vtable_entry array regardless of
9975         TARGET_PTRMEMFUNC_VBIT_LOCATION.
9977 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
9979         * tree.c (cp_cannot_inline_tree_fn): Same.
9981 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9983         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9984         insert_block, getdecls, global_bindings_p): New.
9986 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
9988         PR c++/4361
9989         * mangle.c (struct globals) Add internal_mangling_p member.
9990         (write_template_param): Do internal mangling, if needed.
9991         (mangle_conv_op_name_for_type): Request internal mangling.
9993 2002-03-20  Jason Merrill  <jason@redhat.com>
9995         PR c++/2136
9996         * init.c (build_delete): Check access for a member op delete here.
9997         * decl2.c (delete_sanity): Not here.
9999 2002-03-19  Jason Merrill  <jason@redhat.com>
10001         PR c++/5118
10002         * class.c (get_vfield_name): Use the constructor_name.
10004 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
10006         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
10007         * cp-tree.h (lang_printable_name): Rename.
10008         * error.c (lang_decl_name): Use new hook.
10009         * lex.c (cxx_init): Remove old hook.
10010         * pt.c (tsubst_decl): Use new hook.
10011         * tree.c (lang_printable_name): Rename.
10013 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
10015         PR c++/3882
10016         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
10017         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
10018         only after recording the declaration.
10020 2002-03-18  Jason Merrill  <jason@redhat.com>
10022         PR c++/2039
10023         * init.c (resolve_offset_ref): Hand off to build_component_ref.
10025         PR c++/4222, c++/5995
10026         * call.c (build_over_call): Fix empty class logic.
10028         PR c++/3870
10029         * cp-tree.h (struct saved_scope): Add last_parms field.
10030         * decl.c (maybe_push_to_top_level): Save last_function_parms.
10031         (pop_from_top_level): Restore it.
10033         PR c++/4377
10034         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
10035         NON_LVALUE_EXPRs.
10037         PR c++/4003
10038         * pt.c (tsubst_friend_function): Use decl_namespace_context.
10040         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
10041         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
10042         type with a nontrivial destructor.
10044 2002-03-17  Jason Merrill  <jason@redhat.com>
10046         PR c++/4460
10047         * class.c (build_base_path): Virtual base layout is fixed in
10048         in-charge [cd]tors.
10050 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
10052         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
10053         * parse.y (yyparse): Remove macro.
10055 2002-03-17  Jason Merrill  <jason@redhat.com>
10057         PR c++/5757
10058         * init.c (build_new_1): Pass the right pointer to op delete.
10060 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
10062         PR c++/4361
10063         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
10064         conversion operators go.
10065         (struct lang_decl_flags): Add template_conv_p and unused
10066         bitfields.
10067         (DECL_TEMPLATE_CONV_FN_P): New macro.
10068         * call.c (build_user_type_conversion_1): Don't check second type
10069         conversion of overload set first.
10070         * class.c (add_method): Make sure templated conversion operators
10071         all end up on slot 2.
10072         * lex.c (do_identifier): A conversion operator token might be
10073         satisfied by a templated conversion operator.
10074         * pt.c (check_explicit_specialization): Use
10075         CLASSTYPE_FIRST_CONVERSION_SLOT.
10076         (template_parm_this_level_p): New function.
10077         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
10078         * search.c (lookup_fnfields_1): Template conversions will be on
10079         the first slot.
10080         * typeck.c (build_component_ref): Preserve the type of an
10081         conversion operator name on the overload type.
10082         (build_x_function_call): Retrieve the conversion operator name.
10084 2002-03-15  Richard Henderson  <rth@redhat.com>
10086         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10088 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
10090         * cp-tree.h (CLEANUP_DECL): Remove.
10091         (CLEANUP_EXPR): Likewise.
10092         * decl.c (destroy_local_var): Simplify.
10093         (maybe_build_cleanup): Tidy.
10094         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10095         * semantics.c (cp_expand_stmt): Likewise.
10096         * cp/tree.c (cp_statement_code_p): Likewise.
10098 2002-03-15  Jason Merrill  <jason@redhat.com>
10100         PR c++/5857
10101         * decl.c (duplicate_decls): Use merge_types instead of common_type.
10102         * typeck.c (common_type): Just hand off to
10103         type_after_usual_arithmetic_conversions and
10104         composite_pointer_type.
10105         (merge_types): New fn.
10106         (commonparms): Use it instead of common_type.
10107         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10108         (composite_pointer_type): Also handle attributes.
10109         * cp-tree.h: Declare merge_types.
10111         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10112         variables.
10113         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10115 2002-03-14  Richard Henderson  <rth@redhat.com>
10117         * decl.c: Include c-pragma.h.
10118         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10119         * Make-lang.in: Update dependencies.
10121 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
10123         PR c++/5908
10124         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10125         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10127 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
10129         * mangle.c (write_builtin_type): Handle 128-bit integers even if
10130         they are not a standard integer type.
10132 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
10134         * cp-tree.h (init_init_processing): Remove declaration.
10135         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10136         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10138 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10140         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10141         Define.
10142         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10143         tree_code_length.
10144         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10145         cplus_tree_code_name): Delete.
10146         (cxx_init): Don't call add_c_tree_codes, instead set
10147         lang_unsafe_for_reeval.  Don't try to copy into the various
10148         tree_code arrays.
10150 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
10152         PR c++/5659
10153         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10154         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10155         definitions.
10157 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
10159         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
10160         DR209 is now not a defect.
10161         * cp-tree.h (skip_type_access_control): Remove.
10162         * decl.c (grokdeclarator): Do type access control for friend
10163         declarations.
10164         * semantics.c (decl_type_access_control): Don't reset
10165         current_type_lookups.
10166         (save_type_access_control): Always save the lookups.
10167         (skip_type_access_control): Remove.
10168         (finish_class_definition): Don't change type_lookups.
10170 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
10172         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
10173         It is incorrect.
10174         * typeck.c (build_static_cast): Compare non-qualified types
10175         with pointer to member conversions.
10177 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
10178             Daniel Berlin  <dan@dberlin.org>
10180         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10181         (cxx_get_alias_set): Use it.
10183 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10185         * cp-tree.h (stabilize_expr): Prototype.
10187 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10189         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10190         conditional return void.
10192 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10194         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10195         * cp-tree.h (cxx_unsave): New.
10196         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10197         (init_tree): Update.
10199 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10201         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10202         explicit sizeof/sizeof.
10203         * decl2.c (cxx_decode_option): Likewise.
10204         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10206 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10208         PR c++/775
10209         * decl.c (lookup_tag): Only reject enum/class mismatch, not
10210         class/union mismatch.
10211         * parse.y (check_class_key): New function.
10212         (structsp): Call it.
10214 2002-03-01  Michael Matz  <matz@suse.de>
10216         * typeck.c (cp_pointer_int_sum): Complete inner type which is
10217         used later by size_in_bytes().
10219 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
10221         * cp-tree.h:  Require __GNUC__ to be #defined.
10222         (build_init):  Add missing prototype.
10224 2002-03-01  Jason Merrill  <jason@redhat.com>
10226         * except.c: Don't include decl.h or obstack.h.  Do include
10227         tree-inline.h.
10228         (build_throw): Destroy temporaries from the thrown
10229         expression before calling __cxa_throw.  Construct a thrown
10230         temporary directly into the exception object.
10231         (stabilize_throw_expr): New function.
10232         (wrap_cleanups_r): New function.
10233         * tree.c (stabilize_expr): New function.
10234         * init.c (build_init): New function.
10235         * Make-lang.in (cp/except.o): Adjust .h deps.
10237 2002-02-28  Jason Merrill  <jason@redhat.com>
10239         * search.c (lookup_base_r): Don't clear is_non_public just because
10240         we found a friendly scope.
10242         * decl.c (finish_function): Only warn about missing return
10243         statement with -Wreturn-type.
10245 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
10247         * class.c (build_clone): Update.
10248         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10249         * cp-tree.h (cxx_dup_lang_specific_decl): New.
10250         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10251         (copy_decl): Update.
10252         * method.c (make_thunk): Update.
10254 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
10256         * decl2.c: Delete traditional-mode-related code copied from
10257         the C front end but not used, or used only to permit the
10258         compiler to link.
10260 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
10262         PR c++/4093
10263         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10264         to void.
10266 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
10268         PR other/5746
10269         * semantics.c (finish_switch_cond): Don't call get_unwidened
10270         if error_mark_node.
10272 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
10274         PR c++/2645, DR 295
10275         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10276         tf_keep_type_decl.
10277         (make_typename_type): Use tsubst_flags_t.
10278         * decl.c (make_typename_type): Adjust. Return non-artificial
10279         TYPE_DECLs, if required.
10280         (grokdeclarator): Simplify CVR qualification handling. Allow bad
10281         qualifiers on typedef types.
10282         * decl2.c (handle_class_head): Adjust make_typename_type call.
10283         * parse.y (nested_name_specifier): Likewise.
10284         (typename_sub0): Likewise.
10285         (typename_sub1): Likewise.
10286         * pt.c (convert_template_argument): Adjust make_typename_type
10287         return value.
10288         (tsubst): Adjust cp_build_qualified_type_real calls.
10289         (check_cv_quals_for_unify): Cope with allowing bad qualifications
10290         on template type parms.
10291         (instantiate_decl): Recheck substitutions to give warnings on bad
10292         qualifications.
10293         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10295 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
10297         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10299         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10300         unless DECL_ALWAYS_INLINE.
10302 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
10304         * typeck.c (cp_pointer_int_sum): Renamed from
10305         pointer_int_sum, call pointer_int_sum.
10307 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
10309         * decl.c (duplicate_decls): Return 0 if issued error about
10310         redeclaration.
10312 2002-02-19  Jason Merrill  <jason@redhat.com>
10314         ABI change: Mangle `void (A::*)() const' as
10315         M1AKFvvE, not MK1AFvvE.
10316         * mangle.c (write_function_type): Write cv-quals for member
10317         function type here.
10318         (write_pointer_to_member_type): Not here.
10320 2002-02-18  Jason Merrill  <jason@redhat.com>
10322         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10323         (do_decl_instantiation): Likewise.
10325 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10327         PR c++/5685
10328         * decl.c (duplicate_decls): Make warning unconditional
10329         if duplicate default argument declarations are present.
10331 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
10333         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10334         shortening.
10336 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
10338         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10339         remove incorrect comment. Move #if 0'd code to common path. Use
10340         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10342 2002-02-13  Jason Merrill  <jason@redhat.com>
10344         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10345         (finish_function): Don't warn if current_function_returns_null.
10347         * typeck2.c (digest_init): Do handle values of vector type.
10349         * typeck2.c (digest_init, process_init_constructor): Treat vectors
10350         like arrays.
10352 2002-02-11  Jason Merrill  <jason@redhat.com>
10354         * parse.y (reserved_declspecs): Don't handle attributes.
10355         (reserved_typespecquals): Handle them here.
10356         * Make-lang.in (parse.c): Adjust expected conflicts.
10358 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
10360         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10361         instead of compstmt.
10362         (compstmt_or_stmtexpr): Renamed from compstmt.
10363         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10365 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
10367         Rename instantiate_type_flags to tsubst_flags_t & expand use.
10368         * cp-tree.h (instantiate_type_flags): Rename to ...
10369         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10370         add tf_warning flag.
10371         (instantiate_type): Adjust prototype.
10372         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10373         do_type_instantiation, cp_build_qualified_type_real): Likewise.
10374         cp_build_qualified_type: Adjust.
10375         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10376         tf_*.
10377         * call.c (standard_conversion): Rename itf_* to tf_*.
10378         (reference_binding): Likewise.
10379         (convert_like_real): Likewise.
10380         * cvt.c (cp_convert_to_pointer): Likewise.
10381         (convert_to_reference): Likewise.
10382         * decl.c (lookup_namespace_name): Use tf_* flags.
10383         (make_typename_type): Likewise.
10384         (grokdeclarator): Likewise.
10385         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10386         (coerce_template_template_parms, convert_template_argument,
10387         coerce_template_parms, maybe_get_template_decl_from_type_decl,
10388         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10389         instantiate_class_template, tsubst_template_arg_vector,
10390         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10391         tsubst_decl, tsubst_arg_types, tsubst_function_type,
10392         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10393         instantiate_template, fn_type_unification,
10394         resolve_overloaded_unification, verify_class_unification,
10395         unify, get_bindings_real, do_type_instantiation,
10396         regenerate_decl_from_template, instantiate_decl,
10397         tsubst_initializer_list, tsubst_enum,
10398         get_mostly_instantiated_function_type,
10399         invalid_nontype_parm_type_p): Likewise.
10400         * tree.c (cp_build_qualified_type_real): Likewise.
10401         * typeck.c (build_binary_op): Rename itf_* to tf_*.
10402         (build_ptrmemfunc): Likewise.
10403         (convert_for_assignment): Likewise.
10405 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
10407         PR c++/109
10408         * decl.c (grokdeclarator): Allow friend declarations from
10409         dependent types.
10410         * decl2.c (handle_class_head): Don't push into template parm contexts.
10411         * pt.c (push_template_decl_real): Template parm contexts are never
10412         being defined.
10414 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
10416         * class.c: Include target.h.
10417         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10418         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10419         bit-field layout.
10420         * Make-lang.in: Adjust deps.
10422 2002-02-05  Jason Merrill  <jason@redhat.com>
10424         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10426 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
10428         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10429         (finish_switch_cond): Set SWITCH_TYPE.
10431 2002-02-04  Richard Henderson  <rth@redhat.com>
10433         * method.c (use_thunk): Always initialize the block tree.  Reindent.
10434         * semantics.c (expand_body): Emit thunks after function, not before.
10436 2002-02-04  Jason Merrill  <jason@redhat.com>
10438         * decl.c (start_function): Call cplus_decl_attributes immediately
10439         after grokdeclarator.
10441         * decl.c (start_function): Combine DECL_RESULT handling code.
10443 2002-02-03  Jason Merrill  <jason@redhat.com>
10445         * xref.c: Remove.
10446         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10447         (cp/xref.o): Remove dependencies.
10448         * class.c (finish_struct_1, check_methods): Don't call xref fns.
10449         (finish_struct_1): Likewise.
10450         * friend.c (make_friend_class): Likewise.
10451         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10452         * spew.c (read_process_identifier): Likewise.
10454 2002-02-01  Jason Merrill  <jason@redhat.com>
10456         PR c++/4872
10457         * decl.c (finish_function): Warn about a non-void function with
10458         no return statement and no abnormal exit.
10459         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10460         (current_function_returns_abnormally): New macro.
10461         * call.c (build_call): Set it.
10463         * typeck.c (build_component_ref): Always complain about offsetof
10464         constructs on non-PODs.  Only make it an error for members of
10465         virtual bases.
10467         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10468         (dump_function_decl): Always dump parms.
10470         * decl2.c (finish_static_data_member_decl): Complain about a local
10471         class with a static data member.
10473         PR c++/4286
10474         * search.c (lookup_field_1): Don't xref a static data member
10475         just because we looked it up.
10477 2002-01-31  Jason Merrill  <jason@redhat.com>
10479         * Make-lang.in (parse.c): Handle .output file.
10481         PR c++/3395
10482         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10483         not TREE_TYPE.
10484         * semantics.c (finish_class_definition): Adjust.
10486         Allow attributes in parms and casts.
10487         * parse.y (named_parm): Don't strip attrs.
10488         (declmods): Remove 'attributes' production.
10489         (nonempty_cv_qualifiers): Accept attributes.
10490         (ATTRIBUTE): Give precedence.
10491         * decl.c (groktypename): Handle attributes.
10492         (grokparms): Likewise.
10494 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
10496         * decl2.c (cxx_decode_option): Pass 0 as last argument to
10497         cpp_handle_option.
10498         * lang-specs.h: Use cpp_unique_options instead of cpp_options
10499         when used together with cc1_options.
10501 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
10503         PR c++/5132
10504         * typeck2.c (digest_init): Make sure non-array core type is
10505         instantiated.
10506         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10507         constructor, rather than build a new one.
10508         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10509         PURPOSE of constructor elts.
10511 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10513         * Make-lang.in (parse.c): Adjust expected number of
10514         shift-reduce conflicts.
10515         (decl.o): Depend on diagnostic.h.
10516         * decl.c: Include diagnostic.h.
10517         (grokdeclarator): Check for null pointer.
10518         (finish_function): Don't abort when
10519         current_binding_level->parm_flag != 1, if errors have
10520         occurred; throw away the statement tree and extra binding
10521         levels, and continue.
10522         * lex.c (note_list_got_semicolon): Check for null pointer.
10523         * method.c (hack_identifier): Just return error_mark_node if
10524         value is error_mark_node.
10525         * parse.y (primary: TYPEID(type_id)): No need to use
10526         TYPE_MAIN_VARIANT here.
10527         (handler_seq): Accept an empty list of catch clauses and
10528         generate a fake handler block to avoid later crashes.
10529         (ansi_raise_identifier): Accept the error token too.
10530         * semantics.c (begin_class_definition,
10531         finish_class_definition): Check for error_mark_node.
10533 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10535         * typeck2.c (friendly_abort): Delete definition.
10536         * cp-tree.h (friendly_abort): Don't prototype.
10537         (my_friendly_assert): Use fancy_abort.
10539 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10541         * cp-tree.h (my_friendly_abort): Remove.
10543 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
10545         * spew.c (pending_inlines, pending_inlines_tail,
10546         processing_these_inlines): Make static.
10547         (mark_pending_inlines): Remove static.
10548         (begin_parsing_inclass_inline): If in function, save pi
10549         for GC to cp_function_chain->unparsed_inlines instead.
10550         (process_next_inline): Likewise.
10551         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10552         (mark_pending_inlines): Add prototype.
10553         * decl.c (spew_debug): Remove unused extern.
10554         (mark_lang_function): Call mark_pending_inlines.
10556 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10558         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10559         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10560         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10561         Change my_fancy_abort() to abort().
10563 2002-01-23  Jason Merrill  <jason@redhat.com>
10565         PR c++/5453
10566         * class.c (fixed_type_or_null): Fix thinko.
10568         PR c++/3331
10569         * init.c (resolve_offset_ref): Use build_indirect_ref.
10571         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10573 2002-01-22  Jason Merrill  <jason@redhat.com>
10575         * parse.y (function_body): Suppress the block for the outermost
10576         curly braces.
10577         * decl.c (pushdecl): Don't try to skip it.
10578         (begin_function_body): Keep the block we create, not the next one.
10579         * init.c (emit_base_init): Don't mess with keep_next_level.
10581         * class.c (build_base_path): Tweak formatting.
10583 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10585         Fix regression introduced with patch for c++/775
10586         * parse.y (class_head_defn): Check for template specializations
10587         with a different class-key.
10589 2002-01-17  Jason Merrill  <jason@redhat.com>
10591         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10592         (begin_function_body): Call them and keep_next_level.
10593         * init.c (emit_base_init): Call keep_next_level.
10594         * semantics.c (setup_vtbl_ptr): Lose.
10595         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10596         (vtbls_set_up_p): Lose.
10597         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10598         * method.c (do_build_copy_constructor): Likewise.
10599         (synthesize_method): Call finish_mem_initializers.
10600         * parse.y (nodecls): Likewise.
10602         * error.c (dump_type_suffix): Print the exception specs before
10603         recursing.
10604         (dump_function_decl): Here, too.
10606         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10608 2002-01-10  Ira Ruben   <ira@apple.com>
10610         PR c++/907
10611         * decl.c (start_method): Handle attrlist.
10613 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
10615         * decl2.c (max_tinst_depth): Increase default limit to 500.
10617 2002-01-10  Graham Stott  <grahams@redhat.com>
10619         * spew.c (YYCHAR): Uppercase macro parameter and add
10620         parenthesis.
10621         (YYCODE): Likewise.
10622         (NAME): Uppercase macro parameter.
10624 2002-01-09  Graham Stott  <grahams@redhat.com>
10626         * decl.h (grokdeclarator): Wrap long line.
10628         * semantics.c (FINISH_COND): Uppercase macro paramaters and
10629         add parenthesis.
10631 2002-01-08  Graham Stott  <grahams@redhat.com>
10633         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10634         (PALLOC): Uppercase macro parameter and whitespace.
10635         (SALLOC): Uppercase macro parameter.
10636         (SFREE): Uppercase macros parameter, add parenthese and
10637         whitespace.
10638         (STREQL): Uppercase macro parameter and whitespace.
10639         (STRNEQ): Likewise.
10640         (STRLSS): Likewise.
10641         (STRLEQ): Likewise.
10642         (STRGTR): Likewise.
10643         (STRGEQ): Likewise.
10645         * call.c (convert_like): Add parenthesis and wrap.
10646         (convert_like_with_context): Likewise.
10647         (ICS_RANK): Whitespace.
10648         (NEED_TEMPORARY_P): Remove parenthesis.
10650         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10651         whitespace.
10652         (VTT_MARKED_BINFO_P): Likewise.
10654         * decl.c (BINDING_LEVEL): Add parenthesis.
10655         (DEF_OPERATOR): Likewise.
10657         * mangle.c (MANGLE_TRACE): Add parenthesis.
10658         (MANGLE_TRACE_TREE): Likewise.
10659         (write_signed_number): Likewise.
10660         (write_unsigned_number): Likewise.
10662         * pt.c (ccat): Uppercase macro parameter.
10663         (cat): Likewise
10665         * search.c (SET_BINFO_ACCESS): Add parenthesis.
10667 2002-01-07  Jason Merrill  <jason@redhat.com>
10669         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10670         to pedwarn.
10672         PR c++/3536
10673         * method.c (make_thunk): If !flag_weak, give the thunk the
10674         function's linkage.
10675         (use_thunk): Here, too.
10677 2002-01-07  Graham Stott  <grahams@redhat.com>
10679         * error.c: Update copyright date.
10680         (print_scope_operator): Add parenthesis.
10681         (print_left_paren): Likewise.
10682         (print_right_paren): Likewise.
10683         (print_left_bracket): Likewise.
10684         (print_right_bracket): Likewise.
10685         (print_template_argument_list_start): Likewise.
10686         (print_template_argument_list_end): Likewise.
10687         (print_non_consecutive_character): Likewise.
10688         (print_tree_identifier): Likewise.
10689         (print_identifier): Likewise.
10690         (NEXT_CODE): Uppercase macro parameter.
10691         (ident_fndecl): Delete unused.
10692         (GLOBAL_THING): Likewise.
10694 2002-01-06  Graham Stott  <grahams@redhat.com>
10696         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10697         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10698         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10699         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10700         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10701         (C_IS_RESERVED_WORD): Uppercase macro parameter.
10702         (C_RID_YYCODE) Likewise.
10703         (ptrmem_cst): Use rtx.
10704         (LOCAL_BINDING_P): Add whitespace.
10705         (INHERITED_VALUE_BINDING_P): Likewise.
10706         (BINDING_SCOPE): Wrap long line.
10707         (BINDING_HAS_LEVEL_P): Remove parenthesis.
10708         (BINDING_VALUE): Wrap long line.
10709         (BINDING_TYPE): Whitespace.
10710         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10711         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10712         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10713         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10714         (same_type_p): Uppercase macro parameters.
10715         (same_type_ignoring_top_level_qualifiers_p): Likewise.
10716         (OVL_FUNCTION): Wrap long line.
10717         (OVL_CHAIN): Whitespace.
10718         (OVL_CURRENT): Add parenthesis and whitespace.
10719         (OVL_NEXT): Whitespace.
10720         (OVL_USED): Likewise.
10721         (IDENTIFIER_TYPE_VALUE): Likewise.
10722         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10723         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10724         (LANG_ID_FIELD): Whitespace.
10725         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10726         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10727         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10728         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10729         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10730         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10731         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10732         (IDENTIFIER_VIRTUAL_P): Likewise.
10733         (IDENTIFIER_OPNAME_P): Likewise.
10734         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10735         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10736         (C_SET_EXP_ORIGINAL_CODE): Likewise.
10737         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10738         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10739         (IS_AGGR_TYPE): Uppercase macro parameter.
10740         (CLASS_TYPE_P): Likewise.
10741         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10742         (IS_AGGR_TYPE_2): Whitespace.
10743         (TAGGED_TYPE_P): Uppercase macro parameter.
10744         (TYPE_BUILT_IN): Whitespace.
10745         (TYPE_FOR_JAVA): Likewise.
10746         (FUNCTION_ARG_CHAIN): Remove parenthesis.
10747         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10748         (FUNCTION_FIRST_USER_PARAM): Likewise.
10749         (PROMOTES_TO_AGGR_TYPE): Whitespace.
10750         (DERIVED_FROM_P): Add parenthesis and wrap.
10751         (UNIQUELY_DERIVED_FROM_P): Likewise.
10752         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10753         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10754         (CLASSTYPE_USE_TEMPLATE): Whitespace.
10755         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10756         (TYPE_GETS_DELETE): Add parenthesis.
10757         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10758         (TYPE_HAS_ASSIGN_REF): Likewise,
10759         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10760         (TYPE_HAS_INIT_REF): Likewise.
10761         (TYPE_HAS_CONST_INIT_REF): Likewise.
10762         (TYPE_BEING_DEFINED): Likewise.
10763         (TYPE_LANG_SPECIFIC): Likewise.
10764         (CLASSTYPE_RTTI): Likewise.
10765         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10766         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10767         (TYPE_OVERLOADS_ARROW): Likewise.
10768         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10769         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10770         (CLASSTYPE_METHOD_VEC): Likewise.
10771         (CLASSTYPE_MARKED_N): Likewise.
10772         (CLASSTYPE_MARKED): Likewise.
10773         (CLASSTYPE_MARKED2): Likewise.
10774         (CLASSTYPE_MARKED3): Likewise.
10775         (CLASSTYPE_MARKED4): Likewise.
10776         (CLASSTYPE_MARKED5): Likewise.
10777         (CLASSTYPE_MARKED6): Likewise.
10778         (SET_CLASSTYPE_MARKED): Whitespace.
10779         (CLEAR_CLASSTYPE_MARKED): Likewise.
10780         (SET_CLASSTYPE_MARKED2): Likewise.
10781         (CLEAR_CLASSTYPE_MARKED2): Likewise.
10782         (SET_CLASSTYPE_MARKED3): Likewise.
10783         (CLEAR_CLASSTYPE_MARKED3): Likewise.
10784         (SET_CLASSTYPE_MARKED4): Likewise.
10785         (CLEAR_CLASSTYPE_MARKED4): Likewise.
10786         (SET_CLASSTYPE_MARKED5): Likewise.
10787         (CLEAR_CLASSTYPE_MARKED5): Likewise.
10788         (SET_CLASSTYPE_MARKED6): Likewise.
10789         (CLEAR_CLASSTYPE_MARKED6): Likewise.
10790         (CLASSTYPE_TAGS): Likewise.
10791         (CLASSTYPE_VSIZE): Likewise.
10792         (CLASSTYPE_VBASECLASSES): Likewise.
10793         (CANONICAL_BINFO): Add parenthesis.
10794         (CLASSTYPE_SIZE(NODE): Likewise.
10795         (CLASSTYPE_SIZE_UNIT): Likewise.
10796         (CLASSTYPE_ALIGN(NODE): Likewise.
10797         (CLASSTYPE_USER_ALIGN): Likewise.
10798         (TYPE_JAVA_INTERFACE): Likewise.
10799         (CLASSTYPE_PURE_VIRTUALS): Likewise.
10800         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10801         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10802         (CLASSTYPE_HAS_MUTABLE): Likewise.
10803         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10804         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10805         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10806         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10807         (CLASSTYPE_INTERFACE_ONLY): Likewise.
10808         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10809         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10810         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10811         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10812         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10813         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10814         (BINFO_UNSHARED_MARKED): Whitespace.
10815         (BINFO_MARKED): Whitespace and wrap.
10816         (SET_BINFO_MARKED): Likewise.
10817         (CLEAR_BINFO_MARKED): Likewise.
10818         (BINFO_VTABLE_PATH_MARKED): Likewise.
10819         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10820         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10821         (BINFO_SUBVTT_INDEX): Remove parenthesis.
10822         (BINFO_VPTR_INDEX): Likewise.
10823         (BINFO_PRIMARY_BASE_OF): Likewise,
10824         (CLASSTYPE_VFIELDS): Whitespace.
10825         (VF_DERIVED_VALUE): Wrap long line.
10826         (NAMESPACE_LEVEL): Whitespace.
10827         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10828         (DEFARG_POINTER): Whitespace.
10829         (DECL_NEEDED_P): Remove parenthesis.
10830         (DECL_LANGUAGE): Whitespace.
10831         (SET_DECL_LANGUAGE): Add parenthesis.
10832         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10833         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10834         (DECL_IN_AGGR_P): Whitespace.
10835         (DECL_FRIEND_P): Likewise.
10836         (DECL_BEFRIENDING_CLASSES): Likewise.
10837         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10838         (DECL_NONCONVERTING_P): Whitespace.
10839         (DECL_PURE_VIRTUAL_P): Likewise.
10840         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10841         (DECL_PENDING_INLINE_INFO): Whitespace.
10842         (DECL_SORTED_FIELDS): Likewise.
10843         (DECL_DEFERRED_FN): Likewise.
10844         (DECL_TEMPLATE_INFO): Likewise.
10845         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10846         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10847         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10848         (TMPL_ARGS_LEVEL): Likewise.
10849         (SET_TMPL_ARGS_LEVEL): Likewise.
10850         (INNERMOST_TEMPLATE_PARMS): Whitespace.
10851         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10852         (INTEGRAL_CODE_P(CODE): Add parenthesis.
10853         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10854         (TYPE_HAS_CONSTRUCTOR): Whitespace.
10855         (TREE_HAS_CONSTRUCTOR): Likewise.
10856         (TYPE_HAS_DESTRUCTOR): Likewise.
10857         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10858         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10859         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10860         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10861         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10862         (TYPE_PTRMEMFUNC_P): Likewise.
10863         (TYPE_PTRMEMFUNC_FLAG): Likewise.
10864         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10865         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10866         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10867         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10868         (DECL_ACCESS): Whitespace.
10869         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10870         (DECL_GLOBAL_DTOR_P): Likewise.
10871         (GLOBAL_INIT_PRIORITY): Likewise.
10872         (DECL_TEMPLATE_PARMS): Likewise.
10873         (DECL_TEMPLATE_RESULT): Likewise.
10874         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10875         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10876         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10877         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10878         (PRIMARY_TEMPLATE_P): Add parenthesis.
10879         (DECL_USE_TEMPLATE): Whitespace.
10880         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10881         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10882         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10883         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10884         (CALL_DECLARATOR_PARMS): Remove parenthesis.
10885         (CALL_DECLARATOR_QUALS): Likewise.
10886         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10887         (TEMP_NAME_P): Wrap.
10888         (VFIELD_NAME_P): Likewise.
10889         (B_SET): Uppercase macro parameters and add parenthesis.
10890         (B_CLR): Likewise.
10891         (B_TST): Likewise.
10892         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10893         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10894         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10895         (same_or_base_type_p): Likewise.
10896         (cp_deprecated): Likewise.
10898 2002-01-05  Richard Henderson  <rth@redhat.com>
10900         * semantics.c (expand_body): Revert last change.
10902 2002-01-04  Jason Merrill  <jason@redhat.com>
10904         PR c++/4122
10905         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10906         lost primary.
10908         * class.c (build_vtbl_initializer): Check for a lost primary
10909         before calculating the vtable entry to throw away.
10911 2002-01-02  Jason Merrill  <jason@redhat.com>
10913         * semantics.c (expand_body): Call outlining_inline_function when
10914         emitting an inline function out of line.
10916 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10918         PR c++/5116, c++/764 reversion
10919         * call.c (build_new_op): Revert the instantiations. They are
10920         incorrect.
10922 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10924         PR c++/5089
10925         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10927 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10929         PR c++/3716
10930         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10931         (tsubst, case POINTER_TYPE): Handle pmfs here.
10932         (tsubst, case OFFSET_TYPE): Check it is not an offset to
10933         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10935 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10937         PR c++/35
10938         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10939         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10940         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10941         PARM_DECL.
10942         (tsubst_template_parms): Break up loop statements.
10943         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10944         parm PARM_DECLs don't get promoted.
10946 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10948         PR c++/5123
10949         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10950         (build_x_function_call): Cope with a COMPONENT_REF containing a
10951         TEMPLATE_ID_EXPR.
10953 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10955         PR c++/5213
10956         * pt.c (convert_template_argument): Be more careful determining
10957         when RECORD_TYPE templates are or are not templates.
10959 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10961         PR c++/775
10962         * cp-tree.h (handle_class_head): Adjust prototype.
10963         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10964         parameters. Use for all class heads.
10965         * parse.y (named_class_head_sans_basetype, named_class_head,
10966         named_complex_class_head_sans_basetype,
10967         named_class_head_sans_basetype_defn,
10968         unnamed_class_head): Remove.
10969         (class_head, class_head_apparent_template): Recognize class heads
10970         (class_head_decl, class_head_defn): New reductions. Process class
10971         heads.
10972         (structsp): Adjust class definition and class declaration
10973         reductions.
10974         (maybe_base_class_list): Give diagnostic on empty list.
10976 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10978         PR c++/4379
10979         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10980         single non-static member.
10981         (unary_complex_lvalue): If it cannot be a pointer to member, don't
10982         make it so. Check it is not pointer to reference.
10984 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10986         PR c++/5132
10987         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
10988         are processing a template decl.
10990 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10992         PR c++/5116, c++/764
10993         * call.c (build_new_op): Make sure template class operands are
10994         instantiated. Simplify arglist construction.
10996 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
10998         * call.c (build_user_type_conversion_1): Use my_friendly_assert
10999         rather than if ... abort.
11000         * cvt.c (convert_to_reference): Likewise.
11001         * semantics.c (setup_vtbl_ptr): Likewise.
11002         * pt.c (lookup_template_class): Comment typo.
11004 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
11006         PR c++/5125
11007         * pt.c (push_template_decl_real): Make sure DECL has
11008         DECL_LANG_SPECIFIC.
11010 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
11012         PR c++/335
11013         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
11014         for non-reference fields.
11015         * typeck.c (require_complete_type): Use resolve_offset_ref).
11017 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
11019         PR c++/196
11020         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
11022 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
11024         PR c++/160
11025         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
11026         up. Don't stabilize_references when initializing a reference.
11028 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11030         * decl2.c (lang_f_options): Const-ify.
11032 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
11034         * config-lang.in (diff_excludes): Remove.
11036 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
11038         PR c++/90
11039         * typeck.c (build_function_call_real): Use original function
11040         expression for errors.
11042 2001-12-18  Jason Merrill  <jason@redhat.com>
11044         PR c++/3242
11045         * class.c (add_method): Do compare 'this' quals when trying to match a
11046         used function.  Don't defer to another used function.
11048 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
11050         * pt.c (instantiate_clone): Remove, fold into ...
11051         (instantiate_template): ... here. Simplify by removing mutual
11052         recursion.
11053         * typeck2.c (build_m_component_ref): Don't cv qualify the function
11054         pointed to by a pointer to function.
11055         * class.c (delete_duplicate_fields_1): Typo.
11057 2001-12-18  Jason Merrill  <jason@redhat.com>
11059         C++ ABI change: destroy value arguments in caller.
11060         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
11061         create an extra binding level for the parameters.
11062         * decl.c (store_parm_decls): Don't do parameter cleanups.
11064 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
11066         * call.c (build_new_method_call): Use '%#V'.
11067         * error.c (cv_to_string): Use V parameter to determine padding.
11069 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
11071         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
11072         spellings in messages.
11074 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
11076         * cp-tree.h: Delete #defines for cp_error, cp_warning,
11077         cp_pedwarn, and cp_compiler_error.
11078         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
11079         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
11080         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
11081         typeck2.c: Change calls to the above macros to use their
11082         language-independent equivalents: error, warning, pedwarn, and
11083         internal_error respectively.
11085 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
11087         * decl2.c (finish_file): Remove back_end_hook.
11089 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
11091         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11092         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11093         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11095 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
11097         * lang-options.h: Use American spelling in messages.
11099 2001-12-13  Jason Merrill  <jason@redhat.com>
11101         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11103         Use cleanups to run base and member destructors.
11104         * init.c (push_base_cleanups): New function, split out from...
11105         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
11106         * decl.c (finish_destructor_body): Move vbase destruction code to
11107         push_base_cleanups.
11108         (begin_function_body, finish_function_body): New fns.
11109         (finish_function): Move [cd]tor handling and call_poplevel to
11110         finish_function_body.
11111         (pushdecl): Skip the new level.
11112         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11113         (setup_vtbl_ptr): Call push_base_cleanups.
11114         * method.c (synthesize_method): Call {begin,end}_function_body.
11115         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11116         * cp-tree.h: Declare new fns.
11117         * parse.y (function_body, .begin_function_body): New nonterminals.
11118         (fndef, pending_inline, function_try_block): Use function_body.
11119         (ctor_initializer_opt, function_try_block): No longer has a value.
11120         (base_init): Remove .set_base_init token.
11121         (.set_base_init, compstmt_or_error): Remove.
11122         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11124         * optimize.c (maybe_clone_body): Fix parameter updating.
11126 2001-12-12  Jason Merrill  <jason@redhat.com>
11128         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11129         * semantics.c (genrtl_start_function): Don't pass
11130         parms_have_cleanups or push an extra binding level.
11131         (genrtl_finish_function): Lose cleanup_label cruft.
11133         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11134         (ctor_label): Remove.
11135         * semantics.c (finish_return_stmt): Lose ctor_label support.
11136         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11137         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11138         dtor_label.
11140         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11141         check for [cd]tors.
11142         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11144         * decl.c (finish_function): Check VMS_TARGET, not VMS.
11146         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11147         (end_cleanup_fn): And poplevel.
11149         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11150         if we're in a template.
11152 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
11154         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11155         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11156         THIS_NAME_P): Delete.
11157         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11158         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11159         with internal naming scheme.
11160         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11162 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
11164         * decl.c (grokdeclarator): Deprecated implicit typename use.
11166 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
11168         PR g++/51
11169         * parse.y (frob_specs): Indicate it is a language linkage which
11170         contained the extern.
11171         * decl.c (grokdeclarator): Allow extern language linkage with
11172         other specifiers.
11174 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
11176         PR g++/72
11177         * decl.c (add_binding): Don't reject duplicate typedefs involving
11178         template parameters.
11180 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
11182         * parse.y, semantics.c: Similarly.
11184 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
11186         PR g++/87
11187         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11188         (copy_args_p): Rename to ...
11189         (copy_fn_p): ... here.
11190         (grok_special_member_properties): New function.
11191         (grok_op_properties): Lose VIRTUALP parameter.
11192         (copy_assignment_arg_p): Remove.
11193         * call.c (build_over_call): Use copy_fn_p.
11194         * decl.c (grokfndecl): Reformat. Adjust call to
11195         grok_op_properties.
11196         (copy_args_p): Rename to ...
11197         (copy_fn_p): ... here. Reject template functions. Check for pass
11198         by value.
11199         (grok_special_member_properties): Remember special functions.
11200         (grok_ctor_properties): Don't remember them here, just check.
11201         (grok_op_properties): Likewise.
11202         (start_method): Call grok_special_member_properties.
11203         * decl2.c (grokfield): Likewise.
11204         (copy_assignment_arg_p): Remove.
11205         (grok_function_init): Don't remember abstract assignment here.
11206         * pt.c (instantiate_class_template): Call
11207         grok_special_member_properties.
11208         (tsubst_decl): Adjust grok_op_properties call.
11210 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
11212         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11213         RID_TYPES_COMPATIBLE_P.
11215 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11217         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11218         call to build_aggr_init.
11219         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11221 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
11223         * parse.y: Replace uses of the string non-terminal with STRING.
11224         Don't perform string concatentaion here.
11225         (string): Remove non-terminal.
11226         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11228 2001-12-05  Jason Merrill  <jason@redhat.com>
11230         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11231         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11232         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11233         * pt.c (push_tinst_level): No longer static.
11234         * cp-tree.h: Declare them.
11236         * init.c (resolve_offset_ref): Don't check access for the base
11237         conversion to access a FIELD_DECL.
11239         * cp-tree.h (TYPE_REFFN_P): New macro.
11240         * decl.c (bad_specifiers): Check it, too.
11242         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11243         on the __*_type_info type if we haven't seen a definition.
11245 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
11247         * decl.c: Include c-common.h.
11248         (shadow_warning): Move to c-common.c.
11250 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11252         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11254 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11256         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11258 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11260         PR g++/164
11261         * init.c (sort_base_init): Allow binfos to be directly specified.
11262         * method.c (do_build_copy_constructor): Explicitly convert to the
11263         base instance.
11264         (do_build_assign_ref): Likewise.
11266 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
11268         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11269         declaration and initialization.
11271 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
11273         * typeck2.c: Remove leading capital from diagnostic messages, as
11274         per GNU coding standards.
11276 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
11278         PR c++/3394
11279         * decl.c (xref_basetypes): Handle attributes between
11280         'class' and name.
11282 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
11284         PR g++/3381
11285         * parse.y (named_complex_class_head_sans_basetype): Add new
11286         reduction.
11287         * Make-lang.in (parse.c): Adjust expected conflict count.
11289 2001-12-03  Jason Merrill  <jason@redhat.com>
11291         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11292         immediate binfos for our virtual bases.
11294 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
11296         * call.c (build_java_interface_fn_ref): Similarly.
11297         * except.c (is_admissible_throw_operand): Similarly.
11298         * init.c (build_java_class_ref): Similarly.
11299         * xref.c (open_xref_file): Similarly.
11301 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
11303         * class.c (finish_struct): Remove trailing periods from messages.
11304         * decl.c (check_tag_decl): Similarly.
11305         * lex.c (cxx_set_yydebug): Similarly.
11306         * typeck2.c (friendly_abort): Similarly.
11308 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11310         PR c++/3048
11311         * cp-tree.h (ovl_member): Remove.
11312         * decl2.c (merge_functions): Handle extern "C" functions
11313         specially.
11314         * tree.c (ovl_member): Remove.
11316 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11318         PR c++/4842
11319         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11320         FUNCTION_DECL, as input.
11321         (mark_overriders): Remove.
11322         (warn_hidden): Rework for the new ABI.
11324 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11326         PR c++/3471
11327         * call.c (convert_like_real): Do not build additional temporaries
11328         for rvalues of class type.
11330 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11332         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11333         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11334         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11335         (DERIVED_FROM_P): Likewise.
11336         (enum base_access): Renumber, add ba_quiet bit mask.
11337         (get_binfo): Remove.
11338         (get_base_distance): Remove.
11339         (binfo_value): Remove.
11340         (ACCESSIBLY_DERIVED_FROM_P): Remove.
11341         * call.c (standard_conversion): Use lookup_base.
11342         * class.c (strictly_overrides): Likewise.
11343         (layout_virtual_bases): Likewise.
11344         (warn_about_ambiguous_direct_bases): Likewise.
11345         (is_base_of_enclosing_class): Likewise.
11346         (add_vcall_offset_vtbl_entries_1): Likewise.
11347         * cvt.c (build_up_reference): Adjust comment.
11348         * init.c (build_member_call): Reformat.
11349         * search.c (get_binfo): Remove.
11350         (get_base_distance_recursive): Remove.
11351         (get_base_distance): Remove.
11352         (lookup_base_r): Tweak.
11353         (lookup_base): Add ba_quiet control. Complete the types here.
11354         (covariant_return_p): Use lookup_base.
11355         * tree.c (binfo_value): Remove.
11356         (maybe_dummy_object): Use lookup_base.
11357         * typeck.c (build_static_cast): Use lookup_base.
11358         (get_delta_difference): Likewise.
11359         * typeck2.c (binfo_or_else): Use lookup_base.
11360         (build_scoped_ref): Add back error_mark_check.
11361         (build_m_component_ref): Use lookup_base.
11363 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11365         * Make-lang.in (c++.generated-manpages): New dummy target.
11367 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11369         * Make-lang.in (cp-lang.o): Depends on c-common.h.
11370         * cp-lang.c (c-common.h): Include.
11371         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11372         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11373         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11375 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
11377         * decl2.c (c_language): Move to c-common.c.
11378         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11379         functions.
11380         (cxx_init): Update.
11382 2001-11-26  Jason Merrill  <jason@redhat.com>
11384         * call.c (joust): Remove COND_EXPR hack.
11386 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
11388         * search.c (lookup_base_r): Declare bk in variable declaration
11389         space.
11391 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
11393         PR g++/3145
11394         * class.c (build_vbase_pointer): Remove.
11395         (build_vbase_path): Remove.
11396         (build_base_path): New function.
11397         * cp-tree.h (base_access, base_kind): New enumerations.
11398         (build_base_path): Declare.
11399         (convert_pointer_to_real): Remove.
11400         (convert_pointer_to): Remove.
11401         (lookup_base): Declare.
11402         (convert_pointer_to_vbase): Remove.
11403         * call.c (build_scoped_method_call): Use lookup_base &
11404         build_base_path instead of convert_pointer_to_real,
11405         get_base_distance & get_binfo.
11406         (build_over_call): Likewise.
11407         * cvt.c (cp_convert_to_pointer): Likewise.
11408         (convert_to_pointer_force): Likewise.
11409         (build_up_reference): Likewise.
11410         (convert_pointer_to_real): Remove.
11411         (convert_pointer_to): Remove.
11412         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11413         instead of convert_pointer_to_vbase & build_vbase_path.
11414         (emit_base_init): Use build_base_path instead of
11415         convert_pointer_to_real.
11416         (expand_virtual_init): Lose unrequired conversions.
11417         (resolve_offset_ref): Use lookup_base and build_base_path
11418         instead of convert_pointer_to.
11419         * rtti.c (build_dynamic_cast_1): Use lookup_base &
11420         build_base_path instead of get_base_distance & build_vbase_path.
11421         * search.c (get_vbase_1): Remove.
11422         (get_vbase): Remove.
11423         (convert_pointer_to_vbase): Remove.
11424         (lookup_base_r): New function.
11425         (lookup_base): New function.
11426         * typeck.c (require_complete_type): Use lookup_base &
11427         build_base_path instead of convert_pointer_to.
11428         (build_component_ref): Likewise.
11429         (build_x_function_call): Likewise.
11430         (get_member_function_from_ptrfunc): Likewise.
11431         (build_component_addr): Likewise.
11432         * typeck2.c (build_scoped_ref): Likewise.
11434 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11436         * cp-tree.h (CP_TYPE_QUALS): Removed.
11437         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11438         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11439         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11440         * dump.c (cp_dump_tree): Use void* dump_info argument to match
11441         lang-hooks prototype.
11442         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11443         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11444         CP_TYPE_QUALS changed to cp_type_quals.
11445         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11446         (CXX_C_OBJS): Remove c-dump.o.
11448 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
11450         PR c++/3637
11451         * pt.c (lookup_template_class): Ensure that all specializations
11452         are registered on the list corresponding to the most general
11453         template.
11455 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
11457         * call.c (non_reference): Add documentation.
11458         (convert_class_to_reference): Do not strip reference types
11459         from conversion operators.
11460         (maybe_handle_ref_bind): Simplify.
11461         (compare_ics): Correct handling of references.
11463 2001-11-19  John Wilkinson <johnw@research.att.com>
11465         * dump.c (dump_op): New function.
11466         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
11467         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11468         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11470 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
11472         PR4629
11473         * semantics.c (finish_sizeof): Make sure that expression created
11474         while processing a template do not have a type.
11475         (finish_alignof): Likewise.
11476         * typeck.c (c_sizeof): Likewise.
11477         (expr_sizeof): Likewise.
11479 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
11481         * lex.c (cxx_finish): Call c_common_finish.
11482         (finish_parse): Remove.
11484 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11486         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11487         when displaying error message about missing array bounds.
11489 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11491         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11492         CONST_CAST_EXPR.
11493         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11495 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
11497         * cp-tree.h (print_class_statistics): Restore.
11499 2001-11-15  Jason Merrill  <jason@redhat.com>
11501         * method.c (use_thunk): Don't emit debugging information for thunks.
11503         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11504         * decl.c (make_typename_type): Handle getting a class template.
11505         * search.c (lookup_field_r): A class template is good enough for
11506         want_type.
11508         * call.c (convert_like_real): Only use cp_convert for the bad part.
11509         (standard_conversion): Also allow bad int->enum.
11510         * typeck.c (ptr_reasonably_similar): Also allow functions to
11511         interconvert.  Pointers to same-size integers are reasonably
11512         similar.
11514         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11515         give it void type.
11517 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11519         PR g++/3154
11520         * init.c (sort_base_init): Remove unreachable code.
11521         (expand_member_init): Adjust comment to reflect reality. Simplify
11522         and remove unreachable code.
11524 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
11526         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11527         (cxx_init): Update prototype.
11528         * decl.c (init_decl_processing): Rename.  Move null node init
11529         to its creation time.
11530         * lex.c (cxx_init_options): Update.
11531         (cxx_init): Combine with old init_parse; also call
11532         cxx_init_decl_processing.
11534 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
11536         * decl.c (check_initializer): Try to complete the type of an
11537         array element before checking whether it's complete.  Don't
11538         complain about arrays with complete element types but an
11539         unknown size.
11540         (cp_finish_decl): Build the hierarchical constructor before
11541         calling maybe_deduce_size_from_array_init.
11543 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11545         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11547 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
11549         PR g++/4206
11550         * parse.y (already_scoped_stmt): Remove.
11551         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11553 2001-11-12  H.J. Lu <hjl@gnu.org>
11555         * cvt.c (ocp_convert): Don't warn the address of a weak
11556         function is always `true'.
11558 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11560         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11561         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11562         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11563         * cp-tree.h (print_class_statistics): Remove.
11564         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11565         cxx_print_identifier, cxx_set_yydebug): New.
11566         * lex.c (set_yydebug): Rename c_set_yydebug.
11567         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11568         lang_print_xnode): Rename.
11569         * tree.c (print_lang_statistics): Rename.
11571 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11573         * class.c (dump_array): Fix format specifier warning.
11575 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11577         * cp-lang.c (LANG_HOOKS_NAME): Override.
11578         (struct lang_hooks): Constify.
11579         * lex.c (cxx_init_options): Update.
11580         (lang_identify): Remove.
11581         * parse.y (language_string): Remove.
11583 2001-11-08  Andreas Franck  <afranck@gmx.de>
11585         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11586         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11587         suggested by autoconf.
11588         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11589         (c++.install-common): Use the transformed target alias names.
11591 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11593         * Make-lang.in: Update.
11594         * cp-lang.c: Include langhooks-def.h.
11596 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11598         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11600 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11602         * lex.c (copy_lang_type): Add static prototype.
11604 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11606         * pt.c (unify): Handle SCOPE_REF.
11608 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
11610         * tree.c (cp_copy_res_decl_for_inlining): Adjust
11611         DECL_ABSTRACT_ORIGIN for the return variable.
11613 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
11615         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11617 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
11619         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11620         semantics.c, spew.c: Fix spelling errors.
11622 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11624         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11626 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
11628         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11629         pop_everything.
11631 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11633         * cp-lang.c (cxx_get_alias_set): New function.
11634         Point LANG_HOOKS_GET_ALIAS_SET to it.
11636 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11638         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11639         * cp-tree.h (make_unbound_class_template): Prototype new function.
11640         * decl.c (make_unbound_class_template): New function.
11641         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11642         * error.c (dump_type): Likewise.
11643         * mangle.c (write_type): Likewise.
11644         * parse.y (template_parm): Likewise.
11645         (template_argument): Use make_unbound_class_template.
11646         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11647         (tsubst): Likewise.
11648         (tsubst_copy): Likewise.
11649         (unify): Likewise.
11650         * tree.c (walk_tree): Likewise.
11651         * typeck.c (comptypes): Likewise.
11653 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11655         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11656         extra calls into fewer ones.
11658 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
11660         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11661         Warn when merging inline with attribute noinline.
11662         (start_decl, start_function): Warn if inline and attribute
11663         noinline appear in the same declaration.
11665 2001-10-16  H.J. Lu <hjl@gnu.org>
11667         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11668         for tree checking disabled.
11670 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
11672         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11673         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11675 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11677         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11678         (unify): Only handle MINUS_EXPR specially if the above flag is set
11679         and the subtracted constant is 1.  Clear the flag on recursive calls.
11680         Set it when unifying the maximum value in an INTEGER_TYPE's range.
11682 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11684         * decl.c (bad_specifiers): Don't allow exception specifications
11685         on any typedefs.
11687 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
11689         * cp/lex.c (init_cp_pragma): Similarly.
11691 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11693         * pt.c (lookup_template_class): Build complete template arguments
11694         for BOUND_TEMPLATE_TEMPLATE_PARM.
11696 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11698         * cp-tree.h (TYPE_BINFO): Update comment.
11699         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11700         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11701         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11702         (copy_type): Prototype new function.
11703         * lex.c (copy_lang_decl): Gather tree node statistics.
11704         (copy_lang_type): New function.
11705         (copy_type): Likewise.
11706         (cp_make_lang_type): Create lang_type for
11707         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
11708         and BOUND_TEMPLATE_TEMPLATE_PARM.
11709         * pt.c (tsubst): Use copy_type instead of copy_node.
11710         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11712 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11714         * pt.c (determine_specialization): Ignore functions without
11715         DECL_TEMPLATE_INFO.
11717 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
11719         PR g++/4476
11720         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11722 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
11724         * typeck2.c (store_init_value): Don't re-digest a bracketed
11725         initializer.
11727         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11728         ANON_AGGR_TYPE_P.
11730 2001-10-11  Richard Henderson  <rth@redhat.com>
11732         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11733         of an asm statement.
11734         (build_vtbl_ref_1): Split out from build_vtbl_ref.
11735         (build_vfn_ref): Use it to handle vtable descriptors before
11736         calling build_vtable_entry_ref.
11737         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11739 2001-10-10  Richard Henderson  <rth@redhat.com>
11741         * parse.y (asm_operand): Allow named operands.
11742         * semantics.c (finish_asm_stmt): Tweek for changed location
11743         of the operand constraint.
11745 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
11747         * call.c (standard_conversion): Add bad conversion between
11748         integers and pointers.
11749         (convert_like_real): Don't use convert_for_initialization for bad
11750         conversions; complain here and use cp_convert.
11751         (build_over_call): Don't handle bad conversions specially.
11752         (perform_implicit_conversion): Allow bad conversions.
11753         (can_convert_arg_bad): New fn.
11754         * cp-tree.h: Declare it.
11755         * typeck.c (convert_for_assignment): Use it.
11756         (ptr_reasonably_similar): Any target type is similar to void.
11758 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
11760         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11761         (cp/cp-lang.o): New rule.
11762         * cp-tree.h: Declare hooks.
11763         * tree.c: Make hooks non-static.
11764         (init_tree): Don't initialize hooks here.
11765         * lex.c: Likewise.  Move definition of lang_hooks to...
11766         * cp-lang.c: ... new file.
11768 2001-10-08  Richard Henderson  <rth@redhat.com>
11770         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11771         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11773 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11775         * class.c (build_vtable_entry_ref): Const-ify.
11776         * decl.c (predefined_identifier,
11777         initialize_predefined_identifiers): Likewise.
11778         * init.c (build_new_1): Likewise.
11779         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11780         Likewise.
11782 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
11784         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11785         (INSNS_PER_STMT): Likewise.
11786         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11787         (copy_body, initialize_inlined_parameters): Likewise.
11788         (declare_return_variable, inlinable_function_p): Likewise.
11789         (expand_call_inline, expand_calls_inline): Likewise.
11790         (optimize_inline_calls, clone_body): Likewise.
11791         * tree.c (walk_tree): Moved to ../tree-inline.c.
11792         (walk_tree_without_duplicates): Likewise.
11793         (copy_tree_r, remap_save_expr): Likewise.
11795 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
11797         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11798         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11799         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11800         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11801         (flag_inline_trees): Moved declaration to ../tree-inline.h.
11802         (walk_tree): Moved declaration to ../tree-inline.h.
11803         (walk_tree_without_duplicates, copy_tree_r): Likewise.
11804         (remap_save_expr): Likewise.
11805         * decl.c: Include tree-inline.h.
11806         (lang_mark_tree): Don't mark inlined_fns.
11807         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11808         * optimize.c: Include tree-inline.h.
11809         (optimize_inline_calls): Move declaration to ../tree.h, as
11810         non-static.
11811         (remap_decl): Use language-independent constructs and hooks.
11812         (remap_block, copy_body_r, declare_return_variable): Likewise.
11813         (inlinable_function_p): Likewise.  Don't test for
11814         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11815         no longer language-specific.
11816         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
11817         call of dump_function to...
11818         (optimize_function): Here...
11819         (clone_body): New function, extracted from...
11820         (maybe_clone_body): ... here.  Build decl_map locally and pass
11821         it on to clone_body.
11822         * pt.c, semantics.c: Include tree-inline.h.
11823         * tree.c: Likewise.
11824         (cp_walk_subtrees): New language-specific hook for tree inlining.
11825         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11826         cp_is_overload_p, cp_auto_var_in_fn_p,
11827         cp_copy_res_decl_for_inlining): Likewise.
11828         (walk_tree): Move language-specific constructs into...
11829         (cp_walk_subtrees): this new function.
11830         (copy_tree_r): Use language-independent constructs and hooks.
11831         (init_tree): Initialize tree inlining hooks.
11832         (remap_save_expr): Adjust prototype so that the declaration
11833         does not require the definition of splay_tree.
11835 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11837         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11838         to build the declaration instead of the declaration itself.
11840 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
11842         * decl2.c (cxx_decode_option): Add 'else'.
11844         * spew.c (end_input): No longer static.
11845         * cp-tree.h: Declare it.
11846         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11848 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11850         * call.c (build_over_call), typeck.c (build_function_call_real):
11851         Pass type attributes to check_function_format rather than name or
11852         assembler name.  Don't require there to be a name or assembler
11853         name to check formats.
11855 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11857         * decl.c (init_decl_processing): Don't call
11858         init_function_format_info.  Initialize lang_attribute_table
11859         earlier.
11860         (builtin_function): Call decl_attributes.
11861         (insert_default_attributes): New.
11863 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
11865         * decl.c (grokdeclarator): Copy array typedef handling from C
11866         frontend.
11868         * decl.c (grokdeclarator): Copy too-large array handling from C
11869         frontend.
11871 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
11873         * config-lang.in (target_libs): Added target-gperf, so that we
11874         don't try to build it if C++ is disabled.
11876 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
11878         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11879         (cp/errfn.o): Delete rule.
11880         (cp/error.o): Depend on flags.h.
11881         * errfn.c: Delete file.
11882         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
11883         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11884         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11885         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11886         internal_error respectively.  Make cp_deprecated into a macro.
11887         Don't define cp_printer typedef or declare cp_printers.
11888         * error.c: Include flags.h.
11889         Delete: struct tree_formatting_info, print_function_argument_list,
11890         print_declaration, print_expression, print_function_declaration,
11891         print_function_parameter, print_type_id, print_cv_qualifier_seq,
11892         print_type_specifier_seq, print_simple_type_specifier,
11893         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11894         print_parameter_declaration_clause, print_exception_specification,
11895         print_nested_name_specifier, and definition of cp_printers.
11896         (locate_error): New function.
11897         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11898         rewritten in terms of locate_error and diagnostic.c.
11899         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11900         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
11901         (init_error): Adjust to match.
11903 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11905         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11907 2001-09-21  Richard Henderson  <rth@redhat.com>
11909         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11910         (build_vtbl_initializer): Likewise.
11911         (build_vfn_ref): New.
11912         * cp-tree.h: Declare it.
11913         * call.c (build_over_call): Use it.
11914         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11915         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11917 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
11919         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11921 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11923         Table-driven attributes.
11924         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11925         * decl2.c (cplus_decl_attributes): Only take one attributes
11926         parameter.
11927         * cp-tree.c (cplus_decl_attributes): Update prototype.
11928         * class.c (finish_struct), decl.c (start_decl, start_function),
11929         decl2.c (grokfield), friend.c (do_friend), parse.y
11930         (parse_bitfield): Update calls to cplus_decl_attributes.
11931         * decl.c (grokdeclarator): Take a pointer to a single ordinary
11932         attribute list.
11933         * decl.h (grokdeclarator): Update prototype.
11934         * decl2.c (grokfield): Take a single ordinary attribute list.
11935         * friend.c (do_friend): Likewise.
11936         * decl.c (shadow_tag, groktypename, start_decl,
11937         start_handler_parms, grokdeclarator, grokparms, start_function,
11938         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11939         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11940         (process_template_parm, do_decl_instantiation): Pass single
11941         ordinary attribute lists around.
11942         * decl.c (grokdeclarator): Correct handling of nested attributes.
11943         Revert the patch
11944         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
11945                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11946                 not the left.
11947         .
11948         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11949         (cp_attribute_table): Declare.
11950         * decl.c (valid_lang_attribute): Don't define.
11951         (lang_attribute_table): Define.
11952         (init_decl_processing): Initialize lang_attribute_table instead of
11953         valid_lang_attribute.
11954         * tree.c (cp_valid_lang_attribute): Remove.
11955         (handle_java_interface_attribute, handle_com_interface_attribute,
11956         handle_init_priority_attribute): New functions.
11957         (cp_attribute_table): New array.
11958         * decl2.c (import_export_class): Don't use
11959         targetm.valid_type_attribute.
11961 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11963         * Make-lang.in (cp/error.o): Depend on real.h
11964         * error.c: #include "real.h"
11966 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11968         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11969         xmalloc/strcpy/strcat.
11971 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11973         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11974         Const-ification.
11975         * pt.c (tsubst_decl): Likewise.
11977 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11979         * decl2.c (lang_f_options): Const-ification.
11980         * lex.c (cplus_tree_code_name): Likewise.
11981         * spew.c (yyerror): Likewise.
11983 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11985         PR c++/3986
11986         * class.c (force_canonical_binfo_r): Check & move an indirect
11987         primary base first.
11988         (force_canonical_binfo): Check that it's not already
11989         canonical.
11990         (mark_primary_virtual_base): Remove BINFO parameter.
11991         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
11993 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11995         Remove TYPE_NONCOPIED_PARTS.
11996         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
11997         CLASSTYPE_PURE_VIRTUALS.
11998         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
11999         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
12000         (layout_class_type): Don't call fixup_inline_methods here ...
12001         (finish_struct_1): ... call it here.
12003 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
12005         * decl.c (duplicate_decls): Remove code deadling with
12006         DECL_SAVED_INSNS.
12007         * decl2.c (finish_file): Likewise.
12008         * pt.c (instantiate_decl): Likewise.
12009         * semantics.c (expand_body): Don't defer local functions if
12010         they wouldn't be deferred for some other reason.  Don't
12011         generate RTL for functions that will not be emitted.
12012         (genrtl_start_function): Remove code deadling with
12013         DECL_SAVED_INSNS.
12014         (genrtl_finish_function): Likewise.
12016 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12018         PR c++/4203
12019         * call.c (build_over_call): Do not optimize any empty base
12020         construction.
12022 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12024         * error.c (dump_template_decl): Output template parameters
12025         together with their specifiers.
12026         Output `class' prefix for template template parameter.
12027         (dump_decl): Fix formatting.
12029 2001-08-30  Kurt Garloff  <garloff@suse.de>
12031         * optimize.c (inlinable_function_p): Allow only smaller single
12032         functions. Halve inline limit after reaching recursive limit.
12034 2001-08-30  Joern Rennecke <amylaar@redhat.com>
12035             Jason Merrill  <jason_merrill@redhat.com>
12037         * class.c (build_vtable_entry_ref): Subtract in char*, not
12038         ptrdiff_t.
12040 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
12042         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
12043         (build_cplus_array_type): Use cp_build_qualified_type, not
12044         TYPE_MAIN_VARIANT, to get an unqualified version.
12046         * decl2.c (grok_alignof): Lose.
12047         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
12048         * typeck.c (c_alignof): Lose.
12049         * semantics.c (finish_sizeof, finish_alignof): New.
12050         * parse.y: Use them.
12051         * cp-tree.h: Declare them.
12053 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
12055         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
12056         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
12057         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
12059 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
12061         * typeck2.c (add_exception_specifier): Only require complete type if
12062         not in processing template declaration.
12064 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12066         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
12067         GNU_xref_start_scope and GNU_xref_end_scope.
12069         * tree.c (TYPE_HASH): Moved to ../tree.h.
12071 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
12073         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
12074         on COMPOUND_EXPRs.
12076 2001-08-14  Richard Henderson  <rth@redhat.com>
12078         * class.c, cp-tree.h (build_vfn_ref): Remove.
12079         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
12081 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
12083         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12084         empty class assignment as having side-effects to avoid
12085         spurious warnings.
12087 2001-08-13  Zack Weinberg  <zackw@panix.com>
12089         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12090         * except.c: Include libfuncs.h.
12092 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12094         * decl.c (grokdeclarator): Clarify diagnostic message.
12096 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12098         * decl2.c (do_nonmember_using_decl): Replace using directive
12099         with using declaration in the error message.
12101 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12103         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12104         criterion to avoid rebuilding expression tree instead of
12105         processing_template_decl.
12107 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
12109         Support named return value optimization for inlines, too.
12110         * decl.c (finish_function): Nullify returns here.
12111         * semantics.c (genrtl_start_function): Not here.
12112         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12113         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
12114         Also nullify the CLEANUP_STMT for the nrv.
12115         * cp-tree.h: Declare it.
12116         * optimize.c (declare_return_variable): Replace the nrv with the
12117         return variable.
12118         * typeck.c (check_return_expr): Be more flexible on alignment check.
12119         Ignore cv-quals when checking for a matching type.
12121 2001-08-09  Richard Henderson  <rth@redhat.com>
12123         * decl2.c (finish_objects): Use target hooks instead of
12124         assemble_constructor and assemble_destructor.
12126 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12128         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12130 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
12132         PR c++/3820
12133         Stop using TYPE_NONCOPIED_PARTS.
12134         * call.c (build_over_call): Be careful when copy constructing
12135         or assigning to an empty class.
12136         * class.c (check_bases_and_members): It has a
12137         COMPLEX_ASSIGN_REF if it has a vptr.
12138         (layout_class_type): Don't add empty class padding to
12139         TYPE_NONCOPIED_PARTS.
12140         (finish_struct_1): Don't add the VFIELD either.
12141         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12142         initialization.
12144 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
12146         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12148 2001-08-06  Richard Henderson  <rth@redhat.com>
12150         * decl2.c (finish_objects): Pass a symbol_ref and priority to
12151         assemble_{constructor,destructor}.  Remove priority handling.
12153 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12155         Don't allow template-id in using-declaration.
12156         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12157         (do_class_using_decl): Likewise.
12159 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12161         * cp/spew.c (read_token): No need to pop buffers.
12163 2001-08-02  Stan Shebs  <shebs@apple.com>
12165         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12166         (fnaddr_from_vtable_entry): Remove decl.
12167         * method.c (use_thunk): Update comment.
12169 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
12171         * repo.c (get_base_filename): Change return value to const char
12172         pointer.
12174 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
12176         Kill -fhonor-std.
12177         * NEWS: Document.
12178         * cp-tree.h (flag_honor_std): Remove.
12179         (CPTI_FAKE_STD): Remove.
12180         (std_node): Remove comment about it being NULL.
12181         (fake_std_node): Remove.
12182         * decl.c (in_fake_std): Remove.
12183         (walk_namespaces_r): Remove fake_std_node check.
12184         (push_namespace): Remove in_fake_std code.
12185         (pop_namespace): Likewise.
12186         (lookup_name_real): Remove fake_std_node check.
12187         (init_decl_processing): Always create std_node. Always add
12188         std:: things there.
12189         (builtin_function): Always put non '_' fns in std.
12190         * decl2.c (flag_honor_std): Remove.
12191         (lang_f_options): Remove honor-std.
12192         (unsupported_options): Add honor-std.
12193         (set_decl_namespace): Remove fake_std_node check.
12194         (validate_nonmember_using_decl): Likewise.
12195         (do_using_directive): Likewise.
12196         (handle_class_head): Likewise.
12197         * dump.c (cp_dump_tree): Likewise.
12198         * except.c (init_exception_processing): Adjust.
12199         * init.c (build_member_call): Remove fake_std_node check.
12200         (build_offset_ref): Likewise.
12201         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12202         * rtti.c (init_rtti_processing): Adjust.
12204 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
12206         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12207         operand while calling cp_tree_equal.
12209 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12211         The 3.0 ABI no longer has vbase pointer fields.
12212         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12213         FORMAT_VBASE_NAME): Remove.
12214         * method.c (do_build_copy_constructor): Adjust.
12215         (do_build_assign_ref): Adjust.
12216         * search.c (lookup_field_r): Adjust.
12217         * typeck.c (build_component_ref): Adjust.
12219         The 3.0 ABI always has a vtable pointer at the start of every
12220         polymorphic class.
12221         * rtti.c (build_headof_sub): Remove.
12222         (build_headof): Adjust.
12223         (get_tinfo_decl_dynamic): No need to check flag_rtti
12224         here. Adjust.
12225         (create_real_tinfo_var): Explain why we need a hidden name.
12227 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12229         PR c++/3631
12230         * class.c (update_vtable_entry_for_fn): The fixed adjustment
12231         of a virtual thunk should be from declaring base.
12233 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12235         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12236         the shared virtual base, so preserving inheritance graph order.
12238 2001-07-30  Andreas Jaeger  <aj@suse.de>
12240         * decl2.c: Remove unused var global_temp_name_counter.
12242 2001-07-28  Richard Henderson  <rth@redhat.com>
12244         * method.c (pending_inlines): Remove.
12246 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
12248         * class.c (mark_primary_virtual_base): Don't adjust base
12249         offsets here.
12250         (dfs_unshared_virtual_bases): Adjust them here.
12251         (mark_primary_bases): Explain why we adjust at the end.
12253 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
12255         * class.c (finish_struct_1): When copying the primary base's
12256         VFIELD, make sure we find it is at offset zero.
12258 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12260         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12261         tsubst_expr for default template arguments.
12263 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12265         PR c++/3621
12266         * spew.c (yylex): Only copy the token's lineno, if it is
12267         nonzero.
12269 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12271         PR c++/3624
12272         * call.c (resolve_args): Simplify, call
12273         convert_from_reference.
12274         (build_new_op): Resolve and convert from reference ARG1
12275         earlier. Adjust ARG2 & ARG3 resolve and conversion.
12277 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12279         * decl.c (last_function_parm_tags): Remove.
12280         (current_function_parm_tags): Remove.
12281         (init_decl_processing): Adjust.
12282         (start_function): Adjust.
12283         (store_parm_decls): Adjust.
12285         PR c++/3152
12286         * decl.c (grokdeclarator): Detect when a function typedef is
12287         declaring a function, and create last_function_parms correctly.
12289 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
12291         * call.c (joust): Only prefer a non-builtin candidate to a builtin
12292         one if they have the same signature.
12294         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
12295         it rather than toplevel_bindings_p.  Give it a mangled name if static.
12296         (convert_to_reference): Adjust.
12297         * decl2.c (get_temp_name): Lose.
12298         * mangle.c (mangle_ref_init_variable): New fn.
12299         (mangle_guard_variable): Strip the ref-init header.
12300         * cp-tree.h: Adjust.
12301         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12302         initializer.
12303         (grok_reference_init): Always use DECL_INITIAL.
12305 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12307         PR c++/3416
12308         * call.c (build_conditional_expr): Recheck args after
12309         conversions.
12310         * cp-tree.h (build_conditional_expr): Move to correct file.
12311         * typeck.c (decay_conversion): Diagnose any unknown types
12312         reaching here.
12313         (build_binary_op): Don't do initial decay or default
12314         conversions on overloaded functions.
12315         (build_static_cast): Don't do a decay conversion here.
12317 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12319         PR c++/3543
12320         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12321         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12323 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12325         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12326         (create_vtbl_ptr): ... here.
12328 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12330         * class.c (build_vbase_offset_vbtl_entries): Look for
12331         non-primary base of which we are a sub vtable.
12333 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
12335         * semantics.c (finish_this_expr):  Remove unused code.
12337 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
12339         Simplify rtti, now we've only one ABI.
12340         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12341         CPTI_TINFO_VAR_ID.
12342         (tinfo_decl_id, tinfo_var_id): Remove.
12343         (get_typeid_1): Remove.
12344         * rtti.c
12345         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12346         (typeid_ok_p): New function.
12347         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12348         (get_tinfo_decl): Remove old abi documentation.
12349         (tinfo_from_decl): Remove.
12350         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12351         (get_typeid_1): Remove.
12352         (get_base_offset): Remove.
12353         (synthesize_tinfo_var): Absorb get_base_offset.
12354         (create_real_tinfo_var): Don't use tinfo_decl_id.
12356 2001-07-23  Graham Stott  <grahams@redhat.com>
12358         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12359         variable has_two_argument_delete_p.
12361 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
12363         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12364         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12365         (CPTI_INDEX_IDENTIFIER): Remove.
12366         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12367         (delta2_identifier): Remove.
12368         (index_identifier): Remove.
12369         (pfn_or_delta2_identifier): Remove.
12370         (flag_vtable_thunks): Remove.
12371         (VTABLE_DELTA2_NAME): Remove.
12372         (VTABLE_INDEX_NAME): Remove.
12373         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12374         (vfunc_ptr_type_node): Adjust.
12375         (VTABLE_NAME_PREFIX): Adjust.
12376         (build_vfn_ref): Lose first parameter.
12377         (fixup_all_virtual_upcast_offsets): Remove.
12378         * decl.c (initialize_predefined_identifiers): Remove
12379         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12380         (init_decl_processing): Remove no-vtable-thunk code.
12381         * decl2.c (flag_vtable_thunks): Remove.
12382         (mark_vtable_entries): Remove no-vtable-thunk code.
12383         * error.c (dump_decl): Remove no-vtable-thunk code.
12384         (dump_expr): Adjust ptr to member function code.
12385         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12386         code.
12387         * rtti.c (build_headof): Remove no-vtable-thunk code.
12388         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12389         * search.c (get_base_distance): Remove expand_upcast_fixups case.
12390         (virtual_context) Remove.
12391         (expand_upcast_fixups): Remove.
12392         (fixup_virtual_upcast_offsets): Remove.
12393         (fixup_all_virtual_upcast_offsets): Remove.
12394         * typeck.c (get_member_function_from_ptrfunc): Remove
12395         no-vtable-thunk code.
12396         * call.c (build_over_call): Adjust call to build_vfn_ref.
12397         * class.c (build_vfn_ref): Lose first parameter. Remove
12398         no-vtable-thunk code.
12399         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12400         (build_vtable_entry): Remove no-vtable-thunk code.
12402 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
12404         Remove old-abi remnants. Remove comments about old abi
12405         behavior. Remove references to 'new-abi' in comments.
12406         * cp-tree.h: Adjust comments.
12407         (vbase_offsets_in_vtable_p): Delete.
12408         (vcall_offsets_in_vtable_p): Delete.
12409         (vptrs_present_everywhere_p): Delete.
12410         (all_overridden_vfuns_in_vtables_p): Delete.
12411         (merge_primary_and_secondary_vtables_p): Delete.
12412         (TYPE_CONTAINS_VPTR_P): Adjust.
12413         (VTT_NAME_PREFIX): Remove.
12414         (CTOR_VTBL_NAME_PREFIX): Remove.
12415         (init_vbase_pointers): Remove.
12416         * class.c: Adjust coments.
12417         (build_vbase_pointer_fields): Delete.
12418         (build_vbase_pointer): Remove old-abi code.
12419         (build_secondary_vtable): Likewise.
12420         (modify_all_vtables): Likewise.
12421         (create_vtable_ptr): Likewise.
12422         (layout_class_type): Likewise.
12423         (finish_struct_1): Likewise.
12424         (finish_vtbls): Likewise.
12425         (dfs_finish_vtbls): Delete.
12426         (build_vbase_offset_vtbl_entries): Remove old-abi code.
12427         * cvt.c: Adjust comments.
12428         * decl.c: Adjust comments.
12429         * decl2.c: Adjust comments.
12430         * init.c: Adjust comments.
12431         (construct_virtual_bases): Remove old-abi code.
12432         * lang-specs.h: Remove -fno-new-abi.
12433         * mangle.c: Adjust comments.
12434         * rtti.c: Adjust comments.
12435         (get_base_offset): Remove old-abi-code.
12436         * search.c: Adjust comments.
12437         (dfs_init_vbase_pointers): Remove.
12438         (dfs_vtable_path_unmark): Remove.
12439         (init_vbase_pointers): Remove.
12440         * semantics.c: Adjust comments.
12441         (emit_associated_thunks): Remove old-abi code.
12442         * typeck.c: Adjust comments.
12444 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
12446         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12447         params.h.
12449 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
12451         * class.c (finish_struct_anon): Forbid nested classes.
12453 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12455         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12456         * optimize.c: Include debug.h.
12457         (maybe_clone_body): Use debug hook.
12458         * semantics.c: Include debug.h.
12459         (expand_body): Use debug hook.
12461 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12463         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12465 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
12467         * class.c (type_requires_array_cookie): New function.
12468         (check_methods): Don't try to figure out whether the type needs a
12469         cookie here.
12470         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12471         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12472         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12473         * pt.c (instantiate_class_template): Don't set
12474         TYPE_VEC_DELETE_TAKES_SIZE.
12475         * NEWS: Document ABI changes from GCC 3.0.
12477 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
12478             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12480         * NEWS (Changes in GCC 3.0): Fix typo.
12482 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12484         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12485         which attributes are to be attached, and a flags argument.  Update
12486         call to decl_attributes.
12487         (grokfield): Update call to decl_attributes.
12488         * class.c (finish_struct): Update call to cplus_decl_attributes.
12489         * cp-tree.h (cplus_decl_attributes): Update prototype.
12490         * decl.c (start_decl, grokdeclarator, start_function): Update
12491         calls to decl_attributes and cplus_decl_attributes.
12492         * friend.c (do_friend): Update call to cplus_decl_attributes.
12493         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12495 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
12497         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12498         for `register' variables with an asm-specification.
12500 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
12502         * semantics.c (finish_asm_stmt): Mark the output operands
12503         to an asm addressable, if necessary.
12505 2001-07-11  Ben Elliston  <bje@redhat.com>
12507         * Revert this change -- there is a subtle bug.
12509         PR c++/80
12510         * decl.c (finish_enum): New "attributes" argument; pass it to
12511         cplus_decl_attributes.  Use a narrower type if the enum is packed.
12512         * cp-tree.h (finish_enum): Adjust prototype.
12513         * parse.y (enum_head): New non-terminal.
12514         (structsp): Use it. Enums now may be preceded or followed by
12515         optional attributes -- pass their chained tree to finish_enum().
12516         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12518 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
12520         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12521         variables.
12523 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
12525         * semantics.c (cp_expand_stmt): Fix for null
12526         current_function_return_value.
12528 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
12530         * call.c (build_op_delete_call): Initialize fn.
12531         (convert_like_real): Delete conditional.
12532         (joust): Initialize *w and *l.
12533         * class.c: Add prototype for binfo_ctor_vtable.
12534         (get_primary_binfo): Initialize result.
12535         * init.c (build_java_class_ref): Initialize name.
12537 2001-07-09  Erik Rozendaal  <dlr@acm.org>
12539         * typeck.c (unary_complex_lvalue): Do not duplicate the
12540         argument to modify, pre-, or post-increment when used as an
12541         lvalue and when the argument has side-effects.
12543 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12545         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12546         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
12547         cplus_decl_attributes even if attrs is NULL.
12548         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12550 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12552         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12553         calls to decl_attributes.
12555 2001-07-06  Ira Ruben   <ira@apple.com>
12557         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12558         be DECL_TEMPLATE_RESULT.
12560 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12562         * cp-tree.h (copy_template_template_parm): Rename to ...
12563         (bind_template_template_parm): ... here.
12564         * tree.c (copy_template_template_parm): Rename to ...
12565         (bind_template_template_parm): ... here.  Remove the case when
12566         NEWARGS is NULL_TREE.
12567         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12568         BOUND_TEMPLATE_TEMPLATE_PARM.
12569         * pt.c (lookup_template_class): Adjust.
12571 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
12573         * cvt.c (convert_lvalue): New fn.
12574         * cp-tree.h: Declare it.
12575         * method.c (do_build_assign_ref): Use it.
12576         (do_build_copy_constructor): Convert parm to base types
12577         before calling base constructors.
12579         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12580         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
12581         optimize.
12582         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12584 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
12586         * optimize.c (optimize_inline_calls): New function, broken out
12587         of ...
12588         (optimize_function): ... here. Call it. Don't inline if it is
12589         a thunk.
12590         (dump_function): Print name of dump flag causing this dump.
12591         * semantics.c (expand_body): Move thunk inline check to
12592         optimize_function.
12594 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12596         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12597         (comptypes): Use target.comp_type_attributes.
12599 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12601         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12603 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12605         * error.c (lang_print_error_function): Add a `diagnostic_context *'
12606         parameter. Tweak.
12608 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12610         * decl2.c (import_export_class): Update.
12612 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12614         * error.c (init_error): Adjust settings.
12616 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12618         * error.c (init_error): Adjust settings.
12620 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
12622         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12623         return pointers to data members by reference rather than by value.
12625 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
12627         Implement the Named Return Value optimization.
12628         * cp-tree.h (struct cp_language_function): Add x_return_value.
12629         (current_function_return_value): Now a macro.
12630         * decl.c: Don't define it.
12631         (define_label, finish_case_label): Don't clear it.
12632         (init_decl_processing): Don't register it with GC.
12633         * semantics.c (genrtl_finish_function): Don't check it for
12634         no_return_label.  Copy the RTL from the return value to
12635         current_function_return_value and walk, calling...
12636         (nullify_returns_r): ...this new fn.
12637         * typeck.c (check_return_expr): Set current_function_return_value.
12639 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
12641         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12642         sharing a ctor vtable with.  Merge code for cases 1 and 2.
12643         (binfo_ctor_vtable): New fn.
12644         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12646 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
12648         * class.c (dfs_find_final_overrider): Fix logic.
12650         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12651         virtual thunk instead of non-virtual.
12652         (get_matching_virtual): Uncomment.
12654         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12655         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
12656         PARM, not ARG.
12658 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
12660         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12661         we've not emerged from the hierarchy of RTTI_BINFO on reaching
12662         a non-virtual base.
12664 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
12666         * NEWS: Update release number.
12668 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12670         PR c++/3130, c++/3131, c++/3132
12671         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12672         * class.c (force_canonical_binfo_r): Move
12673         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12674         virtual bases unless they're primary and what they're primary
12675         too has been moved.
12676         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12677         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12678         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12679         derived binfo.
12680         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12681         (layout_nonempty_base_or_field): Add most derived type
12682         parameter. Adjust.
12683         (layout_empty_base): Likewise.
12684         (build_base_field): Likewise.
12685         (build_base_fields): Likewise.
12686         (propagate_binfo_offsets): Add most derived type
12687         parameter. Skip non canonical virtual bases too.
12688         (dfs_set_offset_for_unshared_vbases): Don't skip primary
12689         bases. Do skip canonical bases.
12690         (layout_virtual_bases): Adjust.
12691         (layout_class_type): Adjust.
12692         (dfs_get_primary_binfo): Build list of virtual primary base
12693         candidates.
12694         (get_primary_binfo): Check that the shared virtual primary
12695         base candidate was found first.
12696         (accumulate_vtbl_inits): Don't do anything for non-vptr
12697         containing binfos. For case 1 primary virtual bases, keep
12698         checking that we've not emerged from the hierarchy of RTTI_BINFO.
12700 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12702         PR c++/3089
12703         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12704         hierarchy looking for primary bases for a ctor
12705         vtable. Recursively call oneself, if we meet our primary via
12706         this route and haven't met it yet via inheritance graph order.
12708 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
12710         * lang-options.h: Emit documentation for -fno-honor-std, not
12711         -fhonor-std.
12713 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
12715         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12716         Don't clobber delta.
12717         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12719 2001-06-10  Mark Mitchell <mark@codesourcery.com>
12720             Gabriel Dos Reis  <gdr@codesourcery.com>
12722         * Make-lang.in (cp/call.o): Depend on diagnostic.h
12723         (cp/typeck.o): Depend on diagnostic.h
12724         (cp/typeck2.o): Depend on diagnostic.h
12725         (cp/repo.o): Depend on dignostic.h
12726         * typeck.c: #include diagnostic.h
12727         (convert_for_initialization): Remove extern declaration for
12728         warningcount and errorcount.
12730         * call.c: #include diagnostic.h
12731         (convert_like_real): Remove extern declaration for warnincount and
12732         errorcount.
12734         * repo.c: #include diagnostic.h
12735         * typeck2.c: #include diagnostic.h
12737 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12739         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12740         in previous change.
12742 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12744         PR c++/2929
12745         * friend.c (do_friend): Use push_decl_namespace for classes at
12746         namespace scope.
12748 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12749             Jason Merrill <jason_merrill@redhat.com>
12751         PR c++/3061
12752         * class.c (build_secondary_vtable): Use assert, rather than an error
12753         message.
12754         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12755         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12756         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12757         Don't set BINFO_VTABLE for a primary virtual base.
12759 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
12761         * decl.c (duplicate_decls): Update source position information
12762         when a template function is defined.
12764 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
12766         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
12768 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
12770         PR c++/2914
12771         * decl.c (pushtag): Don't push into a complete type's scope.
12773 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
12775         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12776         (struct lang_decl_flags): Lose generate_with_vtable_p.
12777         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12778         * class.c (copy_virtuals): Adjust.
12779         * decl2.c (mark_vtable_entries): Adjust.
12780         * method.c (make_thunk, build_vtable_entry): Adjust.
12781         * class.c (update_vtable_entry_for_fn): Only look as far as the
12782         first defining class.
12783         (build_vtbl_initializer): Put nothing in the slot for a function only
12784         defined in a lost primary virtual base.
12785         (add_vcall_offset_vtbl_entries_1): Use the same code for
12786         the lost primary case and the normal case.
12787         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12788         (get_vfield_offset, get_derived_offset): Lose.
12789         (dfs_find_final_overrider): Use look_for_overrides_here.
12790         (get_matching_virtual): New fn.
12791         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12792         not BV_VCALL_INDEX.
12793         * search.c (look_for_overrides_here): Split out from...
12794         (look_for_overrides_r): Here.
12796         * class.c (find_final_overrider): Return error_mark_node on error.
12798         * decl2.c (key_method): #if 0 accidental change.
12800 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12802         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12803         (build_over_call): Likewise.
12804         * decl.c (grokparms): Likewise.
12805         * pt.c (tsubst_decl): Likewise.
12806         * typeck.c (convert_arguments): Likewise.
12808 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
12810         * semantics.c (begin_class_definition): Robustify.
12812         * pt.c (instantiate_decl): Tell the repository code about the
12813         clones, not the cloned functions.
12814         * repo.c (repo_template_used): Explicitly instantiate the cloned
12815         function, not the clones.
12817 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12819         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12820         ICS_BAD_FLAG on created conversion.
12821         (compare_ics): Break out rank.
12823 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12825         * decl.c (xref_tag): Remove extraneous %s on dependent name
12826         lookup warning.
12828 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12830         * class.c (layout_vtable_decl): Fix off by one error on
12831         build_index_type.
12832         (build_vtt): Likewise.
12833         (build_ctor_vtbl_group): Likewise.
12835 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12837         * class.c (maybe_indent_hierarchy): New function.
12838         (dump_class_hierarchy_r): Add flags. Dump extra binfo
12839         information, if enabled. Use maybe_indent_hierarchy. Adjust
12840         output format.
12841         (dump_class_hierarchy): Adjust prototype. Adjust output format.
12842         (dump_array, dump_vtable, dump_vtt): New functions.
12843         (finish_struct_1): Adjust hierarchy dumping.
12844         (initialize_vtable): Call dump_vtable.
12845         (build_vtt): Call dump_vtt.
12846         (build_ctor_vtbl_group): Call dump_vtable.
12847         * decl2.c (flag_dump_class_layout): Remove.
12848         (cxx_decode_option): Remove dump translation unit
12849         and dump class hierarchy check. Call dump_switch_p.
12850         (finish_file): Adjust dumping.
12851         (dump.c): Only dump base classes if not TDF_SLIM.
12852         Only dump namespace members if not TDF_SLIM.
12853         * optimize.c (dump_function): New function.
12854         (optimize_function): Call dump_function.
12855         * semantics.c (expand_body): Use dump_enabled_p.
12857 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
12859         PR g++/2936
12860         Part missed from first commit
12861         * decl2.c (finish_anon_union): Copy context.
12863 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
12865         PR g++/2936
12866         * optimize.c (remap_decl): Remap anonymous aggregate members too.
12868 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12870         PR g++/2823
12871         * semantics.c (expand_body): Don't optimize thunks.
12873 2001-05-25  Sam TH  <sam@uchicago.edu>
12875         * cp-tree.h lex.h: Fix header include guards.
12877 2001-05-25  Mark Mitchell <mark@codesourcery.com>
12879         * decl.c (init_decl_processing): Tweak.
12881 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
12883         * decl.c (duplicate_decls): Tidy.
12884         (init_decl_processing): Always set flag_no_builtin.
12886 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12888         PR c++/2184
12889         * decl2.c (do_local_using_decl): Push the decls, even in a
12890         template.
12892 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
12894         * optimize.c (initialize_inlined_parameters): Don't set
12895         TREE_READONLY for a VAR_DECL taking the place of an inlined
12896         PARM_DECL.
12898 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
12900         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12901         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12902         attribute.
12904 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
12906         * parse.y: Refer to compound literals as such, not as
12907         constructor-expressions.
12909 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
12911         * call.c (build_op_delete_call): Ignore exception-specifications
12912         when looking for matching delete operators.
12913         * init.c (build_new_1): Compute whether or not the allocation
12914         function used is a placement allocation function or not, and
12915         communicate this information to build_op_delete_call.
12917 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
12919         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
12920         (build_vtbl_ref): Adjust.
12921         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12922         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12923         Re-add vtable-gc.
12924         (unsupported_options): Correspondingly.
12926         * decl2.c (maybe_make_one_only): Check flag_weak, not
12927         supports_one_only().
12929         * cp-tree.def (START_CATCH_STMT): Lose.
12930         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
12931         * tree.c (cp_statement_code_p): Don't case it.
12932         * semantics.c (cp_expand_stmt): Likewise.
12933         * cp-tree.h (START_CATCH_TYPE): Lose.
12934         (HANDLER_TYPE): New.
12935         * except.c (expand_start_catch_block): Don't start any blocks.
12936         Return the type.
12937         (expand_end_catch_block): Don't end any blocks.
12938         * parse.y (handler): Don't pass anything from finish_handler_parms
12939         to finish_handler.
12940         * pt.c (tsubst_expr): Likewise.
12941         * semantics.c (begin_handler): Call note_level_for_catch here.
12942         (finish_handler_parms): Don't return anything.
12943         (genrtl_catch_block, begin_catch_block): Lose.
12944         (genrtl_handler): Call expand_start_catch here.
12946 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
12948         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12949         (get_vtable_decl, build_vtt): Not here.
12951 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
12953         PR c++/2781
12954         * optimize.c (update_cloned_parm): Copy addressability and other
12955         flags.
12957 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12959         * pt.c (determine_specialization): Ignore artificial functions.
12961 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
12963         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12964         (C_RID_CODE): Remove.
12965         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
12966         (init_parse): Don't do it here.
12968 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
12970         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12971         function declaration to avoid stripping the symbol's attributes.
12973 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
12975         * decl.c (pushdecl): Adjust error string.
12976         (xref_tag): Adjust friend class injection warning. Remove the
12977         inherited name from the class shadowed scope.
12979 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
12981         * except.c (cp_protect_cleanup_actions): New function.
12982         (init_exception_processing): Don't set protect_cleanup_actions
12983         here.  Do set lang_protect_cleanup_actions.
12985 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12987         * spew.c (read_token): Call yyerror on all unexpected tokens.
12989 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
12991         * init.c (member_init_ok_or_else): Take a tree rather than
12992         string for name.
12993         (expand_member_init): Adjust.
12995 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
12997         * decl.c (duplicate_decls): Suppress warning about duplicate
12998         decls if the first decl is a friend.
13000 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
13002         * except.c (choose_personality_routine): Export.  Add
13003         explanatory comment.  Take an enum languages, not a boolean.
13004         (initialize_handler_parm): Adjust to match.
13005         * cp-tree.h: Prototype choose_personality_routine.
13006         * lex.c (handle_pragma_java_exceptions): New function.
13007         (init_cp_pragma): Register #pragma GCC java_exceptions.
13009 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
13011         * method.c (build_mangled_C99_name): Remove unused prototype.
13013 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
13015         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
13016         * typeck.c (get_member_function_from_ptrfunc,
13017         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
13018         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
13020         Reverted Geoff Keating's 2001-05-03's patch.
13022 2001-05-11  Ira Ruben   <ira@apple.com>
13024         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
13026 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
13028         * cp-tree.h (finish_label_expr, lookup_label): Delete.
13029         * parse.y: Update for '&&'; don't issue warning here.
13030         * semantics.c (finish_label_expr): Delete.
13032 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
13034         * splay-tree.h (splay_tree_max): New function.
13035         (splay_tree_min): Likewise.
13037 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
13039         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
13040         (pfn_vflag_identifier): Define.
13041         Update comment about layout of pointer functions.
13042         (build_ptrmemfunc1): Update prototype.
13043         (expand_ptrmemfunc_cst): Update prototype.
13044         * decl.c (initialize_predefined_identifiers): Initialize
13045         pfn_vflag_identifier.
13046         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
13047         an extra field to the type.
13048         * expr.c (cplus_expand_constant): Pass 'flag' between
13049         expand_ptrmemfunc_cst and build_ptrmemfunc1.
13050         * typeck.c (get_member_function_from_ptrfunc): When
13051         FUNCTION_BOUNDARY < 16, look at additional field to determine
13052         if a pointer-to-member is a real pointer or a vtable offset.
13053         (build_ptrmemfunc1): Add new parameter to contain extra field.
13054         (build_ptrmemfunc): Pass the extra field around.
13055         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
13056         (pfn_from_ptrmemfunc): Ignore the extra field.
13058 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
13060         * cp-tree.h (flag_inline_trees): Update documentation.
13061         * decl.c (init_decl_processing): Adjust handling of
13062         flag_inline_functions and flag_inline_trees to support -O3.
13063         (grokfndecl): Set DECL_INLINE on all functions if that's what
13064         the user requested.
13065         (save_function_data): Clear DECL_INLINE in
13066         current_function_cannot_inline is non-NULL.
13067         * decl2.c (flag_inline_trees): Update documentation.
13069 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
13071         * dump.c (cp_dump_tree, USING_STMT case): New case.
13072         * tree.c (cp_statement_code_p): Add USING_STMT.
13073         * decl2.c (do_using_directive): Add the using directive statement.
13075         * tree.c (walk_tree): Reformat an if block.
13077 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
13079         * decl.c (compute_array_index_type): Don't try to do anything with
13080         the indices when processing a template.
13082 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13084         * call.c: NULL_PTR -> NULL.
13085         * class.c: Likewise.
13086         * cvt.c: Likewise.
13087         * decl.c: Likewise.
13088         * decl2.c: Likewise.
13089         * except.c: Likewise.
13090         * init.c: Likewise.
13091         * rtti.c: Likewise.
13092         * search.c: Likewise.
13093         * tree.c: Likewise.
13094         * typeck.c: Likewise.
13095         * typeck2.c: Likewise.
13097 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
13099         * decl2.c (do_using_directive): Revert previous patch.
13101 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13103         * cp-tree.def (USING_STMT): New statement node.
13104         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13105         * decl2.c (do_using_directive): Add USING_STMT to statement
13106         tree. Don't emit errors when processing template decl.
13107         * pt.c (tsubst_expr, USING_STMT case): New case.
13108         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13110 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13112         * call.c (build_new_op): Convert args from reference here.
13113         (build_conditional_expr): Don't convert here.
13115 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13117         * spew.c (last_token_id): New static variable.
13118         (read_token): Set it here.
13119         (yyerror): Use it here.
13121 2001-04-30  Richard Henderson  <rth@redhat.com>
13123         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13124         * decl.c: Likewise.
13126 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
13128         * gxxint.texi: Remove.
13129         * Make-lang.in: Remove all traces of gxxint.texi.
13131 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
13133         * decl2.c (start_static_initialization_or_destruction): Correct
13134         logic to handle the -fno-use-cxa-atexit case.
13136 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
13138         * optimize.c (update_cloned_parm): New function.
13139         (maybe_clone_body): Use it.  Update the `this' parameter too.
13141 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
13143         * decl2.c (unsupported_options): Add new-abi.
13144         * lang-options.h: Remove no longer supported options.
13146 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13148         * except.c (can_convert_eh): Don't check template parms,
13149         typename types etc.
13151 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13153         * optimize.c (maybe_clone_body): Copy parameter names and locations.
13155 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13157         * cp-tree.h (adjust_clone_args): Prototype new function.
13158         * class.c (adjust_clone_args): New function.
13159         * decl.c (start_function): Call it for in charge ctors.
13161 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
13163         * method.c (use_thunk): Make sure that thunks really are emitted
13164         when requested.
13166 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
13168         * mangle.c (write_chars): New macro.
13169         (hwint_to_ascii): New function
13170         (write_number): Use it.
13171         (write_integer_cst): Deal with really big numbers.
13173 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
13175         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13176         the clone.
13178 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
13180         * decl.c (grokdeclarator): Set context of namespace scope
13181         TYPE_DECLS.
13183 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
13185         * cp/optimize.c: Include hashtab.h.
13186         (struct inline_data): Add tree_pruner.
13187         (expand_call_inline, expand_calls_inline): Use it when calling
13188         walk_tree.
13189         (optimize_function): Initialize and free tree_pruner.
13191 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
13193         Lazy __FUNCTION__ generation.
13194         * cp-tree.def (FUNCTION_NAME): Remove.
13195         * cp-tree.h (function_name_declared_p): Remove.
13196         (cp_fname_init): Prototype.
13197         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13198         don't call declare_function_name. Call start_fname_decls.
13199         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13200         clobber the line number.
13201         (cp_fname_init): New function.
13202         (start_function): Call start_fname_decls.
13203         (finish_function): Call finish_fname_decls.
13204         * lex.c (reswords): Add slots for __FUNCTION__ et al.
13205         (rid_to_yy): Add mappings for __FUNCTION__ et al.
13206         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13207         * parse.y (VAR_FUNC_NAME): New token.
13208         (primary): Add VAR_FUNC_NAME.
13209         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13210         generation.
13211         (tsubst, FUNCTION_NAME case): Remove.
13212         (tsubst_copy, FUNCTION_NAME case): Remove.
13213         (tsubst_expr, DECL_STMT case): Be careful with a
13214         DECL_PRETTY_FUNCTION_P.
13215         (instantiate_decl): Remove function_name_declared_p.
13216         * semantics.c (begin_compound_statement): Don't call
13217         declare_function_name here.
13218         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13219         (finish_translation_unit): Call finish_fname_decls.
13220         (expand_body): Remove function_name_declared_p.
13221         * typeck2.c (digest_init): Allow any ERROR_MARK.
13223 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
13225         * pt.c (tsubst_decl): Use VOID_TYPE_P.
13226         * semantics.c: Fix some typos.
13228 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
13230         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
13232 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13234         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13236 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
13238         * except.c (build_throw): Wrap the initialization of the exception
13239         object in a MUST_NOT_THROW_EXPR.
13240         (do_free_exception): #if 0.
13242 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
13244         * cp-tree.h (finish_enum): Change prototype.
13245         * decl.c (finish_enum): Reorganize.
13246         * parse.y (structsp): Adjust calls to finish_enum.
13248 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13250         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13251         't' case.
13253 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13255         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13256         (layout_empty_base): Return at end flag.
13257         (build_base_field): Likewise.
13258         (build_base_fields): Likewise.
13259         (layout_virtual_bases): Don't add 1 to eoc value.
13260         (end_of_class): Use full size for empty bases.
13261         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13262         empty bases. Don't add 1 to eoc value. Only add trailing padding
13263         if we're an empty class with no empty bases.
13264         (dump_class_hierarchy): Dump size and alignment.
13266 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
13268         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13269         ICS_BAD_FLAG.
13271 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
13273         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13274         is found, look first if name does not match the structure name.
13276 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
13278         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13279         set.
13280         (SET_DECL_LANGUAGE): New macro.
13281         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13282         (pushdecl): Likewise.
13283         (build_library_fn_1): Likewise.
13284         (build_cp_library_fn): Likewise.
13285         (grokfndecl): Likewise.
13286         (grokvardecl): Mark `extern "C"' variables as having C linkage.
13287         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13288         * lex.c (retrofit_lang_decl): Likewise.
13289         * mangle.c (mangle_decl_string): Don't mangle the names of
13290         variables declared with C language linkage.
13291         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13293 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
13295         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13296         flag_access_control from uninitialized storage.
13298 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
13300         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13301         * mangle.c (write_pointer_to_member_type): Fix mangling of
13302         pointers to cv-qualified member function types.
13304         * init.c (build_delete): Create a SAVE_EXPR for the address if
13305         we're going to use it more than once.
13307 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
13309         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13310         (expand_ptremfunc_cst): Change prototype.
13311         (delta2_from_ptrmemfunc): Remove.
13312         * expr.c (cplus_expand_constant): Adjust call to
13313         expand_ptrmemfunc_cst.
13314         * typeck.c (build_ptrmemfunc1): Simplify.
13315         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13316         results in a constant.
13317         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13318         (delta2_from_ptrmemfunc): Remove.
13319         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13321 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
13323         * cp-tree.h (decl_namespace_list): New macro.
13324         (struct saved_scope): Add decl_ns_list.
13325         * decl.c (mark_saved_scope): Mark it.
13326         * decl2.c: Lose static decl_namespace_list.
13327         (init_decl2): Don't save it.
13329 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13331         * cp-tree.h (warn_return_type, yylex): Delete redundant
13332         declarations.
13334         * decl.c (current_class_depth, global_namespace): Likewise.
13336         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13338         * repo.c (flag_use_repository): Likewise.
13340 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13342         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13343         set_block, pushdecl, getdecls, gettags, init_decl_processing,
13344         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13345         lvalue_or_else, print_lang_statistics, comp_target_types,
13346         unsigned_type, signed_type, signed_or_unsigned_type,
13347         build_function_call, mark_addressable, incomplete_type_error):
13348         Delete redundant declarations.
13350 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
13352         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13353         (TYPE_ANONYMOUS_P): New macro.
13354         (TAGGED_TYPE_P): New macro.
13355         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13356         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13357         * tree.c (no_linkage_helper): Likewise.
13358         * semantics.c (begin_class_definition): Likewise.
13359         * pt.c (convert_template_argument): Likewise.
13360         * lex.c (check_for_missing_semicolon): Likewise.
13362 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
13364         * class.c (dfs_unshared_virtual_bases): New function.
13365         (mark_primary_bases): Call it.
13366         (check_bases): Ignore virtual bases when determining
13367         nearly-emptiness.
13369 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
13371         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13373 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
13375         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13376         cloned function to the clone.
13378 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13380         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13382         * semantics.c: Include expr.h.
13384 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
13386         * method.c (implicitly_declare_fn): Commonize code for copy ctor
13387         and assignment op. Set TREE_USED for parameter.
13389 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
13391         * class.c (find_final_overrider_data): Add `candidates'.
13392         (dfs_find_final_overrider): Don't issue error messages
13393         prematurely.
13394         (find_final_overrider): Issue error messages here.
13395         (build_base_field): Don't warn about amgibuous direct bases here.
13396         (warn_about_ambiguous_direct_bases): New function.
13397         (layout_class_type): Use it.
13399 2001-04-10  Richard Henderson  <rth@redhat.com>
13401         * typeck.c (build_array_ref): Push the array reference inside
13402         COMPOUND_EXPR and COND_EXPR.
13404 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
13406         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13407         * decl.c (duplicate_decls): Adjust accordingly.
13408         (maybe_commonize_var): Likewise.
13409         (grokfndecl): Likewise.
13410         (start_function): Likewise.
13411         (start_method): Likewise.
13412         * decl2.c (key_method): Likewise.
13413         (import_export_decl): Likewise.
13414         * method.c (implicitly_declare_fn): Likewise.
13415         * optimize.c (maybe_clone_body): Likewise.
13417 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
13419         * lang-specs.h: Add __DEPRECATED.
13421 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
13423         * search.c (get_dynamic_cast_base_type): When building a new
13424         constant, set its type to ssizetype.
13426 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
13428         * optimize.c (expand_call_inline): Only add newly inlined statements
13429         into inlined_stmts.
13431 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
13433         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13434         (OPERATOR_FORMAT): Likewise.
13435         (OPERATOR_TYPENAME_FORMAT): Likewise.
13436         * operators.def: Remove old name-mangling information.
13437         * decl.c (grok_op_properties): Adjust accordingly.
13438         * lex.c (init_operators): Likewise.
13439         * rtti.c (get_tinfo_decl): Issue error messages about types that
13440         have variable size.
13442 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
13444         * decl2.c (import_export_decl): Don't call import_export_class
13445         when processing an inline member function.
13446         * semantics.c (expand_body): Call import_export_decl before
13447         emitting inline functions.
13449 2001-03-28  Richard Henderson  <rth@redhat.com>
13451         IA-64 ABI Exception Handling:
13452         * cp-tree.def (EH_SPEC_BLOCK): New.
13453         (MUST_NOT_THROW_EXPR): New.
13454         * cp-tree.h: Update changed function declarations.
13455         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13456         (CPTI_CALL_UNEXPECTED): New.
13457         (struct cp_language_function): Rename x_eh_spec_try_block
13458         to x_eh_spec_block.
13459         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13460         * decl.c (current_binding_level): If no current function
13461         bindings, revert to scope_chain.
13462         (initialize_predefined_identifiers): Remove __cp_push_exception.
13463         (store_parm_decls): Use begin_eh_spec_block.
13464         (finish_function): Use finish_eh_spec_block.
13465         (mark_lang_function): Update for name changes.
13466         * decl2.c (finish_file): No mark_all_runtime_matches.
13467         * dump.c (cp_dump_tree): Handle new tree codes.
13468         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13469         * except.c (catch_language_init, catch_language): Remove.
13470         (init_exception_processing): Don't set language code.
13471         Initialize call_unexpected_node, protect_cleanup_actions,
13472         eh_personality_libfunc, lang_eh_runtime_type.
13473         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13474         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13475         (prepare_eh_type): Split out type canonicalizations ...
13476         (build_eh_type_type): ... from here.
13477         (build_eh_type_type_ref): Remove.
13478         (mark_all_runtime_matches): Remove.
13479         (build_exc_ptr): New.
13480         (do_begin_catch, do_end_catch): New.
13481         (do_pop_exception): Remove.
13482         (build_terminate_handler): Remove.
13483         (choose_personality_routine): Split out language choice from ...
13484         (initialize_handler_parm): ... here.
13485         Use MUST_NOT_THROW_EXPR.
13486         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
13487         exception object handling.
13488         (expand_start_eh_spec, expand_end_eh_spec): Remove.
13489         (expand_exception_blocks, alloc_eh_object): Remove.
13490         (begin_eh_spec_block, finish_eh_spec_block): New.
13491         (do_allocate_exception, do_free_exception): New.
13492         (expand_throw): Merge into ...
13493         (build_throw): ... here.  Update for abi.
13494         * expr.c (cplus_expand_expr): No expand_internal_throw.
13495         Handle MUST_NOT_THROW_EXPR.
13496         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13497         * semantics.c (*) Update for except.h name changes.
13498         (genrtl_try_block): No protect_with_terminate.
13499         (genrtl_eh_spec_block): New.
13500         (genrtl_handler): Don't emit the goto here.
13501         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13502         (genrtl_finish_function): Don't expand_exception_blocks.
13503         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13505 2001-03-28  Richard Henderson  <rth@redhat.com>
13507         * decl.c (struct named_label_list): Rename eh_region to
13508         in_try_scope, add in_catch_scope.
13509         (struct binding_level): Rename eh_region to is_try_scope,
13510         add is_catch_scope.
13511         (note_level_for_try): Rename from note_level_for_eh.
13512         (note_level_for_catch): New.
13513         (poplevel): Copy both is_try_scope and is_catch_scope to
13514         the named_label_list struct.
13515         (check_previous_goto_1): Don't check for catch block via
13516         DECL_ARTIFICIAL; use in_try_scope instead.
13517         (check_goto): Likewise.
13518         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13519         * except.c (expand_start_catch_block): Call note_level_for_catch.
13520         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13522 2001-03-27  Richard Henderson  <rth@redhat.com>
13524         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13525         exceptions_via_longjmp.
13527 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
13529         * pt.c (check_default_tmpl_args):  Make error messages clearer.
13531 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
13533         * error.c:  Also undefine 'A' macro used for cp_printers definition.
13535 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13537         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13539 2001-03-26  Mike Yang <yang@research.att.com>
13540             Mark Mitchell  <mark@codesourcery.com>
13542         * dump.c (dump_access): New function.
13543         (cp_dump_tree): Use it.  Dump basetype information for class
13544         types.
13546 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
13548         * Makefile.in (optimize.o): Depend on params.h.
13549         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13550         (init_decl_processing): Set flag_no_inline when doing
13551         inlining-on-trees.
13552         * optimize.c: Include params.h.
13553         (struct inline_data): Improve documentation of FNS.  Add
13554         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13555         (INSNS_PER_STMT): New macro.
13556         (remap_block): Use CLONING_P.
13557         (inlinable_function_p): Don't inline big functions.
13558         (expand_call_inline): Keep track of how much inlining we've done.
13559         (optimize_function): Set FIRST_INLINED_FN.
13560         (maybe_clone_body): Set CLONING_P.
13561         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13562         tree nodes.
13563         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13564         rest_of_compilation.  Clear DECL_RTL for local variables
13565         afterwards.
13566         (clear_decl_rtl): New function.
13568 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
13570         Implement DR 209
13571         * cp-tree.h (skip_type_access_control,
13572         reset_type_access_control): Prototype.
13573         * decl.c (grokdeclarator): Access of friends is not checked.
13574         * parse.y (component_decl_list): Reset type access control.
13575         * semantics.c (decl_type_access_control): Clear
13576         current_type_lookups.
13577         (save_type_access_control): Don't save if not deferring.
13578         (skip_type_access_control, reset_type_access_control): New
13579         functions.
13580         (begin_class_definition): Do type access control for basetypes.
13581         Start deferred access control.
13582         (finish_class_definition): Resume immediate access control if
13583         this is a local class.
13585 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13587         * class.c (add_method): Use memcpy/memmove, not bcopy.
13589         * decl.c (duplicate_decls): Likewise.
13591 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13593         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13594         not `_'.
13596 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13598         * decl.c (local_names): Define.
13599         (push_local_name): New.
13600         (grok_reference_init): Return init if initializing static reference
13601         variable with non-constant instead of emitting it.
13602         Move expand_static_init call to cp_finish_decl.
13603         (layout_var_decl): Call push_local_name.
13604         (maybe_commonize_var): Allow inlining functions even if they have
13605         static local variables, use comdat_linkage for them if flag_weak.
13606         (check_initializer): Call obscure_complex_init if
13607         grok_reference_init returned nonzero.
13608         (save_function_data): Clear x_local_names.
13609         (pop_cp_function_context): Free x_local_names.
13610         (mark_inlined_fns): Remove.
13611         (mark_lang_function): Mark x_local_names.
13612         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13613         Mark inlined_fns as tree, remove call to mark_inlined_fns.
13614         * class.c (alter_access): Ensure DECL_ACCESS is never set if
13615         DECL_DISCRIMINATOR_P.
13616         * cp-tree.h (cp_language_function): Add x_local_names.
13617         (lang_decl_flags): Add discriminator into u2.
13618         (lang_decl_inlined_fns): Remove.
13619         (lang_decl): inlined_fns is now a TREE_VEC.
13620         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13621         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13622         TREE_VEC, not a custom structure.
13623         (optimize_function): Likewise.
13624         * mangle.c (discriminator_for_local_entity): Discriminate among
13625         VAR_DECL local entities.
13626         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13627         is not valid.
13629 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
13631         Add support for Java interface method calls.
13632         * cp-tree.h (struct lang_type): Add java_interface flag.
13633         (TYPE_JAVA_INTERFACE): New macro.
13634         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13635         by setting TYPE_JAVA_INTERFACE.
13636         * call.c (java_iface_lookup_fn): New static.
13637         (build_over_call): If calling a method declared in a
13638         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13639         expression which resolves the function address.
13640         (build_java_interface_fn_ref): New function.
13642 2001-03-22  Richard Henderson  <rth@redhat.com>
13644         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13645         * except.c: Don't include it.
13647 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
13648             based on an idea from Joe Buck <jbuck@synopsys.com>
13650         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13651         New nonterminals.
13652         (data_def, component_decl): Add reductions to bad_decl.
13654 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
13656         * method.c (do_build_assign_ref): Don't use build_modify_expr for
13657         anonymous aggregates, since they don't have assignment operator
13658         method.
13659         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13660         assignment operators for anonymous structure fields.
13662 2001-03-21  Jason Merrill  <jason@redhat.com>
13664         * pt.c (instantiate_decl): Abort if we see a member constant
13665         instantiation that doesn't already have its initializer.
13666         Downgrade explicit instantiation without definition to pedwarn.
13668         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13669         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13670         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13672         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13673         (pending_vtables): Remove.
13674         * decl2.c (pending_vtables): Remove.
13675         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13676         CLASSTYPE_VTABLE_NEEDS_WRITING.
13677         (import_export_class): Likewise.
13678         (init_decl2): Don't mark pending_vtables.
13679         * lex.c (handle_pragma_vtable): Just sorry.
13680         * pt.c (instantiate_class_template): Don't mess with
13681         CLASSTYPE_VTABLE_NEEDS_WRITING.
13682         (mark_class_instantiated): Likewise.
13683         * ptree.c (print_lang_type): Don't print it.
13684         * semantics.c (begin_class_definition): Don't set it.
13686         * pt.c (template_tail): Replace with last_pending_template.
13687         (maybe_templates, maybe_template_tail): Remove.
13688         (add_pending_template): Adjust.
13689         (instantiate_pending_templates): Adjust.
13691         * cp-tree.h (struct saved_scope): Remove lang_stack field.
13692         (current_lang_stack): Remove.
13693         * decl.c (maybe_push_to_top_level): Don't initialize it.
13694         (duplicate_decls): Use current_lang_depth.
13695         (xref_basetypes): Likewise.
13696         * class.c (current_lang_depth): New fn.
13697         (push_lang_context): Use more varray functionality.
13698         (pop_lang_context): Likewise.
13700         * error.c (GLOBAL_THING): Always use '__'.
13702 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
13704         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13706         * mangle.c (mangle_decl_string): Mangle the names of overloaded
13707         operators, even when they have `extern "C"' linkage.
13709 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
13711         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13712         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13713         where it's not necessary.
13714         (add_method): Remove optimization involving comparison of
13715         DECL_ASSEMBLER_NAME.
13716         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13717         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13718         where it's not necessary.
13719         (check_methods): Likewise.
13720         (build_clone): Likewise.
13721         (built_vtt): Likewise.
13722         * cp-tree.h (DECL_NEEDED_P): Likewise.
13723         * decl.c (pushtag): Likewise.
13724         (duplicate_decls): Likewise.
13725         (pushdecl): Likewise.
13726         (builtin_function): Likewise.
13727         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13728         (build_cp_library_fn): Likewise.
13729         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13730         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13731         where it's not necessary.
13732         (make_rtl_for_nonlocal_decl): Likewise.
13733         (cp_finish_decl): Likewise.
13734         (grokfndecl): Likewise.
13735         (grokvardecl): Likewise.
13736         (grokdeclarator): Likewise.
13737         (start_function): Likewise.
13738         (cp_missing_return_ok_p): Likewise.
13739         * decl2.c (grokclassfn): Likewise.
13740         (check_classfn): Likewise.
13741         (finish_static_data_member_decl): Likewise.
13742         (grokfield): Likewise.
13743         * error.c (GLOBAL_IORD_P): Remove.
13744         (dump_global_iord): Improve output.
13745         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13746         * except.c (nothrow_libfn_p): Summarily reject any function not in
13747         namespace-scope.
13748         * init.c (build_java_class_ref): Don't explicitly set
13749         DECL_ASSEMBLER_NAME after calling mangle_decl.
13750         * mangle.c (mangle_decl_string): Handle extern "C" functions.
13751         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13752         * method.c (set_mangled_name_for_decl): Don't explicitly set
13753         DECL_ASSEMBLER_NAME after calling mangle_decl.
13754         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13755         IDENTIFIER_GLOBAL_VALUE for the thunk.
13756         * pt.c (set_mangled_name_for_template_decl): Remove.
13757         (check_explicit_specialization): Don't use it.
13758         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13759         (tsubst_friend_function): Likewise.
13760         (tsubst_decl): Likewise.
13761         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13762         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13763         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13764         where it's not necessary.
13765         (tinfo_base_init): Likewise.
13766         (create_real_tinfo_var): Likewise.
13767         * search.c (looup_field_1): Likewise.
13768         * semantics.c (finish_named_return_value): Likewise.
13769         * tree.c (init_tree): Set lang_set_decl_assembler_name.
13771 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13773         Correct semantics restrictions checking in throw-expression.
13774         * except.c (is_admissible_throw_operand): New function.
13775         (build_throw): Use it.
13777 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13779         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13780         and its ilk.
13782 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13784         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13785         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13786         * decl.c (duplicate_decls): Likewise.
13787         (builtin_function): Likewise.
13788         (build_library_fn): Likewise.
13789         (build_cp_library_fn): Likewise.
13790         (check_initializer): Likewise.
13791         (cp_finish_decl): Likewise.
13792         * decl2.c (grokfield): Likewise.
13793         (grok_function_init): Remove #if 0'd code.
13794         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13795         * friend.c (do_friend): Likewise.
13796         * init.c (get_temp_regvar): Likewise.
13797         * method.c (make_thunk): Likewise.
13798         * pt.c (tsubst_friend_function): Likewise.
13799         (tsubst_decl): Likewise.
13800         (regenerate_decl_from_template): Likewise.
13801         * semantics.c (genrtl_named_return_value): Likewise.
13802         (expand_body): Likewise.
13803         (genrtl_finish_function): Likewise.
13804         * tree.c (cp_tree_equal): Likewise.
13806 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
13808         * call.c (convert_like_real): Add extra semantics to INNER
13809         parameter. Don't convert to temporary if a user conversion
13810         gives us an lvalue that we're about to bind to a reference.
13811         Set INNER to indicate pending reference binding on recursive
13812         calls.
13814 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13816         * cp/lex.c: Delete duplicate pending_lang_change.
13818 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13820         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13821         Similarly.
13822         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13823         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13825 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
13827         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13829 2001-03-08  Stan Shebs  <shebs@apple.com>
13831         * cp-tree.h (set_identifier_local_value): Remove unused decl.
13833 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
13835         * spew.c: Remove references to CPP_OSTRING.
13837 2001-03-06  Andrew Haley  <aph@redhat.com>
13839         * typeck.c (convert_arguments): Check that we have an fndecl.
13841 2001-03-05  Andrew Haley  <aph@redhat.com>
13843         * typeck.c (convert_arguments): Don't do ellipsis conversion for
13844         __built_in_constant_p.
13846 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13848         * typeck.c (build_static_cast): Allow enum to enum conversions
13849         as per DR 128.
13851 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13853         * class.c (check_field_decls): Pointers to member do not a
13854         non-pod struct make, as per DR 148.
13856 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13858         * call.c (joust): cp_pedwarn when using gnu extension concerning
13859         worst conversion sequences.
13861 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13863         * decl.c: Replace all uses of 'boolean' with 'bool'.
13865 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13867         * lang-specs.h: Add zero initializer for cpp_spec field to
13868         all array elements that need one.  Don't put an #ifdef inside
13869         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13870         use it.
13872 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13874         Implement using decls inside template functions.
13875         * decl2.c (validate_nonmember_using_decl): Don't special case
13876         fake_std_node in the global namespace. Don't reject early when
13877         processing a template.
13878         (do_local_using_decl): Add to statement tree. Don't do further
13879         processing when building a template.
13880         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13882 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13884         * decl2.c (do_nonmember_using_decl): Don't complain if we find
13885         same function. Do complain about ambiguating extern "C"
13886         declarations.
13888 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
13890         Remove floating point and complex type template constant parms.
13891         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13892         COMPLEX_TYPE extensions.
13893         (invalid_nontype_parm_type_p): Likewise.
13895 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
13897         * except.c (call_eh_info): Revert "match_function"'s type.
13899 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
13901         Fix ctor vtable vcall offsets.
13902         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13903         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13904         (get_matching_base): Remove.
13905         (get_original_base): New function.
13906         (build_vtbl_initializer): Initialize vid.rtti_binfo.
13907         Use a virtual thunk for a ctor vtable with an index
13908         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13909         primary base within a constructor vtable. Only set
13910         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13911         when primary base has been lost.
13912         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13914 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
13916         * call.c (joust): Ensure more_specialized()'s argument length
13917         parameter has correct value for constructors.
13919 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
13921         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13923         * decl.c (mark_inlined_fns): Prototype.
13925 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13927         * spew.c (yylex): Correct handling of friends.
13929 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13931         * mangle.c (write_encoding): Pass write_function_type the
13932         FUNCTION_DECL for the function being encoded.
13933         (write_function_type): Pass it along to write_bare_function_type.
13934         (write_bare_function_type): Pass it along to write_method_parms.
13935         (write_method_parms): Don't mangle the compiler-generated
13936         parameters to a constructor or destructor.
13938 2001-02-22  Andreas Jaeger  <aj@suse.de>
13940         * optimize.c: Include toplev.h for
13941         note_deferral_of_defined_inline_function prototype.
13943 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
13945         * cp-tree.h (struct lang_decl_inlined_fns): New.
13946         (struct lang_decls): Add inlined_fns.
13947         (DECL_INLINED_FNS): New macro.
13948         * optimize.c (struct inline_data): Add inlined_fns.
13949         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13950         (inlinable_function_p): Likewise, fix typo in comment,
13951         function is not inlinable if it already inlined function currently
13952         being optimized.
13953         (expand_call_inline): Add fn to inlined_fns if necessary.
13954         (optimize_function): Initialize inlined_fns.
13955         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13956         * decl.c (mark_inlined_fns): New function.
13957         (lang_mark_tree): Call it.
13959 2001-02-21  Jason Merrill  <jason@redhat.com>
13961         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13962         (DECL_UNINLINABLE): Move to middle-end.
13964         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13965         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13966         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13967         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13968         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
13970         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13971         second parm of op=.
13973 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
13975         * decl2.c (set_decl_namespace): Allow explicit instantiations in
13976         any namespace.
13978 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13980         * optimize.c (expand_call_inline): Don't walk subtrees of type
13981         nodes.
13983 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
13985         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13986         for a destructor.
13988 2001-02-18  Jason Merrill  <jason@redhat.com>
13990         Do put the VTT parameter in DECL_ARGUMENTS.
13991         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
13992         (current_vtt_parm): New macro.
13993         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
13994         (DECL_HAS_VTT_PARM_P): New macro.
13995         (DECL_VTT_PARM): Remove.
13996         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
13997         * decl.c (duplicate_decls): Only copy the operator code if
13998         appropriate.
13999         (start_function): Set current_vtt_parm.
14000         (lang_mark_tree): Don't mark vtt_parm.
14001         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
14002         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
14003         * class.c (build_clone): Maybe remove the VTT parm.
14004         * optimize.c (maybe_clone_body): Set up the VTT parm.
14005         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
14006         * call.c (build_over_call): Just allow the VTT arg.
14007         * method.c (make_thunk): Don't set DECL_VTT_PARM.
14008         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
14009         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
14010         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
14011         * error.c (dump_function_decl): Likewise.
14012         * call.c (build_user_type_conversion_1, convert_like_real): Abort
14013         if we try to call a constructor with in-charge or VTT parms.
14014         * method.c (skip_artificial_parms_for): New fn.
14015         * call.c (add_function_candidate, build_over_call): Call it.
14016         * call.c (build_new_method_call): Use current_vtt_parm.
14017         * init.c (expand_virtual_init): Likewise.
14018         * class.c (same_signature_p): No longer static.
14019         * cp-tree.h: Declare it.
14020         * search.c (look_for_overrides_r): Use it.
14022 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
14024         * cp-tree.h (new_abi_rtti_p): Remove.
14025         (name_mangling_version): Likewise.
14026         (flag_do_squangling): Likewise.
14027         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
14028         * decl.c (grokfndecl): Likewise.
14029         * decl2.c (name_mangling_version): Remove.
14030         (flag_do_squangling): Likewise.
14031         (lang_f_options): Remove `squangle'.
14032         (unsupported_options): Add `squangle'.
14033         (cxx_decode_option): Issue a warning about uses of
14034         -fname-mangling-version.
14035         (finish_file): Remove old ABI support.
14036         * pt.c (check_explicit_specialization): Likewise.
14037         (tsubst_decl): Likewise.
14038         * rtti.c (init_rtti_processing): Likewise.
14039         (build_headof): Likewise.
14040         (get_tinfo_decl_dynamic): Likewise.
14041         (tinfo_from_decl): Likewise.
14042         (build_dynamic_cast_1): Likewise.
14043         (synthesize_tinfo_var): Likewise.
14044         * init.c (build_new): Allow enumeration types for the array-bounds
14045         in a direct-new-declarator.
14047         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
14049         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
14050         TREE_PROTECTED from the template being specialized.
14052 2001-02-17  Jason Merrill  <jason@redhat.com>
14054         * decl2.c (build_artificial_parm): Set TREE_READONLY.
14056         * decl.c (bad_specifiers): Allow throw specs on things with
14057         pointer-to-function or -member-function type.
14058         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
14059         a pmf.
14061 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
14063         * call.c (check_dtor_name): Handle template names correctly.
14065 2001-02-16  Jason Merrill  <jason@redhat.com>
14067         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
14068         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
14069         * optimize.c (maybe_clone_body): Don't substitute it.
14070         * call.c (build_new_method_call): Check in_chrg instead.
14071         * init.c (expand_virtual_init): Likewise.
14073 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
14075         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
14076         class-type introduces at least a type-name.
14078 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
14080         * call.c (convert_like_real): Create a temporary for non-lvalue.
14082 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
14084         * cp-tree.h: Fix typos in comments.
14086 2001-02-16  Jason Merrill  <jason@redhat.com>
14088         * optimize.c (remap_block): If we're compiling a clone, pass the
14089         new block to insert_block.
14091 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
14093         * semantics.c (finish_asm_stmt): Robustify.
14095 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
14097         * pt.c (push_template_decl_real): Don't remangle the name of a
14098         class template.
14100 2001-02-15  Jim Meyering  <meyering@lucent.com>
14102         * Make-lang.in (c++.install-common): Depend on installdirs.
14103         (c++.install-info): Likewise.
14104         (c++.install-man): Likewise.
14106 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
14108         * typeck2.c (build_m_component_ref): Robustify.
14110 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
14112         * friend.c (do_friend): Don't take the nested [template] class
14113         into account when deciding whether to warn about the friend
14114         function not referring to a template function.
14116 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
14118         * typeck.c (build_unary_op): Clarify error message.
14120 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
14122         * parse.y (component_constructor_declarator): allow optional
14123         parentheses around constructor class name.
14125 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14127         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14128         section.
14129         * init.c (emit_base_init): Remove incorrect comment about
14130         virtual bases.
14131         * method.c (make_thunk): Fix comment alignment.
14133 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14135         Kill remnants of this is variable.
14136         * cp-tree.h (flag_this_is_variable): Remove.
14137         * decl2.c (flag_this_is_variable): Remove.
14138         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14139         (build_vbase_path): The path is non-static, even in a cdtor.
14140         (resolves_to_fixed_type_p): Add additional return value.
14141         * search.c (init_vbase_pointers): Adjust.
14142         * tree.c (lvalue_p_1): Adjust.
14143         * typeck.c (mark_addressable): Adjust.
14145 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14147         * pt.c (unify): Don't check cv quals of array types.
14149 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14151         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14152         check whether we already have the type.
14154 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
14156         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14157         * call.c (build_op_delete_call): Simplify to remove duplicate
14158         code.
14159         * class.c (clone_function_decl): Don't build the deleting variant
14160         of a non-virtual destructor.
14161         * decl.c (finish_destructor_body): Don't call delete if this is a
14162         non-virtual destructor.
14163         * init.c (build_delete): Explicitly call `operator delete' when
14164         deleting an object with a non-virtual destructor.
14166 2001-02-13  Jason Merrill  <jason@redhat.com>
14168         * lang-specs.h: Add more __EXCEPTIONS.
14170 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14172         * typeck2.c (process_init_constructor): Check
14173         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14175 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14177         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14178         Remove spurious information in comment. Allow further
14179         adjustments of REFERENCE_TYPE args.
14181 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14183         * errfn.c (cp_deprecated): Tweak diagnostic text.
14184         * parse.y (new_initializer): Deprecate initializer lists
14185         extension.
14187 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
14189         Remove old ABI support.
14191 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
14193         * decl2.c (flag_vtable_thunks): Always set it to 1.
14194         (flag_new_abi): Likewise.
14195         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14197         * Makefile.in (g++spec.o): Fix typo.
14199 2001-02-09  Jason Merrill  <jason@redhat.com>
14201         * lang-specs.h: Restore definition of __EXCEPTIONS.
14203 2001-02-08  Jason Merrill  <jason@redhat.com>
14205         * search.c (shared_member_p): New function.
14206         (lookup_field_r): Use it.
14207         * cp-tree.h (SHARED_MEMBER_P): Remove.
14209         * method.c (process_overload_item): Handle template-dependent array
14210         bounds.
14211         * pt.c (type_unification_real): If we end up with undeduced nontype
14212         parms, try again.
14214         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14215         types.
14217         * typeck2.c (friendly_abort): Don't say anything if we have
14218         earlier errors or sorries.
14220         * decl.c (check_tag_decl): Notice attempts to redefine bool and
14221         wchar_t.  Ignore if in_system_header.
14223         * decl.c (maybe_push_cleanup_level): New fn...
14224         (start_decl_1): ...split out from here.
14225         * cvt.c (build_up_reference): Use it.
14226         * cp-tree.h: Declare it.
14228 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
14230         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14231         spec.
14233 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
14235         * pt.c (lookup_template_class): Make sure it's a primary
14236         template or template_template_parm when called from the parser.
14237         (instantiate_template_class): Add assertion.
14239 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
14241         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14242         from error_mark_node.
14244 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
14246         Fix specification and implementation bugs in V3 ABI
14247         construction vtables.
14248         * cp-tree.h (flag_dump_class_layout): New flag.
14249         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14250         (BINFO_LOST_PRIMARY_P): New flag.
14251         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14252         (BINFO_PRIMARY_MARKED_P): Rename to ...
14253         (BINFO_PRIMARY_P): ... here.
14254         (binfo_via_virtual): New prototype.
14255         * decl2.c (flag_dump_class_layout): New flag.
14256         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14257         use `=' as a file name separator.
14258         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14259         bases.
14260         (build_vtbl_address): If this is a virtual primary base, then
14261         get the vtbl of what it is ultimately primary for.
14262         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14263         for BINFO_PRIMARY_P.
14264         (dfs_skip_nonprimary_vbases_markedp): Likewise.
14265         (get_shared_vbase_if_not_primary): Likewise.
14266         (dfs_get_pure_virtuals): Likewise.
14267         (expand_upcast_fixups): Likewise.
14268         (fixup_virtual_upcast_offsets): Likewise.
14269         (dfs_find_vbase_instance): Likewise.
14270         (find_vbase_instance): Likewise.
14271         (binfo_from_vbase): Adjust comment to reflect reality.
14272         (binfo_via_virtual): New function.
14273         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14274         for binfo walking during VTT construction.
14275         (dfs_mark_primary_bases): Remove.
14276         (force_canonical_binfo_r): New function.
14277         (force_canonical_binfo): New function.
14278         (mark_primary_virtual_base): New function.
14279         (mark_primary_bases): Walk in inheritance graph order, use
14280         mark_primary_virtual_base.
14281         (determine_primary_base): Use some more intermediate variables.
14282         (dfs_find_final_overrider): Don't check for overriding along a
14283         virtual path.
14284         (dfs_modify_vtables): Walk into primary virtual bases too.
14285         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14286         (build_base_fields): Likewise.
14287         (dfs_set_offset_for_unshared_vbases): Likewise.
14288         (layout_virtual_bases): Likewise.
14289         (end_of_class): Likewise.
14290         (finish_struct_1): Call dump_class_hierarchy, if requested.
14291         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14292         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14293         (dump_class_hierarchy): Add file parameter. Append to file, if
14294         required.
14295         (finish_vtbls): Adjust accumulate_vtbl_inits call.
14296         Use canonical base for virtual bases.
14297         (build_vtt): Add more comments. Adjust build_vtt_inits call.
14298         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14299         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14300         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14301         virtual VTTs.
14302         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14303         from DATA.  We want virtual primary bases and all bases via virtual.
14304         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14305         virtual base when not a construction vtable.
14306         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14307         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14308         Use canonical bases when processing virtual bases.
14309         (accumulate_vtbl_inits): We're interested in any base via a
14310         virtual path.
14311         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14312         within a construction vtable, determine what is being overridden.
14313         (build_vtbl_initializer): Add more comments
14314         (add_vcall_offset_vtbl_entries_1): Adjust comment.
14315         (build_rtti_vtbl_entries): Check if the base has lost its
14316         primary.
14318 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
14320         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14322 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14324         * decl.c (pushdecl): Call abort instead of fatal.
14325         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14326         * init.c (build_new_1): Likewise.
14327         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14328         * decl.c (build_typename_type): hash_table_init now returns void.
14329         decl.c (init_decl_processing): Make an error non-fatal.
14331 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
14333         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14334         Document.
14335         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14336         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14337         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14338         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14339         * decl.c (maybe_commonize_var): Use the new name-mangling where
14340         appropriate.
14341         * decl2.c (comdat_linkage): Enhance comments.  Make all
14342         compiler-generated things static, if COMDAT is not available.
14343         (get_tinfo_decl): Do not make typeinfo objects that belong in the
14344         library COMDAT.
14345         (tinfo_base_init): Use the correct mangled name for typeinfo
14346         strings, and push them into the global scope.
14347         (typeinfo_in_lib_p): New function.
14348         (synthesize_tinfo_var): Use it.
14349         (create_real_tinfo_var): Likewise.
14351 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
14353         * decl.c (push_class_binding): Use context_for_name_lookup instead
14354         of CP_DECL_CONTEXT.
14355         * search.c (context_for_name_lookup): Remove static.  Check for NULL
14356         context in the loop.
14357         * cp-tree.h (context_for_name_lookup): Add prototype.
14359 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
14361         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14362         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14363         Remove.
14364         * call.c (convert_class_to_reference, build_user_type_conversion_1,
14365         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14367 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
14369         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14370         of macros used when compiling g++spec.c.
14371         * g++spec.c (lang_specific_driver): Link with the shared
14372         libgcc by default.
14374 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
14376         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14377         make_reference_declarator, make_call_declarator), method.c
14378         (implicitly_declare_fn), parse.y (namespace_using_decl,
14379         notype_unqualified_id, expr_or_declarator, new_type_id,
14380         after_type_declarator, direct_after_type_declarator,
14381         notype_declarator, complex_notype_declarator,
14382         complex_direct_notype_declarator, qualified_id,
14383         notype_qualified_id, overqualified_id, direct_new_declarator,
14384         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14385         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14386         instead of build_parse_node.
14388 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14390         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14391         (minus_one_node): Moved to top level gcc directory.  Renamed
14392         to integer_minus_one_node.
14394         * init.c (init_init_processing): Don't set minus_one_node.
14395         (build_vec_init): Use integer_minus_one_node.
14397         * rtti.c (get_tinfo_decl_dynamic): Likewise.
14399 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
14401         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14402         identical and they would be replaced with constant, remove
14403         MODIFY_EXPR from the tree.
14405 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14407         * Make-lang.in: Remove all dependencies on defaults.h.
14408         * call.c: Don't include defaults.h.
14409         * decl.c: Likewise.
14410         * decl2.c: Likewise.
14411         * except.c: Likewise.
14412         * pt.c: Likewise.
14413         * rtti.c: Likewise.
14414         * tree.c: Likewise.
14415         * typeck.c: Likewise.
14417 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
14419         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14420         operators even in "C" linkage.
14421         * method.c (set_mangled_name_for_decl): Likewise.
14422         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14423         overloaded operators in "C" linkage.
14425 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
14427         * pt.c (tsubst_decl): Remove IN_DECL parameter.
14428         (tsubst_arg_types): Check parameter is not void.
14429         (tsubst): Adjust tsubst_decl call.
14431 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
14433         * call.c (add_builtin_candidate): Quote std properly, from
14434         previous change.
14436 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14438         * pt.c (check_explicit_specialization): Clone constructors and
14439         destructors.
14441 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14443         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14444         indicates anything special about template depth. Make sure we
14445         only count the user visible template classes.
14447 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14449         * call.c (build_conv): Typo in comment.
14450         (add_builtin_candidate): Add more explanation.
14451         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14452         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14453         when we have enumeral types.
14454         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14455         candidates for relops and eqops.
14456         (joust): Simplify control flow. Allow a non-template user
14457         function to hide a builtin.
14459 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
14461         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14462         (more_specialized): Add deduction parameter.
14463         * call.c (joust): Adjust more_specialized call.
14464         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14465         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14466         (get_bindings_order): Remove.
14467         (get_bindings_real): Add DEDUCE parameter.
14468         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14469         REFERENCE_TYPE jig for DEDUCE_ORDER.
14470         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14471         maybe_adjust_types_for_deduction.
14472         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14473         directly.
14474         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14475         (check_cv_quals_for_unify): Use new unify qualifier flags.
14476         (unify): Clear new unify qualifier flags.
14477         (get_bindings_real): Add DEDUCE parameter.
14478         (get_bindings): Adjust call to get_bindings_real.
14479         (get_bindings_overload): Likewise.
14480         (most_specialized_instantiation): Adjust call to
14481         more_specialized.
14483 2001-01-19  Jason Merrill  <jason@redhat.com>
14485         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14487         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14488         -fnew-abi.
14490 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
14492         * decl2.c (arg_assoc_class): Fix double iteration logic.
14494 2001-01-19  Jason Merrill  <jason@redhat.com>
14496         * init.c (build_delete): Always call convert_force to strip cv-quals.
14498         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14499         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14500         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14502 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14504         * search.c (get_vbase_1): Count only virtual bases.
14506 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14508         * class.c (duplicate_tag_error): Robustify flag clearing.
14510 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14512         * cp-tree.h (lookup_template_class): Add complain parm.
14513         * decl.c (lookup_namespace_name): Adjust call to
14514         lookup_template_class.
14515         (make_typename_type): Likewise.
14516         * semantics.c (finish_template_type): Likewise.
14517         * pt.c (lookup_template_class): Add complain parm. Adjust.
14518         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14519         (tsubst): Likewise.
14521 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14523         * pt.c (copy_default_args_to_explicit_spec): Preserve
14524         object's CV quals. Reorganize.
14526 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14528         * typeck.c (build_modify_expr): Say `initialization' for
14529         INIT_EXPRs.
14530         * init.c (build_default_init): Convert to enumeral type, if
14531         needed.
14533 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
14535         * parse.y (nomods_initdcl0): Properly set things up for
14536         initdcl0_innards.
14538 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14540         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14541         (type_unification_real): Set it.
14542         (unify): Use it.
14544 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14546         * decl.c (finish_destructor_body): Convert to vbase pointer here.
14548 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14550         * semantics.c (begin_class_definition): Check we're not inside a
14551         template parm list.
14553 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14555         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14556         BASELINK_P.
14558 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14560         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14561         * call.c (build_over_call): Add comment.
14563 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14565         * cvt.c (ocp_convert): Handle vector type conversion
14566         * typeck2.c (digest_init): Handle vector type initializations
14568 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
14570         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
14571           was given.
14573 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14575         * pt.c (check_nontype_parm): Rename to ...
14576         (invalid_nontype_parm_type_p): ... here.
14577         (process_template_parm): Adjust.
14578         (convert_template_argument): Adjust.
14580 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14582         * pt.c (check_nontype_parm): New function.
14583         (process_template_parm): Use it.
14584         (convert_template_argument): Use it.
14585         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14586         member.
14588 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
14590         * tree.c: Add defaults.h
14591         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14592         * Make-lang.in (cp/tree.o): Add defaults.h.
14594 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14596         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14598 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14600         * g++.1: Change to be ".so man1/gcc.1".
14602 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14604         * Make-lang.in (c++.info, c++.install-info): Build and install g++
14605         internals info.
14606         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14607         ($(srcdir)/cp/g++int.info): New target.
14608         * gxxint.texi: Add info directory entry.  Use @@ in email address.
14609         * .cvsignore: Update.
14611 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14613         * typeck.c (build_c_cast): Do template processing earlier.
14614         Always pedwarn on array casts.
14616 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14618         * friend.c (make_friend_class): Make sure a templated class is
14619         actually a template.
14621 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14623         * decl2.c (get_guard): Set linkage from guarded decl.
14625 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14627         * call.c (convert_default_arg): Check for unprocessed
14628         DEFAULT_ARG.
14629         * cp-tree.h (replace_defarg): Move to spew.c.
14630         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14631         spew.c, which is where they really are.
14632         (done_pending_defargs): Declare.
14633         (unprocessed_defarg_fn): Declare.
14634         * decl.c (replace_defarg): Move to spew.c
14635         * parse.y (structsp): Call done_pending_defargs.
14636         * spew.c (defarg_fns): Rearrange list structure.
14637         (defarg_fnsdone): New static variable.
14638         (defarg_depfns): New static variable.
14639         (init_spew): Adjust.
14640         (add_defarg_fn): Store the type in TREE_TYPE.
14641         (do_pending_defargs): Detect and deal with ordering constraints
14642         and circularity.
14643         (done_pending_defargs): New function.
14644         (unprocessed_defarg_fn): New function.
14645         (replace_defarg): Moved from decl.c. Robustify. Don't save
14646         if circularity detected.
14648 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14650         * pt.c (unify): Check array has a domain, before checking
14651         whether it is variable sized.
14653 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14655         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14656         parameters with pointers to arrays of unknown bound.
14658 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14660         * parse.y (template_parm_header, template_spec_header): New
14661         reductions. Split out from ...
14662         (template_header): ... here. Use them.
14663         (template_template_parm): Use template_parm_header.
14664         * semantics.c (finish_template_template_parm): Add assert.
14666 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14668         * mangle.c (write_builtin_type): Fix thinko.
14670         * pt.c (copy_default_args_to_explicit_spec_1): New function.
14671         (copy_default_args_to_explicit_spec): Likewise.
14672         (check_explicit_specialization): Use it.
14674         * class.c (finish_struct_1):  Remove last argument in call to
14675         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14676         * decl.c (builtin_function): Likewise.
14677         (build_cp_library_fn): Likewise.
14678         (check_initializer): Likewise.
14679         (make_rtl_for_nonlocal_decl): Likewise.
14680         (cp_finish_decl): Likewise.
14681         (start_function): Likewise.
14682         * decl2.c (finish_anon_union): Likewise.
14683         * friend.c (do_friend): Likewise.
14684         * init.c (build_java_class_ref): Likewise.
14685         * method.c (make_thunk): Likewise.
14686         * pt.c (tsubst_friend_function): Likewise.
14687         * semantics.c (expand_body): Likewise.
14689 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14691         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14692         looking at DECL_CLONED_FUNCTION for non-functions.
14694 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14696         * error.c (dump_template_parameter): Use parm to determine how
14697         to print default value.
14699 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14701         * class.c (duplicate_tag_error): Clear more flags.
14703 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14705         * call.c (build_new_method_call): Use binfo_for_vbase.
14707 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
14709         * cp-tree.h (flag_cond_mismatch): Don't declare.
14710         * decl2.c (flag_cond_mismatch): Don't define.
14711         (lang_f_options): Remove cond-mismatch.
14712         (unsupported_options): Add cond-mismatch.
14714 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
14716         * class.c (handle_using_decl): Reject using of constructor name
14717         of sourcing class. Allow injecting of a method with same name as
14718         nested class. Fixup error messages.
14720 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
14722         * decl2.c (lang_decode_option): Handle -Wformat=2.
14724 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14726         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14727         initialized_in_class.
14728         (DECL_DEFINED_IN_CLASS_P): Rename to ...
14729         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14730         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14731         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14732         * pt.c (check_default_tmpl_args): Adjust for
14733         DECL_INITIALIZED_IN_CLASS_P.
14734         (instantiate_class_template): Likewise.
14735         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14737         * class.c (finish_struct): Constify saved_filename.
14739 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14741         * class.c (duplicate_tag_error): Adjust diagnostic.
14742         (finish_struct): Locally set location to start of struct.
14743         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14745 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14747         * decl.c (struct binding_level): Adjust class_shadowed comments
14748         to reflect reality.
14749         (push_class_level_binding): Adjust comments to reflect reality.
14750         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14751         Don't set TREE_VALUE on the class_shadowed list.
14753 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14755         * decl2.c (acceptable_java_type): Allow references too.
14756         * init.c (build_java_class_ref): When using the new ABI, search
14757         `class$' and have it mangled with `mangle_decl.'
14758         * mangle.c (write_java_integer_type_codes): New function.
14759         (write_builtin_type): Detect and mangle Java integer and real
14760         types.
14762 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
14764         * decl2.c (grokfield): Don't accept `asm' specifiers for
14765         non-static data members.
14767 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14769         * expr.c (cplus_expand_expr): Don't reset `target'.
14771 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
14773         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14775 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14777         * parse.y (template_datadef): Check for error_mark_node.
14779 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14781         * cp-tree.def (DEFAULT_ARG): Make `x' class.
14783 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
14785         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14786         (record_builtin_type): Make non-static.
14787         (flag_short_double): Don't declare.
14788         (init_decl_processing): Remove the creation of many tree nodes now
14789         in c_common_nodes_and_builtins.
14790         (build_void_list_node): New function.
14791         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14792         * cp-tree.h (flag_short_wchar): Don't declare.
14794 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
14796         * call.c (build_conv): Don't use build1 for USER_CONV.
14797         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14799 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14801         * lex.c (lang_init): Call c_common_lang_init.
14803 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14805         * search.c (lookup_fnfields_here): Remove.
14806         (look_for_overrides_r): Use lookup_fnfields_1.
14807         Ignore functions from using declarations.
14809 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14811         Implement exceptions specifiers for implicit member functions.
14812         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14813         * method.c (synthesize_exception_spec): New function.
14814         (locate_dtor, locate_ctor, locate_copy): New functions.
14815         (implicitly_declare_fn): Generate the exception spec too.
14816         * search.c (check_final_overrider): Check artificial functions
14817         too.
14818         * typeck2.c (merge_exception_specifiers): New function.
14820 2001-01-03  Jason Merrill  <jason@redhat.com>
14822         * init.c (build_default_init): New fn.
14823         (perform_member_init): Split out from here.
14824         (build_new_1): Use it.  Simplify initialization logic.
14825         (build_vec_init): Take an array, rather than a pointer and maxindex.
14826         Speed up simple initializations.  Don't clean up if we're assigning.
14827         * cp-tree.h: Adjust.
14828         * decl2.c (do_static_initialization): Remove TREE_VEC case.
14829         * parse.y (new_initializer): Return void_zero_node for ().
14830         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14831         * typeck2.c (digest_init): Only complain about user-written
14832         CONSTRUCTORs.
14834 2000-12-22  Mike Stump  <mrs@wrs.com>
14836         * decl2.c: (max_tinst_depth): Increase to 50.
14838 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
14840         * class.c (invalidate_class_lookup_cache): Zero the
14841         previous_class_values.
14842         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14843         TREE_INT_CST_HIGH.
14844         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14845         * decl.c (free_bindings): New variable.
14846         (push_binding): Don't create a new binding if we have one on the
14847         free list.
14848         (pop_binding): Put old bindings on the free list.
14849         (init_decl_processing): Use size_int, not build_int_2.
14850         Register free_bindings as a GC root.
14851         (cp_make_fname_decl): Use size_int, not build_int_2.
14852         (push_inline_template_parms_recursive): Likewise.
14853         (end_template_parm_list): Likewise.
14854         (for_each_template_parm): Do not use walk_tree_without_duplicates.
14855         (tsubst_template_parms): Use size_int, not build_int_2.
14856         (tsubst): Likewise.
14857         * rtti.c (get_vmi_pseudo_type_info): Likewise.
14859 2001-01-02  Richard Henderson  <rth@redhat.com>
14861         * parse.y (asm): Set ASM_INPUT_P.
14863 2001-01-02  Jason Merrill  <jason@redhat.com>
14865         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14866         for v3 ABI.
14868         * typeck.c (cp_truthvalue_conversion): New fn.
14869         * cvt.c (ocp_convert): Use it.
14871         * cp-tree.h: Lose c-common.c decls.
14873         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14874         * cvt.c (convert_to_void): Use type_unknown_p.
14876         * typeck.c (strip_all_pointer_quals): Also strip quals from
14877         pointer-to-member types.
14879         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
14880         parse.y as C.
14882         * call.c (build_new_method_call): Do evaluate the object parameter
14883         when accessing a static member.
14884         * typeck.c (build_component_ref): Likewise.
14886 2001-01-02  Andreas Jaeger  <aj@suse.de>
14888         * decl.c (cp_missing_noreturn_ok_p): New.
14889         (init_decl_processing): Set lang_missing_noreturn_ok_p.
14891 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
14893         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14895 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
14897         * class.c (pushclass): Remove #if 0'd code.
14898         * cp-tree.h (overload_template_name): Remove.
14899         * decl.c (store_bindings): Simplify.
14900         (pop_from_top_level): Likewise.
14901         * pt.c (overload_template_name): Remove.
14902         (instantiate_decl): Don't call push_to_top_level if it's not
14903         needed.
14905 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
14907         * pt.c (register_local_specialization): Don't return a value.
14908         (lookup_template_class): Use move-to-front heuristic when looking
14909         up template instantiations.
14910         (instantiate_decl): Only push_to_top_level when we're actually
14911         going to instantiate the template.
14913 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
14915         * search.c (binfo_for_vtable): Return least derived class, not
14916         most.  Handle secondary vtables.
14918 2000-12-22  Jason Merrill  <jason@redhat.com>
14920         * pt.c (more_specialized): Don't optimize len==0.
14921         (fn_type_unification): If we're adding the return type, increase len.
14923         * typeck.c (build_binary_op): Fix pmf comparison logic.
14925         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14926         DECL_STATIC_FUNCTION_P.
14928         * semantics.c (genrtl_finish_function): Don't try to jump to
14929         return_label unless it exists.
14931         In partial ordering for a call, ignore parms for which we don't have
14932         a real argument.
14933         * call.c (joust): Pass len to more_specialized.
14934         (add_template_candidate_real): Strip 'this', pass len.
14935         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
14936         (get_bindings_order): New fn.  Pass len down.
14937         (get_bindings_real): Strip 'this', pass len.
14938         (fn_type_unification): Likewise.
14939         (type_unification_real): Succeed after checking 'len' args.
14940         (most_specialized_instantiation): Lose explicit_args parm.
14941         * class.c (resolve_address_of_overloaded_function): Strip 'this',
14942         pass len.
14944 2000-12-21  Jason Merrill  <jason@redhat.com>
14946         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14947         DECL_TEMPLATE_RESULT.
14949         * search.c (lookup_field_r): Call lookup_fnfields_1, not
14950         lookup_fnfields_here.
14952         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14954         * call.c (build_object_call): Also allow conversions that return
14955         reference to pointer to function.
14956         (add_conv_candidate): Handle totype being ref to ptr to fn.
14957         (build_field_call): Also allow members of type reference to function.
14958         Lose support for calling pointer to METHOD_TYPE fields.
14960         * error.c (dump_expr): Handle *_CAST_EXPR.
14962         * typeck2.c (build_scoped_ref): Always convert to the naming class.
14964         * tree.c (break_out_cleanups): Lose.
14965         * cp-tree.h: Remove prototype.
14966         * typeck.c (build_component_ref): Don't break_out_cleanups.
14967         (build_compound_expr): Likewise.
14968         * semantics.c (finish_expr_stmt): Likewise.
14970 2000-12-20  Richard Henderson  <rth@redhat.com>
14972         * cp-tree.h: Update declarations.
14973         * decl.c (finish_case_label): Return the new stmt node.
14974         * semantics.c (finish_goto_stmt): Likewise.
14975         (finish_expr_stmt, finish_return_stmt): Likewise.
14976         (finish_break_stmt, finish_continue_stmt): Likewise.
14977         (finish_asm_stmt): Likewise.
14978         * parse.y (already_scoped_stmt): Set STMT_LINENO.
14979         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14980         (simple_if, simple_stmt): Return the new stmt node.
14981         (save_lineno): New.
14983 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
14985         * cp-tree.h: Don't declare warn_long_long.
14987 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14989         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
14990         IS_AGGR_TYPE.
14992 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14994         * pt.c (unify): Handle when both ARG and PARM are
14995         BOUND_TEMPLATE_TEMPLATE_PARM.
14997 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14999         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
15000         DECL_TEMPLATE_PARM_P.
15002 2000-12-15  Jason Merrill  <jason@redhat.com>
15004         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
15006         * init.c (build_new_1): Don't strip quals from type.
15008         * decl.c (pushdecl): Don't check for linkage on a non-decl.
15010         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
15012         * call.c (build_new_function_call): Lose space before paren in
15013         error message.
15014         (build_new_method_call): Likewise.
15016         * typeck2.c (build_m_component_ref): Propagate quals from datum.
15018 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15020         * pt.c (check_explicit_specialization): Propagate default
15021         function arguments to explicit specializations.
15023 2000-12-13  DJ Delorie  <dj@redhat.com>
15025         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
15026         and <? operators.
15028 2000-12-08  Jason Merrill  <jason@redhat.com>
15030         * error.c (dump_function_name): Don't let the user see __comp_ctor.
15032         Clean up copy-initialization in overloading code.
15033         * call.c (build_user_type_conversion_1): Die if we are asked to
15034         convert to the same or a base type.
15035         (implicit_conversion): Avoid doing so.  Lose reference binding code.
15036         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
15037         direct-initialization.  Also do direct-init part of copy-init.
15038         (build_user_type_conversion): Don't provide context to convert_like.
15039         * cvt.c (ocp_convert): build_user_type_conversion will now provide
15040         the constructor call for copy-init.
15042         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
15043         instantiation of a member template.
15044         (do_decl_instantiation): Not here.
15046 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
15048         * class.c (check_field_decls): Don't special case anonymous
15049         fields in error messages.
15050         (note_name_declared_in_class): Use %D on diagnostic.
15052         * tree.c (pod_type_p): Use strip_array_types.
15053         (cp_valid_lang_attribute): Likewise.
15054         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
15055         multiple evaluations.
15056         (cp_has_mutable_p): Use strip_array_types.
15058 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
15060         * cp-tree.h (sufficient_parms_p): Declare new function.
15061         * call.c (sufficient_parms_p): New function, broken out of ...
15062         (add_function_candidate): ... here. Use it.
15063         (add_conv_candidate): Use it.
15064         * decl.c (grok_ctor_properties): Use it.
15066 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
15068         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
15070 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
15072         * decl2.c (lang_decode_option): Handle -Wformat-security.
15074 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15076         * pt.c (verify_class_unification): New function.
15077         (get_class_bindings): Use it.
15078         (try_class_unification): Tidy.
15079         (unify): Handle when argument of a template-id is not
15080         template parameter dependent.
15081         (template_args_equal): Handle when TREE_CODE's do not match.
15083 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
15085         * lang-specs.h (c++): When invoking the stand-alone preprocessor
15086         for -save-temps, pass all relevant -Defines to it, and then don't
15087         pass them to cc1plus.
15089 2000-12-05  Will Cohen  <wcohen@redhat.com>
15091         * decl.c (finish_case_label): Cleared
15092         more_cleanups_ok in surrounding function scopes.
15093         (define_label): Likewise.
15095 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
15097         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15098         (get_matching_virtual): Remove.
15099         (look_for_overrides): Declare new function.
15100         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15101         DECL_VINDEX here.
15102         * class.c (check_for_override): Move base class iteration code
15103         to look_for_overrides.
15104         * search.c (next_baselink): Remove.
15105         (get_virtuals_named_this): Remove.
15106         (get_virtual_destructor): Remove.
15107         (tree_has_any_destructors_p): Remove.
15108         (struct gvnt_info): Remove.
15109         (check_final_overrider): Remove `virtual' from error messages.
15110         (get_matching_virtuals): Remove. Move functionality to ...
15111         (look_for_overrides): ... here, and ...
15112         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15113         to be overriding.
15115 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
15117         * typeck.c (get_delta_difference): If via a virtual base,
15118         return zero.
15119         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15120         adjustment.
15122 2000-12-04  Richard Henderson  <rth@redhat.com>
15124         * error.c (dump_tree): Use output_add_string not OB_PUTS.
15126 2000-12-04  Jason Merrill  <jason@redhat.com>
15128         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15129         (write_builtin_type): Pass intSI_type_node and the like through
15130         type_for_mode.
15131         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15132         Pass intSI_type_node and the like through type_for_mode.
15133         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15134         * pt.c (tsubst, unify): Likewise.
15135         * tree.c (walk_tree): Likewise.
15136         * error.c (dump_type): Likewise.
15137         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15139         * Make-lang.in: Tweak top comment for emacs.
15140         (cp/TAGS): Restore.
15142         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15144         * class.c (clone_function_decl): Robustify.
15146 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
15148         * decl.c (store_bindings): Only search in the non modified
15149         old_bindings for duplicates.
15151 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
15153         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15154         TYPE_POLYMORPHIC_P.
15156         * typeck.c (build_static_cast): Remove unused variable.
15158 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15160         * pt.c: Fix typo in comment.
15162 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
15164         * decl2.c (warn_format): Remove definition.
15165         (lang_decode_option): Handle -Wformat-nonliteral,
15166         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
15168 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
15170         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15171         (init_decl_processing): Don't create string_type_node,
15172         const_string_type_node, wint_type_node, intmax_type_node,
15173         uintmax_type_node, default_function_type, ptrdiff_type_node and
15174         unsigned_ptrdiff_type_node.  Adjust position of call to
15175         c_common_nodes_and_builtins.
15176         (identifier_global_value): New function.
15178 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
15180         * call.c (standard_conversion): Reject pointer to member
15181         conversions from ambiguous, inaccessible or virtual bases.
15182         * typeck.c (build_static_cast): Don't check pointers to members
15183         specially.
15185 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15187         * method.c (do_build_copy_constructor): Preserve cv
15188         qualifications when accessing source object members.
15189         (do_build_assign_ref): Likewise. Remove separate diagnostics for
15190         unnamed fields.
15192 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15194         * method.c (do_build_assign_ref): Construct appropriately
15195         CV-qualified base reference. Don't allow const casts in base
15196         conversion.
15198 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15200         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15201         incomplete return type.
15203 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15205         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15206         * semantics.c (finish_base_specifier): Accept a _TYPE not a
15207         _DECL.
15209 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15211         * spew.c (yyerror): Cope if yylval.ttype is NULL.
15213 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15215         * decl.c (grokdeclarator): Diagnose undefined template contexts.
15217 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15219         * decl.c (grokdeclarator): Do type access control on friend
15220         class.
15222 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
15224         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15225         bison parser ickiness.
15226         * pt.c (tsubst_friend_function): Enter namespace scope when
15227         tsubsting the function name.
15228         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15230 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
15232         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15233         * cvt.c (cp_convert_to_pointer): Add force parameter.
15234         Allow conversions via virtual base if forced.
15235         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15236         (ocp_convert): Likewise.
15237         * search.c (binfo_from_vbase): Return the virtual base's binfo.
15238         * typeck.c (get_delta_difference): Adjust handling of virtual
15239         bases.
15241 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
15243         * tree.c (struct list_hash): Remove.
15244         (list_hash_table): Make it be an htab.
15245         (struct list_proxy): New type.
15246         (list_hash_eq): New function.
15247         (list_hash_pieces): Renamed from ...
15248         (list_hash): ... this.
15249         (list_hash_lookup): Remove.
15250         (list_hash_add): Remove.
15251         (hash_tree_cons): Use the generic hashtable.
15252         (mark_list_hash): Remove.
15253         (init_tree): Create the hashtable.
15255 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
15257         * method.c (build_mangled_C9x_name): Rename to
15258         build_mangled_C99_name.  Change C9X references in comments to
15259         refer to C99.
15261 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
15263         * parse.y (unary_expr): Move VA_ARG from here ...
15264         (primary): ... to here.
15266 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
15268         * semantics.c (finish_id_expr): If type is error_mark, return
15269         error_mark.
15271 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
15273         * pt.c (lookup_template_class): Simplify loop exit constructs.
15274         Cope when there is no partial instantiation of a template
15275         template member.
15277 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
15279         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15281 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
15283         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15284         prefix.
15286         * pt.c (do_decl_instantiate): Explicitly clone constructors and
15287         destructors that haven't already been cloned.
15289 2000-11-20  Richard Henderson  <rth@redhat.com>
15291         * parse.y (yyparse_1): Rename the parser entry point.
15293 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
15295         * mangle.c (write_name): Use <unscoped-name> for names directly in
15296         function scope.
15297         (write_unscoped_name): Accept names directly in function scope.
15299 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
15301         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15302         * parse.y (extdef): Add EXPORT reduction.
15303         * spew.c (yylex): Don't skip export here.
15305 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
15307         * decl.c (init_decl_processing): Correct name of pure virtual
15308         function under the new ABI.
15309         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15310         (throw_bad_typeid): Likewise for bad typeid function.
15312 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
15314         * decl.c (grokparms): Don't even function types of `void' type,
15315         either.
15316         * mangle.c (write_type): Don't crash when confronted with the
15317         error_mark_node.
15319         * decl.c (grokparms): Don't create parameters of `void' type.
15321 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
15323         * lex.c (mark_impl_file_chain): Delete.
15324         (init_parse): Remove call to ggc_add_string_root.  No need to
15325         ggc_strdup a string constant.  Do not add impl_file_chain to GC
15326         roots.
15327         (handle_pragma_implementation): No need to ggc_strdup main_filename.
15329 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15331         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15333 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15335         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15336         * decl.c (grokdeclarator): Don't reject void parms here.
15337         (require_complete_types_for_parms): Simplify, use
15338         complete_type_or_else.
15339         (grokparms): Remove bitrot. Remove funcdef parm.
15340         Deal with ellipsis parm lists here.
15341         * semantics.c (finish_parmlist): Don't append void_list_node
15342         here. Set PARMLIST_ELLIPSIS_P.
15344 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15346         * typeck2.c (incomplete_type_error): Reorganize to avoid
15347         excessive diagnostics.
15349 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
15351         * lex.c (struct impl_files, internal_filename): Constify a char *.
15353 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
15355         * mangle.c (write_special_name_constructor): Don't generate
15356         assembler junk when confronted with an old-style constructor.
15357         (write_special_name_destructor): Likewise.
15358         (mangle_decl_string): Do it here instead.
15360 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
15362         * call.c (op_error): Make error messages clearer.
15364 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
15366         * decl.c (wrapup_globals_for_namespace): Don't mark things
15367         TREE_ASM_WRITTEN when they're not.
15369 2000-11-15  Jason Merrill  <jason@redhat.com>
15371         * typeck2.c (friendly_abort): Uncount the error before handing
15372         off to fancy_abort.
15374 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
15376         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15378 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
15380         * class.c (build_vtbl_initializer): Fix typo in comment.
15381         * typeck.c (expr_sizeof): Don't crash on errors.
15383 2000-11-14  Jim Wilson  <wilson@redhat.com>
15385         * lang-specs.h: Add %2 after %(cc1_options).
15387 2000-11-14  Richard Henderson  <rth@redhat.com>
15389         * typeck.c (c_sizeof): Be strict about casting result value
15390         back to c_size_type_node.
15391         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15393 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
15395         * typeck.c (build_unary_op): Use boolean_increment from
15396         c-common.c, moving the relevant code there.
15398 2000-11-11  Jason Merrill  <jason@redhat.com>
15400         * typeck.c (mark_addressable): Don't call put_var_into_stack.
15402         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15403         in inlines.
15405 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15407         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15408         * lex.c (copy_lang_decl): Likewise.
15410 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
15412         * dump.c (cp_dump_tree): Don't dump function bodies here.
15414         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15415         (dump.o): Update dependency list.
15416         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15417         (flag_dump_translation_unit): Likewise.
15418         (CP_TYPE_QUALS): Adjust definition.
15419         (DECL_C_BIT_FIELD): Remove.
15420         (SET_DECL_C_BIT_FIELD): Likewise.
15421         (CLEAR_DECL_C_BIT_FIELD): Likewise.
15422         (add_maybe_template): Likewise.
15423         (strip_array_types): Likewise.
15424         (dump_node_to_file): Likewise.
15425         (cp_dump_tree): New function.
15426         * decl.c (init_decl_processing): Set lang_dump_tree.
15427         * decl2.c (flag_dump_translation_unit): Remove.
15428         * dump.c: Move most of it to ../c-dump.c.
15429         (cp_dump_tree): New function.
15430         * pt.c (add_maybe_template): Remove.
15431         * typeck.c (strip_array_types): Likewise.
15433 2000-11-07  Eric Christopher  <echristo@redhat.com>
15435         * decl.c (init_decl_processing): Change definition of
15436         __wchar_t to wchar_t.  Remove artificial declaration of
15437         wchar_t.
15438         * lex.c: Change instances of __wchar_t to wchar_t.
15440 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
15442         * lex.c (do_identifier): Don't lookup_name for operators.
15443         * parse.y (operator): Save looking_for_typename.
15444         (unoperator): Restore it.
15445         * spew.c (frob_opname): Use nth_token for lookahead.
15447 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
15449         * decl.c (grok_op_properties): Always use coerce_new_type and
15450         coerce_delete_type.
15451         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15452         exception specification. Tidy up.
15453         (coerce_delete_type): Preserve exception specification. Tidy up.
15455 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
15457         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15458         (push_binding_level), error.c (cp_tree_printer), pt.c
15459         (process_partial_specialization, tsubst_template_arg_vector),
15460         search.c (lookup_member): Use memset () instead of bzero ().
15462 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
15464         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15466 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
15468         * Make-lang.in (c++.distdir): Remove.
15470 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
15472         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15473         declarations from different namespaces to be combined.
15475 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
15477         * decl.c: Include tm_p.h.
15479 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
15481         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15483 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
15485         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15486         (build_overload_value), repo.c (open_repo_file), xref.c
15487         (open_xref_file): Use strchr () and strrchr () instead of index ()
15488         and rindex ().
15490 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
15492         * call.c (build_over_call): Call fold on the CALL_EXPR.
15494 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
15496         * error.c (dump_template_decl): Separate template hearders with
15497         space not comma.
15499 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
15501         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
15502         TS_* flags with corresponding TFF_*.  Adjust prototypes of
15503         functions (which used to take a tree_string_flags) to take an int.
15505         * cp-tree.h (enum tree_string_flags): Remove
15506         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15507         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15508         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15509         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15510         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15511         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15512         (type_as_string, decl_as_string, expr_as_string,
15513         context_as_string): Adjust prototype.
15515         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15516         instead of TS_PLAIN.
15518         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15519         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15520         plain `0'.
15522 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
15524         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15525         (linkage_kind): New enumeration.
15526         (decl_linkage): New function.
15527         * decl2.c (comdat_linkage): Extend comment.
15528         * error.c (dump_function_decl): Print the arguments used to
15529         instantiate a template, even when not printing the type of the
15530         function.
15531         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15532         not TREE_PUBLIC, to test for external linkage.
15533         * tree.c (decl_linkage): New function.
15535 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
15537         * pt.c (instantiate_decl): Always instantiate static data members
15538         initialized in-class.
15540 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
15542         * Make-lang.in: Move all build rules here from Makefile.in,
15543         adapt to new context.  Wrap all rules that change the current
15544         directory in parentheses.  Expunge all references to $(P).
15545         When one command depends on another and they're run all at
15546         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
15547         all object-file generation rules.  Delete obsolete variables.
15549         * Makefile.in: Delete.
15550         * config-lang.in: Delete outputs= line.
15552 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15554         * error.c (dump_function_decl): Print no space between
15555         `ptr-operator' the `type-specifier' of the return type.
15556         (dump_type_prefix): Make sure we put space at the appropriate
15557         place.
15559 2000-10-23  Jason Merrill  <jason@redhat.com>
15561         * call.c (equal_functions): Also call decls_match for extern "C" fns.
15563 2000-10-22  Jason Merrill  <jason@redhat.com>
15565         * call.c (build_conditional_expr): Use ocp_convert to force
15566         rvalue conversion.
15568 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
15570         * call.c (standard_conversion): Use RVALUE_CONVs for all
15571         expressions that satisfy lvalue_p, not just those that satisfy
15572         real_lvalue_p.
15574         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15576         * typeck.c (c_sizeof): Return an expression of `size_t' type,
15577         not one with TYPE_IS_SIZETYPE set.
15578         (dubious_conversion_warnings): Remove special-case code.
15580 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
15582         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15583         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15584         (dump_type_prefix): Print vector-of-int as 'int vector'.
15585         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15586         * tree.c (walk_tree): Handle VECTOR_TYPE.
15588         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15590 2000-10-21  Jason Merrill  <jason@redhat.com>
15592         * parse.y (operator): Set got_object from got_scope.
15593         Set looking_for_typename.
15594         * decl.c (lookup_name_real): Clear val after setting from_obj.
15595         Reorganize diagnostic.
15597 2000-10-20  Jason Merrill  <jason@redhat.com>
15599         * tree.c (walk_tree): Don't walk into default args.
15601         * error.c (dump_expr): Use host_integerp.
15603 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
15605         * typeck2.c (abstract_virtuals_error): Use "because" instead of
15606         "since" in error message.
15608 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15610         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15612 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
15614         * decl.c (revert_static_member_fn): Fixed typo.
15616 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
15618         * class.c (subobject_offset_fn): New type.
15619         (dfs_record_base_offsets): Remove.
15620         (record_base_offsets): Likewise.
15621         (dfs_search_base_offsets): Likewise.
15622         (record_subobject_offset): New function.
15623         (check_subobject_offset): Likewise.
15624         (walk_subobject_offsets): Likewise.
15625         (record_subobject_offsets): Likewise.
15626         (layout_conflict_p): Reimplement.
15627         (layout_nonempty_base_or_field): Correct handling of type
15628         conflicts during layout.
15629         (layout_empty_base): Likewise.
15630         (build_base_field): Adjust to handle new representation of empty
15631         base offset table.
15632         (build_base_fields): Likewise.
15633         (layout_virtual_bases): Likewise.
15634         (splay_tree_compare_integer_csts): New function.
15635         (layout_class_type): Use a splay_tree, rather than a varray, to
15636         represent the offsets of empty bases.
15638         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15639         * decl.c (select_decl): Don't return declarations that are
15640         DECL_ANTICIPATED.
15642 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
15644         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15645         (fake_std_node): New macro.
15646         * decl.c (in_std): Rename to ...
15647         (in_fake_std): ... this.
15648         (flag_no_builtin): Remove.
15649         (flag_no_nonansi_builtin): Likewise.
15650         (walk_namespaces_r): Use fake_std_node.
15651         (push_namespace): Use std_identifier.
15652         (pop_namespace): Use in_fake_std.
15653         (lookup_name_real): Use fake_std_node.
15654         (init_decl_processing): When -fhonor-std, create the `std'
15655         namespace.  Don't create a dummy fake_std_node in that case.
15656         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
15657         (builtin_function): Put builtins whose names don't begin
15658         with `_' in the std namespace.
15659         * decl2.c (flag_no_builtin): Remove.
15660         (flag_no_nonansi_builtin): Likewise.
15661         (set_decl_namespace): Use fake_std_node.
15662         (validate_nonmember_using_decl): Likewise.
15663         (do_using_directive): Likewise.
15664         (handle_class_head): Likewise.
15665         * dump.c (dequeue_and_dump): Likewise.
15666         * except.c (init_exception_processing): Use std_identifier.
15667         * init.c (build_member_call): Use fake_std_node.
15668         * rtti.c (init_rtti_processing): Use std_identifier.
15670 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
15672         * cp-tree.h (back_end_hook): Remove declaration.
15673         * decl2.c (back_end_hook): Remove definition.
15675         * dump.c (dequeue_and_dump): Dump TREE_USED.
15677 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
15679         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15681 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15683         * decl.c (WINT_TYPE): Define.
15684         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15685         c_size_type_node, signed_size_type_node and wint_type_node.
15687 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15689         * decl2.c (warn_missing_format_attribute): New variable.
15690         (lang_decode_option): Decode -Wmissing-format-attribute.
15692 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
15694         * typeck.c (qualify_type): Remove.
15695         (composite_pointer_type): Fix handling of conversions to `cv void*'.
15697 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15699         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15701 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15703         * Makefile.in (parse.c, parse.h): Create atomically.
15705 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
15707         * class.c (current_obstack): Remove.
15708         * decl.c (ggc_p): Remove.
15709         (start_decl): Don't use decl_tree_cons.
15710         (grokdeclarator): Don't use build_decl_list.
15711         (start_function): Don't use decl_tree_cons.
15712         (finish_function): Don't mess with obstacks.
15713         * decl2.c (grok_x_components): Don't use build_decl_list.
15714         * lex.c (make_call_declarator): Don't call decl_tree_cons.
15715         (implicitly_declare_fn): Don't call build_decl_list.
15716         * parse.y (frob_specs): Don't call build_decl_list or
15717         decl_tree_cons.
15718         (expr_or_declarator_intern): Don't call decl_tree_cons.
15719         (primary): Don't call build_decl_list.
15720         (fcast_or_absdcl): Likewise.
15721         (typed_declspecs): Don't call decl_tree_cons.
15722         (reserved_declspecs): Don't call build_decl_list.
15723         (declmods): Likewise.
15724         (reserved_typespecquals): Likewise.
15725         (aggr): Likewise.
15726         (new_type_id): Likewise.
15727         (cv_qualifiers): Likewise.
15728         (after_type_declarator_intern): Likewise.
15729         (notype_declarator_intern): Likewise.
15730         (absdcl_intern): Likewise.
15731         (named_parm): Likewise.
15732         * pt.c (most_specialized_class): Likewise.
15733         * repo.c (temporary_obstack): Make it a structure, not a pointer.
15734         (init_repo): Initialize it.
15735         * search.c (current_obstack): Remove.
15736         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15738 2000-10-09  Richard Henderson  <rth@cygnus.com>
15740         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15741         (c++ language support bits for libgcc): Remove.
15742         (c++.clean): Remove cplib2.txt cleanup.
15743         * config-lang.in (headers, lib2funcs): Remove.
15745         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15746         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15747         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15748         * inc/new.h, inc/typeinfo: Remove files.
15750 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
15752         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15753         defined.
15754         (init_decl_processing): Initialize intmax_type_node and
15755         uintmax_type_node.
15757 2000-10-06  Richard Henderson  <rth@cygnus.com>
15759         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15760         (original_result_rtx): Remove.
15761         * decl.c (save_function_data): Don't clear x_result_rtx.
15762         (mark_lang_function): Don't mark it either.
15763         * expr.c (fixup_result_decl): Remove.
15764         * semantics.c (genrtl_named_return_value): Frob the return decl
15765         before calling emit_local_var.
15766         (genrtl_finish_function): Don't call fixup_result_decl.
15767         Always emit the jump to return_label.
15769 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
15771         * pt.c (lookup_template_class): Set current access for enum.
15772         (tsubst_enum): Set file & line for enum decl.
15774         * spew.c (yylex): Remove unused variable.
15776 2000-10-05  Richard Henderson  <rth@cygnus.com>
15778         * semantics.c (genrtl_finish_function): Don't init or check
15779         can_reach_end; remove noreturn and return value checks.
15781 2000-10-05  Tom Tromey  <tromey@cygnus.com>
15783         * init.c (build_java_class_ref): Use `build_static_name' with a
15784         suffix, not a prefix, to build the class object's name.
15786 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15788         * cp-tree.h (access_kind): Fix comment typo.
15789         * decl2.c (grokfield): Fix diagnostic typo.
15790         * semantics.c (finish_template_type): Fix comment typo.
15791         (finish_qualified_object_call_expr): Likewise.
15793 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15795         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15796         tsubsting fails.
15798 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15800         * spew.c (frob_id): New static function.
15801         (frob_opname): Use it.
15802         (yylex): Use it.
15804 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
15806         * decl.c (lang_mark_false_label_stack): Remove.
15807         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15809 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
15811         * gxxint.texi: Use @email for formatting email addresses.
15813 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
15815         * error.c: Remove direct obstack manipulation.  Replace with
15816         output_buffer-based formatting.  Adjust calls to removed macros.
15817         (obstack_chunk_alloc, obstack_chunk_free): Remove.
15818         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15819         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15821 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
15823         * ir.texi: Move to ../c-tree.texi.
15825 2000-09-20  Jason Merrill  <jason@redhat.com>
15827         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15829 2000-09-21  Andreas Jaeger  <aj@suse.de>
15831         * errfn.c: Move declaration of cp_printer and cp_printers to ...
15832         * cp-tree.h: ... here.
15834         * error.c: Remove declaration of cp_printer.
15836 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
15838         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15840 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
15842         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15843         users.
15845 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
15847         * decl.c (start_function): Robustify.
15849 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15851         * cp-tree.h (check_function_format): Accept a `status' parameter.
15853         * call.c, typeck.c: Updates calls to `check_function_format'.
15855 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
15857         * decl2.c (handle_class_head): Always push some scope even
15858         in the error case.
15860 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
15862         * cp-tree.h (struct cp_language_function): Remove
15863         x_scope_stmt_stack and name_declared.
15864         (current_scope_stmt_stack): Remove.
15865         (function_name_declared_p): New macro.
15866         (struct lang_decl_flags): Use c_lang_decl as a base class.
15867         (context): Remove.
15868         (struct lang_decl): Replace saved_tree with context.
15869         (DECL_FRIEND_CONTEXT): Adjust accordingly.
15870         (SET_DECL_FRIEND_CONTEXT): Likewise.
15871         (DECL_VIRTUAL_CONTEXT): Likewise.
15872         (DECL_SAVED_TREE): Remove.
15873         (C_DECLARED_LABEL_FLAG): Likewise.
15874         (cplus_expand_expr_stmt): Don't declare.
15875         (add_decl_stmt): Likewise.
15876         (add_scope_stmt): Likewise.
15877         * decl.c (mark_stmt_tree): Remove.
15878         (case_compare): Likewise.
15879         (finish_case_label): Use c_add_case_label.
15880         (init_decl_processing): Set more language-specific hooks.
15881         (build_enumerator): Fix typo in comment.
15882         (cplus_expand_expr_stmt): Remove.
15883         (mark_lang_function): Use mark_c_language_function.
15884         (lang_mark_tree): Use c_mark_lang_decl.
15885         * decl2.c: Change order of inclusion.
15886         * except.c: Likewise.
15887         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
15888         back on c_expand_expr.
15889         * friend.c: Include expr.h.
15890         * init.c: Change order of inclusion.
15891         * Makefile.in: Update dependencies.
15892         * lex.h (free_lang_decl_chain): Remove.
15893         * optimize.c (maybe_clone_body): Use function_name_declared_p.
15894         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15895         it doesn't exist.
15896         (instantiate_decl): Use function_name_declared_p.
15897         * semantics.c (lang_expand_expr_stmt): Remove.
15898         (set_current_function_name_declared): Likewise.
15899         (current_function_name_declared): Likewise.
15900         (begin_compound_stmt): Use function_name_declared_p.
15901         (add_decl_stmt): Remove.
15902         (setup_vtbl_ptr): Use function_name_declared_p.
15903         (add_scope_stmt): Remove.
15904         (current_scope_stmt_stack): New function.
15905         (cp_expand_stmt): Don't handle SCOPE_STMTs.
15906         (expand_body): Use function_name_declared_p.
15907         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15908         * typeck.c: Change order of includes.
15909         (convert_sequence): Remove.
15911 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
15913         * lex.c (reswords): Add _Complex.
15915 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15917         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15919 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
15921         * init.c (begin_init_stmts): Don't use // comments.
15923 2000-09-12  Jason Merrill  <jason@redhat.com>
15925         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15926         all non-extern arrays.
15928         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15929         typenames, too.  Downgrade complaint to pedwarn.
15930         (xref_tag): Warn about surprising behavior of 'friend struct T'.
15931         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15932         'class This::Inherited'.
15934 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
15936         * decl.c (finish_case_label): Given the LABEL_DECL a
15937         DECL_CONTEXT.
15939 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15941         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15942         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15943         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15944         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15945         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15946         New macros.
15947         (sorry_for_unsupported_tree, print_scope_operator,
15948         print_left_paren, print_right_paren, print_left_bracket,
15949         print_right_bracket, print_whitespace): Likewise.
15950         (aggr_variety): Rename to class_key_or_enum.
15951         (print_type): Rename to print_type_id.
15952         (print_type_specifier_seq, print_simple_type_specifier,
15953         print_elaborated_type_specifier,
15954         print_rest_of_abstract_declarator,
15955         print_parameter_declaration_clause, print_exception_specification,
15956         print_nested_name_specifier, print_template_id,
15957         typedef_original_name,  print_template_argument_list_start,
15958         print_template_argument_list_end): New functions.
15960 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15962         * ir.texi: Add more documentation.
15964 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
15966         * cp-tree.h (struct saved_scope): Remove x_function_parms.
15967         (current_function_parms): Don't define.
15968         (struct cp_language_function): Remove parms_stored.
15969         (current_function_just_assigned_this): Don't define.
15970         (current_function_parms_stored): Likewise.
15971         (static_ctors): Declare.
15972         (static_dtors): Likewise.
15973         (SF_EXPAND): Don't define.
15974         (expand_start_early_try_stmts): Remove declaration.
15975         (store_parm_decls): Likewise.
15976         * decl.c (static_ctors): Don't declare.
15977         (static_dtors): Likewise.
15978         (struct binding_level): Remove this_block.
15979         (poplevel): Remove dead code.
15980         (set_block): Likewise.
15981         (mark_binding_level): Don't mark this_block.
15982         (mark_saved_scope): Don't mark x_function_parms.
15983         (init_decl_processing): Don't add current_function_parms as a GC
15984         root.
15985         (check_function_type): Change prototype.
15986         (start_function): Remove RTL-generation code.
15987         (expand_start_early_try_stmts): Remove.
15988         (store_parm_decls): Give it internal linkage.  Remove
15989         RTL-generation code.
15990         (finish_function): Remove RTL-generation code.
15991         * decl2.c (static_ctors): Fix formatting.
15992         (static_dtors): Likewise.
15993         * method.c (use_thunk): Don't call store_parm_decls.
15994         (synthesize_method): Likewise.
15995         * optimize.c (maybe_clone_body): Likewise.
15996         * parse.y (fn.def2): Likewise.
15997         (.set_base_init): Likewise.
15998         (nodecls): Likewise.
15999         * pt.c (instantiate_decl): Likewise.
16000         * rtti.c (synthesize_tinfo_fn): Likewise.
16001         * semantics.c (genrtl_try_block): Simplify.
16002         (expand_body): Use genrtl_start_function and
16003         genrtl_finish_function.
16004         (genrtl_start_function): New function.
16005         (genrtl_finish_function): Likewise.
16007 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
16009         * error.c (cp_tree_printer, case 'P'): Append break.
16011 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
16013         * cp-tree.h (frob_opname): Declare.
16014         * parse.y (saved_scopes): New static variable.
16015         (cp_parse_init): Adjust.
16016         (do_id): If lastiddecl is NULL, do do_identifier.
16017         (operator): Save scope information.
16018         (unoperator): New reduction. Restore scope information.
16019         (operator_name): Append unoperator. Call frob_opname.
16020         * spew.c (frob_opname): Define.
16022 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
16024         * decl.c, rtti.c: Include defaults.h if not already included.
16025         Don't define the *_TYPE_SIZE macros.
16027 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
16029         * cp-tree.h (push_switch): Change prototype.
16030         (check_cp_case_value): Remove declaration.
16031         (decl_constant_value): Likewise.
16032         * decl.c (struct cp_switch): Add switch_stmt and cases.
16033         (case_compare): New function.
16034         (push_switch): Set switch_stmt.  Initialize cases.
16035         (pop_switch): Clean up cases.
16036         (define_case_label): Rename to ...
16037         (finish_case_label): ... this.  Do semantic analysis for case
16038         labels here.
16039         (start_function): Correct comment.
16040         * decl2.c (check_cp_case_value): Remove.
16041         * expr.c (do_case): Remove.
16042         * pt.c (tsubst_expr): Adjust call to finish_case_label.
16043         * semantics.c (genrtl_do_poplevel): Remove declaration.
16044         (RECHAIN_STMTS): Remove.
16045         (finish_break_stmt): Use build_break_stmt.
16046         (finish_continue_stmt): Use build_continue_stmt.
16047         (finish_switch_cond): Adjust condition here, rater than in
16048         c_expand_start_case.
16049         (finish_case_label): Remove.
16050         * typeck.c (c_expand_return): Remove.
16051         (c_expand_start_case): Likewise.
16053 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
16055         * ir.texi: Document type nodes.
16057 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
16059         * cp-tree.h (init_cp_semantics): Declare.
16060         (genrtl_try_block): Don't declare.
16061         (genrtl_handler): Likewise.
16062         (genrtl_catch_block): Likewise.
16063         (genrtl_ctor_stmt): Likewise.
16064         (genrtl_subobject): Likewise.
16065         (genrtl_do_poplevel): Likewise.
16066         (genrtl_named_return_value): Likewise.
16067         * lex.c (init_parse): Call init_cp_semantics.
16068         * semantics.c (genrtl_try_block): Give it internal linkage.
16069         (genrtl_handler): Likewise.
16070         (genrtl_catch_block): Likewise.
16071         (genrtl_ctor_stmt): Likewise.
16072         (genrtl_subobject): Likewise.
16073         (genrtl_do_poplevel): Likewise.
16074         (genrtl_named_return_value): Likewise.
16075         (lang_expand_stmt): Rename to ...
16076         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
16077         (init_cp_semantics): Define.
16079         * decl.c (initialize_local_var): Remove RTL-generating code.
16080         * semantics.c (genrtl_try_block): Fix formatting.
16082         Move statement-tree facilities from C++ to C front-end.
16083         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16084         (void_zero_node): Remove.
16085         (stmt_tree): Likewise.
16086         (scope_chain): Adjust.
16087         (language_function): Rename to cp_language_function.
16088         (cp_function_chain): Adjust.
16089         (current_stmt_tree): Remove.
16090         (last_tree): Likewise.
16091         (last_expr_type): Likewise.
16092         (struct lang_decl): Adjust.
16093         (STMT_IS_FULL_EXPR_P): Remove.
16094         (add_tree): Remove.
16095         (begin_stmt_tree): Likewise.
16096         (finish_stmt_tree): Likewise.
16097         (walk_tree_fn): Likewise.
16098         (walk_stmt_tree): Likewise.
16099         * class.c (finish_struct): Replace use of add_tree with add_stmt.
16100         * decl.c (mark_stmt_tree): Adjust type.
16101         (init_decl_processing): Don't build void_zero_node.
16102         (initialize_local_var): Adjust usage of current_stmt_tree.
16103         (finish_enum): Use add_stmt, not add_tree.
16104         (save_function_data): Adjust use of language_function.
16105         (finish_constructor_body): Use add_stmt, not add_tree.
16106         (finish_destructor_body): Likewise.
16107         (push_cp_function_context): Adjust use of language_function.
16108         (pop_cp_function_context): Likewise.
16109         (mark_lang_function): Likewise.
16110         (mark_cp_function_context): Likewise.
16111         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16112         (build_vec_init): Likewise.
16113         * semantics.c (SET_LAST_STMT): Remove.
16114         (RECHAIN_STMTS): Don't use it.
16115         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16116         (current_stmt_tree): Define.
16117         (add_tree): Remove.
16118         (finish_goto_stmt): Use add_stmt, not add_tree.
16119         (finish_expr_stmt): Likewise.
16120         (begin_if_stmt): Likewise.
16121         (finish_then_clause): Likewise.
16122         (begin_while_stmt): Likewise.
16123         (begin_do_stmt): Likewise.
16124         (finish_return_stmt): Likewise.
16125         (begin_for_stmt): Likewise.
16126         (finish_break_stmt): Likewise.
16127         (finish_continue_stmt): Likewise.
16128         (begin_switch_stmt): Likewise.
16129         (finish_case_label): Likewise.
16130         (begin_try_block): Likewise.
16131         (begin_function_try_block): Likewise.
16132         (begin_handler): Likewise.
16133         (begin_catch_block): Likewise.
16134         (begin_compound_stmt): Likewise.
16135         (begin_asm_stmt): Likewise.
16136         (finish_asm_stmt): Likewise.
16137         (finish_label_stmt): Likewise.
16138         (add_decl_stmt): Likewise.
16139         (finish_subobject): Likewise.
16140         (finish_decl_cleanup): Likewise.
16141         (finish_named_return_value): Likewise.
16142         (setup_vtbl_ptr): Likewise.
16143         (add_scope_stmt): Likewise.
16144         (finish_stmt_expr): Likewise.
16145         (prune_unused_decls): Remove.
16146         (begin_stmt_tree): Likewise.
16147         (finish_stmt_tree): Likewise.
16148         (prep_stmt): Adjust use of current_stmt_tree.
16149         (lang_expand_stmt): Likewise.
16150         * tree.c (statement_code_p): Remove.
16151         (cp_statement_code_p): New function.
16152         (walk_stmt_tree): Remove.
16153         (init_tree): Set lang_statement_code_p.
16155 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
16157         Integrated preprocessor.
16159         * Make-lang.in, Makefile.in: Remove all references to input.c,
16160         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
16161         * gxx.gperf, hash.h, input.c: Delete.
16162         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16163         initialized properly.
16165         * class.c (fixup_pending_inline): Take a tree, not a
16166         struct pending_inline *.  All callers changed.
16167         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16168         RID_PROTECTED entries in ridpointers[] array here.
16169         * decl.c (duplicate_decls): Do not refer to struct
16170         pending_inline.
16171         (record_builtin_type, init_decl_processing): Use RID_MAX not
16172         CP_RID_MAX.
16173         (grokdeclarator): Use C_IS_RESERVED_WORD.
16174         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16175         cpplib.
16176         (grok_x_components): Do not inspect pending_inlines chain.
16178         * cp-tree.h (struct lang_identifier): Add rid_code entry.
16179         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16180         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16181         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16182         TIME_IDENTIFIER_FILEINFO): Kill.
16183         Update prototypes.
16184         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
16185         single 32-bit word.
16186         * parse.y: Call do_pending_inlines unconditionally.
16187         reinit_parse_for_method is now snarf_method.  fn.defpen is no
16188         longer necessary.  Remove unnecessary <itype> annotation on
16189         SCOPE.  Do not refer to end_of_file or struct pending_inline.
16190         * semantics.c (begin_inline_definitions): Call
16191         do_pending_inlines unconditionally.
16193         * lex.c: Remove all code now shared with C front end.
16194         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
16195         into the get_identifier table.  Rewrite pragma handling to
16196         work with the registry.  Move code to save tokens for later
16197         processing to spew.c.
16199         * spew.c: Rewrite everything in terms of token streams instead
16200         of text.  Move routines here from lex.c / input.c as
16201         appropriate.  GC-mark trees hanging off the pending inlines
16202         chain.
16204 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
16206         * NEWS: Mention that the named return value extension has been
16207         deprecated.
16208         * cp-tree.h (original_result_rtx): Define.
16209         (TREE_REFERENCE_EXPR): Remove.
16210         (DECL_VPARENT): Likewise.
16211         (pushdecl_nonclass_level): Likewise.
16212         (store_return_init): Likewise.
16213         (reinit_lang_specific): Likewise.
16214         (genrtl_named_return_value): Change prototype.
16215         * decl.c (original_result_rtx): Remove.
16216         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16217         Do not generate RTL for local variables here.
16218         (store_return_init): Remove.
16219         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
16220         store_return_init.
16221         (finish_named_return_value): Adjust accordingly.  Warn that this
16222         extension is deprecated.
16223         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16225 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16227         * pt.c (type_unification_real): Replace switch with if.
16228         (unify): Tsubst non-type parms before comparing.
16230 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16232         * error.c (dump_typename): New function, broken out of ...
16233         (dump_type): ... here. Use it.
16234         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16236 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16238         * init.c (build_offset_ref): Deal with namespace scoped
16239         TEMPLATE_ID_EXPRs.
16241 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16243         * class.c (resolve_address_of_overloaded_function): Add
16244         explanation message.
16245         * decl.c (define_case_label): Reformat explanation.
16246         * decl2.c (finish_static_data_member_decl): Likewise.
16247         (grokfield): Likewise.
16248         * friend.c (do_friend): Likewise.
16250 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
16252         * tree.c (walk_tree): Expose tail recursion.
16253         (walk_stmt_tree): New function.
16254         * cp-tree.h: Prototype walk_stmt_tree.
16255         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16256         the BLOCKs directly.  If a BLOCK has no variables after
16257         pruning, discard it.
16258         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
16259         restore the line number.
16261 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
16263         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16264         (pt.o): Remove dependency on HTAB_H.
16265         * cp-tree.h: Include hashtab.h.
16266         (walk_tree): Change prototype.
16267         (walk_tree_without_duplicates): New function.
16268         * decl.c (check_default_argument): Use it.
16269         * optimize.c (remap_decl): Adjust calls to walk_tree.
16270         (copy_body): Likewise.
16271         (expand_calls_inline): Likewise.
16272         (calls_setjmp_p): Use walk_tree_without_duplicates.
16273         * pt.c: Don't include hashtab.h.
16274         (for_each_template_parm): Use walk_tree_without_duplicates.
16275         * semantics.c (finish-stmt_tree): Likewise.
16276         (expand_body): Likewise.
16277         * tree.c (walk_tree): Add additional parameter.
16278         (walk_tree_without_duplicates): New function.
16279         (count_trees): Use it.
16280         (verify_stmt_tree): Adjust call to walk_tree.
16281         (find_tree): Use walk_tree_without_duplicates.
16282         (no_linkage_check): Likewise.
16283         (break_out_target_exprs): Adjust call to walk_tree.
16284         (cp_unsave): Likewise.
16286 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
16288         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16289         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16290         * cp-tree.h (TYPE_BINFO): Adjust comment.
16291         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16292         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16293         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16294         (TYPE_TEMPLATE_INFO): Likewise.
16295         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16296         * class.c (push_nested_class): Likewise.
16297         * decl.c (lookup_name_real): Likewise.
16298         (grokdeclarator): Likewise.
16299         (grok_op_properties): Likewise.
16300         (xref_tag): Likewise.
16301         (xref_basetypes): Likewise.
16302         * decl2.c (constructor_name_full): Likewise.
16303         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16304         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16305         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16306         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16307         (dump_type_suffix): Likewise.
16308         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16309         instead.
16310         (get_aggr_from_typedef): Likewise.
16311         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16312         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16313         (write_template_parm): Likewise.
16314         (write_template_template_parm): Check tree code instead of
16315         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16316         * method.c (build_overload_nested_name): Add
16317         BOUND_TEMPLATE_TEMPLATE_PARM.
16318         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16319         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16320         * pt.c (convert_template_argument): Check tree code instead of
16321         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16322         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16323         (for_each_template_parm): Adjust comment.
16324         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
16325         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16326         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
16327         template_args_equal to compare template template parameter cases.
16328         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16329         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16330         instead.
16331         * tree.c (copy_template_template_parm): Decide whether to create
16332         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16333         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16334         (copy_tree_r): Likewise.
16335         * typeck.c (comptypes): Likewise.  Check tree code instead of
16336         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16338 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
16340         * decl.c (finish_function): Move the code for handling functions
16341         marked with the constructor and destructor attributes inside the
16342         expand_p block.
16344 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16346         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16348 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16350         * pt.c (lookup_template_class): Remove abort.
16351         * tree.c (get_type_decl): Allow error_mark_node.
16353 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16355         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16356         TEMPLATE_ID_EXPRs.
16358 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
16360         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16361         new ABI mangling.
16363 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
16365         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16366         union tag mismatch error reporting.
16368 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
16370         * call.c (build_scoped_method_call): Check it is not a namespace.
16372 2000-08-30  Jason Merrill  <jason@redhat.com>
16374         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16376         * tree.c (bot_manip): Check TREE_CONSTANT rather than
16377         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
16378         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16380         * decl.c (start_function): Always call make_function_rtl.
16382 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
16384         * semantics.c (prune_unused_decls): New function.
16385         (finish_stmt_tree): Call it via walk_tree.
16387 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
16389         * class.c (build_secondary_vtable): Constify a char *.
16390         * decl.c (init_decl_processing): Initialize function_id_node,
16391         pretty_function_id_node, and func_id_node.
16392         * input.c (struct input_source): Constify 'str'.
16393         (feed_input): Constify first argument.
16394         * mangle.c (write_identifier): Constify argument.
16395         * pt.c (mangle_class_name_for_template): Constify argument.
16397 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
16399         * typeck.c (mark_addressable): Remove code that pokes around in
16400         RTL.
16402 2000-08-28  Jason Merrill  <jason@redhat.com>
16404         * lex.c (file_name_nondirectory): Move to toplev.c.
16406         * cp-tree.h (LOCAL_CLASS_P): New macro.
16407         * class.c (finish_struct_1): Use it.
16409 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
16411         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16412         (write_encoding): Pass another argument to write_name.
16413         (write_name): Add ignore_local_scope parameter.  Fix handling of
16414         local names.
16415         (write_nested_name): Use write_unqualified_name.
16416         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
16417         (write_template_prefix): Use write_unqualified_name.
16418         (write_component): Remove.
16419         (write_local_name): Add parameter.  Use direct local entity to
16420         discriminator calculation.
16421         (write_class_enum_type): Pass another argument to write_name.
16422         (write_template_template_arg): Likewise.
16423         (make_guard_variable): Likewise.
16425 2000-08-27  Jason Merrill  <jason@redhat.com>
16427         * decl.c (pushdecl): Matching decls for local externs are found in
16428         the current level.  Propagate linkage information from previous
16429         declarations.
16431 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
16433         * ir.texi (Expressions): Fix typo.
16435 2000-08-25  Greg McGary  <greg@mcgary.org>
16437         * tree.c (init_tree): Use ARRAY_SIZE.
16439 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16441         * error.c (cp_tree_printer): Rework.
16443 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
16445         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16446         dyn-string.o.
16447         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16448         (cp-demangle.o): Remove target.
16449         (dyn-string.o): Likewise.
16451         * decl.c (grokfndecl): Require that `main' return an `int'.
16452         * mangle.c (write_encoding): Don't mangle return types for
16453         conversion functions.
16455 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16457         * error.c (tree_formatting_info): New data type.
16458         (tree_being_formatted): New macro.
16459         (tree_formatting_flags): Likewise.
16460         (put_whitespace): Likewise.
16461         (print_tree_identifier): Likewise.
16462         (print_identifier): Likewise.
16463         (cp_tree_printer, print_function_argument_list, print_declaration,
16464         print_expression, print_function_declaration,
16465         print_function_parameter, print_type, print_cv_qualifier): New
16466         functions.
16467         (init_error): Initialize lang_printer.
16469 2000-08-24  Jason Merrill  <jason@redhat.com>
16471         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16472         adjustment necessary.
16474 2000-08-24  Greg McGary  <greg@mcgary.org>
16476         * cp-tree.h (MAIN_NAME_P): Remove macro.
16478 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
16480         * error.c (print_instantiation_context): Don't forget to flush the
16481         buffer.
16483 2000-08-23  Jason Merrill  <jason@redhat.com>
16485         * typeck.c (build_ptrmemfunc): Save the input pmf.
16487         * method.c (process_modifiers): Use same_type_p.
16489 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
16491         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16492         * mangle.c (write_function_type): Change prototype.
16493         (write_encoding): Don't mangle return types for
16494         constructors or destructors.
16495         (write_type): Adjust call to write_function_type.
16496         * pt.c (instantiate_template): Instantiate alternate entry points
16497         when instantiating the main function.
16499 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16501         * error.c (cp_print_error_function): Don't use embedded '\n' in
16502         output_printf.
16504 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16506         * decl.c (init_decl_processing): Remove bogus initialization.
16507         * error.c (lang_print_error_function): Restore here.
16508         (init_error): Initialize print_error_function.
16510 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
16512         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16514 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
16516         * Makefile.in (error.o): Depends on diagnostic.h
16518         * cp-tree.h (problematic_instantiation_changed,
16519         record_last_problematic_instantiation, current_instantiation,
16520         print_instantiation_context): Declare.
16521         (maybe_print_template_context): Remove.
16523         * decl.c (init_decl_processing): Set print_error_function to NULL.
16524         (lang_print_error_function): Remove, since we're using a new
16525         machinery.
16527         * error.c: #include diagnostic.h
16528         (function_category): New function.
16529         (cp_diagnostic_starter): Likewise.
16530         (cp_diagnostic_finalizer): Likewise.
16531         (cp_print_error_function): Likewise.
16532         (maybe_print_instantiation_context): Likewise.
16533         (print_instantiation_full_context): Likewise.
16534         (print_instantiation_partial_context): Likewise.
16535         (print_instantiation_context): Define.
16536         (init_error): Initialize diagnostic pager and finalizer.
16538         * pt.c (problematic_instantiation_changed): Define.
16539         (record_last_problematic_instantiation): Likewise.
16540         (current_instantiation): Likewise.
16541         (maybe_print_template_context): Remove.
16542         (print_template_context): Likewise.
16543         (current_tinst_level): Make static to reflect Brendan Kehoe's
16544         change of 1995-04-13.
16545         (push_tinst_level): Call print_instantiation_context.
16547 2000-08-21  Nix  <nix@esperi.demon.co.uk>
16549         * lang-specs.h: Do not process -o or run the assembler if
16550         -fsyntax-only.
16552 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
16554         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16555         variables.
16556         * decl2.c (lang_decode_option): Disable gettext attributes for
16557         -ansi.
16559 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16561         * lex.c (lang_init_options): Default diagnostic message maximum
16562         length to 80, when line-wrapping.
16564 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
16566         * class.c (build_vtbl_initializer): Clear the entire
16567         vtbl_init_data.  Start keeping track of the functions for which we
16568         have created vcall offsets here.
16569         (dfs_build_vcall_offset_vtbl_entries): Remove.
16570         (build_vcall_offset_vtbl_entries): Reimplement.
16571         (add_vcall_offset_vtbl_entries_r): New function.
16572         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
16573         computing when vcall offsets are necessary.
16575 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16577         * decl.c (member_function_or_else): Use cp_error ... %T.
16578         (grokdeclarator): Likewise.
16579         (start_method): Likewise.
16580         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16582 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16584         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16585         TYPE_DECLs.
16587 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16589         * cp-tree.h (PTRMEM_OK_P): New macro.
16590         (itf_ptrmem_ok): New enumeration value.
16591         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16592         argument. Diagnose implicit pointer to member.
16593         (instantiate_type): Don't diagnose implicit pointer to member
16594         here. Pass itf_ptrmem_ok if ok. Adjust calls to
16595         resolve_address_of_overloaded_function.
16596         * init.c (build_offset_ref): Set PTRMEM_OK_P.
16597         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16598         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16599         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16600         (build_unary_op): Deal with single non-static member in
16601         microsoft-land.
16603 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16605         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16607 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16609         * cp-tree.h (enum_name_string): Remove prototype.
16610         (report_case_error): Remove prototype.
16611         * cp/typeck2.c (enum_name_string): Remove.
16612         (report_case_error): Remove.
16613         * error.c (dump_expr): Deal with enum values directly.
16614         Correctly negate integer constant.
16616 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16618         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16619         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16620         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16621         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16622         (__cxa_vec_new): Use __cxa_vec_new2.
16623         (__cxa_vec_delete): Use __cxa_vec_delete2.
16625 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16627         * vec.cc (__cxa_vec_new): Set "C" linkage.
16628         (__cxa_vec_ctor): Likewise.
16629         (__cxa_vec_cctor): Likewise.
16630         (__cxa_vec_dtor): Likewise.
16631         (__cxa_vec_delete): Likewise.
16632         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16633         (__cxa_vec_ctor): Likewise.
16634         (__cxa_vec_cctor): Likewise.
16635         (__cxa_vec_dtor): Likewise.
16636         (__cxa_vec_delete): Likewise.
16638 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16640         * class.c (instantiate_type): Reinstate local variable
16641         deleted in previous change.
16643         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16644         itf_no_attributes.
16646 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16648         * cp-tree.h (instantiate_type_flags): New enumeration.
16649         (instantiate_type): Change parameter.
16650         * class.c (instantiate_type): Adjust prototype. Adjust.
16651         * call.c (standard_conversion): Adjust instantiate_type call.
16652         (reference_binding): Likewise.
16653         (build_op_delete_call): Likewise.
16654         (convert_like_real): Likewise.
16655         * cvt.c (cp_convert_to_pointer): Likewise.
16656         (convert_to_reference): Likewise.
16657         * pt.c (convert_nontype_argument): Likewise.
16658         * typeck.c (build_binary_op): Likewise.
16659         (build_ptrmemfunc): Likewise.
16660         (convert_for_assignment): Likewise.
16662 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16664         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16665         (current_aggr): Define.
16666         * decl.c (grokdeclarator): Make sure a friend class is an
16667         elaborated type specifier.
16668         * parse.y (current_aggr): Remove static definition.
16669         (cp_parse_init): Adjust.
16670         (structsp): Clear and restore current_aggr.
16671         (component_decl_list): Clear current_aggr.
16673         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16674         aggregate tag on the typename's context.
16676         * pt.c (tsubst_friend_class): Return error_mark_node, if
16677         parms becomes NULL.
16678         (instantiate_class_template): Ignore error_mark_node friend types.
16680 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
16682         * cvt.c (warn_ref_binding): New static function, broken out of ...
16683         (convert_to_reference): ... here. Use it.
16685 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16687         * parse.y (template_arg): Add rule for template qualified with
16688         global scope.
16690 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16692         * decl2.c (add_function): Reorganize.
16693         (arg_assoc): Do not consider function template decls.
16695 2000-08-11  Jason Merrill  <jason@redhat.com>
16697         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16698         looking inside.
16700 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16702         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16703         (lookup_nested_tag): Likewise.
16705         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16706         can be produced.
16708 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16710         * parse.y (named_complex_class_head_sans_basetype): Remove
16711         always true if.
16713 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16715         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16716         explicit TEMPLATE_ID_EXPR args.
16717         (build_expr_from_tree, case CALL_EXPR): Likewise.
16719 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16721         * decl.c (check_tag_decl): Diagnose typename's which don't
16722         declare anything.
16724 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
16726         * init.c (build_aggr_init): Reject bogus array initializers
16727         early.
16729 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16731         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16732         runtime.
16733         * cp/tinfo.cc (__dynamic_cast): Likewise.
16734         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16736 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16738         * cvt.c (convert_to_pointer_force): Fix error message when
16739         attempting to cast from ambiguous base.
16741 2000-08-08  Jason Merrill  <jason@redhat.com>
16743         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16744         (tsubst_template_arg_vector): Likewise.
16746         * decl2.c (build_anon_union_vars): Choose the largest field; don't
16747         assume that one will be as large as the union.
16749 2000-08-07  Kazu Hirata  <kazu@hxi.com>
16751         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16752         * decl.c (pop_labels): Likewise.
16754 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
16756         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16757         specifications.
16758         (__pointer_to_member_type_info): Likewise.
16759         (__base_class_info): Likewise.
16760         (__class_type_info): Likewise.
16761         (__si_class_type_info): Likewise.
16762         (__vmi_class_type_info): Likewise.
16763         * tinfo.cc (__si_class_type_info::__do_find_public_src):
16764         Changed member names to match specifications.
16765         (__vmi_class_type_info::__do_find_public_src): Likewise.
16766         (__si_class_type_info::__do_dyncast): Likewise.
16767         (__vmi_class_type_info::__do_dyncast): Likewise.
16768         (__si_class_type_info::__do_upcast): Likewise.
16769         (__vmi_class_type_info::__do_upcast): Likewise.
16770         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16771         (__pbase_type_info::__pointer_catch): Likewise.
16772         (__pointer_type_info::__pointer_catch): Likewise.
16773         (__pointer_to_member_type_info::__pointer_catch): Likewise.
16775 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
16777         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16778         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16779         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16781 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
16783         * cp-tree.h (add_method): Change prototype.
16784         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
16785         Don't double the size of the method vector in the error case.
16786         (handle_using_decl): Adjust call to add_method.
16787         (add_implicitly_declared_members): Likewise.
16788         (clone_function_decl): Likewise.
16789         * decl2.c (check_classfn): Likewise.
16790         * semantics.c (finish_member_declaration): Likewise.
16792 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
16794         * decl.c (flag_isoc94): New variable.
16796 2000-08-02  Jason Merrill  <jason@redhat.com>
16798         * pt.c (do_type_instantiation): Add complain parm; don't complain
16799         if called recursively.
16800         * cp-tree.h, parse.y: Adjust.
16802 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
16804         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16805         -Wno-strict-prototypes.
16807         * g++spec.c: Adjust type of second argument to
16808         lang_specific_driver, and update code as necessary.
16810         * cp-tree.h: Don't prototype min_precision here.
16811         (my_friendly_assert): Cast expression to void.
16812         * semantics.c (do_poplevel): Initialize scope_stmts.
16814 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
16816         * cp-tree.h (DECL_NEEDED_P): Tweak.
16818 2000-07-28  Jason Merrill  <jason@redhat.com>
16820         * lang-specs.h: Use %i in rule for .ii files.
16822 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
16824         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16826 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
16828         Allow indirect primary bases.
16829         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
16830         primary_base.
16831         (CLASSTYPE_VFIELD_PARENT): Remove.
16832         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16833         (BINFO_PRIMARY_BINFO): Remove.
16834         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16835         (BINFO_VBASE_PRIMARY_P): Likewise.
16836         (BINFO_PRIMARY_BASE_OF): New macro.
16837         (BINFO_INDIRECT_PRIMARY_P): Likewise.
16838         (get_primary_binfo): New function.
16839         * decl.c (lang_mark_tree): Make lang_type::primary_base.
16840         * class.c (vcall_offset_data_s): Rename to ...
16841         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
16842         and add ctor_vtbl_p.
16843         (get_derived_offset): Use get_primary_binfo.
16844         (dfs_mark_primary_bases): Adjust handling of virtual primary
16845         bases.
16846         (mark_primary_bases): Likewise.
16847         (set_primary_base): Take a binfo, not an integer, as a
16848         representation of the primary base.
16849         (indirect_primary_base_p): Remove.
16850         (determine_primary_base): Adjust for indirect primary bases.
16851         (dfs_find_final_overrider): Fix typo in coment.
16852         (update_vtable_entry_for_fn): Use get_primary_binfo.
16853         (layout_nonempty_base_or_field): Tweak.
16854         (build_base_fields): Adjust for new primary base semantics.
16855         (dfs_propagate_binfo_offsets): Remove.
16856         (propagate_binfo_offsets): Rewrite.
16857         (dfs_set_offset_for_shared_vbases): Remove.
16858         (layout_virtual_bases): Don't use it.
16859         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16860         ABI.
16861         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16862         CLASSTYPE_VFIELD_PARENT.
16863         (dfs_get_primary_binfo): New function.
16864         (get_primary_binfo): Likewise.
16865         (dump_class_hierarchy_r): Tweak printing of primary bases.
16866         (build_vtbl_initializer): Fix typo in comments.  Use
16867         vtbl_init_data.
16868         (build_vcall_and_vbase_vtbl_entries): Likewise.
16869         (build_vbaes_offset_vtbl_entries): Likewise.
16870         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16871         BV_VCALL_INDEX to handle indirect primary bases.
16872         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16873         (build_rtti_vtbl_entries): Likewise.
16874         * search.c (get_shared_vbase_if_not_primary): Tweak.
16875         (find_vbase_instance): Likewise.
16876         (binfo_for_vtable): Simplify.
16877         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16878         (make_binfo): Make it have 11 entries.
16880 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
16882         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16883         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16884         ascertaining primaryness.
16885         (G): Remove template_args.
16886         (decl_is_template_id): New function.
16887         (write_encoding): Use decl_is_template_id.
16888         (write_name): Likewise.  Handle type_decls.  Get main variant of
16889         type decls.
16890         (write_nested_name): Likewise.
16891         (write_prefix): Likewise.
16892         (write_template_prefix): Likewise.
16893         (write_special_name_constructor): Remove defunct production from
16894         comment.
16895         (write_bare_function_type): Remove comment about absent parameter.
16896         (write_template_template_arg): Add missing grammar production to
16897         comment.
16899 2000-07-27  Jason Merrill  <jason@redhat.com>
16901         * decl.c (duplicate_decls): If common_type produces a non-typedef
16902         type for a typedef, just use the old type.
16904 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
16906         * cp-tree.h (function_depth): Declare.
16907         (verify_stmt_tree): Likewise.
16908         (find_tree): Likewise.
16909         * decl.c (function_depth): Give it external linkage.
16910         * optimize.c (optimize_function): Increment and decrement it.
16911         * tree.c (verify_stmt_tree_r): New function.
16912         (verify_stmt_tree): Likewise.
16913         (find_tree_r): Likewise.
16914         (find_tree): Likewise.
16916 2000-07-27  Jason Merrill  <jason@redhat.com>
16918         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16919         TYPE_PTRMEMFUNC_P.
16920         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16922 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16924         * decl.c (start_cleanup_fn): Mark the function as `inline'.
16925         * decl2.c (get_guard): Call cp_finish_decl, not
16926         rest_of_decl_compilation, for local guards.
16927         * lex.c (do_identifier): Remove unused variable.
16929 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
16931         * parse.y:  Add missing ';'.
16933 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16935         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16936         of `extern "C++"'.
16938 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16940         Kill strict_prototype. Backwards compatibility only for
16941         non NO_IMPLICIT_EXTERN_C systems.
16942         * cp-tree.h (flag_strict_prototype): Remove.
16943         (strict_prototype): Remove.
16944         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16945         * decl.c (maybe_push_to_top_level): Adjust.
16946         (pop_from_top_level): Adjust.
16947         (decls_match): Only allow sloppy parm matching for ancient
16948         system headers.
16949         (init_decl_processing): Adjust.
16950         (grokdeclarator): Adjust.
16951         * decl2.c (flag_strict_prototype): Remove.
16952         (strict_prototype): Remove.
16953         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16954         (lang_f_options): Remove "strict-prototype".
16955         (unsupported-options): Add "strict-prototype".
16956         * lex.c (do_identifier): Adjust.
16957         (do_scoped_id): Adjust.
16958         * parse.y (empty_parms): Adjust.
16959         * class.c (push_lang_context): Adjust.
16960         (pop_lang_context): Adjust.
16961         * typeck.c (comp_target_parms): Adjust.
16963 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16965         * decl.c (poplevel): Deal with anonymous variables at for scope.
16966         (maybe_inject_for_scope_var): Likewise.
16968 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
16970         * decl.c: Remove all signal handling code, now done in toplev.c.
16972 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
16974         * decl.c (make_rtl_for_nonlocal_decl): Rework.
16976         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16977         correctly.
16979 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
16981         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16982         Define my_friendly_assert and my_friendly_abort as macros
16983         which may call friendly_abort.  Prototype friendly abort, not
16984         my_friendly_abort or my_friendly_assert.
16985         * decl.c (signal_catch): Report the signal caught in the error
16986         message.  Call fatal directly.
16987         * typeck2.c (ack, my_friendly_assert): Delete.
16988         (my_friendly_abort): Rename to friendly_abort.  Expect file,
16989         line, and function parameters.  Report the abort code, then
16990         call fancy_abort.  Do not mask an abort if errors have
16991         already occurred.
16993 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
16995         * typeck.c (comp_target_parms): Remove obsolete parameter.
16996         (comp_target_types): Adjust.
16998 2000-07-17  Jason Merrill  <jason@redhat.com>
17000         * typeck.c (mark_addressable): Never set TREE_USED.
17001         * call.c (build_call): Don't abort on calls to library functions
17002         that have been declared normally.
17004         * typeck.c (build_binary_op): Fix grammar in warning.
17006         * exception.cc (__eh_free): Fix prototype.
17008         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
17010         * decl.c (pushdecl): Handle seeing an OVERLOAD in
17011         IDENTIFIER_NAMESPACE_VALUE.
17013 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
17015         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
17016         * method.c (use_thunk): Correct handling of vcall offsets.
17018 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
17020         * .cvsignore: parse.h and parse.c have no cp- prefix.
17022 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
17024         * .cvsignore: New file.
17026 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
17028         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
17030 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
17032         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
17033         * parse.c: Remove.
17034         * parse.h: Likewise.
17036 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
17038         * class.c (layout_class_type): Add pointers to virtual bases after
17039         base classes under the old ABI.
17041 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
17043         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
17044         (finish_continue_stmt): Likewise.
17045         (begin_for_stmt): Remove call to note_level_for_for.
17046         (finish_goto_stmt): Change call from build_min_nt
17047         to build_stmt.
17048         (finish_expr_stmt): Likewise.
17049         (begin_if_stmt): Likewise.
17050         (begin_while_stmt): Likewise.
17051         (finish_while_stmt): Likewise.
17052         (finish_return_stmt): Likewise.
17053         (begin_for_stmt): Likewise.
17054         (finish_for_stmt): Likewise.
17055         (finish_break_stmt): Likewise.
17056         (begin_switch_stmt): Likewise.
17057         (finish_case_label): Likewise.
17058         (genrtl_try_block): Likewise.
17059         (begin_try_block): Likewise.
17060         (begin_handler): Likewise.
17061         (begin_compound_stmt): Likewise.
17062         (finish_asm_stmt): Likewise.
17063         (finish_label_stmt): Likewise.
17064         (add_decl_stmt): Likewise.
17065         (finish_subobject): Likewise.
17066         (finish_decl_cleanup): Likewise.
17067         (finish_named_return_value): Likewise.
17068         (setup_vtbl_ptr): Likewise.
17069         (add_scope_stmt): Likewise.
17070         * decl.c (finish_constructor_body): Likewise.
17071         (finish_destructor_body): Likewise.
17072         * optimize.c (copy_body_r): Likewise.
17073         (initialize_inlined_parameters): Likewise.
17074         (declare_return_variable): Likewise.
17075         (expand_call_inline): Likewise.
17077 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
17079         * semantics.c (expand_body): Sync interface information
17080         at the end of function body expansion.
17082 2000-07-09  Jason Merrill  <jason@redhat.com>
17084         * init.c (build_new_1): Bail early if the call to new fails.
17086         * decl.c (compute_array_index_type): Check specifically for
17087         an INTEGER_CST, not just TREE_CONSTANT.
17089         * decl.c (duplicate_decls): Don't call duplicate_decls on
17090         the DECL_TEMPLATE_RESULT.
17091         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17092         codes.
17094         * error.c (dump_template_bindings): Don't crash if we had an
17095         invalid argument list.
17097         * typeck.c (c_expand_start_case): Do narrowing here.
17098         * semantics.c (finish_switch_cond): Not here.
17100 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
17102         * parse.y (asm_clobbers): Do string concatenation.
17104 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
17106         * decl.c (pushtag): Don't put local classes in template functions
17107         on the local_classes list.
17109 2000-07-04  Scott Snyder  <snyder@fnal.gov>
17111         * decl2.c (get_guard): Add missing return for old ABI local
17112         variable case.
17114 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
17116         * cp-tree.h (char_type_p): New function.
17117         * decl.c (init_decl_processing): Don't initialize
17118         signed_wchar_type_node or unsigned_wchar_type_node.
17119         (complete_array_type): Handle brace-enclosed string-constants.
17120         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17121         * tree.c (char_type_p): New function.
17122         * typeck2.c (digest_init): Use char_type_p.
17124 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
17126         * pt.c (tsubst): Don't layout type, if it's error_mark.
17128 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
17130         * pt.c (instantiate_pending_templates): Reset template level.
17132 2000-07-05  Jason Merrill  <jason@redhat.com>
17134         * call.c (joust): Don't complain about `operator char *()' beating
17135         `operator const char *() const'.
17137 2000-07-04  scott snyder  <snyder@fnal.gov>
17138             Jason Merrill  <jason@redhat.com>
17140         * repo.c (repo_get_id): Handle the case where a class with virtual
17141         bases has a null TYPE_BINFO_VTABLE.
17143 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
17144             Jason Merrill  <jason@redhat.com>
17146         * parse.y (member_init): Just pass in the type.
17147         * init.c (expand_member_init): Handle getting a type.
17149 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17150             Jason Merrill  <jason@redhat.com>
17152         * decl.c (finish_function): Warn if a function has no return
17153         statement.
17154         Suggested by Andrew Koenig.
17155         * typeck.c (check_return_expr): Do set current_function_returns_value
17156         if we got an error_mark_node.
17158 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
17160         * decl2.c (push_decl_namespace): Push the original namespace.
17162 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
17164         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17165         * semantics.c (begin_class_definition): Clear it.
17167 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
17169         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17170         (genrtl_expr_stmt): Likewise.
17171         (genrtl_decl_stmt): Likewise.
17172         (genrtl_if_stmt): Likewise.
17173         (genrtl_while_stmt): Likewise.
17174         (genrtl_do_stmt): Likewise.
17175         (genrtl_return_stmt): Likewise.
17176         (genrtl_for_stmt): Likewise.
17177         (genrtl_break_stmt): Likewise.
17178         (genrtl_continue_stmt): Likewise.
17179         (genrtl_scope_stmt): Likewise.
17180         (genrtl_switch_stmt): Likewise.
17181         (genrtl_case_label): Likewise.
17182         (genrtl_begin_compound_stmt): Likewise.
17183         (genrtl_finish_compound_stmt): Likewise.
17184         (genrtl_compound_stmt): Likewise.
17185         (genrtl_asm_stmt): Likewise.
17187         * init.c (begin_init_stmts): Remove call to
17188         genrtl_begin_compound_stmt.
17189         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17191         * semantics.c (lang_expand_stmt): Changed call to
17192         genrtl_compound_stmt to ignore return value.
17194 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
17196         * mangle.c (canonicalize_for_substitution): Return the canonical
17197         variant of a type.
17199         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17200         TYPE_DECL.
17201         * typeck.c (commonparms): Remove obstack manipulations.
17203 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
17205         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17207         * Makefile.in (OBJS): Added ../c-semantics.o.
17208         (OBJDEPS): Likewise.
17210         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17211         ../c-common.h.
17212         (struct stmt_tree): Added comment.
17213         (current_function_name_declared): Removed.
17214         (stmts_are_full_exprs_p): Likewise.
17215         (genrtl_do_pushlevel): Likewise.
17216         (genrtl_clear_out_block): Likewise.
17217         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17218         (DECL_ANON_UNION_ELEMS): Likewise.
17219         (emit_local_var): Likewise.
17220         (make_rtl_for_local_static): Likewise.
17221         (do_case): Likewise.
17222         (expand_stmt): Likewise.
17223         (genrtl_decl_cleanup): Likewise.
17224         (c_expand_asm_operands): Likewise.
17225         (c_expand_return): Likewise.
17226         (c_expand_start_case): Likewise.
17228         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17229         (emit_local_var): Likewise.
17230         (initialize_local_var): Change reference to
17231         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17232         Change reference to stmts_are_full_exprs_p to
17233         current_stmt_tree->stmts_are_full_exprs_p.
17234         (push_cp_function_context): Likewise.
17236         * expect.c (expand_throw): Change reference to
17237         stmts_are_full_exprs_p.
17239         * init.c (build_aggr_init): Change reference to
17240         stmts_are_full_exprs_p.
17241         (build_vec_init): Likewise.
17243         * optimize.c (maybe_clone_body): Change reference to
17244         current_function_name_declared to
17245         cp_function_chain->name_declared.
17247         * pt.c (instantiate_decl): Change reference to
17248         current_function_name_declared to
17249         cp_function_chain->name_declared.
17251         * semantics.c (expand_cond): Moved declaration to c-common.h.
17252         (genrtl_do_pushlevel): Moved to c-semantics.c.
17253         (genrtl_clear_out_block): Likewise.
17254         (genrtl_goto_stmt): Likewise.
17255         (genrtl_expr_stmt): Likewise.
17256         (genrtl_decl_stmt): Likewise.
17257         (gerntl_if_stmt): Likewise.
17258         (genrtl_while_stmt): Likewise.
17259         (genrtl_do_stmt): Likewise.
17260         (genrtl_return_stmt): Likewise.
17261         (genrtl_for_stmt): Likewise.
17262         (genrtl_break_stmt): Likewise.
17263         (genrtl_continue_stmt): Likewise.
17264         (genrtl_scope_stmt): Likewise.
17265         (genrtl_switch_stmt): Likewise.
17266         (genrtl_case_label): Likewise.
17267         (genrtl_begin_compound_stmt): Likewise.
17268         (genrtl_finish_compound_stmt): Likewise.
17269         (genrtl_compound_stmt): Likewise.
17270         (genrtl_asm_stmt): Likewise.
17271         (genrtl_decl_cleanup): Likewise.
17272         (expand_cond): Likewise.
17273         (expand_stmt): Renamed to ...
17274         (lang_expand_stmt): ... this.
17275         (lang_expand_expr_stmt): Initialize.
17276         (set_current_function_name_declared): Likewise.
17277         (stmts_are_full_exprs_p): Likewise.
17278         (current_function_name_declared): Likewise.
17279         (anon_aggr_type_p): Likewise.
17280         (do_poplevel): Change reference to
17281         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17282         Change reference to stmts_are_full_exprs_p to
17283         current_stmt_tree->stmts_are_full_exprs_p.
17284         (add_tree): Likewise.
17285         (finish_expr_stmt): Likewise.
17286         (prep_stmt): Likewise.
17287         (lang_expand_stmt): Likewise.
17288         (begin_compound_stmt): Change reference to
17289         current_function_name_declared to
17290         cp_function_chain->name_declared and call to
17291         current_function_name_declared().
17292         (setup_vtbl_ptr): Likewise.
17293         (genrtl_do_poplevel): Removed.
17295 2000-06-30  Jason Merrill  <jason@redhat.com>
17297         * init.c (init_init_processing): Go back to aligning like
17298         double_type_node for old ABI.
17299         (get_cookie_size): Make cookie larger if we get a type that needs
17300         more alignment.
17301         (build_vec_delete): Call it.
17303         * typeck.c (qualify_type_recursive): New fn.
17304         (composite_pointer_type): Use it.
17305         (build_binary_op): Use composite_pointer_type.
17307 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
17308             Jason Merrill  <jason@redhat.com>
17310         * typeck.c (check_return_expr): Don't complain about returning
17311         NULL from operator new if -fcheck-new.
17312         * cp-tree.h: Declare flag_check_new here.
17313         * init.c: Not here.
17315 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
17317         * mangle.c (find_substitution): Use same_type_p.
17318         (write_encoding): Don't check for substitutions.
17320 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
17322         * parse.y (expr_no_comma_rangle): New non-terminal.
17323         (template_parm): Use it for default parameter case.
17324         (template_arg): Use it.
17325         (expr_no_commas): Remove commented out undefined extensions.
17326         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17327         * parse.h, parse.c: Rebuilt.
17329 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
17331         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17332         (finish_asm_stmt): Do it here, instead.
17334         * cp-tree.h (ridpointers): Don't declare.
17335         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17336         (record_builtin_java_type): Likewise.
17337         (init_decl_processing): Likewise.
17338         * lex.c: Move inclusion of lex.h.
17339         (ridpointers): Don't define.
17340         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
17341         RID_MAX.
17342         * lex.h (enum rid): Rename to ...
17343         (enum cp_rid): ... this.
17344         (ridpointers): Don't declare.
17345         * parse.y: Move inclusion of lex.h.
17346         * parse.c: Regenerated.
17347         * spew.c: Move inclusion of lex.h.
17349         * cp-tree.h (struct language_function): Remove temp_name_counter.
17350         (temp_name_counter): Remove.
17351         (get_temp_name): Change prototype.
17352         (get_guard): New function.
17353         (get_guard_cond): Likewise.
17354         (set_guard): Likewise.
17355         * cvt.c (build_up_reference): Adjust call to get_temp_name.
17356         * decl.c (expand_static_init): Use get_guard and friends to
17357         implement guard variables.
17358         * decl2.c (get_temp_name): Assume that the variables created are
17359         always static.
17360         (get_sentry): Rename to ...
17361         (get_guard): ... this.  Implement new ABI guard variables.
17362         (get_guard_bits): New function.
17363         (get_guard_cond): Likewise.
17364         (set_guard): Likewise.
17365         (start_static_initialization_or_destruction): Use them.
17366         (do_static_initialization): Replace sentry with guard throughout.
17367         (do_static_destruction): Likewise.
17368         * init.c (create_temporary_var): Add comment.
17370 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
17372         * mangle.c (find_substitution): Use same_type_p.
17373         (write_encoding): Don't check for substitutions.
17375 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
17377         * parse.y (expr_no_comma_rangle): New non-terminal.
17378         (template_parm): Use it for default parameter case.
17379         (template_arg): Use it.
17380         (expr_no_commas): Remove commented out undefined extensions.
17381         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17382         * parse.h, parse.c: Rebuilt.
17384 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
17386         * cp-tree.h (flag_const_strings): Remove.
17387         (warn_parentheses): Likewise.
17388         (warn_format): Likewise.
17389         (common_type): Likewise.
17390         (default_conversion): Likewise.
17391         (build_binary_op): Likewise.
17392         (cp_build_binary_op): New macro.
17393         * call.c (build_new_op): Use cp_build_binary_op instead of
17394         build_binary_op.
17395         * class.c (build_vtable_entry_ref): Likewise.
17396         * decl.c (expand_static_init): Likewise.
17397         (compute_array_index_type): Likewise.
17398         (build_enumerator): Likewise.
17399         * decl2.c (delete_sanity): Likewise.
17400         (start_static_initialization_or_destruction): Likewise.
17401         * error.c (dump_type_suffix): Likewise.
17402         * init.c (resolve_offset_ref): Likewise.
17403         (build_new): Likewise.
17404         (build_new_1): Likewise.
17405         (build_vec_delete_1): Likewise.
17406         (build_vec_init): Likewise.
17407         (build_delete): Likewise.
17408         * rtti.c (synthesize_tinfo_fn): Likewise.
17409         (synthesize_tinfo_var): Likewise.
17410         * search.c (expand_upcast_fixups): Likewise.
17411         (fixup_all_virtual_upcast_offsets): Likewise.
17412         * typeck.c (build_array_ref): Likewise.
17413         (get_member_function_from_ptrfunc): Likewise.
17414         (build_binary_op): Add parameter.
17415         (pointer_int_sum): Use cp_build_binary_op.
17416         (pointer_diff): Likewise.
17417         (build_modify_expr): Likewise.
17418         (get_delta_difference): Likewise.
17419         (build_ptrmemfunc): Likewise.
17421 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
17423         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17424         * decl.c (create_implicit_typedef): Adjust.
17425         * decl2.c (build_artificial_parm): Adjust.
17426         * method.c (implicitly_declare_fn): Adjust.
17427         * pt.c (push_inline_template_parms_recursive): Adjust.
17428         (process_template_parm): Adjust.
17429         (overloaded_template_name): Adjust.
17430         * semantics.c (finish_template_template_parm): Adjust.
17432 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
17434         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17435         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17436         where to emit thunks.
17437         (build_vtt): Adjust call to build_vtt_inits.
17438         (build_vtt_inits): Add parameter to indicate whether or not
17439         sub-VTTs for virtual bases should be included.  Adjust handling of
17440         construction vtables.
17441         (get_matching_base): New function.
17442         (dfs_build_vtt_inits): Rename to ...
17443         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17444         construction vtables.
17445         (dfs_fixup_binfo_vtbls): Likewise.
17446         (build_ctor_vtbl_groups): Build construction vtables for virtual
17447         bases, too.
17448         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17449         to build construction vtbls.
17450         (dfs_accumulate_vtbl_inits): Adjust handling of
17451         construction vtables.
17453         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17454         types correctly.
17456 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
17458         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17460 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17462         * search.c (hides): Remove.
17463         (is_subobject_of_p): Add most_derived parameter. Use
17464         CANONICAL_BINFO.
17465         (lookup_field_queue_p): Adjust.
17466         (lookup_field_r): Adjust.
17468 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17470         * decl2.c (handle_class_head): Bash typedefs to the type's main
17471         decl.
17473 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
17475         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17476         (begin_global_stmt_expr): ... this.
17477         (genrtl_finish_stmt_expr): Rename to ...
17478         (finish_global_stmt_expr): ... this.
17479         * init.c (begin_init_stmts): Adjust calls.
17480         (finish_init_stmts): Likewise.
17481         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17482         (begin_global_stmt_expr): ... this.
17483         (genrtl_finish_stmt_expr): Rename to ...
17484         (finish_global_stmt_expr): ... this.
17486 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17488         * search.c (lookup_member): Fix typo in comment.
17490 2000-06-24  Jason Merrill  <jason@redhat.com>
17492         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17493         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17495 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17497         * parse.y (complex_direct_notype_declarator): Support global_scope.
17498         * Makefile.in: Adjust conflict count.
17500 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17502         * parse.y (template_arg): Convert TEMPLATE_DECL
17503         that is a template template parameter to
17504         TEMPLATE_TEMPLATE_PARM here.
17506         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17507         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17508         (copy_template_template_parm): Adjust prototype.
17509         * decl.c (grokdeclarator): Remove dead code.
17510         * pt.c (process_template_parm): Tidy.
17511         (lookup_template_class): Construct nodes in
17512         copy_template_template_parm.
17513         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17514         lookup_template_class.  Use TYPE_TI_TEMPLATE.
17515         * tree.c (copy_template_template_parm): Add NEWARGS
17516         parameter.
17517         (mapcar): Adjust call to copy_template_template_parm.
17518         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17519         * method.c (build_template_template_parm_names): Change error
17520         code to avoid compilation warning.
17522         * gxxint.texi: Document template template parameter
17523         name mangling.
17525 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
17527         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17528         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17529         (cp-demangle.o): New rule.
17530         (dyn-string.o): Likewise.
17531         * inc/cxxabi.h (__cxa_demangle): New declaration.
17533 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
17535         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17536         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17537         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
17538         a tree, not an int.
17539         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17540         (make_thunk): Change prototype.
17541         (emit_thunk): Rename to use_thunk.
17542         (mangle_thunk): Change prototype.
17543         * class.c (get_derived_offset): Simplify.
17544         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17545         BV_GENERATE_THUNK_WITH_VTABLE_P.
17546         (build_primary_vtable): Simplify.
17547         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17548         (dfs_find_base): Remove.
17549         (update_vtable_entry_for_fn): Correct bug in finding the base
17550         where a virtual function was first declared.  Figure out whether
17551         or not to emit a vcall-thunk with the vtables in which it appears.
17552         Correct logic for deciding whether to use an ordinary thunk, or a
17553         vcall thunk.
17554         (finish_struct_1): Remove unnecssary code.
17555         (build_vtbl_initializer): Use ssize_int for the running counter of
17556         negative indices.
17557         (build_vtbl_initializer): Only use vcall thunks where necessary.
17558         Mark thunks as needing to be emitted with their vtables, or not.
17559         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17560         indices.  Use size_binop.
17561         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17562         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
17563         size_binop.
17564         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17565         (build_vtable_entry): Mark thunks as needing to be emitted with
17566         their vtables, or not.
17567         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17568         * decl2.c (mark_vtable_entries): Use use_thunk instead of
17569         emit_thunk.
17570         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
17571         information.
17572         * error.c (dump_expr): Use BV_FN.
17573         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17574         not an int.
17575         * method.c (make_thunk): Likewise.
17576         (emit_thunk): Rename to use_thunk.  Allow callers to decide
17577         whether or not to actually emit the thunk.  Adjust for changes in
17578         representation of vcall offsets.
17579         * search.c (dfs_get_pure_virtuals): Use BV_FN.
17580         * semantics.c (emit_associated_thunks): New function.
17581         (expand_body): Use it.
17582         * ir.texi: Adjust decriptions of thunks.
17584 2000-06-22  Jason Merrill  <jason@redhat.com>
17586         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17587         (tsubst_friend_function): Copy it here.
17589         * decl.c (grok_op_properties): Fix typo.
17591         * decl2.c (delete_sanity): Clarify warning, avoid failure on
17592         deleting void*.
17594         * pt.c (check_explicit_specialization): Clarify error.
17596         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17597         an old OVERLOAD when we're declaring a non-function.
17598         (pushdecl, destroy_local_var): Check for error_mark_node.
17599         (warn_extern_redeclared_static): Also bail early if
17600         we're a CONST_DECL.
17601         (push_overloaded_decl): Ignore an old error_mark_node.
17603 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
17605         * call.c (build_x_va_arg): Check if in a template decl.
17606         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17608 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17610         * class.c (push_lang_context): TYPE_NAME gets you to the Java
17611         types DECLs.
17612         * decl.c (check_goto): Computed gotos assumed OK.
17614 2000-06-20  Jason Merrill  <jason@redhat.com>
17616         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17617         for which we don't need to look for instantiations.
17619 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
17621         * parse.y (program): Always call finish_translation_unit.
17622         * parse.c, parse.h: Rebuilt.
17624 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
17626         * method.c: Don't include hard-reg-set.h.
17628 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17630         * rtti.c (get_base_offset): Cope when vbase field is in a base.
17632 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17634         * call.c (build_conditional_expr): Use VOID_TYPE_P.
17635         * cvt.c (cp_convert_to_pointer): Likewise.
17636         (convert_to_void): Likewise.
17637         * error.c (dump_expr): Likewise.
17638         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17639         * init.c (build_delete): Likewise.
17640         * method.c (emit_thunk): Likewise.
17641         * optmize.c (declare_return_variable): Likewise.
17642         * rtti.c (get_tinfo_decl_dynamic): Likewise.
17643         (get_typeid): Likewise.
17644         (build_dynamic_cast_1): Likewise.
17645         * typeck.c (composite_pointer_type): Likewise.
17646         (common_type): Likewise.
17647         (build_indirect_ref): Likewise.
17648         (build_binary_op): Likewise.
17649         (build_x_compound_expr): Likewise.
17650         (check_return_expr): Likewise.
17651         * typeck2.c (add_exception_specifier): Likewise.
17653         * mangle.c (write_method_parms): Use direct comparison for end
17654         of parmlist.
17656 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
17658         * cp-tree.h (genrtl_try_block): Declare function.
17659         (genrtl_handler): Likewise.
17660         (genrtl_catch_block): Likewise.
17661         (genrtl_ctor_stmt): Likewise.
17662         (genrtl_subobject): Likewise.
17663         (genrtl_decl_cleanup): Likewise.
17664         (genrtl_do_poplevel): Likewise.
17665         (genrtl_do_pushlevel): Likewise.
17666         (genrtl_clear_out_block): Likewise.
17667         (genrtl_goto_stmt): Likewise.
17668         (genrtl_expr_stmt): Likewise.
17669         (genrtl_decl_stmt): Likewise.
17670         (genrtl_if_stmt): Likewise.
17671         (genrtl_while_stmt): Likewise.
17672         (genrtl_do_stmt): Likewise.
17673         (genrtl_return_stmt): Likewise.
17674         (genrtl_for_stmt): Likewise.
17675         (genrtl_break_stmt): Likewise.
17676         (genrtl_continue_stmt): Likewise.
17677         (genrtl_scope_stmt): Likewise.
17678         (genrtl_switch_stmt): Likewise.
17679         (genrtl_case_label): Likewise.
17680         (genrtl_begin_compound_stmt): Likewise.
17681         (genrtl_finish_compound_stmt): Likewise.
17682         (genrtl_compound_stmt): Likewise.
17683         (genrtl_asm_stmt): Likewise.
17684         (genrtl_named_return_value): Likewise.
17685         (genrtl_begin_stmt_expr): Likewise.
17686         (genrtl_finish_stmt_expr): Likewise.
17687         (finish_for_stmt): Removed first argument.
17688         (finish_switch_stmt): Likewise.
17690         * semantics.c (genrtl_try_block): Define function.
17691         (genrtl_handler): Likewise.
17692         (genrtl_catch_block): Likewise.
17693         (genrtl_ctor_stmt): Likewise.
17694         (genrtl_subobject): Likewise.
17695         (genrtl_decl_cleanup): Likewise.
17696         (genrtl_do_poplevel): Likewise.
17697         (genrtl_do_pushlevel): Likewise.
17698         (genrtl_clear_out_block): Likewise.
17699         (genrtl_goto_stmt): Likewise.
17700         (genrtl_expr_stmt): Likewise.
17701         (genrtl_decl_stmt): Likewise.
17702         (genrtl_if_stmt): Likewise.
17703         (genrtl_while_stmt): Likewise.
17704         (genrtl_do_stmt): Likewise.
17705         (genrtl_return_stmt): Likewise.
17706         (genrtl_for_stmt): Likewise.
17707         (genrtl_break_stmt): Likewise.
17708         (genrtl_continue_stmt): Likewise.
17709         (genrtl_scope_stmt): Likewise.
17710         (genrtl_switch_stmt): Likewise.
17711         (genrtl_case_label): Likewise.
17712         (genrtl_begin_compound_stmt): Likewise.
17713         (genrtl_finish_compound_stmt): Likewise.
17714         (genrtl_compound_stmt): Likewise.
17715         (genrtl_asm_stmt): Likewise.
17716         (genrtl_named_return_value): Likewise.
17717         (genrtl_begin_stmt_expr): Likewise.
17718         (genrtl_finish_stmt_expr): Likewise.
17719         (finish_for_stmt): Removed first argument and generate rtl
17720         specific code.
17721         (finish_switch_stmt): Likewise.
17722         (do_poplevel): Removed generate rtl specific code.
17723         (do_pushlevel): Likewise.
17724         (add_tree): Likewise.
17725         (finish_goto_stmt): Likewise.
17726         (finish_expr_stmt): Likewise.
17727         (begin_if_stmt): Likewise.
17728         (finish_if_stmt_cond): Likewise.
17729         (finish_then_clause): Likewise.
17730         (begin_else_clause): Likewise.
17731         (finish_else_clause): Likewise.
17732         (finish_if_stmt): Likewise.
17733         (clear_out_block): Likewise.
17734         (begin_while_stmt): Likewise.
17735         (finish_while_stmt_cond): Likewise.
17736         (finish_while_stmt): Likewise.
17737         (begin_do_stmt): Likewise.
17738         (finish_do_body): Likewise.
17739         (finish_do_stmt): Likewise.
17740         (finish_return_stmt): Likewise.
17741         (begin_for_stmt): Likewise.
17742         (finish_for_init_stmt): Likewise.
17743         (finish_for_cond): Likewise.
17744         (finish_for_expr): Likewise.
17745         (finish_break_stmt): Likewise.
17746         (finish_continue_stmt): Likewise.
17747         (begin_switch_stmt): Likewise.
17748         (finish_switch_cond): Likewise.
17749         (finish_case_label): Likewise.
17750         (begin_try_block): Likewise.
17751         (begin_function_try_block): Likewise.
17752         (finish_try_block): Likewise.
17753         (finish_cleanup_try_block): Likewise.
17754         (finish_cleanup): Likewise.
17755         (finish_function_try_block): Likewise.
17756         (finish_handler_sequence): Likewise.
17757         (finish_function_handler_sequence): Likewise.
17758         (begin_handler): Likewise.
17759         (finish_handler_parms): Likewise.
17760         (begin_catch_block): Likewise.
17761         (finish_handler): Likewise.
17762         (begin_compound_stmt): Likewise.
17763         (finish_compound_stmt): Likewise.
17764         (finish_asm_stmt): Likewise.
17765         (finish_label_stmt): Likewise.
17766         (finish_label_decl): Likewise.
17767         (finish_subobject): Likewise.
17768         (finish_decl_cleanup): Likewise.
17769         (finish_named_return_value): Likewise.
17770         (begin_stmt_expr): Likewise.
17771         (finish_stmt_expr): Likewise.
17773         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17774         to call genrtl_expr_stmt when appropriate.
17776         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17777         begin_compound_expr to call genrtl_begin_stmt_expr and
17778         genrtl_begin_compound_expr when appropriate.
17779         (finish_init_stmts): Changed calls to finish_compound_expr and
17780         finish_stmt_expr to call genrtl_finish_compound_expr and
17781         genrtl_finish_stmt_expr when appropriate.
17782         (expand_default_init): Changed call to finish_expr_stmt to call
17783         genrtl_expr_stmt when appropriate.
17784         (build_vec_init): Likewise.
17786         * parse.y (simple_stmt): Removed first argument from call to
17787         finish_for_stmt. Removed first argument from call to
17788         finish_switch_stmt.
17790         * parse.c: Regenerated.
17792         * pt.c (tsubst_expr): Removed first argument from call to
17793         finish_for_stmt. Removed first argument from call to
17794         finish_switch_stmt.
17796 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
17798         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17799         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17801         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17802         (cplus_tree_code_length[]): Likewise.
17803         (cplus_tree_code_name[]): Likewise.
17804         (init_parse): Added call to add_c_tree_codes. Changed
17805         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17807 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
17809         * cp-tree.h (finish_mem_initializers): Declare.
17810         (count_trees): Likewise.
17811         * parse.y (base_init): Use finish_mem_initializers.
17812         * semantics.c (finish_mem_initializers): New function.
17814         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
17815         the number of trees.
17816         (n_trees): Remove.
17817         (count_trees): Don't use it.
17819 2000-06-15  Jason Merrill  <jason@redhat.com>
17821         * tree.c (count_trees): New debugging function.
17823         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17824         * init.c (build_member_call): Pull out the name of a DECL.
17826         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17827         * semantics.c (expand_body): Push to TV_INTEGRATION here.
17828         * optimize.c (optimize_function): Not here.
17829         * pt.c (instantiate_decl): Push to TV_PARSE.
17831 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
17833         * cp-tree.h (struct language_function): Remove x_base_init_list
17834         and x_member_init_list.
17835         (current_base_init_list): Remove.
17836         (current_member_init_list): Likewise.
17837         (setup_vtbl_ptr): Change prototype.
17838         (emit_base_init): Likewise.
17839         (expand_member_init): Likewise.
17840         (reinit_parse_for_function): Remove.
17841         * decl.c (save_function_data): Don't clear x_base_init_list and
17842         x_member_init_list.
17843         (mark_language_function): Don't mark them.
17844         * init.c (perform_member_init): Tweak comment.
17845         (sort_member_init): Take the list of initializers as an argument.
17846         (sort_base_init): Likewise.
17847         (emit_base_init): Likewise.
17848         (expand_member_init): Return the initializer.  Don't use global
17849         variables.
17850         * lex.c (reinit_parse_for_function): Remove.
17851         * method.c (build_template_parm_names): Correct substitution.
17852         (do_build_copy_constructor): Don't use current_member_init_list
17853         and current_base_init_list.
17854         (synthesize_method): Likewise.
17855         * parse.y (base_init): Split mem-initializers into
17856         base-initializers and field-initializers.
17857         (member_init_list): Build up the list here.
17858         (member_init): Return the initializer.
17859         (fn.depfn): Don't use reinit_parse_for_function.
17860         * parse.c: Regenerated.
17861         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17862         ERROR_MARK.
17863         (tsubst_expr): Don't use current_member_init_list
17864         and current_base_init_list.
17865         (tsubst_expr_values): Rename to ...
17866         (tsubst_initializer_list): ... this.  Use convert_from_reference.
17867         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17868         and current_base_init_list.
17869         (begin_function_definition): Don't call reinit_parse_for_function.
17871         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17873         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17874         correctly.
17876         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17878 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
17880         * cp-tree.h (IF_COND): Move to c-common.h.
17881         (THEN_CLAUSE): Likewise.
17882         (ELSE_CLAUSE): Likewise.
17883         (WHILE_COND): Likewise.
17884         (WHILE_BODY): Likewise.
17885         (DO_COND): Likewise.
17886         (DO_BODY): Likewise.
17887         (RETURN_EXPR): Likewise.
17888         (EXPR_STMT_EXPR): Likewise.
17889         (FOR_INIT_STMT): Likewise.
17890         (FOR_COND): Likewise.
17891         (FOR_EXPR): Likewise.
17892         (FOR_BODY): Likewise.
17893         (SWITCH_COND): Likewise.
17894         (SWITCH_BODY): Likewise.
17895         (CASE_LOW): Likewise.
17896         (CASE_HIGH): Likewise.
17897         (GOTO_DESTINATION): Likewise.
17898         (COMPOUND_BODY): Likewise.
17899         (ASM_CV_QUAL): Likewise.
17900         (ASM_STRING): Likewise.
17901         (ASM_OUTPUTS): Likewise.
17902         (ASM_INPUTS): Likewise.
17903         (ASM_CLOBBERS): Likewise.
17904         (DECL_STMT_DECL): Likewise.
17905         (STMT_EXPR_STMT): Likewise.
17906         (LABEL_STMT_LABEL): Likewise.
17907         (SCOPE_BEGIN_P): Likewise.
17908         (SCOPE_END_P): Likewise.
17909         (SCOPE_STMT_BLOCK): Likewise.
17910         (SCOPE_NULLIFIED_P): Likewise.
17911         (SCOPE_NO_CLEANUPS_P): Likewise.
17912         (SCOPE_PARTIAL_P): Likewise.
17913         (ASM_VOLATILE_P): Likewise.
17914         (STMT_LINENO): Likewise.
17915         (STMT_LINENO_FOR_FN_P): Likewise.
17917         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17918         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17919         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17920         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17921         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17923         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17925         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17926         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17928         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17929         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17930         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17932 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
17934         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17935         * class.c (dfs_find_final_overrider): Set it appropriately.
17936         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17937         avoid unneeded secondary vptrs.
17939 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
17941         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17942         (check_bitfield_decl, check_field_decl): Likewise.
17943         (build_vtbl_or_vbase_field, build_base_field): Likewise.
17944         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17945         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17946         (xfer_tag, finish_enum): Likewise.
17947         * decl2.c (finish_builtin_type): Likewise.
17948         * init.c (init_init_processing): Likewise.
17949         * pt.c (instantiate_class_template): Likewise.
17950         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17951         * cp-tree.h (struct lang_type): Add user_align member.
17952         (CLASSTYPE_USER_ALIGN): Define.
17954 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
17956         * Make-lang.in (c++.install-common): Install g++-cross in
17957         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17958         $(target_alias)-g++ and $(target_alias)-c++.
17960 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
17962         * class.c (vcall_offset_data_s): Add last_init and fns.
17963         (overrides): Rename to same_signature_p.
17964         (dfs_find_final_overrider): Adjust accordingly.
17965         (mark_overriders): Likewise.
17966         (warn_hidden): Likewise.
17967         (build_vtbl_initializer): Reorganize machinery for building things
17968         at negative offsets.
17969         (build_vcall_and_vbase_vtbl_entries): Likewise.
17970         (build_vbase_offset_vtbl_entries): Likewise.
17971         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17972         offset entries.  Do not create two entries for functions with the
17973         same signature.
17974         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17975         (build_rtti_vtbl_entries): Reorganize machinery for building things
17976         at negative offsets.
17978         * optimize.c (expand_call_inline): Don't recurse into the code
17979         used to initialize the parameters more than once.
17981 2000-06-11  Mark Mitchell <mark@codesourcery.com>
17983         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17984         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17985         (find_substitution): Only use the `Sa' substitution for
17986         std::allocator, not instantiations of it.
17987         (write_template_prefix): Move comment.  Only use a TREE_LIST to
17988         represent substitutions for a member template.
17989         (write_array_type): Mangle array dimensions correctly.
17990         * optimize.c (maybe_clone_body): Copy more information from the
17991         cloned function.
17992         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
17993         on the regenerated declaration.
17995 2000-06-11  Chip Salzenberg  <chip@valinux.com>
17996             Mark Mitchell <mark@codesourcery.com>
17998         * class.c (build_vtable): Clarify comment.
17999         (build_ctor_vtbl_group): Pass the most derived type to
18000         build_vtable.
18002 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18004         * decl2.c (compare_options): Don't needlessly cast away const-ness.
18006 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
18008         * decl.c (add_binding): Handle duplicate declarations of external
18009         variables.
18011 2000-06-09  Chip Salzenberg  <chip@valinux.com>
18012             Mark Mitchell <mark@codesourcery.com>
18014         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
18015         argument.
18016         (write_signed_number): New macro.
18017         (write_unsigned_number): Likewise.
18018         (write_source_name): Use them.
18019         (write_number): Handle signed and unsigned values.
18020         (write_integer_cst): Use tree_int_cst_sgn, and use
18021         write_unsigned_number or write_signed_number as appropriate.
18022         (write_discriminator): Use write_unsigned_number or
18023         write_signed_number as appropriate.
18024         (write_template_arg_literal): Likewise.
18025         (write_array_type): Use tree_low_cst.
18026         (write_template_parm):  Use write_unsigned_number or
18027         write_signed_number as appropriate.
18028         (write_substitution): Adjust call to write_number.
18029         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
18030         (write_expression): Handle non-type template arguments of
18031         reference type correctly.
18032         (mangle_thunk): Use write_signed_number.
18034 2000-06-09  Chip Salzenberg  <chip@valinux.com>
18036         * mangle.c (find_substition): Don't mangle objects with typename
18037         substitutions (e.g. "cin" as "Si").
18039 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
18041         * call.c (add_candidate): Use ggc_alloc_cleared.
18042         * decl.c (lookup_label): Likewise.
18043         * lex.c (retrofit_lang_decl): Likewise.
18045 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
18047         * semantics.c (expand_body): Push to TV_EXPAND.
18048         * optimize.c (optimize_function): Push to TV_INTEGRATION.
18049         * decl.c (start_function): Always call announce_function.
18051         * tinfo2.cc: Just declare abort.
18053 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
18055         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
18056         whenever @ is a symbolic name.
18058 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
18060         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
18062 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
18064         * decl.c (pushdecl): Look up functions by DECL_NAME, not
18065         DECL_ASSEMBLER_NAME.
18067 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
18069         * decl2.c (c_language): Define.
18071 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
18073         * lex.c (lang_init_options): Tweak.
18075         * decl2.c: Remove #inclusion of diagnostic.h
18076         (lang_decode_option): Move diagnostic formatting options to
18077         toplevel.
18079         * lang-options.h: Remove documentation for diagnostic options.
18081         * Makefile.in (lex.o): Depends upon diagnostic.h
18083 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
18085         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18086         the same DECL_RESULT, it's not a redefinition.
18087         * pt.c (tsubst_decl): Remove code to handle illegal
18088         specializations.
18090 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
18092         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18094 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
18096         * search.c (maybe_suppress_debug_info): Don't check
18097         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18099         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18100         here if extern_p.
18102         Remember instantiation context in deferred instantiations.
18103         * cp-tree.h (struct tinst_level): Remove.
18104         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18105         * pt.c (current_tinst_level): Now a tree.
18106         (print_template_context, push_tinst_level, pop_tinst_level,
18107         tinst_for_decl): Adjust.
18108         (reopen_tinst_level): New fn.
18109         (init_pt): Register current_tinst_level as a root.
18110         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18111         of the pending templates list.
18112         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
18113         * lex.c (extract_interface_info): Adjust.
18114         * decl2.c (warn_if_unknown_interface): Adjust.
18116 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
18118         * class.c (indirect_primary_base_p): New function.
18119         (determine_primary_base): Use it.
18121 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
18123         Update new-abi dynamic cast algorithm.
18124         * tinfo.cc (__class_type_info::__dyncast_result): Add
18125         whole_details. Adjust constructor.
18126         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18127         Avoid unnecessary searching.
18128         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18130 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18132         * decl.c (init_decl_processing): Don't call record_component_aliases.
18133         * tree.c (build_cplus_array_type_1): Likewise.
18135 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
18137         * ir.texi: Correct typo.
18138         * mangle.c (write_expression): Handle non-type template arguments
18139         with reference type.
18140         * method.c (build_overload_value): Likewise.
18141         * pt.c (convert_nontype_argument): Explicitly represent conversion
18142         to a reference with an ADDR_EXPR.
18143         (unify): Always unify arguments in left-to-right order.
18145 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
18146             Mark Mitchell  <mark@codesourcery.com>
18148         * Make-lang.in (CXX_SRCS): Add mangle.c.
18149         * Makefile.in (CXX_OBJS): Add mangle.o.
18150         (mangle.o): New rule.
18152         * class.c (local_classes): New variable.
18153         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18154         (get_vtt_name): Use mangle_vtt_name for new ABI.
18155         (init_class_processing): Initialize local_classes.
18156         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18157         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18158         (std_identifier): New macro.
18159         (DECL_VOLATILE_MEMFUNC_P): New macro.
18160         (DECL_NAMESPACE_STD_P): Likewise.
18161         (local_classes): Declare.
18162         (get_mostly_instantiated_function_type): Declare.
18163         (init_mangle): Declare.
18164         (mangle_decl): Likewise.
18165         (mangle_type_string): Likewise.
18166         (mangle_type): Likewise.
18167         (mangle_typeinfo_for_type): Likewise.
18168         (mangle_typeinfo_string_for_type): Likewise.
18169         (mangle_vtbl_for_type): Likewise.
18170         (mangle_vtt_for_type): Likewise.
18171         (mangle_ctor_vtbl_for_type): Likewise.
18172         (mangle_thunk): Likewise.
18173         (mangle_conv_op_name_for_type): Likewise.
18174         (mangle_guard_variable): Likewise.
18175         * decl.c (pushtag): Keep track of local classes.
18176         (initialize_predefined_identifiers): Initialize std_identifier.
18177         (init_decl_processing): Use std_identifier.
18178         (start_decl): Don't treat instantiations as specializations.
18179         (grokdeclarator): Likewise.
18180         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
18181         name for fully-instantiated templates.
18182         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18183         destructors with the new ABI.
18184         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18185         (grokfield): Use mangle_type for new ABI.
18186         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18187         (get_sentry): Use mangle_guard_variable for new ABI.
18188         (start_static_initialization_or_destruction): Likewise.
18189         * expr.c (extract_aggr_init): Remove.
18190         (extract_scalar_init): Likewise.
18191         (extract_init): Remove #if 0'd code.
18192         * mangle.c: New function.
18193         * method.c (build_mangled_name): Assert not flag_new_abi.
18194         (build_static_name): Likewise.
18195         (build_decl_overload_real): Likewise.
18196         (build_typename_overload): Likewise.
18197         (build_overload_with_type): Likewise.
18198         (build_overload_name): Likewise.
18199         (get_ctor_vtbl_name): Likewise.
18200         (start_squangling): Likewise.
18201         (get_id_2): Likewise.
18202         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18203         (init_method): Call init_mangle for new ABI.
18204         (make_thunk): Call mangle_thunk for new ABI.
18205         * operators.def: Correct new ABI manglings for the `%' operator.
18206         Add `::' operator.
18207         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18208         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18209         (lookup_template_class): Call mangle_decl for new ABI.
18210         (get_mostly_instantiated_function_type): New function.
18211         (set_mangled_name_for_template_decl): Use it.
18212         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18213         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
18214         conversion op names.
18215         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18216         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18217         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
18218         mangle_typeinfo_string_for_type.
18220 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
18222         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18223         (INNERMOST_TEMPLATE_ARGS): New macro.
18224         (innermost_args): Remove.
18225         (get_innermost_template_args): New function.
18226         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18227         * error.c (dump_function_decl): Be caution when using
18228         most_general_template.
18229         * method.c (build_template_parm_names):  Use
18230         INNERMOST_TEMPLATE_ARGS.
18231         * pt.c (add_to_template_args): Tidy comment
18232         (get_innermost_template_args): New function.
18233         (check_explicit_specialization): Clear DECL_INITIAL for a new
18234         specialization.
18235         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18236         Tidy.
18237         (push_template_decl): Always register specializations of the most
18238         general template.
18239         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18240         (coerce_template_parms): Likewise.
18241         (lookup_template_class): Likewise.
18242         (innermost_args): Remove.
18243         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18244         (tsubst_decl): Handle tricky specializations.  Use
18245         get_innermost_template_args.
18246         (instantiate_template): Simplify handling of partial
18247         instantiations.
18248         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18249         (most_general_template): Reimplement, in a more straightforward
18250         manner.
18251         (regenerate_decl_from_template): Tweak formatting.  Use
18252         TMPL_ARGS_DEPTH for clarity.
18253         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18255         * dump.c (dequeue_and_dump): Dump information about thunks.
18257 2000-06-01  Richard Henderson  <rth@cygnus.com>
18259         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18261 2000-06-01  Richard Henderson  <rth@cygnus.com>
18263         * decl2.c (unsupported_options): Fix typo, make const.
18264         (lang_decode_option): Fix bsearch argument order.
18266 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
18268         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18269         on FIELD_DECLs.
18271 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18273         * cp-tree.h (c_get_alias_set): Deleted.
18274         * Makefile.in (decl.o): Include ../expr.h.
18275         * decl.c (expr.h): Include.
18276         (init_decl_processing): Call record_component_aliases for arrays.
18277         (grokdeclarator): Likewise.
18278         Set TREE_ADDRESSABLE for fields that aren't bitfields.
18279         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18281 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
18283         Remove guiding declaration support.
18284         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18285         (flag_guiding_decls): Remove.
18286         * call.c (build_user_type_conversion_1): Remove support for
18287         guiding decls.
18288         (build_new_function_call): Likewise.
18289         (build_new_op): Likewise.
18290         (build_new_method_call): Likewise.
18291         * decl.c (start_function): Likewise.
18292         * friend.c (is_friend): Likewise.
18293         (do_friend): Likewise.
18294         * decl2.c ((flag_dump_translation_unit): Make it const.
18295         (flag_guiding_decls): Remove.
18296         (unsupported_options): New variable
18297         (compare_options): New function.
18298         (lang_decode_option): Use them.
18300         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18302         * method.c (mangle_expression): Adjust test for legal expression
18303         operators.
18305         * pt.c (instantiate_decl): Save and restore the local
18306         specializations list.
18308 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
18310         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18312 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
18314         * call.c (add_template_candidate_real): Handle member template
18315         constructors for classes with virtual bases.
18316         (build_user_type_conversion_1): Use in_charge_arg_for_name.
18317         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18319         * ir.texi: Update thunk documentation.
18321         * call.c (joust): Fix handling of overloaded builtin operators.
18323 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
18325         * cp-tree.h (DECL_ANTICIPATED): New macro.
18326         Document new use of DECL_LANG_FLAG_7.
18327         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18328         in the user namespace.
18329         * lex.c (do_identifier): If the identifier's declaration has
18330         DECL_ANTICIPATED on, it has not yet been declared.  But do not
18331         replace it with an ordinary implicit declaration.
18333         * tinfo2.cc: Include stdlib.h.
18335 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
18337         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18338         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18339         CLASSTYPE_ALIGN.
18341 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
18343         * decl2.c (lang_decode_option): Use skip_leading_substring instead
18344         of plain strncmp.
18346 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
18348         * operators.def (<?): Duplicated, should have been...
18349         (>?): this.  Fixed.
18351 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
18352             Mark Mitchell  <mark@codesourcery.com>
18354         * cp-tree.h (ansi_opname): Make it a macro.
18355         (ansi_assopname): Likewise.
18356         (struct lang_decl_flags): Add assignment_operator_p.
18357         (struct lang_decl): Add operator_code.
18358         (DECL_VTT_PARM): Adjust.
18359         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18360         overloaded operator.
18361         (SET_OVERLOADED_OPERATOR_CODE): New macro.
18362         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18363         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18364         (opname_tab): Remove.
18365         (assignop_tab): Likewise.
18366         (operator_name_info_t): New type.
18367         (operator_name_info): New variable.
18368         (assignment_operator_name_info): Likewise.
18369         (build_cp_library_fn): Remove declaration.
18370         (push_cp_library_fn): Likewise.
18371         (operator_name_string): Likewise.
18372         (build_decl_overload): Likewise.
18373         * call.c (print_z_candidates): Simplify.
18374         (build_object_call): Adjust usage of ansi_opname.  Use
18375         DECL_OVERLOADED_OPERATOR_P.
18376         (op_error): Adjust operator name lookup.
18377         (build_conditional_expr): Adjust usage of ansi_opname.
18378         (build_new_op): Likewise.
18379         (build_op_delete_call): Likewise.
18380         (build_over_call): Likewise.
18381         (joust): Use DECL_OVERLOADED_OPERATOR_P.
18382         * decl.c (duplicate_decls): Copy operator_code.
18383         (init_decl_processing): Adjust parameters to push_cp_library_fn.
18384         (builtin_function): Adjust parameters to build_library_fn_1.
18385         (build_library_fn_1): Accept an overloaded operator code.
18386         (build_library_fn): Pass ERROR_MARK.
18387         (build_cp_library_fn): Accept an overloaded operator code.
18388         (push_cp_library_fn): Likewise.
18389         (grokfndecl): Tweak.
18390         (grokdeclarator): Simplify code to compute names of overloaded
18391         operators.  Adjust use of ansi_opname.
18392         (ambi_op_p): Work on tree_codes, not identifiers.
18393         (unary_op_p): Likewise.
18394         (grok_op_properties): Likewise.
18395         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18396         (lang_mark_tree): Don't try to mark the operator_code.
18397         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18398         * error.c (dump_decl): Remove special handling for operator
18399         names.
18400         (dump_function_name): Likewise.
18401         (dump_expr): Adjust name lookup of operators.
18402         (op_to_string): Simplify.
18403         (assop_to_string): Likewise.
18404         * init.c (build_new_1): Adjust use of ansi_opname.
18405         * lex.c (opname_tab): Remove.
18406         (assignop_tab): Likewise.
18407         (ansi_opname): Likewise.
18408         (ansi_assopname): Likewise.
18409         (operator_name_string): Likewise.
18410         (reinit_lang_specific): Likewise.
18411         (operator_name_info): New variable.
18412         (assignment_operator_name_info): Likewise.
18413         (init_operators): New function.
18414         (init_parse): Use it.
18415         (do_identifier): Adjust use of ansi_opname.
18416         * method.c (mangle_expression): Don't use ansi_opname for
18417         mangling.
18418         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18419         (build_decl_overload): Remove.
18420         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18421         (do_build_assign_ref): Adjust use of ansi_opname.
18422         (synthesize_method): Likewise.
18423         (implicitly_declare_fn): Likewise.
18424         * operators.def: New file.
18425         * parse.y (operator): Adjust use of ansi_opname.
18426         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18427         (set_mangled_name_for_template_decl): Don't play games with
18428         current_namespace.
18429         (special_function_p): Adjust use of ansi_opname.
18430         * typeck.c (check_return_expr): Likewise.
18431         * Make-lang.in (cc1plus): Depend on operators.def.
18432         * Makefile.in (lex.o): Likewise.
18433         (decl.o): Likewise.
18435 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
18437         * Make-lang.in (cplib2.ready): Eradicate.
18439 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18441         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18442         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18443         (built_min, cp_tree_equal): Likewise.
18445 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18447         * class.c (layout_nonempty_base_or_field): Replace
18448         `record_layout_info' with `record_layout_info_s'.
18450 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
18452         Fix goto checking.
18453         * cp-tree.h (struct language_function): x_named_labels is now
18454         a struct named_label_list*.
18455         * decl.c (struct named_label_use_list): Renamed from...
18456         (struct named_label_list): ...this.  New struct.
18457         (push_binding_level): Don't set eh_region.
18458         (note_level_for_eh): New fn.
18459         (pop_label): Take label and old value directly.
18460         (pop_labels): Adjust for new named_labels format.
18461         (lookup_label): Likewise.
18462         (poplevel): Note characteristics of a binding level containing a
18463         named label.  Mess with named label lists earlier.
18464         (mark_named_label_lists): New fn.
18465         (mark_lang_function): Call it.
18466         (use_label): New fn, split out from...
18467         (make_label_decl): ...here.  Don't call it.
18468         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18469         check_previous_gotos): New fns, split out from...
18470         (define_label): ...here.
18471         (check_switch_goto): New fn.
18472         (define_case_label): Call it.
18473         (check_goto): New fn.
18474         * semantics.c (finish_goto_stmt): Call it and use_label.
18475         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18476         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18478 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18480         * class.c (build_vtable_entry_ref): Correct usage of
18481         get_vtbl_decl_for_binfo.
18483         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18484         * method.c (implicitly_declare_fn): Not here.
18486 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
18488         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18489         (CPTI_PTMD_DESC_TYPE): ... here.
18490         (ptmd_desc_type_node): Rename to ...
18491         (ptm_desc_type_node): ... here.
18492         * decl.c: Likewise.
18493         * rtti.c (ptmd_initializer): Rename to ...
18494         (ptm_initializer): ... here.
18495         (sythesize_tinfo_var): Adjust. Deal with pointer to member
18496         function.
18497         (create_tinfo_types): Adjust.
18499 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
18501         Finish implementation of VTTs.
18502         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18503         CPTI_VTT_PARM_IDENTIFIER.
18504         (vtt_parm_identifier): New macro.
18505         (vtt_parm_type): Likewise.
18506         (BINFO_SUBVTT_INDEX): Likewise.
18507         (BINFO_VPTR_INDEX): Likewise.
18508         (struct lang_decl): Add vtt_parm.
18509         (DECL_VTT_PARM): New macro.
18510         (DECL_USE_VTT_PARM): Likewise.
18511         (DECL_NEEDS_VTT_PARM_P): Likewise.
18512         (get_vtt_name): Declare.
18513         (build_artificial_parm): Likewise.
18514         (fixup_all_virtual_upcast_offsets): Likewise.
18515         (expand_indirect_vtbls_init): Remove.
18516         * call.c (build_new_method_call): Pass the vtt to subobject
18517         constructors and destructors.
18518         * class.c (get_vtt_name): Give it external linkage.
18519         (build_clone): Handle the magic VTT parameters for clones.
18520         (clone_function_decl): Fix typo in comment.
18521         (build_vtt): Keep track of the indices in the VTTs where various
18522         entities are stored.
18523         (build_vtt_inits): Likewise.
18524         (dfs_build_vtt_inits): Likewise.
18525         (build_ctor_vtbl_group): Tweak type of construction vtables.
18526         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18527         primary bases, when building construction vtables.
18528         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18529         (initialize_predefined_identifiers): Add vtt_parm_identifier.
18530         (init_decl_processing): Initialize vtt_parm_type.
18531         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18532         (lang_mark_tree): Make vtt_parm.
18533         * decl2.c (build_artificial_parm): New function.
18534         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
18535         (grokclassfn): Use build_artificial_parm.
18536         * init.c (initialize_vtbl_ptrs): Call
18537         fixup_all_virtual_upcast_offsets directly.
18538         (perform_member_init): Use the complete subobject destructor for
18539         member cleanups.
18540         (build_vtbl_address): New function.
18541         (expand_virtual_init): Handle VTTs.
18542         * optimize (maybe_clone_body): Likewise.
18543         * search.c (fixup_all_virtual_upcast_offsets): Give it external
18544         linkage.
18545         (expand_indirect_vtbls_init): Remove.
18546         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18547         * tree.c (make_binfo): Make them bigger.
18549 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18551         * inc/cxxabi.h (__pbase_type_info): Define, based on
18552         __pointer_type_info.
18553         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18554         (__pointer_to_member_type_info): Likewise.
18555         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18556         (__pointer_to_member_type_info::__is_pointer_p): Remove.
18557         (__pointer_type_info::__do_catch): Rename to ...
18558         (__pbase_type_info::__do_catch): ... here. Adjust.
18559         (__pbase_type_info::__pointer_catch): Implement.
18560         (__pointer_type_info::__pointer_catch): Adjust.
18561         (__pointer_to_member_type_info::__pointer_catch): Adjust.
18563 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18565         * tinfo.h (__user_type_info::contained_virtual_p): New
18566         predicate.
18567         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18568         shaped hierarchy.
18569         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18570         diamond shaped hierarchy. Add early out for mixed diamond and
18571         duplicate shaped hierarchy.
18573 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
18575         * cp-tree.h (build_delete): Change prototype.
18576         (build_vec_delete): Likewise.
18577         * call.c (build_scoped_method_call): Use special_function_kind
18578         values to indicate the kind of destruction to be done.
18579         (build_method_call): Likewise.
18580         * decl.c (finish_destructor_body): Likewise.
18581         (maybe_build_cleanup_1): Likewise.  Rename to ...
18582         (maybe_build_cleanup): ... this.
18583         * decl2.c (delete_sanity): Use special_function_kind
18584         values to indicate the kind of destruction to be done.
18585         (build_cleanup): Likewise.
18586         * init.c (perform_member_init): Likewise.
18587         (build_vec_delete_1): Likewise.
18588         (build_dtor_call): Simplify.
18589         (build_delete): Use special_function_kind
18590         values to indicate the kind of destruction to be done.
18591         (build_vbase_delete): Likewise.
18592         (build_vec_delete): Likewise.
18594         * init.c (sort_member_init): Fix typo in error message generation
18595         code.
18597 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
18599         * semantics.c (begin_class_definition): make the packed
18600         attribute be sensitive to the "-fpack-struct" command line flag
18602 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
18604         Update new-abi upcast algorithm.
18605         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18606         prototype and meaning of return value.
18607         (__si_class_type_info::__do_upcast): Likewise.
18608         (__vmi_class_type_info::__do_upcast): Likewise.
18609         * tinfo.cc (__class_type_info::__upcast_result): Replace
18610         whole2dst with part2dst. Adjust ctor.
18611         (__class_type_info::__do_upcast): Adjust call of worker function.
18612         (__class_type_info::__do_upcast): Adjust.
18613         (__si_class_type_info::__do_upcast): Adjust. Use parent's
18614         __do_upcast.
18615         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18616         virtual base in diamond hierarchy bug.
18618 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
18620         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18621         and bitfield to tinfo_fn_p.
18622         (DECL_TINFO_FN_P): Adjust.
18623         (SET_DECL_TINFO_FN_P): Likewise.
18624         (DECL_MUTABLE_P): Likewise.
18625         (DECL_C_BIT_FIELD): Likewise.
18626         (SET_DECL_C_BIT_FIELD): Likewise.
18627         (CLEAR_DECL_C_BIT_FIELD): Likewise.
18628         (DECL_UNINLINABLE): Likewise.
18629         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18630         (handle_using_decl): Remove assertion.
18631         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18632         to build FIELD_DECLs.
18633         (build_base_field): Likewise.
18634         (layout_class_type): Likewise.
18635         * decl.c (init_decl_processing): Likewise.
18636         (build_ptrmemfunc_type): Likewise.
18637         (grokdeclarator): Likewise.
18638         * decl2.c (grok_x_components): Likewise.
18639         * except.c (call_eh_info): Likewise.
18640         * init.c (init_init_processing): Likewise.
18641         * rtti.c (expand_class_desc): Likewise.
18642         (create_pseudo_type_info): Likewise.
18643         (get_vmi_pseudo_type_info): Likewise.
18644         (create_tinfo_types): Likewise.
18645         * ptree.c (print_lang_decl): Adjust.
18646         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18647         before checking DECL_MUTABLE_P.
18649         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18650         parameters for template functions.
18651         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18652         destructors as well as constructors.
18654 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
18656         * class.c (build_ctor_vtbl_group): Set inits.
18657         * optimize.c (maybe_clone_body): Set DECL_INLINE and
18658         DECL_THIS_INLINE appropriately for clones.
18660         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18661         (DECL_CONV_FN_P): Simplify.
18662         (DECL_OPERATOR): Remove.
18663         (language_to_string): Declare.
18664         * decl.c (duplicate_decls): Fix typo in comment.
18665         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18666         (grok_op_properties): Use DECL_CONV_FN_P instead of
18667         IDENTIFIER_TYPENAME_P.
18668         * dump.c (dequeue_and_dump): Dump the language linkage of
18669         declarations.
18670         * error.c (language_to_string): Give it external linkage.
18671         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18672         (implicitly_declare_fn): Set DECL_LANGUAGE.
18673         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18674         IDENTIFIER_TYPENAME_P.
18675         (tsubst_decl): Likewise.
18676         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18677         * semantics.c (finish_member_declaration): Don't mark members of
18678         classes declared in an extern "C" region as extern "C".
18680 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18682         * decl2.c (qualified_lookup_using_namespace): Look through
18683         namespace aliases.
18685         * decl.c (push_using_decl): Return the old decl on namespace level.
18687 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
18689         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18690         (VTT_NAME_PREFIX): New macro.
18691         (CTOR_VTBL_NAME_PREFIX): Likewise.
18692         (get_ctor_vtbl_name): New function.
18693         * class.c (get_vtable_name): Simplify.
18694         (get_vtt_name): New function.
18695         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18696         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18697         when a virtual base becomes primary.
18698         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
18699         VTTs.
18700         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18701         additional parameters.
18702         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18703         (initialize_array): New function.
18704         (build_vtt): Likewise.
18705         (build_vtt_inits): Likewise.
18706         (dfs_build_vtt_inits): Likewise.
18707         (dfs_fixup_binfo_vtbls): Likewise.
18708         (build_ctor_vtbl_group): Likewise.
18709         (initialize_vtable): Use initialize_array.
18710         (accumulate_vtbl_inits): Reimplement to handle construction
18711         vtables.
18712         (dfs_accumulate_vtbl_inits): Likewise.
18713         (bulid_vtbl_initializer): Adjust parameter name.
18714         * method.c (build_typename_overload): Remove #if 0'd code.
18715         (get_ctor_vtbl_name): New function.
18716         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18717         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18719         * cp-tree.h (struct lang_type): Remove search_slot.
18720         (CLASSTYPE_SEARCH_SLOT): Remove.
18721         (emit_base_init): Change prototype.
18722         (initialize_vtbl_ptrs): Likewise.
18723         (expand_indirect_vtbls_init): Likewise.
18724         (clear_search_slots): Remove.
18725         * decl.c (lang_mark_tree): Don't mark search_slot.
18726         * init.c (initialize_vtbl_ptrs): Simplify.
18727         (emit_base_init): Likewise.
18728         * search.c (struct vbase_info): Document decl_ptr.
18729         (convert_pointer_to_single_level): Remove.
18730         (dfs_find_vbases): Remove.
18731         (dfs_init_base_pointers): Simplify.
18732         (dfs_clear_vbase_slots): Remove.
18733         (dfs_vtable_path_unmark): New function.
18734         (init_vbase_pointers): Simplify.
18735         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18736         (expand_indirect_vtbls_init): Simplify.  Don't call
18737         mark_all_temps_used.
18738         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18739         initialize_vtbl_ptrs.
18741 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
18743         * except.c: Add static prototypes.
18745 2000-05-20  H.J. Lu  <hjl@gnu.org>
18747         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18749 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
18751         Don't create a separate copy of virtual bases for the
18752         CLASSTYPE_VBASECLASSES list.
18753         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18754         (BINFO_FOR_VBASE): Remove.
18755         (CANONICAL_BINFO): Adjust.
18756         (binfo_for_vbase): New function.
18757         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18758         instead of BINFO_FOR_VBASE.
18759         (build_vbase_pointer): Likewise.
18760         (build_secondary_vtable): Likewise.
18761         (dfs_mark_primary_bases): Likewise.
18762         (mark_primary_bases): Likewise.
18763         (layout_nonempty_base_or_field): Likewise.
18764         (dfs_set_offset_for_shared_vbases): Likewise.
18765         (dfs_set_offset_for_unshared_vbases): Likewise.
18766         (layout_virtual_bases): Likewise.  Adjust for changes to the
18767         CLASSTYPE_VBASECLASSES list.
18768         (dump_class_hierarchy_r): Use binfo_for_vbase
18769         instead of BINFO_FOR_VBASE.
18770         (dump_class_hierarchy): Likewise.
18771         (finish_vtbls): Likewise.
18772         (build_vtbl_initializer): Adjust for changes to the
18773         CLASSTYPE_VBASECLASSES list.
18774         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18775         * decl.c (finish_destructor_body): Adjust for changes to the
18776         CLASSTYPE_VBASECLASSES list.
18777         * init.c (sort_base_init): Use binfo_for_vbase.
18778         (construct_virtual_bases): Adjust for changes to the
18779         CLASSTYPE_VBASECLASSES list.
18780         (expand_member_init): Use binfo_for_vbase.
18781         (build_vbase_delete):  Adjust for changes to the
18782         CLASSTYPE_VBASECLASSES list.
18783         * method.c (do_build_copy_constructor): Likewise.
18784         * rtti.c (get_base_offset): Use binfo_for_vbase.
18785         (expand_class_desc): Remove #if 0'd code.
18786         * search.c (struct vbase_info): Remove vbase_types.
18787         (get_base_distance):  Use binfo_for_vbase.
18788         (lookup_field_queue_p): Use CANONICAL_BINFO.
18789         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18790         (get_pure_virtuals): Adjust for changes to the
18791         CLASSTYPE_VBASECLASSES list.
18792         (dfs_find_vbases): Use binfo_for_vbase.
18793         (dfs_init_vbase_pointers): Likewise.
18794         (init_vbase_pointers): Don't initialize vi.vbase_types.
18795         (virtual_context): Use binfo_for_vbase.
18796         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18797         CLASSTYPE_VBASECLASSES list.
18798         (expand_indirect_vtbls_init): Simplify.
18799         (dfs_get_vbase_types): Don't replicate virtual bases.
18800         (find_vbase_instance): Use binfo_for_vbase.
18801         (binfo_for_vbase): New function.
18802         * typeck.c (get_delta_difference): Use binfo_for_vbase.
18804 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
18806         * decl2.c (finish_anon_union): Generalize error messages to handle
18807         anonymous structures.
18808         * init.c (perform_member_init): Remove `name' parameter.
18809         (build_field_list): New function.
18810         (sort_member_init): Handle anonymous union initialization order
18811         correctly.  Check for multiple initializations of the same union.
18812         (emit_base_init): Don't look up fields by name here.
18813         (expand_member_init): Record the result of name lookup for future
18814         reference.
18815         * typeck.c (build_component_ref): Fix formatting.
18817 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
18819         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18820         * typeck.c (build_x_compound_expr): Replace warn_unused with
18821         warn_unused_value.
18823         * decl2.c (lang_decode_option): Update -Wall unused flags by
18824         calling set_Wunused.
18826 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
18828         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18829         * init.c (dfs_vtable_path_unmark): Remove.
18830         * search.c (marked_new_vtable_p): Likewise.
18831         (unmarked_new_vtable_p): Likewise.
18832         (dfs_search_slot_nonempty_p): Likewise.
18833         (dfs_mark): Likewise.
18834         (dfs_vtable_path_unmark): Likewise.
18835         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18836         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18837         (dfs_init_vbase_pointers): Remove special-case new ABI code.
18838         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18839         (init_vbase_pointers): Simplify.
18840         (expand_indirect_vtbls_init): Likewise.
18842         * class.c (copy_virtuals): New function.
18843         (build_primary_table): Use it.
18844         (build_secondary_vtable): Likewise.
18845         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18846         indicate that no vcall offset is required.
18847         (add_virtual_function): Likewise.
18848         (modify_all_vtables): Likewise.
18849         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18850         (dfs_accumulate_vtbl_inits): Likewise.
18851         (build_vtbl_initializer): Make changes to handle construction
18852         vtables.
18853         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18854         (build_rtti_vtbl_entries): Likewise.
18855         (build_vtable_entries): Handle a NULL vcall_index.
18857 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
18859         * decl2.c (lang_decode_option): Fix thinko.
18861 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
18863         * except.c (check_handlers): New fn.
18864         * cp-tree.h: Declare it.
18865         * semantics.c (finish_handler_sequence): Call it.
18866         (finish_function_handler_sequence): Likewise.
18867         (finish_handler_parms): Set TREE_TYPE on the handler.
18868         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18869         * search.c (get_base_distance_recursive): If protect>1, ignore
18870         special access.
18871         (get_base_distance): Don't reduce watch_access.
18873 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
18875         * lex.c: #include diagnostic.h.
18876         (lang_init_options): Set default prefixing rules.
18878         * lang-options.h: Add -fdiagnostics-show-location=.
18880         * decl2.c: #include diagnostic.h.
18881         (lang_decode_option): Handle -fdiagnostics-show-location=.
18883 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
18885         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18886         * vec.cc: Revert my 2000-05-07 change.
18888 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
18890         * class.c (check_field_decls): Complain about non-static data
18891         members with same name as class in class with constructor.
18893 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
18895         * decl.c (grokdeclarator): Allow non-static data members with
18896         same name as class.
18898 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
18900         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18901         and pending_inline.filename.  Update prototypes.
18902         * decl.c (define_label): Constify filename parameter.
18903         * decl2.c (warn_if_unknown_interface): Constify local char *.
18904         * input.c Constify input_source.filename. Don't declare
18905         input_filename or lineno.  Constify filename parameter to feed_input.
18906         * lex.c (init_parse): Constify parameter and return value.
18907         (cp_pragma_interface, cp_pragma_implementation): Constify
18908         filename argument.
18909         (reinit_parse_for_method, reinit_parse_for_block,
18910         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18911         Constify local char *.
18912         * pt.c: Don't declare lineno or input_filename.
18913         (print_template_context, tsubst_friend_function, tsubst_decl,
18914         tsubst, instantiate_decl): Constify local char *.
18915         * semantics.c (expand_body): Constify local char *.
18916         * tree.c (build_srcloc): Constify filename parameter.
18917         * typeck.c (c_expand_asm_operands): Constify filename
18918         parameter.
18920 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
18922         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18923         offsetof expansion.
18925 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
18927         * inc/cxxabi.h:  Fix typos in comment.
18928         (__base_class_info::__offset): Use a static_cast.
18930 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
18932         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18933         of std::size_t and std::ptrdiff_t respectively.
18934         * tinfo.cc: Likewise.
18935         * vec.cc: Likewise.
18937 2000-05-06  Richard Henderson  <rth@cygnus.com>
18939         * typeck.c (build_c_cast): Don't warn integer->pointer size
18940         mismatch for constants.
18942 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
18944         * rtti.c (ptmd_initializer): Set non-public, if class is
18945         incomplete.
18947         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18948         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18949         __cxa_vec_delete): Likewise.
18950         * tinfo.cc (__dynamic_cast): Likewise.
18951         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18952         __cxa_vec_delete): Likewise.
18954 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18956         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18957         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18958         (lang_decl_flags): Add vcall_offset.
18959         (THUNK_VCALL_OFFSET): Use it.
18960         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18961         * method.c (make_thunk): Create the lang_decl here, not in
18962         emit_thunk.
18963         (emit_thunk): Make generic thunks into ordinary functions once
18964         they have been fed to expand_body.
18965         * semantics.c (expand_body): Set current_function_is_thunk here.
18967 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18969         * class.c (update_vtable_entry_for_fn): Prototype.
18971         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18972         and `tmpl'.
18974         * search.c (dfs_build_inheritance_graph_order): Prototype.
18976 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18978         * cp-tree.h (special_function_kind): Add various kinds of
18979         destructors.
18980         (special_function_p): New function.
18981         * class.c (overrides): Don't let one kind of destructor override
18982         another.
18983         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18984         whether or not to instantiate a template.
18985         * tree.c (special_function_p): Define.
18987 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
18989         * cp-tree.def (THUNK_DECL): Remove.
18990         * cp-tree.h (DECL_THUNK_P): New macro.
18991         (DECL_NON_THUNK_FUNCTION_P): Likewise.
18992         (DECL_EXTERN_C_FUNCTION_P): Likewise.
18993         (SET_DECL_THUNK_P): Likewise.
18994         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
18995         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
18996         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
18997         * decl.c (decls_match): Use DECL_EXTERN_C_P.
18998         (duplicate_decls): Likewise.
18999         (pushdecl): Likewise.  Adjust thunk handling.
19000         (grokfndecl): Use DECL_EXTERN_C_P.
19001         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
19002         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
19003         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
19004         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
19005         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
19006         DECL_NO_STATIC_CHAIN.
19007         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
19008         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
19009         * search.c (covariant_return_p): Remove THUNK_DECL handling.
19010         * ir.texi: Update.
19012 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
19014         * tree.c (walk_tree): Set lineno.
19016 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
19018         * exception.cc: Update license notice.
19019         * new.cc: Likewise.
19020         * new1.cc: Likewise.
19021         * new2.cc: Likewise.
19022         * tinfo.cc: Likewise.
19023         * tinfo2.cc: Likewise.
19024         * vec.cc: Likewise.
19025         * inc/cxxabi.h: Likewise.
19026         * inc/exception: Likewise.
19027         * inc/new: Likewise.
19028         * inc/new.h: Likewise.
19029         * inc/typeinfo: Likewise.
19031 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
19033         * tree.c (build_target_expr_with_type): If we already have a
19034         TARGET_EXPR, just return it.
19036         * optimize.c (initialize_inlined_parameters): Don't generate an
19037         EXPR_STMT if we can just use DECL_INITIAL.
19038         * decl.c (emit_local_var): Only make the initialization a
19039         full-expression if stmts_are_full_exprs_p.
19041 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
19043         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
19044         macro.
19045         * call.c (standard_conversion): Use it.
19046         (direct_reference_binding): Likewise.
19047         (build_over_call): Likewise.
19048         (is_properly_derived_from): Likewise.
19049         (compare_ics): Likewise.
19050         * class.c (resolves_to_fixed_type_p): Likewise.
19051         * optimize.c (declare_return_variable): Likewise.
19052         * pt.c (is_specialization_of): Likewise.
19053         (unify): Likewise.
19054         * typeck.c (comp_target_parms): Likeiwse.
19055         (build_static_cast): Likewise.
19056         (build_reinterpret_cast): Likewise.
19057         (build_const_cast): Likewise.
19058         (comp_ptr_ttypes_real): Likewise.
19059         (comp_ptr_ttypes_const): Likewise.
19060         * typeck2.c (process_init_constructor): Likewise.
19062 2000-04-30  Scott Snyder <snyder@fnal.gov>
19064         * decl.c (finish_destructor_body): Use the base destructor when
19065         destroying virtual bases.
19067 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
19069         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
19070         STMT_EXPRs.
19071         * optimize.c (struct inline_data): Add target_exprs field.
19072         (declare_return_variable): When a function returns an aggregate,
19073         use the variable declared in the TARGET_EXPR as the remapped
19074         DECL_RESULT.
19075         (expand_call_inline): Update the pending target_exprs stack.
19076         (optimize_function): Initialize the stack.
19078         * decl2.c (finish_file): Fix typo in comment.
19080         * method.c (emit_thunk): Don't try to return a `void' value.
19082         * optimize.c (initialize_inlined_parameters): If the parameter is
19083         addressable, we need to make a new VAR_DECL, even if the
19084         initializer is constant.
19086 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
19088         * decl.c (grok_op_properties): Add an extra check of argtypes.
19090 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
19092         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19093         variables.
19094         (initialize_inlined_parameters): Try to avoid creating new
19095         VAR_DECLs.
19097 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
19099         * lex.c (my_get_run_time): Remove.
19100         (init_filename_times): Use get_run_time instead of my_get_run_time.
19101         (check_newline): Likewise.
19102         (dump_time_statistics): Likewise.
19103         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19104         of computing elapsed time explicitly.
19106 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
19108         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19109         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19110         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19111         before calling decl_constant_value.
19112         * class.c (check_bitfield_decl): Likewise.
19113         * cvt.c (ocp_convert): Likewise.
19114         (convert): Likewise.
19115         * decl.c (compute_array_index_type): Likewise.
19116         (build_enumerator): Likewise.
19117         * decl2.c (check_cp_case_value): Likewise.
19118         * pt.c (convert_nontype_argument): Likewise.
19119         (tsubst): Likewise.
19120         * typeck.c (decay_conversion): Likewise.
19121         (build_compound_expr): Likewise.
19122         (build_reinterpret_cast): Likewise.
19123         (build_c_cast): Likewise.
19124         (convert_for_assignment): Likewise.
19126 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
19128         * decl.c (finish_function): Don't play games with DECL_INLINE.
19130 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
19132         * ir.texi: Correct typo.
19134 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19136         * decl.c (grokdeclarator): Reject VLAs as members.
19138 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
19140         * call.c (standard_conversion): Accept conversion between
19141         COMPLEX_TYPEs.
19143         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19145 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
19147         * decl2.c (finish_file): Remove double setup for accounting
19148         compile time.
19150 2000-04-24  Robert Lipe <robertlipe@usa.net>
19152         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19154 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
19156         * new.cc (set_new_handler): Needs to be in std::.
19158 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
19160         * cp-tree.h (lang_decl): Remove pretty_function_p.
19161         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19162         language-specific node.
19163         * decl.c (cp_make_fname_decl): Use build_decl, not
19164         build_lang_decl, to build the variables.
19165         (grokvardecl): Don't call build_lang_decl for local variables in
19166         templates.
19167         (grokdeclarator): Don't call build_lang_decl for local type
19168         declarations in templates.
19169         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19170         zero'd memory, rather than calling memset.
19171         * pt.c: Include hashtab.h.
19172         (local_specializations): New variable.
19173         (retrieve_local_specialization): Use it.
19174         (register_local_specialization): Likewise.
19175         (tsubst_decl): Don't assume local variables have
19176         DECL_LANG_SPECIFIC.
19177         (instantiate_decl): Set up local_specializations.
19178         * Makefile.in (HTAB_H): New variable.
19180 2000-04-23  Richard Henderson  <rth@cygnus.com>
19182         * typeck.c (c_expand_asm_operands): Restore the original
19183         contents of the output list.
19185 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
19187         * ir.texi:  Document complex number representation.
19189 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
19191         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19192         (target_incomplete_p): New function.
19193         (tinfo_base_init): Create comdat NTBS name variable.
19194         (ptr_initializer): Add non_public parameter. Calculate it.
19195         (ptmd_initializer): Likewise.
19196         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19197         (create_real_tinfo_var): Add non_public parameter. Use it.
19198         Push proxy into global namespace.
19199         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19200         New enumeration.
19201         * inc/typeinfo (type_info::before, type_info::operator==):
19202         Compare __name addresses.
19204         * tinfo2.cc: Remove new-abi builtins comment.
19206 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
19208         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19210         * call.c (joust): Exit early if we get the same function, too.
19212         * decl2.c (key_method): Return NULL_TREE for template classes.
19213         (import_export_class): Don't need to check for template classes.
19215 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
19217         * lex.c: Remove references to cccp.c.
19219 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
19221         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19222         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
19223         (DECL_DESTRUCTOR_P): Use destructor_attr.
19224         (DECL_CONST_MEMFUNC_P): Reimplement.
19225         (DECL_VOLATILE_MEMFUNC_P): Remove.
19226         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19227         (overrides): Use DECL_DESTRUCTOR_P.
19228         (check_for_override): Likewise.
19229         * decl.c (start_function): Likewise.
19230         * decl2.c (grokfclassfn): Likewise.
19231         (check_classfn): Likewise.
19232         (grok_function_init): Likewise.
19234 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
19236         * decl2.c (grokfield): Issue error on illegal data member
19237         declaration.
19239 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
19241         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19243 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
19245         * class.c (build_vtable_entry): Don't build thunks for type-info
19246         functions.
19248 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
19250         * decl.c (decls_match): Allow a redeclaration of a builtin to
19251         specify args while the builtin did not.
19253 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
19255         * cp-tree.def (THUNK_DECL): Add to documentation.
19256         * cp-tree.h (flag_huge_objects): Declare.
19257         * class.c (modify_vtable_entry): Tidy.
19258         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19259         Calculate delta appropriately for the new ABI.
19260         (dfs_modify_vtables): Use it.
19261         (modify_all_vtables): Fix thinko in code to add overriding copies
19262         of functions to primary vtables.
19263         (build_clone): Fix typo in comment.
19264         (clone_function_decl): Correct order of destructors in vtable.
19265         (build_vbase_offset_vtbl_entries): Adjust comment.
19266         (dfs_vcall_offset_queue_p): Remove.
19267         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19268         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19269         (build_vtable_entry): Correct check for pure virtual functions.
19270         Don't declare flag_huge_objects.
19271         * decl.c (flag_huge_objects): Remove declaration.
19272         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19273         Use int_size_in_bytes.
19274         (emit_thunk): Handle vcall offset thunks.
19276 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19278         * decl2.c (parse_time, varconst_time): Delete declarations.
19279         (finish_file): Delete LINENO declaration.
19280         START_TIME and THIS_TIME now long.
19282 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
19284         * class.c (build_base_field): Reformat comment.
19286         * inc/cxxabi.h (stddef.h): Comment inclusion.
19287         (__base_class_info::__offset): Comment shift.
19289 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
19291         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19292         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19293         (cp_push_exception_identifier): New macro.
19294         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19295         (DECL_BASE_DESTRUCTOR_P): Likewise.
19296         (DECL_DELETING_DESTRUCTOR_P): Likewise.
19297         (get_vtbl_decl_for_binfo): Fix formatting.
19298         (in_charge_arg_for_name): New macro.
19299         (maybe_build_cleanup_and_delete): Remove declaration.
19300         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19301         (in_charge_arg_for_name): New function.
19302         (build_new_method_call): Use it.  Handle cloned destructors.
19303         (build_clone): Don't make the base constructor virtual.
19304         Automatically defer generated functions.
19305         (clone_function_decl): Handle destructors, too.
19306         (clone_constructors_and_destructors): Likewise.
19307         (create_vtable_ptr): Don't create a vtable entry for a cloned
19308         function.
19309         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19310         (initialize_predefined_identifiers): Update appropriately.
19311         (finish_destructor_body): Simplify.
19312         (maybe_build_cleanup_and_delete): Remove.
19313         * except.c (expand_throw): Handle new-ABI destructors.
19314         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19315         (build_dtor_call): New function.
19316         (build_delete): Use it.  Simplify.
19317         * optimize.c (maybe_clone_body): Handle destructors.
19318         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19320         * exception.cc (cleanup_fn): New typedef.
19321         (CALL_CLEANUP): New macro.
19322         (cp_eh_info): Use them.
19323         (__cp_push_exception): Likewise.
19324         (__cp_pop_exception): Likewise.
19326 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
19328         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19329         (complete_dtor_identifier): New macro.
19330         (CLASSTYPE_FIRST_CONVERSION): Remove.
19331         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19332         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19333         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19334         (CLASSTYPE_CONSTRUCTORS): Likewise.
19335         (CLASSTYPE_DESTRUCTORS): Likewise.
19336         (lang_decl): Add cloned_function.
19337         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19338         (DECL_BASE_CONSTRUCTOR_P): Likewise.
19339         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19340         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19341         (DECL_CLONED_FUNCTION_P): Likewise.
19342         (DECL_CLONED_FUNCTION): Likewise.
19343         (clone_function_decl): Declare.
19344         (maybe_clone_body): Likewise.
19345         * call.c (build_user_type_conversion_1): Call complete object
19346         constructors in the new ABI.
19347         (build_new_method_call): Don't add in-charge parameters under the
19348         new ABI.
19349         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19350         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19351         CLASSTYPE_DESTRUCTOR_SLOT.
19352         (build_clone): New function.
19353         (clone_function_decl): Likewise.
19354         (clone_constructors_and_destructors): Likewise.
19355         (check_bases_and_members): Use it.
19356         * decl.c (iniitialize_predefined_identifiers): Initialize
19357         complete_dtor_identifier.
19358         (finish_function): Don't add extra code to a clone.
19359         (lang_mark_tree): Mark cloned_function.
19360         * decl2.c (mark_used): Don't bother trying to instantiate things
19361         we synthesized.
19362         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19363         * method.c (set_mangled_name_for_decl): Don't treat clones as
19364         constructors.
19365         (synthesize_method): Sythesize cloned functions, not the clones.
19366         * optimize.c (inline_data): Update comment on ret_label.
19367         (remap_block): Don't assume DECL_INITIAL exists.
19368         (copy_body_r): Allow ret_label to be NULL.
19369         (maybe_clone_body): Define.
19370         * pt.c (tsubst_decl): Handle clones.
19371         (instantiate_clone): New function.
19372         (instantiate_template): Use it.
19373         (set_mangled_name_for_template_decl): Don't treat clones as
19374         constructors.
19375         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19376         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19377         * semantics.c (expand_body): Clone function bodies as necessary.
19379         * optimize.c (remap_decl): Avoid sharing structure for arrays
19380         whose size is only known at run-time.
19381         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19383         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19384         to has_in_charge_parm_p.
19385         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19386         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19387         (DECL_COPY_CONSTRUCTOR_P): New macro.
19388         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19389         (build_user_type_conversion_1): Likewise.
19390         (convert_like_real): Likewise.
19391         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
19392         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19393         (copy_args_p): Likewise.
19394         (grok_ctor_properties): Likewise.
19395         (start_function): Likewise.
19396         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
19397         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19398         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19399         * method.c (do_build_copy_constructor): Use
19400         DECL_HAS_IN_CHARGE_PARM_P.
19401         (synthesize_method): Likewise.
19402         * pt.c (instantiate_template): Remove goto.
19403         * tree.c (build_cplus_method_type): Remove mention of obstacks in
19404         comment.
19406         * cp-tre.h (finish_function): Change prototype.
19407         * decl.c (end_cleanup_fn): Adjust caller.
19408         (finish_function): Take only one parameter.
19409         * decl2.c (finish_objects): Adjust caller.
19410         (finish_static_storage_duration_function): Likewise.
19411         * method.c (emit_thunk): Likewise.
19412         * parse.y: Likewise.
19413         * parse.c: Regenerated.
19414         * pt.c (instantiate_decl): Likewise.
19415         * rtti.c (synthesize_tinfo_fn): Likewise.
19416         * semantics.c (expand_body): Likewise.
19418         * cp-tree.h (copy_decl): New function.
19419         * class.c (finish_struct_1): Use it.
19420         * lex.c (copy_decl): Define it.
19421         * pt.c (tsubst_decl): Likewise.
19422         * tree.c (copy_template_template_parm): Likewise.
19424         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19425         has_nonpublic_assign_ref.
19426         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19427         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19428         * class.c (finish_struct_methods): Don't set
19429         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19430         (interface_only): Don't declare.
19431         (interface_unknown): Likewise.
19433 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19435         * tree.h (HAVE_TEMPLATES): Remove definition.
19436         * lang-options.h (-fthis-is-variable): Remove documentation.
19438 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
19440         * class.c (instantiate_type): Handle object-relative template-id.
19442         * semantics.c (finish_expr_stmt): Call convert_to_void here.
19443         * decl.c (cplus_expand_expr_stmt): Not here.
19445         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19446         Initialize exprtype earlier.
19448         * parse.y (fn.def1): Check for defining types in return types.
19450         * decl.c (check_tag_decl): Notice extra fundamental types.
19451         Diagnose empty decls in classes, too.
19453         * decl.c (grokdeclarator): Don't override an anonymous name if no
19454         declarator was given.
19456         * cvt.c (convert_to_void): Call resolve_offset_ref.
19458         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19460         * decl2.c (decl_namespace): Handle getting a type.
19462         * typeck.c (build_c_cast): Re-enable warning for cast between
19463         pointer and integer of different size.
19465 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
19467         * inc/cxxabi.h (__pointer_type_info): Add restrict and
19468         incomplete flags.
19469         (__pointer_type_info::__pointer_catch): New virtual function.
19470         (__pointer_to_member_type_info): Derive from
19471         __pointer_type_info. Adjust.
19472         (__pointer_to_member_type_info::__do_catch): Remove.
19473         (__pointer_to_member_type_info::__is_pointer_p): Declare.
19474         (__pointer_to_member_type_info::__pointer_catch): Declare.
19475         * rtti.c (qualifier_flags): Add restrict flag.
19476         (ptmd_initializer): Reorder members.
19477         (create_tinfo_types): Expand comments. Reorder
19478         ptmd_desc_type_node members.
19479         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19480         Implement.
19481         (__pointer_type_info::__do_catch): Move specific code into
19482         __pointer_catch. Call it.
19483         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19484         specific catch checking. Fix void conversion check.
19485         (__pointer_to_member_type_info::__do_catch): Remove.
19486         (__pointer_to_member_type_info::__pointer_catch): Implement.
19488 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19490         * lex.c (init_parse): Remove traces of classof and headof.
19491         * decl2.c (flag_operator_names): Default to 1.
19492         (lang_decode_option): Do not set it for -ansi.
19494 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
19496         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19497         (DECL_MAIN_VARIANT): Remove.
19498         * decl.c (duplicate_decls): Don't set it.
19499         (start_function): Likewise.
19500         (lang_mark_tree): Don't mark it.
19501         * decl2.c (defer_fn): Don't use it.
19502         * lex.c (retrofit_lang_decl): Don't set it.
19503         * pt.c (tsubst_decl): Likewise.
19504         * ptree.c (print_lang_decl): Don't print it.
19505         * typeck.c (mark_addressable): Don't use it.
19507 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19509         * vec.cc: Include <new> and <exception>.
19510         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19511         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19512         terminate.
19513         (__cxa_vec_delete): Catch dtor exceptions.
19515 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19517         Prepend __ to implementation defined names.
19518         * inc/typeinfo (type_info): Rename _name to __name.
19519         (type_info::type_info): Rename parameter.
19520         (type_info::operator==, type_info::operator!=,
19521         type_info::before): Likewise.
19522         (type_info::is_pointer_p, type_info::is_function_p,
19523         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19524         parameters.
19525         * inc/cxxabi.h
19526         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19527         (__pointer_type_info::__pointer_type_info): Likewise.
19528         (__pointer_type_info::is_pointer_p,
19529         __pointer_type_info::do_catch): Prepend __. Rename parameters.
19530         (__array_type_info::__array_type_info): Rename parameters.
19531         (__function_type_info::__function_type_info): Likewise.
19532         (__function_type_info::is_function_p): Prepend __.
19533         (__enum_type_info::__enum_type_info): Rename parameters.
19534         (__pointer_to_member_type_info::__pointer_to_member_type_info):
19535         Likewise.
19536         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19537         parameters.
19538         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19539         (__class_type_info::__class_type_info): Rename parameters.
19540         (__class_type_info::sub_kind): Prepend __. Adjust member names.
19541         (__class_type_info::upcast_result,
19542         __class_type_info::dyncast_result): Prepend __. Move definition
19543         into tinfo.cc.
19544         (__class_type_info::do_upcast, __class_type_info::do_catch,
19545         __class_type_info::find_public_src,
19546         __class_type_info::do_dyncast,
19547         __class_type_info::do_find_public_src): Prepend __. Rename
19548         parameters.
19549         (__si_class_type_info::__si_class_type_info): Rename parameters.
19550         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19551         __si_class_type_info::do_find_public_src): Prepent __. Rename
19552         parameters.
19553         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19554         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19555         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19556         parameters.
19557         (__dynamic_cast): Rename parameters.
19558         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19559         type_info::do_catch, type_info::do_upcast): Prepend __.
19560         (contained_p, public_p, virtual_p, contained_public_p,
19561         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19562         (__class_type_info::do_catch,
19563         __class_type_info::do_upcast): Prepend __. Adjust.
19564         (__class_type_info::__upcast_result,
19565         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19566         Adjust.
19567         (__class_type_info::find_public_src): Prepend __. Adjust.
19568         (__class_type_info::do_find_public_src,
19569         __si_class_type_info::do_find_public_src,
19570         __vmi_class_type_info::do_find_public_src): Likewise.
19571         (__class_type_info::do_dyncast,
19572         __si_class_type_info::do_dyncast,
19573         __vmi_class_type_info::do_dyncast): Likewise.
19574         (__class_type_info::do_upcast,
19575         __si_class_type_info::do_upcast,
19576         __vmi_class_type_info::do_upcast): Likewise.
19577         (__dynamic_cast): Adjust.
19578         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19579         (__function_type_info::is_function_p): Likewise.
19580         (__pointer_type_info::do_catch): Likewise. Adjust.
19581         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19582         (__throw_type_match_rtti_2): Adjust.
19583         (__is_pointer): Adjust.
19585 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
19587         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19588         (complete_ctor_identifier): New macro.
19589         (special_function_kind): Add sfk_copy_constructor and
19590         sfk_assignment_operator.
19591         (LOOKUP_HAS_IN_CHARGE): Remove.
19592         (cons_up_default_function): Rename to ...
19593         (implicitly_declare_fn): ... this.
19594         * call.c (build_new_method_call): Add in-charge parameters for
19595         constructors here.
19596         * class.c (add_implicitly_declared_members): Change parameter name
19597         from cant_have_assignment to cant_have_const_assignment.
19598         Replace calls to cons_up_default_function to implicitly_declare_fn.
19599         * cvt.c (ocp_convert): Use complete_ctor_identifier.
19600         * decl.c (initialize_predefined_identifiers): Initialize it.
19601         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19602         complex expression.
19603         * init.c (expand_default_init): Don't calculate the in-charge
19604         parameter here.
19605         (build_new_1): Likewise.
19606         * lex.c (cons_up_default_function): Move to method.c.
19607         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19608         (implicitly_declare_fn): New function.
19609         * typeck.c (build_static_cast): Use complete_ctor_identifier.
19610         (build_modify_expr): Likewise.
19611         * typeck2.c (build_functional_cast): Likewise.
19613         Under the new ABI, constructors don't return `this'.
19614         * cp-tree.h (warn_reorder): Declare.
19615         (special_function_kind): New enum.
19616         (global_base_init_list): Remove declaration.
19617         (emit_base_init): Don't return a value.
19618         (check_base_init): Don't declare.
19619         (is_aggr_typedef): Likewise.
19620         * decl.c (check_special_function_return_type): New function.
19621         (return_types): Remove.
19622         (grokdeclarator): Use check_special_function_return_type.
19623         (start_function): Don't initialize ctor_label under the new ABI.
19624         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19625         * init.c (begin_init_stmts): Move to top of file.
19626         (finish_init_stmts): Likewise.
19627         (warn_reorder): Don't declare.
19628         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
19629         value.
19630         (check_base_init): Remove.
19631         (is_aggr_typedef): Likewise.
19632         (build_new_1): Don't use the return value of a constructor.
19633         * semantics.c (setup_vtbl_ptr): Don't use the return value
19634         of emit_base_init.
19635         * typeck.c (check_return_expr): Don't magically convert return
19636         statements into `return this' in constructors under the new ABI.
19638         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19639         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19640         (base_ctor_identifier): New macro.
19641         (base_dtor_identifier): Likewise.
19642         (deleting_dtor_identifier): Likewise.
19643         * decl.c: Don't include obstack.h.
19644         (obstack_chunk_alloc): Don't define.
19645         (obstack_chunk_free): Likewise.
19646         (struct predefined_identifier): New type.
19647         (initialize_predefined_identifiers): New function.
19648         (init_decl_processing): Use it.
19649         (debug_temp_inits): Remove.
19650         (start_method): Don't call preserve_data.
19651         (hack_incomplete_structures): Update comment.
19652         * init.c (init_init_processing): Don't initialize
19653         nelts_identifier.
19654         (build_offset_rf): Remove dead code.
19655         (build_delete): Use CLASSTYPE_N_BASECLASSES.
19656         * search.c (init_search_processing): Don't initialize
19657         vptr_identifier.
19659 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19661         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19662         some sign_compare warnings.
19664 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19666         Rename abi::__vmi_class_type_info members.
19667         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19668         base_list, detail_masks members to vmi_flags, vmi_base_count,
19669         vmi_bases and vmi_flags_masks respectively.
19670         (__vmi_class_type_info::vmi_flags_masks): Rename
19671         details_unknown_mask to flags_unknown_mask.
19672         * tinfo.cc (__class_type_info::do_upcast): Adjust.
19673         (__vmi_class_type_info::do_find_public_src): Adjust.
19674         (__vmi_class_type_info::do_dyncast): Adjust.
19675         (__vmi_class_type_info::do_upcast): Adjust.
19677 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19679         * tinfo.cc (convert_to_base): New function.
19680         (get_vbase_offset): Remove. Move into convert_to_base.
19681         (__vmi_class_type_info::do_find_public_src): Adjust.
19682         (__vmi_class_type_info::do_dyncast): Adjust.
19683         (__vmi_class_type_info::do_upcast): Adjust.
19685 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
19687         * tinfo.cc (operator=): Use __builtin_strcmp.
19688         * tinfo2.cc (before): Likewise.
19690 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
19692         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19693         (DECL_SAVED_INLINE): Rename to ...
19694         (DECL_DEFERRED_FN): ... this.
19695         (in_function_p): Remove declaration.
19696         (mark_inline_for_output): Rename to ...
19697         (defer_fn): ... this.
19698         * decl.c (finish_function): Adjust call to mark_inline_for_output.
19699         (in_function_p): Remove definition.
19700         * decl2.c (saved_inlines): Rename to ...
19701         (deferred_fns): ... this.
19702         (saved_inlines_used): Rename to ...
19703         (deferred_fns_used): ... this.
19704         (mark_inline_for_output): Rename to ...
19705         (defer_fn): ... this.
19706         (finish_file): Adjust accordingly.
19707         (init_decl2): Likewise.
19708         * lex.c (cons_up_default_function): Likewise.
19709         * pt.c (mark_decl_instantiated): Likewise.
19710         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19711         circumstances.
19712         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19713         * semantics.c (expand_body): Defer more functions.
19715 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19717         * vec.cc: New file.
19718         * Make-lang.in (CXX_LIB2FUNCS): Add it.
19719         (vec.o): Build it.
19720         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19721         __cxa_vec_delete): Declare.
19723 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19725         * rtti.c (dfs_class_hint_mark): New static function.
19726         (dfs_class_hint_unmark): New static function.
19727         (class_hint_flags): Use them.
19729 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
19731         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19733 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
19735         * cp-tree.h (instantiate_decl): Change prototype.
19736         * decl2.c (mark_used): Adjust call.
19737         * optimize.c (inlinable_function_p): Adjust handling of templates.
19738         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19739         (do_type_instantiation): Likewise.
19740         (instantiate_decl): Defer more templates.
19741         (instantiate_pending_templates): Adjust logic to handle inline
19742         friend functions.
19744         * Makefile.in (GGC_H): New variable.  Use it throughout in place
19745         of ggc.h.
19747         * call.c: Don't include obstack.h.  Include ggc.h.
19748         (obstack_chunk_alloc): Don't define.
19749         (obstack_chunk_free): Likewise.
19750         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19751         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19752         (pop_switch): Free it.
19754         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19756         * dump.c (dequeue_and_dump): Don't try to print the bit_position
19757         if we don't have a DECL_FIELD_OFFSET.
19759 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
19761         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19762         special_function_p.
19764 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19766         * cfns.gperf (hash, libc_name_p): Prototype.
19768         * rtti.c (build_dynamic_cast_1): Constification.
19770         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19772         * semantics.c (deferred_type_access_control): Prototype.
19774 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
19776         Correct many new ABI issues regarding vbase and vcall offset
19777         layout.
19778         * cp-tree.h (BINFO_VTABLE): Document.
19779         (struct lang_type): Tweak formatting.
19780         (BINFO_PRIMARY_BINFO): Add to documentation.
19781         (CLASSTYPE_VSIZE): Fix typo in comment.
19782         (CLASSTYPE_VBASECLASSES): Update documentation.
19783         (BINFO_VBASE_MARKED): Remove.
19784         (SET_BINFO_VBASE_MARKED): Likewise.
19785         (CLEAR_BINFO_VBASE_MARKED): Likewise.
19786         (BINFO_FIELDS_MARKED): Remove.
19787         (SET_BINFO_FIELDS_MARKED): Likewise.
19788         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19789         (enum access_kind): New enumeration.
19790         (num_extra_vtbl_entries): Remove declaration.
19791         (size_extra_vtbl_entries): Likewise.
19792         (get_vtbl_decl_for_binfo): New function.
19793         (dfs_vbase_unmark): Remove declaration.
19794         (mark_primary_bases): Likewise.
19795         * class.c (SAME_FN): Remove.
19796         (struct vcall_offset_data_s): Move definition.
19797         (build_vbase_pointer): Use `build', not `build_binary_op', to
19798         access the vbase pointer under the new ABI.
19799         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19800         (build_primary_vtable): Likewise.
19801         (dfs_mark_primary_bases): Move here from search.c.
19802         (mark_primary_bases): Likewise.
19803         (determine_primary_bases): Under the new ABI, don't make a base
19804         class a primary base just because we don't yet have any virtual
19805         functions.
19806         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19807         (num_vfun_entries): Remove.
19808         (dfs_count_virtuals): Likewise.
19809         (num_extra_vtbl_entries): Likewise.
19810         (size_extra_vtbl_entries): Likewise.
19811         (layout_virtual_bases): Iterate in inheritance graph order under
19812         the new ABI.
19813         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19814         indicate that a vfield is present.
19815         (init_class_processing): Initialize access_public_node, etc., from
19816         ak_public, etc.
19817         (get_vtbl_decl_for_binfo): New function.
19818         (dump_class_hierarchy_r): Likewise.
19819         (dump_class_hierarchy): Use it.
19820         (finish_vtbls): Build the vtbls in inheritance graph order.
19821         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19822         (initialize_vtable): Use get_vtbl_decl_for_binfo.
19823         (accumulate_vtbl_inits): Add comments explaining why a pre-order
19824         walk is required.
19825         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19826         where the vptr points, even for primary vtables.
19827         (build_vtbl_initializer): Adjust handling of vbase and vcall
19828         offsets.
19829         (build_vcall_and_vbase_vtable_entries): New function.
19830         (dfs_build_vbase_offset_vtbl_entries): Remove.
19831         (build_vbase_offset_vtbl_entries): Reimplement.
19832         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19833         were already handled in a primary base class vtable.
19834         (build_vcall_offset_vtbl_entries): Adjust.
19835         (build_rtti_vtbl_entries): Adjust.
19836         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19837         * init.c (expand_virtual_init): Simplify.
19838         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19839         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19840         * search.c (BINFO_ACCESS): New macro.
19841         (SET_BINFO_ACCESS): Likewise.
19842         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19843         (access_in_type): Likewise.
19844         (dfs_accessible_p): Likewise.
19845         (protected_accessible_p): Likewise.
19846         (lookup_fnfields_1): Adjust documentation.
19847         (dfs_mark_primary_bases): Move to class.c
19848         (mark_primary_bases): Likewise.
19849         (dfs_vbase_unmark): Remove.
19850         (virtual_context): Use BINFO_FOR_VBASE.
19851         (dfs_get_vbase_types): Simplify.
19852         (dfs_build_inheritance_graph_order): New function.
19853         (get_vbase_types): Use it.
19854         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19856         * tinfo.cc (get_vbase_offset): New function.
19857         (__vmi_class_type_info::do_find_public_src): Use it.
19858         (__vmi_class_type_info::do_dyncast): Likewise.
19859         (__vmi_class_type_info::do_upcast): Likewise.
19861 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
19863         * lang-specs.h: Pass -fno-show-column to the preprocessor.
19865 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
19867         * rtti.c (class_hint_flags): Rename flags.
19868         (class_initializer): Remove flags.
19869         (synthesize_tinfo_var): Combine offset and flags. Add flags
19870         for __vmi_class_type_info.
19871         (create_tinfo_types): Remove flags from __class_type_info and
19872         __si_class_type_info. Merge flags and offset from
19873         base_class_type_info.
19874         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19875         (__base_class_info::is_virtual_p): Adjust.
19876         (__base_class_info::is_public_p): Adjust.
19877         (__base_class_info::offset): New accessor.
19878         (__class_type_info::details): Remove member.
19879         (__class_type_info::__class_type_info): Lose details.
19880         (__class_type_info::detail_masks): Remove.
19881         (__si_class_type_info::__si_class_type_info): Lose details.
19882         (__vmi_class_type_info::details): New member.
19883         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19884         (__vmi_class_type_info::detail_masks): New member.
19885         * tinfo.cc (__class_type_info::do_upcast): Initialize result
19886         with unknown_details_mask.
19887         (__vmi_class_type_info::do_find_public_src): Adjust
19888         (__vmi_class_type_info::do_dyncast): Adjust.
19889         (__vmi_class_type_info::do_upcast): Set result details, if
19890         needed. Adjust.
19891         (__dynamic_cast): Temporarily #if out optimization.
19893 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
19895         * rtti.c (get_tinfo_decl): Mark used.
19896         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19897         mark as dealt with, if we output it.
19899 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19901         * class.c: Reorganize to put virtual function table initialization
19902         machinery at the end of the file.
19904 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
19906         * class.c (finish_struct): Use bitsize_zero_node.
19907         * pt.c (instantiate_class_template): Likewise.
19909 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19911         Put RTTI entries at negative offsets in new ABI.
19912         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19913         vbase offset at index -3, not -1.
19914         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19915         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19916         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19917         (build_rtti_vtbl_entries): New function.
19918         (set_rtti_entry): Remove.
19919         (build_primary_vtable): Don't use it.
19920         (build_secondary_vtable): Likewise.
19921         (start_vtable): Remove.
19922         (first_vfun_index): New function.
19923         (set_vindex): Likewise.
19924         (add_virtual_function): Don't call start_vtable.  Do call
19925         set_vindex.
19926         (set_primary_base): Rename parameter.
19927         (determine_primary_base): Likewise.
19928         (num_vfun_entries): Don't use skip_rtti_stuff.
19929         (num_extra_vtbl_entries): Include RTTI information.
19930         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19931         (skip_rtti_stuff): Remove.
19932         (dfs_modify_vtables): Don't use it.
19933         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
19934         (layout_nonempty_base_or_field): Update size handling.
19935         (create_vtable_ptr): Tweak.
19936         (layout_class_type): Adjust parameter names.
19937         (finish_struct_1): Simplify.
19938         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19939         (skip_rtti_stuff): Remove.
19940         (first_vfun_index): New function.
19941         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19942         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19943         (marked_vtable_pathp): Declare.
19944         (unmarked_vtable_pathp): Likewise.
19945         * error.c (dump_expr): Use first_vfun_index to calculate vtable
19946         offsets.
19947         * rtti.c (build_headof): Look for RTTI at negative offsets.
19948         (get_tinfo_decl_dynamic): Likewise.
19949         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19950         here.
19951         (create_pseudo_type_info): Do it here instead.  Adjust so that
19952         vptr points at first virtual function.
19953         * search.c (marked_vtable_pathp): Make it global.
19954         (unmarked_vtable_pathp): Likewise.
19955         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19956         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19957         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19958         (get_pure_virtuals): Likewise.
19959         (expand_upcast_fixups): Likewise.
19960         * tree.c (debug_binfo): Likewise.
19961         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19962         negative offset.
19964 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19966         * class.c (check_field_decl): Fix typo.
19967         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19968         (check_methods): Likewise.
19969         (check_field_decls): Likewise.
19970         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19971         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19972         Use DECL_RESULT_FLD, not DECL_RESULT.
19973         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19974         * lex.c (identifier_type): Likewise.
19975         * pt.c (determine_specialization, lookup_template_class): Likewise.
19976         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19977         (resolve_overloaded_unification, more_specialized): Likewise.
19978         * semantics.c (finish_member_declaration): Likewise.
19979         * typeck.c (build_x_function_call): Likewise.
19981 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
19983         * class.c (layout_empty_base): Handle empty bases with non-byte
19984         alignment.
19985         (build_base_field): Likewise.
19986         (layout_virtual_bases): Likewise.
19988         * class.c (finish_struct_1): Fix typo in this change:
19990         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19992 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
19994         * decl.c (grokdeclarator): Count partial specializations when
19995         keeping track of how many template classes have been seen.
19997         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
19999 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20001         * class.c (build_vbase_pointer_fields): layout_field now place_field.
20002         (get_vfield_offset): Use byte_position.
20003         (set_rtti_entry): Set OFFSET to ssizetype zero.
20004         (get_binfo_offset_as_int): Deleted.
20005         (dfs_record_base_offsets): Use tree_low_cst.
20006         (dfs_search_base_offsets): Likewise.
20007         (layout_nonempty_base_or_field): Reflect changes in RLI format
20008         and call byte_position.
20009         (layout_empty_base): Convert offset to ssizetype.
20010         (build_base_field): use rli_size_unit_so_far.
20011         (dfs_propagate_binfo_offsets): Do computation in proper type.
20012         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
20013         (layout_class_type): Reflect changes in RLI names and fields.
20014         (finish_struct_1): Set DECL_FIELD_OFFSET.
20015         * dump.c (dequeue_and_dump): Call bit_position.
20016         * expr.c (cplus_expand_constant): Use byte_position.
20017         * rtti.c (expand_class_desc): Use bitsize_one_node.
20018         * typeck.c (build_component_addr): Use byte_position and don't
20019         special case for zero offset.
20021 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
20023         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
20025         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
20026         tinfo object.
20027         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
20028         vtable.
20030 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20032         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
20033         DECL_P macros.
20034         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
20035         make_typename_type, check_initializer, cp_finish_decl,
20036         xref_tag): Likewise.
20037         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
20038         decl_namespace, arg_assoc_template_arg, arg_assoc,
20039         validate_nonmember_using_decl, do_class_using_decl): Likewise.
20040         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
20041         args_to_string): Likewise.
20042         * friend.c (is_friend): Likewise.
20043         * lex.c (note_got_semicolon, note_list_got_semicolon,
20044         is_global): Likewise.
20045         * method.c (build_overload_nested_name, build_overload_value,
20046         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
20047         * parse.y (typename_sub, typename_sub1): Likewise.
20048         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
20049         process_partial_specialization, convert_template_argument,
20050         template_args_equal, add_pending_template, lookup_template_class,
20051         for_each_template_parm_r, maybe_fold_nontype_arg,
20052         tsubst, instantiate_template, type_unification_real, unify,
20053         instantiate_pending_templates, set_mangled_name_for_template_decl):
20054         Likewise.
20055         * repo.c (repo_get_id, repo_template_used): Likewise.
20056         * search.c (lookup_field_1): Likewise.
20057         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
20058         * xref.c (classname): Likewise.
20060 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
20062         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
20063         (CANONICAL_BINFO): New macro.
20064         (BINFO_NEW_VTABLE_MARKED): Use it.
20065         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
20066         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
20067         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
20068         not TREE_TYPE.
20069         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20070         (build_secondary_vtable): Likewise.
20071         (dfs_finish_vtbls): Likewise.
20072         (dfs_accumulate_vtbl_inits): Likewise.
20073         (accumulate_vtbl_inits): New function.
20074         (finish_vtbls): Make sure that virtual bases come after
20075         non-virtual bases in the vtable group.
20076         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
20077         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20078         * search.c (struct vbase_info): Move definition.
20079         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20080         (unmarked_new_vtable_p): Likewise.
20081         (dfs_mark_vtable_path): Remove.
20082         (dfs_mark_new_vtable): Remove.
20083         (dfs_unmark_new_vtable): Likewise.
20084         (dfs_clear_search_slot): Likewise.
20085         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
20086         (dfs_clear_vbase_slots): Likewise.
20087         (init_vbase_pointers): LIkewise.
20089 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
20091         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20092         SIZETYPE to a non-SIZETYPE.
20094 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
20096         * class.c (layout_virtual_bases): Adjust names in conditionally
20097         compiled code.
20099         * class.c (record_base_offsets): New function.
20100         (layout_conflict_p): Likewise.
20101         (layout_nonempty_base_or_field): Use it.
20102         (layout_empty_base): New function.
20103         (build_base_field): Use it.
20104         (build_base_fields): Update comment.
20105         (layout_virtual_bases): Fold in a little code form
20106         layout_basetypes.  Use layout_empty_base.
20107         (layout_basetypes): Remove.
20108         (end_of_class): New function.
20109         (layout_class_type): Use it.  Adjust.
20111         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20112         (fntype_p): Remove.
20113         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20114         comment.
20115         (dfs_skip_nonprimary_vbases_markedp): Likewise.
20116         * typeck.c (fntype_p): Remove.
20118         * cp-tree.h (TI_SPEC_INFO): Remove.
20119         (CLASSTYPE_TI_SPEC_INFO): Likewise.
20120         * pt.c (process_partial_specialization): Likewise.
20122         * class.c (build_base_field): Fix thinko in computation of binfo
20123         offsets.
20125         * tree.c (mark_local_for_remap_p): Mark variables declared in
20126         TARGET_EXPRs as well.
20128 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
20130         * typeck.c (require_complete_type, complete_type,
20131         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20132         build_array_ref, convert_arguments, pointer_diff,
20133         build_x_unary_op, build_unary_op, build_c_cast,
20134         build_modify_expr): Use COMPLETE_TYPE_P etc.
20135         * call.c (is_complete, convert_like_real,
20136         build_new_method_call): Likewise.
20137         * class.c (build_vbase_pointer_fields, check_bases,
20138         build_base_field, finish_struct_1, pushclass): Likewise.
20139         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20140         * decl.c (maybe_process_template_type_declaration, pushtag,
20141         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20142         layout_var_decl, check_initializer, cp_finish_decl,
20143         grokdeclarator, require_complete_types_for_parms,
20144         grok_op_properties, xref_tag, xref_basetypes,
20145         check_function_type): Likewise.
20146         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20147         * friend.c (do_friend): Likewise.
20148         * init.c (build_offset_ref): Likewise.
20149         * parse.y (structsp): Likewise.
20150         * pt.c (maybe_process_partial_specialization,
20151         tsubst_friend_function, instantiate_class_template, tsubst,
20152         do_type_instantiation, instantiate_pending_templates): Likewise.
20153         * repo.c (repo_get_id): Likewise.
20154         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20155         synthesize_tinfo_var, emit_support_tinfos): Likewise.
20156         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20157         * semantics.c (begin_class_definition): Likewise.
20158         * tree.c (build_cplus_method_type): Likewise.
20159         * typeck2.c (digest_init, build_functional_cast,
20160         add_exception_specifier): Likewise.
20161         * parse.h, parse.c: Regenerated.
20163 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
20165         * inc/cxxabi.h: New header file. Define new-abi entry points.
20166         (__pointer_type_info::target): Rename member to ...
20167         (__pointer_type_info::type): ... here.
20168         (__base_class_info::type): Rename member to ...
20169         (__base_class_info::base): ... here.
20170         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20171         * cp-tree.h (CPTI_ABI): New global tree enumeration.
20172         (abi_node): New global tree node.
20173         * decl.c (abi_node): Document.
20174         (init_decl_processing): Initialize abi_node.
20175         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20176         (get_vmi_pseudo_type_info): Likewise.
20177         (create_tinfo_types): Likewise.
20178         (emit_support_tinfos): Likewise.
20179         * tinfo.h (cxxabi.h): Include for new-abi.
20180         Move rtti class definitions to new header file.
20181         * tinfo.cc (abi): Use the namespace.
20182         (std): Move new abi rtti classes from here ...
20183         (__cxxabiv1): ... to here.
20184         * tinfo2.cc (cxxabi.h): Include for new-abi.
20185         Move rtti class definitions to new header file.
20186         (std): Move new abi rtti classes from here ...
20187         (__cxxabiv1): ... to here.
20188         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20189         namespace.
20191 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20192             Jason Merrill  <jason@casey.cygnus.com>
20194         * method.c (build_overload_int): Use host_integerp.
20196 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20198         * init.c (build_offset_ref): Handle the case of a templated member
20199         function.
20201 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20203         * except.c (expand_exception_blocks): Clear catch_clauses_last.
20205 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
20207         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20208         * class.c (check_bitfield_decl): Turn illegal bitfields into
20209         non-bitfields.
20210         (dfs_propagate_binfo_offsets): Adjust for new size_binop
20211         semantics.
20212         (dfs_offset_for_unshared_vbases): Likewise.
20213         * cvt.c (cp_convert_to_pointer): Convert NULL to a
20214         pointer-to-member correctly under the new ABI.
20215         * expr.c (cplus_expand_constant): Don't use cp_convert when
20216         turning an offset into a pointer-to-member.
20217         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20218         when dereferencing them under the new ABI.
20219         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20220         of pointers-to-members under the new ABI.
20222         * class.c (check_bitfield_decl): Remove restriction on really long
20223         bitfields.
20224         (layout_class_type): Implement new ABI handling of bitfields
20225         longer than their types.
20227 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20229         * parse.y (extdefs): Call ggc_collect.
20230         * parse.c: Regenerated.
20232 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
20234         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20235         (note_name_declared_in_class): Use OVL_CURRENT to get at a
20236         potential overload.
20238 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20240         * class.c (build_vbase_path): Use integer_zerop.
20241         (build_vtable_entry): Use tree_low_cst.
20242         (get_vfield_offset): Use bit_position.
20243         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20244         Use tree_low_cst.
20245         (check_bitfield_decl): Set DECL_SIZE using convert.
20246         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20247         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20248         Use tree_low_cst.
20249         (finish_struct_1): Use bit_position.
20250         (dump_class_hierarchy): Use tree_low_cst.
20251         * cp-tree.h (min_precision): Add declaration.
20252         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20253         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20254         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20255         * expr.c (cplus_expand_constant): Use bit_position.
20256         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20257         * rtti.c (get_base_offset): Use bit_position.
20258         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20259         host_integerp, and tree_low_cst.
20260         (pointer_int_sum): Use integer_zerop.
20261         (build_component_addr): Use bit_position.
20263 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
20265         * typeck.c (require_complete_type): Don't assume size_zero_node.
20266         (complete_type_or_else): Likewise.
20268 2000-03-16  Steven Grady <grady@digitaldeck.com>
20269             Jason Merrill  <jason@casey.cygnus.com>
20271         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20273 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
20275         * decl2.c (grokfield): Bail out if type is error_mark_node.
20277 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20279         * tinfo2.cc (__ptr_to_member_data): Rename to ...
20280         (__pointer_to_member_data): ... here. Adjust.
20281         * rtti.c (create_tinfo_types): Adjust.
20283 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20285         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20286         * decl.c (ref_desc_type_node): Undocument.
20287         * rtti.c (ptr_ref_initializer): Rename to ...
20288         (ptr_initializer): ... here. Adjust comments.
20289         (ptmd_initializer): Fix comment thinko.
20290         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20291         (create_tinfo_types): Remove ref_desc_type_node init.
20292         * tinfo2.cc (__reference_type_info): Remove.
20294 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20296         * decl.c (cp_finish_decl): Remove obsolete comment.
20298         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20300 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
20302         * cp-tree.h: Tweak documentation.
20303         * class.c (build_vbase_pointer_fields): Layout the fields, too.
20304         (avoid_overlap): Remove.
20305         (get_binfo_offset_as_int): New function.
20306         (dfs_serach_base_offsets): Likewise.
20307         (layout_nonempty_base_or_field): Likewise.
20308         (build_base_field): Layout fields here.  Avoid placing two objects
20309         of the same type at the same address, under the new ABI.
20310         (build_base_fields): Adjust accordingly.
20311         (create_vtable_ptr): Return the new field, but don't attach it to
20312         TYPE_FIELDS.
20313         (remove_base_field): Remove.
20314         (remove_base_fields): Remove.
20315         (layout_basetypes): Adjust accordingly.
20316         (layout_class_type): Call layout_field for each field, rather than
20317         just making a wholesale call to layout_type.
20319 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
20321         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20323 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
20325         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20327         * except.c (dtor_nothrow): New fn.
20328         (do_pop_exception): Use it.  Take type parm.
20329         (push_eh_cleanup): Take type parm.
20330         (expand_start_catch_block): Pass it.
20331         (build_eh_type_type_ref): Accept null type.
20333 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
20335         * cp-tree.h (revert_static_member_fn): Change prototype.
20336         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20337         (grok_op_properties): Likewise.
20338         (start_function): Likewise.
20339         (revert_static_member_fn): Simplify.
20340         * pt.c (check_explicit_specialization): Adjust call to
20341         revert_static_member_fn.
20343 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
20345         * cp-tree.h (scope_kind): New type.
20346         (tmpl_spec_kind): Likewise.
20347         (declare_pseudo_global_level): Remove.
20348         (pseudo_global_level_p): Rename to template_parm_scope_p.
20349         (pushlevel): Remove declaration.
20350         (begin_scope): New function.
20351         (finish_scope): Likewise.
20352         (current_tmpl_spec_kind): Likewise.
20353         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20354         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
20355         Add template_spec_p.
20356         (toplevel_bindings_p): Adjust.
20357         (declare_pseudo_global_level): Remove.
20358         (pseudo_global_level_p): Rename to template_parm_scope_p.
20359         (current_tmpl_spec_kind): New function.
20360         (begin_scope): Likewise.
20361         (finish_scope): Likewise.
20362         (maybe_push_to_top_level): Adjust.
20363         (maybe_process_template_type_declaration): Likewise.
20364         (pushtag): Likewise.
20365         (pushdecl_nonclass_level): Likewise.
20366         (lookup_tag): Likewise.
20367         (grokfndecl): Handle member template specializations.  Share
20368         constructor and non-constructor code.
20369         * decl2.c (check_classfn): Handle member template specializations.
20370         * pt.c (begin_template_parm_list): Use begin_scope.
20371         (begin_specialization): Likewise.
20372         (end_specialization): Likewise.
20373         (check_explicit_specialization): Use current_tmpl_spec_kind.
20374         Handle member template specializations.
20375         (end_template_decl): Use finish_scope.  Remove call to
20376         get_pending_sizes.
20377         (push_template_decl_real): Remove bogus error message.
20378         (tsubst_decl): Fix typo in code contained in comment.
20379         (instantiate_template): Handle member template specializations.
20380         (most_general_template): Likewise.
20382 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
20384         * lex.c (whitespace_cr): Compress consecutive calls to warning().
20385         (do_identifier): Ditto for error().
20387         * pt.c (convert_nontype_argument): Ditto for cp_error().
20388         (convert_template_argument): Ditto for cp_pedwarn().
20390 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
20392         * exception.cc (__check_null_eh_spec): New fn.
20393         * except.c (expand_end_eh_spec): Call it if the spec is throw().
20395 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
20397         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20398         * except.c (expand_end_eh_spec): Add the return type.
20399         * rtti.c (throw_bad_cast): Add the parmtypes.
20400         (throw_bad_typeid): Likewise.
20402         * semantics.c (expand_stmt): Only leave out rtl for unused
20403         artificials, and set DECL_IGNORED_P on them as well.
20404         * decl.c (wrapup_globals_for_namespace): Likewise.
20406 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
20408         * decl.c (maybe_commonize_var): Skip all artificial decls.
20409         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20411 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
20413         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20414         * cp-tree.h: Declare flag_enforce_eh_specs.
20415         * decl.c (store_parm_decls, finish_function): Check it.
20417         C library functions don't throw.
20418         * Makefile.in (cfns.h): New target.
20419         (except.o): Depend on it.
20420         * Make-lang.in (cc1plus): Depend on cfns.gperf.
20421         * cfns.gperf: New file.
20422         * cfns.h: Generated.
20423         * except.c: Include it.
20424         (nothrow_libfn_p): New fn.
20425         * decl.c (grokfndecl): Use it.
20426         * cp-tree.h: Declare it.
20428         * decl.c (push_overloaded_decl_1, auto_function,
20429         define_function): Lose.
20430         (build_library_fn_1): New static fn.
20431         (builtin_function): Use it.
20432         (get_atexit_node): Use build_library_fn_ptr.
20433         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20434         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20435         push_void_library_fn, push_throw_library_fn): New fns.
20436         * cp-tree.h: Declare them.
20437         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20438         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20439         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20440         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20441         * rtti.c (build_runtime_decl): Lose.
20442         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20443         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20444         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20446         * call.c (build_call): Remove result_type parm.
20447         Call mark_used on unused artificial fns.
20448         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20450 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
20452         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20453         appropriate.
20454         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20455         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20456         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20457         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20458         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20459         expand_generic_desc): Likewise.
20461 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20463         * exception.cc (__cp_pop_exception): Cleanup the original object.
20465 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20467         * decl.c (grok_op_properties): Merge conversion to void warning
20468         with other silly op warnings.
20470 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
20472         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20473         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
20475 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20477         * decl.c (cp_make_fname_decl): New function.
20478         (wrapup_globals_for_namespace): Don't emit unused static vars.
20479         (init_decl_processing): Remove comment about use of
20480         array_domain_type. Set make_fname_decl.
20481         (cp_finish_decl): Remove __FUNCTION__ nadgering.
20482         * semantics.c (begin_compound_stmt): Remove
20483         current_function_name_declared flagging.
20484         (expand_stmt): Don't emit unused local statics.
20485         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20486         specially.
20488 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20490         * typeck.c (convert_for_assignment): Don't look at array
20491         initializer.
20492         * call.c (convert_like_real): Likewise.
20494 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
20496         Add initial support for '\uNNNN' specifier.
20497         * lex.c (read_ucs): New fn.
20498         (readescape, skip_white_space): Call it.
20499         (is_extended_char, is_extended_char_1): New fns.
20500         (utf8_extend_token): New fn, #if 0'd out.
20501         (real_yylex): Treat extended chars like letters.
20503         * search.c (note_debug_info_needed): Walk the bases even if we
20504         weren't deferring the type itself.
20506 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20508         * decl2.c (finish_objects): Constify a char*.
20510         * method.c (emit_thunk): Likewise.
20512 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
20514         * typeck.c (dubious_conversion_warnings): Look through
20515         REFERENCE_TYPE.
20517 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20519         * class.c (dfs_modify_vtables): I is now unsigned.
20520         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20521         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20522         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20523         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20524         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20525         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20526         Call integer_all_onesp.
20527         * typeck2.c (process_init_constructor): Use compare_tree_int.
20529         * lang-specs.h (as): Don't call if -syntax-only.
20531 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
20533         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20534         RTL_EXPR_HAS_NO_SCOPE after all.
20536 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
20538         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20539         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
20540         RTL_EXPR_HAS_NO_SCOPE.
20542         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20543         later.
20545         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20547 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
20549         * call.c (convert_like): Macrofy.
20550         (convert_like_with_context): New macro.
20551         (convert_like_real): Renamed from convert_like.  Add calling
20552         context parameters, for diagnostics. Add recursive flag.  Call
20553         dubious_conversion_warnings for outer conversion.
20554         (build_user_type_conversion): Use convert_like_with_context.
20555         (build_over_call): Likewise. Don't warn about dubious
20556         conversions here. Adjust convert_default_arg calls.
20557         (convert_default_arg): Add context parameters for diagnostics.
20558         Pass through to convert_like_with_context.
20559         * cp-tree.h (convert_default_arg): Add context parameters.
20560         (dubious_conversion_warnings): Prototype new function.
20561         * typeck.c (convert_arguments): Adjust convert_default_arg call.
20562         (dubious_conversion_warnings): New function, broken
20563         out of convert_for_assignment.
20564         (convert_for_assignment): Adjust.
20566 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
20568         * decl2.c (key_method): Break out from...
20569         (import_export_vtable, import_export_class): ...here.
20571         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20572         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20574         * search.c (note_debug_info_needed, dfs_debug_mark,
20575         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
20576         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20578 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
20580         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20581         typos.
20583 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
20585         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20586         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20587         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20588         (lang_type): Split gets_new into has_new and has_array_new.
20589         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20590         (TYPE_GETS_NEW): Split into ...
20591         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20592         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20593         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20594         (build_op_new_call): Don't declare.
20595         (build_new_1): Likewise.
20596         * call.c (build_op_new_call): Remove.
20597         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20598         instead of TYPE_NEEDS_DESTRUCTOR.
20599         (finish_struct_bits): Likewise.
20600         (add_implicitly_declared_members): Likewise.
20601         (check_field_decl): Likewise.
20602         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20603         correctly under the new ABI.
20604         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20605         instead of TYPE_NEEDS_DESTRUCTOR.
20606         (initialize_local_var): Likewise.
20607         (destroy_local_var): Likewise.
20608         (cp_finish_decl): Likewise.
20609         (register_dtor_fn): Likewise.
20610         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20611         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
20612         TYPE_VEC_DELETE_TAKES_SIZE here.
20613         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20614         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20615         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20616         (finish_destructor_body): Likewise.
20617         (maybe_build_cleanup_1): Likewise.
20618         * decl2.c (do_static_destruction): Likewise.
20619         * init.c (build_new_1): Make it static.
20620         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20621         (expand_cleanup_for_base): Likewise.
20622         (get_cookie_size): New function.
20623         (build_new_1): Handle array-new cookies correctly under the new
20624         ABI.
20625         (build_vec_delete_1): Likewise.
20626         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20627         (build_delete): Likewise.
20628         (build_vec_delete): Handle array-new cookies correctly under the new
20629         ABI.
20630         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20631         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20632         TYPE_HAS_ARRAY_NEW_OPERATOR.
20633         * ptree.c (print_lang_type): Check them.
20634         * search.c (context_for_name_lookup): Fix typo in comment.
20635         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20636         * tree.c (break_out_cleanups): Likewise.
20637         (build_cplus_array_test_1): Likewise.
20638         (cp_build_qualified_type_real): Likewise.
20639         * typeck.c (complete_type): Likewise.
20641         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20642         the command-line, not the end.
20644 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
20646         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20648 2000-03-02  Tom Tromey  <tromey@cygnus.com>
20650         * cp-tree.h (build_java_class_ref): Declare.
20651         * init.c (build_java_class_ref): No longer static.
20652         * except.c (expand_throw): Generate a Java-style `throw' if the
20653         thrown object is a "Java" object.
20654         (initialize_handler_parm): Generate a Java-style lookup of
20655         exception info if the caught object is a "Java" object.
20656         (catch_language, catch_language_init): New globals.
20657         (decl_is_java_type): New function.
20658         (expand_start_catch_block): Don't call push_eh_info() or
20659         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
20660         class reference to build_catch_block.
20662 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20664         * typeck.c (comptypes): Treat sizetype like its language equivalent.
20666 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
20668         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20669         to merge reference/pointer code and fix incorrect warnings.
20671 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
20673         * search.c (protected_accessible_p): Use context_for_name_lookup.
20675         * init.c (construct_virtual_bases): Fix thinko.
20676         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20678 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20680         * decl.c (current_function_decl): Move to toplev.c.
20682 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
20684         * pt.c (fn_type_unification): Unify return type, whenever
20685         provided.
20686         (get_bindings_real): Only pass return type when necessary.
20687         Remove explicit return type check.
20688         * class.c (resolve_address_of_overloaded_function): Pass desired
20689         return type to fn_type_unification.
20691 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20693         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20694         DECL_FIELD_SIZE.
20695         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20696         DECL_FIELD_SIZE.
20697         * rtti.c (expand_class_desc): Likewise.
20698         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20699         (THUNK_VCALL_OFFSET): Likewise.
20700         (THUNK_DELTA): Reflect changes in ../tree.h.
20702 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
20704         * search.c (protected_accessible_p): Also allow the access if
20705         the member is public in DERIVED.  Lose TYPE parm.
20706         (friend_accessible_p): Lose TYPE parm.
20707         (accessible_p): Adjust.
20709 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20711         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20712         on things that are not sizes; ssize_binop deleted.
20713         Call size_diffop when appropriate.
20714         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20715         (build_primary_vtable, build_secondary_vtable): Likewise.
20716         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20717         Variable I is HOST_WIDE_INT.
20718         (get_vfield_offset): Pass proper types to size_binop.
20719         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20720         (finish_struct_1): Likewise.
20721         (skip_rtti_stuff): Arg N is now pointer to signed.
20722         (layout_class_type): Use size_zero_node.
20723         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20724         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20725         * decl.c (complete_arry_type): Pass proper types to size_binop.
20726         (xref_basetypes): BINFO_OFFSET is sizetype.
20727         * error.c (dump_expr): Don't use size_binop non-sizes.
20728         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20729         * init.c (construct_virtual_bases): Fix type error.
20730         (build_vec_delete_1): Pass proper type to size_binop and don't
20731         fold result.
20732         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20733         * rtti.c (get_base_offset): Pass proper type to size_binop.
20734         * search.c (dfs_find_vbases): Fix type error.
20735         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20736         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20737         * tree.c (debug_binfo): Variable N is signed.
20738         Use HOST_WIDE_INT_PRINT_DEC.
20739         * typeck.c (comptypes): sizetype is same as equivalent integer type.
20740         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20741         size_one_node and size_zero_node.
20742         (c_alignof): Use size_one_node.
20743         (build_component_addr): Pass proper types to size_binop.
20744         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20746 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
20748         Implement class scope using-declarations for functions.
20749         * class.c (handle_using_decl): Call add_method for used functions.
20750         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20751         (add_method): Used functions are hidden by local functions.
20752         (check_bases_and_members): Handle using-decls before finalizing
20753         CLASSTYPE_METHOD_VEC.
20754         * call.c (add_function_candidate): Add ctype parm; if nonzero,
20755         override the type of 'this' accordingly.
20756         (add_template_candidate, add_template_candidate_real): Add ctype parm.
20757         (convert_class_to_reference, build_user_type_conversion_1,
20758         build_new_function_call, build_object_call, build_new_op,
20759         build_new_method_call): Pass ctype parm.
20761         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20762         the baselink.
20763         * call.c (convert_class_to_reference, build_user_type_conversion_1,
20764         build_new_function_call, build_object_call, build_new_op,
20765         build_new_method_call, build_op_delete_call): Don't get basetype_path
20766         from a baselink.
20767         * typeck.c (build_component_ref): Likewise.
20768         * init.c (build_offset_ref): Likewise.
20769         (resolve_offset_ref): Don't call enforce_access.
20770         Call build_scoped_ref.
20771         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
20772         would cause an error or if -pedantic.
20773         * class.c (alter_access): Lose binfo parm.
20775 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20777         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20778         types.
20780 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
20782         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20783         pseudo_type_info creation into the std namespace
20785 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20787         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20788         (import_export_class): Remove declaration.
20789         * decl2.c (import_export_class): Make it static.
20790         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20791         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20792         EXPR_WITH_FILE_LOCATION.
20793         * lex.c (check_newline): Tweak filename/lineno setting.
20794         * semantics.c (begin_while_stmt): Fix typo in comment.
20796 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20798         * lang-options.h (-fmessage-length=): Add missing option.
20800         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20802 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
20804         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20806 2000-02-25  Jim Wilson  <wilson@cygnus.com>
20808         * optimize.c (expand_call_inline): Emit the return label before
20809         evaluating the return value.
20811 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
20813         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20814         than duplicating functionality here.
20815         * optimize.c: Include input.h.
20816         (expand_call_inline): Use push_srcloc and pop_srcloc.
20817         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20818         * parse.c: Regenerated.
20819         * Makefile.in (lex.o): Depend on input.h.
20820         (optimize.o): Likewise.
20822 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
20824         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20825         function type, rather than ICE.
20827 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
20829         * decl.c (grokdeclarator): Call decl_type_access_control.
20830         * parse.y (parse_end_decl): Don't call decl_type_access_control if
20831         decl is null.
20833 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
20835         * decl.c (decls_match): Remove obsolete static member nadgering.
20837 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20839         * decl.c (grokdeclarator): Change ANSI to ISO.
20840         * lex.c (consume_string, readescape, do_identifier): Likewise.
20841         (parse_float, real_yylex): Likewise.
20842         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20843         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20844         new_type_id, maybe_label_decls, simple_stmt,
20845         for.init.statement): Likewise.
20846         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20847         * semantics.c (finish_named_return_value): Likewise.
20848         * parse.c: Regenerate.
20850 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
20852         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20853         (CPTI_CLASS_STAR_TYPE): Remove.
20854         (vtable_index_type): Likewise.
20855         (class_star_type_node): Remove.
20856         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20857         (build_binary_op_nodefault): Remove.
20858         * call.c (build_new_op): Use build_binary_op instead of
20859         build_binary_op_nodefault.
20860         * decl.c (init_decl_processing): Remove class_star_type_node
20861         initialization.  Make delta_type_node ptrdiff_type_node under the
20862         new ABI.  Initialize vtable_index_type.
20863         (build_ptrmemfunc_type): Build different structures for the new
20864         ABI.
20865         (build_enumerator): Use build_binary_op instead of
20866         build_binary_op_nodefault.
20867         * method.c (build_overload_value): Mangle pointers-to-members
20868         appropriately under the new ABI.
20869         * typeck.c (build_array_ref): Use build_binary_op instead of
20870         build_binary_op_nodefault.
20871         (get_member_function_from_ptrfunc): Adjust for the new ABI.
20872         (build_binary_op_nodefault): Rename to ...
20873         (build_binary_op): ... this.  Remove old version.  Adjust for
20874         pointer-to-member comparisons under the new ABI.
20875         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
20876         (build_ptrmemfunc): Adjust for the new ABI.
20877         (expand_ptrmemfunc_cst): Likewise.
20878         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20879         (pfn_from_ptrmemfunc): Adjust for the new ABI.
20881 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
20883         * call.c (build_object_call): Compress consecutive calls to
20884         cp_error.
20885         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20886         (build_op_delete_call): Adjust message formatting.
20888         * class.c (check_bases): Compress consecutive calls to
20889         cp_pedwarn.
20890         (finish_struct_anon): Say 'ISO C++'.
20892         * decl.c (start_decl): Same here.
20893         (grok_reference_init): Likewise.
20894         (grokfndecl): Correct message formatting.
20895         (grokfndecl): Improve diagnostic.
20896         (check_static_variable_definition): Likewise. Say 'ISO C++'
20897         (compute_array_index_type): Say 'ISO C++'
20898         (create_array_type_for_decl): Compress consecutive calls to
20899         cp_error.
20900         (grokdeclarator): Say 'ISO C++'
20901         (grok_op_properties): Likewise.
20903         * decl2.c (delete_sanity): Clairify diagnostic.
20904         (check_member_template): Same here.
20905         (grok_function_init): Use consistent terminology.
20907         * expr.c (do_case): Say 'ISO C++'
20909         * friend.c (do_friend): Compress consecutive calls to warning.
20911 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
20913         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20914         * class.c (build_secondary_vtable): Reorganize.  Don't create a
20915         new vtable under the new ABI.
20916         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20917         computing the size.
20918         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20919         the initializing elements.
20920         (initialize_vtable): New function.
20921         (dfs_finish_vtbls): Use it.
20922         (dfs_accumulate_vtbl_inits): New function.
20923         (finish_vtbls): Merge primary and secondary vtables under the new
20924         ABI.
20925         (finish_struct_1): Remove redundant call to layout_vtable_decl.
20926         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20927         aren't VAR_DECLs.
20929         * class.c (build_vtable): New function, split out from ...
20930         (get_vtable_decl): ... here, and ...
20931         (build_secondary_vtable): ... here.
20933         * pt.c (tsubst_decl): Fix formatting.
20935 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20937         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20938         (avoid_overlap, build_base_field): Likewise.
20939         (build_base_field, build_base_fields, is_empty_class):
20940         Test DECL_SIZE with integer_zero.
20941         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20942         * cp-tree.h (struct lang_type): New field size_unit.
20943         (CLASSTYPE_SIZE_UNIT): New macro.
20944         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20945         (cp_finish_decl): Delete -Wlarger-than processing.
20946         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20947         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20948         * tree.c (make_binfo): binfo vector is one entry longer.
20949         (walk_tree): Walk DECL_SIZE_UNIT.
20951 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
20953         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20954         comment.
20955         (build_vtable_entry): Don't assume all vtable entries are
20956         functions.
20957         (build_vtbl_initializer): Adjust accordingly.
20958         (get_vtable_decl): Fix formatting.
20960 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
20962         * semantics.c (deferred_type_access_control): Walk the entire
20963         type_lookups list.
20964         (save_type_access_control): Rename from
20965         initial_deferred_type_access_control.  Just remember the value.
20966         (decl_type_access_control): New fn.
20967         (begin_function_definition): Use deferred_type_access_control, after
20968         we've started the function.  Set type_lookups to error_mark_node.
20969         * parse.y (frob_specs, fn.def1): Adjust.
20970         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20971         (parse_end_decl, parse_bitfield0, parse_method): New fns.
20972         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20973         (after_type_component_declarator0): Likewise.
20974         (after_type_component_declarator): Likewise.
20975         (notype_component_declarator): Likewise.
20976         * cp-tree.h: Adjust.
20978         * decl.c (redeclaration_error_message): Allow redeclaration of
20979         namespace-scope decls.
20981 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20983         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20985 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
20987         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
20988         * decl2.c (grokclassfn): Likewise.
20990         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
20992         * decl2.c (lang_decode_option): Don't set default message length
20993         here.
20994         * lex.c (lang_init_options): Set it here.
20996 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
20998         Make DECL_CONTEXT mean the class in which a member function was
20999         declared, even for a virtual function.
21000         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
21001         (DECL_FRIEND_CONTEXT): New macro.
21002         (DECL_REAL_CONTEXT): Remove.
21003         (SET_DECL_FRIEND_CONTEXT): Likewise.
21004         (DECL_VIRTUAL_CONTEXT): Adjust.
21005         (DECL_CLASS_SCOPE_P): Use TYPE_P.
21006         (add_friends): Remove.
21007         (hack_decl_function_context): Likewise.
21008         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
21009         CP_DECL_CONTEXT.
21010         (build_over_call): Fix indentation.  Use DECL_CONTEXT
21011         instead of DECL_CLASS_CONTEXT.
21012         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
21013         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21014         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21015         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
21016         (build_base_field): Likewise.
21017         (finish_struct_1): Likewise.
21018         (build_self_reference): Likewise.
21019         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
21020         DECL_REAL_CONTEXT.
21021         (pushtag): Use decl_function_context, not
21022         hack_decl_function_context.
21023         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21024         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
21025         (pushdecl): Remove bogus code.
21026         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
21027         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21028         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21029         Use decl_function_context, nothack_decl_function_context.
21030         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
21031         (grokdeclarator): Likewise.  Use decl_function_context, not
21032         hack_decl_function_context.
21033         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
21034         (start_function): Use DECL_FRIEND_CONTEXT, not
21035         DECL_CLASS_CONTEXT.  Use decl_function_context, not
21036         hack_decl_function_context.
21037         (finish_function): Use decl_function_context, not
21038         hack_decl_function_context.
21039         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
21040         DECL_CLASS_CONTEXT.
21041         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
21042         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
21043         (grokfield): Likewise.
21044         (finish_builtin_type): Likewise.
21045         (finish_vtable_vardec): Use decl_function_context, not
21046         hack_decl_function_context.
21047         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21048         (start_static_initialization_or_destruction): Likewise.
21049         (finish_static_initialization_or_destruction): Likewise.
21050         (mark_used): Adjust logic for deciding when to synthesize methods.
21051         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
21052         DECL_REAL_CONTEXT.
21053         * error.c (dump_function_decl): Use DECL_CONTEXT, not
21054         DECL_CLASS_CONTEXT.
21055         * friend.c (is_friend): Likewise.
21056         (add_friends): Remove.
21057         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
21058         * lex.c (begin_definition_of_inclass_inline): Use
21059         decl_function_context, not hack_decl_function_context.
21060         (process_next_inline): Likewise.
21061         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21062         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
21063         DECL_CLASSS_CONTEXT.
21064         (hack_identifier): Likewise.
21065         (synthesize_method):  Use decl_function_context, not
21066         hack_decl_function_context.
21067         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
21068         DECL_REAL_CONTEXT.
21069         (is_member_template): Use decl_function_context, not
21070         hack_decl_function_context.  Use DECL_CONTEXT, not
21071         DECL_CLASS_CONTEXT.
21072         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
21073         DECL_CLASS_CONTEXT.
21074         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
21075         DECL_REAL_CONTEXT.
21076         (push_template_decl_real): Likewise.
21077         (instantiate_class_template): Don't call add_friends.
21078         (tsubst_default_argument): Use DECL_CONTEXT, not
21079         DECL_REAL_CONTEXT.
21080         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21081         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21082         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
21083         DECL_CLASS_CONTEXT.
21084         * repo.c (repo_inline_used): Likewise.
21085         * search.c (current_scope): Adjust for new _CONTEXT macros.
21086         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21087         DECL_REAL_CONTEXT.
21088         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21089         (lookup_fnfields_here):Likewise.
21090         (check_final_overrider): Likewise.
21091         (init_vbase_pointers): Likewise.
21092         (virtual_context): Likewise.
21093         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21094         (expand_body): Use decl_function_context, not
21095         hack_decl_function_context.
21096         * tree.c (hack_decl_function_context): Remove.
21097         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21098         DECL_CLASS_CONTEXT.
21099         * typeck2.c (error_not_base_type): Likewise.
21101 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
21103         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21105 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21107         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21109 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
21111         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21113 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
21115         * decl2.c (lang_decode_option): Enable automatic line wrapping.
21117 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
21119         * parse.y (frob_specs): Split out...
21120         (parse_decl): From here.
21121         (fn.def2): Call initial_deferred_type_access_control.
21122         (after_type_component_declarator0): Call frob_specs.
21123         (notype_component_declarator0): Likewise.
21124         * search.c (friend_accessible_p): Nested classes are friends of their
21125         enclosing classes.
21127 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
21129         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21130         used to create an implicit temporary.
21132         * class.c (dfs_modify_vtables): Tweak calculation of functions to
21133         override.
21135 2000-02-08  Nathan Sidwell  <nathan@acm.org>
21137         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21138         strip array element qualifiers too.
21140 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
21142         * decl.c (store_parm_decls): Don't build cleanups for parameters
21143         while processing_template_decl.
21145 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
21147         * cp-tree.h (struct saved_scope): Add incomplete field.
21148         (namespace_scope_incomplete): New macro.
21149         * decl.c (pushdecl): Use it.
21150         (hack_incomplete_structures): Use it.  See through artificial
21151         binding levels.
21152         (mark_saved_scope): Mark it.
21154         Implement access control for nested types.
21155         * search.c (type_access_control): New fn.
21156         (accessible_p): Now we do perform access control for types.
21157         * semantics.c (deferred_type_access_control): New fn.
21158         (initial_deferred_type_access_control): New fn.
21159         (begin_function_definition): Call it.  Add lookups parm.
21160         * decl.c (struct binding_level): Add this_class field.
21161         (pushlevel_class): Set it.
21162         (mark_binding_level): Mark it.
21163         (lookup_name_real): Use it.  Call type_access_control.
21164         (mark_saved_scope): Mark lookups field.
21165         * cp-tree.h (flagged_type_tree): Add lookups field.
21166         (struct saved_scope): Add lookups field.
21167         (type_lookups): New macro.
21168         * parse.y (declmods): Now <ftype>.
21169         (parse_decl): Add lookups parm.  Call
21170         initial_deferred_type_access_control.
21171         (lang_extdef): Clear type_lookups.
21172         (typed_declspecs, declmods, typespec): Set lookups field.
21173         (initdcl): Call deferred_type_access_control.
21174         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21175         component_decl_1, named_parm): Adjust.
21176         * friend.c (is_friend): Nested classes are friends of their
21177         enclosing classes.
21179         * class.c (currently_open_derived_class): New fn.
21180         * method.c (hack_identifier): Use it.
21182         * lex.c (do_identifier): Remove obsolete code.
21184         * parse.y (typed_typespecs): Propagate new_type_flag properly.
21186 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
21188         * tinfo.h: Remove apostrophes from C++ comment (xgettext
21189         thinks this file is plain C).
21191 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21193         * Makefile.in (call.o): Depend on $(EXPR_H).
21195         * call.c: Include "expr.h".
21197         * class.c (dump_class_hierarchy): Add prototype.
21199         * search.c (dfs_get_pure_virtuals): Likewise.
21201 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
21203         * parse.y (simple_stmt): Allow :: token in asm parameter list.
21204         * parse.c: Rebuilt.
21206 2000-01-31  Jim Wilson  <wilson@cygnus.com>
21208         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21209         Store it in DECL_FCONTEXT.
21210         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21212 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
21214         * tinfo.h (old abi): #include "tconfig.h".
21215         * tinfo.cc (convert_to_base): Move into old abi section.
21217 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
21219         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21220         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21221         (BINFO_PRIMARY_BINFO): New macro.
21222         (BF_DELTA): Rename to ...
21223         (BV_DELTA): ... this.
21224         (BF_VCALL_INDEX): Rename to ...
21225         (BV_VCALL_INDEX): ... this.
21226         (BF_FN): Rename to ...
21227         (BV_FN): ... this.
21228         * class.c (build_vbase_path): Adjust for changes to reverse_path.
21229         (set_rtti_entry): Rename BF_ macros to BV_ variants.
21230         (modify_vtable_entry): Simplify.
21231         (add_virtual_function): Rename BF_ macros to BV_ variants.
21232         (build_vtable_initializer): Likewise.
21233         (get_class_offset_1): Remove.
21234         (dfs_get_class_offset): Likewise.
21235         (get_class_offset): Likewise.
21236         (dfs_find_final_overrider): New function.
21237         (find_final_overrider): Likewise.
21238         (modify_one_vtable): Remove.
21239         (dfs_find_base): New function.
21240         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
21241         find_final_overrider.
21242         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
21243         virtuals.
21244         (dfs_fixup_vtable_deltas): Remove.
21245         (override_one_vtable): Remove.
21246         (merge_overrides): Likewise.
21247         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21248         unreal chilren of virtual bases.
21249         (finish_struct_1): Don't use merge_overrides.  Don't use
21250         dfs_fixup_vtable_deltas.
21251         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21252         BINFOs.
21254 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21255             Jason Merrill  <jason@yorick.cygnus.com>
21257         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21259 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
21261         * exception.cc (__throw_bad_typeid): Add missing std::.
21263 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21265         * cp-tree.h (make_thunk): PROTO -> PARAMS.
21267 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
21269         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21271         Runtime support for new-abi rtti.
21272         * inc/typeinfo (type_info::operator!=): Define in class.
21273         (type_info::before, type_info::name, type_info::operator==,
21274         type_info::operator!=): Define new ABI implementations.
21275         (type_info::is_pointer_p, type_info::is_function_p): Declare
21276         new virtual functions.
21277         (type_info::do_catch, type_info::do_upcast): Likewise.
21279         * tinfo.h (__base_class_info): Define new class.
21280         (__class_type_info): Likewise.
21281         (__si_class_type_info): Likewise.
21282         (__vmi_class_type_info): Likewise.
21283         (__dynamic_cast): Prototype.
21285         * tinfo.cc: Conditionalize old and new rtti mechanisms.
21286         (type_info::is_pointer_p): Define new function.
21287         (type_info::is_function_p): Likewise.
21288         (type_info::do_catch): Likewise.
21289         (type_info::do_upcast): Likewise.
21290         (vtable_prefix): New structure for vtable access.
21291         (adjust_pointer): Define new template function.
21292         (contained_p, public_p, virtual_p, contained_public_p,
21293         contained_nonpublic_p, contained_nonvirtual_p): Define new
21294         functions.
21295         (nonvirtual_base_type): New local variable.
21296         (__class_type_info::~__class_type_info): Define.
21297         (__si_class_type_info::~__si_class_type_info): Likewise.
21298         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21299         (__class_type_info::do_catch): Define new function.
21300         (__class_type_info::do_upcast): Likewise.
21301         (__class_type_info::find_public_src): Likewise.
21302         (__class_type_info::do_find_public_src): Likewise.
21303         (__si_class_type_info::do_find_public_src): Likewise.
21304         (__vmi_class_type_info::do_find_public_src): Likewise.
21305         (__class_type_info::do_dyncast): Likewise.
21306         (__si_class_type_info::do_dyncast): Likewise.
21307         (__vmi_class_type_info::do_dyncast): Likewise.
21308         (__class_type_info::do_upcast): Likewise.
21309         (__si_class_type_info::do_upcast): Likewise.
21310         (__vmi_class_type_info::do_upcast): Likewise.
21311         (__dynamic_cast): Likewise.
21313         * tinfo2.cc (__fundamental_type_info): Define new class.
21314         (__pointer_type_info): Likewise.
21315         (__reference_type_info): Likewise.
21316         (__array_type_info): Likewise.
21317         (__function_type_info): Likewise.
21318         (__enum_type_info): Likewise.
21319         (__ptr_to_member_type_info): Likewise.
21320         (__fundamental_type_info::~__fundamental_type_info): Define.
21321         (__pointer_type_info::~__pointer_type_info): Likewise.
21322         (__reference_type_info::~__reference_type_info): Likewise.
21323         (__array_type_info::~__array_type_info): Likewise.
21324         (__function_type_info::~__function_type_info): Likewise.
21325         (__enum_type_info::~__enum_type_info): Likewise.
21326         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21327         (__pointer_type_info::do_catch): Define new function.
21328         (__ptr_to_member_type_info::do_catch): Define new function.
21330         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21331         (__is_pointer): Likewise.
21333         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21335 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
21337         * cp/class.c (build_vtable): Rename to build_primary_vtable.
21338         (prepare_fresh_vtable): Rename to build_secondary_vtable.
21339         (make_new_vtable): New function.
21340         (modify_vtable_entry): Handle generation of new vtables correctly.
21341         (modify_one_vtable): Remove unused parameter.
21342         (dfs_fixup_vtable_deltas): Likewise.
21343         (override_one_vtable): Use build_secondary_vtable.
21344         (finish_struct_1): Use build_primary_vtable and
21345         build_secondary_vtable.
21347 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
21349         * cp/decl.c: Adjust variable names, comments, help strings.
21351 2000-01-29  Nathan Sidwell  <nathan@acm.org>
21353         * new2.cc (operator delete[]): Use operator delete, don't assume
21354         implementation.
21356 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
21358         * class.c (build_vtbl_initializer): Add argument to
21359         build_vtable_entry call.
21361 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
21363         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21364         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21365         (BF_DELTA): New macro.
21366         (BF_VCALL_INDEX): Likewise.
21367         (BF_FN): Likewise.
21368         (THUNK_VCALL_OFFSET): Likewise.
21369         (make_thunk): Change prototype.
21370         * class.c (build_vtable_entry): Integrate
21371         build_vtable_entry_for_fn.  Handle vcall indices.
21372         (build_vtable_entry_for_fn): Remove.
21373         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
21374         BF_VCALL_INDEX, BF_FN.
21375         (modify_vtable_entry): Integrate common code from
21376         modify_one_vtable and dfs_fixup_vtable_deltas.
21377         (add_virtual_function): Set BF_VCALL_INDEX.
21378         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
21379         and BF_FN.
21380         (modify_one_vtable): Simplify.
21381         (dfs_fixup_vtable_deltas): Likewise.
21382         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21383         * method.c (make_thunk): Handle vcall indices.
21385 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
21387         Compiler side new abi rtti (not enabled).
21388         * cp-tree.h (new_abi_rtti_p): New macro.
21389         (emit_support_tinfos): Prototype new function.
21390         (tinfo_decl_p): Likewise.
21391         (emit_tinfo_decl): Likwise.
21392         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21393         macros.
21394         (doing_runtime): New local static.
21395         (init_rtti_processing): Add new-abi initializer.
21396         (get_tinfo_decl): Add new-abi logic.
21397         (tinfo_from_decl): Likewise.
21398         (build_dynamic_cast_1): Likewise.
21399         (qualifier_flags): New static function.
21400         (tinfo_base_init): Likewise.
21401         (generic_initializer): Likewise.
21402         (ptr_ref_initializer): Likewise.
21403         (ptmd_initializer): Likewise.
21404         (class_hint_flags): Likewise.
21405         (class_initializer): Likewise.
21406         (synthesize_tinfo_var): Likewise.
21407         (create_real_tinfo_var): Likewise.
21408         (create_pseudo_type_info): Likewise.
21409         (get_vmi_pseudo_type_info): Likewise.
21410         (create_tinfo_types): Likewise.
21411         (emit_support_tinfos): New global function.
21412         (tinfo_decl_p): New global predicate.
21413         (emit_tinfo_decl): New global function.
21414         * class.c (set_rtti_entry): Generalize for old and new rtti.
21415         (build_vtbl_initializer): Likewise.
21416         * decl2.c (finish_file): Likewise.
21418 2000-01-27  Jim Wilson  <wilson@cygnus.com>
21420         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21421         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21423 2000-01-27  Mike Stump  <mrs@wrs.com>
21425         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21426         for scopes.
21428 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
21430         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21432 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
21434         * optimize.c (calls_setjmp_r): Supply new argument
21435         to special_function_p.
21437 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21439         * call.c: PROTO -> PARAMS.
21440         * class.c: Likewise.
21441         * cp-tree.h: Likewise.
21442         * cvt.c: Likewise.
21443         * decl.c: Likewise.
21444         * decl.h: Likewise.
21445         * decl2.c: Likewise.
21446         * dump.c: Likewise.
21447         * errfn.c: Likewise.
21448         * error.c: Likewise.
21449         * except.c: Likewise.
21450         * expr.c: Likewise.
21451         * init.c: Likewise.
21452         * input.c: Likewise.
21453         * lex.c: Likewise.
21454         * lex.h: Likewise.
21455         * method.c: Likewise.
21456         * optimize.c: Likewise.
21457         * parse.y: Likewise.
21458         * pt.c: Likewise.
21459         * repo.c: Likewise.
21460         * rtti.c: Likewise.
21461         * search.c: Likewise.
21462         * semantics.c: Likewise.
21463         * spew.c: Likewise.
21464         * tree.c: Likewise.
21465         * typeck.c: Likewise.
21466         * typeck2.c: Likewise.
21467         * xref.c: Likewise.
21469 2000-01-25  Richard Henderson  <rth@cygnus.com>
21471         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21473 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
21475         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21476         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21477         (struct vcall_offset_data_s): New type.
21478         (dfs_vcall_offset_queue_p): New function.
21479         (dfs_build_vcall_offset_vtbl_entries): Likewise.
21480         (build_vcall_offset_vtbl_entries): Likewise.
21481         (layout_vtable_decl): Likewise.
21482         (num_vfun_entries): Likewise.
21483         (num_extra_vtbl_entries): Add the entries for vcall offsets.
21484         (build_vtbl_initializer): Likewise.
21485         (dfs_finish_vtabls): Use layout_vtable_decl.
21486         (modify_one_vtables): Always duplicate vtables under the new ABI.
21487         (finish_struct_1): Use layout_vtable_decl.
21489 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21491         * decl.c (member_function_or_else): Change third arg from a format
21492         specifier to an `enum overload_flags'.  Callers changed.
21494 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
21496         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21497         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21498         build_const_cast, get_delta_difference, check_return_expr): Avoid
21499         ANSI string concatenation usage.
21501 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
21503         * class.c (layout_class_type): Put the fields required to make a
21504         class non-empty at the end, not the beginning, of the TYPE_FIELDs
21505         list.
21507 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
21509         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21510         template.
21512         * decl2.c (mark_used): Do instantiate inlines that have been
21513         explicitly instantiated.
21515 2000-01-24  Richard Henderson  <rth@cygnus.com>
21517         * call.c (build_over_call): Use expand_tree_builtin.
21518         * typeck.c (build_function_call_real): Likewise.
21519         (build_binary_op_nodefault): Handle unordered compares.
21521 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21523         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21524         cp_tree_index values.
21525         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21526         New global node #defines for them.
21527         * rtti.c (call_void_fn): Replace with ...
21528         (build_runtime_decl): ... new static function.
21529         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21530         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21531         (build_dynamic_cast_1): Always produce correctly typed result.
21532         Explicitly produce type_info addresses. Use dynamic_cast_node.
21533         * exception.cc (__throw_bad_cast): Return `void *'.
21534         (__throw_bad_typeid): Return `const type_info &'.
21536 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21538         * cp-tree.h (get_vtable_decl): Prototype new function.
21539         * class.c (get_vtable_decl): New function. Broken out from ...
21540         (build_vtable): ... here. Use it.
21541         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21542         by get_vtable_decl.
21544 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21546         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21547         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21548         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21549         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21550         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21551         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21552         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21553         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21554         (CPTI_TINFO_VAR_ID): New enumeration.
21555         (__tp_desc_type_node, __access_mode_type_node,
21556         __bltn_desc_type_node, __user_desc_type_node,
21557         __class_desc_type_node, __ptr_desc_type_node,
21558         __attr_desc_type_node, __func_desc_type_node,
21559         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21560         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21561         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21562         enum_desc_type_node, class_desc_type_node,
21563         si_class_desc_type_node, vmi_class_desc_type_node,
21564         ptmd_desc_type_node, base_desc_type_node): New #defines.
21565         (tinfo_fn_id, tinfo_fn_type): Rename to ...
21566         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21567         (tinfo_var_id): New enumeration.
21568         (DECL_TINFO_FN_P): Augment comment.
21569         * decl.c (cp_global_trees): Adjust documentation.
21570         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21571         tinfo_decl_type and tinfo_var_id.
21572         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21573         (build_typeid): Remove unused variable.
21574         (get_tinfo_var): Use tinfo_var_id.
21575         (tinfo_name): New static function.
21576         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21577         (tinfo_from_decl): Likewise.
21578         (get_base_offset): New static function, broken out of
21579         expand_class_desc.
21580         (expand_si_desc): Use tinfo_name.
21581         (expand_class_desc): Likewise. Lose local static variable.
21582         Use base_desc_type_node. Use get_base_offset.
21583         (expand_ptr_desc): Use tinfo_name.
21584         (expand_attr_desc): Likewise.
21585         (expand_generic_desc): Likewise.
21587         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21588         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21590 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21592         * cp-tree.h (__eprintf): Remove declaration.
21593         * tree.c (__eprintf): Remove definition.
21595 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
21596             Mark Mitchell  <mark@codesourcery.com>
21598         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21599         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21601 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
21603         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21605 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21607         * cp-tree.h (register_dtor_fn): New function.
21608         * decl.c (destroy_local_static): Rename to ...
21609         (register_dtor_fn): ... this.  Give it external linkage.
21610         (expand_static_init): Use it.
21611         * decl2.c (do_static_initialization): Likewise, if using
21612         __cxa_atexit.
21613         (do_static_destruction): Check that __cxa_atexit is not in use.
21614         (finish_file): Don't call do_static_destruction if using
21615         __cxa_atexit.
21617         * typeck.c (convert_arguments): Restore two-message error
21618         reporting.
21620 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
21622         Remap dynamic cast hint values to be consistent across ABIs.
21623         * search.c (dynamic_cast_base_recurse): Remap generated value.
21624         (get_dynamic_cast_base_type): Adjust documentation.
21625         * tinfo.h (__user_type_info::dyncast): Likewise.
21626         (__user_type_info::find_public_subobj): Remap BOFF meaning.
21627         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21628         (__class_type_info::do_dyncast): Likewise.
21629         (__class_type_info::do_find_public_subobj): Likewise.
21630         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21632 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21634         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21636         * typeck2.c (incomplete_type_error): Restore previous
21637         cp_error and cp_error_at call sequence.
21639 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
21641         * class.c (dump_class_hierarchy): Make format agree with argument;
21642         cast pointer to unsigned long and print with %lx.
21644 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21646         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21648         * typeck.c (composite_pointer_type, common_type,
21649         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21650         build_function_call_real, convert_arguments,
21651         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21652         build_unary_op, mark_addressable, build_compound_expr,
21653         build_static_cast, build_reinterpret_cast, build_const_cast,
21654         build_c_cast, build_modify_expr, get_delta_difference,
21655         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21656         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
21657         into a single one.
21658         * typeck2.c (readonly_error, abstract_virtuals_error,
21659         process_init_constructor, check_for_new_type): Likewise.
21661 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
21663         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21664         VAR_DECLs.
21666 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
21668         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21669         (build_x_typeid): Likewise.
21670         (get_tinfo_fn): Likewise.
21671         (get_tinfo_fn_unused): Rename to ...
21672         (get_tinfo_decl): ... here.
21673         * rtti.c (build_headof): Replace logic error with assertion.
21674         (get_tinfo_fn_dynamic): Rename to ...
21675         (get_tinfo_decl_dynamic): ... here. Make static. Use
21676         complete_type_or_else.
21677         (build_x_typeid): Move into ...
21678         (build_typeid): ... here. Adjust call to
21679         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21680         throw_bad_typeid expression.
21681         (get_tinfo_fn_unused): Rename to ...
21682         (get_tinfo_decl): ... here. Adjust comment.
21683         (get_tinfo_fn): Delete.
21684         (tinfo_from_decl): New static function.
21685         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21686         (get_typeid): Use complete_type_or_else.
21687         (build_dynamic_cast_1): Adjust calls to
21688         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21689         * parse.y (primary): Adjust call to build_typeid.
21690         * except.c (build_eh_type_type_ref): Adjust call to
21691         get_tinfo_decl. Mark as used.
21692         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21693         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21694         * parse.c: Regenerated.
21696 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
21698         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
21699         calling convention.
21700         (resolves_to_fixed_type_p): Document calling convention.
21701         * rtti.c (build_x_typeid): Initialize NONNULL.
21703         * cp-tree.h (build_shared_int_cst): New function.
21704         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21705         * class.c (modify_vtable_entry): Likewise.
21706         (add_virtual_function): Split out code to generated shared
21707         INTEGER_CSTs to build_share_int_cst.
21708         (modify_all_vtables): Handle all the overridden functions here.
21709         Add overridden functions from non-primary virtual bases to the
21710         primary vtable.
21711         (finish_struct_1): Adjust call to modify_all_vtables.  Add
21712         overridden functions from non-primary bases to the vtable.
21713         * tree.c (build_shared_int_cst): New function.
21715         * cp-tree.h (scratchalloc): Remove.
21716         (build_scratch_list): Likewise.
21717         * call.c (convert_class_to_reference): Replace build_scratch_list
21718         and build_expr_list with build_tree_list.
21719         (add_candidate): Replace scratchalloc with expralloc.  Note memory
21720         leak.
21721         (build_user_type_conversion_1):  Replace build_scratch_list
21722         and build_expr_list with build_tree_list.
21723         (build_new_op): Likewise.
21724         (build_op_delete_call): Likewise.
21725         (convert_like): Likewise.
21726         * cvt.c (ocp_convert): Likewise.
21727         * decl.c (start_decl): Likewise.
21728         (start_function): Likewise.
21729         (finish_destructor_body): Likewise.
21730         (maybe_build_cleanup_1): Likewise.
21731         * decl2.c (reparse_decl_as_expr): Likewise.
21732         * init.c (perform_member_init): Likewise.
21733         (expand_cleanup_for_base): Likewise.
21734         (build_builtin_delete_call): Likewise.
21735         (build_new_1): Likewise.
21736         (build_delete): Likewise.
21737         * method.c (do_build_assign_ref): Likewise.
21738         * parse.y (already_scoped_stmt): Likewise.
21739         (nontrivial_exprlist): Likewise.
21740         (net_initializer): Likewise.
21741         (initlist): Likewise.
21742         * parse.c: Regenerated.
21743         * rtti.c (build_x_typeid): Likewise.
21744         (build_dynamic_cast_1): Likewise.
21745         * typeck.c (build_x_compound_expr): Likewise.
21746         (build_static_cast): Likewise.
21747         (build_modify_expr): Likewise.
21749         * cp-tree.h (DECL_VINDEX): Add documentation.
21750         * class.c (build_vtable_entry): Likewise.
21751         (start_vtable): Add comment.
21752         (add_virtual_function): Replace pending_hard_virtuals with
21753         overridden_virtuals and pending_virtuals with new_virtuals.
21754         Replace redundant assignments with assertions.
21755         (check_for_override): Add comment.
21756         (check_bases_and_members): Replace pending_hard_virtuals with
21757         overridden_virtuals and pending_virtuals with new_virtuals.
21758         (create_vtbl_ptr): Likewise.
21759         (layout_class_type): Likewise.
21760         (finish_struct_1): Likewise.  Add comments.
21762 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
21764         * class.c (finish_struct_1): Replace redundant code with
21765         assertions.
21767         * cp-tree.h (flag_new_abi): Move.
21768         (flag_use_cxa_atexit): Likewise.
21769         (flag_honor_std): Likewise.
21770         (flag_rtti): Likewise.
21771         (vbase_offsets_in_vtable_p): Define.
21772         (vptrs_present_everywhere_p): Likewise.
21773         (TYPE_CONTAINS_VPTR_P): Likewise.
21774         (dfs_walk_real): Declare.
21775         * class.c (build_vbase_pointer_fields): Check
21776         vbase_offsets_in_vtable_p.
21777         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21778         BINFO_VPTR_FIELD.
21779         (build_vbase_offset_vtbl_entries): Simplify.
21780         (build_vbase_offset_vtbl_entries): Adjust.
21781         (build_vbase_pointer): Add ability to look up vbase offsets in
21782         vtable.
21783         (start_vtable): New function.
21784         (add_virtual_function): Use it.
21785         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21786         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21787         (build_vtbl_initializer): Take the type of the complete object as
21788         input.  Use it to correctly calculate vbase offsets.
21789         (dfs_finish_vtbls): Pass the complete type to
21790         build_vtbl_initializer.
21791         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21792         (create_vtable_ptr): Create a vtable even if there are no
21793         new virtual functions, under the new ABI.
21794         (finish_struct_1): Likewise.
21795         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21796         * decl.c (exapnd_static_init): Remove call to
21797         preserve_initializer.
21798         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21799         vtables.
21800         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21801         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21802         (construct_virtual_bases): Don't initialize virtual base pointers
21803         under the new ABI.
21804         (build_aggr_init): Clean up comment.
21805         (expand_aggr_init_1): Likewise.
21806         * rtti.c (expand_class_desc): Store the virtual function table
21807         index where the vbase offset lives in the offset field.
21808         * search.c (dfs_walk_real): Make it global.
21809         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21810         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21812         * tinfo.h (USItype): Make it signed under the new ABI.
21813         * tinfo.cc (convert_to_base): New function.  Encapsulate base
21814         conversion logic here.
21815         (__class_type_info::do_upcast): Use it.
21816         (__class_type_info::do_dyncast): Likewise.
21817         (__class_type_info::do_find_public_subobj): Likewise.
21819         * init.c (construct_virtual_bases): Don't look up the addresses of
21820         virtual bases at run-time.
21822         * class.c (build_vbase_pointer): Relocate.
21823         (build_vbase_pointer_fields): Likewise.
21824         (dfs_build_vbase_offset_vtbl_entries): Likewise.
21825         (build_vbase_offset_vtbl_entries): Likewise.
21827         * decl.c (init_decl_processing): Complain if -fnew-abi
21828         -fno-vtable-thunks is used.
21830         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21831         flag_new_abi.
21833 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
21835         * cp-tree.h (num_extra_vtbl_entries): New function.
21836         (size_extra_vtbl_entries): Likewise.
21837         (dfs_vtable_path_unmark): Likewise.
21838         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21839         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21840         * class.c (num_extra_vtbl_entries): New function.
21841         (size_extra_vtbl_entries): Likewise.
21842         (dfs_build_vbase_offset_vtbl_entries): New function.
21843         (build_vbase_offset_vtbl_entries): Likewise.
21844         (build_vtbl_initializer): Use it.
21845         (finish_struct_1): Adjust vtable sizes (using
21846         num_extra_vtbl_entries).
21847         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21848         THUNK_DECL is non-NULL before expanding it.
21849         * init.c (expand_virtual_init): Adjust the vtable pointer by
21850         size_extra_vtbl_entries before storing it.
21851         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21852         Handle TREE_LIST parameters here, not in the dfs_* functions.
21853         (dfs_unmarked_real_bases_queue_p): Adjust.
21854         (dfs_marked_real_bases_queue_p): Likewise.
21855         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21856         (dfs_vtable_path_marked_real_bases_queue_p): New function.
21857         (dfs_vtable_path_unmark): Likewise.
21859 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
21861         * optimize.c (copy_body_r): Clear the operand three of a
21862         TARGET_EXPR when copying it.
21864 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21866         * method.c (build_decl_overload_real): Check whether we are in ::
21867         before returning __builtin_new/delete.
21869 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
21871         * pt.c (tsubst_friend_function): Improve comment.
21872         (instantiate_decl): Avoid crashing when a "nested" function is
21873         instantiated from the top level.
21875         * dump.c (dqeueue_and_dump): Dump
21876         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21878 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21880         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21882 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
21884         * g++spec.c (lang_specific_driver): Add -fnew-abi if
21885         ENABLE_NEW_GXX_ABI defined.
21886         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21887         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21888         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21890 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
21892         * decl.c (start_cleanup_fn): Call pushdecl.
21894         * call.c (convert_class_to_reference): Fix typos.
21895         (build_conditional_expr): Handle errors gracefully.
21896         * class.c (push_nested_class): Likewise.
21897         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21898         (DECL_THIS_EXTERN): Use it.
21899         (DECL_THIS_STATIC): Likewise.
21900         * cvt.c (convert_to_void): Handle errors gracefully.
21901         (build_expr_type_conversion): Likewise.
21902         * decl.c (maybe_push_decl): Likewise.
21903         (start_decl_1): Likewise.
21904         (require_complete_types_for_parms): Likewise.
21905         * parse.y (structsp): Likewise.
21906         (base_class): Likewise.
21907         * parse.c: Regenerated.
21908         * pt.c (finish_member_template_decl): Likewise.
21909         * typeck.c (decay_conversion): Likewise.
21911         * cp-tree.h (dfs_skip_vbases): New function.
21912         (find_vbase_instance): Likewise.
21913         * class.c (determine_primary_base): Allow a nearly empty base to
21914         serve as a primary base class under the new ABI.
21915         (get_class_offset_1): Rename to ...
21916         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
21917         messages here.
21918         (get_class_offset): Use it.  Issue error messages here.
21919         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21920         find the right copies of virtual bases.
21921         (fixup_vtable_deltas1): Rename to ...
21922         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
21923         bases as primary bases.
21924         (fixup_vtable_deltas): Remove.
21925         (override_one_vtable): Handle virtual bases as primary bases.
21926         (merge_overrides): Likewise.
21927         (finish_struct_1): Likewise.
21928         (dump_class_hierarchy): Dump primary-ness of bases as well.
21929         * search.c (mark_primary_bases): Use a pre-order traversal to
21930         handle primary virtual bases.
21931         (dfs_skip_vbases): New fiunction.
21932         (expand_upcast_fixups): Adjust to handle primary virtual bases.
21933         (fixup_virtual_upcast_offsets): Likewise.
21934         (fixup_all_virtual_upcast_offsets): Likewise.
21935         (dfs_find_vbase_instances): New function.
21936         (find_vbase_instance): Likewise.
21938 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
21940         * lex.c (DIR_SEPARATOR): Delete macro.
21942 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
21944        * decl2.c (lang_decode_option): Handle automatic line wrapping
21945        option.
21947 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
21949         * friend.c (do_friend): Don't resolve scopes when processing
21950         template declarations, even if the qualifying scope doesn't
21951         involve template parameters.
21953 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
21955         * class.c (dfs_modify_vtables_queue_p): Remove.
21956         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21957         and dfs_marked_real_bases_queue_p instead of
21958         dfs_modify_vtables_queue_p.
21960         * class.c (build_vbase_path): Simplify.
21961         (dfs_propagate_binfo_offsets): New function.
21962         (propagate_binfo_offsets): Use it.
21963         (remove_base_field): Simplify.
21964         (dfs_set_offset_for_vbases): Remove.
21965         (dfs_set_offset_for_shared_vbases): New function.
21966         (dfs_set_offset_for_unshared_vbases): Likewise.
21967         (layout_virtual_bases): Use them.
21968         (layout_basetypes): Don't call propagate_binfo_offsets.
21969         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21970         for the vbases.
21972         * class.c (build_base_field): New function, split out from ...
21973         (build_base_fields): ... here.  Use it.  Allocate primary bases
21974         first, under the new ABI.
21975         (get_vtable_entry): Remove.
21976         (remove_base_field): New function, split out from ...
21977         (remove_base_fields): ... here.  Adjust since primary bases come
21978         first under the new ABI.
21980         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21981         (initialize_vtbl_ptrs): New function.
21982         (expand_indirect_vtbls_init): Change prototype.
21983         (convert_pointer_to_vbase): Declare.
21984         * init.c (expand_direct_vtbls_init): Remove.
21985         (dfs_initialize_vtbl_ptrs): New function.
21986         (initialize_vtbl_ptrs): Likewise.
21987         (emit_base_init): Use initialize_vtbl_ptrs.
21988         * search.c (convert_pointer_to_vbase): Make it global.
21989         (expand_indirect_vtbls_init): Remove vtable initialization code.
21990         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
21992         * class.c (dfs_finish_vtbls): New function.
21993         (finish_vtbls): Use it.
21994         (dump_class_hierarchy): New function.
21996         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
21997         (BINFO_VBASE_PRIMARY_P): New macro.
21998         (BINFO_VIRTUALS): Add to documentation.
21999         (SET_BINFO_PRIMARY_MARKED_P): Remove.
22000         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22001         (dfs_mark_primary_bases_queue_p): Likewise.
22002         (dfs_unmarked_real_bases_queue_p): New function.
22003         (dfs_marked_real_bases_queue_p): Likewise.
22004         * search.c (dfs_mark_primary_bases): Adjust.
22005         (mark_primary_bases): Likewise.
22006         (get_shared_vbase_if_not_primary): New function.
22007         (dfs_unmarked_real_bases_queue_p): Likewise.
22008         (dfs_marked_real_bases_queue_p): Likewise.
22009         (dfs_get_pure_virtuals): Simplify.
22010         (get_pure_virtuals): Likewise.
22012 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
22014         * lex.c: Include tm_p.h.
22016 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
22018         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
22020 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
22022         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
22023         * pt.c (instantiate_decl): Defer comdat templates that might not be
22024         needed.
22026         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
22027         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
22028         (finish_file): Likewise.
22030         * decl2.c (import_export_class): Undo 12/14 change.
22032         * error.c (dump_decl): operator new, not operatornew.
22034         * class.c (field_decl_cmp): A nontype is "greater" than a type.
22035         * search.c (lookup_field_1): Look for the last field with the
22036         desired name.
22038 2000-01-05  Nathan Sidwell  <nathan@acm.org>
22040         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
22041         FUNCTION_DECL.
22043 2000-01-05  Nathan Sidwell  <nathan@acm.org>
22045         * typeck.c (build_static_cast): Don't strip target qualifiers
22046         when casting from a class.
22048 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
22050         * class.c (warn_hidden): Initialize variable `fndecl'.
22052 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
22054         * decl.c (flag_isoc9x): New variable to be able to use code in
22055         c-common.c.  For now always zero.
22057 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
22059         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
22060         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
22061         or unshare_base_binfos for virtual bases here.
22062         * search.c (dfs_get_vbase_types): Do it here.
22063         (get_vbase_types): Adjust.
22065 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
22067         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
22068         (BINFO_PRIMARY_MARKED_P): Use flag 5.
22069         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22070         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22071         (unmark_primary_bases): Remove declaration.
22072         (unmarkedp): Declare.
22073         (dfs_vbase_unmark): Likewise.
22074         * class.c (determine_primary_base): Return immediately if there
22075         are no base classes.  Call mark_primary_bases here.
22076         (modify_all_direct_vtables): Remove.
22077         (modify_all_indirect_vtables): Remove.
22078         (dfs_modify_vtables_queue_p): New function.
22079         (dfs_modify_vtables): New function.
22080         (modify_all_vtables): Use them.
22081         (build_base_fields): Build FIELD_DECLs for primary virtual base
22082         classes.
22083         (create_vtable_ptr): Don't call determine_primary_base here.
22084         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22085         (dfs_set_offset_for_vbases): ... this.
22086         (layout_virtual_bases): Use it.
22087         (layout_class_type): Call determine_primary_base here.
22088         * search.c (unmarkedp): Make it global.
22089         (shared_marked_p): Simplify.
22090         (shared_unmarked_p): Likewise.
22091         (dfs_primary_bases_queue_p): Remove.
22092         (dfs_unmark_primary_bases): Likewise.
22093         (unmark_primary_bases): Likewise.
22094         (mark_primary_bases): Simplify.
22095         (get_pure_virtuals): Don't call mark_primary_bases here.
22096         (dfs_vbase_unmark): New function.
22097         (get_vbase_types): Simplify.
22099         * class.c (struct base_info): Remove.
22100         (determine_primary_base): Take has_virtual_p rather than a
22101         base_info as input.  Don't calculate max_has_virtual.
22102         (finish_struct_bits): Remove max_has_virtual argument.
22103         (create_vtable_ptr): Remove max_has_virtual_p argument.
22104         (layout_virtual_bases): Remove max argument.
22105         (layout_basetypes): Likewise.
22106         (layout_class_type): Remove max_has_virtual_p argument.
22107         (finish_struct_1): Remove max_has_virtual.
22109         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22110         (layout_basetypes): Remove.
22111         * class.c (propagate_binfo_offsets): Moved here from tree.c.
22112         Update to handle primary virtual bases.
22113         (remove_base_fields): New function, split out from
22114         layout_basetypes.
22115         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22116         (layout_virtual_bases): New function, split out from
22117         layout_basetypes.  Update to handle primary virtual bases.
22118         (layout_basetypes): Moved here from tree.c.  Use
22119         remove_base_fields and layout_virtual_bases.
22120         * search.c (dfs_mark_primary_bases_queue_p): New function.
22121         (mark_primary_bases): Use it.
22122         * tree.c (CEIL): Remove.
22123         (propagate_binfo_offsets): Remove.
22124         (layout_basetypes): Remove.
22126 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
22128         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22129         (BINFO_PRIMARY_MARKED_P): New macro.
22130         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22131         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22132         (mark_primary_bases): New function.
22133         (unmark_primary_bases): Likewise.
22134         * search.c (get_abstract_virtuals_1): Remove.
22135         (dfs_mark_primary_bases): New function.
22136         (mark_primary_bases): Likewise.
22137         (dfs_unmark_primary_bases): Likewise.
22138         (unmark_primary_bases): Likewise.
22139         (dfs_get_pure_virtuals): Likewise.
22141 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
22143         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22144         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22145         (modify_one_vtable): Adjust.
22146         (fixup_vtable_deltas1): Likewise.
22147         (override_one_vtable): Likewise.
22148         * search.c (get_abstract_virtuals_1): Likewise.
22149         (get_pure_virtuals): Likewise.
22150         (expand_upcast_fixups): Likewise.
22151         * tree.c (debug_binfo): Likewise.
22153         * class.c (build_vtable): Don't return a value.  Don't rebuild
22154         vtables for bases that have already been handled.
22155         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22156         already been handled.
22157         (modify_one_vtable): Adjust accordingly.
22158         (fixup_vtable_deltas1): Likewise.
22159         (finish_struct_1): Likewise.
22161 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
22163         * call.c (build_new_method_call): Also check destructors.