PR c++/13166
[official-gcc.git] / gcc / cp / ChangeLog
blob6e2239bbf0b767d6a3d85c368edc0c494c062c0b
1 2003-12-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3         PR c++/13166
4         * parser.c (cp_parser_late_parsing_default_args): Make sure the
5         context is a class before calling push_nested_class and
6         pop_nested_class.
8 2003-12-03  James E Wilson  <wilson@specifixinc.com>
10         * g++spec.c (lang_specific_driver): Delete USE_LIBUNWIND_EXCEPTIONS
11         support.
13 2003-12-03  Mark Mitchell  <mark@codesourcery.com>
15         PR c++/9127
16         * cp-tree.h (at_namespace_scope_p): New function.
17         * parser.c (cp_parser_class_head): Handle invalid explicit
18         specializations.
19         * search.c (at_namespace_scope_p): New function.
21         PR c++/13179
22         * semantics.c (finish_handler_parms): Do not call eh_type_info for
23         types used in templates.
25         PR c++/10771
26         * parser.c (cp_parser_check_for_invalid_template_id): New
27         function.
28         (cp_parser_simple_type_specifier): Use it.
29         (cp_parser_elaborated_type_specifier): Likewise.
30         (cp_parser_class_head): Likewise.
32 2003-12-02  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
34         PR c++/10126
35         * pt.c (convert_nontype_argument): Handle default conversions
36         while converting a pointer to member function.
38 2003-12-02  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
40         PR c++/12573
41         * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
42         looking into them recursively.
44 2003-12-02  Richard Henderson  <rth@redhat.com>
46         * name-lookup.h (struct cp_binding_level): Use ENUM_BITFIELD.
47         * parser.c (struct cp_token): Likewise.   
48         (struct cp_parser_token_tree_map_node): Likewise.
49         * lex.c (struct resword): Move const after ENUM_BITFIELD.
51 2003-11-30  Mark Mitchell  <mark@codesourcery.com>
53         PR c++/9849
54         * parser.c (cp_lexer_prev_token): New function.
55         (cp_parser_skip_to_closing_parenthesis): Add consume_paren
56         parameter.
57         (cp_parser_nested_name_specifier_opt): Add is_declaration
58         parameter.
59         (cp_parser_nested_name_specifier): Likewise.
60         (cp_parser_class_or_namespace_name): Likewise.
61         (cp_parser_class_name): Likewise.
62         (cp_parser_template_id): Likewise.
63         (cp_parser_template_name): Likewise.
64         (cp_parser_id_expression): Adjust calls to
65         cp_parser_nested_name_specifier_op, cp_parser_template_id,
66         cp_parser_class_name.
67         (cp_parser_unqualified_id): Likewise.
68         (cp_parser_postfix_expression): Likewise.
69         (cp_parser_pseudo_destructor_name): Likewise.
70         (cp_parser_cast_expression): Likewise.
71         (cp_parser_mem_initializer_id): Likewise.
72         (cp_parser_simple_type_specifier): Likewise.
73         (cp_parser_type_name): Likewise.
74         (cp_parser_elaborated_type_specifier): Likewise.
75         (cp_parser_qualified_namespace_specifier): Likewise.
76         (cp_parser_using_declaration): Likewise.
77         (cp_parser_using_directive): Likewise.
78         (cp_parser_ptr_operator): Likewise.
79         (cp_parser_declarator_id): Likewise.
80         (cp_parser_class_head): Likewise.
81         (cp_parser_base_specifier): Likewise.
82         (cp_parser_constructor_declarator_p): Likewise.
83         (cp_parser_direct_declarator): Fix typo in comment.
84         (cp_parser_parenthesized_expression_list): Adjust call to
85         cp_parser_skip_to_closing_parenthesis.
86         (cp_parser_selection_statement): Likewise.
88 2003-11-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
90         PR c++/12924
91         * typeck.c (finish_class_member_access_expr): Handle TEMPLATE_ID_EXPR
92         with OVERLOAD and DECL nodes as the first operand.
94 2003-11-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
96         * pt.c (tsubst) <ARRAY_REF>: Remove erroneous argument to build_nt.
98 2003-11-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
100         PR c++/5369
101         * friend.c (is_friend): Handle member function of a class
102         template as template friend.
103         (do_friend): Likewise.
104         * decl2.c (check_classfn): Add template_header_p parameter.
105         * decl.c (start_decl): Adjust check_classfn call.
106         (grokfndecl): Likewise.
107         * pt.c (is_specialization_of_friend): New function.
108         (uses_template_parms_level): Likewise.
109         (push_template_decl_real): Use uses_template_parms_level.
110         (tsubst_friend_function): Adjust check_classfn call.
111         * cp-tree.h (check_classfn): Adjust declaration.
112         (uses_template_parms_level): Add declaration.
113         (is_specialization_of_friend): Likewise.
115 2003-11-21  Mark Mitchell  <mark@codesourcery.com>
117         PR c++/12515
118         * pt.c (build_non_dependent_expr): Handle GNU extension to ?:
119         operator.
121 2003-11-21  Jan Hubicka  <jh@suse.cz>
123         * parser.c (cp_parser_postfix_expression): Initialize 's' to
124         NULL_TREE.
126 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
128         * Make-lang.in (c++.extraclean): Delete.
130 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
132         * Make-lang.in (check-g++, lang_checks): Add.
134 2003-11-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
136         PR c++/12932
137         * class.c (currently_open_derived_class): Check if
138         current_class_type is NULL_TREE.
139         * semantics.c (finish_call_expr): Check if
140         currently_open_derived_class returns NULL_TREE.
141         * cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
142         parameter.
144 2003-11-17  Jason Merrill  <jason@redhat.com>
146         * init.c (build_new_1): Preevaluate placement args.
147         * call.c (build_op_delete_call): Don't expose placement args to
148         overload resolution.
150 2003-11-16  Jason Merrill  <jason@redhat.com>
152         * Make-lang.in (c++.tags): Create TAGS.sub files in each directory
153         and TAGS files that include them for each front end.
155 2003-11-15  Bernardo Innocenti  <bernie@develer.com>
157         PR c++/2294
158         * name-lookup.c: Revert previous patch for PR c++/2294 to prevent
159         build failure on libjava.
161 2003-11-14  Giovanni Bajo  <giovannibajo@libero.it>
163         PR c++/2294
164         * name-lookup.c (push_overloaded_decl): Always construct an OVERLOAD
165         unless the declaration is a built-in.
166         (set_namespace_binding): While binding OVERLOADs with only one
167         declaration, we still need to call supplement_binding.
169 2003-11-14  Mark Mitchell  <mark@codesourcery.com>
171         PR c++/12762
172         * parser.c (cp_parser_enclosed_template_argument_list): New
173         function.
174         (cp_parser_template_id): Use it.
175         (cp_parser_simple_type_specifier): Recognize invalid template
176         syntax.
178 2003-11-14  Giovanni Bajo  <giovannibajo@libero.it>
180         PR c++/2094
181         * pt.c (unify): Add support for PTRMEM_CST and
182         FIELD_DECL unification.
184 2003-11-13  Richard Earnshaw  <rearnsha@arm.com>
186         * decl.c (grokfndecl): Change OK to type tree.
188 2003-11-12  Mark Mitchell  <mark@codesourcery.com>
190         * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
191         CONSTRUCTOR.
193         * decl.c (cp_make_fname_decl): When creating a top-level
194         __FUNCTION__-like symbol, do register it with pushdecl.
196         * decl.c (finish_case_label): Do not check that we are within a
197         switch statement here.
198         * parser.c (struct cp_parser): Add in_iteration_statement_p and
199         in_switch_statement_p.
200         (cp_parser_new): Initialize them.
201         (cp_parser_labeled_statement): Check validity of case labels
202         here.
203         (cp_parser_selection_statement): Set in_switch_statement_p.
204         (cp_parser_iteration_statement): Set in_iteration_statement_p.
205         (cp_parser_jump_statement): Check validity of break/continue
206         statements here.
208         PR c++/12735
209         * cp-tree.h (duplicate_decls): Return a tree.
210         * decl.c (duplicate_decls): Clarify documentation.  Return
211         error_mark_node to indicate a failed redeclaration.
212         * friend.c (do_friend): Handle that case.
213         * name-lookup.c (pushdecl): Likewise.
215 2003-11-11  Jason Merrill  <jason@redhat.com>
217         * cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
218         * name-lookup.c (parse_using_directive): New fn.
219         (is_associated_namespace): New fn.
220         (arg_assoc_namespace): Also check associated namespaces.
221         * name-lookup.h: Declare new fns.
222         * pt.c (maybe_process_partial_specialization): Allow
223         specialization in associated namespace.
224         * parser.c (cp_parser_using_directive): Accept attributes.  Use
225         parse_using_directive.
227 2003-11-10  Richard Henderson  <rth@redhat.com>
229         * cvt.c (convert_to_void): Use void_zero_node after overload failure.
231 2003-11-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
233         PR c++/12832
234         * name-lookup.c (supplement_binding): Gracefully handle names
235         used at non-class scope prior declaration.
237 2003-11-06  Matt Austern  <austern@apple.com>
239         * decl.c (duplicate_decls): copy DECL_VISIBILITY field.
240         * method.c (use_thunk): give thunk same visibility as function.
241         * optimize.c (maybe_clone_body): copy DECL_VISIBILITY field.
242         
243 2003-11-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
245         PR c++/11616
246         * pt.c (instantiate_pending_templates): Save and restore
247         input_location.
249 2003-11-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
251         PR c++/2019
252         * friend.c (add_friend): Don't display previous declaration in
253         case of duplicate friend warning.
255 2003-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
257         PR c++/9810
258         * call.c (build_over_call): Check access using primary template
259         if FN is a member function template.
261 2003-11-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
263         PR c++/12796
264         * class.c (handle_using_decl): Set input_location before calling
265         error_not_base_type.
267 2003-10-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
269         PR c++/10371
270         * semantics.c (finish_non_static_data_member): Handle when
271         both processing_template_decl and qualifying_scope are true.
273 2003-10-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
275         PR c++/11076
276         * class.c (handle_using_decl): Swap arguments of error_not_base_type.
277         * parser.c (cp_parser_direct_declarator): Only resolve typename for
278         namespace scope declarations.
280 2003-10-24  Nathan Sidwell  <nathan@codesourcery.com>
282         PR c++/12698, c++/12699, c++/12700, c++/12566
283         * cp-tree.h (THUNK_ALIAS_P, THUNK_ALIAS): New.
284         (debug_class, debug_thunks): New.
285         * class.c (dump_class_hierarchy_1): New break out from ...
286         (dump_class_hierarchy): ... here.
287         (dump_thunk, debug_thunks, debug_class): New.
288         (update_vtable_entry_for_fn): Add ssizetype casts. Correct
289         continued search for primary binfo via virtual.
290         (build_vtbl_initializer): Follow covariant thunk alias.
291         * method.c (make_thunk): Clear DECL_THUNKS of the thunk.
292         (finish_thunk): Look for an alias of the covariant thunk and point
293         to it.
294         (use_thunk): We should never use an alias.
295         * semantics.c (emit_associated_thunks): Do not emit aliases.
297         PR c++/12566
298         * cp-tree.h (cp_fname_init): Add TYPE pointer param.
299         * decl.c (cp_fname_init): Add TYPE pointer param. Set it. Don't
300         create an ad-hoc ERROR_MARK.
301         (cp_make_fname_decl): Adjust.
302         * pt.c (tsubst_expr): Adjust.
304 2003-10-23  Jason Merrill  <jason@redhat.com>
306         PR c++/12726
307         * tree.c (build_target_expr_with_type): Don't call force_rvalue
308         for CONSTRUCTORs.
310 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
312         * call.c: Fix comment formatting.
313         * class.c: Likewise.
314         * cxx-pretty-print.c: Likewise.
315         * init.c: Likewise.
316         * parser.c: Likewise.
317         * pt.c: Likewise.
318         * semantics.c: Likewise.
319         * tree.c: Likewise.
320         * typeck.c: Likewise.
321         * typeck2.c: Likewise.
323 2003-10-21  Mark Mitchell  <mark@codesourcery.com>
325         PR c++/11962
326         * typeck.c (build_x_conditional_expr): Handle missing middle
327         operands in templates.
328         * mangle.c (write_expression): Issue errors about attempts to
329         mangle a non-existant middle operator to the ?: operator.
331 2003-10-21  Robert Bowdidge   <bowdidge@apple.com>
332         * decl.c (cp_finish_decl): Remove clause intended for asm directives 
333           in struct or class fields: this code is never executed.
335 2003-10-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
337         * decl.c (start_decl): Exit if push_template_decl returns
338         error_mark_node.
340 2003-10-20  Kazu Hirata  <kazu@cs.umass.edu>
342         * ChangeLog: Fix typos.
343         * call.c: Fix comment typos.
344         * class.c: Likewise.
345         * cp-tree.h: Likewise.
346         * cvt.c: Likewise.
347         * cxx-pretty-print.c: Likewise.
348         * decl.c: Likewise.
349         * decl2.c: Likewise.
350         * init.c: Likewise.
351         * mangle.c: Likewise.
352         * name-lookup.c: Likewise.
353         * parser.c: Likewise.
354         * search.c: Likewise.
355         * semantics.c: Likewise.
356         * tree.c: Likewise.
357         * typeck.c: Likewise.
359 2003-10-20  Jan Hubicka  <jh@suse.cz>
361         * decl.c (start_cleanup_fn):  Set DECL_DECLARED_INLINE_P to deffer
362         the expansion.
364 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
366         * Make-lang.in (c++.install-info): Remove.
368 2003-10-20  Jason Merrill  <jason@redhat.com>
370         * class.c (layout_class_type): Set DECL_ARTIFICIAL on padding
371         field.
373 2003-10-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
375         PR c++/9781, c++/10583, c++/11862
376         * decl.c (cp_finish_decl): Exit immediately if decl is an
377         error_mark_node.
378         * pt.c (push_template_decl_real): Return error_mark_node for
379         invalid template declaration of variable.
381 2003-10-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
383         PR c++/12495
384         * pt.c (lookup_template_class): Handle when current_class_type
385         is a local class.
387 2003-10-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
389         PR c++/2513
390         * decl.c (make_typename_type): Use dependent_type_p.
391         (make_unbound_class_template): Likewise.
392         * pt.c (instantiate_class_template): Increment
393         processing_template_decl during substitution of template friend
394         function.  Preincrement processing_template_decl rather than
395         postincrement.
396         (get_mostly_instantiated_function_type): Increment
397         processing_template_decl during partial substitution of function
398         type.
400 2003-10-15  Jan Hubicka  <jh@suse.cz>
402         PR c++/12574
403         * decl2.c (cxx_callgraph_analyze_expr): Deal with baselink.
405 2003-10-14  Jason Merrill  <jason@redhat.com>
407         PR c++/11878
408         * tree.c (build_target_expr_with_type): Call force_rvalue for
409         classes with non-trivial copy ctors.
411         PR c++/11063
412         * typeck.c (build_modify_expr): Call convert rather than abort.
414 2003-10-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
416         Breack out decl.c (3/n)
417         * name-lookup.c: Include flags.h
418         (lookup_name_current_level): Make static.
419         (add_decl_to_level): Likewise.
420         (push_local_binding): Likewise.
421         (push_overloaded_decl): Likewise.
422         (lookup_using_namespace): Likewise.
423         (qualified_lookup_using_namespace): Likewise.
424         (lookup_type_current_level): Likewise.
425         (unqualified_namespace_lookup): Likewise.
426         (namespace_ancestor): Likewise.
427         (push_using_directive): Likewise.
428         * decl.c (pushdecl): Move to name-lookup.c.
429         (pushdecl_top_level_1): Likewise.
430         (pushdecl_top_level): Likewise.
431         (pushdecl_top_level_and_finish): Likewise.
432         (maybe_push_decl): Likewise.
433         (push_using_decl): Likewise.
434         (push_overloaded_decl): Likewise.
435         (make_anon_name): Likewise.
436         (anon_cnt): Likewise.
437         (clear_anon_tags): Likewise.
438         (maybe_inject_for_scope_var): Likewise.
439         (check_for_out_of_scope_variable): Likewise.
440         * Make-lang.in (cp/name-lookup.o): Depend on flags.h.
441         * decl.c (warn_extern_redeclared_static): Export.
442         * cp-tree.h (warn_extern_redeclared_static): Declare.
444 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
446         * Make-lang.in: Replace uses of $(target_alias) with
447         $(target_noncanonical).
449 2003-10-13  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
451         * ChangeLog: Add PR number to patch for PR c++/12370.
453 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
455         * name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
456         (binding_for_name): Likewise.
457         (cxx_binding_clear): Move to name-lookup.c.
458         * name-lookup.c (cxx_scope_find_binding_for_name): Now static.
459         (binding_for_name): Likewise.
460         * decl2.c (is_ancestor): Move to name-lookup.c
461         (namespace_ancestor): Likewise.
462         (add_using_namespace): Likewise.
463         (ambiguous_decl): Likewise.
464         (lookup_using_namespace): Likewise.
465         (qualified_lookup_using_namespace): Likewise.
466         (set_decl_namespace): Likewise.
467         (decl_namespace): Likewise.
468         (current_decl_namespace): Likewise.
469         (push_decl_namespace): Likewise.
470         (pop_decl_namespace): Likewise.
471         (push_scope): Likewise.
472         (pop_scope): Likewise.
473         (struct arg_lookup): Likewise.
474         (arg_assoc): Likewise.
475         (arg_assoc_args): Likewise.
476         (arg_assoc_type): Likewise.
477         (add_function): Likewise.
478         (arg_assoc_namespace): Likewise.
479         (arg_assoc_class): Likewise.
480         (arg_assoc_template_arg): Likewise.
481         (do_namespace_alias): Likewise.
482         (validate_nonmember_using_decl): Likewise.
483         (do_nonmember_using_decl): Likewise.
484         (do_toplevel_using_decl): Likewise.
485         (do_local_using_decl): Likewise.
486         (do_class_using_decl): Likewise.
487         (do_using_directive): Likewise.
488         (constructor_name_full): Likewise.
489         (constructor_name): Likewise.
490         (constructor_name_p): Likewise.
492 2003-10-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
494         Break out decl.c (2/n) 
495         * name-lookup.c: Include diagnostic.h
496         (cxx_binding_free): Make static.
497         (cxx_binding_make): Likewise.
498         (binding_table_new): Likewise
499         (binding_table_free): Likewise.
500         (binding_table_insert): Likewise.
501         (binding_table_find_anon_type): Likewise.
502         (binding_table_reverse_maybe_remap): Likewise.
503         (supplement_binding): Likewise.
504         * name-lookup.h (global_scope_name): Declare extern.
505         (global_type_node): Likewise.
506         (cxx_binding_free): Don't export.
507         (cxx_binding_make): Likewise.
508         (binding_table_new): Likewise.
509         (binding_table_free): Likewise.
510         (binding_table_insert): Likewise.
511         (binding_table_find_anon_type): Likewise.
512         (binding_table_reverse_maybe_remap): Likewise.
513         * Make-lang.in (cp/name-lookup.o): Depend on $(DIAGNOSTIC_H)
514         * decl.c (lookup_namespace_name): Move to name-lookup.c
515         (select_decl): Likewise.
516         (unqualified_namespace_lookup): Likewise.
517         (lookup_qualified_name): Likewise.
518         (lookup_name_real): Likewise.
519         (lookup_name_nonclass): Likewise.
520         (lookup_function_nonclass): Likewise.
521         (lookup_name): Likewise.
522         (lookup_name_current_level): Likewise.
523         (lookup_type_current_level): Likewise.
524         (lookup_flags): Likewise.
525         (qualify_lookup): Likewise.
526         (lookup_tag): Likewise.
527         (lookup_tag_reverse): Likewise.
528         (getdecls): Likewise.
529         (storedecls): Remove.
530         (cxx_remember_type_decls): Move to name-lookup.c.
531         (global_bindings_p): Likewise.
532         (innermost_nonclass_level): Likewise.
533         (toplevel_bindings_p): Likewise.
534         (namespace_bindings_p): Likewise.
535         (kept_level_p): Likewise.
536         (innermost_scope_kind): Likewise.
537         (template_parm_scope_p): Likewise.
538         (push_binding): Likewise.
539         (push_local_binding): Likewise.
540         (add_decl_to_level): Likewise.  Make extern.
541         (push_class_binding): Move to name-lookup.c.
542         (resume_level): Likewise.  Rename to resume_scope.
543         (begin_scope): Move to name-lookup.c.
544         (indent): Likewise.
545         (binding_depth): Likewise.
546         (is_class_level): Likewise.
547         (cxx_scope_descriptor): Likewise.
548         (cxx_scope_debug): Likewise.
549         (namespace_scope_ht_size): Likewise.
550         (leave_scope): Likewise.
551         (pushlevel_class): Likewise.
552         (poplevel_class): Likewise.
553         (clear_identifier_class_values): Likewise.
554         (pushdecl_with_scope): Likewise.
555         (pushdecl_namespace_level): Likewise.
556         (pushdecl_class_level): Likewise.
557         (push_class_level_binding): Likewise.
558         (push_using_directive): Likewise.
559         (identifier_global_value): Likewise.
560         (keep_next_level_flag): Likewise.
561         (keep_next_level): Likewise.
562         (free_binding_level): Likewise.
563         (set_class_shadows): Likewise.
564         (maybe_push_cleanup_level): Likewise.
565         (cp_namespace_decls): Likewise.
566         (bt_print_entry): Likewise.
567         (print_binding_level): Likewise.
568         (print_other_binding_stack): Likewise.
569         (print_binding_stack): Likewise.
570         (push_namespace): Likewise.
571         (pop_namespace): Likewise.
572         (push_nested_namespace): Likewise.
573         (pop_nested_namespace): Likewise.
574         (cxx_saved_binding_make): Likewise.
575         (struct cxx_saved_binding_make): Likewise.
576         (store_bindings): Likewise.
577         (maybe_push_to_top_level): Likewise.
578         (push_to_top_level): Likewise.
579         (pop_from_top_level): Likewise.
580         (identifier_type_value): Likewise.
581         (set_identifier_type_value): Likewise.
582         (set_identifier_type_value_with_scope): Likewise.
583         (pop_everything): Likewise.
584         (pushtag): Likewise.
585         (follow_tag_typedef): Likewise.
586         (maybe_process_template_type_declaration): Likewise.
587         (pop_binding): Likewise.
588         * cp-tree.h: Move corresponding declarations to name-lookup.h
589         
590 2003-10-12  Steven Bosscher  <steven@gcc.gnu.org>
592         * cvt.c (ocp_convert): Move warning to C common code.
594 2003-10-09  Jason Merrill  <jason@redhat.com>
596         PR c++/6392
597         * tree.c (build_cplus_array_type): Handle all quals the same.
598         (cp_build_qualified_type_real): Look through arrays first.
600         * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
601         (build_target_expr_with_type): Likewise.
603         * pt.c (instantiate_class_template): Sanity check that our
604         enclosing class has been instantiated.
606 2003-10-08  Giovanni Bajo  <giovannibajo@libero.it>
608         * cp_tree.h: Added TFF_NO_FUNCTION_ARGUMENTS.
609         * error.c (dump_function_decl): Use it to skip the dump of the
610         arguments.
611         (dump_expr): When dumping a declaration found within an
612         expression, always set TFF_NO_FUNCTION_ARGUMENTS
613         in the flags.
615 2003-10-08  Giovanni Bajo <giovannibajo@libero.it>
617         PR c++/11097
618         * pt.c (tsubst_decl): Substitute also the DECL_NAME node of
619         USING_DECL.
621 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
623         PR c++/10147
624         * call.c (initialize_reference): Tweak error message.
625         * cxx-pretty-print.h (cxx_pretty_printer_flags): Remove
626         pp_cxx_flag_qualified_id and pp_cxx_flag_global_scope.
627         * cxx-pretty-print.c (pp_cxx_id_expression): Always display
628         qualified entities using qualified names.
629         
630         PR c++/12337
631         * init.c (build_new_1): Make sure that the expression returned is
632         not an lvalue.
634         PR c++/12344, c++/12236, c++/8656
635         * decl.c (start_function): Do not ignore attributes embedded in a
636         function declarator.
638 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
640         * Make-lang.in (c++.info): Remove.
641         (c++.dvi): Remove.
642         (c++.generated-manpages): Replace with ...
643         (generated-manpages): ... this.
645 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
647         * decl.c (struct cp_binding_level): Move to name-lookup.h
648         (current_binding_level): Likewise.
649         (class_binding_level): Likewise.
650         * cp-tree.h (enum scope_kind): Likewise.
652 2003-10-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
654         * name-lookup.c (binding_entry_free): Nullify name and type
655         fields. 
657 2003-10-02  Mark Mitchell  <mark@codesourcery.com>
659         PR c++/12486
660         * typeck.c (finish_class_member_access_expr): Issue diagnostic
661         on erroneous use of qualified name.
663 2003-09-30  Richard Henderson  <rth@redhat.com>
665         PR c++/12370
666         * decl.c (duplicate_decls): Copy DECL_SAVED_INSNS too.
668 2003-09-30  Kelley Cook  <kelleycoook@wideopenwest.com>
670         * g++spec.c: Convert to ISO C90 prototypes.
671         * parser.c: Likewise.
673 2003-09-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
675         * decl.c (pop_binding): Don't mess with nullifying binding->scope
676         here. 
677         * name-lookup.c: Re-format.
678         (cxx_binding_free): Nullify binding->scope.
680 2003-09-29  Jan Hubicka  <jh@suse.cz>
682         PR C++/12047
683         * except.c (build_eh_type_type): Call mark_used on the type.
685 2003-09-28  Richard Henderson  <rth@redhat.com>
687         * typeck.c (c_expand_asm_operands): Take location_t, instead of
688         individual file and line.
690 2003-09-28  Andreas Jaeger  <aj@suse.de>
692         * decl.c (cxx_builtin_type_decls): Convert to ISO C90 function
693         definition.
694         * init.c (push_base_cleanups): Likewise.
695         * decl2.c (finish_file): Likewise.
696         * mangle.c (init_mangle): Likewise.
697         (dump_substitution_candidates): Likewise.
698         * search.c: Likewise.
700 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
702         * name-lookup.h (get_global_value_if_present): New function.
703         (is_typename_at_global_scope): Likewise.
704         * except.c (do_begin_catch): Use get_global_value_if_present.
705         (do_end_catch): Likewise.
706         (do_allocate_exception): Likewise.
707         (do_free_exception): Likewise.
708         (build_throw): Likewise.
709         * parser.c (cp_parser_member_declaration): Likewise.
710         * rtti.c (throw_bad_cast): Likewise.
711         (throw_bad_typeid): Likewise.
712         * decl.c (check_tag_decl): Use is_typename_at_global_scope.
713         (grokdeclarator): Likewise.
714         * cp-tree.h (global_namespace): Move to name-lookup.h
715         * call.c (call_builtin_trap): Tidy.
717 2003-09-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
719         PR c++/11415
720         * parser.c (cp_parser_nested_name_specifier_opt): Issue correct
721         error message when parser->scope is global_namespace.
723 2003-09-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
725         * cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to
726         macros  BINDING_SCOPE, BINDING_VALUE and BINDING_TYPE.
728 2003-09-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
730         * decl.c (pop_binding_level, suspend_binding_level,
731         find_class_binding_level): Merge into leave_scope.  Remove.
732         (leave_scope):  New function.
733         (poplevel): Update.
734         (poplevel_class): Likewise.
735         (pop_namespace): Likewise.
737 2003-09-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
739         PR c++/5655
740         * parser.c (cp_parser_check_access_in_redeclaration): New function.
741         (cp_parser_member_declaration): Use it.
742         (cp_parser_template_declaration_after_export): Likewise.
744 2003-09-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
746         * cp-tree.h (scope_kind): Add new enumerator.
747         (keep_next_level): Change parameter type to bool.
748         (begin_scope):  Change prototype.
749         (pushlevel): Remove declaration.
750         * decl.c (push_binding_level): Fold in begin_scope.  Remove.
751         (struct cp_binding_level): Remove tag_tranparent field.  Make keep
752         of bitsize one.
753         (keep_next_level_flag): Make a bool.
754         (cxx_scope_descriptor): Update scope names table
755         (make_cxx_scope): Fold in begin_scope.  Remove..
756         (namespace_scope_ht_size): New function.
757         (begin_scope): Change prototype.  Return a scope.  Tidy.
758         (kept_level_p): Update.
759         (pushlevel): Remove.
760         (maybe_push_cleanup_level): Simplify.
761         (poplevel): Update for sk_cleanup and keep change.
762         (print_binding_level): Likewise.
763         (initial_push_namespace_scope): Fold in begin_scope.  Remove.
764         (push_namespace): Update.
765         (pushtag): Likewise.
766         (lookup_tag): Likewise.
767         (lookup_name_current_level): Likewise.
768         (lookup_type_current_level): Likewise.
769         (cxx_init_decl_processing): Likewise.
770         (start_function): Likewise.
771         (begin_function_body): Likewise.
772         (start_method): Likewise.
773         * pt.c (push_inline_template_parms_recursive): Likewise.
774         (begin_template_parm_list): Likewise.
775         (begin_specialization): Likewise.
776         * semantics.c (do_pushlevel): Likewise.
777         (begin_compound_stmt): Likewise.
778         (begin_stmt_expr): Likewise.
780 2003-09-21  Richard Henderson  <rth@redhat.com>
782         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
783         method.c, optimize.c, pt.c, semantics.c, tree.c: Revert.
785 2003-09-21  Richard Henderson  <rth@redhat.com>
787         * class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
788         method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
789         DECL_SOURCE_LOCATION rename and change to const.
791 2003-09-20  Richard Henderson  <rth@redhat.com>
793         * decl.c, decl2.c, pt.c: Use %J in diagnostics.
795 2003-09-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
797         PR c++/157
798         * parser.c (cp_parser_direct_declarator): Clear
799         parser->num_template_parameter_lists when parsing function
800         parameters.
801         (cp_parser_constructor_declarator_p): Likewise.
803 2003-09-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
805         PR c++/495
806         * pt.c (tsubst_friend_class): Only use innermost template
807         arguments for the injected friend class template.
809 2003-09-19  Nathan Sidwell  <nathan@codesourcery.com>
811         PR c++/12332
812         * pt.c (instantiate_class_template): Increment
813         processing_template_decl around the tsubst of a template member
814         function.
816 2003-09-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
818         * decl.c (cxx_scope_descriptor): Fix thinko.
819         (struct cp_binding_level): Adjust type of binding_depth field. 
821 2003-09-18  Danny Smith  <dannysmith@users.sourceforge.net>
823         PR c++/12320
824         * call.c (type_passed_as): Check for incomplete type.
825         (convert_for_arg_passing): Likewise.
827 2003-09-18  Nathan Sidwell  <nathan@codesourcery.com>
829         PR c++/9848
830         * optimize.c (maybe_clone_body): Don't set MARK_USED on parameters
831         here.
832         * semantics.c (expand_body): Set it here on the remaining clones.
834 2003-09-18  Roger Sayle  <roger@eyesopen.com>
836         * lex.c (init_operators): Remove operator_name_info for FFS_EXPR.
837         * class.c (instantiate_type): Remove FFS_EXPR case.
839 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
841         * ChangeLog: Fix recent commit.
843 2003-09-18  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
845         * ChangeLog: Add PR number to patch for PR c++/12316.
847 2003-09-18  Gabriel Dos Reis <gdr@integrable-solutions.net>
849         * error.c (dump_type): Simplify.  Use pp_type_specifier_seq for
850         "C" types. 
851         * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Fix thinko.
853 2003-09-17  Richard Henderson  <rth@redhat.com>
855         * semantics.c (expand_body): Don't save/restore input_location.
857 2003-09-17  Mark Mitchell  <mark@codesourcery.com>
859         PR c++/12266
860         * cp-tree.h (tsubst_flags_t): Add tf_conv.
861         * class.c (standard_conversion): Pass tf_conv to
862         instantiate_type.
863         (resolve_address_of_overloaded_function): Do not call mark_used
864         when just checking conversions.
866         PR debug/12066
867         * cp-lang.c (LANG_HOOKS_BUILTIN_TYPE_DECLS): Define.
868         * cp-tree.h (cxx_builtin_type_decls): Declare.
869         * decl.c (builtin_type_decls): New variables.
870         (cxx_builtin_type_decls): New function.
871         (record_builtin_type): Add to builtin_type_decls.
873 2003-09-17  Richard Henderson  <rth@redhat.com>
875         PR c++/12316
876         * semantics.c (expand_or_defer_fn): Inc/dec function_depth.
878 2003-09-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
880         PR c++/7939
881         * typeck.c (comptypes): Don't ICE when its first argument is
882         error_mark_node.
883         (compparms): Reverse the arguments of same_type_p.
885 2003-09-15  Nathan Sidwell  <nathan@codesourcery.com>
887         PR c++/12184
888         * typeck.c (convert_arguments): Return error_mark_node for an
889         incomplete parameter. Make error message more informative.
891 2003-09-12  Mark Mitchell  <mark@codesourcery.com>
893         PR c++/3907
894         * class.c (maybe_note_name_used_in_class): Refine test for whether
895         or not we are in a class scope.
897         * cp-tree.h (language_function): Remove x_expanding_p.
898         (expanding_p): Remove.
899         (doing_semantic_analysis_p): Remove.
900         (scope_kind): Add sk_function_parms, sk_class,
901         sk_namespace.
902         (innermost_scope_kind): New method.
903         * call.c (cxx_type_promotes_to): Use type_decays_to.
904         * cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
905         (LANG_HOOKS_POPLEVEL): Likewise.
906         * decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
907         template_spec_p, namespace_p, is_for_scope, is_try_scope, and
908         is_catch_scope.  Add kind and explicit_spec_p.
909         (cxx_scope_descriptor): Use a lookup table.
910         (find_class_binding_level): Use "kind" field in binding_level, not
911         the various flags.
912         (pop_binding_level): Likewise.
913         (innermost_nonclass_level): Likewise.
914         (toplevel_bindings_p): Likewise.
915         (namespace_bindings_p): Likewise.
916         (template_parm_scope_p): Likewise.
917         (innermost_scope_kind): New method.
918         (current_tmpl_spec_kind): Use "kind" field in binding_level, not
919         the various flags.
920         (pushlevel): Remove check for doing_semantic_analysis_p.
921         (begin_scope): Simplify.
922         (add_decl_to_level): Use "kind" field in binding_level, not
923         the various flags.
924         (push_local_binding): Likewise.
925         (pop_label): Remove check for doing_semantic_analysis_p.
926         (poplevel): Use "kind" field in binding_level, not
927         the various flags.
928         (set_block): Remove check for doing_semantic_analysis_p.
929         (pushlevel_class): Use "kind" field in binding_level, not
930         the various flags. 
931         (poplevel_class): Likewise.
932         (initial_push_namespace_scope): Likewise.
933         (maybe_push_to_top_level): Likewise.
934         (set_identifier_type_value_with_scope): Likewise.
935         (pop_everything): Likewise.
936         (maybe_process_template_type_declaration): Likewise.
937         (pushtag): Likewise.
938         (pushdecl): Likewise.
939         (pushdecl_with_scope): Likewise.
940         (check_previous_goto_1): Likewise.
941         (define_label): Likewise.
942         (finish_case_label): Likewise.
943         (lookup_tag): Likewise.
944         (unqualified_namespace_lookup): Likewise.
945         (lookup_name_real): Likewise.
946         (lookup_name_current_level): Likewise.
947         (lookup_type_current_level): Likewise.
948         (record_builtin_type): Likewise.
949         (cp_make_fname_decl): Likewise.
950         (maybe_inject_for_scope_var): Likewise.
951         (cp_finish_decl): Remove check for doing_semantic_analysis_p.
952         (start_function): Use begin_scope, not pushlevel.
953         (finish_function): Use "kind" field in binding_level, not
954         the various flags.
955         (start_method): Use begin_scope, not pushlevel.
956         (make_label_decl): Do not check expanding_p.
957         (save_function-data): Do not set expanding_p.
958         (cxx_push_function_context): Do not clear expanding_p.
959         * semantics.c (cxx_expand_function_start): Do not set expanding_p.
960         
961 2003-09-14  Mark Mitchell  <mark@codesourcery.com>
963         * class.c (layout_class_type): Make DECL_MODE match TYPE_MODE for
964         an bit-field whose width exceeds that of its type.
966 2003-09-14  Geoffrey Keating  <geoffk@apple.com>
968         * rtti.c (get_tinfo_decl): Set TREE_PUBLIC for typeinfo decls.
970 2003-09-14  Kazu Hirata  <kazu@cs.umass.edu>
972         * ChangeLog: Follow spelling conventions.
973         * parser.c: Likewise.
975 2003-09-13  Richard Henderson  <rth@redhat.com>
977         * decl2.c (finish_file): Check cgraph_assemble_pending_functions
978         during relaxation loop.
980 2003-09-11  David Edelsohn  <edelsohn@gnu.org>
982         * decl2.c (var_finalized_p): Swap arms of conditional.
984 2003-09-10  Nathan Sidwell  <nathan@codesourcery.com>
986         PR c++/11788
987         * typeck.c (build_address): If it is a function, mark it used.
988         (build_unary_op): Do not lose object's side-effects when taking
989         address of static member function.
990         * class.c (resolve_address_of_overloaded_function): Use
991         tsubst_flags_t parameter. Only expect overload sets. Adjust.
992         (instantiate_type): Adjust flags passing. Do not lose object's
993         side-effects when taking address of static member function.
995 2003-09-11  Richard Henderson  <rth@redhat.com>
997         * semantics.c (expand_or_defer_fn): Update for new
998         cgraph_finalize_function argument.
1000 2003-09-10  Richard Henderson  <rth@redhat.com>
1002         * decl2.c (cxx_callgraph_analyze_expr): Mark argument unused.
1004 2003-09-10  Jan Hubicka  <jh@suse.cz>
1006         * decl2.c (var_finalized_p): New.
1007         (maybe_emit_vtables, write_out_vars, finish_file): Use it.
1009 2003-09-10  Richard Henderson  <rth@redhat.com>
1011         * decl2.c (cxx_callgraph_analyze_expr): New, from corpse of
1012         mark_member_pointers.
1013         (lower_function): Remove.
1014         * cp-tree.h: Update to match.
1015         * cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): New.
1016         (LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Remove.
1018 2003-09-09  Richard Henderson  <rth@redhat.com>
1020         * semantics.c (expand_or_defer_fn): Update call to 
1021         cgraph_finalize_function.
1023         * semantics.c (expand_or_defer_fn): Use cgraph_finalize_function
1024         always.
1026         * decl2.c (finish_file): Avoid out-of-bounds array reference
1027         during memmove.
1029 2003-09-09  Richard Henderson  <rth@redhat.com>
1031         * decl2.c (mark_member_pointers): Rename from
1032         mark_member_pointers_and_eh_handlers and don't check eh handlers.
1034 2003-09-09  Christian Ehrhardt  <ehrhardt@mathematik.uni-ulm.de>
1036         PR bootstrap/12168
1037         * method.c (use_thunk): Clear DECL_RTL of copied nodes.
1039 2003-09-08  Mark Mitchell  <mark@codesourcery.com>
1041         * cp-lang.c (LANG_HOOKS_REGISTER_BUILTIN_TYPE): Define to
1042         c_register_builtin_type.
1044         PR c++/11786
1045         * decl2.c (add_function): Do not complain about seeing the same
1046         non-function twice.
1047         * semantics.c (perform_koenig_lookup): Improve documentation.
1049         PR c++/5296
1050         * pt.c (try_one_overload): Add addr_p parameter.
1051         (resolve_overloaded_unification): Pass it.
1053 2003-09-08  Richard Henderson  <rth@redhat.com>
1055         * optimize.c (maybe_clone_body): Inc/dec function_depth.
1057 2003-09-08  Richard Henderson  <rth@redhat.com>
1059         * decl.c (finish_function): Clear current_function_decl.
1060         * decl2.c (mark_used): Don't push/pop gc context.
1061         * optimize.c (optimize_function): Likewise.
1062         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1063         * pt.c (instantiate_decl): Inc/dec function_depth instead.
1064         * semantics.c (expand_body): Update for tree_rest_of_compilation
1065         nested argument.
1067 2003-09-07  Gabriel Dos Reis  <gcc@integrable-solutions.net>
1069         PR c++/11762
1070         * error.c (dump_decl): Handle namespace-alias-definition.
1071         * decl.c (warn_extern_redeclared_static): There is no point in
1072         checking changes in storage class specifier for a namespace
1073         declaration. 
1074         (duplicate_decls): Tidy diagnostic message.
1075         * cxx-pretty-print.c (pp_cxx_left_brace): New macro.
1076         (pp_cxx_right_brace): Likewise.
1077         (pp_cxx_original_namespace_definition): New function.
1078         (pp_cxx_namespace_alias_definition): Likewise.
1079         (pp_cxx_declaration): Use them.  Handle NAMESPACE_DECLs.
1081 2003-09-07  Jan Hubicka  <jh@suse.cz>
1083         * decl2.c (maybe_emit_vtables, write_out_vars, finish_file):
1084         Avoid re-emitting variables in unit-at-a-time mode.
1086 2003-09-06  Mark Mitchell  <mark@codesourcery.com>
1088         PR c++/11867
1089         * call.c (standard_conversion): Improve comments.
1090         (perform_direct_initialization): Make sure we return an expression
1091         of the correct type.
1092         * typeck.c (build_static_cast): Check for ambiguity and
1093         accessibility when performing conversions.
1095 2003-09-06  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1097         * cp-tree.h (add_binding): Remove declaration.
1098         * name-lookup.h (supplement_binding): Declare.
1099         * decl.c (add_binding): Move to name-lookup.c.
1100         (push_local_binding): Adjust.
1101         (push_class_binding): Likewise.
1102         (set_identifier_type_value_with_scope): Likewise.
1103         * name-lookup.c (supplement_binding): Rename from add_binding.
1104         Return a bool.  Improve documentation. 
1105         (set_namespace_binding): Adjust.
1106         * Make-lang.in (cp/name-lookup.o): Depend on toplev.h
1108 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1110         PR c++/11794
1111         * class.c (pushclass): Push dependent using decls for nested
1112         classes of templates too.
1114 2003-09-06  Roger Sayle  <roger@eyesopen.com>
1116         PR c++/11409
1117         * class.c (resolve_address_of_overloaded_function): When building
1118         list of matching non-template function decls, ignore anticipated
1119         declarations of undeclared or shadowed GCC builtins.
1121 2003-09-06  Steven Bosscher  <steven@gcc.gnu.org>
1123         PR c++/11595
1124         * decl.c (define_label): Remove unreachable timevar pop.
1125         Always return the decl, even if the definition is invalid.
1127 2003-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1129         PR c++/12167
1130         * parser.c (cp_parser_late_parsing_default_args): Push & pop the
1131         unparsed functions queue.
1133 2003-09-05  Mark Mitchell  <mark@codesourcery.com>
1135         PR c++/12163
1136         * call.c (perform_direct_initialization): Correct logic for
1137         direct-initialization of a class type.
1139         PR c++/12146
1140         * pt.c (lookup_template_function): Robustify.
1142 2003-09-05  Nathan Sidwell  <nathan@codesourcery.com>
1144         PR c++/11922
1145         * pt.c (tsubst_qualified_id): Make sure we get a non-type.
1146         (tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
1147         is_type_p to lookup_qualified_name.
1149         * semantics.c (finish_call_expr): Refactor some code.
1151         PR c++/12037
1152         * cp-tree.h (COMPOUND_EXPR_OVERLOADED): New.
1153         (build_min_non_dep): Declare.
1154         * tree.c (build_min): Propagate TREE_SIDE_EFFECTS.
1155         (build_min_non_dep): New.
1156         * cvt.c (convert_to_void): Don't explicitly copy
1157         TREE_SIDE_EFFECTS, TREE_NO_UNUSED_WARNING.
1158         * call.c (build_new_method_call): Use build_min_non_dep.
1159         * decl2.c (grok_array_decl): Likewise.
1160         (build_offset_ref_call_from_tree): Likewise.
1161         * typeck.c (finish_class_member_access_expr,
1162         build_x_indirect_ref, build_x_binary_op, build_x_unary_op,
1163         build_x_conditional_expr, build_x_compound_expr): Likewise.
1164         (build_static_cast, build_reinterpret_cast,
1165         build_const_cast): Propagate TREE_SIDE_EFFECTS inside a template.
1166         * typeck2.c (build_x_arrow): Use build_min_non_dep.
1167         (build_functional_cast): Propagate TREE_SIDE_EFFECTS inside a
1168         template.
1169         * rtti.c (build_dynamic_cast_1): Set DECL_IS_PURE.
1170         (build_dynamic_cast): Set TREE_SIDE_EFFECTS.
1171         * pt.c (build_non_dependent_expr): Check COMPOUND_EXPR_OVERLOADED.
1173 2003-09-04  Richard Henderson  <rth@redhat.com>
1175         * decl2.c (mark_member_pointers_and_eh_handlers): Update for
1176         change in cgraph_mark_needed_node arguments.
1178 2003-09-02  Geoffrey Keating  <geoffk@apple.com>
1180         PR 12161
1181         * decl2.c (mark_used): Use ggc_push_context/ggc_pop_context.
1182         * tree.c (cp_cannot_inline_tree_fn): Likewise.
1184 2003-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1186         * cp-tree.h (finish_sizeof, finish_alignof): Remove.
1187         (expr_sizeof): Replace with ...
1188         (cxx_sizeof_or_alignof_expr): ... here.
1189         (cxx_sizeof_or_alignof_type): Make complain parameter a bool.
1190         * parser.c (cp_parser_unary_expression): Commonize alignof and
1191         sizeof handling.
1192         * pt.c (tsubst_copy_and_build): Adjust alignof and sizeof
1193         substitution.
1194         * semantics.c (finish_sizeof, finish_alignof): Remove.
1195         * typeck.c (cxx_sizeof_or_alignof_type): Complain parameter
1196         becomes bool. Set TREE_READONLY.
1197         (expr_sizeof): Replace with ...
1198         (cxx_sizeof_or_alignof_expr): ... here. Clear TREE_SIDE_EFFECTS.
1200 2003-09-04  Mark Mitchell  <mark@codesourcery.com>
1202         Remove cast-as-lvalue extension.
1203         * call.c (build_conditional_expr): Correct formatting.
1204         (convert_like_real): Use lvalue_p, not non_cast_lvalue_p.
1205         (initialize_real): Use real_lvalue_p, not real_non_cast_lvalue_p.
1206         * cp-tree.h (non_cast_lvalue_p): Remove.
1207         (real_non_cast_lvalue_p): Remove.
1208         (non_cast_lvalue_or_else): Remove.
1209         * tree.c (lvalue_p_1): Remove allow_cast_as_lvalue parameter.
1210         (real_lvalue_p): Adjust call to lvalue_p_1.
1211         (non_cast_lvalue_p): Remove.
1212         (non_cast_lvalue_or_else): Remove.
1213         (lvalue_p): Adjust call to lvalue_p_1.
1214         (lvalue_or_else): Simplify.
1215         * typeck.c (build_unary_op): Use lvalue_or_else, not
1216         non_cast_lvalue_or_else.
1217         (build_static_cast): Use real_lvalue_p, not real_non_cast_lvalue_p.
1219 2003-09-03  DJ Delorie  <dj@redhat.com>
1221         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
1223 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
1225         PR c++/12053
1226         * class.c (include_empty_classes): Correct logic for ABI version 1.
1228 2003-09-03  Richard Henderson  <rth@redhat.com>
1230         * optimize.c (optimize_function): Push/pop ggc context around
1231         the call to optimize_inline_calls.
1233 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
1235         PR c++/11553
1236         * parser.c (cp_parser_decl_specifier_seq): Add check for a
1237         duplicate friend decl-specifier.
1239 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
1241         PR c++/11847
1242         * pt.c (convert_nontype_argument): Correct representation of
1243         REFERENCE_TYPE expressions.
1245         PR c++/11808
1246         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
1247         (finish_call_expr): Change prototype.
1248         * parser.c (cp_parser_postfix_expression): Adjust call to
1249         finish_call_expr.
1250         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
1251         * semantics.c (finish_call_expr): Add koenig_p parameter.
1253 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
1255         PR c++/12114
1256         * cp-tree.h (initialize_reference): Change prototype.
1257         * call.c (initialize_reference): Add cleanup parameter.
1258         * decl.c (grok_reference_init): Likewise.
1259         (check_initializer): Likewise.
1260         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
1261         (duplicate_decls): When replacing an anticipated builtin, do not
1262         honor TREE_NOTHROW.
1263         * typeck.c (convert_for_initialization): Correct call to
1264         initialize_reference.
1266         PR c++/11972
1267         * pt.c (dependent_type_p_r): Pass only the innermost template
1268         arguments to any_dependent_template_arguments_p.
1270 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
1272         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
1273         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
1274         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
1275         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
1276         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
1278 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
1280         PR c++/12093
1281         * pt.c (build_non_dependent_expr): Do not build a
1282         NON_DEPENDENT_EXPR for a STRING_CST.
1284         PR c++/11928
1285         * search.c (add_conversions): Avoid adding two conversion
1286         operators for the same type.
1288 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
1290         PR c++/6196
1291         * pt.c (tsubst_copy_and_build): Correct handling of
1292         address-of-label extension.
1293         * semantics.c (finish_goto_stmt): The address of a label must go
1294         through the lvalue-to-rvalue conversion.
1296 2003-08-29  Richard Henderson  <rth@redhat.com>
1297             Jason Merrill <jason@redhat.com>
1299         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
1300         (LANG_HOOKS_RTL_EXPAND_STMT): New.
1301         * cp-tree.h (cxx_expand_function_start): Declare.
1302         * decl.c (start_function): Use allocate_struct_function.
1303         Move stmts_are_full_exprs_p assertion from expand_body.
1304         Do not free_after_parsing or free_after_compilation.
1305         (cxx_push_function_context): Move code to set struct function
1306         data from genrtl_start_function.
1307         * optimize.c (optimize_function): Don't inc/dec function_depth.
1308         * semantics.c (expand_body): Use tree_rest_of_compilation.
1309         (cxx_expand_function_start): Rename from genrtl_start_function,
1310         omit bits done by tree_rest_of_compilation.
1311         (genrtl_finish_function): Remove.
1312         (clear_decl_rtl): Move to ../tree-optimize.c.
1314 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1316         PR c++/11811
1317         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
1318         function. 
1319         * cxx-pretty-print.h: Declare.
1320         * error.c (dump_template_parameter): Use it.
1321         (dump_type): Likewise.
1323 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
1325         * init.c (decl_constant_value): Deal with COND_EXPR specially.
1326         * call.c (build_conditional_expr): Revert previous patch.
1328         PR optimization/5079
1329         * call.c (build_conditional_expr): Use decl_constant_value to
1330         simplify the arguments.
1332 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
1334         * parser.c (struct cp_token): Use enum bitfields.
1335         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
1336         512B allocation unit.
1337         (cp_parser_token_tree_map_node): Use enum bitfields.
1339 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
1341         PR c++/11871
1342         * decl.c (push_class_level_binding): Correct old_decl value from
1343         my 2003-07-29 reorganization.
1345         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
1346         (build_new_method_call): Add goto finish.
1347         * semantics.c (simplify_aggr_init_exprs_r): Don't set
1348         TREE_SIDE_EFFECTS on a call.
1350 2003-08-25  Richard Henderson  <rth@redhat.com>
1352         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
1354 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1356         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
1357         (cxx_pretty_printer): Adjust base type.
1358         (pp_cxx_function_specifier): Declare.
1359         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
1360         (pp_cxx_left_paren): Likewise.
1361         (pp_cxx_right_paren): Likewise.
1362         (pp_cxx_dot): Likewise.
1363         (pp_cxx_arrow): Likewise.
1364         (pp_cxx_semicolon): Likewise.
1365         (pp_cxx_identifier): Likewise.
1366         (pp_cxx_cv_qualifier_seq): Likewise.
1367         (pp_cxx_storage_class_specifier): Likewise.
1368         (pp_cxx_expression_list): Likewise.
1369         (pp_cxx_space_for_pointer_operator): Likewise.
1370         (pp_cxx_init_declarator): Likewise.
1371         (pp_cxx_call_argument_list): Likewise.
1372         (pp_cxx_nonconsecutive_character): Tidy.
1373         (pp_cxx_conversion_function_id): New function.
1374         (pp_cxx_template_id): Likewise.
1375         (pp_cxx_template_keyword_if_needed): Likewise.
1376         (pp_cxx_nested_name_specifier): Likewise.
1377         (pp_cxx_unqualified_id): Tidy
1378         (pp_cxx_qualified_id): Handle more nodes.
1379         (pp_cxx_primary_expression): Tidy.
1380         (pp_cxx_postfix_expression): Likewise.
1381         (pp_cxx_new_expression): Tidy.
1382         (pp_cxx_delete_expression): Likewise.
1383         (pp_cxx_cast_expression): New function.
1384         (pp_cxx_pm_expression): Tidy.
1385         (pp_cxx_conditional_expression): Likewise.
1386         (pp_cxx_assignment_operator): New function.
1387         (pp_cxx_assignment_expression): Tidy.
1388         (pp_cxx_expression): New function.
1389         (pp_cxx_function_specifier): Likewise.
1390         (pp_cxx_decl_specifier_seq): Likewise.
1391         (pp_cxx_simple_type_specifier): Tidy.
1392         (pp_cxx_type_specifier_seq): Likewise.
1393         (pp_cxx_ptr_operator): New function.
1394         (pp_cxx_implicit_parameter_type): Likewise.
1395         (pp_cxx_parameter_declaration): Tidy.
1396         (pp_cxx_parameter_declaration_clause): New function.
1397         (pp_cxx_exception_specification): Likewise.
1398         (pp_cxx_direct_declarator): Tidy.
1399         (pp_cxx_declarator): Likewise.
1400         (pp_cxx_ctor_initializer): New function.
1401         (pp_cxx_function_definition): Likewise.
1402         (pp_cxx_abstract_declarator): Tidy.
1403         (pp_cxx_direct_abstract_declarator): Likewise.
1404         (pp_cxx_type_id): Likewise.
1405         (pp_cxx_exception_declaration): New function.
1406         (pp_cxx_statement): Likewise.
1407         (pp_cxx_simple_declaration): Likewise.
1408         (pp_cxx_template_parameter_list): Likewise.
1409         (pp_cxx_template_parameter): Likewise.
1410         (pp_cxx_template_declaration): Likewise.
1411         (pp_cxx_explicit_specialization): Likewise.
1412         (pp_cxx_explicit_instantiation): Likewise.
1413         (pp_cxx_declaration): Tidy.
1414         (pp_cxx_pretty_printer_init): Initialize more fields.
1416 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
1418         PR c++/8795
1419         * cp-tree.h (build_cplus_method_type): Remove.
1420         * call.c (standard_conversion): Use build_method_type_directly
1421         instead of build_cplus_method_type.
1422         * class.c (build_clone): Likewise.
1423         (adjust_clone_args): Likewise.
1424         * decl.c (build_ptrmem_type): Likewise.
1425         (grokdeclarator): Likewise.
1426         (check_function_type): Likewise.
1427         * decl2.c (grok_method_quals): Likewise.
1428         (maybe_retrofit_in_chrg): Likewise.
1429         * pt.c (copy_default_args_to_explicit_spec): Likewise.
1430         (tsubst_function_type): Likewise.
1431         (tsubst): Likewise.
1432         * tree.c (build_cplus_method_type): Remove.
1433         * typeck.c (merge_types): Use build_method_type_directly.
1435 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1437         PR c++/3765
1438         * search.c (dfs_access_in_type): Fix typo in comment.
1439         (dfs_accessible_queue_p): Likewise.
1440         (dfs_accessible_p): Only terminate when a friend is found.
1441         (accessible_p): Return immediately if access_in_type allows
1442         access.
1444 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1446         PR c++/641, c++/11876
1447         * friend.c (add_friend): Add complain parameter.
1448         (make_friend_class): Likewise.
1449         (do_friend): Adjust add_friend call.
1450         * decl.c (grokdeclarator): Adjust make_friend_class call.
1451         * parser.c (cp_parser_member_declaration): Likewise.
1452         (cp_parser_template_declaration_after_export): Likewise.
1453         * pt.c (instantiate_class_template): Adjust make_friend_class
1454         and add_friend call.
1455         * cp-tree.h (make_friend_class): Adjust declaration.
1456         (add_friend): Likewise.
1458 2003-08-21  Jason Merrill  <jason@redhat.com>
1460         PR c++/11283
1461         * call.c (build_conditional_expr): Ignore cv-qual differences for
1462         non-class types.
1464 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
1466         PR c++/11551
1467         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
1468         (cp_parser_primary_expression): Adjust call to
1469         cp_parser_id_expression.
1470         (cp_parser_unqualified_id): Complain about the use of
1471         typedef-names in a destructor declarator.
1472         (cp_parser_postfix_expression): Adjust call to
1473         cp_parser_id_expression.
1474         (cp_parser_type_parameter): Likewise.
1475         (cp_parser_template_argument): Likewise.
1476         (cp_parser_declarator_id): Likewise.
1478         PR c++/11919
1479         * call.c (standard_conversion): Use same_type_p, not pointer
1480         equality, to compare types.
1482         PR c++/10762
1483         * parser.c (cp_parser_using_declaration): Check for invalid uses
1484         of template-ids here...
1485         * decl2.c (do_class_using_decl): ... rather than here.
1487 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
1489         PR c++/11834
1490         * pt.c (more_specialized): Bump processing_template_decl.
1492 2003-08-21  Jason Merrill  <jason@redhat.com>
1494         PR c++/11614
1495         * decl.c (grokdeclarator): Recognize a flexible array based on the
1496         type, not the form of the declarator.
1498 2003-08-20  Jason Merrill  <jason@redhat.com>
1500         * semantics.c (simplify_aggr_init_expr): Split out from
1501         simplify_aggr_init_exprs_r.  Convert slot address to match
1502         the return type.
1503         * cp-tree.h: Declare it.
1504         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
1505         DECL_NAME of a user variable.
1507 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
1509         PR c++/11945
1510         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
1511         COMPOUND_EXPR.
1512         * semantics.c (finish_expr_stmt): Always convert to void.
1513         * typeck.c (build_x_compound_exp): Always convert to void.
1515 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
1517         PR c++/11684
1518         * cp-tree.h (grok_op_properties): Change prototype.
1519         * decl.c (grok_op_properties): Add complain parameter.
1520         (grokfndecl): Pass it.
1521         * pt.c (tsubst_decl): Adjust accordingly.
1523         PR c++/10926
1524         * decl.c (start_method): Return immediately if push_template_decl
1525         does not like the declaration.
1526         * pt.c (push_template_decl_real): Disallow member template
1527         destructors.
1529         PR c++/11036
1530         * cp-tree.h (add_binding): Add prototype.
1531         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
1532         (maybe_warn_about_overly_private_class): Use
1533         CLASSTYPE_DESTRUCTORS.
1534         (pushclass): Adjust call to set_identifier_type_value.
1535         * decl.c (add_binding): Give it external linkage.
1536         (push_local_binding): Adjust call to add_binding.
1537         (push_class_binding): Likewise.
1538         (set_identifier_type_value_with_scope): Change prototype.  Use
1539         add_binding for global bindings.
1540         (set_identifier_type_value): Adjust accordingly.
1541         (pushtag): Likewise.
1542         (pushdecl): Use set_identifier_type_value, not
1543         set_identifier_type_value_with_scope.
1544         (pushdecl_namespace_level): Adjust calls to
1545         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
1546         (pushdecl_class_level): Likewise.
1547         (lookup_tag): Use select_decl.
1548         (select_decl): Improve comment.
1549         (record_builtin_type): Do not call pushdecl.
1550         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
1551         (cp_finish_decl): Adjust call to set_identifier_type_value.
1552         (check_elaborated_type_specifier): Improve checks for invalid uses
1553         of typedefs.
1554         (xref_tag): Adjust call to check_elaborated_type_specifier.
1555         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
1556         * name-lookup.c (set_namespace_binding): Use add_binding.
1557         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
1558         rather than an IDENTIFIER_NODE, to represent built-in types, if
1559         requested by the caller.
1560         (cp_parser_postfix_expression): Adjust call.
1561         (cp_parser_type_specifier): Likewise.
1562         (cp_parser_elaborated_type_specifier): Adjust call to
1563         check_elaborated_type_specifier.
1564         * typeck2.c (build_functional_cast): Do not perform name lookups.
1566         PR c++/10717
1567         * decl.c (expand_static_init): Remove unnecessary code.
1569 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
1571         PR c++/10538, PR c/5582
1572         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
1574 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1576         PR c++/11174
1577         * init.c (build_offset_ref): Perform access checking for
1578         pointer to member correctly.
1580 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1582         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
1584 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1586         PR c++/11957
1587         * cp-tree.h (finish_stmt_expr): Add bool parameter.
1588         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
1589         adjust the stmt_expr here.
1590         (build_vec_init): Use finish_stmt_expr_expr, convert result to
1591         array type.
1592         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
1593         call.
1594         * pt.c (tsubst_copy): Likewise.
1595         * semantics.c (finish_stmt_expr): Add parameter.
1597         * pt.c (instantiate_class_template): Push to class's scope before
1598         tsubsting base.
1600 2003-08-17  Jan Hubicka  <jh@suse.cz>
1602         PR C++/11702
1603         * semantics.c (finish_id_expression): Mark all functions as used.
1605 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
1607         PR c++/11512
1608         * cvt.c (convert_to_void): Indicate which side of conditional has
1609         no effects, and rhs of comma operator. Test for no sideeffect
1610         expressions here and always build a convert expr.
1611         * init.c (expand_default_init): Convert the init to void.
1612         * typeck.c (build_x_compound_expr): Do not check for side effects
1613         here.
1614         (build_compound_expr): Do not convert lhs when building a
1615         template.
1617 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1619         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
1620         * decl2.c (build_offset_ref_call_from_tree): Use
1621         build_non_dependent_expr.
1622         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
1623         * pt.c (build_non_dependent_expr): Set operand.
1625 2003-08-14  Jan Hubicka  <jh@suse.cz>
1627         * decl2.c (mark_member_pointers): Rename to...
1628         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
1629         (lower_function): Update call.
1630         * except.c (eh_type_info): Break out from ...
1631         (build_eh_type): ... here; tinfo is already used.
1632         (finish_eh_spec_block): Mark tinfos as used.
1633         * semantics.c (finish_handler_params): Mark tinfo as used.
1634         * cp-tree.h (eh_type_info): Declare.
1636 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
1638         * pt.c (instantiate_class_template): Set location before
1639         substuting bases.
1641         * decl.c (make_typename_type): Use my_friendly_assert.
1642         * pt.c (tsubst_aggr_type): Rearrange context substitution.
1644 2003-08-14  Jan Hubicka  <jh@suse.cz>
1646         * method.c (use_thunk): Expand body directly.
1648 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
1650         PR c++/11703
1651         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
1652         determine whether or not to promote types.
1653         (convert_for_arg_passing): Likewise.
1654         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
1655         templates.
1656         * pt.c (tsubst_decl): Do not expect it to be set.
1658         PR c++/9512
1659         PR c++/10923
1660         * cp-tree.h (check_elaborated_type_specifier): Declare.
1661         (handle_class_head): Remove.
1662         (note_got_semicolon): Likewise.
1663         (note_list_got_semicolon): Likewise.
1664         (finish_class_definition): Likewise.
1665         * decl.c (check_elaborated_type_specifier): Make it public.
1666         Robustify.
1667         (handle_class_head): Remove.
1668         * parser.c (cp_parser_elaborated_type_specifier): Use
1669         check_elaborated_type_specifier.
1670         (cp_parser_class_specifier): Do not call finish_class_definition.
1671         (cp_parser_class_head): Or handle_class_head.  Check for
1672         over-qualified names.
1673         * semantics.c (finish_class_definition): Remove.
1675         * parser.c (cp_parser_check_for_definition_in_return_type): New
1676         function.
1677         (cp_parser_simple_declaration): Adjust call to
1678         cp_parser_init_declarator.
1679         (cp_parser_decl_specifier_seq): Change type of
1680         declares_class_or_enum parameter.
1681         (cp_parser_explicit_instantiation): Adjust accordingly.
1682         (cp_parser_type_specifier): Change type of
1683         declares_class_or_enum parameter.
1684         (cp_parser_init_declarator): Add declares_class_or_enum
1685         parameter.
1686         (cp_parser_parameter_declaration): Adjust call to
1687         cp_parser_decl_specifier_seq.
1688         (cp_parser_function_definition): Likewise.
1689         (cp_parser_member_declaration): Likewise.
1690         (cp_parser_single_declaration): Likewise.
1692         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
1693         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
1694         (TYPE_OVERLOADS_CALL_EXPR): Remove.
1695         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1696         (TYPE_OVERLOADS_ARROW): Likewise.
1697         (CLASSTYPE_GOT_SEMICOLON): Likewise.
1698         * class.c (check_bases): Do not set them.
1699         (finish_struct_1): Likewise.
1700         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
1701         (build_ptrmemfunc_type): Likewise.
1702         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
1703         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
1704         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
1705         * lex.c (note_got_semicolon): Remove.
1706         (note_list_got_semicolon): Likewise.
1707         * parser.c (cp_parser_simple_declaration): Do not call
1708         note_list_got_semicolon.
1709         * pt.c (list_eq): Remove.
1710         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
1711         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
1712         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
1713         * ptree.c (cxx_print_type): Do not print them.
1714         * semantics.c (finish_member_class_template): Do not call
1715         note_list_got_semicolon.
1717 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
1719         * call.c (standard_conversion): Opaque pointers interconvert.
1721         * testsuite/g++.dg/other/opaque-3.C: New.
1723 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
1725         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
1726         types correctly.
1728 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
1730         PR c++/11789
1731         * cp-tree.h (get_vbase): Remove.
1732         (get_vbase_types): Remove.
1733         * init.c (expand_member_init): Correct logic for looking up base
1734         classes.
1736 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1738         * error.c (dump_expr): Tidy.
1739         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
1740         (pp_cxx_begin_template_argument_list): Likewise.
1741         (pp_cxx_end_template_argument_list): Likewise.
1742         (is_destructor_name): Likewise.
1743         (pp_cxx_unqualified_id): Likewise.
1744         (pp_cxx_qualified_id): Likewise.
1745         (pp_cxx_id_expression): Likewise.
1746         (pp_cxx_new_expression): Likewise.
1747         (pp_cxx_delete_expression): Likewise.
1748         (pp_cxx_pm_expression): Likewise.
1749         (pp_cxx_type_specifier): Rework.
1750         (pp_cxx_type_id): Likewise.
1751         (pp_cxx_primary_expression): Likewise.
1752         (pp_cxx_postfix_expression): Likewise.
1753         (pp_cxx_unary_expression): Likewise.
1754         (pp_cxx_multiplicative_expression): Likewise.
1755         (pp_cxx_conditional_expression): Likewise.
1756         (pp_cxx_assignment_expression): Likewise.
1757         (pp_cxx_pretty_printer_init): Tidy.
1759 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1761         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
1762         NODE is always a TREE_VEC of nonzero size.
1763         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
1764         * decl2.c (arg_assoc): Template args will be a vec.
1765         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
1766         dump_template_argument_list.
1767         (dump_template_parms): Args will be a vec.
1768         * parser.c (cp_parser_template_argument_list): Produce a
1769         vector, not a list.
1770         * pt.c (coerce_template_parms): Args are always vectors.
1771         (mangle_class_name_for_template): Likewise.
1772         (lookup_template_function): Likewise.
1773         (lookup_template_class): Likewise.
1774         (tsubst_template_args): Likewise.
1775         (tsubst_baselink): Use tsubst_template_args.
1776         (tsubst_qualified_id): Likewise.
1777         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
1778         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
1779         (any_dependent_template_args_p):  Args are always vectors.
1780         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
1782         PR c++/11670
1783         * call.c (convert_like_real): Add rvalue binding error message.
1784         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
1785         really a cast.
1787         PR c++/10530
1788         * pt.c (dependent_type_p_r): A dependent template-id is a class
1789         type with dependent template arguments, or a bound template
1790         template parameter.
1791         (type_dependent_expression_p): A template function decl cannot
1792         have a dependent context.
1794 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1796         PR c++/5767
1797         * parser.c (cp_parser_class_name): Return immediately when scope
1798         is error_mark_node.
1800 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
1802         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
1804         * cp/call.c (standard_conversion): Support opaque types.
1805         Include target.h.
1806         (strip_top_quals): Use cp_build_qualified_type instead of
1807         TYPE_MAIN_VARIANT.
1809         * cp/typeck.c (convert_for_assignment): Support opaque types.
1811         * testsuite/g++.dg/other/opaque-1.C: New.
1813         * testsuite/g++.dg/other/opaque-2.C: New.
1815 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
1817         * decl.c (grokparms): Use cp_build_qualified_type instead
1818         TYPE_MAIN_VARIANT.
1820 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1822         * cxx-pretty-print.h: New file.
1823         * cxx-pretty-print.c: Likewise.
1824         * error.c (scratch_pretty_printer): Change type.
1825         (init_error): Tidy.
1826         (dump_aggr_type): Likewise.
1827         (dump_global_iord): Likewise.
1828         (dump_expr): Likewise.
1829         (dump_char): Remove.
1830         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
1831         (cxx_initialize_diagnostics): New function.
1832         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
1833         (CXX_PRETTY_PRINT_H): New variable.
1834         (cp/cxx-pretty-print.o): New rule.
1835         (cp/cp-lang.o): Update dependence.
1836         (cp/error.o): Likewise.
1838 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
1840         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
1841         (DECL_DECLARED_INLINE_P): Remove.
1842         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
1843         if decl is a FUNCTION_DECL.  This never made sense, but now it is
1844         required to avoid a tree check failure.
1845         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
1846         * optimize.c (maybe_clone_body): Likewise.
1848 2003-08-04  Roger Sayle  <roger@eyesopen.com>
1850         * decl.c (cxx_insert_default_attributes): Delete.
1851         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
1852         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
1854 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
1856         PR c++/11704
1857         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
1858         unknown type.
1860         PR c++/11766
1861         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
1862         member functions.
1864 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1866         PR c++/9447
1867         * cp-tree.def (USING_DECL): Document its type.
1868         * class.c (pushclass): If we're entering a template, push any
1869         dependent using decls it has.
1870         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
1871         a dependent scope.
1872         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
1873         (tsubst): Remove USING_DECL checks.
1874         (type_dependent_expression_p): Remove USING_DECL case.
1875         * semantics.c (finish_member_declaration): A USING_DECL's type
1876         indicates whether it is dependent.
1878 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
1880         * cp-tree.h (pushclass): Remove unneeded parameter.
1881         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
1882         (push_nested_class): Adjust pushclass call.
1883         * pt.c (instantiate_class_template): Likewise.
1884         * semantics.c (begin_class_definition): Likewise.
1886 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
1888         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
1890 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
1892         PR c++/11697
1893         * decl.c (decls_match): Don't ignore the types of template
1894         classes.
1896         PR c++/11744
1897         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
1899 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1901         PR c++/8442, c++/8806
1902         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
1903         preferred.
1904         (check_elaborated_type_specifier): Add allow_template_p
1905         parameter.  Check tag mismatch and class template.
1906         (xref_tag): Add template_header_p parameter.  Add assertion
1907         that name is an IDENTIFIER_NODE.  Remove implicit typename
1908         warning.  Simplify lookup process if globalize is true.
1909         (cxx_init_decl_processing): Adjust call to xref_tag.
1910         (xref_tag_from_type): Likewise.
1911         * decl2.c (handle_class_head): Likewise.
1912         * parser.c (cp_parser_elaborated_type_specifier,
1913         cp_parser_class_head): Likewise.
1914         * rtti.c (init_rtti_processing, build_dynamic_cast1,
1915         tinfo_base_init, emit_support_tinfos): Likewise.
1916         * class.c (is_base_of_enclosing_class): Remove.
1917         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
1918         template template argument.
1919         * cp-tree.h (xref_tag): Adjust declaration.
1920         (is_base_of_enclosing_class): Remove.
1921         * NEWS: Document template template argument change.
1923 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
1925         * parser.c (cp_parser_init_declarator,
1926         cp_paser_member_declaration): Reformat.
1927         * pt.c (lookup_template_class, type_unification_real, unify,
1928         type_dependent_expression_p): Reformat.
1930         PR c++/11295
1931         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
1932         tf_stmt_expr_body.
1933         (finish_stmt_expr_expr): Declare.
1934         * parser.c (cp_parser_primary_expression): Tell
1935         cp_parser_compount_statement that it is a statement expression.
1936         (cp_parser_statement, cp_parser_labeled_statement,
1937         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
1938         in_statement_expr_p parameter.
1939         (cp_parser_expression_statement): Likewise. Call
1940         finish_stmt_expr_expr for final expression of a statement
1941         expression.
1942         (cp_parser_for_init_statement,
1943         cp_parser_implicitly_scoped_statement,
1944         cp_parser_already_scoped_statement, cp_parser_function_definition,
1945         cp_parser_try_block, cp_parser_handled): Adjust.
1946         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
1947         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
1948         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
1949         * semantics.c (finish_expr_stmt): Do not deal with statement
1950         expressions.
1951         (begin_stmt_expr): Clear last_expr_type.
1952         (finish_stmt_expr_expr): New.
1953         (finish_stmt_expr): Process the value expression.
1955         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
1956         compound expr inside the target's initializer.
1958         PR c++/11525
1959         * parser.c (cp_parser_primary_expression): Do not set
1960         non-constant-p merely because it is a dependent scope.
1962         PR c++/9447
1963         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
1964         * semantics.c (finish_expr_stmt): Do not convert to void in a
1965         template.
1967 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
1969         * pt.c (coerce_template_parms): Refactor.
1970         (fn_type_unification): Increment processing_template_decl when
1971         tsubsting an incomplete set of explicit args.
1973         PR c++/11347
1974         * pt.c (instantiate_class_template): Increment
1975         processing_template_decl around the tsubst of a template member
1976         class.
1977         (tsubst_qualified_id): Assert we do not have a dependent scope.
1979         * pt.c (coerce_template_template_parms, lookup_template_class,
1980         can_complete_type_without_circularity, instantiate_class_template,
1981         tsubst_decl, unify): Reformat.
1983 2003-07-31  Jan Hubicka  <jh@suse.cz>
1985         * decl2.c (maybe_make_one_only): Use mark_referenced.
1986         * method.c (use_thunk): Likewsie.
1988 2003-07-30  Jan Hubicka  <jh@suse.cz>
1990         * class.c (build_vtable_entry_ref): Kill.
1991         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
1992         (build_vfn_ref): Do not call build_vtable_entry_ref.
1993         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
1994         * cp-tree.h (prepare_assemble_variable): Kill.
1995         * cp-decl.c (prepare_assemble_variable): Kill.
1997 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
1999         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
2000         of setting valid_pch by hand.
2002 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2004         * decl.c (finish_enum): Initialize underlying_type.
2006 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
2008         PR c++/9447
2009         * decl.c (add_binding): Add bval local variable.
2010         (push_class_level_binding): Likewise. Allow a USING_DECL to be
2011         pushed.
2012         * decl2.c (do_class_using_decl):  The type of a using decl is
2013         unknown.
2014         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
2015         function call lookup code.
2016         * pt.c (tsubst): A USING_DECL will have unknown type.
2017         (tsubst_copy_and_build): Allow a using decl.
2018         (type_dependent_expression_p): A USING_DECL will make it
2019         dependent.
2020         * semantics.c (finish_member_declaration): Push a dependent using
2021         declaration.
2023 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
2025         PR c++/11530
2026         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
2027         * semantics.c (finish_id_expression): Call mark_used for all
2028         declarations.
2030 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
2032         PR c++/11667
2033         * call.c (standard_conversion): Allow all integral->enumeral
2034         conversions, after marking them as bad.
2035         * decl.c (finish_enum): Make sure that all enumerators are
2036         properly converted to the underlying type.
2037         (build_enumerator): Set DECL_CONTEXT for namespace-scope
2038         enumeration types.
2039         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
2040         (tsubst_enum): Tidy.
2042         * Make-lang.in (typeck.o): Depend on convert.h.
2043         (class.o): Likewise.
2044         (rtti.o): Likewise.
2045         * call.c: Include convert.h.
2046         (convert_arg_to_ellipsis): Use convert_to_real.
2047         * class.c: Include convert.h.
2048         (build_base_path): Use convert_to_integer.
2049         * rtti.c: Include convert.h.
2050         (build_headof): Use convert_to_integer.
2051         * typeck.c: Include convert.h.
2052         (decay_conversion): Use convert_to_integer.
2053         (build_unary_op): Use build_nop.
2054         (get_delta_difference): Use convert_to_integer.
2055         (build_ptrmemfunc): Avoid unnecessary conversions.
2057 2003-07-28  Jan Hubicka  <jh@suse.cz>
2059         * decl2.c (mark_member_pointers): Verify that member pointer points to
2060         the function.
2062 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
2064         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
2065         (finish_compound_stmt): Remove no scope arg.
2066         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
2067         end_compound_stmt calls.
2068         (expand_static_init, begin_destructor_body, begin_function_body,
2069         finish_function_body): Likewise.
2070         * decl2.c (start_objects, finish_objects,
2071         start_static_storage_duration_function,
2072         finish_static_storage_duration_function): Likewise.
2073         * init.c (begin_init_stmts, finish_init_stmts,
2074         construct_virtual_base, build_vec_init): Likewise.
2075         * method.c (do_build_assign_ref, synthesize_method): Likewise.
2076         * parser.c (cp_parser_compound_statement,
2077         cp_parser_implicitly_scoped_statement,
2078         cp_parser_already_scoped_statement): Likewise.
2079         * pt.c (tsubst_expr): Likewise.
2080         * semantics.c (begin_compound_stmt): No scope arg is a bool.
2081         (finish_compound_stmt): Remove no scope arg.
2083         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
2084         always dyadic.
2086 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
2088         * call.c (standard_conversion): Tweak handling of
2089         pointer-to-member types.
2090         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
2091         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
2092         pointer-to-data member types.
2094 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2096         * parser.c (cp_parser_type_parameter): Reformat.
2097         (cp_parser_parameter_declaration): Deprecate default args where
2098         not allowed.
2100 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2102         * cfns.h: Rebuilt.
2104         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
2105         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
2106         * init.c (begin_init_stmts): Make static. Return is_global
2107         value. Always call begin_stmt_expr.
2108         (finish_init_stmts): Make static. Add is_global parm. Always
2109         building a stmt tree.
2110         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
2111         (build_vec_init): Likewise. Always building a stmt tree.
2112         (expand_default_init): Always building a stmt tree.
2113         (get_temp_regvar): Likewise.
2114         * semantics.c (begin_global_stmt_expr,
2115         finish_global_stmt_expr): Remove.
2117 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2119         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
2120         (build_x_compound_expr_from_list): Declare.
2121         * typeck.c (build_x_compound_expr_from_list): New.
2122         (build_x_compound_expr): Adjust.
2123         (build_compound_expr): Remove unreachable code. Take two
2124         parameters, adjust.
2125         * decl.c (grok_reference_init): Use
2126         build_x_compound_expr_from_list.
2127         (expand_static_init): Adjust build_compound_expr call.
2128         (cxx_maybe_build_cleanup): Likewise.
2129         * init.c (perform_member_init): Use
2130         build_x_compound_expr_from_list.
2131         (build_new_1): Likewise.
2132         (build_vec_delete): Adjust build_compound_expr calls.
2133         (build_vbase_delete): Likewise.
2134         * typeck2.c (store_init_value): Use
2135         build_x_compound_expr_from_list.
2136         (build_functional_cast): Likewise.
2138 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2140         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
2141         * decl.c (make_typename_type): Pass it.
2142         * pt.c (lookup_template_class): Use it.
2143         (resolve_typename_type): Pass it.
2144         * semantics.c (finish_template_type): Pass it.
2146 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2148         PR c++/11617
2149         * cp-tree.h (qualified_name_lookup_error): Declare.
2150         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
2151         errors.
2152         (tsubst_expr) <DECL_STMT case>: Likewise.
2153         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
2154         * semantics.c (qualified_name_lookup_error): New, broken out of ...
2155         (finish_id_expression): ... here. Use it.
2157 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
2159         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
2161 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2163         PR c++/11596
2164         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
2165         (tsubst_template_arg): New.
2166         (tsubst_template_arg_vector): Rename to ...
2167         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
2168         tsubst_template_arg.
2169         (coerce_template_parms): Use tsubst_template_arg for default
2170         value.
2171         (tsubst_template_parms): Likewise.
2172         (tsubst_aggr_type): Adjust.
2173         (tsubst_decl): Likewise.
2174         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
2175         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
2177 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
2179         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
2180         * error.c: Use the new pretty-printer framework.
2182 2003-07-24  Per Bothner  <pbothner@apple.com>
2184         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
2185         which causes errors messages to incorrectly mention included files.
2187 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
2189         * cp-tree.h (convert_to_base_statically): Declare.
2190         * call.c (build_special_member_call): Convert INSTANCE to the base
2191         type.
2192         * class.c (convert_to_base_statically): New method.
2193         * init.c (construct_virtual_base): Use it.
2194         * method.c (do_build_assign_ref): Fix typo in comment.
2196 2003-07-24  Jason Merrill  <jason@redhat.com>
2198         * decl.c: Just set truthvalue_* to boolean_*.
2200 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2202         * decl.c (reshape_init): Remove unreachable code.
2204 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2206         PR c++/11513
2207         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
2209 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
2211         PR c++/11645
2212         * cp-tree.h (accessible_base_p): Declare.
2213         * call.c (build_over_call): Use it.
2214         * search.c (accessible_base_p): New function, split out from ...
2215         (lookup_base): ... here.
2217         PR c++/11517
2218         * call.c (build_conditional_expr): Use perform_implicit_conversion
2219         and error_operand_p.  Robustify.
2220         * typeck.c (build_unary_op): Use perform_implicit_conversion.
2222 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
2224         PR c++/10953
2225         * parser.c (cp_parser_nested_name_specifier): Reset scope on
2226         failure.
2227         (cp_parser_elaborated_type_specifier): Likewise.
2229 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
2231         Eliminate use of POINTER_TYPE for pointers-to-members.
2232         * call.c (standard_conversion): Rework pointer-to-member handling.
2233         Add comments.
2234         (add_builtin_candidate): Likewise.
2235         (resolve_scoped_fn_name): Remove.
2236         (build_conditional_expr): Rework pointer-to-member handling.
2237         (compare_ics): Likewise.
2238         * class.c (check_field_decls): Use TYPE_PTR_P.
2239         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
2240         handling.
2241         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
2242         (TYPE_PTRMEM_P): Add comment.
2243         (TYPE_PTR_P): Simplify.
2244         (TYPE_PTROB_P): Correct definition.
2245         (TYPE_PTR_TO_MEMBER_P): New macro.
2246         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
2247         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2248         (resolved_scoped_fn_name): Remove declaration.
2249         (build_offset_ref): Change prototype.
2250         (resolve_offset_ref): Remove.
2251         (comp_target_types): Remove.
2252         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
2253         handling.
2254         (convert_to_reference): Use can_convert.
2255         (ocp_convert): Improve error handling.  Rework pointer-to-member
2256         handling.
2257         (perform_qualification_conversions): Rework pointer-to-member
2258         handling.
2259         * decl.c (build_ptrmem_type): Handle functions too.
2260         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
2261         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
2262         (grokparms): Remove OFFSET_TYPE error message.
2263         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
2264         * error.c (dump_type_prefix): Likewise.
2265         * expr.c (cplus_expand_constant): Use build_nop.
2266         * init.c (build_offset_ref): Add address_p parameter.  Fold in
2267         necessary bits from resolve_offset_ref.
2268         (resolve_offset_ref): Remove.
2269         * parser.c (cp_parser_postfix_expression): Remove special case
2270         code for OFFSET_TYPE.
2271         * pt.c (convert_nontype_argument): Rework pointer-to-member
2272         handling.
2273         (convert_template_argument): Likewise.
2274         (unify): Likewise.
2275         (invalid_nontype_parm_type_p): Likewise.
2276         (dependent_type_p_r): Likewise.
2277         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
2278         (target_incomplete_p_): Rework pointer-to-member
2279         handling.
2280         (get_pseudo_ti_init): Likewise.
2281         (get_pseudo_ti_desc): Likewise.
2282         * semantics.c (finish_qualified_id_expr): Adjust call to
2283         build_offset_ref.  Remove use of resolve_offset_ref.
2284         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
2285         * typeck.c (target_type): Use TYPE_PTRMEM_P.
2286         (type_unknown_p): Remove obsolete code about the time before
2287         non-dependent expressions were handled correctly.
2288         (qualify_type_recursive): Remove.
2289         (composite_pointer_type_r): New function.
2290         (composite_pointer_type): Use it.
2291         (merge_types): Remove dead comments.
2292         (comp_cv_target_types): Remove.
2293         (comp_target_types): Likewise.
2294         (comp_target_parms): Likewise.
2295         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
2296         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
2297         (build_binary_op): Do not use of comp_target_types.
2298         (pointer_diff): Remove OFFSET_TYPE case.
2299         (build_unary_op): Adjust pointer-to-member handling.
2300         (unary_complex_lvalue): Likewise.
2301         (check_for_casting_away_constness): Add description parameter.
2302         (build_static_cast): Pass it.
2303         (build_reinterpret_cast): Use check_for_casting_away_constness.
2304         (build_const_cast): Adjust pointer-to-member handling.
2305         (build_c_cast): Likewise.
2306         (convert_for_assignment): Remove OFFSET_TYPE error message.
2307         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
2308         (comp_ptr_ttypes_reinterpret): Remove.
2309         (casts_away_constness_r): Adjust pointer-to-member handling.
2310         (casts_away_constness): Liekwise.
2311         (strip_all_pointer_quals): Remove.
2312         * typeck2.c (digest_init): Adjust pointer-to-member handling.
2313         (build_m_component_ref): Likewise.
2315 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
2317         * lex.c (unqualified_fn_lookup_error): Mention that the error
2318         message needs to be kept in synch with the manual.
2320 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2322         PR c++/11614
2323         * decl.c (grokdeclarator): An array member is only a flexible
2324         array member if the field itself is the array.
2326 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2328         PR c++/10793
2329         * decl.c (xref_basetypes): Handle error_mark_node.
2331 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
2333         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
2334         * tree.c (lvalue_p_1): Set it.
2335         * class.c (check_field): Don't allow non-packed non-POD fields to
2336         be packed.
2337         * call.c (reference_binding): Need a temporary for all bitfield
2338         and packed fields.
2339         (convert_like_real): Check it is ok to make a temporary here.
2341 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
2343         * cp-tree.h (hack_identifier): Remove.
2344         * method.c (hack_identifier): Remove.
2345         * semantics.c (finish_id_expression): Expand hack_identifier
2346         here. Simplify.
2348 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2350         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
2351         semantics.c typeck.c: Remove unnecessary casts.
2353 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2355         * cp-tree.h (hack_identifier): Remove.
2356         * method.c (hack_identifier): Remove.
2357         * semantics.c (finish_id_expression): Expand hack_identifier
2358         here. Simplify.
2360 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2362         * cp-tree.h (finish_non_static_data_member): Add object param.
2363         * method.c (hack_identifier): Adjust.
2364         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
2365         again for a FIELD_DECL.
2366         * semantics.c (finish_non_static_data_member): Add object
2367         parameter. Always save the DECL in the COMPONENT_REF.
2368         * call.c (resolve_scoped_fn_name): Adjust.
2370 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
2372         * pt.c (get_bindings): Make definition consistent with
2373         forward declaration.
2375 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2377         PR c++/7809
2378         * friend.c (add_friend): Check access for member functions
2379         and templates.
2381 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2383         PR c++/10668
2384         * typeck.c (build_class_member_access_expr): Improve diagnostic.
2386 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
2388         PR c++/11547
2389         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
2390         macro.
2391         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
2392         * decl.c (duplicate_decls): Merge
2393         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2394         * parser.c (cp_parser_postfix_expression): Adjust call to
2395         cp_parser_initializer_list and
2396         cp_parser_parenthesized_expression_list.
2397         (cp_parser_parenthesized_expression_list): Add non_constant_p.
2398         (cp_parser_new_placement): Adjust call to
2399         cp_parser_parenthesized_expression_list.
2400         (cp_parser_direct_new_declarator): Likewise.
2401         (cp_parser_conditional_expression): Remove.
2402         (cp_parser_constant_expression): Parse an assignment-expression,
2403         not a conditional-expression.
2404         (cp_parser_simple_declaration): Resolve expression/declaration
2405         ambiguity more quickly.
2406         (cp_parser_mem_initializer): Adjust call to
2407         cp_parser_parenthesized_expression_list.
2408         (cp_parser_init_declarator): Keep track of whether or not the
2409         initializer is a constant-expression.
2410         (cp_parser_initializer): Add non_constant_p parameter.
2411         (cp_parser_initializer_clause): Likewise.
2412         (cp_parser_initializer_list): Likewise.
2413         (cp_parser_attribute_list): Adjust call to
2414         cp_parser_parenthesized_expression_list.
2415         (cp_parser_functional_cast): Likewise.
2416         * pt.c (tsubst_decl): Copy
2417         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2418         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
2419         * semantics.c (finish_id_expression): Use
2420         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2422 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
2424         * lang-options.h: Remove.
2426 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
2428         PR c/10962
2429         * class.c (field_decl_cmp): Remove.
2430         (resort_field_decl_cmp): Remove.
2431         (resort_sorted_fields): Remove.
2432         (add_fields_to_vec): Rename to ...
2433         (add_fields_to_record_type): this.
2434         (finish_struct_1): Change to be using
2435         sorted_fields_type's fields.
2436         * cp-tree.h (lang_decl): In lang_decl_u3
2437         change sorted_fields to be a pointer to
2438         sorted_fields_type.
2439         (resort_sorted_fields): Remove prototype.
2440         * search.c (lookup_field_1): Change to be using
2441         sorted_fields_type's fields.
2443 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2445         PR c++/5421
2446         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
2447         is a member of other class.
2448         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
2449         is a specialization of function template.
2451 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2453         PR c++/10903
2454         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
2455         Improve.
2457 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
2459         * cp-tree.def (LOOKUP_EXPR): Remove.
2460         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
2461         (LOOKUP_EXPR_GLOBAL): Remove.
2462         (get_bindings): Remove.
2463         (is_aggr_type_2): Remove.
2464         * call.c (resolved_scoped_fn_name): Remove support for
2465         LOOKUP_EXPR.
2466         * decl.c (grokfndecl): Likewise.
2467         (grokdeclarator): Likewise.
2468         * error.c (dump_decl): Likewise.
2469         (dump_expr): Likewise.
2470         * friend.c (do_friend): Likewise.
2471         * init.c (build_offset_ref): Likewise.
2472         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
2473         LOOKUP_EXPRs
2474         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
2475         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
2476         test.
2477         * pt.c (get_bindings): Give it internal linkage.
2478         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
2479         (lookup_template_function): Likewise.
2480         (for_each_tempalte_parm_r): Likewise.
2481         (tsubst_decl): Likewise.
2482         (tsubst_qualified_id): Handle template template parameters.
2483         (tsubst_copy): Remove support for LOOKUP_EXPR.
2484         (tsubst_copy_and_build): Likewise.
2485         (most_general_template): Likewise.
2486         (value_dependent_expression_p): Likewise.
2487         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
2488         always dependent.
2489         * semantics.c (perform_koenig_lookup): Do not create
2490         IDENTIFIER_NODEs.
2491         (finish_fname): Likewise.
2492         (finish_id_expression): Likewise.
2493         * tree.c (is_aggr_type_2): Remove.
2495 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2497         PR c++/11531
2498         * typeck.c (check_return_expr): Fix thinko in diagnostic.
2500 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2502         PR c++/10108
2503         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
2504         error_mark_node.
2506 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
2508         PR c++/11509
2509         * pt.c (dependent_scope_ref_p): New function.
2510         (value_dependent_expression_p): Use it.
2511         (type_dependent_expression_p): Likewise.
2513         * pt.c (tsubst_friend_function): Use reregister_specialization.
2515         PR c++/7019
2516         * cp-tree.h (lookup_qualified_name): Adjust prototype.
2517         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
2518         call to is_aggr_type.
2519         * parser.c (cp_parser_lookup_name): Adjust call to
2520         lookup_qualified_name.
2521         * pt.c (tsubst_qualified_id): Likewise.
2522         (tsubst_copy_and_build): Likewise.
2523         * semantics.c (finish_qualified_id_expr): Deal with erroneous
2524         expressions.
2526 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2528         PR c++/11510
2529         * call.c (op_error): Properly format  REALPART_EXPR and
2530         IMAGPART_EXPR.
2531         * error.c (dump_expr): Likewise.
2533 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
2535         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
2537 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2539         PR c++/5293
2540         * call.c (initialize_reference): Improve diagnostic.
2542 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2544         PR c++/11154
2545         * pt.c (more_specialized_class): Add full_args parameter.
2546         (most_specialized_class): Adjust calls to more_specialized_class.
2547         * cp-tree.h (more_specialized_class): Adjust declaration.
2549 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
2551         * lex.c (enum tree_node_kind): Delete.
2553 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
2555         PR c++/11503
2556         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
2557         (SET_DECL_SELF_REFERENCE_P): Likewise.
2558         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
2559         * pt.c (tsubst_decl): Copy it.
2560         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
2562         * pt.c (reregister_specialization): Fix thinko in previous change.
2564         * cp-tree.h (cp_id_kind): New type.
2565         (unqualified_name_lookup_error): Change prototype.
2566         (unqualified_fn_lookup_error): New function.
2567         (do_identifier): Remove.
2568         (do_scoped_id): Likewise.
2569         (tsubst_copy_and_build): Change prototype.
2570         (reregister_specialization): New function.
2571         (perform_koenig_lookup): Likewise.
2572         (finish_id_expression): Likewise.
2573         * call.c (build_method_call): Adjust call to
2574         unqualified_name_lookup_error.
2575         * decl.c (duplicate_decls): Use reregister_specialization.
2576         * lex.c (is_global): Remove.
2577         (unqualified_name_lookup_error): Return a value.
2578         (do_identifier): Remove.
2579         (do_scoped_id): Likewise.
2580         (identifier_typedecl_value): Remove.
2581         (unqualified_fn_lookup_error): New function.
2582         * parser.c (cp_parser_id_kind): Remove.
2583         (cp_parser_non_constant_id_expression): Remove.
2584         (cp_parser_primary_expression): Use finish_id_expression.
2585         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
2586         cp_parser_id_kind.
2587         (cp_parser_postfix_expression): Use perform_koenig_lookup.
2588         (cp_parser_template_argument): Use cp_id_kind.
2589         (cp_parser_fold_non_dependent_expr): Adjust call to
2590         tsubst_copy_and_build.
2591         * pt.c (unregister_specialization): Rename to ...
2592         (reregister_specialization): This.
2593         (tsubst_friend_function): Use it.
2594         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
2595         (tsubst_qualified_id): Likewise.
2596         (tsubst_expr): Likewise.
2597         (tsubst_copy_and_build): Add function_p parameter.  Use
2598         finish_id_expression.  Introduce RECUR macro.
2599         (tsubst_non_call_postfix_expression): New function.
2600         (regenerate_decl_from_template): Use reregister_specialization.
2601         * semantics.c (perform_koenig_lookup): New function.
2602         (finish_id_expression): Likewise.
2604 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2606         * pt.c (push_access_scope_real): Remove.
2607         (push_access_scope): Move code from push_access_scope_real.
2608         (pop_access_scope): Don't check for TEMPLATE_DECL.
2609         (instantiate_template): Defer access checking during template
2610         substitution.
2611         (regenerate_decl_from_template): Tidy.
2613 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
2615         PR c++/11437
2616         * operators.def: Add definitions for __imag__, __real__.
2618 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
2620         PR c++/11050
2621         * parser.c (cp_parser_expression_list): Rename to ...
2622         (cp_parser_parenthesized_expression_list): ... here. Add attribute
2623         parameter, parse the surounding parentheses.
2624         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
2625         parameters. Return int.
2626         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
2627         (cp_parser_postfix_expression): Adjust function call parsing.
2628         (cp_parser_new_placement): Adjust.
2629         (cp_parser_new_initializer): Likewise.
2630         (cp_parser_cast_expression): Likewise.
2631         (cp_parser_selection_statement): Likewise.
2632         (cp_parser_mem_initializer): Likewise.
2633         (cp_parser_asm_definition): Likewise.
2634         (cp_parser_init_declarator): Likewise.
2635         (cp_parser_declarator): Make
2636         cdtor_or_conv_p an int ptr.
2637         (cp_parser_direct_declarator): Likewise. Check for a parameter
2638         list on cdtors & conv functions.
2639         (cp_parser_initializer): Adjust.
2640         (cp_parser_member_declaration): Adjust.
2641         (cp_parser_attribute_list): Move code into
2642         cp_parser_parens_expression_list.
2643         (cp_parser_functional_cast): Adjust.
2644         * pt.c (type_dependent_expression_p): Erroneous expressions are
2645         non-dependent.
2647 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
2649         * decl.c (cp_finish_decl): Handle 'used' attribute.
2651         * cp-lang.c (c_reset_state): New dummy routine.
2652         * cp-tree.h (finish_file): Move prototype to c-common.h.
2653         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
2655 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
2657         PR c++/8327
2658         * pt.c (tsubst_qualified_id): Implement suggested resolution for
2659         Core Issue 2.
2660         (type_dependent_expression_p): Likewise.
2662 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
2664         * typeck.c (build_binary_op): Do not warn about signed
2665         vs. unsigned comparisons in the bodies of templates.
2667         PR c++/9411
2668         * parser.c (cp_parser_postfix_expression): Check dependency of
2669         functions.
2671 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2673         PR c++/10032
2674         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
2675         still errors.
2677         PR c++/10527
2678         * error.c (decl_to_string): Do not print default argument
2679         expressions.
2681         * cp-tree.h (break_out_calls): Remove declaration.
2682         * tree.c (break_out_calls): Remove.
2683         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
2685 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
2687         PR c++ 9483
2688         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
2689         * decl2.c (constructor_name_p): Avoid repeated constructor_name
2690         calls.
2691         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
2693 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
2695         * typeck.c (build_x_unary_op): Take note of the fact that
2696         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
2697         trees.
2699         * parser.c (cp_parser_primary_expression): Preserve the form of
2700         qualified expressions in templates, even if they are not
2701         dependent.
2702         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
2703         (tsubst_qualified_id): Likewise.
2704         * search.c (accessible_p): Treat everything in the body of a
2705         template as accessible.
2707 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
2709         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
2710         * cp-tree.h (build_call_from_tree): Remove.
2711         (build_member_call): Likewise.
2712         (dependent_template_arg_p): Remove.
2713         (any_dependent_template_arguments_p): New function.
2714         (dependent_template_id_p): Likewise.
2715         (any_type_dependent_arguments_p): Likewise.
2716         (build_non_dependent_expr): Likewise.
2717         (build_non_dependent_args): Likewise.
2718         (build_x_compound_expr): Adjust prototype.
2719         * call.c (build_new_method_call): Handle non-dependent expressions
2720         correctly.
2721         * decl2.c (grok_array_decl): Likewise.
2722         (build_offset_ref_call_from_tree): Likewise.
2723         (build_call_from_tree): Remove.
2724         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
2725         (dump_expr): Likewise.
2726         * init.c (build_member_call): Remove.
2727         * mangle.c (write_expression): Update handling for template-ids.
2728         * parser.c (cp_parser_primary_expression): Use
2729         any_dependent_template_arguments_p.  Update constant-expression
2730         handling.
2731         (cp_parser_postfix_expression): Use
2732         any_type_dependent_arguments_p.  Simplify call processing.
2733         (cp_parser_unary_expression): Simplify.
2734         (cp_parser_expression): Adjust for changes to
2735         build_x_compound_expr.
2736         (cp_parser_template_argument): Implement standard-conforming
2737         parsing of non-type template arguments.
2738         (cp_parser_direct_declarator): Use
2739         cp_parser_fold_non_dependent_expr.
2740         (cp_parser_fold_non_dependent_expr): New function.
2741         (cp_parser_next_token_ends_template_argument_p): Likewise.
2742         * pt.c (convert_template_argument): Do not call
2743         maybe_fold_nontype_arg.
2744         (tsubst_baselink): Likewise.
2745         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
2746         processing work correctly for non-dependent expressions.  Adjust
2747         handling of COMPOUND_EXPR.  Simplify call processing.
2748         (value_dependent_expression_p): Deal with functional casts and
2749         sizeof/alignof correctly.
2750         (type_dependent_expression_p): Handle overloaded functions.
2751         (any_type_dependent_arguments_p): New function.
2752         (any_dependent_template_arguments_p): Likewise.
2753         (dependent_template_p): Treat SCOPE_REFs as dependent.
2754         (dependent_template_id_p): Simplify.
2755         (build_non_dependent_expr): New function.
2756         (build_non_dependent_args): Likewise.
2757         * semantics.c (finish_stmt_expr): Don't make dependent
2758         statement-expresions have void type.
2759         (finish_call_expr): Handle non-dependent expressions
2760         correctly.
2761         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
2762         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
2763         type size_t, even in templates.
2764         (expr_sizeof): Likewise.
2765         (finish_class_member_access_expr): Handle non-dependent expressions
2766         correctly.
2767         (build_x_indirect_ref): Likewise.
2768         (build_x_binary_op): Likewise.
2769         (build_x_unary_op): Likewise.
2770         (build_x_conditional_expr): Likewise.
2771         (build_x_compound_expr): Likewise.
2772         * typeck2.c (build_x_arrow): Likewise.
2774 2003-07-09  Jan Hubicka  <jh@suse.cz>
2776         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
2777         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
2778         (start_function): Use DECL_ESTIMATED_INSNS.
2779         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
2781         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
2782         unit-at-a-time
2784 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2786         PR c++/11030
2787         * pt.c (instantiate_class_template): Don't call xref_tag to
2788         inject name when the friend class is a specialization.
2790 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
2792         * cp-tree.h (build_scoped_method_call): Remove.
2793         (lookup_qualified_name): Remove parameter.
2794         (tsubst_copy_and_build): Declare.
2795         (finish_qualified_object_call_expr): Remove.
2796         (check_accessibility_of_qualified_id): New function.
2797         (finish_qualified_id_expr): Likewise.
2798         (non_reference): Likewise.
2799         (build_expr_from-tree): Remove.
2800         * call.c (non_reference): Remove.
2801         (build_scoped_method_call): Likewise.
2802         (build_method_call): Use error_operand_p.  Assert that we are not
2803         processing a template.
2804         (standard_conversion): Use non_reference.
2805         * class.c (build_vtbl_entry_ref): Likewise.
2806         (build_vtbl_ref_1): Likewise.
2807         * cvt.c (build_expr_type_conversion): Use non_reference.
2808         * decl.c (lookup_qualified_name): Remove flags parameter.
2809         (grok_op_properties): Use non_reference.
2810         * decl2.c (grok_array_decl): Likewise.
2811         (build_expr_from_tree): Remove.
2812         (build_offset_ref_call_from_tree): Update comment.
2813         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
2814         * except.c (prepare_eh_types): Use non_reference.
2815         (can_convert_eh): Likewise.
2816         * init.c (build_dtor_call): Avoid using build_method_call.
2817         * mangle.c (write_template_param): Remove misleading comment.
2818         * method.c (locate_copy): Use non_reference.
2819         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
2820         (cp_parser_primary_expression): Do not create SCOPE_REFs is
2821         non-dependent contexts.
2822         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
2823         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
2824         build_expr_from_tree.
2825         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
2826         Use check_accessibility_of_qualified_id.
2827         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
2828         build_expr_from_tree.
2829         (tsubst_baselink): New function.
2830         (tsubst_qualified_id): Likewise.
2831         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
2832         (tsubst_expr): Adjust call to lookup_qualified_name.
2833         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
2834         handling of CALL_EXPRs.
2835         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
2836         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
2837         * search.c (check_final_overrider): Likewise.
2838         * semantics.c (check_accessibility_of_qualified_id): New function.
2839         (finish_qualified_object_call_expr): Remove.
2840         * typeck.c (target_type): Use non_reference.
2841         (cxx_sizeof_or_alignof_type): Likewise.
2842         (dubious_conversion_warnings): Likewise.
2843         (convert_for_initialization): Likewise.
2844         (non_reference): New function.
2846 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2848         * decl.c (print_binding_level, print_other_binding_stack,
2849         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
2850         stdio calls.
2851         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
2853 2003-07-07  Andreas Jaeger  <aj@suse.de>
2855         * friend.c: Convert to ISO C90 prototypes.
2857         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
2858         language.
2859         * cfns.h: Regenerate.
2861         * typeck.c: Convert remaining prototypes to ISO C90.
2862         * search.c: Likewise.
2864         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
2865         * semantics.c (expand_or_defer_fn): Likewise
2866         * mangle.c (discriminator_for_string_literal): Likewise.
2867         * g++spec.c (lang_specific_driver): Likewise.
2869         * search.c (lookup_base_r): Remove unused variable.
2871 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
2873         * semantics.c: (genrtl_try_block) Adjust emit_line_note
2874         calls.
2876 2003-07-07  Andreas Jaeger  <aj@suse.de>
2878         * search.c (lookup_base_r): Remove unused variable.
2880 2003-07-06  Michael Chastain  <mec@shout.net>
2882         PR debug/10055
2883         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
2884         assigning to input_filename directly.
2886 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
2888         * call.c: Fix comment formatting.
2889         * class.c: Likewise.
2890         * cp-tree.h: Likewise.
2891         * decl.c: Likewise.
2892         * decl2.c: Likewise.
2893         * error.c: Likewise.
2894         * method.c: Likewise.
2895         * name-lookup.c: Likewise.
2896         * parser.c: Likewise.
2897         * pt.c: Likewise.
2898         * rtti.c: Likewise.
2899         * search.c: Likewise.
2900         * typeck.c: Likewise.
2902 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
2904         PR c++/11345
2905         * search.c (lookup_base_r): Remove is_non_public and
2906         within_current_scope parameters.  Remove other dead code.
2907         (lookup_base): Adjust call to lookup_base_r.
2908         (adjust_result_of_qualified_name_lookup): Improve comment.
2909         * semantics.c (finish_call_expr): Use maybe_dummy_object.
2911 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
2913         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
2914         LANG_HOOKS_MISSING_ARGUMENT): Override.
2916 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
2918         PR c++/11431
2919         * typeck.c (build_static_cast): Check for reference conversions
2920         earlier.
2922 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
2924         * cp-tree.h (perform_integral_promotions): Declare.
2925         * call.c (build_addr_func): Use decay_conversion.
2926         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
2927         (convert_for_arg_passing): Use perform_integral_promotions.
2928         * cvt.c (build_expr_type_conversion): Use decay_conversion.
2929         (type_promotes_to): Do not return a cv-qualified type.
2930         * decl.c (grok_reference_init): Fix formatting.
2931         (get_atexit_node): Use decay_conversion.
2932         (build_enumerator): Use perform_integral_promotions.
2933         * init.c (build_vec_init): Use decay_conversion.
2934         * semantics.c (finish_expr_stmt): Likewise.
2935         (finish_switch_cond): Use perform_integral_promotions.
2936         * typeck.c (default_conversion): Likewise.
2937         (perform_integral_promotions): New function.
2938         (build_indirect_ref): Use decay_conversion.
2939         (build_array_ref): Use perform_integral_promotions.
2940         (convert_arguments): Use decay_conversion.
2941         (build_unary_op): Use perform_integral_promotions.
2942         (build_c_cast): Use decay_conversion.
2943         (build_modify_expr): Likewise.
2944         (convert_for_initialization): Likewise.
2945         * typeck2.c (build_x_arrow): Likewise.
2947 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
2949         * call.c: Fix comment typos.
2950         * class.c: Likewise.
2951         * cp-tree.h: Likewise.
2952         * cvt.c: Likewise.
2953         * decl2.c: Likewise.
2954         * decl.c: Likewise.
2955         * init.c: Likewise.
2956         * mangle.c: Likewise.
2957         * parser.c: Likewise.
2958         * pt.c: Likewise.
2959         * search.c: Likewise.
2960         * semantics.c: Likewise.
2961         * tree.c: Likewise.
2962         * typeck.c: Likewise.
2964 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
2966         * parser.c (cp_lexer_read_token): No need to handle string
2967         constant concatenation.
2969 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2971         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
2972         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
2973         ATTRIBUTE_GCC_CXXDIAG.
2975 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
2977         * call.c (build_addr_func): Handle bound pointers-to-members.
2978         (build_method_call): Do not call resolve_offset_ref.
2979         (implicit_conversion): Likewise.
2980         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
2981         resolve_offset_ref.
2982         (resolve_args): Do not call resolve_offset_ref.
2983         (build_conditional_expr): Likewise.
2984         (build_new_method_call): Likewise.
2985         * cp-tree.def (OFFSET_REF): Update documentation.
2986         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
2987         pointers to members to pointers.
2988         (ocp_convert): Do not call resolve_offset_ref.
2989         (convert_to_void): Likewise.
2990         (build_expr_type_conversion): Likewise.
2991         * decl2.c (delete_sanity): Likewise.
2992         * init.c (resolve_offset_ref): Simplify greatly.
2993         (build_vec_delete): Do not call resolve_offset_ref.
2994         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
2995         if appropriate.
2996         (cp_parser_unary_expression): Use
2997         cp_parser_simple_cast_expression.
2998         (cp_parser_delete_expression): Likewise.
2999         (cp_parser_cast_expression): Likewise.
3000         (cp_parser_pm_expression): Use cp_parser_binary_op.
3001         (cp_parser_simple_cast_expression): New function.
3002         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
3003         * semantics.c (finish_increment_expr): Likewise.
3004         (finish_typeof): Likewise.
3005         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
3006         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
3007         (decay_conversion): Do not call resolve_offset_ref.
3008         (finish_class_member_access_expr): Likewise.
3009         (convert_arguments): Likewise.
3010         (build_x_binary_op): Handle DOTSTAR_EXPR.
3011         (condition_conversion): Do not call resolve_offset_ref.
3012         (unary_complex_lvalue): Likewise.
3013         (build_static_cast): Likewise.
3014         (build_reinterpret_cast): Likewise.
3015         (build_const_cast): Likewise.
3016         (build_c_cast): Likewise.
3017         (build_modify_expr): Likewise.
3018         (convert_for_assignment): Likewise.
3019         (convert_for_initialization): Likewise.
3020         * typeck2.c (build_x_arrow): Likewise.
3021         (build_m_component_ref): Simplify.
3023         * call.c (build_scoped_method_call): Use convert_to_void.
3024         (build_method_call): Likewise.
3025         * class.c (check_field_decls): Remove dead code.
3026         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
3027         * decl2.c (grok_array_decl): Remove dead code.
3028         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3029         as pointer-to-member representation.
3030         * init.c (build_offset_ref): Tidy.
3031         (build_vec_delete_1): Use convert_to_void.
3032         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
3033         as pointer-to-member representation.
3035 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
3037         PR c++/9162
3038         * decl.c (grokdeclarator): Return friend decls, not
3039         void_type_node.
3040         * decl2.c (grokfield): Alter friend decl check.
3041         * parser.c (struct cp_parser): Document default_arg chain on
3042         unparsed_functions_queue.
3043         (cp_parser_save_default_args): New.
3044         (cp_parser_init_declarator, cp_parser_function_definition,
3045         cp_parser_member_declaration): Call it.
3046         (cp_parser_class_specifier): Remove unused variable. Alter
3047         processing of unparsed_functions_queue.
3049 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3051         * class.c (add_method, check_field_decl): Fix format specifier.
3052         * decl.c (duplicate_decls, pushdecl, check_goto,
3053         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
3054         start_enum): Likewise.
3055         * decl2.c (ambiguous_decl): Likewise.
3056         * pt.c (redeclare_class_template): Likewise.
3058 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
3060         PR c++/10219
3061         * pt.c (type_unification_real): Don't unify exprs of error type.
3062         * tree.c (error_type): Don't die on error_type.
3064         PR c++/9779
3065         * decl2.c (arg_assoc_class): Don't die on NULL type.
3066         * typeck.c (type_unknown_p): Don't die on untyped expressions.
3068 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3070         PR c++/6949
3071         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
3072         classes.
3074 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3076         * error.c (locate_error): %P takes an `int', not a `tree'.
3078 2003-07-02  Jan Hubicka  <jh@suse.cz>
3080         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
3081         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
3082         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
3083         massaging.
3085         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
3086         (expand_or_defer_fn): Declare.
3087         (lower_function): Declare.
3088         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
3089         * decl2.c: Include cgraph.h and varpool.h
3090         (maybe_emit_vtables):  Make explicit instantations as needed.
3091         (mark_member_pointers, lower_function): New functions.
3092         (finish_file): Do unit-at-a-time.
3093         * method.c (synthesize_method): Use expand_or_defer_fn.
3094         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
3095         * parser.c (cp_parser_function_definition_after_decl): Use
3096         expand_or_defer_fn.
3097         * pt.c (instantiate_decl): Likewise.
3098         * semantics.c: Include cgraph.h
3099         (expand_or_defer_fn): Break out from ...
3100         (expand_body): ... here; deal with unit-at-a-time.
3101         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
3102         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
3104 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3106         * call.c (resolve_scoped_fn_name): Return error_mark_node for
3107         erroneous cases.
3109 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3111         PR c++/11149
3112         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
3113         is a class type.
3115 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
3117         PR c++/8046
3118         * error.c (dump_decl): Handle BIT_NOT_EXPR as
3119         pseudo destructor calls.
3121 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
3123         * cp-tree.h (define_label): Replace filename and lineno
3124         arguments with a location_t.
3125         * decl.c (pop_label): Adjust define_label call.
3126         (define_label): Replace filename and lineno arguments with a
3127         location_t.
3128         * semantics.c (finish_label): Adjust define_label call.
3130 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
3132         PR c++/9559
3133         * decl2.c (grokfield): Do not build NOP_EXPRs around the
3134         error_mark_node.
3136 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
3138         * Make-lang.in: Update.
3139         * cp-lang.c (c_language): Define.
3140         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
3141         * cp-tree.h (cxx_init_options): Remove.
3142         * lex.c: Don't include diagnostic.h.
3143         (cxx_init_options): Remove.
3145 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3147         PR c++/4933
3148         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
3149         tree generated within a template. Use dump_expr to dump an
3150         expression sizeof.
3152 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3154         * mangle.c (write_expression): Exit gracefully when trying to
3155         mangle a CALL_EXPR.
3157 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
3159         PR c++/10750
3160         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
3161         (value- or type-) dependent expression as DECL_INITIAL is a
3162         valid constant-expression (at parser time).
3164 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
3166         PR c++/11106
3167         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
3168         USING_DECL, instead of print_tree_identifier.
3170 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3172         * cp-tree.h (language_to_string): Adjust declaration.
3173         * dump.c (cp_dump_tree): Adjust usage.
3174         * error.c (dump_char): Use output_formatted_scalar. Tidy.
3175         (parm_to_string): Lose unused parameter.  Tidy.
3176         (expr_to_string): Likewise.
3177         (code_to_string): Likewise.
3178         (language_to_string): Likewise.
3179         (op_to_string): Likewise.
3180         (assop_to_string): Likewise.
3181         (digit_buffer): Remove.
3182         (dump_type): Format builtin vector type as __vector__.
3184 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3186         * error.c (print_integer): Remove.
3187         (dump_type_suffix): Adjust.
3188         (dump_expr): Likewise.
3190 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3192         * error.c (print_instantiation_partial_context): Take a
3193         location_t.
3194         (print_instantiation_full_context): Adjust.
3195         (print_instantiation_context): Adjust.
3197         * cp-tree.h (cp_line_of, cp_file_of): Remove.
3198         * error.c (cp_line_of, cp_file_of): Merge into ...
3199         (location_of): ... here. Make static, return a location_t.
3200         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
3202 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
3204         PR c++/10784
3205         * call.c (joust): Move warn_conversion check outwards.
3207 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
3209         * decl.c (build_typename_type)
3210         * mangle.c (write_template_template_arg)
3211         * parser.c (cp_parser_scope_through_which_access_occurs)
3212         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
3213         * repo.c (get_base_filename)
3214         * semantics.c (maybe_convert_cond):
3215         Mark the definition static, matching the forward declaration.
3217 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
3219         PR c++/10468
3220         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
3222 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
3224         PR c++/10796
3225         * decl.c (finish_enum): Implement DR377.
3227         * decl.c (cp_finish_decl): Don't make variables with reference
3228         type readonly while they are being initialized.
3230 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
3232         PR c++/11332
3233         * typeck.c (build_static_cast): Avoid returning expressions with
3234         reference type.
3236 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
3238         * call.c (build_op_delete_call): Use strip_array_call. Correct
3239         error message to say 'delete' or 'delete[]'.
3241 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
3243         PR c++/8266
3244         * pt.c (check_explicit_specialization): When looking up a
3245         template function from an identifier outside class-scope, bind
3246         it to CP_DECL_CONTEXT.
3248 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
3250         PR c++/10990
3251         * search.c (lookup_base_r): Rely on accessible_p, rather than
3252         trying to emulate that logic here.
3254         PR c++/10931
3255         * call.c (convert_like): Pass issue_conversion_warnings.
3256         (convert_like_with_context): Likewise.
3257         (convert_like_real): Add issue_conversion_warnings parameter.
3258         (perform_direct_initialization_if_possible): New function.
3259         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
3260         * typeck.c (check_for_casting_away_constness): New function.
3261         (build_static_cast): Rewrite.
3263 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
3265         * call.c (enforce_access): Assert we get a binfo.
3266         (build_op_delete_call): Pass a binfo to
3267         perform_or_defer_access_check.
3268         * class.c (alter_access): Likewise.
3269         * decl.c (make_typename_type): Likewise.
3270         (make_unbound_class_template): Likewise.
3271         * lex.c (do_identifier): Likewise.
3272         * method.c (hack_identifier): Likewise.
3273         * parser.c (cp_parser_lookup_name): Likewise.
3274         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
3275         test.
3276         * semantics.c (finish_non_static_data_member): Likewise.
3277         (perform_or_defer_access_check): Expect a binfo.
3278         * typeck.c (comptypes): Expect types.
3280         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
3281         * friend.c (make_friend_class): Likewise.
3282         * pt.c (check_default_tmpl_args): Likewise.
3283         (lookup_template_class): Likewise.
3285 2003-06-24  Jan Hubicka  <jh@suse.cz>
3287         * method.c (thunk_labelno): Move outside ifdef block to make garbage
3288         collector happy.
3290 2003-06-24  Jan Hubicka  <jh@suse.cz>
3292         * class.c (build_vtable): Make vtables.
3293         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
3294         * decl2.c (output_vtable_inherit): Rename to ...
3295         (prepare_assemble_variable): ... this one; change interface.
3296         (maybe_emit_vtables): Do not call output_vtable_inherit.
3297         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
3298         * cp-tree.h (prepare_assemble_variable): New.
3300 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
3302         * method.c: add prototype for make_alias_for_thunk.
3303         (thunk_labelno, make_alias_for_thunk): only define
3304         if ASM_OUTPUT_DEF is defined.
3306 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
3308         * method.c (thunk_labelno): New variable.
3309         (make_alias_for_thunk): New function.
3310         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
3311         into the same section as the function it is calling.
3312         Include gt-cp-method.h.
3313         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
3314         (cp/method.o): Depend on gt-cp-method.h.
3315         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
3317 2003-06-23  Jan Hubicka  <jh@suse.cz>
3319         * decl.c (register_dtor_fn): Mark cleanup as used.
3320         * decl2.c (mark_vtable_entries): Skip nops.
3321         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
3322         (build_dynamic_cast_1): Likewise.
3323         (tinfo_base_init): Likewise.
3324         (emit_tinfo_decl): Likewise.
3326 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
3328         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
3329         to it.
3331 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
3333         PR c++/10784
3334         * call.c (joust): Warn about choosing conversion sequence only if
3335         -Wconversion.
3337 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3339         PR c++/10864
3340         * call.c (op_error): Tidy.
3341         * error.c (dump_expr): Properly format 'T()' when T is an
3342         aggregate type.
3344 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
3346         PR c++/10915
3347         * decl.c (grok_op_properties): Warn possible confusing conversion
3348         only if -Wconversion.
3350 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
3352         PR c++/10749
3353         * parser.c (cp_parser_class_head): See through dependent names
3354         when parsing a class-head.
3356         PR c++/10845
3357         * pt.c (try_class_unification): Correct handling of member class
3358         templates.
3360 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3362         * semantics.c (genrtl_finish_function): Adjust
3363         expand_function_end call.
3365 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
3367         PR c++/10939
3368         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
3369         functions.
3370         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
3372         PR c++/9649
3373         * cp-tree.h (pushdecl_class_level): Change prototype.
3374         (push_class_level_binding): Likewise.
3375         * decl.c (add_binding): Reject duplicate static data members.
3376         (pushdecl_class_level): Return a value indicating whether or not
3377         the binding was valid.
3378         (push_class_level_binding): Likewise.
3379         * semantics.c (finish_member_declaration): Don't keep invalid
3380         declarations.
3382         PR c++/11041
3383         * call.c (initialize_reference): Do not use cp_finish_decl to emit
3384         temporary variables.
3385         * cp-tree.h (static_aggregates): Declare.
3386         (pushdecl_top_level_and_finish): Likewise.
3387         * decl.c (pushdecl_top_level_1): New function.
3388         (pushdecl_top_level): Use it.
3389         (pushdecl_top_level_and_finish): New function.
3390         (initialize_local_var): Remove redundant code.
3391         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
3392         building_stmt_tree.
3393         * decl.h (static_aggregates): Remove.
3394         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
3395         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
3396         (tinfo_base_init): Likewise.
3398 2003-06-19  Matt Austern  <austern@apple.com>
3400         PR c++/11228
3401         * init.c (build_zero_init): Assert that number of array elements
3402         is an integer constant.
3403         (build_default_init) Don't use build_zero_init for arrays with
3404         variable number of elements.
3406 2003-06-19  Andreas Jaeger  <aj@suse.de>
3408         * cp-tree.h: Remove duplicated declarations.
3410 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
3412         * pt.c: Convert to ISO C.
3413         * semantics.c: Convert to ISO C.
3415 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3417         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
3418         at_least_as_qualified_p, more_qualified_p): Return bool.
3419         * typeck.c: ANSIFY function definitions.
3420         (comp_array_types): Take redeclaration bool parameter.
3421         (comptypes): Rearrange STRICT handling.
3422         (at_least_as_qualified_p, more_qualified_p,
3423         comp_cv_qualification): Cache cv quals.
3424         (compparms): Rearrange loop.
3426 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
3428         * cp-tree.h (COMPARE_RELAXED): Rename to ...
3429         (COMPARE_DERIVED): ... here. Adjust comment.
3430         (resolve_typename_type_in_current_instantiation): Remove.
3431         (cp_tree_equal, comptypes): Return a bool.
3432         * cvt.c (convert_to_reference): Adjust comptypes call.
3433         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
3434         (resolve_typename_type_in_current_instantiation): Remove.
3435         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
3436         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
3437         calls. Refactor code.
3438         * typeck.c (comp_array_types): Return bool. Lose callback.
3439         parameter. Adjust cp_tree_equal calls.
3440         (comptypes): Return bool. Adjust strict handling. Remove relaxed
3441         enumeration and java type handling. Deal with typename types here.
3442         Adjust recursive and cp_tree_equals calls. Adjust base and derived
3443         checking.
3444         (comp_target_types): Remove unreachable code. Adjust
3445         same_or_base_type_p calls.
3446         (ptr_reasonably_similar): Adjust base and derived check.
3448         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
3449         unused calculation.
3450         (check_return_expr): Adjust error messages.
3451         * cp-tree.def (SCOPE_REF): Correct comment.
3453 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3455         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3456         string again.
3458 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
3460         * optimize.c (dump_function): Form complete flag name by
3461         prefixing 'fdump-' to string returned by dump_flag_name().
3463 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3465         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
3466         string.
3468 2003-06-17  Jason Merrill  <jason@redhat.com>
3470         PR c++/10929
3471         * decl.c (grokfndecl): Don't mark a function inline for
3472         -finline-functions if it isn't defined.
3474 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
3476         PR c++/10712
3477         * class.c (handle_using_decl): Robustify.
3479         PR c++/11105
3480         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
3481         * mangle.c (struct globals): Remove internal_mangling_p.
3482         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
3483         (write_template_parm): Don't write out the level number.
3484         (conv_type_names): New variable.
3485         (hash_type): New function.
3486         (compare_type): Likewise.
3487         (mangle_conv_op_name_for_type): Don't try to mangle conversion
3488         operator names.
3489         * search.c (lookup_conversion_operator): New function.
3490         (lookup_fnfields_1): Use it.
3492 2003-06-17  Andreas Jaeger  <aj@suse.de>
3494         * except.c: Remove duplicate declaration of push_eh_cleanup.
3496         * call.c: Remove extra declaration of inhibit_warnings.
3498 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3500         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
3501         * mangle.c: Convert to ISO C.
3503 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3505         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
3506         macro.
3508 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
3510         * tree.c: Convert to ISO C.
3512 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
3514         * cp-tree.h: Follow spelling conventions.
3515         * mangle.c: Likewise.
3516         * method.c: Likewise.
3517         * parser.c: Likewise.
3519 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3521         * decl.c (start_function): Adjust init_function_start call.
3522         * method.c (use_thunk): Likewise.
3523         * semantics.c (genrtl_start_function): Likewise.
3525 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
3527         * Make-lang.in: Remove c-options.o.
3529 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
3531         * lex.c: Convert to ISO C.
3533         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
3534         * init.c: removes use of PARAMS macro.  Use ISO style function
3535         declarations.  (Not copyright-significant change.)
3537         * rtti.c: Remove PARAMS.
3539         * typeck2.c: Convert to ISO C.
3541 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
3543         PR c++/10635
3544         * typeck.c (build_c_cast): Check that the destination type is
3545         complete.
3547 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3549         PR c++/10432
3550         * cp-tree.h (finish_declarator): Remove.
3551         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
3552         erroneous declarations.
3553         * semantics.c (finish_declarator): Remove.
3555 2003-06-11  Roger Sayle  <roger@eyesopen.com>
3557         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
3558         global static constructor/destructor if it will be empty, i.e.
3559         either doesn't call any ctors/dtors or only calls pure or const
3560         ctors/dtors.
3562 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
3564         * mangle.c (tm_p.h): Include it.
3565         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
3567         PR c++/11131
3568         * tree.c (cp_cannot_inline_fn): Check for "inline" before
3569         instantiation.
3571 2003-06-10  Jason Merrill  <jason@redhat.com>
3573         PR c++/10968
3574         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
3576 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
3578         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
3579         (start_cleanup_cnt): New.
3581 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
3583         PR c++/11131
3584         * cp-tree.h (template_for_substitution): Declare.
3585         * decl2.c (mark_used): Use it when figuring out whether or not a
3586         function is inline.
3587         * pt.c (template_for_substitution): Give it external linkage.
3588         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
3589         possible.
3591 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
3593         PR 8861
3594         * mangle.c (write_real_cst): New function.  Implement
3595         ABI-compliant mangling of floating-point literals when
3596         -fabi-version>=2; provide backward compatibility with 3.3 when
3597         -fabi-version=1 (with warning).  Clarify commentary.
3598         (write_template_arg_literal): Use write_real_cst.
3600 2003-06-07  Andreas Jaeger  <aj@suse.de>
3602         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
3604 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
3606         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
3607         (LANG_HOOKS_HANDLE_OPTION): Override.
3608         * cp-tree.h (cxx_init_options): Update.
3609         * lex.c (cxx_init_options): Update.
3611 2003-06-05  Jan Hubicka  <jh@suse.cz>
3613         * Make-lang.in:  Add support for stageprofile and stagefeedback
3615 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
3617         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
3619 2003-06-04  Andreas Jaeger  <aj@suse.de>
3621         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
3623 2003-06-03  Jason Merrill  <jason@redhat.com>
3625         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
3627         * cp/decl.c (reshape_init): Handle vectors.
3629         * testsuite/g++.dg/init/array10.C: New.
3631 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3633         PR c++/10940
3634         * pt.c (check_explicit_specialization): Check for 'static'
3635         earlier.
3637 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
3639         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
3640         the operand of a CONSTRUCTOR node.
3642 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
3644         * decl.c (cp_binding_level::this_entity): Rename from this_class.
3645         (cxx_scope_descriptor): New function.
3646         (cxx_scope_debug): Likewise.
3647         (push_binding_level): Use it.
3648         (pop_binding_level): Likewise.
3649         (suspend_binding_level): Likewise.
3650         (resume_binding_level): Likewise.
3651         (pushlevel_class): Adjust use of this_class.
3652         (pushtag): Likewise.
3653         (lookup_name_real): Likewise.
3654         (global_scope_name): New variable.
3655         (initialize_predefined_identifiers): Initialize it.
3656         (push_namespace): Use it.
3657         (make_cxx_scope): New function.
3658         (pushlevel): Use it.
3659         (pushlevel_class): Likewise.
3660         (push_binding_level): Simplify.  Loose the last two arguments.
3661         (make_binding_level): Remove.
3662         (initial_push__namespace_scope): New function.
3663         (push_namespace): Use it.  Simplify.
3664         (cxx_init_decl_processing): Likewise.
3665         (declare_namespace_level): Remove.
3667 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3669         PR c++/10956
3670         * pt.c (instantiate_decl): Don't use full template arguments if
3671         we are dealing with specializations.
3673 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3675         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
3676         (binding_depth): Unconditionally define.
3677         (is_class_level): Likewise.
3678         (indent): Likewise.  Take an indenting parameter.
3679         (push_binding_level): Remove conditional definittion.
3680         (pop_binding_level): Likewise.
3681         (suspend_binding_level): Likewise.
3682         (resume_binding_level): Likewise.
3683         (pushlevel): Likewise.
3684         (pushlevel_class): Likewise.
3685         (poplevel_class): Likewise.
3686         (pop_everything): Likewise.
3688 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
3690         * name-lookup.h (global_scope_p): New macro.
3691         * decl.c (pop_binding_level): Use it.  Don't refer directly to
3692         global_binding_level.
3693         (suspend_binding_level): Likewise.
3694         (global_bindings_p): Likewise.
3695         (print_other_binding_stack): Likewise.
3696         (print_binding_stack): Likewise.
3697         (maybe_push_to_top_level): Likewise.
3698         (pushdecl_namespace_level): Likewise.
3699         (cxx_init_decl_processing): Likewise.
3700         (start_decl): Likewise.
3701         (cp_finish_decl): Likewise.
3702         (start_function): Likewise.
3703         (global_binding_level): Remove.
3705 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3707         * parser.c (cp_parser_explicit_instantiation): Restore old
3708         access before template instantiation.
3710 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
3712         * lang-specs.h: Use -o to specify preprocessor's output file.
3713         Make -no-integrated-cpp work when building PCH files.
3715 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3717         PR c++/10682
3718         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
3719         check for implicitly created typedef to an enum.
3721 2003-05-21  Jason Merrill  <jason@redhat.com>
3723         * init.c (build_vec_delete): Copy the address into a temporary
3724         variable before calling build_vec_delete_1.
3725         * decl2.c (delete_sanity): Don't call stabilize_reference.
3727 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
3729         * pt.c (register_specialization): Update the decl's location,
3730         if necessary.
3731         (check_explicit_specialization): Likewise.
3733 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3735         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
3737 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
3739         PR c++/9738
3740         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
3741         if the old decl had instantiated DECL_RTL.
3742         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
3744 2003-05-19  Matt Austern  <austern@apple.com>
3746         * lang-options.h: Document -Wno-invalid-offsetof
3747         * typeck.c (build_class_member_access_expr): Don't complain about
3748         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
3750 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
3752         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
3753         (binding_entry_make): Make entry->chain NULL after getting an entry.
3754         fix the spelling of chain in a comment.
3755         (binding_table_free): speed up by having temporary variable.
3756         (binding_table_new): set table->chain to be NULL after allocating
3757         a table.
3758         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
3759         binding->previous to NULL after getting an binding for speed.
3761 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3763         * cp-tree.h (struct lang_type_class): Replace data member tags
3764         with hash-table nested_udts.
3765         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
3766         * class.c (unreverse_member_declarations): Don't touch
3767         CLASSTYPE_TAGS.
3768         (pushclass): Use cxx_remember_type_decls.
3769         * decl.c (struct cp_binding_level): Replace data member tags with
3770         hash-table type_decls.
3771         (pop_binding_level): Handle level->type_decls.
3772         (kept_level_p): Adjust.
3773         (poplevel): Remove unused local variable.
3774         (bt_print_entry): New function.
3775         (print_binding_level): Use it.
3776         (push_namespace): Build current_binding_level->type_decls.
3777         (maybe_process_template_type_declaration): Adjust.
3778         (pushtag): Likewise.
3779         (clear_anon_tags): Use binding_table_remove_anonymous_types.
3780         (gettags): Remove.
3781         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
3782         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
3783         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
3784         (cxx_init_decl_processing): Build global_binding_level->type_decls.
3785         (store_parm_decls): Remove pointless code.
3786         * name-lookup.c (free_binding_entry): New variable.
3787         (ENTRY_INDEX): New macro.
3788         (struct binding_table_s): New datatype.
3789         (binding_entry_make): New function.
3790         (binding_entry_free): Likewise.
3791         (binding_table_construct): Likewise.
3792         (binding_table_free): Likewise.
3793         (binding_table_new): Likewise.
3794         (binding_table_expand): Likewise.
3795         (binding_table_insert): Likewise.
3796         (binding_table_find): Likewise.
3797         (binding_table_find_anon_type): Likewise.
3798         (binding_table_reverse_maybe_remap): Likewise.
3799         (binding_table_remove_anonymous_types): Likewise.
3800         (binding_table_foreach): Likewise.
3801         * name-lookup.h (binding_table): New type.
3802         (binding_entry): Likewise.
3803         (bt_foreach_proc): Likewise.
3804         (struct binding_entry_s): New datatype.
3805         (SCOPE_DEFAULT_HT_SIZE): New macro.
3806         (CLASS_SCOPE_HT_SIZE): Likewise.
3807         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
3808         (NAMESPACE_STD_HT_SIZE): Likewise.
3809         (GLOBAL_SCOPE_HT_SIZE): Likewise.
3810         (binding_table_new): Declare.
3811         (binding_table_free): Likewise.
3812         (binding_table_insert): Likewise.
3813         (binding_table_find_anon_type): Likewise.
3814         (binding_table_reverse_maybe_remap): Likewise.
3815         (binding_table_remove_anonymous_types): Likewise.
3816         (binding_table_foreach): Likewise.
3817         (binding_table_find): Likewise.
3818         (cxx_remember_type_decls): Likewise.
3819         * pt.c (bt_instantiate_type_proc): New function.
3820         (do_type_instantiation): Use it.
3821         * search.c (lookup_field_r): Use binding_table_find.
3823 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3825         * semantics.c (perform_deferred_access_checks): Don't discard
3826         checked access.
3828 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3830         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
3831         libiberty VA_ macros, always use stdarg.
3832         * rtti.c (create_pseudo_type_info): Likewise.
3833         * tree.c (build_min_nt, build_min): Likewise.
3835 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3837         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
3838         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
3839         collapse multiple function calls into one.
3840         * tree.c (debug_binfo): Likewise.
3842 2003-05-15  Jason Merrill  <jason@redhat.com>
3844         PR c++/5388
3845         * call.c (conditional_conversion): Don't consider implicit
3846         conversions if T2 is a base of T1.
3847         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
3848         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
3850         * parser.c (cp_parser_primary_expression): Convert a static data
3851         member from reference.
3853 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
3855         * call.c (build_op_delete_call): Avoid creating unnecessary types.
3856         * class.c (instantiate_type): Remove tests for tf_no_attributes.
3857         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
3858         (COMPARE_NO_ATTRIBUTES): Remove.
3859         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
3861         PR c++/8385
3862         * semantics.c (finish_typeof): Refine type-dependency check.
3864 2003-05-13  Jason Merrill  <jason@redhat.com>
3866         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
3867         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
3869 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3871         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
3873 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3875         PR c++/10230, c++/10481
3876         * semantics.c (finish_non_static_data_member): Handle when the
3877         non-static member is not from a base of the current class type.
3879 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3881         PR c++/10552
3882         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
3883         template and has dependent context.
3885 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3887         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
3889 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3891         PR c++/9252
3892         * cp-tree.h (saved_scope): Remove check_access field.
3893         (tsubst_flags_t): Remove tf_parsing.
3894         * decl.c (maybe_push_to_top_level): Don't initialize
3895         scope_chain->check_access.
3896         (make_typename_type, make_unbound_class_template): Don't use
3897         tf_parsing.
3898         (register_dtor_fn): Use push/pop_deferring_access_checks
3899         instead of scope_chain->check_access.
3900         * method.c (use_thunk): Likewise.
3901         * parser.c (cp_parser_explicit_instantiation
3902         (cp_parser_constructor_declarator_p): Don't call
3903         push/pop_deferring_access_checks here.
3904         (cp_parser_template_argument, cp_parser_class_name): Don't use
3905         tf_parsing.
3906         (yyparse): Check flag_access_control.
3907         * pt.c (instantiate_class_template): Call
3908         push/pop_deferring_access_checks.
3909         * semantics.c (push_deferring_access_checks): Propagate
3910         dk_no_check.
3911         (perform_or_defer_access_check): Make sure basetype_path is
3912         a type before comparison.
3913         * call.c (build_op_delete_call, build_over_call): Use
3914         perform_or_defer_access_check.
3915         * class.c (alter_access): Likewise.
3916         * init.c (build_offset_ref): Likewise.
3917         * lex.c (do_identifier): Likewise.
3918         * method.c (hack_identifier): Likewise.
3919         * search.c (lookup_member): Likewise.
3920         * semantics.c (finish_non_static_data_member): Likewise.
3921         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
3922         instead of flag_access_control.
3924 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3926         PR c++/9554
3927         * parser.c (cp_parser_class_name): Remove check_access parameter.
3928         All caller adjusted.  Update declaration.
3929         (cp_parser_lookup_name): Likewise.
3930         * semantics.c (push_deferring_access_checks): Change parameter type
3931         to enum deferring_kind.  All caller adjusted.
3932         (resume_deferring_access_checks): Adjust to use new enum.
3933         (stop_deferring_access_checks): Likewise.
3934         (perform_or_defer_access_check): Likewise.
3935         * cp-tree.h (deferring_kind): New enum.
3936         (deferred_access): Adjust field type.
3937         (push_deferring_access_checks): Update declaration.
3939 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3941         PR c++/10555, c++/10576
3942         * pt.c (lookup_template_class): Handle class template with
3943         multiple levels of parameters when one of the levels contain
3944         errors.
3946 2003-05-08  Jason Merrill  <jason@redhat.com>
3948         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
3949         expression.  Undo some of the recent reorg.
3951 2003-05-07  Richard Henderson  <rth@redhat.com>
3953         PR c++/10570
3954         * cfns.gperf: Comment out POSIX thread cancellation points,
3955         plus abort and raise.
3956         * cfns.h: Regenerate.
3958 2003-05-07  Jason Merrill  <jason@redhat.com>
3960         * call.c (build_conditional_expr): Don't assume that the folded
3961         expression has result_type.
3963 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3965         * typeck.c (build_unary_op): Deal with const qualifier in
3966         invalid pointer-to-member earlier.
3968 2003-05-05  Jason Merrill  <jason@redhat.com>
3970         PR c++/9537
3971         * call.c (conditional_conversion): Build an RVALUE_CONV if
3972         we're just changing the cv-quals.
3973         (build_conditional_expr): Don't call convert to change
3974         cv-quals.
3976 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3978         PR c++/10496
3979         * typeck.c (build_unary_op): Don't output const qualifier when
3980         output invalid pointer-to-member diagnostics.
3982 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3984         * decl.c: Fix typos.
3986 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3988         PR c++/4494
3989         * decl.c (start_function): Use same_type_p to check return type
3990         of main.
3992 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
3994         PR c/10604
3995         * cp/typeck.c (build_x_compound_expr): No need to check
3996         extra_warnings as well as warn_unused_value.
3998 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4000         PR c++/9364, c++/10553, c++/10586
4001         * decl.c (make_typename_type): Don't crash on illegal code.
4003 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
4005         * class.c (finish_struct): Use location_t and input_location
4006         directly.
4007         * decl.c (make_label_decl): Likewise.
4008         (use_label): Likewise.
4009         * decl2.c (warn_if_unknown_interface): Likewise.
4010         (start_static_initialization_or_destruction): Likewise.
4011         (generate_ctor_or_dtor_function): Likewise.
4012         (finish_file): Likewise.
4013         * error.c (print_instantiation_full_context): Likewise.
4014         * init.c (create_temporary_var): Likewise.
4015         * method.c (synthesize_method): Likewise.
4016         * parser.c (cp_token): Likewise.
4017         (cp_lexer_set_source_position_from_token): Likewise.
4018         (cp_lexer_get_preprocessor_token): Likewise.
4019         (cp_parser_statement): Likewise.
4020         * pt.c (tsubst_friend_function): Likewise.
4021         (instantiate_class_template): Likewise.
4022         (tsubst_decl): Likewise.
4023         (tsubst): Likewise.
4024         (instantiate_decl): Likewise.
4025         * semantics.c (begin_class_definition): Likewise.
4026         (expand_body): Likewise.
4028 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4030         * class.c (finish_struct): Rename lineno to input_line.
4031         * decl.c (push_binding_level, pop_binding_level,
4032         suspend_binding_level, resume_binding_level, make_label_decl,
4033         use_label, start_function): Likewise.
4034         * decl2.c (warn_if_unknown_interface,
4035         start_static_initialization_or_destruction,
4036         generate_ctor_or_dtor_function, finish_file): Likewise.
4037         * error.c (cp_line_of, print_instantiation_full_context,
4038         print_instantiation_context): Likewise.
4039         * except.c (check_handlers_1, check_handlers): Likewise.
4040         * init.c (create_temporary_var): Likewise.
4041         * method.c (use_thunk, synthesize_method): Likewise.
4042         * parser.c (cp_lexer_set_source_position_from_token,
4043         cp_lexer_get_preprocessor_token): Likewise.
4044         * pt.c (push_tinst_level, pop_tinst_level,
4045         tsubst_friend_function, instantiate_class_template, tsubst_decl,
4046         tsubst, tsubst_expr, instantiate_decl): Likewise.
4047         * semantics.c (genrtl_try_block, finish_label_stmt,
4048         begin_class_definition, expand_body,
4049         genrtl_finish_function): Likewise.
4050         * tree.c (build_min_nt, build_min): Likewise.
4052 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
4054         * decl2.c (comdat_linkage): Don't externalize explicit
4055         instantiations.
4057 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4059         PR c++/10554
4060         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
4061         is not NULL.
4063 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
4065         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
4066         (struct lang_identifier): ... to here.
4067         (LANG_ID_FIELD): Remove.
4068         (SET_LANG_ID): Remove.
4069         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
4070         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
4071         (IDENTIFIER_IMPLICIT_DECL): Likewise.
4072         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
4073         (IDENTIFIER_ERROR_LOCUS): Likewise.
4074         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
4076 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4078         PR c++/8772
4079         * pt.c (convert_template_argument): Correct diagnostic.
4081 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4083         PR c++/9432, c++/9528
4084         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
4086 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
4088         * decl.c (check_previous_goto_1): Adjust prototype.
4089         (check_previous_goto): Adjust use.
4090         (check_switch_goto): Likewise.
4091         (use_label): Adjust.
4092         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
4093         (struct named_label_use_list): Use location_t datatype.
4095 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4097         PR c++/10551
4098         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
4099         that have not yet been written out.
4101 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4103         PR c++/10549
4104         * class.c (layout_class_type): Mark overlong bitfields as having
4105         the maximum size permitted by their type, after layout.
4107         PR c++/10527
4108         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
4110 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4112         * call.c (build_operator_new_call): Fix typo.
4113         * lang-options.h: Likewise.
4115 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
4117         PR c++/10515
4118         * cp-tree.h (lookup_field_1): Declare it.
4119         * search.c (lookup_field_1): Make it public.
4120         * decl.c (reshape_init): Handle designated initializers.
4122         * decl.c (maybe_commonize_var): Further tweak support for systems
4123         without weak symbols.
4125 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
4127         * decl.c (maybe_commonize_var): Fix thinko in last patch.
4129 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
4131         PR c++/10506
4132         * method.c (use_thunk): Decrement immediate_size_expand.
4134         PR c++/10503
4135         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
4136         (DECL_MAYBE_TEMPLATE): Remove.
4137         * class.c (fixed_type_or_null): Avoid infinite recursion.
4139         * decl.c (maybe_commonize_var): Make the code match the comments.
4140         * pt.c (instantiate_decl): Move call to import_export_decl.
4142 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
4144         * decl2.c (finish_file): Fix merge botch.
4146 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
4148         * decl2.c (finish_file): Don't call import_export_decl for
4149         functions that are not defined.
4150         (handle_class_head): Robustify.
4151         * pt.c (instantiate_decl): Do not call cp_finish_decl for
4152         variables that are not defined.
4154 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
4156         * call.c (print_z_candidates): Fix off by one error.
4158 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
4160         PR c++/10337
4161         * call.c (joust): Don't warn about conversion ops that are exact
4162         or cv-conversions. Rearrange to avoid multiple type comparisons.
4164 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
4166         PR c++/10471
4167         * call.c (build_cxx_call): Robustify.
4169 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
4171         * Make-lang.in (lex.o): Remove mbchar.h.
4172         * lex.c (MULTIBYTE_CHARS): Lose.
4173         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
4174         in c-lex.c.
4176 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
4178         PR c++/9847
4179         * cp-tree.h (duplicate_tag_error): Remove.
4180         * class.c (duplicate_tag_error): Remove.
4181         * semantics.c (begin_class_definition): Return immediately for a
4182         duplicate class definition.
4184         PR c++/10451
4185         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
4187 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
4189         PR c++/10446
4190         * search.c (lookup_fnfields_1): Handle empty slots in the method
4191         vector.
4193         PR c++/10428
4194         * decl.c (check_elaborated_type_specifier): New function, split
4195         out from ...
4196         (xref_tag): ... here.  Use the new function in more places.
4198         * rtti.c (throw_bad_typeid): Use build_cxx_call.
4200 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
4202         * call.c (build_over_call): Use build_cxx_call.
4203         (build_cxx_call): New method, split out of build_over_call.
4204         * cp-tree.h (language_function): Add can_throw.
4205         (build_cxx_call): Declare it.
4206         * decl.c (finish_function): If a function does not contain any
4207         calls to functions that can throw an exception, indicate that
4208         fact.
4209         * decl2.c (mark_used): Do not defer the instantiation of
4210         functions, if the current function does not throw.
4211         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
4212         * pt.c (instantiate_decl): Make sure import_export_decl is called
4213         before emitting things.
4214         * rtti.c (throw_bad_cast): Use build_cxx_call.
4215         (build_dynamic_cast_1): Likewise.
4216         * typeck.c (build_function_call): Likewise.
4218 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
4220         PR c++/9881
4221         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
4222         expressions. Reverts my 2002-08-08 patch.
4224         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
4225         cheaper early exit.
4227 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4229         * cp/decl2.c (start_static_storage_duration_function): Take count
4230         arg, don't check if it wraps round.
4231         (generate_ctor_or_dtor_function): Add locus arg, use it.
4232         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
4233         locus.
4234         (finish_file): Set line numbers to past EOF for synthesized
4235         functions.
4237 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4239         PR c++/10405
4240         * search.c (lookup_field_1): Final scan goes backwards for
4241         types, forwards for non-types.
4243 2003-04-17  Roger Sayle  <roger@eyesopen.com>
4245         PR c/10375
4246         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
4247         "nothrow" function attributes.
4249 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4251         PR c++/10347
4252         * pt.c (type_dependent_expression_p): Handle array new.
4254 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
4256         PR c++/10381
4257         * parser.c (cp_parser_primary_expression): Reorganize logic for
4258         dealing with name lookup failures.
4260 2003-04-15  Jason Merrill  <jason@redhat.com>
4262         * decl2.c (mark_used): Don't instantiate anything if
4263         skip_evaluation.
4265 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
4267         * tree.c (build_cplus_array_type_1): Do not call
4268         uses_template_parms() on a NULL index_type.
4270 2003-04-13  Roger Sayle  <roger@eyesopen.com>
4272         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
4274 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
4276         PR c++/10300
4277         * init.c (build_new_1): Reorganize.
4279 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4281         * class.c (initialize_array)
4282         * decl.c (reshape_init)
4283         * decl2.c (build_expr_from_tree)
4284         * init.c (build_zero_init)
4285         * pt.c (tsubst_copy, tsubst_copy_and_build)
4286         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
4287         (ptm_initializer, class_initializer, get_pseudo_ti_init)
4288         * semantics.c (finish_compound_literal)
4289         * typeck.c (build_ptrmemfunc1)
4290         * typeck2.c (store_init_value, process_init_constructor)
4291         (build_functional_cast): Use build_constructor.
4293 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
4295         * call.c (print_z_candidates): Use gcc_gettext_width, not
4296         strlen, to determine how much padding to use.
4298 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
4300         * decl.c: Update all calls to shadow_warning.
4302 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
4304         * class.c (layout_class_type): Correct handling for overlong
4305         bit-fields whose width is the same as an integer type.
4307 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
4309         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
4310         * cp-lang.c (cp_tree_size): New function.
4311         (LANG_HOOKS_TREE_SIZE): Override.
4313         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
4314         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
4315         (union lang_tree_node): Remove common and srcloc members.
4316         (build_srcloc_here): Don't prototype.
4317         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
4318         * pt.c (pending_templates): Correct comment.
4319         * tree.c (build_srcloc, build_srcloc_here): Kill.
4321 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
4323         * call.c: Include intl.h.
4324         (print_z_candidate): Always use inform; get rid of errfn
4325         argument. Reorganize so that all the strings get picked up
4326         by xgettext.  Note obligation of caller to pass first argument
4327         through gettext.
4328         (print_z_candidates): Update to match.  Indent second and
4329         successive candidates by strlen() of translated message.
4330         (joust): Restructure ambiguous-conversion pedwarn so that
4331         translators see a complete sentence.  Update calls to
4332         print_z_candidate.
4334         * Make-lang.in (cp/call.o): Update dependencies.
4336 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4338         * decl.c (set_current_binding_level): Delete, revert last change.
4339         (current_binding_level): Modify to allow it as as lvalue.
4341 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4343         * name-lookup.c (find_binding): Pass appropriate pointer type to
4344         POP_TIMEVAR_AND_RETURN.
4346 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4348         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
4349         * cp-tree.h: Don't insist on having GNUC.
4351 2003-04-03  Jason Merrill  <jason@redhat.com>
4353         * cvt.c (ocp_convert): Only abort if we try to convert an object
4354         of TREE_ADDRESSABLE type.
4356         * class.c (build_vtable): Set DECL_ALIGN here.
4357         (get_vtable_decl): Not here.
4358         (layout_vtable_decl): Or here.
4359         (create_vtable_ptr): Or here.
4360         (layout_class_type): Or here.
4361         (check_bitfield_decl): Don't mess with field alignment.
4363 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4365         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
4366         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
4367         * rtti.c (dfs_class_hint_mark): Likewise.
4369         * decl.c (push_local_name, push_class_level_binding,
4370         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
4371         functions returning void.
4372         * decl2.c (add_using_namespace): Likewise.
4374         * decl.c (print_binding_level, print_other_binding_stack,
4375         print_binding_stack): Cast argument of %p specifier to void*.
4376         * ptree.c (cxx_print_decl): Likewise.
4378         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
4379         VAR_FUNCTION_OR_PARM_DECL_CHECK,
4380         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
4381         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
4382         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
4384         * decl.c (set_current_binding_level): New macro.  Use throughout
4385         when setting the current binding level.
4387         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
4388         in enum.
4389         * method.c (mangling_flags): Likewise.
4391         * cp-tree.h (lang_type_header): Add __extension__ and use
4392         CHAR_BITFIELD for members.
4394 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
4396         PR other/9274
4397         * mangle.c: Include gt-cp-mangle.h.
4398         (subst_identifiers): Mark with GTY.
4399         * config-lang.in (gtfiles): Add cp/mangle.c.
4400         * Make-lang.in: (gt-cp-mangle.h): New rule.
4401         (cp/mangle.o): Depends on gt-cp-mangle.h.
4403 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
4405         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
4406         after \$(srcdir)/cp/name-lookup.h.
4407         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
4408         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
4409         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
4410         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
4412 2003-03-31  Jason Merrill  <jason@redhat.com>
4414         PR java/10145
4415         * class.c (check_field_decl): Don't set DECL_ALIGN.
4417 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
4419         PR c++/7647
4420         * decl.c (grokdeclarator): Tidy, slightly.
4421         * search.c (lookup_field_1): Add want_type parameter.
4422         (lookup_field_r): Adjust call to lookup_field_1.
4424 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4426         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
4428 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
4430         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
4431         prototype.
4432         (cxx_scope_find_binding_for_name): Likewise.
4433         * decl.c (find_binding: Move to name-lookup.c.
4434         (binding_for_name): Likewise.
4435         (cxx_scope_find_binding_for_name): Likewise.
4436         (BINDING_LEVEL):  Remove.
4437         (push_binding): Tidy.
4438         (push_class_binding): Likewise.
4439         (pop_binding): Likewise.
4440         (poplevel): Likewise.
4441         (poplevel_class): Likewise.
4442         (set_identifier_type_value_with_scope): Likewise.
4443         (push_overloaded_decl): Likewise.
4444         (lookup_tag): Likewise.
4445         (unqualified_namespace_lookup): Likewise.
4446         (lookup_name_current_level): Likewise.
4447         (maybe_inject_for_scope_var): Likewise.
4448         (namespace_binding): Move to name-lookup.c.
4449         (set_namespace_binding): Likewise.
4450         * decl2.c (lookup_using_namespace): Tidy.
4451         (qualified_lookup_using_namespace): Likewise.
4452         (do_toplevel_using_decl): Likewise.
4453         * name-lookup.c: Include "timevar.h"
4454         * name-lookup.h (cxx_scope):  Declare.
4455         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
4456         member declaration.
4457         (BINDING_SCOPE): Adjust definition.
4458         (BINDING_HAS_LEVEL_P): Remove.
4460 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4462         * name-lookup.c: New file.
4463         * name-lookup.h: Likewise..
4464         * decl.c (push_binding): Adjust use cxx_binding_make.
4465         (free_bindings): Move to name-lookup.c
4466         (pop_binding): Use cxx_binding_free.
4467         (binding_for_name): Tidy.
4468         * cp-tree.h: Include "name-lookup.h"
4469         (cxx_binding_make): Move to name-lookup.h
4470         (cxx_binding_clear): Likewise.
4471         (struct cxx_binding): Likewise.
4472         (LOCAL_BINDING_P): Likewise.
4473         (INHERITED_VALUE_BINDING_P): Likewise.
4474         (BINDING_SCOPE): Likewise.
4475         (BINDING_HAS_LEVEL_P): Likewise.
4476         (BINDING_VALUE): Likewise.
4477         (BINDING_TYPE): Likewise.
4478         * config-lang.in (gtfiles): Add cp/name-lookup.h
4479         * Make-lang.in (cp/name-lookup.o): New rule.
4480         (CXX_OBJS): Add cp/name-lookup.o
4481         (CXX_TREE_H): Add cp/name-lookup.h
4483 2003-03-28  Jason Merrill  <jason@redhat.com>
4485         PR c++/10245
4486         * cvt.c (force_rvalue): New fn.
4487         * call.c (build_conditional_expr): Use it.
4488         * cp-tree.h: Declare it.
4490 2003-03-28  Mike Stump  <mrs@apple.com>
4492         * error.c (dump_expr): Add 0x to printed hex numbers to make
4493         output match source code better.
4495 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
4497         PR c++/10218
4498         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
4499         definitions.
4501         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
4502         non-existant ssdf_decls array.
4503         (finish_file): Call generator_ctor_or_dtor_function when there are
4504         static constructors or destructors and no other static
4505         initializations.
4507 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
4509         PR c++/10047
4510         * decl2.c (finish_file): Don't warn about explicitly instantiated
4511         inline decls.
4513 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4515         PR c++/10224
4516         * pt.c (lookup_template_class): Only check instantiated args if
4517         they do not contain template parameters.
4519 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
4521         PR c++/10158
4522         * parser.c (cp_parser_function_definition): Set
4523         DECL_INITIALIZED_IN_CLASS for members.
4524         * pt.c (instantiate_decl): Only reduce the template args for
4525         friends that are not defined in class.
4527 2003-03-25  Jason Merrill  <jason@redhat.com>
4529         * call.c (print_z_candidate): Change name of first arg to msgid.
4530         (joust): Add comment for translators.
4532 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4534         PR c++/9898, PR c++/383, DR 322
4535         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
4536         through reference types on both PARM and ARG.
4538 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4540         PR c++/10119
4541         * error.c (dump_expr) <BASELINK>: Use dump_expr.
4542         * pt.c (maybe_fold_nontype_args): New function.
4543         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
4544         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
4545         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
4546         maybe_fold_nontype_args.
4548 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
4550         PR c++/10026
4551         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
4553 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
4555         PR c++/7086
4556         * typeck.c (cxx_mark_addressable):  Adjust call to
4557         gen_mem_addressof or put_var_into_stack.
4559 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
4561         PR c++/9978, c++/9708
4562         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
4563         * call.c (add_template_candidate_real): Adjust
4564         instantiate_template call.
4565         * class.c (resolve_address_of_overloaded_function): Likewise.
4566         * decl.c (build_enumerator): Set TREE_CONSTANT.
4567         * pt.c (check_instantiated_args): New.
4568         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
4569         TREE_READONLY.
4570         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
4571         (reduce_template_parm_level): Likewise.
4572         (process_template_parm): Likewise.
4573         (check_explicit_specialization): Adjust instantiate_template call.
4574         (convert_template_argument): Don't check non-type argument here.
4575         (lookup_template_class): Check them here.
4576         (tsubst_friend_function): Adjust instantiate_template call.
4577         (instantiate_template): Add tsubst_flags parameter, use it. Check
4578         instantiated args.
4580 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
4582         * decl.c: Update calls to shadow_warning.
4584 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
4586         PR c++/9898
4587         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
4588         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
4590 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
4592         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
4593         friends.
4594         * cp/pt.c (instantiate_class_template): Fix formatting.
4596 2003-03-14  Matt Austern  <austern@apple.com>
4598         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
4599         (unemitted_tinfo_decl_p): Remove.
4600         (emit_tinfo_decl): Change declaration to remove unused parameter.
4601         * decl2.c (finish_file): Change tinfo emission to loop through
4602         unemitted_tinfo_decls array instead of looping through all decls.
4603         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
4604         unused second parameter.
4605         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
4606         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
4607         (emit_tinfo_decl): remove unused second parameter, add assertion
4608         that decl hasn't already been emitted.
4610 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
4612         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
4613         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
4614         return statements.
4616 2003-03-19  Jason Merrill  <jason@redhat.com>
4618         PR c++/8316, c++/9315, c++/10136
4619         * call.c (print_z_candidate): Split out from...
4620         (print_z_candidiates): ...here.
4621         (joust): Use it.
4623 2003-03-17  Roger Sayle  <roger@eyesopen.com>
4625         PR c++/10031
4626         * decl.c (duplicate_decls): Use the new type when prototyping
4627         anticipated decls, even when the types match.  This defines the
4628         exception list for the built-in function.
4630 2003-03-17  Jason Merrill  <jason@redhat.com>
4632         PR c++/10091
4633         * typeck.c (build_class_member_access_expr): Compare
4634         TYPE_MAIN_VARIANTs.
4636 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
4638         PR c++/9639
4639         * parser.c (cp_parser_declarator_id): Clear parser->scope.
4641 2003-03-16  Jason Merrill  <jason@redhat.com>
4643         PR c++/9993
4644         * decl.c (finish_function): Only allow the NRVO to use variables
4645         declared at function scope.
4647 2003-03-17  Andreas Jaeger  <aj@suse.de>
4649         * Make-lang.in (cp/TAGS): Remove.
4651 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4653         PR c++/9629
4654         * cp-tree.h (struct language_function): Add in_base_initializer.
4655         (in_base_initializer): define it.
4656         (expand_member_init): Remove INIT param.
4657         * init.c (expand_member_init): Remove INIT param, return the member.
4658         (emit_mem_initializers): Set in_base_initializer.
4659         * class.c (build_base_path): Check in_base_initializer.
4660         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
4661         * pt.c (tsubst_initializer_list): Likewise.
4663 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
4665         * decl.c (binding_for_name): Fix initialization thinko.
4667 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
4669         Compile-time improvement: 2/n.
4670         * cp-tree.h (struct cxx_binding): New datatype;
4671         (struct lang_identifier): Use it.
4672         (LOCAL_BINDING_P): Adjust definition.
4673         (INHERITED_VALUE_BINDING_P): Likewise.
4674         (BINDING_SCOPE): Likewise.
4675         (BINDING_HAS_LEVEL_P): Likewise.
4676         (BINDING_VALUE): Likewise.
4677         (BINDING_TYPE): Likewise.
4678         (IDENTIFIER_VALUE): Likewise.
4679         (struct tree_binding): Remove.
4680         (TS_CP_BINDING): Likewise.
4681         ((union lang_tree_node): Remove field "binding".
4682         (cxx_binding_clear): New macro.
4683         (binding_for_name): Adjust return type.
4684         (qualified_lookup_using_namespace): Adjust prototype.
4685         (lookup_using_namespace): Adjust prototype.
4686         (cxx_scope_find_binding_for_name): Declare.
4687         * cp-tree.def: Remove CPLUS_BINDING definition.
4688         * decl.c (push_binding): Adjust local variable type.
4689         (add_binding): Likewise.
4690         (push_class_binding): Likewise.
4691         (pop_binding): Likewise.
4692         (poplevel): Likewise.
4693         (poplevel_class): Likewise.
4694         (free_bindings):  Adjust type.
4695         (find_binding): Adjust return type, add a third parameter. Remove
4696         non-useful assertion now that we use static typing.
4697         (cxx_scope_find_binding_for_name): New function.
4698         (binding_for_name): Use it.  Adjust local variable type. Simplify.
4699         (namespace_binding):  Simplify.
4700         (set_namespace_binding): Likewise.
4701         (set_identifier_type_value_with_scope): Adjust local variable type.
4702         (lookup_tag): Don't type-abuse of local variable 'old'.
4703         (lookup_namespace_name): Likewise.  Allocate binding on stack.
4704         (select_decl): Adjust prototype.
4705         (unqualified_namespace_lookup):  Allocate binding on stack.
4706         Don't type-abuse of local variable 'val'.
4707         (lookup_name_real): Likewise.
4708         (maybe_inject_for_scope_var): Adjust local variable type.
4709         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
4710         (namespace_binding): Adjust logic, simplify.
4711         (BINDING_LEVEL): Adjust definition.
4712         (push_class_level_binding): Adjust local variable type.
4713         (struct cxx_saved_binding): Adjust field 'binding' type.
4714         * decl2.c (ambiguous_decl): Adjust prototype.
4715         (lookup_using_namespace): Adjust local variable type.
4716         (qualified_lookup_using_namespace): Catch type error and correct
4717         ensueing logic error.
4718         (do_nonmember_using_decl): Adjust local variable type.  Allocate
4719         temporary cxx_binding on stack.
4720         (do_toplevel_using_decl): Adjust local variable type.
4721         * ptree.c (cxx_print_cxx_binding): New function.
4722         (cxx_print_identifier): Use it.
4723         (cxx_print_xnode): Delete CPLUS_BINDING case label.
4725 2003-03-15  Roger Sayle  <roger@eyesopen.com>
4727         * tree.c (count_functions): Fix whitespace.
4729 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
4731         * Make-lang.in: Update.
4733 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4735         PR c++/6440
4736         * pt.c (maybe_process_partial_specialization): Handle
4737         member class template when enclosing class template is
4738         explicit specialized.
4739         (most_general_template): Stop looking when DECL is already
4740         specialized.
4742 2003-03-13  Jason Merrill  <jason@redhat.com>
4744         PR c++/9420
4745         * search.c (lookup_conversions): Call complete_type here.
4746         * call.c (implicit_conversion): Not here.
4748 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
4750         * decl2.c (do_nonmember_using_decl): Correct handling of
4751         simultaneous type/non-type bindings.
4753         * call.c (initialize_reference): Remove bogus assertion.
4754         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
4756 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
4758         PR c++/7050
4759         * expr.c (cxx_expand_expr): Return const0_rtx for throw
4760         expressions.
4762 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4764         PR c++/9474
4765         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4766         to merge old and new declarations.
4768 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
4770         * g++.1: Remove.
4771         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
4772         (cp/g++.1): Build it from scratch in the build tree.
4773         (c++.install-man): Depend on it.  Install it from the build tree.
4774         (c++.mostlyclean): Clean it.
4776 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4778         PR c++/9474
4779         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
4780         to merge old and new declarations.
4782         PR c++/9924
4783         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
4785 2003-03-11  Jason Merrill  <jason@redhat.com>
4787         PR c++/9820
4788         * search.c (lookup_member): Fix handling of functions in a class
4789         being defined.
4791 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
4793         PR c++/8700
4794         * call.c (convert_class_to_reference): Adjust usage of
4795         splice_viable.
4796         (any_viable): Remove.
4797         (splice_viable): Combine with any_viable.
4798         (print_z_candidates): Avoid printing duplicates.
4799         (build_user_type_conversion_1): Adjust usage of splice_viable.
4800         (build_new_function_call): Likewise.
4801         (build_operator_new_call): Likewise.
4802         (build_object_call): Likewise.
4803         (build_conditional_expr): Likewise.
4804         (build_new_op): Likewise.
4805         (build_new_method_call): Likewise.
4806         (joust): Remove spurious comment.
4807         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
4808         * decl2.c (arg_assoc_class): Simplify.
4809         * friend.c (add_friend): Likewise.
4811 2003-03-11  Jason Merrill  <jason@redhat.com>
4813         PR c++/8660
4814         * decl2.c (check_classfn): A member template only matches a
4815         member template.
4817 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
4819         * Make-lang.in (CXX_C_OBJS): Update.
4820         * lang-specs.h: Don't define __GNUG__ here.
4822 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
4824         * call.c (perform_overload_resolution): New function.
4825         (build_new_function_call): Use it.
4826         (build_operator_new_call): Likewise.
4827         (add_candidates): Add explicit_targs and template_only parameters.
4828         (build_new_op): Adjust accordingly.
4829         * cp-tree.h (build_operator_new_call): New function.
4830         (build_function_call_real): Remove.
4831         (build_function_call_maybe): Likewise.
4832         * init.c (build_new_1): Use build_operator_new_call.
4833         * typeck.c (build_function_call_real): Rename to ...
4834         (build_function_call): ... this.
4836 2003-03-10  Devang Patel  <dpatel@apple.com>
4838         PR c++/9394
4839         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
4841 2003-03-10  Jason Merrill  <jason@redhat.com>
4843         PR c++/9798
4844         * decl.c (push_using_directive): Push before recursing.
4846         PR c++/9868, c++/9524
4847         * call.c (resolve_scoped_fn_name): Handle the case of a function
4848         pointer member.
4850         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
4851         argument in the pointer-to-member case.
4853 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
4855         PR c++/9373
4856         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
4857         pointers to member functions.
4859         PR c++/8534
4860         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
4861         in pointer-to-member-function types.
4863 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4865         * expr.c (cplus_expand_constant): Use C90 prototype style.
4866         (cxx_expand_expr): Likewise.
4868 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4870         PR c++/9970
4871         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
4872         functions.
4874 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
4876         * lang-specs.h (c++-header): Change .pch to .gch.
4878 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
4880         * cp-tree.h (cxx_init): Update prototype.
4881         * lex.c (cxx_init): Similarly.
4883 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
4885         PR c++/9823
4886         * cp-tree.h (begin_mem_initializers): Remove.
4887         * parser.c (cp_parser_mem_initializer_list): Inline it here.
4888         Do not call finish_mem_initializers if not in a constructor.
4889         (cp_parser_class_head): Fix typo in error message.
4890         * semantics.c (begin_mem_initializers): Remove.
4891         * testsuite/g++.dg/parser/constructor1.C: New test.
4893         PR c++/9809
4894         * call.c (add_function_candidate): Skip builtin fuctions that have
4895         not yet been declared.
4897         PR c++/9982
4898         * init.c (build_new_1): Correct logic for determining whether or
4899         not to use an array cookie.
4901         PR c++/9524
4902         * parser.c (cp_parser_postfix_expression): Call
4903         finish_non_static_data_member, even when processing_template_decl.
4905         PR c++/9912
4906         * cp-tree.h (is_ancestor): New function.
4907         (handle_class_head): Change prototype.
4908         * decl2.c (is_namespace_ancestor): Rename to ...
4909         (namespace_anecestor): ... this.
4910         (set_decl_namespace): Adjust accordingly.
4911         (handle_class_head): Remove unnecessary parameters.
4912         * parser.c (cp_parser_class_head): Check that
4913         nested-name-specifiers are used appropriately.
4915 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
4917         * call.c (reference_binding): Remove REF_IS_VAR parameter.
4918         (implicit_conversion): Adjust call to reference_binding.
4919         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
4920         (initialize_reference): Adjust handling for references bound to
4921         rvalues.
4922         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
4923         prototype.
4924         (real_non_cast_lvalue_p): New method.
4925         * cvt.c (build_up_reference): Adjust use of
4926         make_temporary_var_for_ref_to_temp.
4927         * tree.c (real_non_cast_lvalue_p): New method.
4929 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4931         * except.c (init_exception_processing): Use C90 prototype style.
4932         (cp_protect_cleanup_actions): Likewise.
4933         (prepare_eh_type): Likewise.
4934         (build_eh_type_type): Likewise.
4935         (build_exc_ptr): Likewise.
4936         (do_begin_catch): Likewise.
4937         (dtor_nothrow): Likewise.
4938         (do_end_catch): Likewise.
4939         (push_eh_cleanup): Likewise.
4940         (decl_is_java_type): Likewise.
4941         (choose_personality_routine): Likewise.
4942         (initialize_handler_parm): Likewise.
4943         (expand_start_catch_block): Likewise.
4944         (expand_end_catch_block): Likewise.
4945         (begin_eh_spec_block): Likewise.
4946         (finish_eh_spec_block): Likewise.
4947         (do_allocate_exception): Likewise.
4948         (do_free_exception): Likewise.
4949         (wrap_cleanups_r): Likewise.
4950         (stabilize_throw_expr): Likewise.
4951         (build_throw): Likewise.
4952         (complete_ptr_ref_or_void_ptr_p): Likewise.
4953         (is_admissible_throw_operand): Likewise.
4954         (nothrow_libfn_p): Likewise.
4955         (can_convert_eh): Likewise.
4956         (check_handlers_1): Likewise.
4957         (check_handlers): Likewise.
4959 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
4961         * call.c (merge_conversion_sequences): New function.
4962         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
4963         (convert_class_to_reference): Correct handling of second
4964         standard conversion sequence in a user-defined conversion
4965         sequence.
4966         (build_user_type_conversion_1): Use merge_conversion_sequences.
4967         * cp-tree.def: Add comments for CONV nodes.
4968         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
4970 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4972         * error.c (init_error): Use C90 prototype style.
4973         (dump_scope): Likewise.
4974         (dump_qualifiers): Likewise.
4975         (dump_template_argument): Likewise.
4976         (dump_template_argument_list): Likewise.
4977         (dump_template_parameter): Likewise.
4978         (dump_template_bindings): Likewise.
4979         (dump_type): Likewise.
4980         (dump_typename): Likewise.
4981         (class_key_or_enum): Likewise.
4982         (dump_aggr_type): Likewise.
4983         (dump_type_prefix): Likewise.
4984         (dump_type_suffix): Likewise.
4985         (dump_global_iord): Likewise.
4986         (dump_simple_decl): Likewise.
4987         (dump_decl): Likewise.
4988         (dump_template_decl): Likewise.
4989         (dump_function_decl): Likewise.
4990         (dump_parameters): Likewise.
4991         (dump_exception_spec): Likewise.
4992         (dump_function_name): Likewise.
4993         (dump_template_parms): Likewise.
4994         (dump_char): Likewise.
4995         (dump_expr_list): Likewise.
4996         (dump_expr): Likewise.
4997         (dump_binary_op): Likewise.
4998         (dump_unary_op): Likewise.
4999         (type_as_string): Likewise.
5000         (expr_as_string): Likewise.
5001         (decl_as_string): Likewise.
5002         (context_as_string): Likewise.
5003         (lang_decl_name): Likewise.
5004         (cp_file_of): Likewise.
5005         (cp_line_of): Likewise.
5006         (decl_to_string): Likewise.
5007         (expr_to_string): Likewise.
5008         (fndecl_to_string): Likewise.
5009         (code_to_string): Likewise.
5010         (language_to_string): Likewise.
5011         (parm_to_string): Likewise.
5012         (op_to_string): Likewise.
5013         (type_to_string): Likewise.
5014         (assop_to_string): Likewise.
5015         (args_to_string): Likewise.
5016         (cv_to_string): Likewise.
5017         (cxx_print_error_function): Likewise.
5018         (cp_diagnostic_starter): Likewise.
5019         (cp_diagnostic_finalizer): Likewise.
5020         (cp_print_error_function): Likewise.
5021         (function_category): Likewise.
5022         (print_instantiation_full_context): Likewise.
5023         (print_instantiation_partial_context): Likewise.
5024         (maybe_print_instantiation_context): Likewise.
5025         (print_instantiation_context): Likewise.
5026         (cp_printer): Likewise.
5027         (print_integer): Likewise.
5028         (print_non_consecutive_character): Likewise.
5029         (locate_error): Likewise.
5031 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
5033         PR c++/9965
5034         * call.c (reference_binding): Add ref_is_var parameter.
5035         (implicit_conversion): Adjust call to reference_binding.
5036         (initialize_reference): Likewise.
5038         PR c++/9400
5039         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
5040         PARM_DECLs.
5042         PR c++/9791
5043         * class.c (get_basefndecls): Use lookup_fnfields_1.
5045 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5047         PR c++/9188
5048         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
5049         in error message.
5050         (cp_parser_single_declaration): Likewise.
5052 2003-03-05  Jason Merrill  <jason@redhat.com>
5054         PR c++/9440
5055         * call.c (build_conditional_expr): Use convert rather than an
5056         explicit NOP_EXPR.
5058 2003-03-02  Matt Austern  <austern@apple.com>
5060         * decl.c (cp_binding_level): Add static_decls varray member.
5061         (add_decl_to_level): Add static/inline namespace scope
5062         declarations to static_decls array.
5063         (wrapup_global_for_namespace): Pass static_decls only, instead of
5064         all decls, to wrapup_global_declarations/check_global_declarations.
5065         (push_namespace): Initialize static_decls for ordinary namespaces.
5066         (cxx_init_decl_processing): Initialize static_decls for global
5067         namespace.
5069 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
5071         * class.c (end_of_class): Correct thinko.
5073 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
5075         * config-lang.in: Replace ${libstdcxx_version} by its value.
5077 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
5079         * cp-tree.h (cxx_saved_binding): Declare.
5080         (struct saved_scope): Adjust type of field 'old_binding'.
5081         * decl.c (cxx_saved_binding_make): New macro.
5082         (struct cxx_saved_binding): Define.
5083         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
5084         C++ bindings.
5085         (maybe_push_to_top_level): Adjust local variable type.
5086         (pop_from_top_level): Likewise.
5088 2003-03-04  Tom Tromey  <tromey@redhat.com>
5090         * Make-lang.in (c++.tags): New target.
5092 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
5094         * Make-lang.in: Update.
5096 2003-03-03  Jason Merrill  <jason@redhat.com>
5098         * decl.c (finish_enum): Do set the type in a template. Simplify.
5099         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
5101 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
5103         PR c++/9878
5104         * call.c (convert_class_to_reference): Correct conversion
5105         sequences.
5106         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
5107         (implicit_conversion): Adjust call to reference_binding.
5108         (add_candidate): Change type of candidates parameter.
5109         (add_function_candidate): Likewise.
5110         (add_conv_candidate): Likewise.
5111         (build_builtin_candidate): Likewise.
5112         (add_builtin_candidate): Likewise.
5113         (add_builtin_candidates): Likewise.
5114         (add_template_candidate_real): Likewise.
5115         (add_template_candidate): Likewise.
5116         (add_template_conv_candidate): Likewise.
5117         (build_user_type_conversion_1): Adjust accordingly.
5118         (build_object_call): Likewise.
5119         (build_conditional_expr): Likewise.
5120         (add_candidates): Likewise.
5121         (build_new_op): Likewise.
5122         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
5123         (build_new_method_call): Adjust calls to add_function_candidate.
5124         (make_temporary_var_for_ref_to_temp): New function.
5125         (initialize_reference): Add decl parameter.
5126         * class.c (build_rtti_vtbl_entries): Use build_address and
5127         build_nop.
5128         * cp-tree.h (initialize_reference): Change prototype.
5129         (make_temporary_var_for_ref_to_temp): New function.
5130         (build_type_conversion): Change prototype.
5131         (build_address): New function.
5132         (build_nop): Likewise.
5133         * cvt.c (cp_convert_to_pointer): Adjust call to
5134         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
5135         Use build_nop.
5136         (convert_to_pointer_force): Use build_nop.
5137         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
5138         (convert_to_reference): Adjust call to build_type_conversion.
5139         (ocp_convert): Likewise.
5140         (build_type_conversion): Remove for_sure parameter.
5141         * decl.c (grok_reference_init): Use initialize_reference.
5142         * typeck.c (build_address): New function.
5143         (build_nop): Likewise.
5144         (build_unary_op): Use them.
5145         (build_ptrmemfunc): Tidy slightly.
5146         (convert_for_initialization): Adjust call to
5147         initialize_reference.
5148         * typeck2.c (store_init_value): Remove #if 0'd code.
5150 2003-03-03  Jason Merrill  <jason@redhat.com>
5152         * decl.c (start_function): Clear DECL_NUM_STMTS.
5154         * class.c (get_vtable_decl): Use vtbl_type_node.
5155         (build_primary_vtable): Check for it.
5157 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
5159         * decl.c (check_initializer): Check for vector_opaque_p.
5161 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
5163         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
5164           invoke an external cpp during compilation.
5166 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5168         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
5169         that of warning().
5170         (start_decl): Likewise.
5171         (start_function): Likewise.
5173 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
5175         * Make-lang.in (CXX_C_OBJS): Update.
5177 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
5179         PR c++/9892
5180         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
5181         instantiating it.
5183 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
5185         * parser.c (cp_parser_init_declarator): Revert opaque
5186         vector_opaque_p change.
5187         Do not include target.h.
5189 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
5191         PR c++/9879
5192         * cp-tree.h (build_zero_init): Add parameter.
5193         * decl.c (cp_finish_decl): Adjust call.
5194         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
5195         calls.
5196         (build_default_init): Add nelts parameter.  Adjust calls to
5197         build_zero_init.
5198         (build_new_1): Adjust call to build_default_init.
5199         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
5201 2003-02-26  Devang Patel  <dpatel@apple.com>
5203         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
5204         required.  Postpone enum setting for template decls.
5205         (build_enumerator): Delay copying value node until finish_enum
5206         (). Remove #if 0'ed code.
5207         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
5208         (tsubst_copy): Add check for enum type.
5210 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
5212         PR c++/9683
5213         * decl2.c (prune_vars_needing_no_initialization): Do not throw
5214         away initializations for DECL_EXTERNAL VAR_DECLs.
5215         (finish_file): Adjust accordingly.
5216         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
5218 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
5220         * decl.c (add_binding): Time TV_NAME_LOOKUP.
5221         (push_class_binding): Likewise.
5222         (set_namespace_binding): Likewise.
5224 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
5226         PR c++/9836
5227         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
5228         specializations back to the main template.
5229         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
5230         * pt.c (resolve_typename_type): Likewise.
5232 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
5234         PR c++/9778
5235         * pt.c (tsubst_copy_and_build): For a templated function inside a
5236         scope, process template arguments.
5238 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5240         PR c++/9602
5241         * typeck2.c (abstract_virtuals_error): Don't check when
5242         TYPE is still template parameter dependent.
5244 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
5246         PR c++/5333
5247         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
5248         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
5249         * pt.c (instantiate_class_template): Don't try to instantiate
5250         dependent types.
5251         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
5253 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
5255         PR c++/9749
5256         * decl.c (grokdeclarator): Do not allow parameters with variably
5257         modified types.
5259 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
5261         * search.c (grow_bfs_bases): Remove. Fold into ...
5262         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
5263         in previous patch.
5265 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
5267         PR c++/9729
5268         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
5269         when the G++ 3.2 ABI prevents correct compilation.
5271 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
5273         Change base class access representation. Share virtual base
5274         binfos.
5275         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
5276         call.
5277         * cp/class.c (build_base_path): Likewise.
5278         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
5279         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
5280         (make_new_vtable): Adjust.
5281         (force_canonical_binfo_r): Delete.
5282         (force_canonical_binfo): Delete.
5283         (mark_primary_virtual_base): Delete.
5284         (dfs_unshared_virtual_bases): Delete.
5285         (mark_primary_bases): Adjust.
5286         (maybe_warn_about_overly_private_class): Adjust.
5287         (dfs_base_derived_from): Delete.
5288         (base_derived_from): Follow the inheritance chain.
5289         (struct find_final_overrider_data): Add vpath member.
5290         (dfs_find_final_overrider): Adjust.
5291         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
5292         (find_final_overrider): Adjust.
5293         (update_vtable_entry_for_fn): Adjust.
5294         (modify_all_vtables): Adjust.
5295         (walk_subobject_offsets): Adjust.
5296         (layout_nonempty_base_or_field): Adjust.
5297         (layout_empty_base): Remove last parameter. Adjust.
5298         (build_base_field): Adjust.
5299         (build_base_fields): Adjust.
5300         (propagate_binfo_offsets): Remove last parameter. Adjust.
5301         (dfs_set_offset_for_unshared_vbases): Delete.
5302         (layout_virtual_bases): Adjust.
5303         (finish_struct_1): Adjust.
5304         (init_class_processing): Don't init access nodes.
5305         (dfs_get_primary_binfo): Delete.
5306         (get_primary_binfo): Adjust.
5307         (dump_class_hierarchy_r): Remove most derived arg, add IGO
5308         parameter. Adjust.
5309         (dump_class_hierarchy): Adjust.
5310         (finish_vtbls): Adjust.
5311         (get_original_base): Delete.
5312         (build_vtt_inits): Adjust.
5313         (dfs_build_secondary_vptr_vtt_inits): Adjust.
5314         (dfs_ctor_vtable_bases_queue_p): Adjust.
5315         (build_ctor_vtbl_group): Adjust.
5316         (dfs_accumulate_vtbl_inits): Adjust.
5317         (build_vtbl_initializer): Adjust.
5318         (build_vbase_offset_vtbl_entries): Adjust.
5319         (add_vcall_offset_vtbl_entries_1): Adjust.
5320         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
5321         (access_*_node): Remove.
5322         (CANONICAL_BINFO): Delete.
5323         (BINFO_UNSHARED_MARKED): Remove.
5324         (BINFO_MARKED): Set LANG_FLAG_0 directly.
5325         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
5326         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
5327         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
5328         Delete.
5329         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
5330         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
5331         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
5332         Delete.
5333         (BINFO_DEPENDENT_BASE_P): New.
5334         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
5335         index.
5336         (markedp, unmarkedp): Adjust.
5337         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
5338         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
5339         find_vbase_instance, binfo_for_vbase): Delete.
5340         (copied_binfo, original_binfo): Declare.
5341         (finish_base_specifier): Add virtual_p arg.
5342         (unshare_base_binfos): Delete.
5343         (copy_base_binfos): Declare.
5344         (reverse_path): Delete.
5345         * cp/decl.c (xref_basetypes): Access and virtuality passed
5346         differently. Don't copy direct base binfos here. Call
5347         copy_base_binfos.
5348         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
5349         (initialize_vtbl_ptrs): Adjust.
5350         (expand_member_init): Adjust.
5351         * cp/parser.c (cp_parser_base_specifier): Adjust.
5352         * cp/pt.c (instantiate_class_template): Adjust.
5353         (get_template_base_recursive): Adjust.
5354         * cp/rtti.c (get_pseudo_ti_init): Adjust.
5355         (get_pseudo_ti_desc): Adjust.
5356         * cp/tree.c (unshare_base_binfos): Rename to ...
5357         (copy_base_binfos): ... here, reimplement.
5358         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
5359         (reverse_path): Remove.
5360         * cp/typeck.c (get_delta_difference): Adjust error messages.
5361         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
5362         * cp/search.c (lookup_base_r): Adjust.
5363         (dynamic_cast_base_recurse): Adjust.
5364         (canonical_binfo): Remove.
5365         (dfs_canonical_queue): Remove.
5366         (dfs_assert_unmarked_p): Remove.
5367         (assert_canonical_unmarked): Remove.
5368         (shared_marked_p, shared_unmarked_p): Remove.
5369         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
5370         (dfs_access_in_type): Adjust.
5371         (access_in_type): Adjust.
5372         (dfs_accessible_queue_p): Adjust.
5373         (dfs_accessible_p): Adjust.
5374         (is_subobject_of_p_1, is_subobject_of_p): Remove.
5375         (struct lookup_field_info): Remove from_dep_base_p field.
5376         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
5377         (lookup_field_r): Remove dependent base code.
5378         (lookup_member): Likewise.
5379         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
5380         (dfs_unmarked_real_bases_queue_p): Remove.
5381         (dfs_marked_real_bases_queue_p): Remove.
5382         (dfs_skip_vbases): Remove.
5383         (dfs_get_pure_virtuals): Adjust.
5384         (markedp, unmarkedp): Adjust.
5385         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
5386         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
5387         (dfs_unmark): Adjust.
5388         (dfs_get_vbase_types):Remove.
5389         (dfs_build_inheritance_graph_order): Remove.
5390         (get_vbase_types): Remove
5391         (dfs_find_vbase_instance): Remove.
5392         (find_vbase_instance): Remove.
5393         (dfs_debug_unmarkedp): Adjust.
5394         (dependent_base_p): Remove.
5395         (dfs_push_type_decls): Adjust.
5396         (dfs_push_decls): Adjust.
5397         (dfs_no_overlap_yet): Adjust.
5398         (copied_binfo): New function.
5399         (original_binfo): New function.
5400         (binfo_for_vbase): Remove.
5402 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
5404         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
5405         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
5406         vectors, for speed.
5408 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
5410         PR c++/9704
5411         * class.c (layout_class_type): In the 3.2 ABI, take into account
5412         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
5414 2003-02-18  Matt Austern <austern@apple.com>
5416         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
5417         nothing for C++.
5418         * cp/decl.c (wrapup_globals_for_namespace): Remove special
5419         handling of global namespace.
5421 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
5423         * cp-tree.h (rid_to_yy): Delete.
5424         (C_RID_YYCODE): Delete.
5425         (finish_file): Delete redundant declaration.
5427 2003-02-18  Jason Merrill  <jason@redhat.com>
5429         PR c++/9623
5430         * decl.c (reshape_init): Don't mess with initializer labels.
5432         PR c++/9485
5433         * parser.c (cp_parser_postfix_expression): Set idk properly for
5434         object->scope::member.
5436 2003-02-18  Ben Elliston  <bje@redhat.com>
5438         PR other/7350
5439         * decl.c (duplicate_decls): Fix typo in comment.
5441 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
5443         PR debug/9717
5444         * class.c (build_base_field): Mark fields for base classes with
5445         DECL_IGNORED_P.
5447 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5449         PR c++/9457
5450         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
5451         CONSTRUCTOR_ELTS only once.
5453 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5455         PR c++/9459
5456         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5457         (dump_type_suffix): Likewise.
5459 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5461         * search.c: ANSIfy function declarations and definitions.
5462         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
5463         * call.c (build_method_call, resolve_scoped_fn_name,
5464         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
5465         calls.
5466         * class.c (handle_using_decl): Likewise.
5467         * decl.c (make_typename_type, make_unmound_class_template,
5468         start_decl, compute_array_index_type): Likewise.
5469         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
5470         * init.c (expand_member_init, build_member_call): Likewise.
5471         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
5472         resolve_typename_type): Likewise.
5473         * typeck.c (lookup_destructor, finish_class_member_access_exprm
5474         build_prememfunc_access_expr): Likewise.
5476 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
5478         * decl2.c: Include "timevar.h".
5479         (namespace_ancestor): Time name lookup.
5480         (add_using_namespace): Likewise.
5481         (lookup_using_namespace): Likewise.
5482         (qualified_lookup_using_namespace): Likewise.
5483         (decl_namespace): Likewise.
5484         (lookup_arg_dependent): Likewise.
5485         * lex.c (do_identifier): Likewise.
5486         (do_scoped_id): Likewise.
5487         * pt.c (lookup_template_class): Likewise.
5489 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
5491         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
5493 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5495         * decl.c: Include "timevar.h".
5496         (poplevel): Time name lookup.
5497         (find_binding): Likewise.
5498         (push_namespace): Likewise.
5499         (pop_nested_namespace): Likewise.
5500         (store_bindings): Likewise.
5501         (maybe_push_to_top_level): Likewise.
5502         (pop_from_top_level): Likewise.
5503         (push_local_name): Likewise.
5504         (pushtag): Likewise.
5505         (pushdecl): Likewise.
5506         (pushdecl_with_scope): Likewise.
5507         (pushdecl_namespace_level): Likewise.
5508         (pushdecl_top_level): Likewise.
5509         (pushdecl_class_level): Likewise.
5510         (push_class_level_binding): Likewise.
5511         (push_using_decl): Likewise.
5512         (push_using_directive): Likewise.
5513         (push_overloaded_decl): Likewise.
5514         (lookup_label): Likewise.
5515         (define_label): Likewise.
5516         (lookup_tag): Likewise.
5517         (lookup_tag_reverse): Likewise.
5518         (lookup_namespace_name): Likewise.
5519         (select_decl): Likewise.
5520         (unqualified_namespace_lookup): Likewise.
5521         (lookup_name_real): Likewise.
5522         (lookup_name_current_level): Likewise.
5523         (lookup_type_current_level): Likewise.
5524         (maybe_inject_for_scope_var): Likewise.
5525         (xref_tag): Likewise.
5527         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
5529 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
5531         * decl.c (build_enumerator):  Remove unneeded test.
5533 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
5535         * cp-tree.h (struct lang_type_header): Make all fields unsigned
5536         char.
5538 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
5540         PR c++/7129
5541         * call.c (z_candidate): Add args.
5542         (convert_class_to_reference): Set it.
5543         (implicit_conversion): Tidy.
5544         (add_candidate): Add args parameter.
5545         (add_function_candidate): Adjust call to add_candidate.
5546         (add_conv_candidate): Likewise.
5547         (build_builtin_candidate): Likewise.
5548         (build_user_type_conversion_1): Eliminate wasteful tree_cons
5549         usage.
5550         (build_new_function_call): Likewise.
5551         (build_object_call): Likewise.
5552         (add_candidates): New function.
5553         (build_new_op): Use it.
5554         (covert_like_real): Adjust call to build_over_call.
5555         (build_over_call): Remove args parameter.
5556         * operators.def: Add <?= and >?=.
5558 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
5560         * typeck.c (build_indirect_ref): Don't check flag_volatile.
5562 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5564         PR c++/8849
5565         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
5567 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
5569         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
5570         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
5571         (BINFO_LANG_ELTS): New #define.
5572         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
5574 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
5576         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
5578 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
5580         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
5581         for class types.
5582         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
5583         rather than TYPE_LANG_FLAG_0.
5584         (TYPE_BUILT_IN): Remove.
5585         (TYPE_DEPENDENT_P): New macro.
5586         (TYPE_DEPENDENT_P_VALID): Likewise.
5587         (lang_type_class): Add fields_readonly.
5588         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
5589         * pt.c (dependent_type_p_r): New function, split out from ...
5590         (dependent_type_p): ... here.  Memoize results.
5591         * search.c (dependent_base_p): Use dependent_type_p, not
5592         uses_template_parms.
5593         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
5594         for class types.
5596 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
5598         * call.c (build_field_call): Use build_new_op, not build_opfncall.
5599         (prep_operand): New function.
5600         (build_new_op): Use it.  Remove dead code.
5601         * class.c (pushclass): Change "modify" parameter type from int to
5602         bool.
5603         (currently_open_class): Use same_type_p, not pointer equality.
5604         (push_nested_class): Adjust calls to pushclass, remove modify
5605         parameter.
5606         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
5607         (pushclass): Change prototype.
5608         (push_nested_class): Likewise.
5609         (grokoptypename): Remove.
5610         (build_opfncall): Remove.
5611         (value_dependent_expression_p): Declare.
5612         (resolve_typename_type): Likewise.
5613         (resolve_typename_type_in_current_instantiation): Likewise.
5614         (enter_scope_of): Remove.
5615         (tsubst): Remove.
5616         (tsubst_expr): Likewise.
5617         (tsubst_copy): Likewise.
5618         (tsubst_copy_and_build): Likewise.
5619         * decl.c (warn_about_implicit_typename_lookup): Remove.
5620         (finish_case_label): Return error_mark_node for erroneous labels.
5621         (start_decl): Adjust calls to push_nested_class.
5622         (grokfndecl): Call push_scope/pop_scope around call to
5623         duplicate_decls.
5624         (grokdeclarator): Do not call tsubst.
5625         (start_function): Adjust calls to push_nested_class.
5626         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
5627         (check_classfn): Use push_scope/pop_scope around type comparisions.
5628         (grokoptypename): Remove.
5629         (push_sscope): Adjust call to push_nested_class.
5630         * error.c (dump_type): Show cv-qualification of typename types.
5631         * init.c (build_member_call): Use build_new_op, not
5632         build_opfncall.
5633         * method.c (build_opfncall): Remove.
5634         * parser.c (cp_parser): Add allow_non_constant_expression_p and
5635         non_constant_expression_p.
5636         (cp_parser_constant_expression): Adjust prototype.
5637         (cp_parser_resolve_typename_type): Remove.
5638         (cp_parser_non_constant_expression): New function.
5639         (cp_parser_non_constant_id_expression): Likewise.
5640         (cp_parser_new): Set allow_non_constant_expression_p and
5641         non_constant_expression_p.
5642         (cp_parser_primary_expression): Reject `this' and `va_arg' in
5643         constant-expressions.  Note that dependent names aren't really
5644         constant.
5645         (cp_parser_postfix_expression): Reject conversions to non-integral
5646         types in constant-expressions.  Neither are increments or
5647         decrements.
5648         (cp_parser_unary_expression): Reject increments and decrements in
5649         constant-expressions.
5650         (cp_parser_direct_new_declarator): Adjust call to
5651         cp_parser_constant_expression.
5652         (cp_parser_cast_expression): Reject conversions to non-integral
5653         types in constant-expressions.
5654         (cp_parser_assignment_expression): Rejects assignments in
5655         constant-expressions.
5656         (cp_parser_expression): Reject commas in constant-expressions.
5657         (cp_parser_labeled_statement): Adjust call to
5658         cp_parser_constant_expression.
5659         (cp_parser_direct_declarator): Simplify array bounds, even in
5660         templates, when they are non-dependent.  Use
5661         resolve_typename_type, not cp_parser_resolve_typename_type.
5662         (cp_parser_class_head): Use resolve_typename_type, not
5663         cp_parser_resolve_typename_type.
5664         (cp_parser_member_declaration): Adjust call to
5665         cp_parser_constant_expression.
5666         (cp_parser_constant_initializer): Likewise.
5667         (cp_parser_constructor_declarator): Use resolve_typename_type, not
5668         cp_parser_resolve_typename_type.
5669         (cp_parser_late_parsing_default_args): Adjust call to
5670         push_nested_class.
5671         * pt.c (tsubst): Give it internal linkage.
5672         (tsubst_expr): Likewise.
5673         (tsubst_copy): Likewise.
5674         (tsubst_copy_and_build): Likewise.
5675         (push_access_scope_real): Likewise.
5676         (tsubst_friend_class): Likewise.
5677         (instantiate_class_template): Adjust call to pushclass.
5678         (value_dependent_expression_p): Give it external linkage.
5679         Robustify.
5680         (resolve_typename_type): New function.
5681         * semantics.c (finish_call_expr): Use build_new_op, not
5682         build_opfncall.
5683         (begin_constructor_declarator): Remove.
5684         (begin_class_definition): Adjust call to pushclass.
5685         (enter_scope_of): Remove.
5686         * typeck.c (comptypes): Resolve typename types as appropriate.
5687         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
5688         (build_x_compound_expr): Likewise.
5689         (build_modify_expr): Likewise.
5690         (build_x_modify_expr): Likewise.
5691         * typeck2.c (build_x_arrow): Likewise.
5693 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
5695         * pt.c (last_pending_template) Declare GTY().
5697 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5699         PR c++/8591
5700         * parser.c (cp_parser_elaborated_type_specifier): Convert
5701         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
5702         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
5704 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
5706         PR c++/9437
5707         * pt.c (unify): Don't unify '*T' with 'U C::*'.
5709         PR c++/3902
5710         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
5711         inside a declarator.
5713 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
5715         * class.c (update_vtable_entry_for_fn): Add index parameter.
5716         Generate vcall thunk for covariant overriding from a virtual
5717         primary base.
5718         (dfs_modify_vtables): Adjust.
5720 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
5722         PR c++/9403
5723         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
5724         template keyword.
5725         (cp_parser_base_specifier): Look for and consume a
5726         TEMPLATE keyword. Replace switch with array index.
5728         PR c++/795
5729         * semantics.c (finish_non_static_data_member): Remember the
5730         field's type even in a template.
5732         PR c++/9415
5733         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
5734         already scoped.
5736         PR c++/8545
5737         * parser.c (cp_parser_cast_expression): Be more tentative.
5739 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5741         * cp-tree.h (flagged_type_tree_s): Remove.
5742         (check_for_new_type): Likewise.
5743         * typeck2.c (check_for_new_type): Likewise.
5745 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
5747         * dump.c: ANSIfy function declarations and definitions.
5749         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
5751 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5753         PR c++/9354
5754         * init.c (build_new): Set the type of the new-expression, even
5755         when processing_templte_decl.
5757         PR c++/9216
5758         * parser.c (cp_parser_primary_expression): Improve error message
5759         for templates used in an expression context.
5761         PR c++/8696
5762         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
5763         parse when encountering "typedef".
5765 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
5767         * class.c, parser.c: ANSIfy function definitions and declarations.
5769 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5771         PR c++/9328
5772         * error.c (dump_decl): For an OVERLOAD, just print the name of the
5773         function; it doesn't make sense to try to print its type.
5774         * semantics.c (finish_typeof): Issue errors about invalid uses.
5776         PR c++/9298
5777         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
5778         function.
5779         (cp_parser_expression_statement): Use it.
5780         (cp_parser_explicit_instantiation): Likewise.
5781         * pt.c (do_decl_instantiation): Improve error handling logic.
5783 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
5785         PR c++/9384
5786         * parser.c (cp_parser_using_declaration): Issue error messages
5787         about name resolution failures here.
5789         PR c++/9388
5790         * class.c (currently_open_derived_class): Use dependent_type_p.
5791         * cp-tree.h (dependent_type_p): New function.
5792         (dependent_template_arg_p): Likewise.
5793         (dependent_template_p): Likewise.
5794         (type_dependent_expression_p): Likewise.
5795         * parser.c (cp_parser_dependent_type_p): Remove.
5796         (cp_parser_value_dependent_type_p): Likewise.
5797         (cp_parser_type_dependent_expression_p): Likewise.
5798         (cp_parser_dependent_template_arg_p): Likewise.
5799         (cp_parser_dependent_template_id_p): Likewise.
5800         (cp_parser_dependent_template_p): Likewise.
5801         (cp_parser_diagnose_invalid_type_name): Replace
5802         cp_parser_dependent_type_p with dependent_type_p, etc.
5803         (cp_parser_primary_expresion): Likewise.
5804         (cp_parser_nested_name_specifier_opt): Likewise.
5805         (cp_parser_postfix_expression): Likewise.
5806         (cp_parser_unary_expression): Likewise.
5807         (cp_parser_template_name): Likewise.
5808         (cp_parser_class_name): Likewise.
5809         (cp_parser_lookup_name): Likewise.
5810         * pt.c (dependent_type_p): New function.
5811         (value_dependent_expression_p): Likewise.
5812         (type_dependent_expression_p): Likewise.
5813         (dependent_template_arg_p): Likewise.
5814         (dependent_template_id_p): Likewise.
5815         (dependent_template_p): Likewise.
5817         PR c++/9285
5818         PR c++/9294
5819         * parser.c (cp_parser_simple_declaration): Return quickly when
5820         encountering errors.
5822 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5824         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
5826 2003-01-17  Jason Merrill  <jason@redhat.com>
5828         PR c++/9167, c++/9358
5829         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
5831 2003-01-17  Jason Merrill  <jason@redhat.com>
5833         PR c++/9342
5834         * call.c (build_conditional_expr): Always do lvalue-rvalue
5835         conversion.
5837 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
5839         PR c++/9294
5840         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
5841         * cp-tree.h (BASELINK_BINFO): Adjust.
5842         (BASELINK_FUNCTIONS): Likewise.
5843         (BASELINK_ACCESS_BINFO): Likewise.
5844         (tree_baselink): New structure.
5845         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
5846         (lang_tree_node): Add baselink.
5847         * decl.c (cp_tree_node_structure): Add BASELINK case.
5848         * search.c (build_baselink): Adjust.
5849         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
5850         test from TREE_LIST case.
5852         PR c++/9272
5853         * parser.c (cp_parser_constructor_declarator_p): Do not assume
5854         that a constructor cannot be declared outside of its own class.
5856         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
5857         be resolved, neither can the qualified name.
5859         * rtti.c (get_pseudo_ti_desc): Fix thinko.
5861 2003-01-16  Jason Merrill  <jason@redhat.com>
5863         PR c++/8564
5864         * init.c (build_vec_init): Re-add maxindex parm.
5865         (perform_member_init, build_aggr_init): Pass it.
5866         (build_new_1): Pass it. Use an incomplete array type for full_type.
5867         * typeck.c (build_modify_expr): Pass it.
5868         * cp-tree.h: Adjust.
5870 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
5872         * cp-tree.h (tsubst_copy_and_build): New declaration.
5873         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
5874         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
5875         (tsubst_copy_and_build): New function.
5877 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
5879         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
5880         (PARTIAL_INSTANTIATION_P): Remove.
5881         (IMPLICIT_TYPENAME_P): Likewise.
5882         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
5883         (build_typename_type): Remove declaration.
5884         (parmlist_is_exprlist): Likewise.
5885         * decl.c (build_typename_type): Make it static, remove third
5886         parameter.
5887         (push_class_binding): Don't do implicit typename stuff.
5888         (make_typename_type): Likewise.
5889         (lookup_name_real): Likewise.
5890         (grokdeclarator): Don't try to convert declarations into
5891         initializations.  Don't do implicit typename stuff.
5892         (parmlist_is_exprlist): Remove.
5893         (xref_basetypes): Simplify.
5894         * decl2.c (grokfield): Don't try to convert declarations into
5895         initializations.
5896         (build_anon_union_vars): Do this while processing templates, too.
5897         (finish_anon_union): Likewise.
5898         * error.c (dump_type): Remove implicit typename handling.
5899         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
5900         (cp_parser_primary_expression): Correct handling of names not
5901         found by unqualified name lookup in templates.
5902         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
5903         of types when possible.
5904         (cp_parser_simple_declaration): Complain intelligently about some
5905         invalid declarations.
5906         (cp_parser_member_declaration): Likewise.
5907         (cp_parser_constructor_declarator_p): Don't check when we're in a
5908         function scope.
5909         * pt.c (instantiate_class_template): Remove
5910         PARTIAL_INSTANTIATION_P gunk.
5911         * search.c (lookup_field_r): Don't build implicit typenames.
5912         (marked_pushdecls_p): Don't enter dependent base types.
5913         (unmarked_pushdecls_p): Likewise.
5914         * semantics.c (begin_class_definition): Remove implicit typename
5915         stuff.
5917 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
5919         PR c++/9212
5920         * parser.c (cp_parser_direct_declarator): If accepting either
5921         abstract or named, the name must be an unqualified-id.
5923 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5925         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
5927 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5929         * decl2.c (check_classfn): Fix uninitialized warning.
5930         (build_anon_union_vars): Likewise.
5931         * pt.c (tsubst_copy): Likewise.
5933 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
5935         Further conform g++'s __vmi_class_type_info to the C++ ABI
5936         specification.
5937         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
5938         the specification.
5939         (class_hint_flags): Likewise.
5941 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5943         * config-lang.in: Add semantics.c to gtfiles.
5944         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
5945         (saved_scope): Likewise.
5946         (type_lookups): Remove.
5947         (deferred_access): New structure.
5948         (type_access_control): Remove.
5949         (save_type_access_control): Likewise.
5950         (reset_type_access_control): Likewise.
5951         (decl_type_access_control): Likewise.
5952         (push_deferring_access_checks): Declare.
5953         (resume_deferring_access_checks): Likewise.
5954         (stop_deferring_access_checks): Likewise.
5955         (pop_deferring_access_checks): Likewise.
5956         (get_deferred_access_checks): Likewise.
5957         (pop_to_parent_deferring_access_checks): Likewise.
5958         (perform_deferred_access_checks): Likewise.
5959         (perform_or_defer_access_check): Likewise.
5960         * decl.c (make_typename_type): Use perform_or_defer_access_check.
5961         (make_unbound_class_template): Likewise.
5962         (grokdeclarator): Don't call decl_type_access_control.
5963         * parser.c (cp_parser_context): Remove deferred_access_checks
5964         and deferring_access_checks_p fields.
5965         (cp_parser_context_new): Adjust.
5966         (cp_parser): Remove access_checks_lists.
5967         (cp_parser_defer_access_check): Remove.
5968         (cp_parser_start_deferring_access_checks): Remove.
5969         (cp_parser_stop_deferring_access_checks): Remove.
5970         (cp_parser_perform_deferred_access_checks): Remove.
5971         (cp_parser_nested_name_specifier_opt): Use new deferred access
5972         functions.
5973         (cp_parser_simple_declaration): Likewise.
5974         (cp_parser_template_id): Likewise.
5975         (cp_parser_function_definition): Likewise.
5976         (cp_parser_class_specifier): Likewise.
5977         (cp_parser_lookup_name): Likewise.
5978         (cp_parser_single_declaration): Likewise.
5979         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
5980         (cp_parser_parse_tentatively): Likewise.
5981         (cp_parser_parse_definitely): Likewise.
5982         (yyparse): Likewise.
5983         (cp_parser_init_declarator): Remove access_checks parameter.
5984         Use new deferred access functions.
5985         (cp_parser_function_definition_from_specifiers_and_declarator):
5986         Likewise.
5987         (cp_parser_class_head): Remove deferring_access_checks_p and
5988         saved_access_checks parameters.  Use new deferred access functions.
5989         (cp_parser_member_specification_opt): Don't call
5990         reset_type_access_control.
5991         * search.c (type_access_control): Remove.
5992         * semantics.c: Include "gt-cp-semantics.h".
5993         (deferred_type_access_control): Remove.
5994         (deferred_access_stack): New variable.
5995         (deferred_access_free_list): Likewise.
5996         (push_deferring_access_checks): New function.
5997         (resume_deferring_access_checks): Likewise.
5998         (stop_deferring_access_checks): Likewise.
5999         (pop_deferring_access_checks): Likewise.
6000         (get_deferred_access_checks): Likewise.
6001         (pop_to_parent_deferring_access_checks): Likewise.
6002         (perform_deferred_access_checks): New function, adapted from
6003         cp_parser_perform_deferred_access_checks.
6004         (perform_or_defer_access_check): New function, adapted from
6005         cp_parser_defer_access_check.
6006         (current_type_lookups): Remove.
6007         (deferred_type_access_control): Likewise.
6008         (decl_type_access_control): Likewise.
6009         (save_type_access_control): Likewise.
6010         (reset_type_access_control): Likewise.
6011         (begin_function_definition): Adjust.
6012         (begin_class_definiton): Likewise.
6014 2003-01-13  Jason Merrill  <jason@redhat.com>
6016         PR c++/8748
6017         * class.c (build_base_path): Take the address before calling save_expr.
6019         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
6020         all the ambiguous conversions are bad.
6022         * class.c (maybe_warn_about_overly_private_class): Don't stop
6023         searching when we find a nonprivate method.
6025         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
6027 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
6029         * cp-tree.h (get_arglist_len_in_bytes): Remove.
6031         PR c++/9264
6032         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
6033         typeame types more robustly.
6035 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
6037         * parser.c:  Fix comment typos.
6039 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
6041         PR c++/9099
6042         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
6043         an object_type which is not a class type.
6045 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
6047         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
6048         (cp_parser_late_parsing_default_args): Likewise.
6050 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
6052         * cfns.gperf: ANSIfy function declarations.
6053         * cfns.h: Regenerate.
6054         * cp-tree.h: ANSIfy function declarations.
6056 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
6058         * cp-tree.h (reparse_absdcl_as_expr): Remove.
6059         (reparse_absdcl_as_casts): Likewise.
6060         (reparse_decl_as_expr): Likewise.
6061         (finish_decl_parsing): Likewise.
6062         * decl2.c (reparse_absdcl_as_expr): Remove.
6063         (reparse_absdcl_as_casts): Likewise.
6064         (repase_decl_as_expr): Likewise.
6065         (finish_decl_parsing): Likewise.
6067         PR c++/9128
6068         PR c++/9153
6069         PR c++/9171
6070         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
6071         function.
6072         (cp_parser_nested_name_specifier_opt): Correct the
6073         check_dependency_p false.
6074         (cp_parser_postfix_expression): Fix formatting.
6075         (cp_parser_decl_specifier_seq): Avoid looking for constructor
6076         declarators when possible.
6077         (cp_parser_template_id): Avoid performing name-lookup when
6078         possible.
6079         (cp_parser_class_head): Do not count specializations when counting
6080         levels of templates.
6081         (cp_parser_constructor_declarator_p): Return immediately if
6082         there's no chance that the tokens form a constructor declarator.
6083         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
6084         expression with reference type.
6085         (get_tinfo_decl_dynamic): Do not return an expression with
6086         reference type.
6087         (build_typeid): Add comment.  Do not return an expression with
6088         reference type.
6089         * typeck.c (build_class_member_access_expr): Improve handling of
6090         conditionals and comma-expressions as objects.
6092 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6094         * cfns.gperf: ANSIfy function declarations.
6095         * cfns.h: Regenerate.
6096         * cp-tree.h: ANSIfy function declarations.
6097         * parser.c: ANSIfy function declarations & definitions.
6099         * decl.c (bad_specifiers): Fix parameter order error I introduced.
6101 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6103         Merge from pch-branch:
6105         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6107         Merge to tag pch-merge-20030102:
6109         * semantics.c (finish_translation_unit): Don't call finish_file.
6110         * parser.c: Don't include ggc.h.
6111         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
6112         read first token here.  Don't allow PCH files after the first
6113         token is read.
6114         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
6115         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
6116         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
6117         (cp_parser_late_parsing_for_member): Don't duplicate call to
6118         cp_lexer_set_source_position_from_token.
6119         (cp_parser_late_parsing_default_args): Likewise.
6120         (yyparse): Call finish_file after clearing the_parser.
6122         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
6124         * Make-lang.in: Remove $(GGC_H) from all dependencies.
6125         (CXX_TREE_H): Add $(GGC_H).
6126         * class.c: Don't include ggc.h.
6127         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
6128         (method_name_cmp): Likewise.
6129         (resort_data): New variable.
6130         (resort_field_decl_cmp): New.
6131         (resort_method_name_cmp): New.
6132         (resort_sorted_fields): New.
6133         (resort_type_method_vec): New.
6134         (finish_struct_methods): Delete cast.
6135         (finish_struct_1): Delete cast.
6136         * cp-tree.h: Include ggc.h.
6137         (struct lang_type_class): Add reorder attribute to field `methods'.
6138         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
6139         (resort_sorted_fields): New prototype.
6140         (resort_type_method_vec): New prototype.
6141         * call.c: Don't include ggc.h.
6142         * decl.c: Likewise.
6143         * decl2.c: Likewise.
6144         * init.c: Likewise.
6145         * lex.c: Likewise.
6146         * method.c: Likewise.
6147         * optimize.c: Likewise.
6148         * parse.y: Likewise.
6149         * pt.c: Likewise.
6150         * repo.c: Likewise.
6151         * search.c: Likewise.
6152         * semantics.c: Likewise.
6153         * spew.c: Likewise.
6154         * tree.c: Likewise.
6156         * lang-specs.h: Remove comment.
6158         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
6160         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
6161         (operator_name_info): Mark to be saved for PCH, specify size.
6162         (assignment_operator_name_info): Likewise.
6164         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
6166         * decl.c (anon_cnt): Mark to be saved for PCH.
6168         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
6170         * lex.c  (init_reswords): Delete now-untrue comment.
6171         Allocate ridpointers using GGC.
6173         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
6175         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
6177         * g++spec.c (lang_specific_driver): Don't include standard
6178         libraries in `added'.
6180         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
6182         * decl2.c (finish_file): Call c_common_write_pch.
6183         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
6185         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
6187         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
6188         files when using g++.
6189         * lang-specs.h: Handle compiling C++ header files.
6191 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
6193         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
6195 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6197         * pt.c (push_access_scope_real): Call push_to_top_level for
6198         function in namespace scope.
6199         (pop_access_scope): Call pop_from_top_level for function in
6200         namespace scope.
6202 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
6204         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
6206 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
6208         * Make-lang.in (c++.install-common, c++.install-man,
6209         c++.uninstall): Prepend $(DESTDIR) to destination paths in
6210         all (un)installation commands.
6211         (c++.install-common): Rewrite $(LN) commands to support
6212         DESTDIR with "ln" as well as with "ln -s".
6214 2003-01-08  Jason Merrill  <jason@redhat.com>
6216         * parser.c (cp_parser_primary_expression): See through explicitly
6217         scoped ALIAS_DECLs, too.
6219 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
6221         * decl.c: Remove some #if 0 code.
6223         * decl.c: ANSIfy function declarations.
6225 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
6227         * parser.c (cp_parser_asm_definition): Correct handling of omitted
6228         operands.
6230 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6232         PR c++/9030
6233         * decl.c (make_typename_type): Check access only when tf_error.
6234         (make_unbound_class_template): Likewise.
6235         * pt.c (saved_access_scope): New variable.
6236         (push_access_scope_real): New function.
6237         (push_access_scope): Likewise.
6238         (pop_access_scope): Likewise.
6239         (tsubst_default_argument): Use them.
6240         (instantiate_template): Likewise.
6241         (regenerate_decl_from_template): Likewise.
6242         (instantiate_decl): Likewise.
6243         (get_mostly_instantiated_function_type): Likewise.
6245 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
6247         * tree.c: Delete bogus #if 0 code.
6249 2003-01-07  Andreas Schwab  <schwab@suse.de>
6251         * class.c (layout_class_type): Don't use
6252         PCC_BITFIELD_TYPE_MATTERS if not defined.
6254 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
6256         PR c++/9165
6257         * decl2.c (build_cleanup): Mark the object as used.
6259         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
6260         (hash_local_specialization): New function.
6261         (register_local_specialization): Revert 2003-01-05 change.
6262         (instantiate_decl): Use hash_local_specialization when creating
6263         the local_specializations table.
6265         * decl2.c (mark_used): Do not synthesize thunks.
6267         * class.c (layout_class_type): Correct handling of unnamed
6268         bitfields wider than their types.
6270         PR c++/9189
6271         * parser.c (cp_parser): Remove default_arg_types.  Update
6272         documentation for unparsed_functions_queues.
6273         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
6274         parameter.
6275         (cp_parser_new): Don't set parser->default_arg_types.
6276         (cp_parser_function_definition): Adjust usage of
6277         unparsed_funtions_queues.
6278         (cp_parser_class_specifier): Don't mess with
6279         parser->default_arg_types.  Handle default argument processing in
6280         a separate phase from function body processing.
6281         (cp_parser_template_declaration_after_export): Adjust usage of
6282         unparsed_functions_queues.
6283         (cp_parser_late_parsing_for_member): Do not handle default
6284         arguments.
6286 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
6288         PR c++/9109
6289         * parser.c (cp_parser_declarator_kind): New enum.
6290         (cp_parser_declarator): Adjust.
6291         (cp_parser_direct_declarator): Adjust. Allow for either named or
6292         abstract declarator. Prefer abstract, if possible. Allow
6293         parenthesized function name.
6294         (cp_parser_condition): Adjust cp_parser_declarator call.
6295         (cp_parser_explicit_instantiation): Likewise.
6296         (cp_parser_init_declarator): Likewise.
6297         (cp_parser_type_id): Likewise.
6298         (cp_parser_function_definition): Likewise.
6299         (cp_parser_member_declaration): Likewise.
6300         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
6301         the tentative parsing.
6302         (cp_parser_exception_declaration): Likewise.
6304 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
6306         * parser.c (cp_parser_template_parameter): Adjust call to
6307         cp_parser_parameter_declaration.
6308         (cp_parser_parameter_declaration_list): Likewise.
6309         (cp_parser_parameter_declaration): Replace
6310         greater_than_is_operator_p with template_parm_p parameter.  Do not
6311         cache tokens for template default arguments.
6313         * pt.c (retrieve_local_specialization): Use htab_find, not
6314         htab_find_with_hash.
6315         (register_local_specialization): Use htab_find_slot, not
6316         htab_find_slot_with_hash.
6317         (instantiate_decl): Pass a hash function to htab_create.
6319 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6321         * parser.c (cp_parser_binary_expression,
6322         cp_parser_multiplicative_expression,
6323         cp_parser_additive_expression, cp_parser_shift_expression,
6324         cp_parser_relational_expression, cp_parser_equality_expression,
6325         cp_parser_and_expression, cp_parser_exclusive_or_expression,
6326         cp_parser_inclusive_or_expression,
6327         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
6328         cp_parser_binary_expression): Const-ify.
6330 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
6332         * method.c (use_thunk): Disable access control while building the
6333         body of the thunk.
6335 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
6337         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
6338         front end.
6340 2003-01-03  Matt Austern  <austern@apple.com>
6342         * cp-tree.h (struct lang_type_class): add field for key method
6343         (cp_global_trees): rename dynamic_classes to keyed_classes
6344         (key_method): add definition
6345         * class.c (finish_struct_1): compute class's key method, and add
6346         the class to keyed_classes list if there is no key method.
6347         * decl.c (finish_function): add class to keyed_classes list if we
6348         see a definition of the class's key method.
6349         * pt.c (instantiate_class_template): add template specialization
6350         of a dynamic class to keyed_classes list.
6351         * decl2.c (key_method): remove
6352         (finish_file): iterate only through keyed_classes list when
6353         deciding whether to emit vtables, remove class from its list after
6354         we do the emission.
6356 2003-01-02  Jason Merrill  <jason@redhat.com>
6358         * call.c (build_conditional_expr): Stabilize lvalues properly.
6359         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
6360         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
6361         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
6363         * call.c (convert_like_real): Call decl_constant_value for an
6364         IDENTITY_CONV even if there are no more conversions.
6366         * cvt.c (build_up_reference): Don't push unnamed temps.
6368         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
6370         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
6371         for a backend struct.
6373         * except.c (wrap_cleanups_r, build_throw): Make
6374         MUST_NOT_THROW_EXPRs void.
6375         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
6377         * init.c (build_vec_delete_1): Pre-evaluate the base address.
6379         * init.c (get_temp_regvar): Simplify logic.
6381         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
6382         our replacement is a decl.
6384         * decl.c (cp_make_fname_decl): Push the decls inside the
6385         outermost scope.
6387 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
6389         PR c++/45, c++/3784
6390         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
6391         the same too.
6393 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
6395         * parser.c (struct cp_parser): Add access_checks_lists field
6396         (cp_parser_simple_declaration): Use.
6397         (cp_parser_init_declarator): Likewise.
6399 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6401         * parser.c (cp_parser_declaration): Accept the __extension__
6402         keyword before the declaration.
6404         PR c++/2843
6405         * parser.c (cp_parser_parameter_declaration): Allow attributes to
6406         appear after the declarator.
6408         * call.c (build_new_method_call): Fix typo in message format
6409         string.
6411 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
6413         * parser.c (cp_lexer_next_token_is): Declare it inline.
6414         (cp_lexer_set_source_position_from_token): Likewise.
6415         (cp_lexer_debugging_p): Likewise.
6416         (cp_parser_parsing_tentatively): Likewise.
6417         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
6418         to the cp_lexer_peek_token.
6420         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
6421         expression.
6423 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
6425         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
6426         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
6427         cp/repo.c: Fix copyright years.
6429 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
6431         * lex.c: Remove superfluous include of cpplib.h.
6432         (CONSTRAINT): Define without conditions.
6433         (init_cp_pragma): Use c_register_pragma.
6435 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
6437         * .cvsignore: Remove.
6439 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
6441         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
6442           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
6443           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
6444           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
6445           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
6446           copyright header.
6447         * lex.h: parse.y is dead, so don't mention it.  Also replace the
6448           copyright header with the default GNU copyright header.
6450 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6452         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
6453         (lookup_name_namespace_only): Likewise.
6454         (begin_only_namespace_names): Likewise.
6455         (end_only_namespace_names): Likewise.
6456         * decl.c (only_namespace_names): Remove.
6457         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
6458         (lookup_name_real): Do not check only_namespace_names.
6459         (lookup_name_namespace_only): Remove.
6460         (begin_only_namespace_names): Likewise.
6461         (end_only_namespace_names): Likewise.
6462         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
6463         nested-name-specifiers more gracefully.
6464         (cp_parser_class_or_namespace_name): Avoid looking up namespace
6465         names when they cannot possibly appear.
6466         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
6467         (cp_parser_elaborated_type_specifier): Likewise.
6468         (cp_parser_namespace_name): Only look for namespace names.
6469         (cp_parser_lookup_name): Add is_namespace parameter.
6470         (cp_parser_lookup_name_simple): Adjust call to
6471         cp_parser_lookup_name.
6473         * parser.c (cp_parser_dependent_type_p): Fix thinko.
6475 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
6477         * .cvsignore: Update.
6479 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
6481         * class.c (modify_vtable_entry): Remove unused variable.
6482         (get_vcall_index): Always expect a non-thunk.
6483         (update_vtable_entry_for_fn): Combine covariant adjustments, when
6484         overriding a thunk. Pass get_vcall_index a non-thunk.
6486         * decl2.c (finish_file): Mark undefined inlines as extern.
6488 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6490         * cp-tree.def (RETURN_INIT): Remove.
6491         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
6492         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
6493         (note_level_for_for): Remove.
6494         (note_level_for_try): Likewise.
6495         (note_level_for_catch): Likewise.
6496         (finish_named_return_value): Likewise.
6497         (do_pushlevel): Change prototype.
6498         (pending_lang_change): Remove.
6499         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
6500         sk_for.
6501         (note_level_for_for): Remove.
6502         (note_level_for_try): Likewise.
6503         (note_level_for_catch): Likewise.
6504         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
6505         * parser.c (cp_parser_context_free_list): Make it "deletable".
6506         (cp_parser_template_argument): Remove misleading comment.
6507         * pt.c (tsubst_expr): Remove RETURN_INIT code.
6508         * semantics.c (genrtl_named_return_value): Remove.
6509         (do_pushlevel): Take a scope kind as an argument.
6510         (begin_if_stmt): Adjust.
6511         (begin_while_stmt): Likewise.
6512         (begin_for_stmt): Likewise.
6513         (finish_for_init_stmt): Likewise.
6514         (begin_switch_stmt): Likewise.
6515         (begin_handler): Likewise.
6516         (begin_compound_stmt): Likewise.
6517         (finish_named_return_value): Remove.
6518         (cp_expand_stmt): Remove RETURN_INIT case.
6519         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
6521 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
6523         PR c++/9112
6524         * parser.c (cp_parser_direct_declarator): Handle erroneous
6525         parenthesized declarators correctly.
6527 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6529         * cp-tree.h (pending_lang_change): Declare.
6531 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6533         * parser.c (cp_parser_context_free_list): New variable.
6534         (cp_parser_context_new): Use it.
6535         (cp_parser_error): Check return code from
6536         cp_parser_simulate_error.
6537         (cp_parser_simulate_error): Return a value.
6538         (cp_parser_id_expression): Optimize common case.
6539         (cp_parser_class_name): Likewise.
6540         (cp_parser_class_specifier): Adjust call to
6541         cp_parser_late_parsing_default_args.
6542         (cp_parser_lookup_name): Optimize common case.
6543         (cp_parser_late_parsing_for_member): Adjust call to
6544         cp_parser_late_parsing_default_args.
6545         (cp_parser_late_parsing_default_args): Add scope parameter.
6546         (cp_parser_require): Avoid creating the error message unless it's
6547         needed.
6548         (cp_parser_parse_definitely): Place free'd contexts on the free
6549         list.
6551         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
6553 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
6555         * parser.c (cp_parser_parameter_declaration_clause): Treat system
6556         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
6558 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6560         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
6561         GCC, not GNU CC.
6563 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
6565         * parse.y: Remove.
6566         * spew.c: Likewise.
6567         * Make-lang.in (gt-cp-spew.h): Remove.
6568         * cp-tree.h (do_pending_lang_change): Remove.
6569         (do_identifier): Change prototype.
6570         (finish_id_expr): Remove.
6571         * decl.c (lookup_name_real): Remove yylex variable.
6572         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
6573         * lex.c (init_cpp_parse): Remove.
6574         (reduce_cmp): Likewise.
6575         (token_cmp): Likewise.
6576         (yychar): Likewise.
6577         (lastiddecl): Likewise.
6578         (token_count): Likewise.
6579         (reduce_count): Likewise.
6580         (yyhook): Likewise.
6581         (print_parse_statistics): Likewise.
6582         (do_pending_lang_change): Likewise.
6583         (do_identifier): Remove parsing parameter.
6584         * lex.h (lastiddecl): Remove.
6585         (looking_for_typename): Remove.
6586         (looking_for_template): Likewise.
6587         (pending_lang_change): Likewise.
6588         (yylex): Likewise.
6589         * semantics.c (finish_id_expr): Remove.
6591         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
6592         thread" correctly.
6594 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
6596         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
6597         end, not the C front end.
6599 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
6601         * cp-tree.h (THUNK_TARGET): New macro.
6602         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
6603         (finish_thunk): Remove offset parms.
6604         * class.c (find_final_overrider): Look through thunks.
6605         (get_vcall_index): Use THUNK_TARGET.
6606         (update_vtable_entry_for_fn): Look through thunks. Set covariant
6607         fixed offset here. Adjust finish_thunk call.
6608         (build_vtbl_initializer): Adjust finish_thunk calls.
6609         * mangle.c (mangle_call_offset): Remove superfluous if.
6610         (mangle_thunk): Adjust.
6611         * method.c (make_thunk): Adjust.
6612         (finish_thunk): Adjust.
6613         (thunk_adjust): Remove assert.
6614         (use_thunk): Use THUNK_TARGET
6615         * dump1.c (cp_dump_tree): Adjust thunk dumping.
6617         PR c++/9054
6618         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
6619         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
6621 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6623         Remove traditional C constructs 4/n.
6624         * decl2.c (grok_method_quals, warn_if_unknown_interface,
6625         grok_x_components, cp_build_parm_decl, build_artificial_parm,
6626         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
6627         delete_sanity, check_member_template, check_java_method,
6628         check_classfn, finish_static_data_member_decl, grokfield,
6629         grokbitfield, grokoptypename, grok_function_init,
6630         cplus_decl_attributes, constructor_name, defer_fn,
6631         build_anon_union_vars, finish_anon_union, coerce_new_type,
6632         coerce_delete_type, comdat_linkage, maybe_make_one_only,
6633         key_method, import_export_vtable, import_export_class,
6634         output_vtable_inherit, import_export_decl, import_export_tinfo,
6635         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
6636         set_guard, start_objects, finish_objects,
6637         start_static_storage_duration_function,
6638         finish_static_storage_duration_function, get_priority_info,
6639         start_static_initialization_or_destruction,
6640         finish_static_initialization_or_destruction,
6641         do_static_initialization, do_static_destruction,
6642         prune_vars_needing_no_initialization, write_out_vars,
6643         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
6644         add_using_namespace, merge_functions, ambiguous_decl,
6645         lookup_using_namespace, lookup_using_namespace,
6646         qualified_lookup_using_namespace, set_decl_namespace,
6647         decl_namespace, current_decl_namespace, push_decl_namespace,
6648         pop_decl_namespace, push_scope, pop_scope, add_function,
6649         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
6650         lookup_arg_dependent, do_namespace_alias,
6651         validate_nonmember_using_decl, do_nonmember_using_decl,
6652         do_toplevel_using_decl, do_local_using_decl,
6653         do_class_using_decl, do_using_directive, check_default_args,
6654         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
6655         * parser.c (cp_parser_class_head): Use booleanss.
6656         * decl.c (walk_globals, walk_vtables): Likewise.
6657         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
6658         walk_globals): Change return type from 'int' to 'bool'.
6659         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
6660         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
6661         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
6662         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
6663         qualifier_flags, tinfo_base_init, generic_initializer,
6664         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
6665         dfs_class_hint_unmark, class_hint_flags, class_initializer,
6666         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
6667         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
6668         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
6669         * repo.c (repo_compile_flags, repo_template_declared,
6670         repo_template_defined, repo_class_defined, repo_get_id,
6671         repo_template_used, repo_vtable_used, repo_inline_used,
6672         repo_tinfo_used, repo_template_instantiated, extract_string,
6673         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
6674         finish_repo): Likewise.
6675         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
6676         cxx_print_xnode): Likewise..
6677         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
6678         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
6679         * cxxfilt.c (demangle_it, print_demangler_list, usage,
6680         standard_symbol_characters, hp_symbol_characters, main, fatal):
6681         Likewise.
6682         (strip_underscore):  Change type from 'int' to 'bool'.
6683         (main): Use boolean constants.
6685 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6687         Remove traditional C constructs 3/n.
6688         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
6689         build_up_reference, warn_ref_binding, convert_to_reference,
6690         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
6691         convert_to_void, convert, convert_force, build_type_conversion,
6692         build_expr_type_conversion, type_promotes_to,
6693         perform_qualification_conversions): Use C90 prototyping style.
6694         * decl2.c (grok_array_decl): Use boolean constant.
6695         (delete_sanity): Likewise.
6696         * typeck.c (build_unary_op): Likewise.
6697         * semantics.c (finish_switch_cond): Likewise.
6698         * parser.c (cp_parser_direct_new_declarator): Likewise.
6699         * init.c (build_new): Likewise.
6701 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
6703         * Make-lang.in (po-generated): Remove parse.c.
6704         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
6705         ($(srcdir)/cp/parse.h): Remove target.
6706         ($(srcdir)/cp/parse.c): Likewise.
6707         (gt-cp-parse.h): Likewise.
6708         (gt-cp-parser.h): New target.
6709         (c++.distclean): Do not remove parse.output.
6710         (c++.maintainer-clean): Do not remove parse.c or parse.h.
6711         (cp/spew.o): Remove target.
6712         (cp/lex.o): Adjust dependencies.
6713         (cp/pt.o): Likewise.
6714         (cp/parse.o): Likewise.
6715         (cp/TAGS): Do not mention parse.c.
6716         (cp/parser.o): New target.
6717         * NEWS: Mention the new parser.
6718         * call.c (build_scoped_method_call): Simplify.
6719         (build_method_call): Likewise.
6720         (build_new_function_call): Adjust calls to add_function_candidate
6721         and add_template_candidate.
6722         (build_new_op): Improve handling of erroroneous operands.
6723         (convert_default_arg): Remove circular argument processing.
6724         (name_as_c_string): New function.
6725         (build_new_method_call): Use it.
6726         (perform_implicit_conversion): Use error_operand_p.
6727         * class.c (finish_struct_anon): Use constructor_name_p.
6728         (check_field_decls): Likewise.
6729         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
6730         (resolve_address_of_overloaded_function): Likewise.
6731         (instantiate_type): Tweak pointer-to-member handling.
6732         (get_primary_binfo): Remove incorrect assertion.
6733         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
6734         * cp-tree.h (DEFARG_TOKENS): New macro.
6735         (default_arg): New structure.
6736         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
6737         (lang_tree_node): Add default_arg.
6738         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
6739         (type_info_ref_type): New macro.
6740         (saved_scope): Make processing_explicit_instantiation a boolean.
6741         (check_access): New field.
6742         (unparsed_text): Remove.
6743         (language_function): Remove unparsed_inlines.
6744         (error_operand_p): New macro.
6745         (lang_decl): Adjust pending_inline_info.
6746         (DEFARG_POINTER): Remove.
6747         (tag_types): Add typenames.
6748         (lookup_ualified_name): Declare.
6749         (lookup_name_real): Likewise.
6750         (shadow_tag): Adjust prototype.
6751         (get_scope_of_declarator): Declare it.
6752         (process_next_inline): Remove it.
6753         (check_for_missing_semicolon): Likewise.
6754         (maybe_get_template_decl_from_type_decl): Declare it.
6755         (finish_label_stmt): Adjust prototype.
6756         (finish_non_static_data_meber): Declare it.
6757         (finish_pseudo_destructor_call_expr): Rename to ...
6758         (finish_pseudo_destructor_expr): ... this.
6759         (finish_compound_literal): Declare it.
6760         (begin_inline_definitions): Remove it.
6761         (init_spew): Remove.
6762         (peekyylex): Likewise.
6763         (arbitrate_lookup): Likewise.
6764         (frob_opname): Likewise.
6765         (maybe_snarf_defarg): Likewise.
6766         (add_defarg_fn): Likewise.
6767         (do_pending_defargs): Likewise.
6768         (done_pending_defargs): Likewise.
6769         (unprocessed_defarg_fn): Likewise.
6770         (replace_defarg): Likewise.
6771         (end_input): Likewise.
6772         (get_overloaded_fn): Likewise.
6773         * cvt.c (convert_to_reference): Improve error handling.
6774         * decl.c (lookup_name_real): Do not declare it static.
6775         (maybe_push_to_top_level): Set check_access.
6776         (identifier_type_value): Adjust call to lookup_name_real.
6777         (lookup_qualified_name): New method.
6778         (lookup_name_real): Remove special-case parsing code.
6779         (lookup_name-nonclass): Adjust call to lookup_name_real.
6780         (lookup_name_namespace_only): Likewise.
6781         (lookup_name): Likewise.
6782         (check_tag_decl): Return the type declared.
6783         (shadow_tag): Likewise.
6784         (register_dtor_fn): Tweak check_access.
6785         (grokfndecl): Use constructor_name_p.
6786         (get_scope_of_declarator): New function.
6787         (grokdeclarator): Obscure tweaks for slightly different declarator
6788         representations.
6789         (start_method): Return error_mark_node to indicate failure.
6790         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
6791         * decl2.c (constructor_name_full): Simplify.
6792         (constructor_name): Use it.
6793         (build_expr_from_tree): Adjust for changes to do new parser.
6794         (push_scope): Improve robustness.
6795         (validate_nonmember_using_decl): Process declarations, not names.
6796         (do_class_using_decl): Likewise.
6797         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
6798         here.
6799         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
6800         * expr.c (cxx_expand_expr): Handle BASELINKs.
6801         * init.c (member_init_ok_or_else): Issue more errors.
6802         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
6803         * lex.c: Do not include parse.h.
6804         (yypring): Do not declare.
6805         (yylval): Likewise.
6806         (make_reference_declarator): Remove error-generating code.
6807         (rid_to_yy): Remove.
6808         (cxx_init): Do not call init_spew.
6809         (yypring): Remove.
6810         (check_for_missing_semicolon): Remove.
6811         * lex.h (got_scope): Remove.
6812         (got_object): Remove.
6813         * method.c (hack_identifier): Use finish_non_static_data_member.
6814         (implicitly_declare_fn): Adjust use of constructor_name.
6815         * parser.c: New file.
6816         * pt.c (parse.h): Do not include it.
6817         (maybe_get_template_decl_from_template): Do not declare it.
6818         (finish_member_template_decl): Tweak.
6819         (begin_explicit_instantiation): Adjust for
6820         processing_explicit_instantiation being boolean.
6821         (end_explicit_instantiation): Likewise.
6822         (maybe_process_partial_specialization): Tighten specialization
6823         test.
6824         (retrieve_local_specialization): Adjust ue of hash table.
6825         (eq_local_specializations): New function.
6826         (register_local_specialization): Likewise.
6827         (push_template_decl_real): Remove unnecessary test.
6828         (maybe_get_template_decl_from_type_decl): Don't make it static.
6829         (for_each_template_parm_r): Handle TYPEOF_TYPE.
6830         (tsubst_copy): Use retrieive_local_specialization to handle
6831         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
6832         Handle COMPONENT_REFs with pseudo-destructor-expressions.
6833         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
6834         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
6835         (unify): Tweak handling of CONST_DECLs.
6836         (regenerate_decl_from_template): Use push_nested_class.
6837         (template_for_substitution): New funciton.
6838         (instantiate_decl): Use it.  Register parameters as local
6839         specializations.
6840         * rtti.c (init_rtti_processing): Set type_info_ref_type.
6841         (build_typeid): Use it.
6842         (get_typeid): Likeise.
6843         * search.c (accessible_p): Use check_access, not
6844         flag_access_control.
6845         (adjust_result_of_qualified_name_lookup): Pay attention to the
6846         context_class.
6847         * semantics.c (finish_asm_stmt): Adjust error handling.
6848         (finish_label_stmt): Return the statement.
6849         (finish_non_static_data_member): New function.
6850         (finish_class_expr): Handle BASELINKs.
6851         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
6852         (finish_object_call_expr): Simplify handling during templates.
6853         (finish_pseudo_destructor_call_expr): Rename to ...
6854         (finish_pseudo_dtor_expr): ... this.
6855         (finish_compound_literal): New function.
6856         (begin_inline_definitions): Remove.
6857         (finish_sizeof): Remove special template handling.
6858         * spew.c: Do not include parse.h.
6859         * tree.c (get_overloaded_fn): Remove.
6860         * typeck.c (build_class_member_access_expr): Handle
6861         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
6862         (lookup_destructor): New function.
6863         (finish_class_member_access_expr): Use it.
6864         (convert_arguments): Simplify.
6865         (build_unary_op): Handle BASELINKs.
6867 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
6869         PR c++/4803
6870         * decl2.c (mark_used): Defer inline functions.
6871         (finish_file): Merge deferred_fns loops. Check all used
6872         inline functions have a definition.
6873         * method.c (make_thunk): Thunks are not inline.
6875         PR c++/5116, c++/764
6876         * call.c (build_new_op): Make sure template class operands are
6877         instantiated.
6879 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
6881         PR C++/7964
6882         * cp-tree.h (resolve_scoped_fn_name): Prototype.
6883         * call.c (resolve_scoped_fn_name): New function. Deal with
6884         more template expansion. Broken out of ...
6885         * parse.y (parse_finish_call_expr): ... here. Call it.
6886         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
6887         resolve_scoped_fn_name and build_call_from_tree.
6889         PR c++/9053
6890         * decl.c (duplicate_decls): Templates may be disambiguated by
6891         return type.
6893         PR c++/8702
6894         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
6895         conversion operators on failure.
6897 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6899         Remove traditional C constructs 2/n.
6900         * call.c (tourney, build_field_call, equal_functions, joust,
6901         compare_ics, build_over_call, build_java_interface_fn_ref,
6902         convert_like_real, op_error, build_object_call, resolve_args,
6903         build_vfield_ref, check_dtor_name, build_scoped_method_call,
6904         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
6905         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
6906         standard_conversion, reference_related_p,
6907         reference_compatible_p, convert_class_to_reference,
6908         direct_reference_binding, reference_binding,
6909         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
6910         add_template_conv_candidate, any_viable, any_strictly_viable,
6911         build_this, splice_viable, print_z_candidates,
6912         build_user_type_conversion, build_new_function_call,
6913         conditional_conversion, build_conditional_expr, build_new_op,
6914         build_op_delete_call, enforce_access, call_builtin_trap,
6915         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
6916         convert_default_arg, type_passed_as, convert_for_arg_passing,
6917         in_charge_arg_for_name, is_properly_derived_from,
6918         maybe_handle_implicit_object, maybe_handle_ref_bind,
6919         source_type, add_warning, can_convert, can_convert_arg,
6920         perform_implicit_conversion, can_convert_arg_bad,
6921         initialize_reference, add_conv_candidate,
6922         add_template_candidate_real, add_template_candidate): Ansify.
6924 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
6926         PR c++/8572
6927         * cp-tree.h (grokoptypename): Add SCOPE parameter.
6928         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
6929         if in a template scope.
6930         * parse.y (unoperator): Return the scope.
6931         (operator_name): Adjust grokoptypename call.
6933 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6935         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
6936         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
6937         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
6939 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6941         * ChangeLog: Fix a typo.
6942         * class.c: Fix comment typos.
6943         * cp-tree.h: Likewise.
6945 2002-12-18  Jason Merrill  <jason@redhat.com>
6947         Handle anonymous unions at the tree level.
6948         C++ ABI change: Mangle anonymous unions using the name of their
6949         first named field (by depth-first search).  Should not cause
6950         binary compatibility problems, though, as the compiler previously
6951         didn't emit anything for affected unions.
6952         * cp-tree.def (ALIAS_DECL): New tree code.
6953         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
6954         first field, not the largest.
6955         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
6956         push the decl, and write it out at namespace scope.
6957         * decl.c (lookup_name_real): See through an ALIAS_DECL.
6958         (pushdecl): Add namespace bindings for ALIAS_DECLs.
6959         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
6960         of a decl which doesn't have one.
6961         * typeck.c (build_class_member_access_expr): Don't recurse if
6962         we already have the type we want.
6964 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6966         PR c++/8099
6967         * friend.c (make_friend_class): Allow partial specialization
6968         when declaration is not a template friend.
6970 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6972         PR c++/3663
6973         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
6974         TREE_PROTECTED to created decl nodes.
6976 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
6978         * class.c (build_base_field): Do not set DECL_PACKED on the
6979         FIELD_DECL.
6981 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6983         * cp-tree.h (struct tree_srcloc): Use location_t.
6984         (SOURCE_LOCUS): New.
6985         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
6987 2002-12-17  Jason Merrill  <jason@redhat.com>
6989         * decl.c (finish_function): Also complain about no return in
6990         templates.
6991         * semantics.c (finish_return_stmt): Also call check_return_expr in
6992         templates.
6993         * typeck.c (check_return_expr): In a template, just remember that we
6994         saw a return.
6996 2002-12-16  Jason Merrill  <jason@redhat.com>
6998         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
6999         of the CALL_EXPR.
7001         * semantics.c (do_pushlevel): Call pushlevel after adding the
7002         SCOPE_STMT.
7003         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
7004         * parse.y (function_body): Go back to using compstmt.
7005         * decl.c (pushdecl): Skip another level to get to the parms level.
7007         * call.c (build_new_method_call): Use is_dummy_object to determine
7008         whether or not to evaluate the object parameter to a static member
7009         function.
7011 2002-12-14  Jason Merrill  <jason@redhat.com>
7013         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
7014         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
7015         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
7016         don't bother with an AGGR_INIT_EXPR.
7017         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
7018         just generate a new decl normally.  Take return slot parm.
7019         * cp-tree.h: Adjust prototype.
7021 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7023         PR C++/8031
7024         * cvt.c (convert_to_pointer_force): Don't try comparing against
7025         erronous type.
7027 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
7029         * cp-tree.h: Have the multiple-include guards around
7030         the entire file.
7032 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
7034         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
7035         for SPEW_DEBUG.
7036         (snarf_method): Same.
7037         (snarf_defarg): Same.
7039 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
7041         PR c++/8372
7042         * pt.c (tsubst_copy): Handle destructor names more correctly.
7044 2002-12-10  Matt Austern   <austern@apple.com>
7046         * cp-tree.h: get rid of needs_virtual_reinit bit.
7048 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
7050         * NEWS: Document removal of in-class initialization extension for
7051         static data members of non-arithmetic, non-enumeration type.
7052         * decl.c (check_static_variable_definition): Do not allow that
7053         extension.
7054         * decl2.c (grokfield): Do not call digest_init when processing
7055         templates.
7057 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7059         * error.c (dump_expr): Fix format specifier warning.
7061 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
7063         * class.c (finish_struct_1): Correct comment.
7064         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
7066 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7068         PR C++/8799
7069         * error.c (dump_expr): Don't ever try to dump a non-existent
7070         expression.
7072 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
7074         Implement covariant returns.
7075         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
7076         (struct lang_decl_flags): Add this_thunk_p flag.
7077         Rename vcall_offset to virtual_offset.
7078         (struct lang_decl): Rename delta to fixed_offset.
7079         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
7080         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
7081         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
7082         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
7083         (make_thunk): Add this_adjusting arg.
7084         (finish_thunk): Declare.
7085         (mangle_thunk): Add this_adjusting arg.
7086         * class.c (get_vcall_index): Use base function for lookup.
7087         (update_vtable_entry_for_fn): Generate covariant thunk.
7088         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
7089         (build_vtbl_initializer): Use base function for lookup.
7090         Finish covariant thunk here. Adjust thunk generation.
7091         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
7092         Adjust thunk dumping.
7093         * mangle.c (mangle_call_offset): New function.
7094         (mangle_thunk): Adjust for covariant thunks.
7095         * method.c (make_thunk): Adjust. Do not set name here.
7096         (finish_thunk): New function. Set name here.
7097         (use_thunk): Generate covariant thunks too.
7098         (thunk_adjust): New function.
7099         * search.c (covariant_return_p): Remove. Fold into ...
7100         (check_final_overrider): ... here. Simplify.
7101         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
7103 2002-12-03  Jason Merrill  <jason@redhat.com>
7105         PR c++/8674
7106         * call.c (build_over_call): Check specifically for TARGET_EXPR
7107         when eliding.
7109         PR c++/8461, c++/8625
7110         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
7111         (cp_convert_parm_for_inlining): Remove.
7112         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7113         Remove.
7114         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
7115         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
7117         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
7118         an ambiguous conversion.
7120 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
7122         PR c++/8688
7123         * decl.c (reshape_init): Handle erroneous initializers.
7125 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
7127         PR c++/8720
7128         * spew.c (remove_last_token): Make sure that last_chunk is set
7129         correctly.
7131         PR c++/8615
7132         * error.c (dump_expr): Handle character constants with
7133         TREE_OVERFLOW set.
7135 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7137         DR 180
7138         * decl.c (grokdeclarator): Require class-key for all friend class.
7139         Output the correct type and context in the error message.
7141 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
7143         PR c++/5919
7144         * pt.c (unify): Use variably_modified_type_p to test validity of
7145         template argument types.
7147         PR c++/8727
7148         * cp-tree.h (lang_type_class): Add typeinfo_var.
7149         (CLASSTYPE_TYPEINFO_VAR): New macro.
7150         * rtti.c (get_tinfo_decl): Use it.
7152         PR c++/8663
7153         * init.c (expand_member_init): Always get the main variant of a
7154         base class.
7156 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
7158         PR c++/8332
7159         PR c++/8493
7160         * decl.c (cxx_init_decl_processing): Use size_type_node, not
7161         c_size_type_node.
7162         * decl2.c (coerce_new_type): Likewise.
7163         * except.c (do_allocate_exception): Likewise.
7165 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
7167         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
7168         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
7169         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
7170         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
7171         typeck2.c: Include coretypes.h and tm.h.
7172         * Make-lang.in: Update dependencies.
7174 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
7176         PR c++/8227
7177         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
7178         (check_initializer): Validate the type of the initialized
7179         variable, even if the initializer is absent.
7180         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
7182         PR c++/8214
7183         * typeck.c (convert_for_assignment): Do not use
7184         decl_constant_value on the operand.
7186         PR c++/8511
7187         * pt.c (instantiate_decl): Handle template friends defined outside
7188         of the class correctly.
7190 2002-11-29  Joe Buck <jbuck@synopsys.com>
7192         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
7193         anonymous structs.
7195 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
7197         * class.c (walk_subobject_offsets): Recur on binfos as well as on
7198         types.
7199         (layout_nonempty_base_or_field): Pass it a binfo when processing a
7200         base class.
7201         (layout_empty_base): Likewise.
7202         (build_base_field): Likewise.
7204 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
7206         * class.c (build_base_field): Make sure we get the canonical base
7207         when descending through primary bases.
7209 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
7211         * decl.c (check_initializer): Don't error on initialisation of
7212         a scalar with a brace-enclosed expression.
7214 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
7216         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
7217         (template_parms_equal): Remove prototype.
7218         * typeck.c (buuld_indirect_ref): Reformat.
7220 2002-11-25  Jason Merrill  <jason@redhat.com>
7222         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
7223         and a DO_STMT.
7225 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
7227         * tree.c (cp_build_qualified_type_real): Correct handling of
7228         array types.
7229         * class.c (walk_subobject_offsets): Fix thinko.
7230         (build_base_field): Record offsets of empty bases in primary
7231         virtual bases.
7232         (layout_class_type): Record offsets of empty bases in fields.
7234         * search.c (is_subobject_of_p_1): Fix thinko.
7235         (lookup_field_queue_p): Likewise.
7237 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
7239         * class.c (layout_class_type): Reuse tail padding when laying out
7240         virtual bases.
7242 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
7244         * rtti.c (qualifier_flags): Fix thinko.
7246 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7248         Remove traditional C constructs 1/n.
7249         * cp-tree.h (init_method, set_mangled_name_for_decl,
7250         build_opfncall, hack_identifier, make_thunk, use_thunk,
7251         synthesize_method, implicitly_declare_fn,
7252         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
7253         maybe_clone_body): Remove use of PARAMS.
7255         * method.c (do_build_assign_ref, do_build_copy_constructor,
7256         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
7257         Likewise.
7258         (synthesize_method): Use 'bool' type and constants instead of
7259         'int'.
7260         (locate_copy): Likewise.
7261         (implicitly_declare_fn): Likewise.
7263         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
7264         Remove old-style declaration.
7265         (maybe_clone_body): Use 'bool' type and constants.
7267 2002-11-21  Glen Nakamura  <glen@imodulo.com>
7269         PR c++/8342
7270         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
7271         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
7272         of the branches of a COND_EXPR.
7274 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
7276         * pt.c (for_each_template_parm): Free allocated memory.
7277         * search.c (is_subobject_of_p_1): New function.
7278         (is_subobject_of_p): Avoid walking virtual bases multiple times.
7280 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
7282         * g++spec.c (lang_specific_spec_functions): New.
7284 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
7286         * ChangeLog: Follow spelling conventions.
7287         * class.c: Likewise.
7288         * decl2.c: Likewise.
7290 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
7292         * search.c (dfs_push_decls): Do not try to reorder elements
7293         3..n of method_vec if method_vec has only two elements.
7294         Reverse order of two tests to avoid accessing unallocated
7295         memory.
7297 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
7299         * class.c (dfs_find_final_overrider): Adjust so that the most
7300         derived object is a binfo, rather than a class type.
7301         (find_final_overrider): Likewise.
7302         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
7303         (add_vcall_offset): Likewise.
7305 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7307         PR c++/8389
7308         * pt.c (instantiate_template): Push class scope for member
7309         functions.
7310         (get_mostly_instantiated_function_type): Likewise.  Don't call
7311         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
7312         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
7313         * mangle.c (write_encoding, write_unqualified_name): Adjust.
7315 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
7317         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
7318         vcall offfsets.  Split out ...
7319         (add_vcall_offset): ... new function.
7321         PR c++/8338
7322         * pt.c (for_each_template_parm): Add htab parameter.
7323         (process_partial_specialization): Adjust call.
7324         (push_template_decl_real): Likewise.
7325         (pair_fn_data): Add visited.
7326         (for_each_template_parm_r): Avoid walking duplicates more than
7327         once.
7328         (uses_template_parms): Adjust call to for_each_template_parm.
7330 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
7332         * class.c (add_implicitly_declared_members): Put implicitly
7333         declared functions at the end of TYPE_METHODs when -fabi-version
7334         is at least 2.
7336 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
7338         * decl2.c (finish_file): Correct spelling.
7340 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
7342         * call.c (build_special_member_call): Do not try to lookup VTTs by
7343         name.
7344         * class.c (vtbl_init_data): Add generate_vcall_entries.
7345         (get_vtable_decl): Do not look up virtual tables by name.
7346         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
7347         (set_primary_base): Do not set CLASSTYPE_RTTI.
7348         (determine_primary_base): Likewise.
7349         (get_matching_virtual): Remove.
7350         (get_vcall_index): New function.
7351         (update_vtable_entry_for_fn): Do not try to use virtual thunks
7352         when they are not required.  Assign vcall indices at this point.
7353         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
7354         Do update dynamic_classes.
7355         (build_vtt): Do not add VTTs to the symbol table.
7356         (build_ctor_vtbl_group): Likewise.
7357         (build_vtbl_initializer): Simplify handling of vcall indices.
7358         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
7359         for the most derived class.
7360         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
7361         the vtable.
7362         * cp-tree.h (dynamic_classes): New macro.
7363         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
7364         (CLASSTYPE_RTTI): Remove.
7365         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
7366         (CLASSTYPE_VCALL_INDICES): New macro.
7367         (CLASSTYPE_VTABLES): Likewise.
7368         (BV_USE_VCALL_INDEX_P): Remove.
7369         (build_vtable_path): Remove.
7370         * decl2.c (finish_vtable_vardecl): Remove.
7371         (key_method): Remove #if 0'd code.
7372         (finish_vtable_vardecl): Rename to ...
7373         (maybe_emit_vtables): ... this.
7374         (finish_file): Use it.
7375         * search.c (look_for_overrides_here): Update comment.
7377 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
7379         PR c/7353 redux
7380         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
7382 2002-10-30  Jason Merrill  <jason@redhat.com>
7384         PR c++/8186
7385         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
7386         * call.c (convert_for_arg_passing): Set it.
7387         * except.c (stabilize_throw_expr): Recurse for such an arg.
7389 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
7391         * cp-tree.h (lang_decl_flags): Remove init_priority.
7392         (lang_decl): Add delta.
7393         (GLOBAL_INIT_PRIORITY): Remove.
7394         (THUNK_DELTA): Revise definition.
7395         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
7396         * dump.c (cp_dump_tree): Don't dump it.
7398 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
7400         PR c++/8160
7401         * typeck2.c (process_init_constructor): Call complete_array_type.
7403         PR c++/8149
7404         * decl.c (make_typename_type): Issue errors about invalid results.
7406 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7408         Core issue 287, PR c++/7639
7409         * cp-tree.h (lang_type_class): Add decl_list field.
7410         (CLASSTYPE_DECL_LIST): New macro.
7411         (maybe_add_class_template_decl_list): Add declaration.
7412         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
7413         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
7414         (maybe_add_class_template_decl_list): New function.
7415         (add_implicitly_declared_members): Use it.
7416         * decl.c (maybe_process_template_type_declaration): Likewise.
7417         (pushtag): Likewise.
7418         * friend.c (add_friend): Likewise.
7419         (make_friend_class): Likewise.
7420         * semantics.c (finish_member_declaration): Likewise.
7421         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
7422         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
7423         to process members and friends in the order of declaration.
7425 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
7427         PR c++/8287
7428         * decl.c (finish_destructor_body): Create the label to jump to
7429         when returning from a destructor here.
7430         (finish_function_body): Rather than here.
7432 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
7434         PR c++/7266
7435         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
7436         SCOPE_REF is not null before dereferencing it.
7438 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
7440         * call.c (build_over_call): Use DECL_CONTEXT, not
7441         DECL_VIRTUAL_CONTEXT.
7442         * class.c (modify_vtable_entry): Don't mess with
7443         DECL_VIRTUAL_CONTEXT.
7444         (set_vindex): Remove.
7445         (set_primary_base): Remove vfuns_p parameter.
7446         (determine_primary_base): Likewise.
7447         (modify_all_vtables): Likewise.
7448         (layout_class_type): Likewise.  Adjust calls to other functions
7449         accordingly.
7450         (finish_struct_1): Adjust calls to modified functions.  Set
7451         DECL_VINDEX here.
7452         * cp-tree.h (lang_type_class): Remove vsize.
7453         (CLASSTYPE_VSIZE): Remove.
7454         (lang_decl): Remove thunks.
7455         (DECL_THUNKS): Adjust.
7456         (DECL_VIRTUAL_CONTEXT): Remove.
7457         (duplicate_decls): Don't copy it.
7458         * pt.c (build_template_decl): Don't set it.
7459         (tsubst_decl): Likewise.
7460         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
7462         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
7463         (build_vtable_entry): Remove.
7464         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
7465         (lang_decl): Add thunks.
7466         (DECL_THUNKS): New macro.
7467         * decl.c (duplicate_decls): Copy it.
7468         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
7469         * semantics.c (emit_associated_thunks): Simplify.
7471 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
7473         PR c++/7228
7474         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
7475         lang_type structure exists before accessing field.
7476         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
7477         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
7478         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
7479         * class.c (check_field_decls): Use new macros.
7480         * typeck2.c (process_init_constructor): Remove redundant check for
7481         existence of lang_type structure.
7483 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
7485         * class.c (end_of_base): New method.
7486         (end_of_class): Use it.  Check indirect virtual bases.
7488         * class.c (check_field_decls): Fix typo.
7490 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
7492         PR c++/8067
7493         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
7494         related variables.
7496         PR c++/7679
7497         * spew.c (next_token): Do not return an endless stream of
7498         END_OF_SAVED_INPUT tokens.
7499         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
7500         the cached token stream.
7501         (snarf_defarg): Likewise.
7503 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
7505         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
7506         variably_modified_type_p.
7507         * cp-tree.h: Remove prototype of variably_modified_type_p.
7508         * tree.c (variably_modified_type_p): Remove; now implemented
7509         in language-independent code.
7511 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
7513         PR c++/6579
7514         * spew.c (snarf_parenthesized_expression): New function.
7515         (snarf_block): Use it.
7517 2002-10-22  Richard Henderson  <rth@redhat.com>
7519         * method.c (use_thunk): Always compute vcall_value; assert that
7520         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
7521         for vcall thunks as well.
7523 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
7525         * class.c (empty_base_at_nonzero_offset_p): New function.
7526         (layout_nonempty_base_or_field): Do not check for conflicts when
7527         laying out a virtual base using the GCC 3.2 ABI.
7528         (build_base_field): Correct checking for presence of empty classes
7529         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
7531         * class.c (include_empty_classes): Use normalize_rli.
7532         (layout_class_type): Likewise.
7534         * decl.c (reshape_init): Tweak handling of character arrays.
7536         PR c++/8218
7537         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
7538         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
7539         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
7540         (check_field_decls): Likewise.
7541         (layout_class_type): Likewise.
7542         (finish_struct_1): Initialize it.
7543         (walk_subobject_offsets): Use it to prune searches.
7545 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
7547         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
7548         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
7549         TARGET_ASM_OUTPUT_MI_THUNK in comments.
7551 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
7553         * decl.c (start_decl): Point users of the old initialized-
7554         typedef extension at __typeof__.
7556 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7558         * Make-lang.in (method.o): Depend on TARGET_H.
7559         * method.c (target.h): Include it.
7560         (use_thunk): Use target hooks.  Use vcall thunks, if available.
7562 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7564         * class.c (base_derived_from): Make sure return value is a bool.
7566 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
7568         * class.c (find_final_overrider_data_s): Remove overriding_fn and
7569         overriding_base.
7570         (dfs_base_derived_from): New function.
7571         (base_derived_from): Likewise.
7572         (dfs_find_final_overrider): Use base_derived_from.
7573         (find_final_overrider): Adjust.
7575 2002-10-18  Jason Merrill  <jason@redhat.com>
7577         PR c++/8080
7578         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
7579         with condition decls in a template.
7581 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
7583         * class.c (add_method): Compare template parms too.
7585 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
7587         PR c++/7584
7588         * class.c (handle_using_decl): Allow the declaration used to be
7589         from an ambiguous base.
7591         * pt.c (convert_template_argument): Revert this change:
7592                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7593                 * pt.c (convert_template_argument): Do not fold non-type
7594                 template rguments when inside a template.
7596         * init.c (expand_default_init): Handle brace-enclosed initializers
7597         correctly.
7599 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7601         * mangle.c (write_expression): Correct handling of enumeration
7602         constants.
7603         (write_template_arg): Likewise.
7604         * pt.c (convert_template_argument): Do not fold non-type template
7605         arguments when inside a template.
7607         PR c++/7478
7608         * cvt.c (convert_to_reference): Allow references as the incoming
7609         type.
7611 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
7613         PR c++/7524
7614         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
7615         build_qualified_type.
7617 2002-10-15  Richard Henderson  <rth@redhat.com>
7619         * error.c (dump_expr): Use real_to_decimal directly, and with
7620         the new arguments.
7622 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
7624         * decl.c (reshape_init): Fix typo.
7626         * cp-tree.h (operator_name_info_t): Add arity.
7627         * lex.c (init_operators): Initialize it.
7628         * mangle.c (write_conversion_operator_name): New function.
7629         (write_unqualified_name): Use it.
7630         (write_template_args): Accept template arguments as a TREE_LIST.
7631         (write_expression): Adjust handling of qualified names to match
7632         specification.
7634 2002-10-15  Jason Merrill  <jason@redhat.com>
7636         * call.c (call_builtin_trap): New fn.
7637         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
7638         (build_call): Don't set current_function_returns_abnormally outside
7639         a function.
7641 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7643         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
7644         clear CLASSTYPE_EMPTY_P.
7645         (build_base_field): Likewise.
7646         (build_base_fields): Likewise.
7647         (check_bases_and_members): Likewise.
7648         (create_vtbl_ptr): Likewise.
7649         (layout_class_type): Likewise.  Ensure that empty classes have
7650         size zero when used as base classes in the 3.2 ABI.
7651         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
7652         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
7653         parameter.
7654         (is_empty_class): Correct definition when using post-3.2 ABI.
7655         * cp-tree.h (lang_type_class): Add empty_p.
7656         (CLASSTYPE_EMPTY_P): New macro.
7658 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
7660         * init.c (build_delete): Do not apply save_expr for arrays.
7661         (build_vec_delete): Likewise.
7663 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
7665         * decl.c (layout_var_decl): Call layout_decl even for variables
7666         whose type is an array with unspecified bounds.
7668         PR c++/7176
7669         * lex.c (do_identifier): Add another option for the parsing
7670         parameter.
7671         * parse.y (do_id): Use it.
7673 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7675         PRs C++/6803, C++/7721 and C++/7803
7676         * decl.c (grokdeclarator): Gracefully handle template-name as
7677         decl-specifier.
7679 2002-10-11  Jason Molenda  <jmolenda@apple.com>
7681         * init.c (build_field_list): Provide uses_unions_p with a default
7682         value.
7684 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
7686         PR c++/5661
7687         * cp-tree.h (variably_modified_type_p): New function.
7688         (grokdeclarator) Tighten check for variably modified types as
7689         fields.
7690         * pt.c (convert_template_argument): Do not allow variably modified
7691         types as template arguments.
7692         * tree.c (variably_modified_type_p): New function.
7694         * NEWS: Document removal of "new X = ..." extension.
7695         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
7696         brace-enclosed initializers.
7697         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
7698         (initialize_local_var): Remove declaration.
7699         (expand_static_init): Likewise.
7700         * decl.c (next_initializable_field): New function.
7701         (reshape_init): Likewise.
7702         (check_initializer): Use them.  Build dynamic initializer for
7703         aggregates here too.
7704         (initialize_local_var): Simplify, and incorporate cleanup
7705         insertion code as well.
7706         (destroy_local_var): Remove.
7707         (cp_finish_decl): Tidy.
7708         (expand_static_init): Fold checks for whether or not a variable
7709         needs initialization into this function.  Simplify.
7710         * decl2.c (do_static_initialization): Simplify.
7711         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
7712         be done for us automatically.
7713         (expand_default_init): Handle brace-enclosed initializers
7714         correctly.
7715         (expand_aggr_init_1): Remove RTL-generation code.
7716         (build_vec_init): Remove "new X = ..." support.
7717         * parse.y (new_initializer): Likewise.
7718         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
7719         brace-enclosed initializer.
7720         (create_pseudo_type_info): Likewise.
7721         * typeck2.c (store_init_value): Don't try to handle digest_init
7722         being called more than once.
7723         (digest_init): Tidy handling of brace-enclosed initializers.
7725 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7727         * decl.c (typename_hash): Use htab_hash_pointer.
7729 2002-10-10  Jim Wilson  <wilson@redhat.com>
7731         * decl.c (duplicate_decls): Don't call decl_attributes.
7733 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
7735         PR c/7353
7736         * decl.c (start_decl): Unconditionally issue error for
7737         'typedef foo = bar'.
7738         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
7739         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
7741 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7743         * decl2.c (prune_vtable_vardecl): Delete unused function.
7745 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7747         PR c++/7754
7748         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7749         procesing template functions.
7750         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7751         type. Call layout_decl.
7752         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7754 2002-10-07  Richard Henderson  <rth@redhat.com>
7756         * decl2.c, pt.c: Revert c++/7754 fix.
7758 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7760         PR c++/7804
7761         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
7763 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7765         PR c++/7931
7766         * pt.c (for_each_template_parm_r): Handle BASELINKs.
7768         PR c++/7754
7769         * decl2.c (finish_anon_union): Do not expand anonymous unions when
7770         procesing template functions.
7771         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
7772         type. Call layout_decl.
7773         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
7775 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
7777         PR c++/8006
7778         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
7779         template parameters.
7780         (globals): Add entity and need_abi_warning.
7781         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
7782         CLASSTYPE_TEMPLATE_INFO.
7783         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
7784         TYPE_TI_TEMPLATE.
7785         (write_prefix): Handle typename types correctly.
7786         (write_template_prefix): Handle template template parameters
7787         correctly.
7788         (start_mangling): Add entity parameter.
7789         (finish_mangling): Warn about names whose mangling will change.
7790         (mangle_decl_string): Adjust.
7791         (mangle_type_string): Likewise.
7792         (mangle_special_for_type): Likewise.
7793         (mangle_ctor_vtbl_for_type): Likewise.
7794         (mangle_thunk): Likewise.
7795         (mangle_guard_variable): Likewise.
7796         (mangle_ref_init_variable): Likewise.
7798 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
7800         PR c++/7188.
7801         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
7802         * cp-tree.h (emit_base_init): Rename to ....
7803         (emit_mem_initializers): ... this.
7804         (expand_member_init): Change prototype.
7805         * init.c (perform_member_init): Compute explicit, rather than
7806         requiring it as a parameter.
7807         (sort_member_init): Rename to ...
7808         (sort_mem_initializers): ... this.  Process bases and data members
7809         together.
7810         (sort_base_init): Remove.
7811         (emit_base_init): Rename to ...
7812         (emit_mem_initializers): ... this.
7813         (expand_aggr_vbase_init_1): Remove.
7814         (construct_virtual_bases): Rename to ...
7815         (construct_virtual_base): ... this.
7816         (expand_member_init): Rework handling of base initializers.
7817         * method.c (do_build_copy_constructor): Use
7818         finish_mem_initializers.
7819         * parse.y (member_init): Adjust calls to expand_member_init.
7820         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
7821         (tsubst_initializer_list): Use expand_member_init.
7822         * semantics.c (finish_mem_intiailizers): Simplify.
7824 2002-10-02  Matt Austern  <austern@apple.com>
7825         * decl.c (walk_vtables_r): Fixed typo that caused result to
7826         never get a nonzero value.
7828 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7830         PR optimization/6627
7831         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
7832         from here, and move it to tree.h.
7833         * decl.c (cxx_init_decl_processing): If storing the vbit
7834         in function pointers, ensure that force_align_functions_log
7835         is atleast one.
7837 2002-10-02  Matt Austern  <austern@apple.com>
7839         * class.c (check_field_decls): Changed warning about const member
7840         variables so that it doesn't get issued for a class aggregate.
7842 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7844         * decl.c (cp_finish_decl): Make sure array types are laid out,
7845         even if the array bounds are unknown.
7847 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
7849         * class.c (build_vtbl_initializer): Change build_c_cast
7850         to build1.
7852 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
7854         * decl.c (cp_finish_decl): Make sure array types are laid out,
7855         even if the array bounds are unknown.
7857         * decl.c (cp_finish_decl): Correct check for dynamic
7858         initialization of thread-local storage.
7860 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
7862         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
7863         overloaded.
7865 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
7867         * class.c (build_vtbl_initializer): Add cast.
7868         (add_vcall_offset_vtbl_entries_1):
7869         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
7871 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
7873         * class.c (walk_subobject_offsets): Correct the calculation of
7874         offsets for virtual bases.  Correct the counting of array
7875         elements.
7876         (layout_nonempty_base_or_field): Simplify.  Correct the
7877         calculation of offsets to be propagated through the binfo
7878         hierarchy.
7879         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
7880         Add the FIELD_DECL to TYPE_FIELDS.
7881         (build_base_fields): Adjust accordingly.
7882         (layout_virtual_bases): Use build_base_field.
7883         (end_of_class): Return a tree, not an integer.
7884         (warn_about_ambiguous_direct_bases): Rename to ...
7885         (warn_about_ambiguous_bases): ... this.
7886         (include_empty_classes): New function.
7887         (layout_class_type): Create an alternative version of the type to
7888         be used when as a base class type.  Do not call
7889         finish_record_layout until we are done laying out the class.
7890         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
7891         as_base.
7892         (CLASSTYPE_SIZE): Reimplement.
7893         (CLASSTYPE_SIZE_UNIT): Likewise.
7894         (CLASSTYPE_ALIGN): Likweise.
7895         (CLASSTYPE_USER_ALIGN): Likewise.
7896         (CLASSTYPE_AS_BASE): New macro.
7897         (DECL_INITIALIZED_P): Likewise.
7898         (extract_init): Remove prototype.
7899         (build_forced_zero_init): Rename to ...
7900         (build_zero_init): ... this.
7901         (force_store_init_value): Remove.
7902         * decl.c (obscure_complex_init): Remove.
7903         (duplicate_decls): Copy DECL_INITIALIZED_P.
7904         (check_initializer): Do not leave junk in DECL_INITIAL.
7905         (cp_finish_decl): Handle zero-initialization of entities with
7906         static storage duration.
7907         * expr.c (extract_init): Remove.
7908         * init.c (build_forced_zero_init): Remove.
7909         (build_zero_init): New function.
7910         (build_default_init): Use it.
7911         (build_field_list): Skip FIELD_DECLs for base subobjects.
7912         (push_base_cleanups): Likewise.
7913         * method.c (do_build_assign_ref): Likewise.
7914         (synthesize_exception_spec): Likewise.
7915         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
7916         (regenerate_decl_from_template): To not set DECL_INITIAL for a
7917         static data member whose initialization took place in its class.
7918         (instantiate_decl): Do not pass an initializer to cp_finish_decl
7919         in that situation.
7920         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
7921         (dfs_unuse_fields): Likewise.
7922         * tree.c (pod_type_p): Handle error_mark_node.
7923         (zero_init_p): Likewise.
7924         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
7925         subobjects.
7926         * typeck2.c (store_init_value): Remove #if 0'd code.
7927         (force_store_init_value): Remove.
7928         (process_init_constructor): Use build_zero_init.
7930 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
7932         PR c++/7788
7933         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
7935 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
7937         * cp-tree.h: Fix comment typos.
7938         * decl.c: Likewise.
7939         * pt.c: Likewise.
7941 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
7943         * cp/class.c (contains_empty_class_p): New method.
7944         (walk_subobject_offsets): Correct computation of field offset.
7945         (layout_empty_base): Correct placement of emtpy base classes.
7946         (layout_class_type): Warn about ABI changes.
7948 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
7950         * cp/class.c (layout_virtual_bases): Do not round the size of the
7951         type to a multiple of the alignment before laying out virtual bases.
7952         (layout_class_type): Correct handling of bit-fields that are wider
7953         than their type inside unions.  Round the size of the type to a
7954         even number of bytes when computing the size without virtual
7955         bases.
7956         * cp/cp-tree.h (abi_version_at_least): New macro.
7958 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
7960         * ChangeLog: Follow spelling conventions.
7961         * ChangeLog.2: Likewise.
7962         * call.c: Likewise.
7963         * class.c: Likewise.
7964         * cp-tree.h: Likewise.
7965         * cvt.c: Likewise.
7966         * decl.c: Likewise.
7967         * decl2.c: Likewise.
7968         * except.c: Likewise.
7969         * friend.c: Likewise.
7970         * g++spec.c: Likewise.
7971         * init.c: Likewise.
7972         * lex.c: Likewise.
7973         * mangle.c: Likewise.
7974         * method.c: Likewise.
7975         * operators.def: Likewise.
7976         * optimize.c: Likewise.
7977         * pt.c: Likewise.
7978         * rtti.c: Likewise.
7979         * search.c: Likewise.
7980         * semantics.c: Likewise.
7981         * spew.c: Likewise.
7982         * tree.c: Likewise.
7983         * typeck.c: Likewise.
7985 2002-09-18  Devang Patel  <dpatel@apple.com>
7987         * cp/cp-tree.h: New prototype for walk_vtabls().
7988         * cp/decl.c (walk_vtables_r): New function.
7989         (struct cp_binding_level): Add new members, namespaces,
7990         names_size and vtables.
7991         (add_decl_to_level): Add decl in namespaces or vtables
7992         chain, if conditions match.
7993         (walk_vtables): New function.
7994         (walk_namespaces_r): Travers separate namespace chain
7995         for namespace decls.
7996         (wrapup_globals_for_namespace): Use names_size instead
7997         of list_length().
7998         * cp/decl2.c (finish_file): Use walk_vtables() instead of
7999         walk_globals() to walk vtable decls.
8001 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
8003         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
8004         ICE with invalid pointers & references.
8006 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
8008         * Make-lang.in: Remove all references to the demangler.
8009         * cxxfilt.c: Moved to binutils.
8011 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
8013         PR c++/7718
8014         * pt.c (tsubst_decl): Remove assert.
8016         Remove DR 295 implementation.
8017         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
8018         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
8019         about ignoring volatile qualifiers.
8021         * search.c (lookup_member): Correct documentation.
8023 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
8025         * cp-tree.h (union lang_tree_node): Add chain_next option.
8027 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
8029         * parse.y (parse_finish_call_expr): Check lookup_member result.
8031         PR c++/7015
8032         * semantic.c (finish_asm_stmt): Fix operand/output_operands
8033         thinko.
8034         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
8036 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
8038         PR c++/7919
8039         * call.c (build_over_call): Convert this pointer for fns found by
8040         using decls.
8042 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
8044         * ChangeLog: Follow spelling conventions.
8045         * ChangeLog.1: Likewise.
8047 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
8049         PR c++/7768
8050         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
8052 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
8054         * error.c: Fix comment formatting.
8055         * except.c: Likewise.
8056         * expr.c: Likewise.
8057         * friend.c: Likewise.
8058         * g++spec.c: Likewise.
8059         * init.c: Likewise.
8060         * lex.c: Likewise.
8061         * mangle.c: Likewise.
8062         * method.c: Likewise.
8063         * optimize.c: Likewise.
8064         * pt.c: Likewise.
8065         * rtti.c: Likewise.
8066         * search.c: Likewise.
8067         * semantics.c: Likewise.
8068         * spew.c: Likewise.
8069         * tree.c: Likewise.
8070         * typeck.c: Likewise.
8071         * typeck2.c: Likewise.
8073 2002-09-13  Matt Austern  <austern@apple.com>
8075         PR C++/7828
8076         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
8077         * cp/call.c: Change call-by-const-reference mechanism to use
8078         non_cast_lvalue_p when deciding whether the create a temporary.
8079         We need a temporary when passing, e.g. (long) x by const ref.
8081 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
8083         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
8085 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
8087         * decl.c: Fix comment formatting.
8088         * decl2.c: Likewise.
8090 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
8092         * call.c: Fix comment formatting.
8093         * class.c: Likewise.
8094         * cp-lang.c: Likewise.
8095         * cp-tree.h: Likewise.
8096         * cvt.c: Likewise.
8098 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
8100         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
8101         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
8102         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
8103         minor adjustments (use version_string, eliminate yet another
8104         duplicate of xmalloc)
8106 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8108         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
8110 2002-09-05  Jason Merrill  <jason@redhat.com>
8112         * typeck2.c (add_exception_specifier): Only pedwarn for an
8113         incomplete type.
8114         (require_complete_eh_spec_types): New fn.
8115         (cxx_incomplete_type_diagnostic): Also support pedwarning.
8116         * typeck.c (complete_type_or_diagnostic): Likewise.
8117         * call.c (build_call): Call require_complete_eh_spec_types.
8118         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
8119         on an incomplete type.
8121 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
8123         * decl.c (start_cleanup_fn): Clear interface_only before
8124         start_function, restore it afterwards.
8126 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
8128         * cp-tree.h (finish_builtin_type): Remove.
8129         * decl2.c (finish_builtin_type): Move to common code.
8130         * decl.c (build_ptrmemfunc_type): Adjust.
8131         * rtti.c (create_pseudo_type_info): Adjust.
8132         (create_tinfo_types): Adjust.
8134 2002-08-31  Jason Merrill  <jason@redhat.com>
8136         * cp-lang.c (cp_expr_size): Allow initialization from a
8137         CONSTRUCTOR.
8139 2002-08-30  Richard Henderson  <rth@redhat.com>
8141         PR opt/7515
8142         * tree.c: Include target.h.
8143         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
8144         don't bind locally.
8145         * Makefile.in (tree.o): Update.
8147 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
8149         * class.c (layout_virtual_bases): Warn about bugs in G++ that
8150         result in incorrect object layouts.
8151         (layout_class_type): Likewise.
8153 2002-08-24  Matt Austern  <austern@apple.com>
8155         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
8156         are allowable.
8157         (real_lvalue_p): Update caller.
8158         (lvalue_p): Ditto.
8159         (non_cast_lvalue_or_else): New.
8160         * tree.h: Declare it.
8161         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
8163 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
8165         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
8166         and COND_EXPR specially; fix error message output.
8168 2002-08-22  Jason Merrill  <jason@redhat.com>
8170         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
8171         * semantics.c (nullify_returns_r): Likewise.
8173 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
8175         Fix PR/7621
8176         * typeck.c (finish_class_member_access_expr): Diagnose cases where
8177         name lookup finds nothing.
8179 2002-08-15  Jason Merrill  <jason@redhat.com>
8181         * semantics.c (finish_then_clause): Remove redundant assignment.
8182         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
8183         extra binding level outside the if/switch statement.
8184         (finish_while_cond, finish_for_cond): Rewrite complex condition
8185         into the loop body.
8187 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
8189         * parse.y (sizeof, alignof, typeof): New non-terminals to
8190         increment skip_evaluation.  Replace terminals with them and
8191         decrement skip_evaluation at the end of rules using them.
8192         * decl2.c (mark_used): Don't assemble_external if
8193         skipping evaluation.
8195 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
8197         Fix PR/7504
8198         * parse.y (parse_finish_call_expr): Handle incomplete
8199         type used to name a scope.
8201 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
8203         PR c++/7598
8204         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
8205         regression caused by my 2002-08-08 patch.
8207 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
8209         * decl.c (pushdecl_class_level): Honor requests to bind names to
8210         OVERLOADs.
8212 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8214         * decl2.c (build_call_from_tree): Fix uninitialized variable.
8215         * parse.y (parse_finish_call_expr): Likewise.
8216         * repo.c (old_args, old_dir, old_main): Const-ify.
8218 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
8220         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
8221         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
8222         * optimize.c (maybe_clone_body): Likewise.
8223         * pt.c (tsubst_enum): Likewise.
8224         (lookup_template_class): Likewise.
8225         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
8227 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
8229         * lang-specs.h: Remove -ansi.
8231 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
8233         * tree.c (maybe_dummy_object): Replace // with /* */
8235 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
8237         * call.c (standard_conversion): Use build_ptrmem_type.
8238         * cp-tree.h (build_ptrmem_type): New function.
8239         (adjust_result_of_qualified_name_lookup): Likewise.
8240         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
8241         static data members.
8242         (build_ptrmem_type): New function.
8243         (grokdeclarator): Do not use build_offset_type when encountering a
8244         qualified name.
8245         * parse.y (parse_finish_call_expr): Use
8246         adjust_result_of_qualified_name_lookup.
8247         * search.c (adjust_result_of_qualified_name_lookup): New function.
8248         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
8249         accessing OFFSET_TYPEs directly.
8251 2002-08-08  Mike Stump  <mrs@apple.com>
8253         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
8254         (type_decays_to): Likewise.
8255         * class.c (find_final_overrider): Likewise.
8256         (maybe_note_name_used_in_class): Likewise.
8257         * decl.c (current_tmpl_spec_kind): Likewise.
8258         (add_binding): Likewise.
8259         (push_class_binding): Likewise.
8260         (duplicate_decls): Likewise.
8261         (layout_var_decl): Likewise.
8262         (grokfndecl): Likewise.
8263         (grokdeclarator): Likewise.
8264         (check_default_argument): Likewise.
8265         * decl2.c (handle_class_head): Likewise.
8266         * error.c (dump_template_decl): Likewise.
8267         * init.c (build_offset_ref): Likewise.
8268         * pt.c (check_specialization_scope): Likewise.
8269         (determine_specialization): Likewise.
8270         (check_explicit_specialization): Likewise.
8271         (maybe_check_template_type): Likewise.
8272         (process_partial_specialization): Likewise.
8273         (check_default_tmpl_args): Likewise.
8274         (push_template_decl_real): Likewise.
8275         (convert_template_argument): Likewise.
8276         (try_class_unification): Likewise.
8277         (get_bindings_real): Likewise.
8278         (do_decl_instantiation): Likewise.
8279         * semantics.c (begin_function_definition): Likewise.
8280         (finish_member_declaration): Likewise.
8281         (check_multiple_declarators): Likewise.
8282         * typeck.c (comp_array_types): Likewise.
8283         (comptypes): Likewise.
8284         (expr_sizeof): Likewise.
8285         (build_binary_op): Likewise.
8286         (dubious_conversion_warnings): Likewise.
8287         (check_return_expr): Likewise.
8289 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
8291         * typeck.c (build_class_member_access_expr): Do not return
8292         error_mark_node when no error has occurred.
8294 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8296         * typeck.c (build_component_addr): Remove.
8297         (build_unary_op): Just check it's not a bitfield, and then build
8298         an ADDR_EXPR.
8300 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8302         * class.c (convert_to_base): Correct check for error_mark_node.
8303         (create_vtable_ptr): Remove unused VFUNS_P parm.
8305 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8307         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
8309 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
8311         Rework build_component_ref.
8312         * call.c (build_vfield_ref): Do not go through build_component_ref.
8313         (build_field_call): Use build_class_member_access_expr.
8314         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
8315         (build_object_call): Likewise.
8316         * class.c (convert_to_base): New function.
8317         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
8318         (instantiate_type): Handle BASELINKs.
8319         * cp-tree.def (BASELINK): New tree code.
8320         * cp-tree.h (BASELINK_P): Reimplement.
8321         (SET_BASELINK_P): Remove.
8322         (BASELINK_BINFO): Reimplement.
8323         (BASELINK_FUNCTIONS): Likewise.
8324         (BASELINK_ACCESS_BINFO): Likewise.
8325         (BASELINK_OPTYPE): Likewise.
8326         (convert_to_base): New function.
8327         (name_p): Likewise.
8328         (build_object_ref): Remove.
8329         (build_component_ref_1): Likewise.
8330         (build_component_ref): Likewise.
8331         (build_x_component_ref): Likewise.
8332         (build_class_member_access_expr): New function.
8333         (finish_class_member_access_expr): Likewise.
8334         (build_ptrmemfunc_access_expr): Likewise.
8335         * decl.c (grokdeclarator): Handle BASELINKs.
8336         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
8337         finish_class_member_access_expr.
8338         (arg_assoc): Handle BASELINKs.
8339         (do_class_using_decl): Likewise.
8340         * error.c (dump_decl): Likewise.
8341         (dump_expr): Use build_ptrmemfunc_access_expr.
8342         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
8343         destructors.
8344         (build_throw): Use BASELINK_FUNCTIONS.
8345         * init.c (perform_member_init): Use
8346         build_class_member_access_expr.
8347         (build_offset_ref): Handle BASELINKs.  Use
8348         build_class_member_access_expr.
8349         * method.c (hack_identifier): Likewise.
8350         * parse.y (do_id): Use BASELINK, not TREE_LIST.
8351         (primary): Remove uses of build_object_ref.
8352         * pt.c (lookup_template_function): Handle BASELINKs.
8353         (resolve_overloaded_unification): Likewise.
8354         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
8355         (lookup_field): Use BASELINK, not TREE_LIST.
8356         (lookup_fnfiels): Likewise.
8357         (setup_class_bindings): Likewise.
8358         * semantics.c (finish_object_call_expr): Do not use
8359         build_method_call when we already know what function is being
8360         called.
8361         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
8362         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
8363         TREE_CHAIN.
8364         (name_p): New function.
8365         * typeck.c (build_object_ref): Remove.
8366         (build_component_ref_1): Likewise.
8367         (build_x_component_ref): Likewise.
8368         (build_class_member_access_expr): New function.
8369         (finish_class_member_access_expr): Likewise.
8370         (build_ptrmemfunc_access_expr): Likewise.
8371         (get_member_function_from_ptrfunc): Use
8372         build_ptrmemfunc_access_expr.
8373         (build_binary_op): Likewise.
8374         (build_unary_op): Likewise.
8375         (build_ptrmemfunc): Likewise.
8376         (pfn_from_ptrmemfunc): Likewise.
8377         * typeck2.c (build_m_component_ref): Adjust comment.
8379 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
8381         * Make-lang.in (CXX_C_OBJS): Update.
8382         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
8383         * cp-tree.h (cxx_decode_option): Remove.
8384         * decl2.c (compare_options, lang_f_options, unsupported_options,
8385         cxx_decode_option): Remove.
8387 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
8389         * typeck.c (build_x_unary_op): Handle pointer-to-member.
8391 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
8393         * class.c: Don't include obstack.h.
8394         (popclass):
8395         * decl2.c: Delete bogus comment.
8396         * error.c: Don't include obstack.h.
8397         * except.c: Likewise.
8398         (dump_type): Correct comment.
8399         * method.c: Don't include obstack.h.
8400         * tree.c: Likewise.
8402 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
8404         Fix PR/2213
8405         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
8406         expressions to pointer-to-data-member of pointer-to-member-functions.
8408 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
8410         * cvt.c (ocp_convert): Delete obsolete code.
8411         * parse.y (permanent_obstack): Delete declaration.
8412         * pt.c (permanent_obstack): Delete declaration.
8413         * repo.c (permanent_obstack): Delete declaration.
8414         (open_repo_file): Use xmalloc instead of permanent_obstack.
8415         (init_repo): Use xstrdup instead of permanent_obstack.
8417 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
8419         * cp-tree.h (VF_DERIVED_VALUE): Remove.
8420         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
8422 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
8424         PR 7470.
8425         C++ ABI change - vfunc ordering.
8426         * class.c (add_virtual_function): Remove.
8427         (dfs_modify_all_vtables): Take list of all declared
8428         virtuals. Assign all that are not in primary base.
8429         (check_for_override): Adjust comments.
8430         (create_vtable_ptr): Take single list of virtuals. Build chain
8431         of declared virtuals here.
8432         (layout_class_type): Take single list of virtuals. Adjust.
8433         (finish_struct_1): Keep virtuals on single list. Adjust.
8435 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
8437         * init.c (build_member_call): Use build_new_method_call, not
8438         build_method_call.
8440 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
8442         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
8444 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
8446         * call.c (build_method_call): Issue a more helpful error message
8447         about ambiguous method names.
8449 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
8451         * tree.c (build_shared_int_cst): Make cache file scope, and
8452         GTY it.
8454 2002-08-02  Jason Merrill  <jason@redhat.com>
8456         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
8457         (cp_expr_size): New fn.
8458         * call.c (build_over_call): Lose empty class hackery.
8459         (convert_arg_to_ellipsis): Promote non-POD warning to error.
8460         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
8462         * semantics.c (expand_body): Do tree optimization in the function
8463         context, too.
8465 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
8467         * cp-tree.h: Move all warning and flag declarations to c-common.h.
8468         * decl.c: Move all warning and flag variables to c-common.c.
8469         * decl2.c: Move all warning and flag variables to c-common.c.
8470         * lex.c (flag_digraphs): Remove.
8471         (warn_traditional): Now in c-common.c.
8473 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
8475         * call.c (build_field_call): Do not look up the field by name.
8476         (build_method_call): Simplify.
8477         (struct z_candidate): Add access_path and conversion_path.  Remove
8478         basetype_path.
8479         (convert_class_to_reference): Adjust use of
8480         add_function_candidate.
8481         (add_candidate): Add conversion_path argument.
8482         (add_function_candidate): Use it.
8483         (add_conv_dndidate): Likewise.
8484         (build_builtin_candidate): Likewise.
8485         (add_template_candidate_real): Add conversion_path argument.
8486         (add_template_conv_candidate): Likewise.
8487         (add_template_candidate): Likewise.
8488         (build_user_type_conversion_1): Use it.
8489         (build_new_function_call): Remove name lookup code.  Adjust use of
8490         add_template_candidate and add_function_candidate.
8491         (build_new_op): Likewise.
8492         (convert_like_real): Use build_special_member_call.
8493         (build_over_call): Use cand->conversion_path.
8494         (build_special_member_call): New method.
8495         (build_new_method_call): Remove name lookup code.
8496         * cp-tree.def (OFFSET_REF): Update documentation.
8497         (TEMPLATE_ID_EXPR): Likewise.
8498         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
8499         (BASELINK_OPTYPE): Likewise.
8500         (build_new_method_call): Adjust prototype.
8501         (build_special_member_call): New method.
8502         (build_baselink): New method.
8503         (build_offset_ref_call_from_tree): Likewise.
8504         (build_call_from_tree): Likewise.
8505         (finish_qualified_call_expr): Remove.
8506         (finish_call_expr): Adjust prototype.
8507         (build_x_function_call): Remove.
8508         * cvt.c (ocp_convert): Use build_special_member_call.
8509         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
8510         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
8511         CALL_EXPR.
8512         (build_offset_ref_call_from_tree): New function.
8513         (build_call_from_tree): Likewise.
8514         * init.c (expand_cleanup): Use build_special_member_call.
8515         (expand_default_init): Likewise.
8516         (build_member_call): Use finish_call_expr.
8517         (build_new_1): Use build_special_member_call.
8518         (push_base_cleanups): Likewise.
8519         * method.c (do_build_assign_ref): Likewise.
8520         * parse.y (template_id): Do not pass a COMPONENT_REF to
8521         lookup_template_function.
8522         (primary): Use parse_finish_call_epxr, not finish_call_expr.
8523         (parse_finish_call_expr): New function.
8524         * pt.c (lookup_template_function): Add assertions.
8525         * search.c (lookup_base): Allow T to be a binfo.
8526         (build_baselink): New function.
8527         (lookup_member): Use it.
8528         * semantics.c (finish_call_expr): Do not do name lookup.
8529         (finish_object_call_expr): Remove #if 0'd code.
8530         (finish_qualified_call_expr): Remove.
8531         * typeck.c (build_x_function_call): Remove.
8532         (build_static_case): Use build_special_member_call.
8533         * typeck2.c (build_functional_cast): Likewise.
8535 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8537         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
8539 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
8541         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
8543 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
8545         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
8546         documentation.
8548 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
8550         * cp-tree.h: Comment typo fix.
8552 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
8554         * spew.c (space_for_token): Allocate zeroed memory for a new token
8555         chunk.
8557 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8559         * decl.c (builtin_function_1): No need to explicitly mark
8560         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
8562 2002-07-27  Roger Sayle  <roger@eyesopen.com>
8564         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
8566 2002-07-26  Jason Merrill  <jason@redhat.com>
8568         * call.c (build_over_call): Likewise.
8569         (cp_convert_parm_for_inlining): New fn.
8570         (convert_for_arg_passing): New fn.
8571         (convert_default_arg, build_over_call): Use it.
8572         (type_passed_as): New fn.
8573         * pt.c (tsubst_decl): Use it.
8574         * decl2.c (cp_build_parm_decl): New fn.
8575         (build_artificial_parm): Use it.
8576         (start_static_storage_duration_function): Likewise.
8577         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
8578         (grokparms): Don't mess with DECL_ARG_TYPE.
8579         * typeck.c (convert_arguments): Use convert_for_arg_passing.
8580         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
8581         Define.
8582         * cp-tree.h: Declare new fns.
8584 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
8586         * cp-tree.h (flag_operator_names): Remove.
8587         * decl2.c (flag_operator_names): Remove.
8588         (lang_f_options): Remove operator-names.
8589         * lex.c (D_OPNAME): Remove.
8590         (reswords): Remove operator names.
8591         (rid_to_yy): Remove operator names.
8592         (init_reswords): No need to handle D_OPNAME.
8593         * spew.c (read_process_identifier): There are no operator
8594         names.
8596 2002-07-26  Jason Merrill  <jason@redhat.com>
8598         * dump.c (cp_dump_tree): Call c_dump_tree.
8599         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
8601 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8603         * error.c (print_whitespace): Remove.
8604         * g++spec.c (LIBUNWIND): Move.
8605         * mangle.c (mangled_position, write_signed_number): Remove.
8607 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
8609         * decl2.c (cxx_decode_option): Similarly.
8611 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
8613         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8614         (cxx_sizeof_or_alignof_type): Take a third argument.
8615         (cxx_sizeof): Adjust definition.
8616         (cxx_alignof): Likewise.
8617         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
8618         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
8619         complaining.
8620         (c_sizeof_nowarn): Remove definition.
8621         (build_unary_op): Use cxx_sizeof_nowarn.
8623 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
8625         * tree.c (cp_build_qualified_type_real): When copying
8626         pointer-to-method types, unshare the record that holds
8627         the cached pointer-to-member-function type.
8629 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8631         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
8633 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
8635         Fix PR/7363:
8636         * typeck.c (cxx_sizeof_or_alignof_type): New function.
8637         (c_sizeof): Remove definition.
8638         (expr_sizeof): Use cxx_sizeof.
8639         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
8640         * decl.c (finish_destructor_body): Use cxx_sizeof.
8641         * semantics.c (finish_alignof): Likewise.
8642         (finish_alignof): Use cxx_alignof.
8643         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
8644         (cxx_sizeof_or_alignof_type): Declare.
8645         (my_friendly_assert): Move to ../c-common.h.
8647 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
8649         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
8651 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8653         PR c++/7347, c++/7348
8654         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
8655         * decl.c (make_typename_type): Use it.
8656         (make_unbound_class_template): Likewise.
8657         (lookup_name_real): Don't call type_access_control if scope is
8658         template parameter dependent.
8659         * parse.y (template_arg): Call make_unbound_class_template with
8660         tf_parsing set.
8661         (nest_name_specifier): Call make_typename_type with tf_parsing set.
8662         (typename_sub0): Likewise.
8663         (typename_sub1): Likewise.
8664         (instantiate_decl): Push class scope.
8665         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
8666         for both static variable and member function template.
8667         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
8668         and arguments.
8669         * search.c (type_access_control): Do type access for TEMPLATE_DECL
8670         too.
8672 2002-07-20  Roger Sayle  <roger@eyesopen.com>
8674         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
8675         test by using positive_option.  Make whitespace consistent.
8677 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
8679         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
8680         members with 'locus'.  Adjust use throughout.
8681         (struct feed):  Likewise.
8682         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
8683         Adjust use.
8684         (snarf_defarg): Use error(), not error_with_file_and_line().
8686 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
8688         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
8689         cpp_options is included.
8691 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8693         PR c++/2862, c++/2863
8694         * pt.c (determine_specialization): Compare the length of
8695         TYPE_ARG_TYPES.  Tidy.
8697 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8699         PR c++/3797
8700         * decl.c (duplicate_decls): Don't propagate inlining parameters from
8701         olddecl to newdecl when newdecl is a specialization of the
8702         instantiation olddecl.
8704 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8706         PR c++/4802, c++/5387
8707         * decl.c (make_typename_type): Use enforce_access.
8709 2002-07-17  Scott Snyder <snyder@fnal.gov>
8711         PR c++/7320
8712         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
8714 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
8716         * class.c (add_method): Correct handling of conversion operators.
8718 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
8720         PR c++/7224
8721         * class.c (add_method): Simplify.
8723 2002-07-11  Jason Merrill  <jason@redhat.com>
8725         PR c++/7279
8726         * tree.c (cp_copy_res_decl_for_inlining): Also copy
8727         TREE_ADDRESSABLE.
8729 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
8731         * pt.c (template_parm_this_level_p, push_template_decl_real):
8732         Pass depth as int pointer.
8734 2002-07-11  Tim Josling  <tej@melbpc.org.au>
8736         Remove front end hard coding from gengtype.c.
8738         * config-lang.in (gtfiles): Add files needed for this front end.
8740 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
8742         * cp-tree.h (unqualified_name_lookup_error): Declare it.
8743         (begin_function_definition): Adjust prototype.
8744         * lex.c (unqualified_name_lookup_error): New function, split out
8745         from ...
8746         (do_identifier): ... here.
8747         * parse.y (parse_begin_function_definition): New function.
8748         (fn.def1): Use it.
8749         * semantics.c (begin_function_definition): Accept decl-specifiers
8750         and attributes as separate parameters.
8752 2002-07-10  Jason Merrill  <jason@redhat.com>
8754         PR c++/6255
8755         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
8756         modifying the old one.
8758 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
8760         * cp-tree.h (constructor_name_p): Declare it.
8761         (check_template_template_default_arg): Likewise.
8762         * class.c (handle_using_decl): Use constructor_name_p.
8763         * decl.c (grokdeclarator): Likewise.
8764         * decl2.c (constructor_name_p): Define it.
8765         * init.c (build_member_call): Use constructor_name_p.
8766         * parse.y (template_parm): Use check_template_template_default_arg.
8767         * pt.c (check_explicit_specialization): Use constructor_name_p.
8768         * semantics.c (check_template_template_default_arg): New function.
8770 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8772         * pt.c (can_complete_type_without_circularity): Add static to
8773         function definition.
8775 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
8777         * cp-tree.h (have_extern_spec): Declare it
8778         * decl.c (have_extern_spec): Define it.
8779         (start_decl): Eliminate use of used_extern_spec.
8780         (start_function): Likewise.
8781         * parse.y (have_extern_spec): Remove declaration.
8782         (used_extern_spec): Likewise.
8783         (frob_specs): Eliminate use of used_extern_spec.
8784         (.hush_warning): Likewise.
8786 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
8788         * Make-lang.in (cp/parse.o): Depend on decl.h.
8789         * cp-tree.h (do_decl_instantiation): Change prototype.
8790         * parse.y: Include decl.h.
8791         (parse_decl_instantiation): New function.
8792         (explicit_instantiation): Use it.
8793         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
8794         and DECLSPECS.
8796 2002-07-07  Roger Sayle  <roger@eyesopen.com>
8798         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
8799         constructor and destructor tests when passed a TEMPLATE_DECL.
8801 2002-07-05  Jason Merrill  <jason@redhat.com>
8803         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
8804         pointers.
8806         PR optimization/7145
8807         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
8809 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
8811         Repair damage on weak-impared targets caused by my previous patch.
8812         * cp-tree.h (import_export_tinfo): Add parameter.
8813         * decl2.c (import_export_tinfo): Add parameter, post adjust
8814         DECL_COMDAT.
8815         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
8816         import_export_tinfo.
8818 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8820         PR c++/6944
8821         * init.c (build_aggr_init): Remove qualifiers of init before calling
8822         build_vec_init.
8823         (build_vec_init): Flatten multi-dimensional array during cleanup.
8824         (build_vec_delete_1): Abort if the type of each element is array.
8826 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
8828         * pt.c (instantiate_class_template): Fix typo.
8830 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8832         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
8833         by CVS conflict in my last patch.
8835 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8837         PR c++/6716
8838         * pt.c (can_complete_type_without_circularity): New function.
8839         (instantiate_class_template): Use it.
8840         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
8841         message due to incomplete fields.
8843 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
8845         PR c++/7112
8846         * mangle.c (write_expression): Add mangling for sizeof when
8847         applied to a type.
8848         * operators.def: Remove stale comment.
8850 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8852         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
8853         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
8854         (tinfo_decl_type): Replace with ...
8855         (type_info_ptr_type): ... this.
8856         (import_export_tinfo): Declare.
8857         (tinfo_decl_p): Rename to ...
8858         (unemitted_tinfo_decl_p): ... this.
8859         * decl2.c (import_export_decl): Break out tinfo handling into ...
8860         (import_export_tinfo): ... here. New function.
8861         (finish_file): Adjust.
8862         * rtti.c (TINFO_REAL_NAME): New macro.
8863         (init_rtti_processing): Create the tinfo types.
8864         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
8865         (get_tinfo_decl): Adjust.
8866         (get_tinfo_ptr): New function.
8867         (get_type_id): Use it.
8868         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
8869         (ptr_initializer): Use get_tinfo_ptr.
8870         (ptm_initializer): Likewise.
8871         (synthesize_tinfo_var): Break into ...
8872         (get_pseudo_ti_init): ... this. Just create the initializer.
8873         (get_pseudo_ti_desc): .. and this.
8874         (create_real_tinfo_var): Remove.
8875         (create_pseudo_type_info): Don't create the vtable decl here.
8876         (get_vmi_pseudo_type_info): Remove.
8877         (create_tinfo_types): Adjust.
8878         (tinfo_decl_p): Rename to ...
8879         (unemitted_tinfo_decl_p): ... here. Adjust.
8880         (emit_tinfo_decl): Adjust. Create the initializer.
8882 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
8884         PR c++/6695
8885         * pt.c (tsubst_friend_class): Substitute into the context of the
8886         friend before using it.
8888 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
8890         * cp-tree.h (xref_tag): Change prototype.
8891         (handle_class_head): Likewise.
8892         (build_x_component_ref): Likewise.
8893         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
8894         (xref_tag): Take attributes as a separate parameter.
8895         (xref_tag_from_type): Adjust call to xref_tag.
8896         * decl2.c (build_expr_from_tree): Adjust call to
8897         build_x_component_ref.
8898         (handle_class_head): Take attributes as a separate parameter.
8899         * parse.y (parse_xref_tag): New function.
8900         (parse_handle_class_head): Likewise.
8901         (primary): Use parse_xref_tag.
8902         (class_head_decl): Use parse_handle_class_head.
8903         (class_head_defn): Likewise.
8904         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
8905         (build_dynamic_cast_1): Likewise.
8906         (create_pseudo_type_info): Likewise.
8907         (emit_support_tinfos): Likewise.
8908         * typeck.c (build_object_ref): Adjust call to
8909         build_x_component_ref.
8910         (build_x_component_ref): Remove protect parameter.
8912 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
8914         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
8915         * class.c (handle_using_decl): Likewise.
8916         (instantiate_type): Likewise.
8917         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
8918         (xref_basetypes): Change prototype.
8919         (begin_mem_initializers): New function.
8920         (get_overloaded_fn): Likewise.
8921         * decl.c (xref_basetypes): Simplify.
8922         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
8923         * init.c (build_offset_ref): Likewise.
8924         * parse.y (base_init): Use begin_mem_initializers().
8925         (structsp): Adjust call to xref_basetypes.
8926         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
8927         (instantiate_class_template): Adjust call to xref_basetypes.
8928         * semantics.c (begin_mem_initializers): New function.
8929         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
8930         (really_overloaded_fn): Likewise.
8931         (get_overloaded_fn): New function.'
8932         (get_first_fn): USe BASELINK_FUNCTIONS.
8934 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
8936         * cp-tree.h (SCALAR_TYPE_P): New macro.
8937         (check_for_out_of_scope_variable): New function.
8938         (at_class_scope_p): Likewise.
8939         (finish_fname): Likewise.
8940         * class.c (finish_struct): Use at_function_scope_p.
8941         * decl.c (check_for_out_of_scope_variable): New function, split
8942         out from do_identifier.
8943         (finish_enum): Use at_function_scope_p.
8944         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
8945         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
8946         (primary): Use at_function_scope_p.
8947         * search.c (at_class_scope_p): New function.
8948         * semantics.c (finish_fname): Likewise.
8949         (check_multiple_declarators): Use at_function_scope_p.
8951 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
8953         * parse.y (parse_scoped_id): New function.
8954         (primary): Use it.
8955         * cp-tree.h (do_scoped_id): Adjust declaration.
8956         * lex.c (do_scoped_id): Remove call to yylex.
8957         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
8958         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
8959         expanding it inline.
8961 2002-06-23  Matt Thomas  <matt@3am-software.com>
8963         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
8964         "#if VMS_TARGET".
8966 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8968         * mangle.c (integer_type_codes): Const-ify.
8970 2002-06-20  Richard Henderson  <rth@redhat.com>
8972         PR c++/6747
8973         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
8974         Call put_var_into_stack.
8976 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8978         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
8979         array size calculation.
8981 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8983         PR c++/6892
8984         * pt.c (tsubst_expr): Handle FILE_STMT.
8986 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8988         PR c++/6723
8989         * pt.c (lookup_template_class): Don't build complete argument of
8990         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
8991         argument.
8993 2002-06-19  Akim Demaille  <akim@epita.fr>
8995         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
8996         decl.h's TYPENAME.
8997         * spew.c, lex.c: Adjust.
8998         * parse.y (explicit_instantiation): Add empty action to override
8999         the default $$ = $1 where it introduces a type clash.
9001 2002-06-14  Jason Merrill  <jason@redhat.com>
9003         * semantics.c (begin_for_stmt): Push the 'for' scope before
9004         adding the FOR_STMT.
9006         C++ ABI changes.
9007         * class.c (build_base_field): Set DECL_PACKED.
9008         (layout_class_type): Don't use tail padding of PODs.
9009         * mangle.c (write_unqualified_name): Fix template conversion op
9010         mangling.
9012 2002-06-16  Richard Henderson  <rth@redhat.com>
9014         PR opt/6793
9015         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
9016         after template instantiation.
9018 2002-06-16  Richard Henderson  <rth@redhat.com>
9020         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
9022 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9024         * cp-tree.h (compiler_error): Remove declaration.
9025         * lex.c (compiler_error): Remove definition.
9027 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
9029         * g++spec.c (LIBUNWIND): New.
9030         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
9032 2002-06-13  Jessica Han  <jessica@cup.hp.com>
9034         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
9035         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
9036         (build_vbase_offset_vtbl_entries): Likewise.
9037         * rtti.c (build_headof): Likewise.
9038         (get_tinfo_decl_dynamic): Likewise.
9039         (create_pseudo_type_info): Likewise.
9041 2002-06-12  Stan Shebs  <shebs@apple.com>
9043         * mpw-config.in: Remove file, no longer used.
9044         * mpw-make.sed: Ditto.
9046 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
9048         * decl2.c: Update call to cpp_handle_option.
9050 2002-06-07  H.J. Lu  (hjl@gnu.org)
9052         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
9054 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
9056         * error.c (cp_error_at): Fix typo.
9058 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
9060         * error.c (cp_diagnostic_starter): Adjust call.
9061         (maybe_print_instantiation_context): Change prototype to take a
9062         'diagnostic_info *'.
9063         (print_instantiation_full_context): Likewise.
9064         (print_instantiation_partial_context): Likewise.
9065         (cp_diagnostic_starter): Likewise.
9066         (cp_diagnostic_finalizer): Likewise.
9067         (cp_print_error_function): Likewise.
9068         (cp_printer): Take a secondary parameter as a 'text_info *'.
9069         Remove output_state savings.  Adjust calls.
9071 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
9073         * pt.c (inline_parm_levels): Mark for GC.
9075         * mangle.c (start_mangling): Allocate G.substitutions here...
9076         (init_mangle): ... rather than here.
9077         (finish_mangling): Clear the varray pointer when done with it.
9078         * spew.c (yylexstring): Don't use VARRAY_FREE.
9079         * search.c (bfs_walk): Don't use VARRAY_FREE.
9080         * decl2.c (pending_statics): Use gengtype to mark.
9081         (deferred_fns): Likewise.
9082         (ssdf_decls): Likewise.
9083         (init_decl2): Delete.
9084         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
9085         (cxx_init_decl_processing): Don't call init_decl2.
9086         (cxx_pop_function_context): Don't use VARRAY_FREE.
9087         * cp-tree.h (struct saved_scope): No need for special marking
9088         of varrays.
9089         (struct language_function): Likewise.
9090         (local_classes): Use gengtype to mark.
9091         (init_decl2): Delete prototype.
9092         * class.c (init_class_processing): Don't use
9093         ggc_add_tree_varray_root.
9094         (build_vtbl_initializer): Don't use VARRAY_FREE.
9096         * decl.c (typename_compare): Don't use same_type_p.
9098         * decl.c: Include hashtab.h instead of hash.h.
9099         (typename_hash): Update to use htab_h.
9100         (typename_compare): Likewise.
9101         (typename_htab): Use gengtype to mark.
9102         (build_typename_type): Update to use htab_h.
9103         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
9105         * Make-lang.in (gt-cp-tree.h): New rule.
9106         (cp/tree.o): Depend on gt-cp-tree.h.
9107         * config-lang.in (gtfiles): Add cp/tree.c.
9108         * tree.c: Include gt-cp-tree.h.
9109         (list_hash_table): Use gengtype to mark.
9110         (init_tree): Use gengtype to mark trees.
9112         * Make-lang.in (cp/decl.o): Add debug.h dependency.
9113         * call.c (struct z_candidate): Use gengtype.
9114         (USER_CONV_CAND): Use WRAPPER_ZC.
9115         (convert_class_to_reference): Use build_zc_wrapper.
9116         (build_type_conversion_1): Likewise.
9117         (build_over_call): Use WRAPPER_ZC.
9118         (add_warning): Use build_zc_wrapper.
9119         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
9120         * cp-tree.h (struct lang_identifier): Use gengtype.
9121         (struct template_parm_index_s): Likewise.
9122         (struct ptrmem_cst): Likewise.
9123         (struct tree_binding): Likewise.
9124         (struct tree_overload): Likewise.
9125         (struct tree_srcloc): Likewise.
9126         (struct tree_wrapper): Likewise.  Also modify to have a pointer
9127         to struct z_candidate rather than void.
9128         (enum cp_tree_node_structure_enum): New.
9129         (union lang_tree_node): New.
9130         (cxx_mark_tree): Delete prototype.
9131         (cp_tree_node_structure): New prototype.
9132         (build_ptr_wrapper): Delete prototype.
9133         (build_int_wrapper): Delete prototype.
9134         (build_zc_wrapper): New prototype.
9135         * decl.c: Include debug.h
9136         (cxx_mark_tree): Delete.
9137         (cp_tree_node_structure): New.
9138         * tree.c (build_ptr_wrapper): Delete.
9139         (build_int_wrapper): Delete.
9140         (build_zc_wrapper): New.
9142         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
9143         Correct typo.  Patch from k_fukui@highway.ne.jp.
9145         * semantics.c (current_stmt_tree): Update for change to
9146         struct language_function.
9147         (finish_mem_initializers): Likewise.
9148         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
9149         * cp-tree.h (struct language_function): Rename from
9150         cp_language_function.  Change all uses.
9151         (cp_function_chain): Don't need to cast.
9153         * class.c (duplicate_tag_error): Reset discriminator.
9154         (check_bases_and_members): Update for data structure changes.
9155         * cp-tree.h (struct lang_id2): Use gengtype.
9156         (flagged_type_tree): Likewise.
9157         (SET_LANG_ID): Use GGC on struct lang_id2.
9158         (struct cp_language_function): Use gengtype.  Remove field
9159         'x_vcalls_possible_p'.
9160         (current_vcalls_possible_p): Delete.
9161         (struct lang_type_header): New.
9162         (struct lang_type_class): Rename from struct lang_type.  Include
9163         struct lang_type_header.
9164         (struct lang_type_ptrmem): New.
9165         (struct lang_type): New.
9166         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
9167         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
9168         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
9169         (struct lang_decl_flags): Use gengtype.  Add discriminators.
9170         (struct lang_decl): Use gengtype.  Add and use discriminators.
9171         Update the macros that reference moved fields.
9172         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
9173         (SET_DECL_THUNK_P): Set discriminator too.
9174         (clear_inline_text_obstack): Delete prototype.
9175         (finish_inline_definitions): Delete prototype.
9176         (mark_pending_inlines): Delete prototype.
9177         (lang_check_failed): New prototype.
9178         * decl.c (struct named_label_use_list): Use gengtype.
9179         (struct named_label_list): Likewise.
9180         (mark_binding_level): Delete.
9181         (mark_named_label_lists): Delete.
9182         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
9183         (cxx_init_decl_processing): Use generated marker routine.
9184         (begin_destructor_body): Delete dead set to
9185         current_vcalls_possible_p.
9186         (mark_lang_function): Delete.
9187         (mark_cp_function_context): Delete.
9188         (lang_mark_tree): Use generated marker routines.
9189         * decl2.c (start_objects): Set discriminator when setting
9190         GLOBAL_INIT_PRIORITY.
9191         * lex.c (retrofit_lang_decl): Set discriminators.
9192         (copy_lang_type): Update for changes to lang_type structure.
9193         (cp_make_lang_type): Set discriminator.
9194         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
9195         * search.c: Include ggc.h.
9196         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
9197         (finish_inline_definitions): Delete.
9198         * spew.c (struct token): Use gengtype.
9199         (struct token_chunk): New.
9200         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
9201         (struct feed): Use gengtype.
9202         (feed_obstack): Delete.
9203         (feed): Mark as GC root.
9204         (pending_inlines): Mark as GC root.
9205         (pending_inlines_tail): Likewise.
9206         (processing_these_inlines): Likewise.
9207         (token_obstack): Make static.
9208         (first_token): Likewise.
9209         (init_spew): Don't initialize deleted things; use gengtype for roots.
9210         (clear_inline_text_obstack): Delete.
9211         (feed_input): Use GC for struct feed.  Update for changes to
9212         struct unparsed_text.
9213         (mark_pending_inlines): Delete.
9214         (next_token): Rename from add_token.  Change all callers.  Update
9215         for changes to struct unparsed_text.
9216         (space_for_token): New.
9217         (remove_last_token): New.
9218         (alloc_unparsed_text): New.
9219         (snarf_block): Take an unparsed_text.  Update for changes to struct
9220         unparsed_text.
9221         (snarf_method): Update for changes to struct unparsed_text.
9222         (snarf_defarg): Update for changes to struct unparsed_text.
9223         * tree.c (lang_check_failed): New.
9225         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
9226         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
9227         (cp/spew.o): Add dependency on gt-<filename>.h.
9228         (cp/decl2.o): Add dependency on gt-<filename>.h.
9229         (cp/call.o): Add dependency on gt-<filename>.h.
9230         (cp/pt.o): Add dependency on gt-<filename>.h.
9231         (cp/repo.o): Add dependency on gt-<filename>.h.
9232         (cp/parse.o): Add dependency on gt-<filename>.h.
9233         * call.c: Use gengtype for roots.
9234         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
9235         decl2.c parse.y pt.c repo.c spew.c.
9236         * cp-tree.h: Use gengtype for roots.
9237         (struct saved_scope): Use GGC, gengtype.
9238         (cp_parse_init): Delete prototype.
9239         (init_pt): Delete prototype.
9240         * decl.c: Use gengtype for roots.
9241         (mark_saved_scope): Delete.
9242         (cxx_init_decl_processing): Don't call deleted initilisation
9243         routines.
9244         (signed_size_zero_node): Delete, unused.
9245         * decl.h: Use gengtype for roots.
9246         * decl2.c: Use gengtype for roots.
9247         * lex.h: Use gengtype for roots.
9248         * parse.y: Use gengtype for roots.
9249         (cp_parse_init): Delete.
9250         * pt.c: Use gengtype for roots.
9251         (init_pt): Delete.
9252         * repo.c: Use gengtype for roots.
9253         * spew.c: Use gengtype for roots.
9255         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
9256         (cp/decl.o): Add dependency on gtype-cp.h.
9257         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
9258         Include gtype-cp.h.  Allow for filename changes.
9260         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
9261         (cp/decl.o): Add cp/gt-decl.h dependency.
9262         * config-lang.in (gtfiles): New.
9263         * tree.h: Rename struct binding_level to struct cp_binding_level.
9264         * decl.c: Rename struct binding_level to struct cp_binding_level.
9265         Include cp/gt-decl.h.
9266         (struct cp_binding_level): Use gengtype.
9267         (make_binding_level): Use GGC on struct cp_binding_level.
9268         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
9269         (cxx_init_decl_processing): Mark free_binding_level as
9270         deletable.
9272         * decl.c (mark_cp_function_context): Update calling sequence.
9274         * decl.c (start_function): Don't free 'struct
9275         cp_language_function'.
9276         (pop_cp_function_context): Likewise.
9277         (save_function_data): Allocate it using GC.
9278         * semantics.c (genrtl_start_function): Don't free 'struct
9279         cp_language_function'.
9281 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
9283         * lang-specs.h: Use cpp_debug_options.
9285 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
9287         * mangle.c, tree.c: Include real.h.
9288         * Make-lang.in: Update dependency lists.
9290 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9292         * lex.c: Don't include c-lex.h.
9293         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
9295 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
9297         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
9299 2002-05-22  Richard Henderson  <rth@redhat.com>
9301         * decl.c (obscure_complex_init): Check for VAR_DECL
9302         before using DECL_THREAD_LOCAL.
9304 2002-05-22  Richard Henderson  <rth@redhat.com>
9306         * decl.c (check_tag_decl): Handle RID_THREAD.
9307         (obscure_complex_init): Reject run-time init of tls.
9308         (grokvardecl, grokdeclarator): Handle RID_THREAD.
9309         * lex.c (reswords): Add __thread.
9310         (rid_to_yy): Map RID_THREAD to SCSPEC.
9312 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
9314         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
9315         * cp-tree.h (cxx_post_options): Kill.
9316         * cp-lex.c (cxx_post_options): Kill.
9318 2002-05-21  Richard Henderson  <rth@redhat.com>
9320         * lex.c (rid_to_yy): Add RID_THREAD.
9322 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
9324         * init.c (build_vec_init): Test for trivial copy-assignment when
9325         copy-assigning arrays.
9327 2002-05-20  Andreas Jaeger  <aj@suse.de>
9329         * init.c (build_default_init): Remove unused variable.
9331 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
9333         * call.c (any_strictly_viable): New.
9334         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
9336 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9338         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
9340 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9342         PR c++/186, DR 259
9343         * pt.c (do_decl_instantiation): Don't complain explicit
9344         instantiation after explicit specialization.
9345         (do_type_instantiation): Likewise.
9347 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
9349         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
9350         renamed from...
9351         (complete_type_or_else): ... this.  Redefined as macro.
9352         (cxx_incomplete_type_diagnostic): Declare.
9353         (cxx_incomplete_type_error): Define as macro.
9354         * init.c (build_delete): Warn about incomplete types other than
9355         void, and use the built-in operator delete for them.
9356         * typeck.c (complete_type_or_diagnostic): Renamed from
9357         complete_type_or_else.  Added warn_only argument, passed to...
9358         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
9359         warnings or errors depending on new warn_only argument.  Renamed
9360         from...
9361         (cxx_incomplete_type_error): ... this.  New implementation in
9362         terms of cxx_incomplete_type_diagnostic.
9364 2002-05-18  Jason Merrill  <jason@redhat.com>
9366         PR c++/6611
9367         * decl2.c (import_export_decl): If we clear
9368         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
9370 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9372         PR c++/6620
9373         * pt.c (verify_class_unification): Don't check if PARM is template
9374         parameter dependent.  Simplify.
9375         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
9376         parameter dependent expression.
9378 2002-05-14  Jason Merrill  <jason@redhat.com>
9380         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
9381         Do set DECL_COMDAT.
9382         (synthesize_tinfo_var): Take the public decl.
9383         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
9384         (emit_tinfo_decl): Adjust.  Call import_export_decl.
9385         * decl2.c (import_export_decl): Simplify tinfo decl handling.
9387 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
9389         * cp-tree.h (struct lang_type): Added non_zero_init.
9390         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
9391         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
9392         * class.c (check_field_decls): Test non_zero_init.
9393         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
9394         zero-to-NULL conversions.
9395         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
9396         type that needs zero-initialization without zeros.
9397         (check_initializer_decl): Compute zero-initializer for types
9398         that require a non-trivial one.
9399         * init.c (build_forced_zero_init): New function.
9400         (build_default_init): Use it.
9401         * tree.c (zero_init_p): New function.
9402         * typeck2.c (force_store_init_value): New function.
9403         (process_init_constructor): Create non-trivial zero-initializers
9404         for array members and class fields.
9406 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
9408         * lang-specs.h: Remove redundant -lang-c++.
9410 2002-05-13  Jason Merrill  <jason@redhat.com>
9412         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
9413         (fixed_type_or_null): See through reference vars.
9414         (build_base_path): Vtable contents are constant.
9415         * typeck.c (get_member_function_from_ptrfunc): Likewise.
9417 2002-05-12  Jason Merrill  <jason@redhat.com>
9419         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
9420         structs are safe.
9422 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9424         * cp-tree.h (flag_ansi): Remove.
9425         * decl2.c (flag_ansi): Remove.
9426         (cxx_decode_option): Set flag_iso and flag_undef.
9428 2002-05-09  Jason Merrill  <jason@redhat.com>
9430         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
9431         Use subtraction rather than a bitmask to get the index.
9432         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
9434         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
9436 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9438         * Make-lang.in (decl2.o): Update.
9439         * cp-tree.h (warn_multichar): Remove.
9440         * decl2.c: Include c-common.h.
9441         (warn_multichar): Remove.
9443 2002-05-03  Jason Merrill  <jason@redhat.com>
9445         * tree.c (build_cplus_array_type): Only const and volatile get
9446         special handling.
9448         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
9450 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
9452         ABI change, returning simple classes from functions.
9453         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
9454         TYPE_HAS_TRIVIAL_INIT_REF is false or
9455         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
9457 2002-04-30  Jason Merrill  <jason@redhat.com>
9459         PR debug/6436
9460         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
9461         anonymous class with a typedef if there are attributes.
9463 2002-04-29  Paul Eggert  <eggert@twinsun.com>
9465         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
9467 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
9469         PR c++/6477
9470         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
9471         non-NULL first.
9473 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
9475         PR c++/6492
9476         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
9477         enter that scope before name lookup.
9479         PR c++/6486
9480         * method.c (do_build_copy_constructor): Avoid building
9481         cv-qualified reference types.
9483 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
9485         PR c++/5719
9486         * decl.c (grok_op_properties): Assignment ops don't have to return
9487         by value. operator% should.
9489 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
9491         PR c/6343
9492         * decl.c (duplicate_decls): Call merge_weak.
9494 2002-04-26  Richard Henderson  <rth@redhat.com>
9496         * parse.y (malloced_yyss, malloced_yyvs): New.
9497         (yyoverflow): Re-add.  Set them.
9498         (free_parser_stacks): New.
9500 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
9502         PR c++/6497
9503         * method.c (do_build_assign_ref): Pass a derivation to
9504         build_method_call when calling base class assignment operators.
9506 2002-04-26  Richard Henderson  <rth@redhat.com>
9508         * parse.y (yyoverflow): Revert.
9510 2002-04-26  Richard Henderson  <rth@redhat.com>
9512         PR c/3581
9513         * parse.y (string): Remove.  Update all uses to use STRING
9514         instead, and not call combine_strings.
9515         * rtti.c (tinfo_name): Use fix_string_type.
9516         * semantics.c (finish_asm_stmt): Don't call combine_strings.
9517         * spew.c (yylexstring): New.
9518         (read_token): Use it.
9520 2002-04-25  Richard Henderson  <rth@redhat.com>
9522         PR c/2161
9523         * parse.y (yyoverflow): New.
9525 2002-04-25  Jason Merrill  <jason@redhat.com>
9527         PR c++/5607
9528         * search.c (check_final_overrider): No longer static.
9529         * class.c (update_vtable_entry_for_fn): Call it.
9530         * cp-tree.h: Adjust.
9532 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9534         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
9535         * cp-tree.h (cxx_set_yydebug): Die.
9536         * lex.c (YYDEBUG): Get from c-lex.h.
9537         (cxx_set_yydebug): Remove.
9538         * parse.y: Include c-lex.h.
9539         (YYDEBUG): Get from c-lex.h.
9541 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
9543         PR c++/6438.
9544         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
9545         void.
9547 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9549         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
9550         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
9551         Redefine.
9552         * cp-tree.h (cp_attribute_table): Rename.
9553         * decl.c (lang_attribute_table): Remove declaration.
9554         (cxx_init_decl_processing): Don't set it.
9555         * tree.c (cp_attribute_table): Rename.
9557 2002-04-24  Jason Merrill  <jason@redhat.com>
9559         PR c++/6331
9560         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
9561         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
9562         The pedwarn for array assignment is now unconditional.
9563         * tree.c (build_cplus_array_type_1): Still process simple array types
9564         normally in templates.
9566         PR c++/6395
9567         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
9568         stuff for comdats.
9570 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
9572         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
9573         node with attributes.
9575 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
9577         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
9578         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
9580 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
9582         PR c++/6256:
9583         * pt.c (tsubst_friend_class): Handle templates with explicit
9584         nested names.
9586         PR c++/6331:
9587         * typeck.c (merge_types): Remember the cv-qualification of pointer
9588         types when merging them.
9590 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9592         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
9593         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
9594         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
9595         cxx_mark_function_context): New.
9596         * decl.c (push_cp_function_context, pop_cp_function_context,
9597         mark_cp_function_context): Rename for consistency.
9598         (cxx_init_decl_processing): Don't set old hooks.
9600 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
9602         * call.c (convert_type_from_ellipsis): Rename, update.
9603         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
9604         * cp-tree.h (convert_type_from_ellipsis): Rename.
9605         * decl.c (cxx_init_decl_processing): Don't set hook.
9607 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9609         * call.c (build_new_method_call): Update.
9610         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
9611         * cp-tree.h (cxx_incomplete_type_error): New.
9612         * decl.c (grokdeclarator, grokparms): Update.
9613         * decl2.c (check_classfn): Update.
9614         * pt.c (tsubst): Update.
9615         * typeck.c (complete_type_or_else, expr_sizeof,
9616         decay_conversion): Update.
9617         * typeck2.c (incomplete_type_error): Rename.
9618         (add_exception_specifier): Update.
9620 2002-04-18  Jason Merrill  <jason@redhat.com>
9622         PR c++/5658
9623         * search.c (setup_class_bindings): A class template qualifies as a
9624         type binding.
9626 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
9628         PR c++/6316
9629         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
9630         before expanding.
9632 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
9634         * init.c (begin_init_stmts): Remove commented out code.
9635         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
9636         * semantics.c (begin_gobal_stmt_expr): Adjust call to
9637         expand_start_stmt_expr.
9639 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
9641         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
9642         dso_handle itself, to __cxa_atexit.
9644 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9646         * error.c (cxx_print_error_function): Adjust call to macros.
9648 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
9650         * class.c (layout_virtual_bases): Do all dsize computation on trees.
9652 2002-04-14  Jason Merrill  <jason@redhat.com>
9654         * typeck.c (get_member_function_from_ptrfunc): Don't do
9655         gratuitious division and multiplication on
9656         ptrmemfunc_vbit_in_delta targets.
9658 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9660         PR c++/5373.
9661         * semantics.c (finish_expr_stmt): Remember the type of the
9662         expression before any conversions are performed.
9664 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9666         PR c++/5189.
9667         * call.c (add_template_candidate_real): Do not treat member
9668         templates as copy constructors.
9670 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
9672         * decl.c (duplicate_decls): Do not copy the RTL for a variable
9673         declaration if the old variable had an incomplete type and the new
9674         variable does not.
9675         (complete_vars): Do not call layout_decl for completed variables.
9677 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
9679         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
9680         with an explicit one.
9681         (follow_tag_typedef): New.
9682         (lookup_tag): Use it to extract the tag of an explicit typedef.
9683         (xref_tag): Likewise.
9685 2002-04-11  Andrew Haley  <aph@redhat.com>
9687         * typeck.c (type_after_usual_arithmetic_conversions):
9688         If two types have the same variant, return immediately.
9689         When two floating-point operands are the same precision:
9690           convert to float if one of the operands is float;
9691           if neither operand is one of the standard types, return the type
9692           of the first operand.
9694 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
9696         PR c++/5507
9697         * decl.c (make_typename_type): Remove implicit typenameness.
9699 2002-04-09  Jason Merrill  <jason@redhat.com>
9701         PR optimization/6189
9702         * semantics.c (genrtl_start_function): Don't free
9703         DECL_SAVED_FUNCTION_DATA for inline functions.
9705         * init.c (build_member_call): For now, don't convert to
9706         intermediate base if it would cause an error.
9708 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
9710         * parse.y (namespace_qualifier, maybe_identifier,
9711         begin_explicit_instantiation, end_explicit_instantiation,
9712         apparent_template_type, .finish_template_type,
9713         do_id, maybe_init, defarg_again, component_decl_1):
9714         Add ending ';', in accordance with POSIX.
9716 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
9718         PR c++/5571
9719         * class.c (layout_class_type): Remember incomplete static
9720         variables.
9721         (finish_struct_1): Call complete_vars, not
9722         hack_incomplete_structures.
9723         * cp-tree.h (hack_incomplete_structures): Rename to ...
9724         (complete_vars): ... this.
9725         (struct saved_scope): Remove incomplete.
9726         (namespace_scope_incomplete): Remove.
9727         * decl.c (struct binding_level): Remove incomplete.
9728         (incomplete_vars): New variable.
9729         (mark_binding_level): Don't mark incomplete.
9730         (print_binding_level): Don't print it.
9731         (mark_saved_scope): Don't mark incomplete.
9732         (pushdecl): Use maybe_register_incopmlete_var.
9733         (cxx_init_decl_processing): Register incomplete_vars for GC.
9734         (start_decl_1): Clarify error message.
9735         (hack_incomplete_vars): Remove.
9736         (maybe_register_incomplete_var): New function.
9737         (complete_vars): Likewise.
9739 2002-04-06  Jason Merrill  <jason@redhat.com>
9741         PR c++/4934
9742         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
9743         set before checking it.
9745         PR c++/525
9746         * init.c (build_member_call): Use build_scoped_ref.
9747         (resolve_offset_ref): Likewise.
9748         * call.c (build_scoped_method_call): Likewise.
9749         * tree.c (maybe_dummy_object): Kludge around current_class_type being
9750         wrong.
9751         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
9752         * cp-tree.h: Adjust.
9754         * init.c (push_base_cleanups): Just use build_scoped_method_call.
9756         PR c++/6179
9757         * method.c (implicitly_declare_fn): Pass unqualified type to
9758         synthesize_exception_spec.
9760 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
9762         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
9763         * cvt.c: Update comment.
9764         * init.c (expand_cleanup_for_base): Update.
9765         * semantics.c (finish_parenthesized_expr): Update.
9766         * typeck.c (cp_truthvalue_conversion): Update.
9768 2002-04-04  Jason Merrill  <jason@redhat.com>
9770         * semantics.c (finish_eh_cleanup): New fn.
9771         * cp-tree.h: Add prototype.
9772         * init.c (perform_member_init, expand_cleanup_for_base): Use
9773         finish_eh_cleanup.
9774         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
9775         * cp-tree.h: Remove references.
9776         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
9777         * dump.c (cp_dump_tree): Likewise.
9778         * pt.c (tsubst_expr): Likewise.
9779         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
9780         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
9781         * tree.c (cp_statement_code_p): Likewise.
9783         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
9785         PR c++/5636
9786         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
9787         cleanup for nrv.
9789         PR c++/5104
9790         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
9791         specifiers.
9792         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
9794 2002-04-03  Richard Henderson  <rth@redhat.com>
9796         * cp-lang.c (cxx_warn_unused_global_decl): New.
9797         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
9799 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9801         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
9802         * tree.c (init_tree): Don't set hook.
9804 2002-04-03  Roger Sayle  <roger@eyesopen.com>
9806         PR c++/5998:
9807         * decl.c (duplicate_decls): Don't mess with assembler names when
9808         redeclaring builtin functions as static.
9810 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9812         * call.c (build_addr_func): Update.
9813         * class.c (resolve_address_of_overloaded_function): Update.
9814         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
9815         * cp-tree.h (cxx_mark_addressable): New.
9816         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
9817         * decl2.c (build_cleanup): Update.
9818         * except.c (build_throw): Update.
9819         * init.c (resolve_offset_ref): Update.
9820         * pt.c (convert_nontype_argument): Update.
9821         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
9822         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
9823         unary_complex_lvalue): Update.
9824         (mark_addressable): Rename.
9826 2002-04-01  Roger Sayle  <roger@eyesopen.com>
9828         PR c++/5998:
9829         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
9830         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
9831         but follow the SET_DECL_RTL idiom used elsewhere in the function.
9833 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9835         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
9836         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
9837         * decl.c (grokdeclarator): Update.
9838         * mangle.c (write_integer_cst): Update.
9839         * typeck.c (build_binary_op): Update.
9841 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9843         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
9844         * lex.c (cxx_init): Don't set hook.
9846 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
9848         * Make-lang.in (error.o): Update.
9849         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
9850         * cp-tree.h (struct diagnostic_context): Predeclare.
9851         (cxx_print_error_function): New.
9852         * error.c: Include langhooks-def.h.
9853         (lang_print_error_function): Rename.  Update.
9854         (init_error): Don't set hook.
9856 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9858         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
9859         Redefine.
9860         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
9861         * decl.c (finish_enum): Similarly.
9862         * error.c (dump_type): Similarly.
9863         * lex.c (cxx_init): Similarly.
9864         * mangle.c (write_builtin_type): Similarly.
9865         * typeck.c (comptypes): Similarly.
9867 2002-03-28  Roger Sayle  <roger@eyesopen.com>
9869         PR c++/5998:
9870         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
9871         in the g++ front-end.
9872         (duplicate_decl): Allow redefinition of anticipated built-ins.
9873         Fix inlining problem by over-writing the old DECL_RTL.
9874         (lookup_namespace_name): Fail to find an identifier in the
9875         specified namespace if its still anticipated.
9876         (builtin_function_1): New function split out from builtin_function
9877         to create a builtin in the current namespace with given context.
9878         (builtin_function): Call builtin_function_1 to define the
9879         appropriate builtins in both the std and global namespaces.
9880         (select_decl): Don't test for anticipated decls here.
9881         (unqualified_namespace_lookup): Instead ignore them whilst
9882         searching through scopes and namespaces.
9883         * decl2.c (do_nonmember_using_decl): If a using declaration
9884         specifies an anticipated built-in function, mark it as no longer
9885         anticipated in that scope.
9886         (ambiguous_decl):  Avoid resolving to an anticipated decl.
9887         * lex.c (do_scoped_id): Fail to find an identifier in the global
9888         namespace if its still anticipated.
9890 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
9892         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
9893         * cp-tree.h (cp_make_lang_type): Rename.
9894         * lex.c (cp_make_lang_type): Rename.
9895         (make_aggr_type): Update.
9896         * tree.c (init_tree): Don't set make_lang_type_fn.
9898 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
9900         PR c++/6073
9901         * class.c (finish_struct_1): Update static field's DECL_MODE even
9902         if its type is a variant of t.
9904 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9906         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
9907         * cp-tree.h (cxx_insert_default_attributes): New.
9908         * decl.c (insert_default_attributes): Rename.
9910 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
9912         PR c++/4884
9913         * call.c (build_op_delete_call): Allow for the fact the placement
9914         may be a COMPOUND_EXPR.
9916 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
9918         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
9919         * cp-tree.h (init_cplus_expand): Remove.
9920         (cxx_expand_expr): New.
9921         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
9922         fix prototype.
9923         (init_cplus_expand): Remove.
9924         * lex.c (cxx_init): Don't call init_cplus_expand.
9926 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
9928         PR c++/4884.
9929         * init.c (build_new_1): Allow for the fact the result of
9930         build_function_call may be a COMPOUND_EXPR.
9932 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
9934         PR c++/5682
9935         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
9936         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9937         (dfs_skip_nonprimary_vbases_markedp): Remove.
9938         * search.c (get_shared_vbase_if_not_primary): Remove.
9939         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
9940         (dfs_skip_nonprimary_vbases_markedp): Remove.
9941         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
9942         (dfs_marked_real_bases_queue_p): Likewise.
9944 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9946         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9947         * cp-tree.h (cxx_mark_tree): New.
9948         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
9950 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9952         * cp-tree.h (cxx_maybe_build_cleanup): New.
9953         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
9954         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
9955         * tree.c (build_target_expr): Update.
9956         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
9958 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
9960         * decl2.c (cxx_decode_option): Handle -E.
9961         * lang-specs.h (default_compilers): Preprocess with cc1plus.
9962         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
9964 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
9966         PR c++/6037
9967         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
9969 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9971         * error.c (dump_type): Be careful about implicit typenames.
9973 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9975         PR C++/3656
9976         * semantics.c (finish_base_specifier): Handle erronous base
9977         classes.
9979 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
9981         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
9982         REAL_IS_NOT_DOUBLE.
9984 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
9986         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
9987         an index into the vtable_entry array regardless of
9988         TARGET_PTRMEMFUNC_VBIT_LOCATION.
9990 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
9992         * tree.c (cp_cannot_inline_tree_fn): Same.
9994 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9996         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9997         insert_block, getdecls, global_bindings_p): New.
9999 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
10001         PR c++/4361
10002         * mangle.c (struct globals) Add internal_mangling_p member.
10003         (write_template_param): Do internal mangling, if needed.
10004         (mangle_conv_op_name_for_type): Request internal mangling.
10006 2002-03-20  Jason Merrill  <jason@redhat.com>
10008         PR c++/2136
10009         * init.c (build_delete): Check access for a member op delete here.
10010         * decl2.c (delete_sanity): Not here.
10012 2002-03-19  Jason Merrill  <jason@redhat.com>
10014         PR c++/5118
10015         * class.c (get_vfield_name): Use the constructor_name.
10017 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
10019         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
10020         * cp-tree.h (lang_printable_name): Rename.
10021         * error.c (lang_decl_name): Use new hook.
10022         * lex.c (cxx_init): Remove old hook.
10023         * pt.c (tsubst_decl): Use new hook.
10024         * tree.c (lang_printable_name): Rename.
10026 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
10028         PR c++/3882
10029         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
10030         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
10031         only after recording the declaration.
10033 2002-03-18  Jason Merrill  <jason@redhat.com>
10035         PR c++/2039
10036         * init.c (resolve_offset_ref): Hand off to build_component_ref.
10038         PR c++/4222, c++/5995
10039         * call.c (build_over_call): Fix empty class logic.
10041         PR c++/3870
10042         * cp-tree.h (struct saved_scope): Add last_parms field.
10043         * decl.c (maybe_push_to_top_level): Save last_function_parms.
10044         (pop_from_top_level): Restore it.
10046         PR c++/4377
10047         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
10048         NON_LVALUE_EXPRs.
10050         PR c++/4003
10051         * pt.c (tsubst_friend_function): Use decl_namespace_context.
10053         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
10054         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
10055         type with a nontrivial destructor.
10057 2002-03-17  Jason Merrill  <jason@redhat.com>
10059         PR c++/4460
10060         * class.c (build_base_path): Virtual base layout is fixed in
10061         in-charge [cd]tors.
10063 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
10065         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
10066         * parse.y (yyparse): Remove macro.
10068 2002-03-17  Jason Merrill  <jason@redhat.com>
10070         PR c++/5757
10071         * init.c (build_new_1): Pass the right pointer to op delete.
10073 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
10075         PR c++/4361
10076         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
10077         conversion operators go.
10078         (struct lang_decl_flags): Add template_conv_p and unused
10079         bitfields.
10080         (DECL_TEMPLATE_CONV_FN_P): New macro.
10081         * call.c (build_user_type_conversion_1): Don't check second type
10082         conversion of overload set first.
10083         * class.c (add_method): Make sure templated conversion operators
10084         all end up on slot 2.
10085         * lex.c (do_identifier): A conversion operator token might be
10086         satisfied by a templated conversion operator.
10087         * pt.c (check_explicit_specialization): Use
10088         CLASSTYPE_FIRST_CONVERSION_SLOT.
10089         (template_parm_this_level_p): New function.
10090         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
10091         * search.c (lookup_fnfields_1): Template conversions will be on
10092         the first slot.
10093         * typeck.c (build_component_ref): Preserve the type of an
10094         conversion operator name on the overload type.
10095         (build_x_function_call): Retrieve the conversion operator name.
10097 2002-03-15  Richard Henderson  <rth@redhat.com>
10099         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
10101 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
10103         * cp-tree.h (CLEANUP_DECL): Remove.
10104         (CLEANUP_EXPR): Likewise.
10105         * decl.c (destroy_local_var): Simplify.
10106         (maybe_build_cleanup): Tidy.
10107         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
10108         * semantics.c (cp_expand_stmt): Likewise.
10109         * cp/tree.c (cp_statement_code_p): Likewise.
10111 2002-03-15  Jason Merrill  <jason@redhat.com>
10113         PR c++/5857
10114         * decl.c (duplicate_decls): Use merge_types instead of common_type.
10115         * typeck.c (common_type): Just hand off to
10116         type_after_usual_arithmetic_conversions and
10117         composite_pointer_type.
10118         (merge_types): New fn.
10119         (commonparms): Use it instead of common_type.
10120         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
10121         (composite_pointer_type): Also handle attributes.
10122         * cp-tree.h: Declare merge_types.
10124         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
10125         variables.
10126         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
10128 2002-03-14  Richard Henderson  <rth@redhat.com>
10130         * decl.c: Include c-pragma.h.
10131         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
10132         * Make-lang.in: Update dependencies.
10134 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
10136         PR c++/5908
10137         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
10138         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
10140 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
10142         * mangle.c (write_builtin_type): Handle 128-bit integers even if
10143         they are not a standard integer type.
10145 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
10147         * cp-tree.h (init_init_processing): Remove declaration.
10148         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
10149         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
10151 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10153         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
10154         Define.
10155         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
10156         tree_code_length.
10157         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
10158         cplus_tree_code_name): Delete.
10159         (cxx_init): Don't call add_c_tree_codes, instead set
10160         lang_unsafe_for_reeval.  Don't try to copy into the various
10161         tree_code arrays.
10163 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
10165         PR c++/5659
10166         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
10167         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
10168         definitions.
10170 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
10172         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
10173         DR209 is now not a defect.
10174         * cp-tree.h (skip_type_access_control): Remove.
10175         * decl.c (grokdeclarator): Do type access control for friend
10176         declarations.
10177         * semantics.c (decl_type_access_control): Don't reset
10178         current_type_lookups.
10179         (save_type_access_control): Always save the lookups.
10180         (skip_type_access_control): Remove.
10181         (finish_class_definition): Don't change type_lookups.
10183 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
10185         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
10186         It is incorrect.
10187         * typeck.c (build_static_cast): Compare non-qualified types
10188         with pointer to member conversions.
10190 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
10191             Daniel Berlin  <dan@dberlin.org>
10193         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
10194         (cxx_get_alias_set): Use it.
10196 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10198         * cp-tree.h (stabilize_expr): Prototype.
10200 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10202         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
10203         conditional return void.
10205 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10207         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
10208         * cp-tree.h (cxx_unsave): New.
10209         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
10210         (init_tree): Update.
10212 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10214         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
10215         explicit sizeof/sizeof.
10216         * decl2.c (cxx_decode_option): Likewise.
10217         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
10219 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
10221         PR c++/775
10222         * decl.c (lookup_tag): Only reject enum/class mismatch, not
10223         class/union mismatch.
10224         * parse.y (check_class_key): New function.
10225         (structsp): Call it.
10227 2002-03-01  Michael Matz  <matz@suse.de>
10229         * typeck.c (cp_pointer_int_sum): Complete inner type which is
10230         used later by size_in_bytes().
10232 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
10234         * cp-tree.h:  Require __GNUC__ to be #defined.
10235         (build_init):  Add missing prototype.
10237 2002-03-01  Jason Merrill  <jason@redhat.com>
10239         * except.c: Don't include decl.h or obstack.h.  Do include
10240         tree-inline.h.
10241         (build_throw): Destroy temporaries from the thrown
10242         expression before calling __cxa_throw.  Construct a thrown
10243         temporary directly into the exception object.
10244         (stabilize_throw_expr): New function.
10245         (wrap_cleanups_r): New function.
10246         * tree.c (stabilize_expr): New function.
10247         * init.c (build_init): New function.
10248         * Make-lang.in (cp/except.o): Adjust .h deps.
10250 2002-02-28  Jason Merrill  <jason@redhat.com>
10252         * search.c (lookup_base_r): Don't clear is_non_public just because
10253         we found a friendly scope.
10255         * decl.c (finish_function): Only warn about missing return
10256         statement with -Wreturn-type.
10258 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
10260         * class.c (build_clone): Update.
10261         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
10262         * cp-tree.h (cxx_dup_lang_specific_decl): New.
10263         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
10264         (copy_decl): Update.
10265         * method.c (make_thunk): Update.
10267 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
10269         * decl2.c: Delete traditional-mode-related code copied from
10270         the C front end but not used, or used only to permit the
10271         compiler to link.
10273 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
10275         PR c++/4093
10276         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
10277         to void.
10279 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
10281         PR other/5746
10282         * semantics.c (finish_switch_cond): Don't call get_unwidened
10283         if error_mark_node.
10285 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
10287         PR c++/2645, DR 295
10288         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
10289         tf_keep_type_decl.
10290         (make_typename_type): Use tsubst_flags_t.
10291         * decl.c (make_typename_type): Adjust. Return non-artificial
10292         TYPE_DECLs, if required.
10293         (grokdeclarator): Simplify CVR qualification handling. Allow bad
10294         qualifiers on typedef types.
10295         * decl2.c (handle_class_head): Adjust make_typename_type call.
10296         * parse.y (nested_name_specifier): Likewise.
10297         (typename_sub0): Likewise.
10298         (typename_sub1): Likewise.
10299         * pt.c (convert_template_argument): Adjust make_typename_type
10300         return value.
10301         (tsubst): Adjust cp_build_qualified_type_real calls.
10302         (check_cv_quals_for_unify): Cope with allowing bad qualifications
10303         on template type parms.
10304         (instantiate_decl): Recheck substitutions to give warnings on bad
10305         qualifications.
10306         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
10308 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
10310         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
10312         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
10313         unless DECL_ALWAYS_INLINE.
10315 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
10317         * typeck.c (cp_pointer_int_sum): Renamed from
10318         pointer_int_sum, call pointer_int_sum.
10320 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
10322         * decl.c (duplicate_decls): Return 0 if issued error about
10323         redeclaration.
10325 2002-02-19  Jason Merrill  <jason@redhat.com>
10327         ABI change: Mangle `void (A::*)() const' as
10328         M1AKFvvE, not MK1AFvvE.
10329         * mangle.c (write_function_type): Write cv-quals for member
10330         function type here.
10331         (write_pointer_to_member_type): Not here.
10333 2002-02-18  Jason Merrill  <jason@redhat.com>
10335         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
10336         (do_decl_instantiation): Likewise.
10338 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10340         PR c++/5685
10341         * decl.c (duplicate_decls): Make warning unconditional
10342         if duplicate default argument declarations are present.
10344 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
10346         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
10347         shortening.
10349 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
10351         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
10352         remove incorrect comment. Move #if 0'd code to common path. Use
10353         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
10355 2002-02-13  Jason Merrill  <jason@redhat.com>
10357         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
10358         (finish_function): Don't warn if current_function_returns_null.
10360         * typeck2.c (digest_init): Do handle values of vector type.
10362         * typeck2.c (digest_init, process_init_constructor): Treat vectors
10363         like arrays.
10365 2002-02-11  Jason Merrill  <jason@redhat.com>
10367         * parse.y (reserved_declspecs): Don't handle attributes.
10368         (reserved_typespecquals): Handle them here.
10369         * Make-lang.in (parse.c): Adjust expected conflicts.
10371 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
10373         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
10374         instead of compstmt.
10375         (compstmt_or_stmtexpr): Renamed from compstmt.
10376         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
10378 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
10380         Rename instantiate_type_flags to tsubst_flags_t & expand use.
10381         * cp-tree.h (instantiate_type_flags): Rename to ...
10382         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
10383         add tf_warning flag.
10384         (instantiate_type): Adjust prototype.
10385         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
10386         do_type_instantiation, cp_build_qualified_type_real): Likewise.
10387         cp_build_qualified_type: Adjust.
10388         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
10389         tf_*.
10390         * call.c (standard_conversion): Rename itf_* to tf_*.
10391         (reference_binding): Likewise.
10392         (convert_like_real): Likewise.
10393         * cvt.c (cp_convert_to_pointer): Likewise.
10394         (convert_to_reference): Likewise.
10395         * decl.c (lookup_namespace_name): Use tf_* flags.
10396         (make_typename_type): Likewise.
10397         (grokdeclarator): Likewise.
10398         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
10399         (coerce_template_template_parms, convert_template_argument,
10400         coerce_template_parms, maybe_get_template_decl_from_type_decl,
10401         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
10402         instantiate_class_template, tsubst_template_arg_vector,
10403         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
10404         tsubst_decl, tsubst_arg_types, tsubst_function_type,
10405         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
10406         instantiate_template, fn_type_unification,
10407         resolve_overloaded_unification, verify_class_unification,
10408         unify, get_bindings_real, do_type_instantiation,
10409         regenerate_decl_from_template, instantiate_decl,
10410         tsubst_initializer_list, tsubst_enum,
10411         get_mostly_instantiated_function_type,
10412         invalid_nontype_parm_type_p): Likewise.
10413         * tree.c (cp_build_qualified_type_real): Likewise.
10414         * typeck.c (build_binary_op): Rename itf_* to tf_*.
10415         (build_ptrmemfunc): Likewise.
10416         (convert_for_assignment): Likewise.
10418 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
10420         PR c++/109
10421         * decl.c (grokdeclarator): Allow friend declarations from
10422         dependent types.
10423         * decl2.c (handle_class_head): Don't push into template parm contexts.
10424         * pt.c (push_template_decl_real): Template parm contexts are never
10425         being defined.
10427 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
10429         * class.c: Include target.h.
10430         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
10431         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
10432         bit-field layout.
10433         * Make-lang.in: Adjust deps.
10435 2002-02-05  Jason Merrill  <jason@redhat.com>
10437         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
10439 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
10441         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
10442         (finish_switch_cond): Set SWITCH_TYPE.
10444 2002-02-04  Richard Henderson  <rth@redhat.com>
10446         * method.c (use_thunk): Always initialize the block tree.  Reindent.
10447         * semantics.c (expand_body): Emit thunks after function, not before.
10449 2002-02-04  Jason Merrill  <jason@redhat.com>
10451         * decl.c (start_function): Call cplus_decl_attributes immediately
10452         after grokdeclarator.
10454         * decl.c (start_function): Combine DECL_RESULT handling code.
10456 2002-02-03  Jason Merrill  <jason@redhat.com>
10458         * xref.c: Remove.
10459         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
10460         (cp/xref.o): Remove dependencies.
10461         * class.c (finish_struct_1, check_methods): Don't call xref fns.
10462         (finish_struct_1): Likewise.
10463         * friend.c (make_friend_class): Likewise.
10464         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
10465         * spew.c (read_process_identifier): Likewise.
10467 2002-02-01  Jason Merrill  <jason@redhat.com>
10469         PR c++/4872
10470         * decl.c (finish_function): Warn about a non-void function with
10471         no return statement and no abnormal exit.
10472         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
10473         (current_function_returns_abnormally): New macro.
10474         * call.c (build_call): Set it.
10476         * typeck.c (build_component_ref): Always complain about offsetof
10477         constructs on non-PODs.  Only make it an error for members of
10478         virtual bases.
10480         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
10481         (dump_function_decl): Always dump parms.
10483         * decl2.c (finish_static_data_member_decl): Complain about a local
10484         class with a static data member.
10486         PR c++/4286
10487         * search.c (lookup_field_1): Don't xref a static data member
10488         just because we looked it up.
10490 2002-01-31  Jason Merrill  <jason@redhat.com>
10492         * Make-lang.in (parse.c): Handle .output file.
10494         PR c++/3395
10495         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
10496         not TREE_TYPE.
10497         * semantics.c (finish_class_definition): Adjust.
10499         Allow attributes in parms and casts.
10500         * parse.y (named_parm): Don't strip attrs.
10501         (declmods): Remove 'attributes' production.
10502         (nonempty_cv_qualifiers): Accept attributes.
10503         (ATTRIBUTE): Give precedence.
10504         * decl.c (groktypename): Handle attributes.
10505         (grokparms): Likewise.
10507 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
10509         * decl2.c (cxx_decode_option): Pass 0 as last argument to
10510         cpp_handle_option.
10511         * lang-specs.h: Use cpp_unique_options instead of cpp_options
10512         when used together with cc1_options.
10514 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
10516         PR c++/5132
10517         * typeck2.c (digest_init): Make sure non-array core type is
10518         instantiated.
10519         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
10520         constructor, rather than build a new one.
10521         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
10522         PURPOSE of constructor elts.
10524 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10526         * Make-lang.in (parse.c): Adjust expected number of
10527         shift-reduce conflicts.
10528         (decl.o): Depend on diagnostic.h.
10529         * decl.c: Include diagnostic.h.
10530         (grokdeclarator): Check for null pointer.
10531         (finish_function): Don't abort when
10532         current_binding_level->parm_flag != 1, if errors have
10533         occurred; throw away the statement tree and extra binding
10534         levels, and continue.
10535         * lex.c (note_list_got_semicolon): Check for null pointer.
10536         * method.c (hack_identifier): Just return error_mark_node if
10537         value is error_mark_node.
10538         * parse.y (primary: TYPEID(type_id)): No need to use
10539         TYPE_MAIN_VARIANT here.
10540         (handler_seq): Accept an empty list of catch clauses and
10541         generate a fake handler block to avoid later crashes.
10542         (ansi_raise_identifier): Accept the error token too.
10543         * semantics.c (begin_class_definition,
10544         finish_class_definition): Check for error_mark_node.
10546 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
10548         * typeck2.c (friendly_abort): Delete definition.
10549         * cp-tree.h (friendly_abort): Don't prototype.
10550         (my_friendly_assert): Use fancy_abort.
10552 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10554         * cp-tree.h (my_friendly_abort): Remove.
10556 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
10558         * spew.c (pending_inlines, pending_inlines_tail,
10559         processing_these_inlines): Make static.
10560         (mark_pending_inlines): Remove static.
10561         (begin_parsing_inclass_inline): If in function, save pi
10562         for GC to cp_function_chain->unparsed_inlines instead.
10563         (process_next_inline): Likewise.
10564         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
10565         (mark_pending_inlines): Add prototype.
10566         * decl.c (spew_debug): Remove unused extern.
10567         (mark_lang_function): Call mark_pending_inlines.
10569 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
10571         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
10572         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
10573         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
10574         Change my_fancy_abort() to abort().
10576 2002-01-23  Jason Merrill  <jason@redhat.com>
10578         PR c++/5453
10579         * class.c (fixed_type_or_null): Fix thinko.
10581         PR c++/3331
10582         * init.c (resolve_offset_ref): Use build_indirect_ref.
10584         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
10586 2002-01-22  Jason Merrill  <jason@redhat.com>
10588         * parse.y (function_body): Suppress the block for the outermost
10589         curly braces.
10590         * decl.c (pushdecl): Don't try to skip it.
10591         (begin_function_body): Keep the block we create, not the next one.
10592         * init.c (emit_base_init): Don't mess with keep_next_level.
10594         * class.c (build_base_path): Tweak formatting.
10596 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
10598         Fix regression introduced with patch for c++/775
10599         * parse.y (class_head_defn): Check for template specializations
10600         with a different class-key.
10602 2002-01-17  Jason Merrill  <jason@redhat.com>
10604         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
10605         (begin_function_body): Call them and keep_next_level.
10606         * init.c (emit_base_init): Call keep_next_level.
10607         * semantics.c (setup_vtbl_ptr): Lose.
10608         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
10609         (vtbls_set_up_p): Lose.
10610         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
10611         * method.c (do_build_copy_constructor): Likewise.
10612         (synthesize_method): Call finish_mem_initializers.
10613         * parse.y (nodecls): Likewise.
10615         * error.c (dump_type_suffix): Print the exception specs before
10616         recursing.
10617         (dump_function_decl): Here, too.
10619         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
10621 2002-01-10  Ira Ruben   <ira@apple.com>
10623         PR c++/907
10624         * decl.c (start_method): Handle attrlist.
10626 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
10628         * decl2.c (max_tinst_depth): Increase default limit to 500.
10630 2002-01-10  Graham Stott  <grahams@redhat.com>
10632         * spew.c (YYCHAR): Uppercase macro parameter and add
10633         parenthesis.
10634         (YYCODE): Likewise.
10635         (NAME): Uppercase macro parameter.
10637 2002-01-09  Graham Stott  <grahams@redhat.com>
10639         * decl.h (grokdeclarator): Wrap long line.
10641         * semantics.c (FINISH_COND): Uppercase macro paramaters and
10642         add parenthesis.
10644 2002-01-08  Graham Stott  <grahams@redhat.com>
10646         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
10647         (PALLOC): Uppercase macro parameter and whitespace.
10648         (SALLOC): Uppercase macro parameter.
10649         (SFREE): Uppercase macros parameter, add parenthese and
10650         whitespace.
10651         (STREQL): Uppercase macro parameter and whitespace.
10652         (STRNEQ): Likewise.
10653         (STRLSS): Likewise.
10654         (STRLEQ): Likewise.
10655         (STRGTR): Likewise.
10656         (STRGEQ): Likewise.
10658         * call.c (convert_like): Add parenthesis and wrap.
10659         (convert_like_with_context): Likewise.
10660         (ICS_RANK): Whitespace.
10661         (NEED_TEMPORARY_P): Remove parenthesis.
10663         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
10664         whitespace.
10665         (VTT_MARKED_BINFO_P): Likewise.
10667         * decl.c (BINDING_LEVEL): Add parenthesis.
10668         (DEF_OPERATOR): Likewise.
10670         * mangle.c (MANGLE_TRACE): Add parenthesis.
10671         (MANGLE_TRACE_TREE): Likewise.
10672         (write_signed_number): Likewise.
10673         (write_unsigned_number): Likewise.
10675         * pt.c (ccat): Uppercase macro parameter.
10676         (cat): Likewise
10678         * search.c (SET_BINFO_ACCESS): Add parenthesis.
10680 2002-01-07  Jason Merrill  <jason@redhat.com>
10682         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
10683         to pedwarn.
10685         PR c++/3536
10686         * method.c (make_thunk): If !flag_weak, give the thunk the
10687         function's linkage.
10688         (use_thunk): Here, too.
10690 2002-01-07  Graham Stott  <grahams@redhat.com>
10692         * error.c: Update copyright date.
10693         (print_scope_operator): Add parenthesis.
10694         (print_left_paren): Likewise.
10695         (print_right_paren): Likewise.
10696         (print_left_bracket): Likewise.
10697         (print_right_bracket): Likewise.
10698         (print_template_argument_list_start): Likewise.
10699         (print_template_argument_list_end): Likewise.
10700         (print_non_consecutive_character): Likewise.
10701         (print_tree_identifier): Likewise.
10702         (print_identifier): Likewise.
10703         (NEXT_CODE): Uppercase macro parameter.
10704         (ident_fndecl): Delete unused.
10705         (GLOBAL_THING): Likewise.
10707 2002-01-06  Graham Stott  <grahams@redhat.com>
10709         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
10710         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
10711         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
10712         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
10713         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
10714         (C_IS_RESERVED_WORD): Uppercase macro parameter.
10715         (C_RID_YYCODE) Likewise.
10716         (ptrmem_cst): Use rtx.
10717         (LOCAL_BINDING_P): Add whitespace.
10718         (INHERITED_VALUE_BINDING_P): Likewise.
10719         (BINDING_SCOPE): Wrap long line.
10720         (BINDING_HAS_LEVEL_P): Remove parenthesis.
10721         (BINDING_VALUE): Wrap long line.
10722         (BINDING_TYPE): Whitespace.
10723         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
10724         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
10725         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
10726         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
10727         (same_type_p): Uppercase macro parameters.
10728         (same_type_ignoring_top_level_qualifiers_p): Likewise.
10729         (OVL_FUNCTION): Wrap long line.
10730         (OVL_CHAIN): Whitespace.
10731         (OVL_CURRENT): Add parenthesis and whitespace.
10732         (OVL_NEXT): Whitespace.
10733         (OVL_USED): Likewise.
10734         (IDENTIFIER_TYPE_VALUE): Likewise.
10735         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
10736         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
10737         (LANG_ID_FIELD): Whitespace.
10738         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
10739         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
10740         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
10741         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
10742         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
10743         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
10744         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
10745         (IDENTIFIER_VIRTUAL_P): Likewise.
10746         (IDENTIFIER_OPNAME_P): Likewise.
10747         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
10748         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
10749         (C_SET_EXP_ORIGINAL_CODE): Likewise.
10750         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
10751         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
10752         (IS_AGGR_TYPE): Uppercase macro parameter.
10753         (CLASS_TYPE_P): Likewise.
10754         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
10755         (IS_AGGR_TYPE_2): Whitespace.
10756         (TAGGED_TYPE_P): Uppercase macro parameter.
10757         (TYPE_BUILT_IN): Whitespace.
10758         (TYPE_FOR_JAVA): Likewise.
10759         (FUNCTION_ARG_CHAIN): Remove parenthesis.
10760         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
10761         (FUNCTION_FIRST_USER_PARAM): Likewise.
10762         (PROMOTES_TO_AGGR_TYPE): Whitespace.
10763         (DERIVED_FROM_P): Add parenthesis and wrap.
10764         (UNIQUELY_DERIVED_FROM_P): Likewise.
10765         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
10766         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
10767         (CLASSTYPE_USE_TEMPLATE): Whitespace.
10768         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
10769         (TYPE_GETS_DELETE): Add parenthesis.
10770         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
10771         (TYPE_HAS_ASSIGN_REF): Likewise,
10772         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
10773         (TYPE_HAS_INIT_REF): Likewise.
10774         (TYPE_HAS_CONST_INIT_REF): Likewise.
10775         (TYPE_BEING_DEFINED): Likewise.
10776         (TYPE_LANG_SPECIFIC): Likewise.
10777         (CLASSTYPE_RTTI): Likewise.
10778         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
10779         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
10780         (TYPE_OVERLOADS_ARROW): Likewise.
10781         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
10782         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
10783         (CLASSTYPE_METHOD_VEC): Likewise.
10784         (CLASSTYPE_MARKED_N): Likewise.
10785         (CLASSTYPE_MARKED): Likewise.
10786         (CLASSTYPE_MARKED2): Likewise.
10787         (CLASSTYPE_MARKED3): Likewise.
10788         (CLASSTYPE_MARKED4): Likewise.
10789         (CLASSTYPE_MARKED5): Likewise.
10790         (CLASSTYPE_MARKED6): Likewise.
10791         (SET_CLASSTYPE_MARKED): Whitespace.
10792         (CLEAR_CLASSTYPE_MARKED): Likewise.
10793         (SET_CLASSTYPE_MARKED2): Likewise.
10794         (CLEAR_CLASSTYPE_MARKED2): Likewise.
10795         (SET_CLASSTYPE_MARKED3): Likewise.
10796         (CLEAR_CLASSTYPE_MARKED3): Likewise.
10797         (SET_CLASSTYPE_MARKED4): Likewise.
10798         (CLEAR_CLASSTYPE_MARKED4): Likewise.
10799         (SET_CLASSTYPE_MARKED5): Likewise.
10800         (CLEAR_CLASSTYPE_MARKED5): Likewise.
10801         (SET_CLASSTYPE_MARKED6): Likewise.
10802         (CLEAR_CLASSTYPE_MARKED6): Likewise.
10803         (CLASSTYPE_TAGS): Likewise.
10804         (CLASSTYPE_VSIZE): Likewise.
10805         (CLASSTYPE_VBASECLASSES): Likewise.
10806         (CANONICAL_BINFO): Add parenthesis.
10807         (CLASSTYPE_SIZE(NODE): Likewise.
10808         (CLASSTYPE_SIZE_UNIT): Likewise.
10809         (CLASSTYPE_ALIGN(NODE): Likewise.
10810         (CLASSTYPE_USER_ALIGN): Likewise.
10811         (TYPE_JAVA_INTERFACE): Likewise.
10812         (CLASSTYPE_PURE_VIRTUALS): Likewise.
10813         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
10814         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
10815         (CLASSTYPE_HAS_MUTABLE): Likewise.
10816         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
10817         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
10818         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
10819         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
10820         (CLASSTYPE_INTERFACE_ONLY): Likewise.
10821         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
10822         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10823         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
10824         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
10825         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
10826         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
10827         (BINFO_UNSHARED_MARKED): Whitespace.
10828         (BINFO_MARKED): Whitespace and wrap.
10829         (SET_BINFO_MARKED): Likewise.
10830         (CLEAR_BINFO_MARKED): Likewise.
10831         (BINFO_VTABLE_PATH_MARKED): Likewise.
10832         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
10833         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
10834         (BINFO_SUBVTT_INDEX): Remove parenthesis.
10835         (BINFO_VPTR_INDEX): Likewise.
10836         (BINFO_PRIMARY_BASE_OF): Likewise,
10837         (CLASSTYPE_VFIELDS): Whitespace.
10838         (VF_DERIVED_VALUE): Wrap long line.
10839         (NAMESPACE_LEVEL): Whitespace.
10840         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
10841         (DEFARG_POINTER): Whitespace.
10842         (DECL_NEEDED_P): Remove parenthesis.
10843         (DECL_LANGUAGE): Whitespace.
10844         (SET_DECL_LANGUAGE): Add parenthesis.
10845         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
10846         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
10847         (DECL_IN_AGGR_P): Whitespace.
10848         (DECL_FRIEND_P): Likewise.
10849         (DECL_BEFRIENDING_CLASSES): Likewise.
10850         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
10851         (DECL_NONCONVERTING_P): Whitespace.
10852         (DECL_PURE_VIRTUAL_P): Likewise.
10853         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
10854         (DECL_PENDING_INLINE_INFO): Whitespace.
10855         (DECL_SORTED_FIELDS): Likewise.
10856         (DECL_DEFERRED_FN): Likewise.
10857         (DECL_TEMPLATE_INFO): Likewise.
10858         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
10859         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
10860         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
10861         (TMPL_ARGS_LEVEL): Likewise.
10862         (SET_TMPL_ARGS_LEVEL): Likewise.
10863         (INNERMOST_TEMPLATE_PARMS): Whitespace.
10864         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
10865         (INTEGRAL_CODE_P(CODE): Add parenthesis.
10866         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
10867         (TYPE_HAS_CONSTRUCTOR): Whitespace.
10868         (TREE_HAS_CONSTRUCTOR): Likewise.
10869         (TYPE_HAS_DESTRUCTOR): Likewise.
10870         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
10871         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
10872         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
10873         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
10874         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
10875         (TYPE_PTRMEMFUNC_P): Likewise.
10876         (TYPE_PTRMEMFUNC_FLAG): Likewise.
10877         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
10878         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
10879         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
10880         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
10881         (DECL_ACCESS): Whitespace.
10882         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
10883         (DECL_GLOBAL_DTOR_P): Likewise.
10884         (GLOBAL_INIT_PRIORITY): Likewise.
10885         (DECL_TEMPLATE_PARMS): Likewise.
10886         (DECL_TEMPLATE_RESULT): Likewise.
10887         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
10888         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
10889         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
10890         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
10891         (PRIMARY_TEMPLATE_P): Add parenthesis.
10892         (DECL_USE_TEMPLATE): Whitespace.
10893         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10894         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
10895         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10896         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
10897         (CALL_DECLARATOR_PARMS): Remove parenthesis.
10898         (CALL_DECLARATOR_QUALS): Likewise.
10899         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
10900         (TEMP_NAME_P): Wrap.
10901         (VFIELD_NAME_P): Likewise.
10902         (B_SET): Uppercase macro parameters and add parenthesis.
10903         (B_CLR): Likewise.
10904         (B_TST): Likewise.
10905         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
10906         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
10907         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
10908         (same_or_base_type_p): Likewise.
10909         (cp_deprecated): Likewise.
10911 2002-01-05  Richard Henderson  <rth@redhat.com>
10913         * semantics.c (expand_body): Revert last change.
10915 2002-01-04  Jason Merrill  <jason@redhat.com>
10917         PR c++/4122
10918         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10919         lost primary.
10921         * class.c (build_vtbl_initializer): Check for a lost primary
10922         before calculating the vtable entry to throw away.
10924 2002-01-02  Jason Merrill  <jason@redhat.com>
10926         * semantics.c (expand_body): Call outlining_inline_function when
10927         emitting an inline function out of line.
10929 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10931         PR c++/5116, c++/764 reversion
10932         * call.c (build_new_op): Revert the instantiations. They are
10933         incorrect.
10935 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10937         PR c++/5089
10938         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
10940 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10942         PR c++/3716
10943         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
10944         (tsubst, case POINTER_TYPE): Handle pmfs here.
10945         (tsubst, case OFFSET_TYPE): Check it is not an offset to
10946         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
10948 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10950         PR c++/35
10951         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
10952         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
10953         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
10954         PARM_DECL.
10955         (tsubst_template_parms): Break up loop statements.
10956         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
10957         parm PARM_DECLs don't get promoted.
10959 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10961         PR c++/5123
10962         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
10963         (build_x_function_call): Cope with a COMPONENT_REF containing a
10964         TEMPLATE_ID_EXPR.
10966 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10968         PR c++/5213
10969         * pt.c (convert_template_argument): Be more careful determining
10970         when RECORD_TYPE templates are or are not templates.
10972 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10974         PR c++/775
10975         * cp-tree.h (handle_class_head): Adjust prototype.
10976         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
10977         parameters. Use for all class heads.
10978         * parse.y (named_class_head_sans_basetype, named_class_head,
10979         named_complex_class_head_sans_basetype,
10980         named_class_head_sans_basetype_defn,
10981         unnamed_class_head): Remove.
10982         (class_head, class_head_apparent_template): Recognize class heads
10983         (class_head_decl, class_head_defn): New reductions. Process class
10984         heads.
10985         (structsp): Adjust class definition and class declaration
10986         reductions.
10987         (maybe_base_class_list): Give diagnostic on empty list.
10989 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10991         PR c++/4379
10992         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
10993         single non-static member.
10994         (unary_complex_lvalue): If it cannot be a pointer to member, don't
10995         make it so. Check it is not pointer to reference.
10997 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
10999         PR c++/5132
11000         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
11001         are processing a template decl.
11003 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
11005         PR c++/5116, c++/764
11006         * call.c (build_new_op): Make sure template class operands are
11007         instantiated. Simplify arglist construction.
11009 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
11011         * call.c (build_user_type_conversion_1): Use my_friendly_assert
11012         rather than if ... abort.
11013         * cvt.c (convert_to_reference): Likewise.
11014         * semantics.c (setup_vtbl_ptr): Likewise.
11015         * pt.c (lookup_template_class): Comment typo.
11017 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
11019         PR c++/5125
11020         * pt.c (push_template_decl_real): Make sure DECL has
11021         DECL_LANG_SPECIFIC.
11023 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
11025         PR c++/335
11026         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
11027         for non-reference fields.
11028         * typeck.c (require_complete_type): Use resolve_offset_ref).
11030 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
11032         PR c++/196
11033         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
11035 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
11037         PR c++/160
11038         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
11039         up. Don't stabilize_references when initializing a reference.
11041 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11043         * decl2.c (lang_f_options): Const-ify.
11045 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
11047         * config-lang.in (diff_excludes): Remove.
11049 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
11051         PR c++/90
11052         * typeck.c (build_function_call_real): Use original function
11053         expression for errors.
11055 2001-12-18  Jason Merrill  <jason@redhat.com>
11057         PR c++/3242
11058         * class.c (add_method): Do compare 'this' quals when trying to match a
11059         used function.  Don't defer to another used function.
11061 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
11063         * pt.c (instantiate_clone): Remove, fold into ...
11064         (instantiate_template): ... here. Simplify by removing mutual
11065         recursion.
11066         * typeck2.c (build_m_component_ref): Don't cv qualify the function
11067         pointed to by a pointer to function.
11068         * class.c (delete_duplicate_fields_1): Typo.
11070 2001-12-18  Jason Merrill  <jason@redhat.com>
11072         C++ ABI change: destroy value arguments in caller.
11073         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
11074         create an extra binding level for the parameters.
11075         * decl.c (store_parm_decls): Don't do parameter cleanups.
11077 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
11079         * call.c (build_new_method_call): Use '%#V'.
11080         * error.c (cv_to_string): Use V parameter to determine padding.
11082 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
11084         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
11085         spellings in messages.
11087 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
11089         * cp-tree.h: Delete #defines for cp_error, cp_warning,
11090         cp_pedwarn, and cp_compiler_error.
11091         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
11092         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
11093         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
11094         typeck2.c: Change calls to the above macros to use their
11095         language-independent equivalents: error, warning, pedwarn, and
11096         internal_error respectively.
11098 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
11100         * decl2.c (finish_file): Remove back_end_hook.
11102 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
11104         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
11105         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
11106         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
11108 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
11110         * lang-options.h: Use American spelling in messages.
11112 2001-12-13  Jason Merrill  <jason@redhat.com>
11114         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
11116         Use cleanups to run base and member destructors.
11117         * init.c (push_base_cleanups): New function, split out from...
11118         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
11119         * decl.c (finish_destructor_body): Move vbase destruction code to
11120         push_base_cleanups.
11121         (begin_function_body, finish_function_body): New fns.
11122         (finish_function): Move [cd]tor handling and call_poplevel to
11123         finish_function_body.
11124         (pushdecl): Skip the new level.
11125         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
11126         (setup_vtbl_ptr): Call push_base_cleanups.
11127         * method.c (synthesize_method): Call {begin,end}_function_body.
11128         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
11129         * cp-tree.h: Declare new fns.
11130         * parse.y (function_body, .begin_function_body): New nonterminals.
11131         (fndef, pending_inline, function_try_block): Use function_body.
11132         (ctor_initializer_opt, function_try_block): No longer has a value.
11133         (base_init): Remove .set_base_init token.
11134         (.set_base_init, compstmt_or_error): Remove.
11135         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
11137         * optimize.c (maybe_clone_body): Fix parameter updating.
11139 2001-12-12  Jason Merrill  <jason@redhat.com>
11141         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
11142         * semantics.c (genrtl_start_function): Don't pass
11143         parms_have_cleanups or push an extra binding level.
11144         (genrtl_finish_function): Lose cleanup_label cruft.
11146         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
11147         (ctor_label): Remove.
11148         * semantics.c (finish_return_stmt): Lose ctor_label support.
11149         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
11150         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
11151         dtor_label.
11153         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
11154         check for [cd]tors.
11155         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
11157         * decl.c (finish_function): Check VMS_TARGET, not VMS.
11159         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
11160         (end_cleanup_fn): And poplevel.
11162         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
11163         if we're in a template.
11165 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
11167         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
11168         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
11169         THIS_NAME_P): Delete.
11170         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
11171         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
11172         with internal naming scheme.
11173         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
11175 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
11177         * decl.c (grokdeclarator): Deprecated implicit typename use.
11179 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
11181         PR g++/51
11182         * parse.y (frob_specs): Indicate it is a language linkage which
11183         contained the extern.
11184         * decl.c (grokdeclarator): Allow extern language linkage with
11185         other specifiers.
11187 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
11189         PR g++/72
11190         * decl.c (add_binding): Don't reject duplicate typedefs involving
11191         template parameters.
11193 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
11195         * parse.y, semantics.c: Similarly.
11197 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
11199         PR g++/87
11200         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
11201         (copy_args_p): Rename to ...
11202         (copy_fn_p): ... here.
11203         (grok_special_member_properties): New function.
11204         (grok_op_properties): Lose VIRTUALP parameter.
11205         (copy_assignment_arg_p): Remove.
11206         * call.c (build_over_call): Use copy_fn_p.
11207         * decl.c (grokfndecl): Reformat. Adjust call to
11208         grok_op_properties.
11209         (copy_args_p): Rename to ...
11210         (copy_fn_p): ... here. Reject template functions. Check for pass
11211         by value.
11212         (grok_special_member_properties): Remember special functions.
11213         (grok_ctor_properties): Don't remember them here, just check.
11214         (grok_op_properties): Likewise.
11215         (start_method): Call grok_special_member_properties.
11216         * decl2.c (grokfield): Likewise.
11217         (copy_assignment_arg_p): Remove.
11218         (grok_function_init): Don't remember abstract assignment here.
11219         * pt.c (instantiate_class_template): Call
11220         grok_special_member_properties.
11221         (tsubst_decl): Adjust grok_op_properties call.
11223 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
11225         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
11226         RID_TYPES_COMPATIBLE_P.
11228 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11230         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
11231         call to build_aggr_init.
11232         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
11234 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
11236         * parse.y: Replace uses of the string non-terminal with STRING.
11237         Don't perform string concatentaion here.
11238         (string): Remove non-terminal.
11239         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
11241 2001-12-05  Jason Merrill  <jason@redhat.com>
11243         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
11244         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
11245         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
11246         * pt.c (push_tinst_level): No longer static.
11247         * cp-tree.h: Declare them.
11249         * init.c (resolve_offset_ref): Don't check access for the base
11250         conversion to access a FIELD_DECL.
11252         * cp-tree.h (TYPE_REFFN_P): New macro.
11253         * decl.c (bad_specifiers): Check it, too.
11255         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
11256         on the __*_type_info type if we haven't seen a definition.
11258 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
11260         * decl.c: Include c-common.h.
11261         (shadow_warning): Move to c-common.c.
11263 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11265         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
11267 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11269         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
11271 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
11273         PR g++/164
11274         * init.c (sort_base_init): Allow binfos to be directly specified.
11275         * method.c (do_build_copy_constructor): Explicitly convert to the
11276         base instance.
11277         (do_build_assign_ref): Likewise.
11279 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
11281         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
11282         declaration and initialization.
11284 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
11286         * typeck2.c: Remove leading capital from diagnostic messages, as
11287         per GNU coding standards.
11289 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
11291         PR c++/3394
11292         * decl.c (xref_basetypes): Handle attributes between
11293         'class' and name.
11295 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
11297         PR g++/3381
11298         * parse.y (named_complex_class_head_sans_basetype): Add new
11299         reduction.
11300         * Make-lang.in (parse.c): Adjust expected conflict count.
11302 2001-12-03  Jason Merrill  <jason@redhat.com>
11304         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
11305         immediate binfos for our virtual bases.
11307 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
11309         * call.c (build_java_interface_fn_ref): Similarly.
11310         * except.c (is_admissible_throw_operand): Similarly.
11311         * init.c (build_java_class_ref): Similarly.
11312         * xref.c (open_xref_file): Similarly.
11314 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
11316         * class.c (finish_struct): Remove trailing periods from messages.
11317         * decl.c (check_tag_decl): Similarly.
11318         * lex.c (cxx_set_yydebug): Similarly.
11319         * typeck2.c (friendly_abort): Similarly.
11321 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11323         PR c++/3048
11324         * cp-tree.h (ovl_member): Remove.
11325         * decl2.c (merge_functions): Handle extern "C" functions
11326         specially.
11327         * tree.c (ovl_member): Remove.
11329 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11331         PR c++/4842
11332         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
11333         FUNCTION_DECL, as input.
11334         (mark_overriders): Remove.
11335         (warn_hidden): Rework for the new ABI.
11337 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
11339         PR c++/3471
11340         * call.c (convert_like_real): Do not build additional temporaries
11341         for rvalues of class type.
11343 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
11345         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
11346         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
11347         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
11348         (DERIVED_FROM_P): Likewise.
11349         (enum base_access): Renumber, add ba_quiet bit mask.
11350         (get_binfo): Remove.
11351         (get_base_distance): Remove.
11352         (binfo_value): Remove.
11353         (ACCESSIBLY_DERIVED_FROM_P): Remove.
11354         * call.c (standard_conversion): Use lookup_base.
11355         * class.c (strictly_overrides): Likewise.
11356         (layout_virtual_bases): Likewise.
11357         (warn_about_ambiguous_direct_bases): Likewise.
11358         (is_base_of_enclosing_class): Likewise.
11359         (add_vcall_offset_vtbl_entries_1): Likewise.
11360         * cvt.c (build_up_reference): Adjust comment.
11361         * init.c (build_member_call): Reformat.
11362         * search.c (get_binfo): Remove.
11363         (get_base_distance_recursive): Remove.
11364         (get_base_distance): Remove.
11365         (lookup_base_r): Tweak.
11366         (lookup_base): Add ba_quiet control. Complete the types here.
11367         (covariant_return_p): Use lookup_base.
11368         * tree.c (binfo_value): Remove.
11369         (maybe_dummy_object): Use lookup_base.
11370         * typeck.c (build_static_cast): Use lookup_base.
11371         (get_delta_difference): Likewise.
11372         * typeck2.c (binfo_or_else): Use lookup_base.
11373         (build_scoped_ref): Add back error_mark_check.
11374         (build_m_component_ref): Use lookup_base.
11376 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11378         * Make-lang.in (c++.generated-manpages): New dummy target.
11380 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11382         * Make-lang.in (cp-lang.o): Depends on c-common.h.
11383         * cp-lang.c (c-common.h): Include.
11384         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
11385         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
11386         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
11388 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
11390         * decl2.c (c_language): Move to c-common.c.
11391         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
11392         functions.
11393         (cxx_init): Update.
11395 2001-11-26  Jason Merrill  <jason@redhat.com>
11397         * call.c (joust): Remove COND_EXPR hack.
11399 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
11401         * search.c (lookup_base_r): Declare bk in variable declaration
11402         space.
11404 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
11406         PR g++/3145
11407         * class.c (build_vbase_pointer): Remove.
11408         (build_vbase_path): Remove.
11409         (build_base_path): New function.
11410         * cp-tree.h (base_access, base_kind): New enumerations.
11411         (build_base_path): Declare.
11412         (convert_pointer_to_real): Remove.
11413         (convert_pointer_to): Remove.
11414         (lookup_base): Declare.
11415         (convert_pointer_to_vbase): Remove.
11416         * call.c (build_scoped_method_call): Use lookup_base &
11417         build_base_path instead of convert_pointer_to_real,
11418         get_base_distance & get_binfo.
11419         (build_over_call): Likewise.
11420         * cvt.c (cp_convert_to_pointer): Likewise.
11421         (convert_to_pointer_force): Likewise.
11422         (build_up_reference): Likewise.
11423         (convert_pointer_to_real): Remove.
11424         (convert_pointer_to): Remove.
11425         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
11426         instead of convert_pointer_to_vbase & build_vbase_path.
11427         (emit_base_init): Use build_base_path instead of
11428         convert_pointer_to_real.
11429         (expand_virtual_init): Lose unrequired conversions.
11430         (resolve_offset_ref): Use lookup_base and build_base_path
11431         instead of convert_pointer_to.
11432         * rtti.c (build_dynamic_cast_1): Use lookup_base &
11433         build_base_path instead of get_base_distance & build_vbase_path.
11434         * search.c (get_vbase_1): Remove.
11435         (get_vbase): Remove.
11436         (convert_pointer_to_vbase): Remove.
11437         (lookup_base_r): New function.
11438         (lookup_base): New function.
11439         * typeck.c (require_complete_type): Use lookup_base &
11440         build_base_path instead of convert_pointer_to.
11441         (build_component_ref): Likewise.
11442         (build_x_function_call): Likewise.
11443         (get_member_function_from_ptrfunc): Likewise.
11444         (build_component_addr): Likewise.
11445         * typeck2.c (build_scoped_ref): Likewise.
11447 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
11449         * cp-tree.h (CP_TYPE_QUALS): Removed.
11450         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
11451         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
11452         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
11453         * dump.c (cp_dump_tree): Use void* dump_info argument to match
11454         lang-hooks prototype.
11455         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
11456         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
11457         CP_TYPE_QUALS changed to cp_type_quals.
11458         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
11459         (CXX_C_OBJS): Remove c-dump.o.
11461 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
11463         PR c++/3637
11464         * pt.c (lookup_template_class): Ensure that all specializations
11465         are registered on the list corresponding to the most general
11466         template.
11468 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
11470         * call.c (non_reference): Add documentation.
11471         (convert_class_to_reference): Do not strip reference types
11472         from conversion operators.
11473         (maybe_handle_ref_bind): Simplify.
11474         (compare_ics): Correct handling of references.
11476 2001-11-19  John Wilkinson <johnw@research.att.com>
11478         * dump.c (dump_op): New function.
11479         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
11480         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
11481         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
11483 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
11485         PR4629
11486         * semantics.c (finish_sizeof): Make sure that expression created
11487         while processing a template do not have a type.
11488         (finish_alignof): Likewise.
11489         * typeck.c (c_sizeof): Likewise.
11490         (expr_sizeof): Likewise.
11492 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
11494         * lex.c (cxx_finish): Call c_common_finish.
11495         (finish_parse): Remove.
11497 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11499         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
11500         when displaying error message about missing array bounds.
11502 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11504         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
11505         CONST_CAST_EXPR.
11506         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
11508 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
11510         * cp-tree.h (print_class_statistics): Restore.
11512 2001-11-15  Jason Merrill  <jason@redhat.com>
11514         * method.c (use_thunk): Don't emit debugging information for thunks.
11516         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
11517         * decl.c (make_typename_type): Handle getting a class template.
11518         * search.c (lookup_field_r): A class template is good enough for
11519         want_type.
11521         * call.c (convert_like_real): Only use cp_convert for the bad part.
11522         (standard_conversion): Also allow bad int->enum.
11523         * typeck.c (ptr_reasonably_similar): Also allow functions to
11524         interconvert.  Pointers to same-size integers are reasonably
11525         similar.
11527         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
11528         give it void type.
11530 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
11532         PR g++/3154
11533         * init.c (sort_base_init): Remove unreachable code.
11534         (expand_member_init): Adjust comment to reflect reality. Simplify
11535         and remove unreachable code.
11537 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
11539         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
11540         (cxx_init): Update prototype.
11541         * decl.c (init_decl_processing): Rename.  Move null node init
11542         to its creation time.
11543         * lex.c (cxx_init_options): Update.
11544         (cxx_init): Combine with old init_parse; also call
11545         cxx_init_decl_processing.
11547 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
11549         * decl.c (check_initializer): Try to complete the type of an
11550         array element before checking whether it's complete.  Don't
11551         complain about arrays with complete element types but an
11552         unknown size.
11553         (cp_finish_decl): Build the hierarchical constructor before
11554         calling maybe_deduce_size_from_array_init.
11556 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
11558         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
11560 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
11562         PR g++/4206
11563         * parse.y (already_scoped_stmt): Remove.
11564         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
11566 2001-11-12  H.J. Lu <hjl@gnu.org>
11568         * cvt.c (ocp_convert): Don't warn the address of a weak
11569         function is always `true'.
11571 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11573         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
11574         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
11575         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
11576         * cp-tree.h (print_class_statistics): Remove.
11577         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
11578         cxx_print_identifier, cxx_set_yydebug): New.
11579         * lex.c (set_yydebug): Rename c_set_yydebug.
11580         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
11581         lang_print_xnode): Rename.
11582         * tree.c (print_lang_statistics): Rename.
11584 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11586         * class.c (dump_array): Fix format specifier warning.
11588 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
11590         * cp-lang.c (LANG_HOOKS_NAME): Override.
11591         (struct lang_hooks): Constify.
11592         * lex.c (cxx_init_options): Update.
11593         (lang_identify): Remove.
11594         * parse.y (language_string): Remove.
11596 2001-11-08  Andreas Franck  <afranck@gmx.de>
11598         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
11599         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
11600         suggested by autoconf.
11601         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
11602         (c++.install-common): Use the transformed target alias names.
11604 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11606         * Make-lang.in: Update.
11607         * cp-lang.c: Include langhooks-def.h.
11609 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11611         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
11613 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11615         * lex.c (copy_lang_type): Add static prototype.
11617 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11619         * pt.c (unify): Handle SCOPE_REF.
11621 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
11623         * tree.c (cp_copy_res_decl_for_inlining): Adjust
11624         DECL_ABSTRACT_ORIGIN for the return variable.
11626 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
11628         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
11630 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
11632         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
11633         semantics.c, spew.c: Fix spelling errors.
11635 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11637         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
11639 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
11641         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
11642         pop_everything.
11644 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11646         * cp-lang.c (cxx_get_alias_set): New function.
11647         Point LANG_HOOKS_GET_ALIAS_SET to it.
11649 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11651         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
11652         * cp-tree.h (make_unbound_class_template): Prototype new function.
11653         * decl.c (make_unbound_class_template): New function.
11654         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
11655         * error.c (dump_type): Likewise.
11656         * mangle.c (write_type): Likewise.
11657         * parse.y (template_parm): Likewise.
11658         (template_argument): Use make_unbound_class_template.
11659         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
11660         (tsubst): Likewise.
11661         (tsubst_copy): Likewise.
11662         (unify): Likewise.
11663         * tree.c (walk_tree): Likewise.
11664         * typeck.c (comptypes): Likewise.
11666 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11668         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
11669         extra calls into fewer ones.
11671 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
11673         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
11674         Warn when merging inline with attribute noinline.
11675         (start_decl, start_function): Warn if inline and attribute
11676         noinline appear in the same declaration.
11678 2001-10-16  H.J. Lu <hjl@gnu.org>
11680         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
11681         for tree checking disabled.
11683 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
11685         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
11686         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
11688 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11690         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
11691         (unify): Only handle MINUS_EXPR specially if the above flag is set
11692         and the subtracted constant is 1.  Clear the flag on recursive calls.
11693         Set it when unifying the maximum value in an INTEGER_TYPE's range.
11695 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
11697         * decl.c (bad_specifiers): Don't allow exception specifications
11698         on any typedefs.
11700 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
11702         * cp/lex.c (init_cp_pragma): Similarly.
11704 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11706         * pt.c (lookup_template_class): Build complete template arguments
11707         for BOUND_TEMPLATE_TEMPLATE_PARM.
11709 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11711         * cp-tree.h (TYPE_BINFO): Update comment.
11712         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
11713         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
11714         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
11715         (copy_type): Prototype new function.
11716         * lex.c (copy_lang_decl): Gather tree node statistics.
11717         (copy_lang_type): New function.
11718         (copy_type): Likewise.
11719         (cp_make_lang_type): Create lang_type for
11720         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
11721         and BOUND_TEMPLATE_TEMPLATE_PARM.
11722         * pt.c (tsubst): Use copy_type instead of copy_node.
11723         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
11725 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11727         * pt.c (determine_specialization): Ignore functions without
11728         DECL_TEMPLATE_INFO.
11730 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
11732         PR g++/4476
11733         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
11735 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
11737         * typeck2.c (store_init_value): Don't re-digest a bracketed
11738         initializer.
11740         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
11741         ANON_AGGR_TYPE_P.
11743 2001-10-11  Richard Henderson  <rth@redhat.com>
11745         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
11746         of an asm statement.
11747         (build_vtbl_ref_1): Split out from build_vtbl_ref.
11748         (build_vfn_ref): Use it to handle vtable descriptors before
11749         calling build_vtable_entry_ref.
11750         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
11752 2001-10-10  Richard Henderson  <rth@redhat.com>
11754         * parse.y (asm_operand): Allow named operands.
11755         * semantics.c (finish_asm_stmt): Tweek for changed location
11756         of the operand constraint.
11758 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
11760         * call.c (standard_conversion): Add bad conversion between
11761         integers and pointers.
11762         (convert_like_real): Don't use convert_for_initialization for bad
11763         conversions; complain here and use cp_convert.
11764         (build_over_call): Don't handle bad conversions specially.
11765         (perform_implicit_conversion): Allow bad conversions.
11766         (can_convert_arg_bad): New fn.
11767         * cp-tree.h: Declare it.
11768         * typeck.c (convert_for_assignment): Use it.
11769         (ptr_reasonably_similar): Any target type is similar to void.
11771 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
11773         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
11774         (cp/cp-lang.o): New rule.
11775         * cp-tree.h: Declare hooks.
11776         * tree.c: Make hooks non-static.
11777         (init_tree): Don't initialize hooks here.
11778         * lex.c: Likewise.  Move definition of lang_hooks to...
11779         * cp-lang.c: ... new file.
11781 2001-10-08  Richard Henderson  <rth@redhat.com>
11783         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
11784         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
11786 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11788         * class.c (build_vtable_entry_ref): Const-ify.
11789         * decl.c (predefined_identifier,
11790         initialize_predefined_identifiers): Likewise.
11791         * init.c (build_new_1): Likewise.
11792         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
11793         Likewise.
11795 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
11797         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
11798         (INSNS_PER_STMT): Likewise.
11799         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
11800         (copy_body, initialize_inlined_parameters): Likewise.
11801         (declare_return_variable, inlinable_function_p): Likewise.
11802         (expand_call_inline, expand_calls_inline): Likewise.
11803         (optimize_inline_calls, clone_body): Likewise.
11804         * tree.c (walk_tree): Moved to ../tree-inline.c.
11805         (walk_tree_without_duplicates): Likewise.
11806         (copy_tree_r, remap_save_expr): Likewise.
11808 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
11810         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
11811         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
11812         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
11813         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
11814         (flag_inline_trees): Moved declaration to ../tree-inline.h.
11815         (walk_tree): Moved declaration to ../tree-inline.h.
11816         (walk_tree_without_duplicates, copy_tree_r): Likewise.
11817         (remap_save_expr): Likewise.
11818         * decl.c: Include tree-inline.h.
11819         (lang_mark_tree): Don't mark inlined_fns.
11820         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
11821         * optimize.c: Include tree-inline.h.
11822         (optimize_inline_calls): Move declaration to ../tree.h, as
11823         non-static.
11824         (remap_decl): Use language-independent constructs and hooks.
11825         (remap_block, copy_body_r, declare_return_variable): Likewise.
11826         (inlinable_function_p): Likewise.  Don't test for
11827         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
11828         no longer language-specific.
11829         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
11830         call of dump_function to...
11831         (optimize_function): Here...
11832         (clone_body): New function, extracted from...
11833         (maybe_clone_body): ... here.  Build decl_map locally and pass
11834         it on to clone_body.
11835         * pt.c, semantics.c: Include tree-inline.h.
11836         * tree.c: Likewise.
11837         (cp_walk_subtrees): New language-specific hook for tree inlining.
11838         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
11839         cp_is_overload_p, cp_auto_var_in_fn_p,
11840         cp_copy_res_decl_for_inlining): Likewise.
11841         (walk_tree): Move language-specific constructs into...
11842         (cp_walk_subtrees): this new function.
11843         (copy_tree_r): Use language-independent constructs and hooks.
11844         (init_tree): Initialize tree inlining hooks.
11845         (remap_save_expr): Adjust prototype so that the declaration
11846         does not require the definition of splay_tree.
11848 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11850         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
11851         to build the declaration instead of the declaration itself.
11853 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
11855         * decl2.c (cxx_decode_option): Add 'else'.
11857         * spew.c (end_input): No longer static.
11858         * cp-tree.h: Declare it.
11859         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
11861 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11863         * call.c (build_over_call), typeck.c (build_function_call_real):
11864         Pass type attributes to check_function_format rather than name or
11865         assembler name.  Don't require there to be a name or assembler
11866         name to check formats.
11868 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
11870         * decl.c (init_decl_processing): Don't call
11871         init_function_format_info.  Initialize lang_attribute_table
11872         earlier.
11873         (builtin_function): Call decl_attributes.
11874         (insert_default_attributes): New.
11876 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
11878         * decl.c (grokdeclarator): Copy array typedef handling from C
11879         frontend.
11881         * decl.c (grokdeclarator): Copy too-large array handling from C
11882         frontend.
11884 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
11886         * config-lang.in (target_libs): Added target-gperf, so that we
11887         don't try to build it if C++ is disabled.
11889 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
11891         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
11892         (cp/errfn.o): Delete rule.
11893         (cp/error.o): Depend on flags.h.
11894         * errfn.c: Delete file.
11895         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
11896         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
11897         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
11898         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
11899         internal_error respectively.  Make cp_deprecated into a macro.
11900         Don't define cp_printer typedef or declare cp_printers.
11901         * error.c: Include flags.h.
11902         Delete: struct tree_formatting_info, print_function_argument_list,
11903         print_declaration, print_expression, print_function_declaration,
11904         print_function_parameter, print_type_id, print_cv_qualifier_seq,
11905         print_type_specifier_seq, print_simple_type_specifier,
11906         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
11907         print_parameter_declaration_clause, print_exception_specification,
11908         print_nested_name_specifier, and definition of cp_printers.
11909         (locate_error): New function.
11910         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
11911         rewritten in terms of locate_error and diagnostic.c.
11912         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
11913         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
11914         (init_error): Adjust to match.
11916 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11918         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
11920 2001-09-21  Richard Henderson  <rth@redhat.com>
11922         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
11923         (build_vtbl_initializer): Likewise.
11924         (build_vfn_ref): New.
11925         * cp-tree.h: Declare it.
11926         * call.c (build_over_call): Use it.
11927         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
11928         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
11930 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
11932         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
11934 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11936         Table-driven attributes.
11937         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
11938         * decl2.c (cplus_decl_attributes): Only take one attributes
11939         parameter.
11940         * cp-tree.c (cplus_decl_attributes): Update prototype.
11941         * class.c (finish_struct), decl.c (start_decl, start_function),
11942         decl2.c (grokfield), friend.c (do_friend), parse.y
11943         (parse_bitfield): Update calls to cplus_decl_attributes.
11944         * decl.c (grokdeclarator): Take a pointer to a single ordinary
11945         attribute list.
11946         * decl.h (grokdeclarator): Update prototype.
11947         * decl2.c (grokfield): Take a single ordinary attribute list.
11948         * friend.c (do_friend): Likewise.
11949         * decl.c (shadow_tag, groktypename, start_decl,
11950         start_handler_parms, grokdeclarator, grokparms, start_function,
11951         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
11952         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
11953         (process_template_parm, do_decl_instantiation): Pass single
11954         ordinary attribute lists around.
11955         * decl.c (grokdeclarator): Correct handling of nested attributes.
11956         Revert the patch
11957         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
11958                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11959                 not the left.
11960         .
11961         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
11962         (cp_attribute_table): Declare.
11963         * decl.c (valid_lang_attribute): Don't define.
11964         (lang_attribute_table): Define.
11965         (init_decl_processing): Initialize lang_attribute_table instead of
11966         valid_lang_attribute.
11967         * tree.c (cp_valid_lang_attribute): Remove.
11968         (handle_java_interface_attribute, handle_com_interface_attribute,
11969         handle_init_priority_attribute): New functions.
11970         (cp_attribute_table): New array.
11971         * decl2.c (import_export_class): Don't use
11972         targetm.valid_type_attribute.
11974 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11976         * Make-lang.in (cp/error.o): Depend on real.h
11977         * error.c: #include "real.h"
11979 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11981         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
11982         xmalloc/strcpy/strcat.
11984 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11986         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
11987         Const-ification.
11988         * pt.c (tsubst_decl): Likewise.
11990 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11992         * decl2.c (lang_f_options): Const-ification.
11993         * lex.c (cplus_tree_code_name): Likewise.
11994         * spew.c (yyerror): Likewise.
11996 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
11998         PR c++/3986
11999         * class.c (force_canonical_binfo_r): Check & move an indirect
12000         primary base first.
12001         (force_canonical_binfo): Check that it's not already
12002         canonical.
12003         (mark_primary_virtual_base): Remove BINFO parameter.
12004         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
12006 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
12008         Remove TYPE_NONCOPIED_PARTS.
12009         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
12010         CLASSTYPE_PURE_VIRTUALS.
12011         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
12012         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
12013         (layout_class_type): Don't call fixup_inline_methods here ...
12014         (finish_struct_1): ... call it here.
12016 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
12018         * decl.c (duplicate_decls): Remove code deadling with
12019         DECL_SAVED_INSNS.
12020         * decl2.c (finish_file): Likewise.
12021         * pt.c (instantiate_decl): Likewise.
12022         * semantics.c (expand_body): Don't defer local functions if
12023         they wouldn't be deferred for some other reason.  Don't
12024         generate RTL for functions that will not be emitted.
12025         (genrtl_start_function): Remove code deadling with
12026         DECL_SAVED_INSNS.
12027         (genrtl_finish_function): Likewise.
12029 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
12031         PR c++/4203
12032         * call.c (build_over_call): Do not optimize any empty base
12033         construction.
12035 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12037         * error.c (dump_template_decl): Output template parameters
12038         together with their specifiers.
12039         Output `class' prefix for template template parameter.
12040         (dump_decl): Fix formatting.
12042 2001-08-30  Kurt Garloff  <garloff@suse.de>
12044         * optimize.c (inlinable_function_p): Allow only smaller single
12045         functions. Halve inline limit after reaching recursive limit.
12047 2001-08-30  Joern Rennecke <amylaar@redhat.com>
12048             Jason Merrill  <jason_merrill@redhat.com>
12050         * class.c (build_vtable_entry_ref): Subtract in char*, not
12051         ptrdiff_t.
12053 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
12055         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
12056         (build_cplus_array_type): Use cp_build_qualified_type, not
12057         TYPE_MAIN_VARIANT, to get an unqualified version.
12059         * decl2.c (grok_alignof): Lose.
12060         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
12061         * typeck.c (c_alignof): Lose.
12062         * semantics.c (finish_sizeof, finish_alignof): New.
12063         * parse.y: Use them.
12064         * cp-tree.h: Declare them.
12066 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
12068         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
12069         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
12070         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
12072 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
12074         * typeck2.c (add_exception_specifier): Only require complete type if
12075         not in processing template declaration.
12077 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12079         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
12080         GNU_xref_start_scope and GNU_xref_end_scope.
12082         * tree.c (TYPE_HASH): Moved to ../tree.h.
12084 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
12086         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
12087         on COMPOUND_EXPRs.
12089 2001-08-14  Richard Henderson  <rth@redhat.com>
12091         * class.c, cp-tree.h (build_vfn_ref): Remove.
12092         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
12094 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
12096         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
12097         empty class assignment as having side-effects to avoid
12098         spurious warnings.
12100 2001-08-13  Zack Weinberg  <zackw@panix.com>
12102         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
12103         * except.c: Include libfuncs.h.
12105 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12107         * decl.c (grokdeclarator): Clarify diagnostic message.
12109 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12111         * decl2.c (do_nonmember_using_decl): Replace using directive
12112         with using declaration in the error message.
12114 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12116         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
12117         criterion to avoid rebuilding expression tree instead of
12118         processing_template_decl.
12120 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
12122         Support named return value optimization for inlines, too.
12123         * decl.c (finish_function): Nullify returns here.
12124         * semantics.c (genrtl_start_function): Not here.
12125         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
12126         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
12127         Also nullify the CLEANUP_STMT for the nrv.
12128         * cp-tree.h: Declare it.
12129         * optimize.c (declare_return_variable): Replace the nrv with the
12130         return variable.
12131         * typeck.c (check_return_expr): Be more flexible on alignment check.
12132         Ignore cv-quals when checking for a matching type.
12134 2001-08-09  Richard Henderson  <rth@redhat.com>
12136         * decl2.c (finish_objects): Use target hooks instead of
12137         assemble_constructor and assemble_destructor.
12139 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12141         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
12143 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
12145         PR c++/3820
12146         Stop using TYPE_NONCOPIED_PARTS.
12147         * call.c (build_over_call): Be careful when copy constructing
12148         or assigning to an empty class.
12149         * class.c (check_bases_and_members): It has a
12150         COMPLEX_ASSIGN_REF if it has a vptr.
12151         (layout_class_type): Don't add empty class padding to
12152         TYPE_NONCOPIED_PARTS.
12153         (finish_struct_1): Don't add the VFIELD either.
12154         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
12155         initialization.
12157 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
12159         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
12161 2001-08-06  Richard Henderson  <rth@redhat.com>
12163         * decl2.c (finish_objects): Pass a symbol_ref and priority to
12164         assemble_{constructor,destructor}.  Remove priority handling.
12166 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12168         Don't allow template-id in using-declaration.
12169         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
12170         (do_class_using_decl): Likewise.
12172 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12174         * cp/spew.c (read_token): No need to pop buffers.
12176 2001-08-02  Stan Shebs  <shebs@apple.com>
12178         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
12179         (fnaddr_from_vtable_entry): Remove decl.
12180         * method.c (use_thunk): Update comment.
12182 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
12184         * repo.c (get_base_filename): Change return value to const char
12185         pointer.
12187 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
12189         Kill -fhonor-std.
12190         * NEWS: Document.
12191         * cp-tree.h (flag_honor_std): Remove.
12192         (CPTI_FAKE_STD): Remove.
12193         (std_node): Remove comment about it being NULL.
12194         (fake_std_node): Remove.
12195         * decl.c (in_fake_std): Remove.
12196         (walk_namespaces_r): Remove fake_std_node check.
12197         (push_namespace): Remove in_fake_std code.
12198         (pop_namespace): Likewise.
12199         (lookup_name_real): Remove fake_std_node check.
12200         (init_decl_processing): Always create std_node. Always add
12201         std:: things there.
12202         (builtin_function): Always put non '_' fns in std.
12203         * decl2.c (flag_honor_std): Remove.
12204         (lang_f_options): Remove honor-std.
12205         (unsupported_options): Add honor-std.
12206         (set_decl_namespace): Remove fake_std_node check.
12207         (validate_nonmember_using_decl): Likewise.
12208         (do_using_directive): Likewise.
12209         (handle_class_head): Likewise.
12210         * dump.c (cp_dump_tree): Likewise.
12211         * except.c (init_exception_processing): Adjust.
12212         * init.c (build_member_call): Remove fake_std_node check.
12213         (build_offset_ref): Likewise.
12214         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
12215         * rtti.c (init_rtti_processing): Adjust.
12217 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
12219         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
12220         operand while calling cp_tree_equal.
12222 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12224         The 3.0 ABI no longer has vbase pointer fields.
12225         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
12226         FORMAT_VBASE_NAME): Remove.
12227         * method.c (do_build_copy_constructor): Adjust.
12228         (do_build_assign_ref): Adjust.
12229         * search.c (lookup_field_r): Adjust.
12230         * typeck.c (build_component_ref): Adjust.
12232         The 3.0 ABI always has a vtable pointer at the start of every
12233         polymorphic class.
12234         * rtti.c (build_headof_sub): Remove.
12235         (build_headof): Adjust.
12236         (get_tinfo_decl_dynamic): No need to check flag_rtti
12237         here. Adjust.
12238         (create_real_tinfo_var): Explain why we need a hidden name.
12240 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12242         PR c++/3631
12243         * class.c (update_vtable_entry_for_fn): The fixed adjustment
12244         of a virtual thunk should be from declaring base.
12246 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
12248         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
12249         the shared virtual base, so preserving inheritance graph order.
12251 2001-07-30  Andreas Jaeger  <aj@suse.de>
12253         * decl2.c: Remove unused var global_temp_name_counter.
12255 2001-07-28  Richard Henderson  <rth@redhat.com>
12257         * method.c (pending_inlines): Remove.
12259 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
12261         * class.c (mark_primary_virtual_base): Don't adjust base
12262         offsets here.
12263         (dfs_unshared_virtual_bases): Adjust them here.
12264         (mark_primary_bases): Explain why we adjust at the end.
12266 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
12268         * class.c (finish_struct_1): When copying the primary base's
12269         VFIELD, make sure we find it is at offset zero.
12271 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12273         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
12274         tsubst_expr for default template arguments.
12276 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12278         PR c++/3621
12279         * spew.c (yylex): Only copy the token's lineno, if it is
12280         nonzero.
12282 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12284         PR c++/3624
12285         * call.c (resolve_args): Simplify, call
12286         convert_from_reference.
12287         (build_new_op): Resolve and convert from reference ARG1
12288         earlier. Adjust ARG2 & ARG3 resolve and conversion.
12290 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
12292         * decl.c (last_function_parm_tags): Remove.
12293         (current_function_parm_tags): Remove.
12294         (init_decl_processing): Adjust.
12295         (start_function): Adjust.
12296         (store_parm_decls): Adjust.
12298         PR c++/3152
12299         * decl.c (grokdeclarator): Detect when a function typedef is
12300         declaring a function, and create last_function_parms correctly.
12302 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
12304         * call.c (joust): Only prefer a non-builtin candidate to a builtin
12305         one if they have the same signature.
12307         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
12308         it rather than toplevel_bindings_p.  Give it a mangled name if static.
12309         (convert_to_reference): Adjust.
12310         * decl2.c (get_temp_name): Lose.
12311         * mangle.c (mangle_ref_init_variable): New fn.
12312         (mangle_guard_variable): Strip the ref-init header.
12313         * cp-tree.h: Adjust.
12314         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
12315         initializer.
12316         (grok_reference_init): Always use DECL_INITIAL.
12318 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12320         PR c++/3416
12321         * call.c (build_conditional_expr): Recheck args after
12322         conversions.
12323         * cp-tree.h (build_conditional_expr): Move to correct file.
12324         * typeck.c (decay_conversion): Diagnose any unknown types
12325         reaching here.
12326         (build_binary_op): Don't do initial decay or default
12327         conversions on overloaded functions.
12328         (build_static_cast): Don't do a decay conversion here.
12330 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12332         PR c++/3543
12333         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
12334         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
12336 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12338         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
12339         (create_vtbl_ptr): ... here.
12341 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
12343         * class.c (build_vbase_offset_vbtl_entries): Look for
12344         non-primary base of which we are a sub vtable.
12346 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
12348         * semantics.c (finish_this_expr):  Remove unused code.
12350 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
12352         Simplify rtti, now we've only one ABI.
12353         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
12354         CPTI_TINFO_VAR_ID.
12355         (tinfo_decl_id, tinfo_var_id): Remove.
12356         (get_typeid_1): Remove.
12357         * rtti.c
12358         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
12359         (typeid_ok_p): New function.
12360         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
12361         (get_tinfo_decl): Remove old abi documentation.
12362         (tinfo_from_decl): Remove.
12363         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
12364         (get_typeid_1): Remove.
12365         (get_base_offset): Remove.
12366         (synthesize_tinfo_var): Absorb get_base_offset.
12367         (create_real_tinfo_var): Don't use tinfo_decl_id.
12369 2001-07-23  Graham Stott  <grahams@redhat.com>
12371         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
12372         variable has_two_argument_delete_p.
12374 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
12376         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
12377         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
12378         (CPTI_INDEX_IDENTIFIER): Remove.
12379         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
12380         (delta2_identifier): Remove.
12381         (index_identifier): Remove.
12382         (pfn_or_delta2_identifier): Remove.
12383         (flag_vtable_thunks): Remove.
12384         (VTABLE_DELTA2_NAME): Remove.
12385         (VTABLE_INDEX_NAME): Remove.
12386         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
12387         (vfunc_ptr_type_node): Adjust.
12388         (VTABLE_NAME_PREFIX): Adjust.
12389         (build_vfn_ref): Lose first parameter.
12390         (fixup_all_virtual_upcast_offsets): Remove.
12391         * decl.c (initialize_predefined_identifiers): Remove
12392         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
12393         (init_decl_processing): Remove no-vtable-thunk code.
12394         * decl2.c (flag_vtable_thunks): Remove.
12395         (mark_vtable_entries): Remove no-vtable-thunk code.
12396         * error.c (dump_decl): Remove no-vtable-thunk code.
12397         (dump_expr): Adjust ptr to member function code.
12398         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
12399         code.
12400         * rtti.c (build_headof): Remove no-vtable-thunk code.
12401         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
12402         * search.c (get_base_distance): Remove expand_upcast_fixups case.
12403         (virtual_context) Remove.
12404         (expand_upcast_fixups): Remove.
12405         (fixup_virtual_upcast_offsets): Remove.
12406         (fixup_all_virtual_upcast_offsets): Remove.
12407         * typeck.c (get_member_function_from_ptrfunc): Remove
12408         no-vtable-thunk code.
12409         * call.c (build_over_call): Adjust call to build_vfn_ref.
12410         * class.c (build_vfn_ref): Lose first parameter. Remove
12411         no-vtable-thunk code.
12412         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
12413         (build_vtable_entry): Remove no-vtable-thunk code.
12415 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
12417         Remove old-abi remnants. Remove comments about old abi
12418         behavior. Remove references to 'new-abi' in comments.
12419         * cp-tree.h: Adjust comments.
12420         (vbase_offsets_in_vtable_p): Delete.
12421         (vcall_offsets_in_vtable_p): Delete.
12422         (vptrs_present_everywhere_p): Delete.
12423         (all_overridden_vfuns_in_vtables_p): Delete.
12424         (merge_primary_and_secondary_vtables_p): Delete.
12425         (TYPE_CONTAINS_VPTR_P): Adjust.
12426         (VTT_NAME_PREFIX): Remove.
12427         (CTOR_VTBL_NAME_PREFIX): Remove.
12428         (init_vbase_pointers): Remove.
12429         * class.c: Adjust coments.
12430         (build_vbase_pointer_fields): Delete.
12431         (build_vbase_pointer): Remove old-abi code.
12432         (build_secondary_vtable): Likewise.
12433         (modify_all_vtables): Likewise.
12434         (create_vtable_ptr): Likewise.
12435         (layout_class_type): Likewise.
12436         (finish_struct_1): Likewise.
12437         (finish_vtbls): Likewise.
12438         (dfs_finish_vtbls): Delete.
12439         (build_vbase_offset_vtbl_entries): Remove old-abi code.
12440         * cvt.c: Adjust comments.
12441         * decl.c: Adjust comments.
12442         * decl2.c: Adjust comments.
12443         * init.c: Adjust comments.
12444         (construct_virtual_bases): Remove old-abi code.
12445         * lang-specs.h: Remove -fno-new-abi.
12446         * mangle.c: Adjust comments.
12447         * rtti.c: Adjust comments.
12448         (get_base_offset): Remove old-abi-code.
12449         * search.c: Adjust comments.
12450         (dfs_init_vbase_pointers): Remove.
12451         (dfs_vtable_path_unmark): Remove.
12452         (init_vbase_pointers): Remove.
12453         * semantics.c: Adjust comments.
12454         (emit_associated_thunks): Remove old-abi code.
12455         * typeck.c: Adjust comments.
12457 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
12459         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
12460         params.h.
12462 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
12464         * class.c (finish_struct_anon): Forbid nested classes.
12466 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12468         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
12469         * optimize.c: Include debug.h.
12470         (maybe_clone_body): Use debug hook.
12471         * semantics.c: Include debug.h.
12472         (expand_body): Use debug hook.
12474 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12476         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
12478 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
12480         * class.c (type_requires_array_cookie): New function.
12481         (check_methods): Don't try to figure out whether the type needs a
12482         cookie here.
12483         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
12484         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
12485         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
12486         * pt.c (instantiate_class_template): Don't set
12487         TYPE_VEC_DELETE_TAKES_SIZE.
12488         * NEWS: Document ABI changes from GCC 3.0.
12490 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
12491             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12493         * NEWS (Changes in GCC 3.0): Fix typo.
12495 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12497         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
12498         which attributes are to be attached, and a flags argument.  Update
12499         call to decl_attributes.
12500         (grokfield): Update call to decl_attributes.
12501         * class.c (finish_struct): Update call to cplus_decl_attributes.
12502         * cp-tree.h (cplus_decl_attributes): Update prototype.
12503         * decl.c (start_decl, grokdeclarator, start_function): Update
12504         calls to decl_attributes and cplus_decl_attributes.
12505         * friend.c (do_friend): Update call to cplus_decl_attributes.
12506         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
12508 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
12510         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
12511         for `register' variables with an asm-specification.
12513 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
12515         * semantics.c (finish_asm_stmt): Mark the output operands
12516         to an asm addressable, if necessary.
12518 2001-07-11  Ben Elliston  <bje@redhat.com>
12520         * Revert this change -- there is a subtle bug.
12522         PR c++/80
12523         * decl.c (finish_enum): New "attributes" argument; pass it to
12524         cplus_decl_attributes.  Use a narrower type if the enum is packed.
12525         * cp-tree.h (finish_enum): Adjust prototype.
12526         * parse.y (enum_head): New non-terminal.
12527         (structsp): Use it. Enums now may be preceded or followed by
12528         optional attributes -- pass their chained tree to finish_enum().
12529         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
12531 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
12533         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
12534         variables.
12536 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
12538         * semantics.c (cp_expand_stmt): Fix for null
12539         current_function_return_value.
12541 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
12543         * call.c (build_op_delete_call): Initialize fn.
12544         (convert_like_real): Delete conditional.
12545         (joust): Initialize *w and *l.
12546         * class.c: Add prototype for binfo_ctor_vtable.
12547         (get_primary_binfo): Initialize result.
12548         * init.c (build_java_class_ref): Initialize name.
12550 2001-07-09  Erik Rozendaal  <dlr@acm.org>
12552         * typeck.c (unary_complex_lvalue): Do not duplicate the
12553         argument to modify, pre-, or post-increment when used as an
12554         lvalue and when the argument has side-effects.
12556 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12558         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12559         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
12560         cplus_decl_attributes even if attrs is NULL.
12561         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
12563 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
12565         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
12566         calls to decl_attributes.
12568 2001-07-06  Ira Ruben   <ira@apple.com>
12570         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
12571         be DECL_TEMPLATE_RESULT.
12573 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12575         * cp-tree.h (copy_template_template_parm): Rename to ...
12576         (bind_template_template_parm): ... here.
12577         * tree.c (copy_template_template_parm): Rename to ...
12578         (bind_template_template_parm): ... here.  Remove the case when
12579         NEWARGS is NULL_TREE.
12580         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
12581         BOUND_TEMPLATE_TEMPLATE_PARM.
12582         * pt.c (lookup_template_class): Adjust.
12584 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
12586         * cvt.c (convert_lvalue): New fn.
12587         * cp-tree.h: Declare it.
12588         * method.c (do_build_assign_ref): Use it.
12589         (do_build_copy_constructor): Convert parm to base types
12590         before calling base constructors.
12592         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
12593         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
12594         optimize.
12595         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
12597 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
12599         * optimize.c (optimize_inline_calls): New function, broken out
12600         of ...
12601         (optimize_function): ... here. Call it. Don't inline if it is
12602         a thunk.
12603         (dump_function): Print name of dump flag causing this dump.
12604         * semantics.c (expand_body): Move thunk inline check to
12605         optimize_function.
12607 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12609         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
12610         (comptypes): Use target.comp_type_attributes.
12612 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
12614         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
12616 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
12618         * error.c (lang_print_error_function): Add a `diagnostic_context *'
12619         parameter. Tweak.
12621 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
12623         * decl2.c (import_export_class): Update.
12625 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12627         * error.c (init_error): Adjust settings.
12629 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
12631         * error.c (init_error): Adjust settings.
12633 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
12635         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
12636         return pointers to data members by reference rather than by value.
12638 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
12640         Implement the Named Return Value optimization.
12641         * cp-tree.h (struct cp_language_function): Add x_return_value.
12642         (current_function_return_value): Now a macro.
12643         * decl.c: Don't define it.
12644         (define_label, finish_case_label): Don't clear it.
12645         (init_decl_processing): Don't register it with GC.
12646         * semantics.c (genrtl_finish_function): Don't check it for
12647         no_return_label.  Copy the RTL from the return value to
12648         current_function_return_value and walk, calling...
12649         (nullify_returns_r): ...this new fn.
12650         * typeck.c (check_return_expr): Set current_function_return_value.
12652 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
12654         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
12655         sharing a ctor vtable with.  Merge code for cases 1 and 2.
12656         (binfo_ctor_vtable): New fn.
12657         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
12659 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
12661         * class.c (dfs_find_final_overrider): Fix logic.
12663         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
12664         virtual thunk instead of non-virtual.
12665         (get_matching_virtual): Uncomment.
12667         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
12668         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
12669         PARM, not ARG.
12671 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
12673         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
12674         we've not emerged from the hierarchy of RTTI_BINFO on reaching
12675         a non-virtual base.
12677 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
12679         * NEWS: Update release number.
12681 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12683         PR c++/3130, c++/3131, c++/3132
12684         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
12685         * class.c (force_canonical_binfo_r): Move
12686         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
12687         virtual bases unless they're primary and what they're primary
12688         too has been moved.
12689         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
12690         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
12691         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
12692         derived binfo.
12693         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
12694         (layout_nonempty_base_or_field): Add most derived type
12695         parameter. Adjust.
12696         (layout_empty_base): Likewise.
12697         (build_base_field): Likewise.
12698         (build_base_fields): Likewise.
12699         (propagate_binfo_offsets): Add most derived type
12700         parameter. Skip non canonical virtual bases too.
12701         (dfs_set_offset_for_unshared_vbases): Don't skip primary
12702         bases. Do skip canonical bases.
12703         (layout_virtual_bases): Adjust.
12704         (layout_class_type): Adjust.
12705         (dfs_get_primary_binfo): Build list of virtual primary base
12706         candidates.
12707         (get_primary_binfo): Check that the shared virtual primary
12708         base candidate was found first.
12709         (accumulate_vtbl_inits): Don't do anything for non-vptr
12710         containing binfos. For case 1 primary virtual bases, keep
12711         checking that we've not emerged from the hierarchy of RTTI_BINFO.
12713 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
12715         PR c++/3089
12716         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
12717         hierarchy looking for primary bases for a ctor
12718         vtable. Recursively call oneself, if we meet our primary via
12719         this route and haven't met it yet via inheritance graph order.
12721 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
12723         * lang-options.h: Emit documentation for -fno-honor-std, not
12724         -fhonor-std.
12726 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
12728         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
12729         Don't clobber delta.
12730         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
12732 2001-06-10  Mark Mitchell <mark@codesourcery.com>
12733             Gabriel Dos Reis  <gdr@codesourcery.com>
12735         * Make-lang.in (cp/call.o): Depend on diagnostic.h
12736         (cp/typeck.o): Depend on diagnostic.h
12737         (cp/typeck2.o): Depend on diagnostic.h
12738         (cp/repo.o): Depend on dignostic.h
12739         * typeck.c: #include diagnostic.h
12740         (convert_for_initialization): Remove extern declaration for
12741         warningcount and errorcount.
12743         * call.c: #include diagnostic.h
12744         (convert_like_real): Remove extern declaration for warnincount and
12745         errorcount.
12747         * repo.c: #include diagnostic.h
12748         * typeck2.c: #include diagnostic.h
12750 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12752         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
12753         in previous change.
12755 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12757         PR c++/2929
12758         * friend.c (do_friend): Use push_decl_namespace for classes at
12759         namespace scope.
12761 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
12762             Jason Merrill <jason_merrill@redhat.com>
12764         PR c++/3061
12765         * class.c (build_secondary_vtable): Use assert, rather than an error
12766         message.
12767         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
12768         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
12769         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
12770         Don't set BINFO_VTABLE for a primary virtual base.
12772 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
12774         * decl.c (duplicate_decls): Update source position information
12775         when a template function is defined.
12777 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
12779         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
12781 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
12783         PR c++/2914
12784         * decl.c (pushtag): Don't push into a complete type's scope.
12786 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
12788         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
12789         (struct lang_decl_flags): Lose generate_with_vtable_p.
12790         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
12791         * class.c (copy_virtuals): Adjust.
12792         * decl2.c (mark_vtable_entries): Adjust.
12793         * method.c (make_thunk, build_vtable_entry): Adjust.
12794         * class.c (update_vtable_entry_for_fn): Only look as far as the
12795         first defining class.
12796         (build_vtbl_initializer): Put nothing in the slot for a function only
12797         defined in a lost primary virtual base.
12798         (add_vcall_offset_vtbl_entries_1): Use the same code for
12799         the lost primary case and the normal case.
12800         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
12801         (get_vfield_offset, get_derived_offset): Lose.
12802         (dfs_find_final_overrider): Use look_for_overrides_here.
12803         (get_matching_virtual): New fn.
12804         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
12805         not BV_VCALL_INDEX.
12806         * search.c (look_for_overrides_here): Split out from...
12807         (look_for_overrides_r): Here.
12809         * class.c (find_final_overrider): Return error_mark_node on error.
12811         * decl2.c (key_method): #if 0 accidental change.
12813 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12815         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
12816         (build_over_call): Likewise.
12817         * decl.c (grokparms): Likewise.
12818         * pt.c (tsubst_decl): Likewise.
12819         * typeck.c (convert_arguments): Likewise.
12821 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
12823         * semantics.c (begin_class_definition): Robustify.
12825         * pt.c (instantiate_decl): Tell the repository code about the
12826         clones, not the cloned functions.
12827         * repo.c (repo_template_used): Explicitly instantiate the cloned
12828         function, not the clones.
12830 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12832         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
12833         ICS_BAD_FLAG on created conversion.
12834         (compare_ics): Break out rank.
12836 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12838         * decl.c (xref_tag): Remove extraneous %s on dependent name
12839         lookup warning.
12841 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12843         * class.c (layout_vtable_decl): Fix off by one error on
12844         build_index_type.
12845         (build_vtt): Likewise.
12846         (build_ctor_vtbl_group): Likewise.
12848 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12850         * class.c (maybe_indent_hierarchy): New function.
12851         (dump_class_hierarchy_r): Add flags. Dump extra binfo
12852         information, if enabled. Use maybe_indent_hierarchy. Adjust
12853         output format.
12854         (dump_class_hierarchy): Adjust prototype. Adjust output format.
12855         (dump_array, dump_vtable, dump_vtt): New functions.
12856         (finish_struct_1): Adjust hierarchy dumping.
12857         (initialize_vtable): Call dump_vtable.
12858         (build_vtt): Call dump_vtt.
12859         (build_ctor_vtbl_group): Call dump_vtable.
12860         * decl2.c (flag_dump_class_layout): Remove.
12861         (cxx_decode_option): Remove dump translation unit
12862         and dump class hierarchy check. Call dump_switch_p.
12863         (finish_file): Adjust dumping.
12864         (dump.c): Only dump base classes if not TDF_SLIM.
12865         Only dump namespace members if not TDF_SLIM.
12866         * optimize.c (dump_function): New function.
12867         (optimize_function): Call dump_function.
12868         * semantics.c (expand_body): Use dump_enabled_p.
12870 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
12872         PR g++/2936
12873         Part missed from first commit
12874         * decl2.c (finish_anon_union): Copy context.
12876 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
12878         PR g++/2936
12879         * optimize.c (remap_decl): Remap anonymous aggregate members too.
12881 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12883         PR g++/2823
12884         * semantics.c (expand_body): Don't optimize thunks.
12886 2001-05-25  Sam TH  <sam@uchicago.edu>
12888         * cp-tree.h lex.h: Fix header include guards.
12890 2001-05-25  Mark Mitchell <mark@codesourcery.com>
12892         * decl.c (init_decl_processing): Tweak.
12894 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
12896         * decl.c (duplicate_decls): Tidy.
12897         (init_decl_processing): Always set flag_no_builtin.
12899 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
12901         PR c++/2184
12902         * decl2.c (do_local_using_decl): Push the decls, even in a
12903         template.
12905 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
12907         * optimize.c (initialize_inlined_parameters): Don't set
12908         TREE_READONLY for a VAR_DECL taking the place of an inlined
12909         PARM_DECL.
12911 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
12913         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
12914         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
12915         attribute.
12917 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
12919         * parse.y: Refer to compound literals as such, not as
12920         constructor-expressions.
12922 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
12924         * call.c (build_op_delete_call): Ignore exception-specifications
12925         when looking for matching delete operators.
12926         * init.c (build_new_1): Compute whether or not the allocation
12927         function used is a placement allocation function or not, and
12928         communicate this information to build_op_delete_call.
12930 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
12932         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
12933         (build_vtbl_ref): Adjust.
12934         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
12935         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
12936         Re-add vtable-gc.
12937         (unsupported_options): Correspondingly.
12939         * decl2.c (maybe_make_one_only): Check flag_weak, not
12940         supports_one_only().
12942         * cp-tree.def (START_CATCH_STMT): Lose.
12943         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
12944         * tree.c (cp_statement_code_p): Don't case it.
12945         * semantics.c (cp_expand_stmt): Likewise.
12946         * cp-tree.h (START_CATCH_TYPE): Lose.
12947         (HANDLER_TYPE): New.
12948         * except.c (expand_start_catch_block): Don't start any blocks.
12949         Return the type.
12950         (expand_end_catch_block): Don't end any blocks.
12951         * parse.y (handler): Don't pass anything from finish_handler_parms
12952         to finish_handler.
12953         * pt.c (tsubst_expr): Likewise.
12954         * semantics.c (begin_handler): Call note_level_for_catch here.
12955         (finish_handler_parms): Don't return anything.
12956         (genrtl_catch_block, begin_catch_block): Lose.
12957         (genrtl_handler): Call expand_start_catch here.
12959 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
12961         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
12962         (get_vtable_decl, build_vtt): Not here.
12964 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
12966         PR c++/2781
12967         * optimize.c (update_cloned_parm): Copy addressability and other
12968         flags.
12970 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12972         * pt.c (determine_specialization): Ignore artificial functions.
12974 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
12976         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
12977         (C_RID_CODE): Remove.
12978         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
12979         (init_parse): Don't do it here.
12981 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
12983         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
12984         function declaration to avoid stripping the symbol's attributes.
12986 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
12988         * decl.c (pushdecl): Adjust error string.
12989         (xref_tag): Adjust friend class injection warning. Remove the
12990         inherited name from the class shadowed scope.
12992 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
12994         * except.c (cp_protect_cleanup_actions): New function.
12995         (init_exception_processing): Don't set protect_cleanup_actions
12996         here.  Do set lang_protect_cleanup_actions.
12998 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
13000         * spew.c (read_token): Call yyerror on all unexpected tokens.
13002 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
13004         * init.c (member_init_ok_or_else): Take a tree rather than
13005         string for name.
13006         (expand_member_init): Adjust.
13008 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
13010         * decl.c (duplicate_decls): Suppress warning about duplicate
13011         decls if the first decl is a friend.
13013 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
13015         * except.c (choose_personality_routine): Export.  Add
13016         explanatory comment.  Take an enum languages, not a boolean.
13017         (initialize_handler_parm): Adjust to match.
13018         * cp-tree.h: Prototype choose_personality_routine.
13019         * lex.c (handle_pragma_java_exceptions): New function.
13020         (init_cp_pragma): Register #pragma GCC java_exceptions.
13022 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
13024         * method.c (build_mangled_C99_name): Remove unused prototype.
13026 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
13028         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
13029         * typeck.c (get_member_function_from_ptrfunc,
13030         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
13031         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
13033         Reverted Geoff Keating's 2001-05-03's patch.
13035 2001-05-11  Ira Ruben   <ira@apple.com>
13037         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
13039 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
13041         * cp-tree.h (finish_label_expr, lookup_label): Delete.
13042         * parse.y: Update for '&&'; don't issue warning here.
13043         * semantics.c (finish_label_expr): Delete.
13045 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
13047         * splay-tree.h (splay_tree_max): New function.
13048         (splay_tree_min): Likewise.
13050 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
13052         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
13053         (pfn_vflag_identifier): Define.
13054         Update comment about layout of pointer functions.
13055         (build_ptrmemfunc1): Update prototype.
13056         (expand_ptrmemfunc_cst): Update prototype.
13057         * decl.c (initialize_predefined_identifiers): Initialize
13058         pfn_vflag_identifier.
13059         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
13060         an extra field to the type.
13061         * expr.c (cplus_expand_constant): Pass 'flag' between
13062         expand_ptrmemfunc_cst and build_ptrmemfunc1.
13063         * typeck.c (get_member_function_from_ptrfunc): When
13064         FUNCTION_BOUNDARY < 16, look at additional field to determine
13065         if a pointer-to-member is a real pointer or a vtable offset.
13066         (build_ptrmemfunc1): Add new parameter to contain extra field.
13067         (build_ptrmemfunc): Pass the extra field around.
13068         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
13069         (pfn_from_ptrmemfunc): Ignore the extra field.
13071 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
13073         * cp-tree.h (flag_inline_trees): Update documentation.
13074         * decl.c (init_decl_processing): Adjust handling of
13075         flag_inline_functions and flag_inline_trees to support -O3.
13076         (grokfndecl): Set DECL_INLINE on all functions if that's what
13077         the user requested.
13078         (save_function_data): Clear DECL_INLINE in
13079         current_function_cannot_inline is non-NULL.
13080         * decl2.c (flag_inline_trees): Update documentation.
13082 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
13084         * dump.c (cp_dump_tree, USING_STMT case): New case.
13085         * tree.c (cp_statement_code_p): Add USING_STMT.
13086         * decl2.c (do_using_directive): Add the using directive statement.
13088         * tree.c (walk_tree): Reformat an if block.
13090 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
13092         * decl.c (compute_array_index_type): Don't try to do anything with
13093         the indices when processing a template.
13095 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13097         * call.c: NULL_PTR -> NULL.
13098         * class.c: Likewise.
13099         * cvt.c: Likewise.
13100         * decl.c: Likewise.
13101         * decl2.c: Likewise.
13102         * except.c: Likewise.
13103         * init.c: Likewise.
13104         * rtti.c: Likewise.
13105         * search.c: Likewise.
13106         * tree.c: Likewise.
13107         * typeck.c: Likewise.
13108         * typeck2.c: Likewise.
13110 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
13112         * decl2.c (do_using_directive): Revert previous patch.
13114 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13116         * cp-tree.def (USING_STMT): New statement node.
13117         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
13118         * decl2.c (do_using_directive): Add USING_STMT to statement
13119         tree. Don't emit errors when processing template decl.
13120         * pt.c (tsubst_expr, USING_STMT case): New case.
13121         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
13123 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13125         * call.c (build_new_op): Convert args from reference here.
13126         (build_conditional_expr): Don't convert here.
13128 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
13130         * spew.c (last_token_id): New static variable.
13131         (read_token): Set it here.
13132         (yyerror): Use it here.
13134 2001-04-30  Richard Henderson  <rth@redhat.com>
13136         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
13137         * decl.c: Likewise.
13139 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
13141         * gxxint.texi: Remove.
13142         * Make-lang.in: Remove all traces of gxxint.texi.
13144 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
13146         * decl2.c (start_static_initialization_or_destruction): Correct
13147         logic to handle the -fno-use-cxa-atexit case.
13149 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
13151         * optimize.c (update_cloned_parm): New function.
13152         (maybe_clone_body): Use it.  Update the `this' parameter too.
13154 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
13156         * decl2.c (unsupported_options): Add new-abi.
13157         * lang-options.h: Remove no longer supported options.
13159 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13161         * except.c (can_convert_eh): Don't check template parms,
13162         typename types etc.
13164 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13166         * optimize.c (maybe_clone_body): Copy parameter names and locations.
13168 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
13170         * cp-tree.h (adjust_clone_args): Prototype new function.
13171         * class.c (adjust_clone_args): New function.
13172         * decl.c (start_function): Call it for in charge ctors.
13174 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
13176         * method.c (use_thunk): Make sure that thunks really are emitted
13177         when requested.
13179 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
13181         * mangle.c (write_chars): New macro.
13182         (hwint_to_ascii): New function
13183         (write_number): Use it.
13184         (write_integer_cst): Deal with really big numbers.
13186 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
13188         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
13189         the clone.
13191 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
13193         * decl.c (grokdeclarator): Set context of namespace scope
13194         TYPE_DECLS.
13196 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
13198         * cp/optimize.c: Include hashtab.h.
13199         (struct inline_data): Add tree_pruner.
13200         (expand_call_inline, expand_calls_inline): Use it when calling
13201         walk_tree.
13202         (optimize_function): Initialize and free tree_pruner.
13204 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
13206         Lazy __FUNCTION__ generation.
13207         * cp-tree.def (FUNCTION_NAME): Remove.
13208         * cp-tree.h (function_name_declared_p): Remove.
13209         (cp_fname_init): Prototype.
13210         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
13211         don't call declare_function_name. Call start_fname_decls.
13212         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
13213         clobber the line number.
13214         (cp_fname_init): New function.
13215         (start_function): Call start_fname_decls.
13216         (finish_function): Call finish_fname_decls.
13217         * lex.c (reswords): Add slots for __FUNCTION__ et al.
13218         (rid_to_yy): Add mappings for __FUNCTION__ et al.
13219         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
13220         * parse.y (VAR_FUNC_NAME): New token.
13221         (primary): Add VAR_FUNC_NAME.
13222         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
13223         generation.
13224         (tsubst, FUNCTION_NAME case): Remove.
13225         (tsubst_copy, FUNCTION_NAME case): Remove.
13226         (tsubst_expr, DECL_STMT case): Be careful with a
13227         DECL_PRETTY_FUNCTION_P.
13228         (instantiate_decl): Remove function_name_declared_p.
13229         * semantics.c (begin_compound_statement): Don't call
13230         declare_function_name here.
13231         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
13232         (finish_translation_unit): Call finish_fname_decls.
13233         (expand_body): Remove function_name_declared_p.
13234         * typeck2.c (digest_init): Allow any ERROR_MARK.
13236 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
13238         * pt.c (tsubst_decl): Use VOID_TYPE_P.
13239         * semantics.c: Fix some typos.
13241 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
13243         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
13245 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13247         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
13249 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
13251         * except.c (build_throw): Wrap the initialization of the exception
13252         object in a MUST_NOT_THROW_EXPR.
13253         (do_free_exception): #if 0.
13255 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
13257         * cp-tree.h (finish_enum): Change prototype.
13258         * decl.c (finish_enum): Reorganize.
13259         * parse.y (structsp): Adjust calls to finish_enum.
13261 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13263         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
13264         't' case.
13266 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13268         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
13269         (layout_empty_base): Return at end flag.
13270         (build_base_field): Likewise.
13271         (build_base_fields): Likewise.
13272         (layout_virtual_bases): Don't add 1 to eoc value.
13273         (end_of_class): Use full size for empty bases.
13274         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
13275         empty bases. Don't add 1 to eoc value. Only add trailing padding
13276         if we're an empty class with no empty bases.
13277         (dump_class_hierarchy): Dump size and alignment.
13279 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
13281         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
13282         ICS_BAD_FLAG.
13284 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
13286         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
13287         is found, look first if name does not match the structure name.
13289 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
13291         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
13292         set.
13293         (SET_DECL_LANGUAGE): New macro.
13294         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
13295         (pushdecl): Likewise.
13296         (build_library_fn_1): Likewise.
13297         (build_cp_library_fn): Likewise.
13298         (grokfndecl): Likewise.
13299         (grokvardecl): Mark `extern "C"' variables as having C linkage.
13300         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
13301         * lex.c (retrofit_lang_decl): Likewise.
13302         * mangle.c (mangle_decl_string): Don't mangle the names of
13303         variables declared with C language linkage.
13304         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
13306 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
13308         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
13309         flag_access_control from uninitialized storage.
13311 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
13313         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
13314         * mangle.c (write_pointer_to_member_type): Fix mangling of
13315         pointers to cv-qualified member function types.
13317         * init.c (build_delete): Create a SAVE_EXPR for the address if
13318         we're going to use it more than once.
13320 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
13322         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
13323         (expand_ptremfunc_cst): Change prototype.
13324         (delta2_from_ptrmemfunc): Remove.
13325         * expr.c (cplus_expand_constant): Adjust call to
13326         expand_ptrmemfunc_cst.
13327         * typeck.c (build_ptrmemfunc1): Simplify.
13328         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
13329         results in a constant.
13330         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
13331         (delta2_from_ptrmemfunc): Remove.
13332         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
13334 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
13336         * cp-tree.h (decl_namespace_list): New macro.
13337         (struct saved_scope): Add decl_ns_list.
13338         * decl.c (mark_saved_scope): Mark it.
13339         * decl2.c: Lose static decl_namespace_list.
13340         (init_decl2): Don't save it.
13342 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13344         * cp-tree.h (warn_return_type, yylex): Delete redundant
13345         declarations.
13347         * decl.c (current_class_depth, global_namespace): Likewise.
13349         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
13351         * repo.c (flag_use_repository): Likewise.
13353 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13355         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
13356         set_block, pushdecl, getdecls, gettags, init_decl_processing,
13357         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
13358         lvalue_or_else, print_lang_statistics, comp_target_types,
13359         unsigned_type, signed_type, signed_or_unsigned_type,
13360         build_function_call, mark_addressable, incomplete_type_error):
13361         Delete redundant declarations.
13363 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
13365         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
13366         (TYPE_ANONYMOUS_P): New macro.
13367         (TAGGED_TYPE_P): New macro.
13368         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
13369         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
13370         * tree.c (no_linkage_helper): Likewise.
13371         * semantics.c (begin_class_definition): Likewise.
13372         * pt.c (convert_template_argument): Likewise.
13373         * lex.c (check_for_missing_semicolon): Likewise.
13375 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
13377         * class.c (dfs_unshared_virtual_bases): New function.
13378         (mark_primary_bases): Call it.
13379         (check_bases): Ignore virtual bases when determining
13380         nearly-emptiness.
13382 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
13384         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
13386 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
13388         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
13389         cloned function to the clone.
13391 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13393         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
13395         * semantics.c: Include expr.h.
13397 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
13399         * method.c (implicitly_declare_fn): Commonize code for copy ctor
13400         and assignment op. Set TREE_USED for parameter.
13402 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
13404         * class.c (find_final_overrider_data): Add `candidates'.
13405         (dfs_find_final_overrider): Don't issue error messages
13406         prematurely.
13407         (find_final_overrider): Issue error messages here.
13408         (build_base_field): Don't warn about amgibuous direct bases here.
13409         (warn_about_ambiguous_direct_bases): New function.
13410         (layout_class_type): Use it.
13412 2001-04-10  Richard Henderson  <rth@redhat.com>
13414         * typeck.c (build_array_ref): Push the array reference inside
13415         COMPOUND_EXPR and COND_EXPR.
13417 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
13419         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
13420         * decl.c (duplicate_decls): Adjust accordingly.
13421         (maybe_commonize_var): Likewise.
13422         (grokfndecl): Likewise.
13423         (start_function): Likewise.
13424         (start_method): Likewise.
13425         * decl2.c (key_method): Likewise.
13426         (import_export_decl): Likewise.
13427         * method.c (implicitly_declare_fn): Likewise.
13428         * optimize.c (maybe_clone_body): Likewise.
13430 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
13432         * lang-specs.h: Add __DEPRECATED.
13434 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
13436         * search.c (get_dynamic_cast_base_type): When building a new
13437         constant, set its type to ssizetype.
13439 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
13441         * optimize.c (expand_call_inline): Only add newly inlined statements
13442         into inlined_stmts.
13444 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
13446         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
13447         (OPERATOR_FORMAT): Likewise.
13448         (OPERATOR_TYPENAME_FORMAT): Likewise.
13449         * operators.def: Remove old name-mangling information.
13450         * decl.c (grok_op_properties): Adjust accordingly.
13451         * lex.c (init_operators): Likewise.
13452         * rtti.c (get_tinfo_decl): Issue error messages about types that
13453         have variable size.
13455 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
13457         * decl2.c (import_export_decl): Don't call import_export_class
13458         when processing an inline member function.
13459         * semantics.c (expand_body): Call import_export_decl before
13460         emitting inline functions.
13462 2001-03-28  Richard Henderson  <rth@redhat.com>
13464         IA-64 ABI Exception Handling:
13465         * cp-tree.def (EH_SPEC_BLOCK): New.
13466         (MUST_NOT_THROW_EXPR): New.
13467         * cp-tree.h: Update changed function declarations.
13468         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
13469         (CPTI_CALL_UNEXPECTED): New.
13470         (struct cp_language_function): Rename x_eh_spec_try_block
13471         to x_eh_spec_block.
13472         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
13473         * decl.c (current_binding_level): If no current function
13474         bindings, revert to scope_chain.
13475         (initialize_predefined_identifiers): Remove __cp_push_exception.
13476         (store_parm_decls): Use begin_eh_spec_block.
13477         (finish_function): Use finish_eh_spec_block.
13478         (mark_lang_function): Update for name changes.
13479         * decl2.c (finish_file): No mark_all_runtime_matches.
13480         * dump.c (cp_dump_tree): Handle new tree codes.
13481         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
13482         * except.c (catch_language_init, catch_language): Remove.
13483         (init_exception_processing): Don't set language code.
13484         Initialize call_unexpected_node, protect_cleanup_actions,
13485         eh_personality_libfunc, lang_eh_runtime_type.
13486         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
13487         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
13488         (prepare_eh_type): Split out type canonicalizations ...
13489         (build_eh_type_type): ... from here.
13490         (build_eh_type_type_ref): Remove.
13491         (mark_all_runtime_matches): Remove.
13492         (build_exc_ptr): New.
13493         (do_begin_catch, do_end_catch): New.
13494         (do_pop_exception): Remove.
13495         (build_terminate_handler): Remove.
13496         (choose_personality_routine): Split out language choice from ...
13497         (initialize_handler_parm): ... here.
13498         Use MUST_NOT_THROW_EXPR.
13499         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
13500         exception object handling.
13501         (expand_start_eh_spec, expand_end_eh_spec): Remove.
13502         (expand_exception_blocks, alloc_eh_object): Remove.
13503         (begin_eh_spec_block, finish_eh_spec_block): New.
13504         (do_allocate_exception, do_free_exception): New.
13505         (expand_throw): Merge into ...
13506         (build_throw): ... here.  Update for abi.
13507         * expr.c (cplus_expand_expr): No expand_internal_throw.
13508         Handle MUST_NOT_THROW_EXPR.
13509         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
13510         * semantics.c (*) Update for except.h name changes.
13511         (genrtl_try_block): No protect_with_terminate.
13512         (genrtl_eh_spec_block): New.
13513         (genrtl_handler): Don't emit the goto here.
13514         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
13515         (genrtl_finish_function): Don't expand_exception_blocks.
13516         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
13518 2001-03-28  Richard Henderson  <rth@redhat.com>
13520         * decl.c (struct named_label_list): Rename eh_region to
13521         in_try_scope, add in_catch_scope.
13522         (struct binding_level): Rename eh_region to is_try_scope,
13523         add is_catch_scope.
13524         (note_level_for_try): Rename from note_level_for_eh.
13525         (note_level_for_catch): New.
13526         (poplevel): Copy both is_try_scope and is_catch_scope to
13527         the named_label_list struct.
13528         (check_previous_goto_1): Don't check for catch block via
13529         DECL_ARTIFICIAL; use in_try_scope instead.
13530         (check_goto): Likewise.
13531         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
13532         * except.c (expand_start_catch_block): Call note_level_for_catch.
13533         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
13535 2001-03-27  Richard Henderson  <rth@redhat.com>
13537         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
13538         exceptions_via_longjmp.
13540 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
13542         * pt.c (check_default_tmpl_args):  Make error messages clearer.
13544 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
13546         * error.c:  Also undefine 'A' macro used for cp_printers definition.
13548 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13550         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
13552 2001-03-26  Mike Yang <yang@research.att.com>
13553             Mark Mitchell  <mark@codesourcery.com>
13555         * dump.c (dump_access): New function.
13556         (cp_dump_tree): Use it.  Dump basetype information for class
13557         types.
13559 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
13561         * Makefile.in (optimize.o): Depend on params.h.
13562         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
13563         (init_decl_processing): Set flag_no_inline when doing
13564         inlining-on-trees.
13565         * optimize.c: Include params.h.
13566         (struct inline_data): Improve documentation of FNS.  Add
13567         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
13568         (INSNS_PER_STMT): New macro.
13569         (remap_block): Use CLONING_P.
13570         (inlinable_function_p): Don't inline big functions.
13571         (expand_call_inline): Keep track of how much inlining we've done.
13572         (optimize_function): Set FIRST_INLINED_FN.
13573         (maybe_clone_body): Set CLONING_P.
13574         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
13575         tree nodes.
13576         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
13577         rest_of_compilation.  Clear DECL_RTL for local variables
13578         afterwards.
13579         (clear_decl_rtl): New function.
13581 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
13583         Implement DR 209
13584         * cp-tree.h (skip_type_access_control,
13585         reset_type_access_control): Prototype.
13586         * decl.c (grokdeclarator): Access of friends is not checked.
13587         * parse.y (component_decl_list): Reset type access control.
13588         * semantics.c (decl_type_access_control): Clear
13589         current_type_lookups.
13590         (save_type_access_control): Don't save if not deferring.
13591         (skip_type_access_control, reset_type_access_control): New
13592         functions.
13593         (begin_class_definition): Do type access control for basetypes.
13594         Start deferred access control.
13595         (finish_class_definition): Resume immediate access control if
13596         this is a local class.
13598 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13600         * class.c (add_method): Use memcpy/memmove, not bcopy.
13602         * decl.c (duplicate_decls): Likewise.
13604 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13606         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
13607         not `_'.
13609 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
13611         * decl.c (local_names): Define.
13612         (push_local_name): New.
13613         (grok_reference_init): Return init if initializing static reference
13614         variable with non-constant instead of emitting it.
13615         Move expand_static_init call to cp_finish_decl.
13616         (layout_var_decl): Call push_local_name.
13617         (maybe_commonize_var): Allow inlining functions even if they have
13618         static local variables, use comdat_linkage for them if flag_weak.
13619         (check_initializer): Call obscure_complex_init if
13620         grok_reference_init returned nonzero.
13621         (save_function_data): Clear x_local_names.
13622         (pop_cp_function_context): Free x_local_names.
13623         (mark_inlined_fns): Remove.
13624         (mark_lang_function): Mark x_local_names.
13625         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
13626         Mark inlined_fns as tree, remove call to mark_inlined_fns.
13627         * class.c (alter_access): Ensure DECL_ACCESS is never set if
13628         DECL_DISCRIMINATOR_P.
13629         * cp-tree.h (cp_language_function): Add x_local_names.
13630         (lang_decl_flags): Add discriminator into u2.
13631         (lang_decl_inlined_fns): Remove.
13632         (lang_decl): inlined_fns is now a TREE_VEC.
13633         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
13634         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
13635         TREE_VEC, not a custom structure.
13636         (optimize_function): Likewise.
13637         * mangle.c (discriminator_for_local_entity): Discriminate among
13638         VAR_DECL local entities.
13639         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
13640         is not valid.
13642 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
13644         Add support for Java interface method calls.
13645         * cp-tree.h (struct lang_type): Add java_interface flag.
13646         (TYPE_JAVA_INTERFACE): New macro.
13647         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
13648         by setting TYPE_JAVA_INTERFACE.
13649         * call.c (java_iface_lookup_fn): New static.
13650         (build_over_call): If calling a method declared in a
13651         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
13652         expression which resolves the function address.
13653         (build_java_interface_fn_ref): New function.
13655 2001-03-22  Richard Henderson  <rth@redhat.com>
13657         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
13658         * except.c: Don't include it.
13660 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
13661             based on an idea from Joe Buck <jbuck@synopsys.com>
13663         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
13664         New nonterminals.
13665         (data_def, component_decl): Add reductions to bad_decl.
13667 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
13669         * method.c (do_build_assign_ref): Don't use build_modify_expr for
13670         anonymous aggregates, since they don't have assignment operator
13671         method.
13672         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
13673         assignment operators for anonymous structure fields.
13675 2001-03-21  Jason Merrill  <jason@redhat.com>
13677         * pt.c (instantiate_decl): Abort if we see a member constant
13678         instantiation that doesn't already have its initializer.
13679         Downgrade explicit instantiation without definition to pedwarn.
13681         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
13682         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
13683         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
13685         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
13686         (pending_vtables): Remove.
13687         * decl2.c (pending_vtables): Remove.
13688         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
13689         CLASSTYPE_VTABLE_NEEDS_WRITING.
13690         (import_export_class): Likewise.
13691         (init_decl2): Don't mark pending_vtables.
13692         * lex.c (handle_pragma_vtable): Just sorry.
13693         * pt.c (instantiate_class_template): Don't mess with
13694         CLASSTYPE_VTABLE_NEEDS_WRITING.
13695         (mark_class_instantiated): Likewise.
13696         * ptree.c (print_lang_type): Don't print it.
13697         * semantics.c (begin_class_definition): Don't set it.
13699         * pt.c (template_tail): Replace with last_pending_template.
13700         (maybe_templates, maybe_template_tail): Remove.
13701         (add_pending_template): Adjust.
13702         (instantiate_pending_templates): Adjust.
13704         * cp-tree.h (struct saved_scope): Remove lang_stack field.
13705         (current_lang_stack): Remove.
13706         * decl.c (maybe_push_to_top_level): Don't initialize it.
13707         (duplicate_decls): Use current_lang_depth.
13708         (xref_basetypes): Likewise.
13709         * class.c (current_lang_depth): New fn.
13710         (push_lang_context): Use more varray functionality.
13711         (pop_lang_context): Likewise.
13713         * error.c (GLOBAL_THING): Always use '__'.
13715 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
13717         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
13719         * mangle.c (mangle_decl_string): Mangle the names of overloaded
13720         operators, even when they have `extern "C"' linkage.
13722 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
13724         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
13725         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13726         where it's not necessary.
13727         (add_method): Remove optimization involving comparison of
13728         DECL_ASSEMBLER_NAME.
13729         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
13730         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13731         where it's not necessary.
13732         (check_methods): Likewise.
13733         (build_clone): Likewise.
13734         (built_vtt): Likewise.
13735         * cp-tree.h (DECL_NEEDED_P): Likewise.
13736         * decl.c (pushtag): Likewise.
13737         (duplicate_decls): Likewise.
13738         (pushdecl): Likewise.
13739         (builtin_function): Likewise.
13740         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
13741         (build_cp_library_fn): Likewise.
13742         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
13743         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13744         where it's not necessary.
13745         (make_rtl_for_nonlocal_decl): Likewise.
13746         (cp_finish_decl): Likewise.
13747         (grokfndecl): Likewise.
13748         (grokvardecl): Likewise.
13749         (grokdeclarator): Likewise.
13750         (start_function): Likewise.
13751         (cp_missing_return_ok_p): Likewise.
13752         * decl2.c (grokclassfn): Likewise.
13753         (check_classfn): Likewise.
13754         (finish_static_data_member_decl): Likewise.
13755         (grokfield): Likewise.
13756         * error.c (GLOBAL_IORD_P): Remove.
13757         (dump_global_iord): Improve output.
13758         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
13759         * except.c (nothrow_libfn_p): Summarily reject any function not in
13760         namespace-scope.
13761         * init.c (build_java_class_ref): Don't explicitly set
13762         DECL_ASSEMBLER_NAME after calling mangle_decl.
13763         * mangle.c (mangle_decl_string): Handle extern "C" functions.
13764         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
13765         * method.c (set_mangled_name_for_decl): Don't explicitly set
13766         DECL_ASSEMBLER_NAME after calling mangle_decl.
13767         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
13768         IDENTIFIER_GLOBAL_VALUE for the thunk.
13769         * pt.c (set_mangled_name_for_template_decl): Remove.
13770         (check_explicit_specialization): Don't use it.
13771         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
13772         (tsubst_friend_function): Likewise.
13773         (tsubst_decl): Likewise.
13774         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
13775         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
13776         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
13777         where it's not necessary.
13778         (tinfo_base_init): Likewise.
13779         (create_real_tinfo_var): Likewise.
13780         * search.c (looup_field_1): Likewise.
13781         * semantics.c (finish_named_return_value): Likewise.
13782         * tree.c (init_tree): Set lang_set_decl_assembler_name.
13784 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13786         Correct semantics restrictions checking in throw-expression.
13787         * except.c (is_admissible_throw_operand): New function.
13788         (build_throw): Use it.
13790 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13792         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
13793         and its ilk.
13795 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
13797         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13798         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
13799         * decl.c (duplicate_decls): Likewise.
13800         (builtin_function): Likewise.
13801         (build_library_fn): Likewise.
13802         (build_cp_library_fn): Likewise.
13803         (check_initializer): Likewise.
13804         (cp_finish_decl): Likewise.
13805         * decl2.c (grokfield): Likewise.
13806         (grok_function_init): Remove #if 0'd code.
13807         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
13808         * friend.c (do_friend): Likewise.
13809         * init.c (get_temp_regvar): Likewise.
13810         * method.c (make_thunk): Likewise.
13811         * pt.c (tsubst_friend_function): Likewise.
13812         (tsubst_decl): Likewise.
13813         (regenerate_decl_from_template): Likewise.
13814         * semantics.c (genrtl_named_return_value): Likewise.
13815         (expand_body): Likewise.
13816         (genrtl_finish_function): Likewise.
13817         * tree.c (cp_tree_equal): Likewise.
13819 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
13821         * call.c (convert_like_real): Add extra semantics to INNER
13822         parameter. Don't convert to temporary if a user conversion
13823         gives us an lvalue that we're about to bind to a reference.
13824         Set INNER to indicate pending reference binding on recursive
13825         calls.
13827 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13829         * cp/lex.c: Delete duplicate pending_lang_change.
13831 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
13833         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
13834         Similarly.
13835         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
13836         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
13838 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
13840         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
13842 2001-03-08  Stan Shebs  <shebs@apple.com>
13844         * cp-tree.h (set_identifier_local_value): Remove unused decl.
13846 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
13848         * spew.c: Remove references to CPP_OSTRING.
13850 2001-03-06  Andrew Haley  <aph@redhat.com>
13852         * typeck.c (convert_arguments): Check that we have an fndecl.
13854 2001-03-05  Andrew Haley  <aph@redhat.com>
13856         * typeck.c (convert_arguments): Don't do ellipsis conversion for
13857         __built_in_constant_p.
13859 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13861         * typeck.c (build_static_cast): Allow enum to enum conversions
13862         as per DR 128.
13864 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13866         * class.c (check_field_decls): Pointers to member do not a
13867         non-pod struct make, as per DR 148.
13869 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13871         * call.c (joust): cp_pedwarn when using gnu extension concerning
13872         worst conversion sequences.
13874 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13876         * decl.c: Replace all uses of 'boolean' with 'bool'.
13878 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
13880         * lang-specs.h: Add zero initializer for cpp_spec field to
13881         all array elements that need one.  Don't put an #ifdef inside
13882         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
13883         use it.
13885 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13887         Implement using decls inside template functions.
13888         * decl2.c (validate_nonmember_using_decl): Don't special case
13889         fake_std_node in the global namespace. Don't reject early when
13890         processing a template.
13891         (do_local_using_decl): Add to statement tree. Don't do further
13892         processing when building a template.
13893         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
13895 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
13897         * decl2.c (do_nonmember_using_decl): Don't complain if we find
13898         same function. Do complain about ambiguating extern "C"
13899         declarations.
13901 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
13903         Remove floating point and complex type template constant parms.
13904         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
13905         COMPLEX_TYPE extensions.
13906         (invalid_nontype_parm_type_p): Likewise.
13908 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
13910         * except.c (call_eh_info): Revert "match_function"'s type.
13912 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
13914         Fix ctor vtable vcall offsets.
13915         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
13916         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
13917         (get_matching_base): Remove.
13918         (get_original_base): New function.
13919         (build_vtbl_initializer): Initialize vid.rtti_binfo.
13920         Use a virtual thunk for a ctor vtable with an index
13921         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
13922         primary base within a constructor vtable. Only set
13923         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
13924         when primary base has been lost.
13925         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
13927 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
13929         * call.c (joust): Ensure more_specialized()'s argument length
13930         parameter has correct value for constructors.
13932 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
13934         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
13936         * decl.c (mark_inlined_fns): Prototype.
13938 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13940         * spew.c (yylex): Correct handling of friends.
13942 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
13944         * mangle.c (write_encoding): Pass write_function_type the
13945         FUNCTION_DECL for the function being encoded.
13946         (write_function_type): Pass it along to write_bare_function_type.
13947         (write_bare_function_type): Pass it along to write_method_parms.
13948         (write_method_parms): Don't mangle the compiler-generated
13949         parameters to a constructor or destructor.
13951 2001-02-22  Andreas Jaeger  <aj@suse.de>
13953         * optimize.c: Include toplev.h for
13954         note_deferral_of_defined_inline_function prototype.
13956 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
13958         * cp-tree.h (struct lang_decl_inlined_fns): New.
13959         (struct lang_decls): Add inlined_fns.
13960         (DECL_INLINED_FNS): New macro.
13961         * optimize.c (struct inline_data): Add inlined_fns.
13962         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
13963         (inlinable_function_p): Likewise, fix typo in comment,
13964         function is not inlinable if it already inlined function currently
13965         being optimized.
13966         (expand_call_inline): Add fn to inlined_fns if necessary.
13967         (optimize_function): Initialize inlined_fns.
13968         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
13969         * decl.c (mark_inlined_fns): New function.
13970         (lang_mark_tree): Call it.
13972 2001-02-21  Jason Merrill  <jason@redhat.com>
13974         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
13975         (DECL_UNINLINABLE): Move to middle-end.
13977         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
13978         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
13979         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
13980         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
13981         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
13983         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
13984         second parm of op=.
13986 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
13988         * decl2.c (set_decl_namespace): Allow explicit instantiations in
13989         any namespace.
13991 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13993         * optimize.c (expand_call_inline): Don't walk subtrees of type
13994         nodes.
13996 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
13998         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
13999         for a destructor.
14001 2001-02-18  Jason Merrill  <jason@redhat.com>
14003         Do put the VTT parameter in DECL_ARGUMENTS.
14004         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
14005         (current_vtt_parm): New macro.
14006         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
14007         (DECL_HAS_VTT_PARM_P): New macro.
14008         (DECL_VTT_PARM): Remove.
14009         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
14010         * decl.c (duplicate_decls): Only copy the operator code if
14011         appropriate.
14012         (start_function): Set current_vtt_parm.
14013         (lang_mark_tree): Don't mark vtt_parm.
14014         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
14015         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
14016         * class.c (build_clone): Maybe remove the VTT parm.
14017         * optimize.c (maybe_clone_body): Set up the VTT parm.
14018         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
14019         * call.c (build_over_call): Just allow the VTT arg.
14020         * method.c (make_thunk): Don't set DECL_VTT_PARM.
14021         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
14022         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
14023         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
14024         * error.c (dump_function_decl): Likewise.
14025         * call.c (build_user_type_conversion_1, convert_like_real): Abort
14026         if we try to call a constructor with in-charge or VTT parms.
14027         * method.c (skip_artificial_parms_for): New fn.
14028         * call.c (add_function_candidate, build_over_call): Call it.
14029         * call.c (build_new_method_call): Use current_vtt_parm.
14030         * init.c (expand_virtual_init): Likewise.
14031         * class.c (same_signature_p): No longer static.
14032         * cp-tree.h: Declare it.
14033         * search.c (look_for_overrides_r): Use it.
14035 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
14037         * cp-tree.h (new_abi_rtti_p): Remove.
14038         (name_mangling_version): Likewise.
14039         (flag_do_squangling): Likewise.
14040         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
14041         * decl.c (grokfndecl): Likewise.
14042         * decl2.c (name_mangling_version): Remove.
14043         (flag_do_squangling): Likewise.
14044         (lang_f_options): Remove `squangle'.
14045         (unsupported_options): Add `squangle'.
14046         (cxx_decode_option): Issue a warning about uses of
14047         -fname-mangling-version.
14048         (finish_file): Remove old ABI support.
14049         * pt.c (check_explicit_specialization): Likewise.
14050         (tsubst_decl): Likewise.
14051         * rtti.c (init_rtti_processing): Likewise.
14052         (build_headof): Likewise.
14053         (get_tinfo_decl_dynamic): Likewise.
14054         (tinfo_from_decl): Likewise.
14055         (build_dynamic_cast_1): Likewise.
14056         (synthesize_tinfo_var): Likewise.
14057         * init.c (build_new): Allow enumeration types for the array-bounds
14058         in a direct-new-declarator.
14060         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
14062         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
14063         TREE_PROTECTED from the template being specialized.
14065 2001-02-17  Jason Merrill  <jason@redhat.com>
14067         * decl2.c (build_artificial_parm): Set TREE_READONLY.
14069         * decl.c (bad_specifiers): Allow throw specs on things with
14070         pointer-to-function or -member-function type.
14071         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
14072         a pmf.
14074 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
14076         * call.c (check_dtor_name): Handle template names correctly.
14078 2001-02-16  Jason Merrill  <jason@redhat.com>
14080         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
14081         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
14082         * optimize.c (maybe_clone_body): Don't substitute it.
14083         * call.c (build_new_method_call): Check in_chrg instead.
14084         * init.c (expand_virtual_init): Likewise.
14086 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
14088         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
14089         class-type introduces at least a type-name.
14091 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
14093         * call.c (convert_like_real): Create a temporary for non-lvalue.
14095 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
14097         * cp-tree.h: Fix typos in comments.
14099 2001-02-16  Jason Merrill  <jason@redhat.com>
14101         * optimize.c (remap_block): If we're compiling a clone, pass the
14102         new block to insert_block.
14104 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
14106         * semantics.c (finish_asm_stmt): Robustify.
14108 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
14110         * pt.c (push_template_decl_real): Don't remangle the name of a
14111         class template.
14113 2001-02-15  Jim Meyering  <meyering@lucent.com>
14115         * Make-lang.in (c++.install-common): Depend on installdirs.
14116         (c++.install-info): Likewise.
14117         (c++.install-man): Likewise.
14119 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
14121         * typeck2.c (build_m_component_ref): Robustify.
14123 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
14125         * friend.c (do_friend): Don't take the nested [template] class
14126         into account when deciding whether to warn about the friend
14127         function not referring to a template function.
14129 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
14131         * typeck.c (build_unary_op): Clarify error message.
14133 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
14135         * parse.y (component_constructor_declarator): allow optional
14136         parentheses around constructor class name.
14138 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14140         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
14141         section.
14142         * init.c (emit_base_init): Remove incorrect comment about
14143         virtual bases.
14144         * method.c (make_thunk): Fix comment alignment.
14146 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14148         Kill remnants of this is variable.
14149         * cp-tree.h (flag_this_is_variable): Remove.
14150         * decl2.c (flag_this_is_variable): Remove.
14151         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
14152         (build_vbase_path): The path is non-static, even in a cdtor.
14153         (resolves_to_fixed_type_p): Add additional return value.
14154         * search.c (init_vbase_pointers): Adjust.
14155         * tree.c (lvalue_p_1): Adjust.
14156         * typeck.c (mark_addressable): Adjust.
14158 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14160         * pt.c (unify): Don't check cv quals of array types.
14162 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
14164         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
14165         check whether we already have the type.
14167 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
14169         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
14170         * call.c (build_op_delete_call): Simplify to remove duplicate
14171         code.
14172         * class.c (clone_function_decl): Don't build the deleting variant
14173         of a non-virtual destructor.
14174         * decl.c (finish_destructor_body): Don't call delete if this is a
14175         non-virtual destructor.
14176         * init.c (build_delete): Explicitly call `operator delete' when
14177         deleting an object with a non-virtual destructor.
14179 2001-02-13  Jason Merrill  <jason@redhat.com>
14181         * lang-specs.h: Add more __EXCEPTIONS.
14183 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14185         * typeck2.c (process_init_constructor): Check
14186         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
14188 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14190         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
14191         Remove spurious information in comment. Allow further
14192         adjustments of REFERENCE_TYPE args.
14194 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
14196         * errfn.c (cp_deprecated): Tweak diagnostic text.
14197         * parse.y (new_initializer): Deprecate initializer lists
14198         extension.
14200 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
14202         Remove old ABI support.
14204 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
14206         * decl2.c (flag_vtable_thunks): Always set it to 1.
14207         (flag_new_abi): Likewise.
14208         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
14210         * Makefile.in (g++spec.o): Fix typo.
14212 2001-02-09  Jason Merrill  <jason@redhat.com>
14214         * lang-specs.h: Restore definition of __EXCEPTIONS.
14216 2001-02-08  Jason Merrill  <jason@redhat.com>
14218         * search.c (shared_member_p): New function.
14219         (lookup_field_r): Use it.
14220         * cp-tree.h (SHARED_MEMBER_P): Remove.
14222         * method.c (process_overload_item): Handle template-dependent array
14223         bounds.
14224         * pt.c (type_unification_real): If we end up with undeduced nontype
14225         parms, try again.
14227         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
14228         types.
14230         * typeck2.c (friendly_abort): Don't say anything if we have
14231         earlier errors or sorries.
14233         * decl.c (check_tag_decl): Notice attempts to redefine bool and
14234         wchar_t.  Ignore if in_system_header.
14236         * decl.c (maybe_push_cleanup_level): New fn...
14237         (start_decl_1): ...split out from here.
14238         * cvt.c (build_up_reference): Use it.
14239         * cp-tree.h: Declare it.
14241 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
14243         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
14244         spec.
14246 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
14248         * pt.c (lookup_template_class): Make sure it's a primary
14249         template or template_template_parm when called from the parser.
14250         (instantiate_template_class): Add assertion.
14252 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
14254         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
14255         from error_mark_node.
14257 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
14259         Fix specification and implementation bugs in V3 ABI
14260         construction vtables.
14261         * cp-tree.h (flag_dump_class_layout): New flag.
14262         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
14263         (BINFO_LOST_PRIMARY_P): New flag.
14264         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
14265         (BINFO_PRIMARY_MARKED_P): Rename to ...
14266         (BINFO_PRIMARY_P): ... here.
14267         (binfo_via_virtual): New prototype.
14268         * decl2.c (flag_dump_class_layout): New flag.
14269         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
14270         use `=' as a file name separator.
14271         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
14272         bases.
14273         (build_vtbl_address): If this is a virtual primary base, then
14274         get the vtbl of what it is ultimately primary for.
14275         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
14276         for BINFO_PRIMARY_P.
14277         (dfs_skip_nonprimary_vbases_markedp): Likewise.
14278         (get_shared_vbase_if_not_primary): Likewise.
14279         (dfs_get_pure_virtuals): Likewise.
14280         (expand_upcast_fixups): Likewise.
14281         (fixup_virtual_upcast_offsets): Likewise.
14282         (dfs_find_vbase_instance): Likewise.
14283         (find_vbase_instance): Likewise.
14284         (binfo_from_vbase): Adjust comment to reflect reality.
14285         (binfo_via_virtual): New function.
14286         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
14287         for binfo walking during VTT construction.
14288         (dfs_mark_primary_bases): Remove.
14289         (force_canonical_binfo_r): New function.
14290         (force_canonical_binfo): New function.
14291         (mark_primary_virtual_base): New function.
14292         (mark_primary_bases): Walk in inheritance graph order, use
14293         mark_primary_virtual_base.
14294         (determine_primary_base): Use some more intermediate variables.
14295         (dfs_find_final_overrider): Don't check for overriding along a
14296         virtual path.
14297         (dfs_modify_vtables): Walk into primary virtual bases too.
14298         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
14299         (build_base_fields): Likewise.
14300         (dfs_set_offset_for_unshared_vbases): Likewise.
14301         (layout_virtual_bases): Likewise.
14302         (end_of_class): Likewise.
14303         (finish_struct_1): Call dump_class_hierarchy, if requested.
14304         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
14305         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
14306         (dump_class_hierarchy): Add file parameter. Append to file, if
14307         required.
14308         (finish_vtbls): Adjust accumulate_vtbl_inits call.
14309         Use canonical base for virtual bases.
14310         (build_vtt): Add more comments. Adjust build_vtt_inits call.
14311         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
14312         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
14313         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
14314         virtual VTTs.
14315         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
14316         from DATA.  We want virtual primary bases and all bases via virtual.
14317         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
14318         virtual base when not a construction vtable.
14319         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
14320         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
14321         Use canonical bases when processing virtual bases.
14322         (accumulate_vtbl_inits): We're interested in any base via a
14323         virtual path.
14324         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
14325         within a construction vtable, determine what is being overridden.
14326         (build_vtbl_initializer): Add more comments
14327         (add_vcall_offset_vtbl_entries_1): Adjust comment.
14328         (build_rtti_vtbl_entries): Check if the base has lost its
14329         primary.
14331 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
14333         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
14335 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14337         * decl.c (pushdecl): Call abort instead of fatal.
14338         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
14339         * init.c (build_new_1): Likewise.
14340         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
14341         * decl.c (build_typename_type): hash_table_init now returns void.
14342         decl.c (init_decl_processing): Make an error non-fatal.
14344 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
14346         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
14347         Document.
14348         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
14349         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
14350         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
14351         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
14352         * decl.c (maybe_commonize_var): Use the new name-mangling where
14353         appropriate.
14354         * decl2.c (comdat_linkage): Enhance comments.  Make all
14355         compiler-generated things static, if COMDAT is not available.
14356         (get_tinfo_decl): Do not make typeinfo objects that belong in the
14357         library COMDAT.
14358         (tinfo_base_init): Use the correct mangled name for typeinfo
14359         strings, and push them into the global scope.
14360         (typeinfo_in_lib_p): New function.
14361         (synthesize_tinfo_var): Use it.
14362         (create_real_tinfo_var): Likewise.
14364 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
14366         * decl.c (push_class_binding): Use context_for_name_lookup instead
14367         of CP_DECL_CONTEXT.
14368         * search.c (context_for_name_lookup): Remove static.  Check for NULL
14369         context in the loop.
14370         * cp-tree.h (context_for_name_lookup): Add prototype.
14372 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
14374         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
14375         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
14376         Remove.
14377         * call.c (convert_class_to_reference, build_user_type_conversion_1,
14378         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
14380 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
14382         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
14383         of macros used when compiling g++spec.c.
14384         * g++spec.c (lang_specific_driver): Link with the shared
14385         libgcc by default.
14387 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
14389         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
14390         make_reference_declarator, make_call_declarator), method.c
14391         (implicitly_declare_fn), parse.y (namespace_using_decl,
14392         notype_unqualified_id, expr_or_declarator, new_type_id,
14393         after_type_declarator, direct_after_type_declarator,
14394         notype_declarator, complex_notype_declarator,
14395         complex_direct_notype_declarator, qualified_id,
14396         notype_qualified_id, overqualified_id, direct_new_declarator,
14397         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
14398         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
14399         instead of build_parse_node.
14401 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14403         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
14404         (minus_one_node): Moved to top level gcc directory.  Renamed
14405         to integer_minus_one_node.
14407         * init.c (init_init_processing): Don't set minus_one_node.
14408         (build_vec_init): Use integer_minus_one_node.
14410         * rtti.c (get_tinfo_decl_dynamic): Likewise.
14412 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
14414         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
14415         identical and they would be replaced with constant, remove
14416         MODIFY_EXPR from the tree.
14418 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14420         * Make-lang.in: Remove all dependencies on defaults.h.
14421         * call.c: Don't include defaults.h.
14422         * decl.c: Likewise.
14423         * decl2.c: Likewise.
14424         * except.c: Likewise.
14425         * pt.c: Likewise.
14426         * rtti.c: Likewise.
14427         * tree.c: Likewise.
14428         * typeck.c: Likewise.
14430 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
14432         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
14433         operators even in "C" linkage.
14434         * method.c (set_mangled_name_for_decl): Likewise.
14435         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
14436         overloaded operators in "C" linkage.
14438 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
14440         * pt.c (tsubst_decl): Remove IN_DECL parameter.
14441         (tsubst_arg_types): Check parameter is not void.
14442         (tsubst): Adjust tsubst_decl call.
14444 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
14446         * call.c (add_builtin_candidate): Quote std properly, from
14447         previous change.
14449 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14451         * pt.c (check_explicit_specialization): Clone constructors and
14452         destructors.
14454 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14456         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
14457         indicates anything special about template depth. Make sure we
14458         only count the user visible template classes.
14460 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
14462         * call.c (build_conv): Typo in comment.
14463         (add_builtin_candidate): Add more explanation.
14464         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
14465         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
14466         when we have enumeral types.
14467         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
14468         candidates for relops and eqops.
14469         (joust): Simplify control flow. Allow a non-template user
14470         function to hide a builtin.
14472 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
14474         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
14475         (more_specialized): Add deduction parameter.
14476         * call.c (joust): Adjust more_specialized call.
14477         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
14478         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
14479         (get_bindings_order): Remove.
14480         (get_bindings_real): Add DEDUCE parameter.
14481         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
14482         REFERENCE_TYPE jig for DEDUCE_ORDER.
14483         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
14484         maybe_adjust_types_for_deduction.
14485         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
14486         directly.
14487         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
14488         (check_cv_quals_for_unify): Use new unify qualifier flags.
14489         (unify): Clear new unify qualifier flags.
14490         (get_bindings_real): Add DEDUCE parameter.
14491         (get_bindings): Adjust call to get_bindings_real.
14492         (get_bindings_overload): Likewise.
14493         (most_specialized_instantiation): Adjust call to
14494         more_specialized.
14496 2001-01-19  Jason Merrill  <jason@redhat.com>
14498         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
14500         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
14501         -fnew-abi.
14503 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
14505         * decl2.c (arg_assoc_class): Fix double iteration logic.
14507 2001-01-19  Jason Merrill  <jason@redhat.com>
14509         * init.c (build_delete): Always call convert_force to strip cv-quals.
14511         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
14512         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
14513         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
14515 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14517         * search.c (get_vbase_1): Count only virtual bases.
14519 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14521         * class.c (duplicate_tag_error): Robustify flag clearing.
14523 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14525         * cp-tree.h (lookup_template_class): Add complain parm.
14526         * decl.c (lookup_namespace_name): Adjust call to
14527         lookup_template_class.
14528         (make_typename_type): Likewise.
14529         * semantics.c (finish_template_type): Likewise.
14530         * pt.c (lookup_template_class): Add complain parm. Adjust.
14531         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
14532         (tsubst): Likewise.
14534 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
14536         * pt.c (copy_default_args_to_explicit_spec): Preserve
14537         object's CV quals. Reorganize.
14539 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14541         * typeck.c (build_modify_expr): Say `initialization' for
14542         INIT_EXPRs.
14543         * init.c (build_default_init): Convert to enumeral type, if
14544         needed.
14546 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
14548         * parse.y (nomods_initdcl0): Properly set things up for
14549         initdcl0_innards.
14551 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14553         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
14554         (type_unification_real): Set it.
14555         (unify): Use it.
14557 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14559         * decl.c (finish_destructor_body): Convert to vbase pointer here.
14561 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14563         * semantics.c (begin_class_definition): Check we're not inside a
14564         template parm list.
14566 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
14568         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
14569         BASELINK_P.
14571 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14573         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
14574         * call.c (build_over_call): Add comment.
14576 2001-01-16 Daniel Berlin <dberlin@redhat.com>
14578         * cvt.c (ocp_convert): Handle vector type conversion
14579         * typeck2.c (digest_init): Handle vector type initializations
14581 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
14583         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
14584           was given.
14586 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14588         * pt.c (check_nontype_parm): Rename to ...
14589         (invalid_nontype_parm_type_p): ... here.
14590         (process_template_parm): Adjust.
14591         (convert_template_argument): Adjust.
14593 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
14595         * pt.c (check_nontype_parm): New function.
14596         (process_template_parm): Use it.
14597         (convert_template_argument): Use it.
14598         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
14599         member.
14601 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
14603         * tree.c: Add defaults.h
14604         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
14605         * Make-lang.in (cp/tree.o): Add defaults.h.
14607 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14609         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
14611 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14613         * g++.1: Change to be ".so man1/gcc.1".
14615 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14617         * Make-lang.in (c++.info, c++.install-info): Build and install g++
14618         internals info.
14619         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
14620         ($(srcdir)/cp/g++int.info): New target.
14621         * gxxint.texi: Add info directory entry.  Use @@ in email address.
14622         * .cvsignore: Update.
14624 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14626         * typeck.c (build_c_cast): Do template processing earlier.
14627         Always pedwarn on array casts.
14629 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
14631         * friend.c (make_friend_class): Make sure a templated class is
14632         actually a template.
14634 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14636         * decl2.c (get_guard): Set linkage from guarded decl.
14638 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14640         * call.c (convert_default_arg): Check for unprocessed
14641         DEFAULT_ARG.
14642         * cp-tree.h (replace_defarg): Move to spew.c.
14643         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
14644         spew.c, which is where they really are.
14645         (done_pending_defargs): Declare.
14646         (unprocessed_defarg_fn): Declare.
14647         * decl.c (replace_defarg): Move to spew.c
14648         * parse.y (structsp): Call done_pending_defargs.
14649         * spew.c (defarg_fns): Rearrange list structure.
14650         (defarg_fnsdone): New static variable.
14651         (defarg_depfns): New static variable.
14652         (init_spew): Adjust.
14653         (add_defarg_fn): Store the type in TREE_TYPE.
14654         (do_pending_defargs): Detect and deal with ordering constraints
14655         and circularity.
14656         (done_pending_defargs): New function.
14657         (unprocessed_defarg_fn): New function.
14658         (replace_defarg): Moved from decl.c. Robustify. Don't save
14659         if circularity detected.
14661 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14663         * pt.c (unify): Check array has a domain, before checking
14664         whether it is variable sized.
14666 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14668         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
14669         parameters with pointers to arrays of unknown bound.
14671 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
14673         * parse.y (template_parm_header, template_spec_header): New
14674         reductions. Split out from ...
14675         (template_header): ... here. Use them.
14676         (template_template_parm): Use template_parm_header.
14677         * semantics.c (finish_template_template_parm): Add assert.
14679 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14681         * mangle.c (write_builtin_type): Fix thinko.
14683         * pt.c (copy_default_args_to_explicit_spec_1): New function.
14684         (copy_default_args_to_explicit_spec): Likewise.
14685         (check_explicit_specialization): Use it.
14687         * class.c (finish_struct_1):  Remove last argument in call to
14688         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
14689         * decl.c (builtin_function): Likewise.
14690         (build_cp_library_fn): Likewise.
14691         (check_initializer): Likewise.
14692         (make_rtl_for_nonlocal_decl): Likewise.
14693         (cp_finish_decl): Likewise.
14694         (start_function): Likewise.
14695         * decl2.c (finish_anon_union): Likewise.
14696         * friend.c (do_friend): Likewise.
14697         * init.c (build_java_class_ref): Likewise.
14698         * method.c (make_thunk): Likewise.
14699         * pt.c (tsubst_friend_function): Likewise.
14700         * semantics.c (expand_body): Likewise.
14702 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
14704         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
14705         looking at DECL_CLONED_FUNCTION for non-functions.
14707 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14709         * error.c (dump_template_parameter): Use parm to determine how
14710         to print default value.
14712 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14714         * class.c (duplicate_tag_error): Clear more flags.
14716 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
14718         * call.c (build_new_method_call): Use binfo_for_vbase.
14720 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
14722         * cp-tree.h (flag_cond_mismatch): Don't declare.
14723         * decl2.c (flag_cond_mismatch): Don't define.
14724         (lang_f_options): Remove cond-mismatch.
14725         (unsupported_options): Add cond-mismatch.
14727 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
14729         * class.c (handle_using_decl): Reject using of constructor name
14730         of sourcing class. Allow injecting of a method with same name as
14731         nested class. Fixup error messages.
14733 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
14735         * decl2.c (lang_decode_option): Handle -Wformat=2.
14737 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14739         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
14740         initialized_in_class.
14741         (DECL_DEFINED_IN_CLASS_P): Rename to ...
14742         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
14743         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
14744         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
14745         * pt.c (check_default_tmpl_args): Adjust for
14746         DECL_INITIALIZED_IN_CLASS_P.
14747         (instantiate_class_template): Likewise.
14748         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
14750         * class.c (finish_struct): Constify saved_filename.
14752 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14754         * class.c (duplicate_tag_error): Adjust diagnostic.
14755         (finish_struct): Locally set location to start of struct.
14756         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
14758 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
14760         * decl.c (struct binding_level): Adjust class_shadowed comments
14761         to reflect reality.
14762         (push_class_level_binding): Adjust comments to reflect reality.
14763         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
14764         Don't set TREE_VALUE on the class_shadowed list.
14766 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14768         * decl2.c (acceptable_java_type): Allow references too.
14769         * init.c (build_java_class_ref): When using the new ABI, search
14770         `class$' and have it mangled with `mangle_decl.'
14771         * mangle.c (write_java_integer_type_codes): New function.
14772         (write_builtin_type): Detect and mangle Java integer and real
14773         types.
14775 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
14777         * decl2.c (grokfield): Don't accept `asm' specifiers for
14778         non-static data members.
14780 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14782         * expr.c (cplus_expand_expr): Don't reset `target'.
14784 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
14786         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
14788 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14790         * parse.y (template_datadef): Check for error_mark_node.
14792 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
14794         * cp-tree.def (DEFAULT_ARG): Make `x' class.
14796 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
14798         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
14799         (record_builtin_type): Make non-static.
14800         (flag_short_double): Don't declare.
14801         (init_decl_processing): Remove the creation of many tree nodes now
14802         in c_common_nodes_and_builtins.
14803         (build_void_list_node): New function.
14804         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
14805         * cp-tree.h (flag_short_wchar): Don't declare.
14807 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
14809         * call.c (build_conv): Don't use build1 for USER_CONV.
14810         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
14812 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14814         * lex.c (lang_init): Call c_common_lang_init.
14816 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14818         * search.c (lookup_fnfields_here): Remove.
14819         (look_for_overrides_r): Use lookup_fnfields_1.
14820         Ignore functions from using declarations.
14822 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
14824         Implement exceptions specifiers for implicit member functions.
14825         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
14826         * method.c (synthesize_exception_spec): New function.
14827         (locate_dtor, locate_ctor, locate_copy): New functions.
14828         (implicitly_declare_fn): Generate the exception spec too.
14829         * search.c (check_final_overrider): Check artificial functions
14830         too.
14831         * typeck2.c (merge_exception_specifiers): New function.
14833 2001-01-03  Jason Merrill  <jason@redhat.com>
14835         * init.c (build_default_init): New fn.
14836         (perform_member_init): Split out from here.
14837         (build_new_1): Use it.  Simplify initialization logic.
14838         (build_vec_init): Take an array, rather than a pointer and maxindex.
14839         Speed up simple initializations.  Don't clean up if we're assigning.
14840         * cp-tree.h: Adjust.
14841         * decl2.c (do_static_initialization): Remove TREE_VEC case.
14842         * parse.y (new_initializer): Return void_zero_node for ().
14843         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
14844         * typeck2.c (digest_init): Only complain about user-written
14845         CONSTRUCTORs.
14847 2000-12-22  Mike Stump  <mrs@wrs.com>
14849         * decl2.c: (max_tinst_depth): Increase to 50.
14851 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
14853         * class.c (invalidate_class_lookup_cache): Zero the
14854         previous_class_values.
14855         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
14856         TREE_INT_CST_HIGH.
14857         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
14858         * decl.c (free_bindings): New variable.
14859         (push_binding): Don't create a new binding if we have one on the
14860         free list.
14861         (pop_binding): Put old bindings on the free list.
14862         (init_decl_processing): Use size_int, not build_int_2.
14863         Register free_bindings as a GC root.
14864         (cp_make_fname_decl): Use size_int, not build_int_2.
14865         (push_inline_template_parms_recursive): Likewise.
14866         (end_template_parm_list): Likewise.
14867         (for_each_template_parm): Do not use walk_tree_without_duplicates.
14868         (tsubst_template_parms): Use size_int, not build_int_2.
14869         (tsubst): Likewise.
14870         * rtti.c (get_vmi_pseudo_type_info): Likewise.
14872 2001-01-02  Richard Henderson  <rth@redhat.com>
14874         * parse.y (asm): Set ASM_INPUT_P.
14876 2001-01-02  Jason Merrill  <jason@redhat.com>
14878         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
14879         for v3 ABI.
14881         * typeck.c (cp_truthvalue_conversion): New fn.
14882         * cvt.c (ocp_convert): Use it.
14884         * cp-tree.h: Lose c-common.c decls.
14886         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
14887         * cvt.c (convert_to_void): Use type_unknown_p.
14889         * typeck.c (strip_all_pointer_quals): Also strip quals from
14890         pointer-to-member types.
14892         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
14893         parse.y as C.
14895         * call.c (build_new_method_call): Do evaluate the object parameter
14896         when accessing a static member.
14897         * typeck.c (build_component_ref): Likewise.
14899 2001-01-02  Andreas Jaeger  <aj@suse.de>
14901         * decl.c (cp_missing_noreturn_ok_p): New.
14902         (init_decl_processing): Set lang_missing_noreturn_ok_p.
14904 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
14906         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
14908 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
14910         * class.c (pushclass): Remove #if 0'd code.
14911         * cp-tree.h (overload_template_name): Remove.
14912         * decl.c (store_bindings): Simplify.
14913         (pop_from_top_level): Likewise.
14914         * pt.c (overload_template_name): Remove.
14915         (instantiate_decl): Don't call push_to_top_level if it's not
14916         needed.
14918 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
14920         * pt.c (register_local_specialization): Don't return a value.
14921         (lookup_template_class): Use move-to-front heuristic when looking
14922         up template instantiations.
14923         (instantiate_decl): Only push_to_top_level when we're actually
14924         going to instantiate the template.
14926 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
14928         * search.c (binfo_for_vtable): Return least derived class, not
14929         most.  Handle secondary vtables.
14931 2000-12-22  Jason Merrill  <jason@redhat.com>
14933         * pt.c (more_specialized): Don't optimize len==0.
14934         (fn_type_unification): If we're adding the return type, increase len.
14936         * typeck.c (build_binary_op): Fix pmf comparison logic.
14938         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
14939         DECL_STATIC_FUNCTION_P.
14941         * semantics.c (genrtl_finish_function): Don't try to jump to
14942         return_label unless it exists.
14944         In partial ordering for a call, ignore parms for which we don't have
14945         a real argument.
14946         * call.c (joust): Pass len to more_specialized.
14947         (add_template_candidate_real): Strip 'this', pass len.
14948         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
14949         (get_bindings_order): New fn.  Pass len down.
14950         (get_bindings_real): Strip 'this', pass len.
14951         (fn_type_unification): Likewise.
14952         (type_unification_real): Succeed after checking 'len' args.
14953         (most_specialized_instantiation): Lose explicit_args parm.
14954         * class.c (resolve_address_of_overloaded_function): Strip 'this',
14955         pass len.
14957 2000-12-21  Jason Merrill  <jason@redhat.com>
14959         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
14960         DECL_TEMPLATE_RESULT.
14962         * search.c (lookup_field_r): Call lookup_fnfields_1, not
14963         lookup_fnfields_here.
14965         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
14967         * call.c (build_object_call): Also allow conversions that return
14968         reference to pointer to function.
14969         (add_conv_candidate): Handle totype being ref to ptr to fn.
14970         (build_field_call): Also allow members of type reference to function.
14971         Lose support for calling pointer to METHOD_TYPE fields.
14973         * error.c (dump_expr): Handle *_CAST_EXPR.
14975         * typeck2.c (build_scoped_ref): Always convert to the naming class.
14977         * tree.c (break_out_cleanups): Lose.
14978         * cp-tree.h: Remove prototype.
14979         * typeck.c (build_component_ref): Don't break_out_cleanups.
14980         (build_compound_expr): Likewise.
14981         * semantics.c (finish_expr_stmt): Likewise.
14983 2000-12-20  Richard Henderson  <rth@redhat.com>
14985         * cp-tree.h: Update declarations.
14986         * decl.c (finish_case_label): Return the new stmt node.
14987         * semantics.c (finish_goto_stmt): Likewise.
14988         (finish_expr_stmt, finish_return_stmt): Likewise.
14989         (finish_break_stmt, finish_continue_stmt): Likewise.
14990         (finish_asm_stmt): Likewise.
14991         * parse.y (already_scoped_stmt): Set STMT_LINENO.
14992         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
14993         (simple_if, simple_stmt): Return the new stmt node.
14994         (save_lineno): New.
14996 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
14998         * cp-tree.h: Don't declare warn_long_long.
15000 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15002         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
15003         IS_AGGR_TYPE.
15005 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15007         * pt.c (unify): Handle when both ARG and PARM are
15008         BOUND_TEMPLATE_TEMPLATE_PARM.
15010 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15012         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
15013         DECL_TEMPLATE_PARM_P.
15015 2000-12-15  Jason Merrill  <jason@redhat.com>
15017         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
15019         * init.c (build_new_1): Don't strip quals from type.
15021         * decl.c (pushdecl): Don't check for linkage on a non-decl.
15023         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
15025         * call.c (build_new_function_call): Lose space before paren in
15026         error message.
15027         (build_new_method_call): Likewise.
15029         * typeck2.c (build_m_component_ref): Propagate quals from datum.
15031 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15033         * pt.c (check_explicit_specialization): Propagate default
15034         function arguments to explicit specializations.
15036 2000-12-13  DJ Delorie  <dj@redhat.com>
15038         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
15039         and <? operators.
15041 2000-12-08  Jason Merrill  <jason@redhat.com>
15043         * error.c (dump_function_name): Don't let the user see __comp_ctor.
15045         Clean up copy-initialization in overloading code.
15046         * call.c (build_user_type_conversion_1): Die if we are asked to
15047         convert to the same or a base type.
15048         (implicit_conversion): Avoid doing so.  Lose reference binding code.
15049         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
15050         direct-initialization.  Also do direct-init part of copy-init.
15051         (build_user_type_conversion): Don't provide context to convert_like.
15052         * cvt.c (ocp_convert): build_user_type_conversion will now provide
15053         the constructor call for copy-init.
15055         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
15056         instantiation of a member template.
15057         (do_decl_instantiation): Not here.
15059 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
15061         * class.c (check_field_decls): Don't special case anonymous
15062         fields in error messages.
15063         (note_name_declared_in_class): Use %D on diagnostic.
15065         * tree.c (pod_type_p): Use strip_array_types.
15066         (cp_valid_lang_attribute): Likewise.
15067         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
15068         multiple evaluations.
15069         (cp_has_mutable_p): Use strip_array_types.
15071 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
15073         * cp-tree.h (sufficient_parms_p): Declare new function.
15074         * call.c (sufficient_parms_p): New function, broken out of ...
15075         (add_function_candidate): ... here. Use it.
15076         (add_conv_candidate): Use it.
15077         * decl.c (grok_ctor_properties): Use it.
15079 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
15081         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
15083 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
15085         * decl2.c (lang_decode_option): Handle -Wformat-security.
15087 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15089         * pt.c (verify_class_unification): New function.
15090         (get_class_bindings): Use it.
15091         (try_class_unification): Tidy.
15092         (unify): Handle when argument of a template-id is not
15093         template parameter dependent.
15094         (template_args_equal): Handle when TREE_CODE's do not match.
15096 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
15098         * lang-specs.h (c++): When invoking the stand-alone preprocessor
15099         for -save-temps, pass all relevant -Defines to it, and then don't
15100         pass them to cc1plus.
15102 2000-12-05  Will Cohen  <wcohen@redhat.com>
15104         * decl.c (finish_case_label): Cleared
15105         more_cleanups_ok in surrounding function scopes.
15106         (define_label): Likewise.
15108 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
15110         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
15111         (get_matching_virtual): Remove.
15112         (look_for_overrides): Declare new function.
15113         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
15114         DECL_VINDEX here.
15115         * class.c (check_for_override): Move base class iteration code
15116         to look_for_overrides.
15117         * search.c (next_baselink): Remove.
15118         (get_virtuals_named_this): Remove.
15119         (get_virtual_destructor): Remove.
15120         (tree_has_any_destructors_p): Remove.
15121         (struct gvnt_info): Remove.
15122         (check_final_overrider): Remove `virtual' from error messages.
15123         (get_matching_virtuals): Remove. Move functionality to ...
15124         (look_for_overrides): ... here, and ...
15125         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
15126         to be overriding.
15128 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
15130         * typeck.c (get_delta_difference): If via a virtual base,
15131         return zero.
15132         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
15133         adjustment.
15135 2000-12-04  Richard Henderson  <rth@redhat.com>
15137         * error.c (dump_tree): Use output_add_string not OB_PUTS.
15139 2000-12-04  Jason Merrill  <jason@redhat.com>
15141         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
15142         (write_builtin_type): Pass intSI_type_node and the like through
15143         type_for_mode.
15144         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
15145         Pass intSI_type_node and the like through type_for_mode.
15146         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
15147         * pt.c (tsubst, unify): Likewise.
15148         * tree.c (walk_tree): Likewise.
15149         * error.c (dump_type): Likewise.
15150         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
15152         * Make-lang.in: Tweak top comment for emacs.
15153         (cp/TAGS): Restore.
15155         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
15157         * class.c (clone_function_decl): Robustify.
15159 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
15161         * decl.c (store_bindings): Only search in the non modified
15162         old_bindings for duplicates.
15164 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
15166         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
15167         TYPE_POLYMORPHIC_P.
15169         * typeck.c (build_static_cast): Remove unused variable.
15171 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15173         * pt.c: Fix typo in comment.
15175 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
15177         * decl2.c (warn_format): Remove definition.
15178         (lang_decode_option): Handle -Wformat-nonliteral,
15179         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
15181 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
15183         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
15184         (init_decl_processing): Don't create string_type_node,
15185         const_string_type_node, wint_type_node, intmax_type_node,
15186         uintmax_type_node, default_function_type, ptrdiff_type_node and
15187         unsigned_ptrdiff_type_node.  Adjust position of call to
15188         c_common_nodes_and_builtins.
15189         (identifier_global_value): New function.
15191 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
15193         * call.c (standard_conversion): Reject pointer to member
15194         conversions from ambiguous, inaccessible or virtual bases.
15195         * typeck.c (build_static_cast): Don't check pointers to members
15196         specially.
15198 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15200         * method.c (do_build_copy_constructor): Preserve cv
15201         qualifications when accessing source object members.
15202         (do_build_assign_ref): Likewise. Remove separate diagnostics for
15203         unnamed fields.
15205 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15207         * method.c (do_build_assign_ref): Construct appropriately
15208         CV-qualified base reference. Don't allow const casts in base
15209         conversion.
15211 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
15213         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
15214         incomplete return type.
15216 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15218         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
15219         * semantics.c (finish_base_specifier): Accept a _TYPE not a
15220         _DECL.
15222 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15224         * spew.c (yyerror): Cope if yylval.ttype is NULL.
15226 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15228         * decl.c (grokdeclarator): Diagnose undefined template contexts.
15230 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
15232         * decl.c (grokdeclarator): Do type access control on friend
15233         class.
15235 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
15237         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
15238         bison parser ickiness.
15239         * pt.c (tsubst_friend_function): Enter namespace scope when
15240         tsubsting the function name.
15241         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
15243 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
15245         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
15246         * cvt.c (cp_convert_to_pointer): Add force parameter.
15247         Allow conversions via virtual base if forced.
15248         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
15249         (ocp_convert): Likewise.
15250         * search.c (binfo_from_vbase): Return the virtual base's binfo.
15251         * typeck.c (get_delta_difference): Adjust handling of virtual
15252         bases.
15254 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
15256         * tree.c (struct list_hash): Remove.
15257         (list_hash_table): Make it be an htab.
15258         (struct list_proxy): New type.
15259         (list_hash_eq): New function.
15260         (list_hash_pieces): Renamed from ...
15261         (list_hash): ... this.
15262         (list_hash_lookup): Remove.
15263         (list_hash_add): Remove.
15264         (hash_tree_cons): Use the generic hashtable.
15265         (mark_list_hash): Remove.
15266         (init_tree): Create the hashtable.
15268 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
15270         * method.c (build_mangled_C9x_name): Rename to
15271         build_mangled_C99_name.  Change C9X references in comments to
15272         refer to C99.
15274 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
15276         * parse.y (unary_expr): Move VA_ARG from here ...
15277         (primary): ... to here.
15279 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
15281         * semantics.c (finish_id_expr): If type is error_mark, return
15282         error_mark.
15284 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
15286         * pt.c (lookup_template_class): Simplify loop exit constructs.
15287         Cope when there is no partial instantiation of a template
15288         template member.
15290 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
15292         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
15294 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
15296         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
15297         prefix.
15299         * pt.c (do_decl_instantiate): Explicitly clone constructors and
15300         destructors that haven't already been cloned.
15302 2000-11-20  Richard Henderson  <rth@redhat.com>
15304         * parse.y (yyparse_1): Rename the parser entry point.
15306 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
15308         * mangle.c (write_name): Use <unscoped-name> for names directly in
15309         function scope.
15310         (write_unscoped_name): Accept names directly in function scope.
15312 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
15314         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
15315         * parse.y (extdef): Add EXPORT reduction.
15316         * spew.c (yylex): Don't skip export here.
15318 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
15320         * decl.c (init_decl_processing): Correct name of pure virtual
15321         function under the new ABI.
15322         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
15323         (throw_bad_typeid): Likewise for bad typeid function.
15325 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
15327         * decl.c (grokparms): Don't even function types of `void' type,
15328         either.
15329         * mangle.c (write_type): Don't crash when confronted with the
15330         error_mark_node.
15332         * decl.c (grokparms): Don't create parameters of `void' type.
15334 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
15336         * lex.c (mark_impl_file_chain): Delete.
15337         (init_parse): Remove call to ggc_add_string_root.  No need to
15338         ggc_strdup a string constant.  Do not add impl_file_chain to GC
15339         roots.
15340         (handle_pragma_implementation): No need to ggc_strdup main_filename.
15342 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15344         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
15346 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15348         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
15349         * decl.c (grokdeclarator): Don't reject void parms here.
15350         (require_complete_types_for_parms): Simplify, use
15351         complete_type_or_else.
15352         (grokparms): Remove bitrot. Remove funcdef parm.
15353         Deal with ellipsis parm lists here.
15354         * semantics.c (finish_parmlist): Don't append void_list_node
15355         here. Set PARMLIST_ELLIPSIS_P.
15357 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
15359         * typeck2.c (incomplete_type_error): Reorganize to avoid
15360         excessive diagnostics.
15362 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
15364         * lex.c (struct impl_files, internal_filename): Constify a char *.
15366 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
15368         * mangle.c (write_special_name_constructor): Don't generate
15369         assembler junk when confronted with an old-style constructor.
15370         (write_special_name_destructor): Likewise.
15371         (mangle_decl_string): Do it here instead.
15373 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
15375         * call.c (op_error): Make error messages clearer.
15377 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
15379         * decl.c (wrapup_globals_for_namespace): Don't mark things
15380         TREE_ASM_WRITTEN when they're not.
15382 2000-11-15  Jason Merrill  <jason@redhat.com>
15384         * typeck2.c (friendly_abort): Uncount the error before handing
15385         off to fancy_abort.
15387 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
15389         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
15391 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
15393         * class.c (build_vtbl_initializer): Fix typo in comment.
15394         * typeck.c (expr_sizeof): Don't crash on errors.
15396 2000-11-14  Jim Wilson  <wilson@redhat.com>
15398         * lang-specs.h: Add %2 after %(cc1_options).
15400 2000-11-14  Richard Henderson  <rth@redhat.com>
15402         * typeck.c (c_sizeof): Be strict about casting result value
15403         back to c_size_type_node.
15404         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
15406 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
15408         * typeck.c (build_unary_op): Use boolean_increment from
15409         c-common.c, moving the relevant code there.
15411 2000-11-11  Jason Merrill  <jason@redhat.com>
15413         * typeck.c (mark_addressable): Don't call put_var_into_stack.
15415         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
15416         in inlines.
15418 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15420         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
15421         * lex.c (copy_lang_decl): Likewise.
15423 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
15425         * dump.c (cp_dump_tree): Don't dump function bodies here.
15427         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
15428         (dump.o): Update dependency list.
15429         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
15430         (flag_dump_translation_unit): Likewise.
15431         (CP_TYPE_QUALS): Adjust definition.
15432         (DECL_C_BIT_FIELD): Remove.
15433         (SET_DECL_C_BIT_FIELD): Likewise.
15434         (CLEAR_DECL_C_BIT_FIELD): Likewise.
15435         (add_maybe_template): Likewise.
15436         (strip_array_types): Likewise.
15437         (dump_node_to_file): Likewise.
15438         (cp_dump_tree): New function.
15439         * decl.c (init_decl_processing): Set lang_dump_tree.
15440         * decl2.c (flag_dump_translation_unit): Remove.
15441         * dump.c: Move most of it to ../c-dump.c.
15442         (cp_dump_tree): New function.
15443         * pt.c (add_maybe_template): Remove.
15444         * typeck.c (strip_array_types): Likewise.
15446 2000-11-07  Eric Christopher  <echristo@redhat.com>
15448         * decl.c (init_decl_processing): Change definition of
15449         __wchar_t to wchar_t.  Remove artificial declaration of
15450         wchar_t.
15451         * lex.c: Change instances of __wchar_t to wchar_t.
15453 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
15455         * lex.c (do_identifier): Don't lookup_name for operators.
15456         * parse.y (operator): Save looking_for_typename.
15457         (unoperator): Restore it.
15458         * spew.c (frob_opname): Use nth_token for lookahead.
15460 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
15462         * decl.c (grok_op_properties): Always use coerce_new_type and
15463         coerce_delete_type.
15464         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
15465         exception specification. Tidy up.
15466         (coerce_delete_type): Preserve exception specification. Tidy up.
15468 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
15470         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
15471         (push_binding_level), error.c (cp_tree_printer), pt.c
15472         (process_partial_specialization, tsubst_template_arg_vector),
15473         search.c (lookup_member): Use memset () instead of bzero ().
15475 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
15477         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
15479 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
15481         * Make-lang.in (c++.distdir): Remove.
15483 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
15485         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
15486         declarations from different namespaces to be combined.
15488 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
15490         * decl.c: Include tm_p.h.
15492 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
15494         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
15496 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
15498         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
15499         (build_overload_value), repo.c (open_repo_file), xref.c
15500         (open_xref_file): Use strchr () and strrchr () instead of index ()
15501         and rindex ().
15503 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
15505         * call.c (build_over_call): Call fold on the CALL_EXPR.
15507 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
15509         * error.c (dump_template_decl): Separate template hearders with
15510         space not comma.
15512 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
15514         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
15515         TS_* flags with corresponding TFF_*.  Adjust prototypes of
15516         functions (which used to take a tree_string_flags) to take an int.
15518         * cp-tree.h (enum tree_string_flags): Remove
15519         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
15520         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
15521         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15522         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15523         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
15524         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
15525         (type_as_string, decl_as_string, expr_as_string,
15526         context_as_string): Adjust prototype.
15528         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
15529         instead of TS_PLAIN.
15531         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
15532         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
15533         plain `0'.
15535 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
15537         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
15538         (linkage_kind): New enumeration.
15539         (decl_linkage): New function.
15540         * decl2.c (comdat_linkage): Extend comment.
15541         * error.c (dump_function_decl): Print the arguments used to
15542         instantiate a template, even when not printing the type of the
15543         function.
15544         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
15545         not TREE_PUBLIC, to test for external linkage.
15546         * tree.c (decl_linkage): New function.
15548 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
15550         * pt.c (instantiate_decl): Always instantiate static data members
15551         initialized in-class.
15553 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
15555         * Make-lang.in: Move all build rules here from Makefile.in,
15556         adapt to new context.  Wrap all rules that change the current
15557         directory in parentheses.  Expunge all references to $(P).
15558         When one command depends on another and they're run all at
15559         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
15560         all object-file generation rules.  Delete obsolete variables.
15562         * Makefile.in: Delete.
15563         * config-lang.in: Delete outputs= line.
15565 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15567         * error.c (dump_function_decl): Print no space between
15568         `ptr-operator' the `type-specifier' of the return type.
15569         (dump_type_prefix): Make sure we put space at the appropriate
15570         place.
15572 2000-10-23  Jason Merrill  <jason@redhat.com>
15574         * call.c (equal_functions): Also call decls_match for extern "C" fns.
15576 2000-10-22  Jason Merrill  <jason@redhat.com>
15578         * call.c (build_conditional_expr): Use ocp_convert to force
15579         rvalue conversion.
15581 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
15583         * call.c (standard_conversion): Use RVALUE_CONVs for all
15584         expressions that satisfy lvalue_p, not just those that satisfy
15585         real_lvalue_p.
15587         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
15589         * typeck.c (c_sizeof): Return an expression of `size_t' type,
15590         not one with TYPE_IS_SIZETYPE set.
15591         (dubious_conversion_warnings): Remove special-case code.
15593 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
15595         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
15596         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
15597         (dump_type_prefix): Print vector-of-int as 'int vector'.
15598         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
15599         * tree.c (walk_tree): Handle VECTOR_TYPE.
15601         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
15603 2000-10-21  Jason Merrill  <jason@redhat.com>
15605         * parse.y (operator): Set got_object from got_scope.
15606         Set looking_for_typename.
15607         * decl.c (lookup_name_real): Clear val after setting from_obj.
15608         Reorganize diagnostic.
15610 2000-10-20  Jason Merrill  <jason@redhat.com>
15612         * tree.c (walk_tree): Don't walk into default args.
15614         * error.c (dump_expr): Use host_integerp.
15616 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
15618         * typeck2.c (abstract_virtuals_error): Use "because" instead of
15619         "since" in error message.
15621 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15623         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
15625 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
15627         * decl.c (revert_static_member_fn): Fixed typo.
15629 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
15631         * class.c (subobject_offset_fn): New type.
15632         (dfs_record_base_offsets): Remove.
15633         (record_base_offsets): Likewise.
15634         (dfs_search_base_offsets): Likewise.
15635         (record_subobject_offset): New function.
15636         (check_subobject_offset): Likewise.
15637         (walk_subobject_offsets): Likewise.
15638         (record_subobject_offsets): Likewise.
15639         (layout_conflict_p): Reimplement.
15640         (layout_nonempty_base_or_field): Correct handling of type
15641         conflicts during layout.
15642         (layout_empty_base): Likewise.
15643         (build_base_field): Adjust to handle new representation of empty
15644         base offset table.
15645         (build_base_fields): Likewise.
15646         (layout_virtual_bases): Likewise.
15647         (splay_tree_compare_integer_csts): New function.
15648         (layout_class_type): Use a splay_tree, rather than a varray, to
15649         represent the offsets of empty bases.
15651         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
15652         * decl.c (select_decl): Don't return declarations that are
15653         DECL_ANTICIPATED.
15655 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
15657         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
15658         (fake_std_node): New macro.
15659         * decl.c (in_std): Rename to ...
15660         (in_fake_std): ... this.
15661         (flag_no_builtin): Remove.
15662         (flag_no_nonansi_builtin): Likewise.
15663         (walk_namespaces_r): Use fake_std_node.
15664         (push_namespace): Use std_identifier.
15665         (pop_namespace): Use in_fake_std.
15666         (lookup_name_real): Use fake_std_node.
15667         (init_decl_processing): When -fhonor-std, create the `std'
15668         namespace.  Don't create a dummy fake_std_node in that case.
15669         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
15670         (builtin_function): Put builtins whose names don't begin
15671         with `_' in the std namespace.
15672         * decl2.c (flag_no_builtin): Remove.
15673         (flag_no_nonansi_builtin): Likewise.
15674         (set_decl_namespace): Use fake_std_node.
15675         (validate_nonmember_using_decl): Likewise.
15676         (do_using_directive): Likewise.
15677         (handle_class_head): Likewise.
15678         * dump.c (dequeue_and_dump): Likewise.
15679         * except.c (init_exception_processing): Use std_identifier.
15680         * init.c (build_member_call): Use fake_std_node.
15681         * rtti.c (init_rtti_processing): Use std_identifier.
15683 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
15685         * cp-tree.h (back_end_hook): Remove declaration.
15686         * decl2.c (back_end_hook): Remove definition.
15688         * dump.c (dequeue_and_dump): Dump TREE_USED.
15690 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
15692         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
15694 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15696         * decl.c (WINT_TYPE): Define.
15697         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
15698         c_size_type_node, signed_size_type_node and wint_type_node.
15700 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
15702         * decl2.c (warn_missing_format_attribute): New variable.
15703         (lang_decode_option): Decode -Wmissing-format-attribute.
15705 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
15707         * typeck.c (qualify_type): Remove.
15708         (composite_pointer_type): Fix handling of conversions to `cv void*'.
15710 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15712         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
15714 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15716         * Makefile.in (parse.c, parse.h): Create atomically.
15718 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
15720         * class.c (current_obstack): Remove.
15721         * decl.c (ggc_p): Remove.
15722         (start_decl): Don't use decl_tree_cons.
15723         (grokdeclarator): Don't use build_decl_list.
15724         (start_function): Don't use decl_tree_cons.
15725         (finish_function): Don't mess with obstacks.
15726         * decl2.c (grok_x_components): Don't use build_decl_list.
15727         * lex.c (make_call_declarator): Don't call decl_tree_cons.
15728         (implicitly_declare_fn): Don't call build_decl_list.
15729         * parse.y (frob_specs): Don't call build_decl_list or
15730         decl_tree_cons.
15731         (expr_or_declarator_intern): Don't call decl_tree_cons.
15732         (primary): Don't call build_decl_list.
15733         (fcast_or_absdcl): Likewise.
15734         (typed_declspecs): Don't call decl_tree_cons.
15735         (reserved_declspecs): Don't call build_decl_list.
15736         (declmods): Likewise.
15737         (reserved_typespecquals): Likewise.
15738         (aggr): Likewise.
15739         (new_type_id): Likewise.
15740         (cv_qualifiers): Likewise.
15741         (after_type_declarator_intern): Likewise.
15742         (notype_declarator_intern): Likewise.
15743         (absdcl_intern): Likewise.
15744         (named_parm): Likewise.
15745         * pt.c (most_specialized_class): Likewise.
15746         * repo.c (temporary_obstack): Make it a structure, not a pointer.
15747         (init_repo): Initialize it.
15748         * search.c (current_obstack): Remove.
15749         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
15751 2000-10-09  Richard Henderson  <rth@cygnus.com>
15753         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
15754         (c++ language support bits for libgcc): Remove.
15755         (c++.clean): Remove cplib2.txt cleanup.
15756         * config-lang.in (headers, lib2funcs): Remove.
15758         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
15759         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
15760         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
15761         * inc/new.h, inc/typeinfo: Remove files.
15763 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
15765         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
15766         defined.
15767         (init_decl_processing): Initialize intmax_type_node and
15768         uintmax_type_node.
15770 2000-10-06  Richard Henderson  <rth@cygnus.com>
15772         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
15773         (original_result_rtx): Remove.
15774         * decl.c (save_function_data): Don't clear x_result_rtx.
15775         (mark_lang_function): Don't mark it either.
15776         * expr.c (fixup_result_decl): Remove.
15777         * semantics.c (genrtl_named_return_value): Frob the return decl
15778         before calling emit_local_var.
15779         (genrtl_finish_function): Don't call fixup_result_decl.
15780         Always emit the jump to return_label.
15782 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
15784         * pt.c (lookup_template_class): Set current access for enum.
15785         (tsubst_enum): Set file & line for enum decl.
15787         * spew.c (yylex): Remove unused variable.
15789 2000-10-05  Richard Henderson  <rth@cygnus.com>
15791         * semantics.c (genrtl_finish_function): Don't init or check
15792         can_reach_end; remove noreturn and return value checks.
15794 2000-10-05  Tom Tromey  <tromey@cygnus.com>
15796         * init.c (build_java_class_ref): Use `build_static_name' with a
15797         suffix, not a prefix, to build the class object's name.
15799 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15801         * cp-tree.h (access_kind): Fix comment typo.
15802         * decl2.c (grokfield): Fix diagnostic typo.
15803         * semantics.c (finish_template_type): Fix comment typo.
15804         (finish_qualified_object_call_expr): Likewise.
15806 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15808         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
15809         tsubsting fails.
15811 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
15813         * spew.c (frob_id): New static function.
15814         (frob_opname): Use it.
15815         (yylex): Use it.
15817 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
15819         * decl.c (lang_mark_false_label_stack): Remove.
15820         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
15822 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
15824         * gxxint.texi: Use @email for formatting email addresses.
15826 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
15828         * error.c: Remove direct obstack manipulation.  Replace with
15829         output_buffer-based formatting.  Adjust calls to removed macros.
15830         (obstack_chunk_alloc, obstack_chunk_free): Remove.
15831         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
15832         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
15834 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
15836         * ir.texi: Move to ../c-tree.texi.
15838 2000-09-20  Jason Merrill  <jason@redhat.com>
15840         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
15842 2000-09-21  Andreas Jaeger  <aj@suse.de>
15844         * errfn.c: Move declaration of cp_printer and cp_printers to ...
15845         * cp-tree.h: ... here.
15847         * error.c: Remove declaration of cp_printer.
15849 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
15851         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
15853 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
15855         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
15856         users.
15858 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
15860         * decl.c (start_function): Robustify.
15862 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15864         * cp-tree.h (check_function_format): Accept a `status' parameter.
15866         * call.c, typeck.c: Updates calls to `check_function_format'.
15868 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
15870         * decl2.c (handle_class_head): Always push some scope even
15871         in the error case.
15873 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
15875         * cp-tree.h (struct cp_language_function): Remove
15876         x_scope_stmt_stack and name_declared.
15877         (current_scope_stmt_stack): Remove.
15878         (function_name_declared_p): New macro.
15879         (struct lang_decl_flags): Use c_lang_decl as a base class.
15880         (context): Remove.
15881         (struct lang_decl): Replace saved_tree with context.
15882         (DECL_FRIEND_CONTEXT): Adjust accordingly.
15883         (SET_DECL_FRIEND_CONTEXT): Likewise.
15884         (DECL_VIRTUAL_CONTEXT): Likewise.
15885         (DECL_SAVED_TREE): Remove.
15886         (C_DECLARED_LABEL_FLAG): Likewise.
15887         (cplus_expand_expr_stmt): Don't declare.
15888         (add_decl_stmt): Likewise.
15889         (add_scope_stmt): Likewise.
15890         * decl.c (mark_stmt_tree): Remove.
15891         (case_compare): Likewise.
15892         (finish_case_label): Use c_add_case_label.
15893         (init_decl_processing): Set more language-specific hooks.
15894         (build_enumerator): Fix typo in comment.
15895         (cplus_expand_expr_stmt): Remove.
15896         (mark_lang_function): Use mark_c_language_function.
15897         (lang_mark_tree): Use c_mark_lang_decl.
15898         * decl2.c: Change order of inclusion.
15899         * except.c: Likewise.
15900         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
15901         back on c_expand_expr.
15902         * friend.c: Include expr.h.
15903         * init.c: Change order of inclusion.
15904         * Makefile.in: Update dependencies.
15905         * lex.h (free_lang_decl_chain): Remove.
15906         * optimize.c (maybe_clone_body): Use function_name_declared_p.
15907         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
15908         it doesn't exist.
15909         (instantiate_decl): Use function_name_declared_p.
15910         * semantics.c (lang_expand_expr_stmt): Remove.
15911         (set_current_function_name_declared): Likewise.
15912         (current_function_name_declared): Likewise.
15913         (begin_compound_stmt): Use function_name_declared_p.
15914         (add_decl_stmt): Remove.
15915         (setup_vtbl_ptr): Use function_name_declared_p.
15916         (add_scope_stmt): Remove.
15917         (current_scope_stmt_stack): New function.
15918         (cp_expand_stmt): Don't handle SCOPE_STMTs.
15919         (expand_body): Use function_name_declared_p.
15920         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
15921         * typeck.c: Change order of includes.
15922         (convert_sequence): Remove.
15924 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
15926         * lex.c (reswords): Add _Complex.
15928 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15930         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
15932 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
15934         * init.c (begin_init_stmts): Don't use // comments.
15936 2000-09-12  Jason Merrill  <jason@redhat.com>
15938         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
15939         all non-extern arrays.
15941         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
15942         typenames, too.  Downgrade complaint to pedwarn.
15943         (xref_tag): Warn about surprising behavior of 'friend struct T'.
15944         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
15945         'class This::Inherited'.
15947 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
15949         * decl.c (finish_case_label): Given the LABEL_DECL a
15950         DECL_CONTEXT.
15952 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
15954         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
15955         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
15956         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
15957         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
15958         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
15959         New macros.
15960         (sorry_for_unsupported_tree, print_scope_operator,
15961         print_left_paren, print_right_paren, print_left_bracket,
15962         print_right_bracket, print_whitespace): Likewise.
15963         (aggr_variety): Rename to class_key_or_enum.
15964         (print_type): Rename to print_type_id.
15965         (print_type_specifier_seq, print_simple_type_specifier,
15966         print_elaborated_type_specifier,
15967         print_rest_of_abstract_declarator,
15968         print_parameter_declaration_clause, print_exception_specification,
15969         print_nested_name_specifier, print_template_id,
15970         typedef_original_name,  print_template_argument_list_start,
15971         print_template_argument_list_end): New functions.
15973 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
15975         * ir.texi: Add more documentation.
15977 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
15979         * cp-tree.h (struct saved_scope): Remove x_function_parms.
15980         (current_function_parms): Don't define.
15981         (struct cp_language_function): Remove parms_stored.
15982         (current_function_just_assigned_this): Don't define.
15983         (current_function_parms_stored): Likewise.
15984         (static_ctors): Declare.
15985         (static_dtors): Likewise.
15986         (SF_EXPAND): Don't define.
15987         (expand_start_early_try_stmts): Remove declaration.
15988         (store_parm_decls): Likewise.
15989         * decl.c (static_ctors): Don't declare.
15990         (static_dtors): Likewise.
15991         (struct binding_level): Remove this_block.
15992         (poplevel): Remove dead code.
15993         (set_block): Likewise.
15994         (mark_binding_level): Don't mark this_block.
15995         (mark_saved_scope): Don't mark x_function_parms.
15996         (init_decl_processing): Don't add current_function_parms as a GC
15997         root.
15998         (check_function_type): Change prototype.
15999         (start_function): Remove RTL-generation code.
16000         (expand_start_early_try_stmts): Remove.
16001         (store_parm_decls): Give it internal linkage.  Remove
16002         RTL-generation code.
16003         (finish_function): Remove RTL-generation code.
16004         * decl2.c (static_ctors): Fix formatting.
16005         (static_dtors): Likewise.
16006         * method.c (use_thunk): Don't call store_parm_decls.
16007         (synthesize_method): Likewise.
16008         * optimize.c (maybe_clone_body): Likewise.
16009         * parse.y (fn.def2): Likewise.
16010         (.set_base_init): Likewise.
16011         (nodecls): Likewise.
16012         * pt.c (instantiate_decl): Likewise.
16013         * rtti.c (synthesize_tinfo_fn): Likewise.
16014         * semantics.c (genrtl_try_block): Simplify.
16015         (expand_body): Use genrtl_start_function and
16016         genrtl_finish_function.
16017         (genrtl_start_function): New function.
16018         (genrtl_finish_function): Likewise.
16020 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
16022         * error.c (cp_tree_printer, case 'P'): Append break.
16024 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
16026         * cp-tree.h (frob_opname): Declare.
16027         * parse.y (saved_scopes): New static variable.
16028         (cp_parse_init): Adjust.
16029         (do_id): If lastiddecl is NULL, do do_identifier.
16030         (operator): Save scope information.
16031         (unoperator): New reduction. Restore scope information.
16032         (operator_name): Append unoperator. Call frob_opname.
16033         * spew.c (frob_opname): Define.
16035 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
16037         * decl.c, rtti.c: Include defaults.h if not already included.
16038         Don't define the *_TYPE_SIZE macros.
16040 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
16042         * cp-tree.h (push_switch): Change prototype.
16043         (check_cp_case_value): Remove declaration.
16044         (decl_constant_value): Likewise.
16045         * decl.c (struct cp_switch): Add switch_stmt and cases.
16046         (case_compare): New function.
16047         (push_switch): Set switch_stmt.  Initialize cases.
16048         (pop_switch): Clean up cases.
16049         (define_case_label): Rename to ...
16050         (finish_case_label): ... this.  Do semantic analysis for case
16051         labels here.
16052         (start_function): Correct comment.
16053         * decl2.c (check_cp_case_value): Remove.
16054         * expr.c (do_case): Remove.
16055         * pt.c (tsubst_expr): Adjust call to finish_case_label.
16056         * semantics.c (genrtl_do_poplevel): Remove declaration.
16057         (RECHAIN_STMTS): Remove.
16058         (finish_break_stmt): Use build_break_stmt.
16059         (finish_continue_stmt): Use build_continue_stmt.
16060         (finish_switch_cond): Adjust condition here, rater than in
16061         c_expand_start_case.
16062         (finish_case_label): Remove.
16063         * typeck.c (c_expand_return): Remove.
16064         (c_expand_start_case): Likewise.
16066 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
16068         * ir.texi: Document type nodes.
16070 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
16072         * cp-tree.h (init_cp_semantics): Declare.
16073         (genrtl_try_block): Don't declare.
16074         (genrtl_handler): Likewise.
16075         (genrtl_catch_block): Likewise.
16076         (genrtl_ctor_stmt): Likewise.
16077         (genrtl_subobject): Likewise.
16078         (genrtl_do_poplevel): Likewise.
16079         (genrtl_named_return_value): Likewise.
16080         * lex.c (init_parse): Call init_cp_semantics.
16081         * semantics.c (genrtl_try_block): Give it internal linkage.
16082         (genrtl_handler): Likewise.
16083         (genrtl_catch_block): Likewise.
16084         (genrtl_ctor_stmt): Likewise.
16085         (genrtl_subobject): Likewise.
16086         (genrtl_do_poplevel): Likewise.
16087         (genrtl_named_return_value): Likewise.
16088         (lang_expand_stmt): Rename to ...
16089         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
16090         (init_cp_semantics): Define.
16092         * decl.c (initialize_local_var): Remove RTL-generating code.
16093         * semantics.c (genrtl_try_block): Fix formatting.
16095         Move statement-tree facilities from C++ to C front-end.
16096         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
16097         (void_zero_node): Remove.
16098         (stmt_tree): Likewise.
16099         (scope_chain): Adjust.
16100         (language_function): Rename to cp_language_function.
16101         (cp_function_chain): Adjust.
16102         (current_stmt_tree): Remove.
16103         (last_tree): Likewise.
16104         (last_expr_type): Likewise.
16105         (struct lang_decl): Adjust.
16106         (STMT_IS_FULL_EXPR_P): Remove.
16107         (add_tree): Remove.
16108         (begin_stmt_tree): Likewise.
16109         (finish_stmt_tree): Likewise.
16110         (walk_tree_fn): Likewise.
16111         (walk_stmt_tree): Likewise.
16112         * class.c (finish_struct): Replace use of add_tree with add_stmt.
16113         * decl.c (mark_stmt_tree): Adjust type.
16114         (init_decl_processing): Don't build void_zero_node.
16115         (initialize_local_var): Adjust usage of current_stmt_tree.
16116         (finish_enum): Use add_stmt, not add_tree.
16117         (save_function_data): Adjust use of language_function.
16118         (finish_constructor_body): Use add_stmt, not add_tree.
16119         (finish_destructor_body): Likewise.
16120         (push_cp_function_context): Adjust use of language_function.
16121         (pop_cp_function_context): Likewise.
16122         (mark_lang_function): Likewise.
16123         (mark_cp_function_context): Likewise.
16124         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
16125         (build_vec_init): Likewise.
16126         * semantics.c (SET_LAST_STMT): Remove.
16127         (RECHAIN_STMTS): Don't use it.
16128         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
16129         (current_stmt_tree): Define.
16130         (add_tree): Remove.
16131         (finish_goto_stmt): Use add_stmt, not add_tree.
16132         (finish_expr_stmt): Likewise.
16133         (begin_if_stmt): Likewise.
16134         (finish_then_clause): Likewise.
16135         (begin_while_stmt): Likewise.
16136         (begin_do_stmt): Likewise.
16137         (finish_return_stmt): Likewise.
16138         (begin_for_stmt): Likewise.
16139         (finish_break_stmt): Likewise.
16140         (finish_continue_stmt): Likewise.
16141         (begin_switch_stmt): Likewise.
16142         (finish_case_label): Likewise.
16143         (begin_try_block): Likewise.
16144         (begin_function_try_block): Likewise.
16145         (begin_handler): Likewise.
16146         (begin_catch_block): Likewise.
16147         (begin_compound_stmt): Likewise.
16148         (begin_asm_stmt): Likewise.
16149         (finish_asm_stmt): Likewise.
16150         (finish_label_stmt): Likewise.
16151         (add_decl_stmt): Likewise.
16152         (finish_subobject): Likewise.
16153         (finish_decl_cleanup): Likewise.
16154         (finish_named_return_value): Likewise.
16155         (setup_vtbl_ptr): Likewise.
16156         (add_scope_stmt): Likewise.
16157         (finish_stmt_expr): Likewise.
16158         (prune_unused_decls): Remove.
16159         (begin_stmt_tree): Likewise.
16160         (finish_stmt_tree): Likewise.
16161         (prep_stmt): Adjust use of current_stmt_tree.
16162         (lang_expand_stmt): Likewise.
16163         * tree.c (statement_code_p): Remove.
16164         (cp_statement_code_p): New function.
16165         (walk_stmt_tree): Remove.
16166         (init_tree): Set lang_statement_code_p.
16168 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
16170         Integrated preprocessor.
16172         * Make-lang.in, Makefile.in: Remove all references to input.c,
16173         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
16174         * gxx.gperf, hash.h, input.c: Delete.
16175         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
16176         initialized properly.
16178         * class.c (fixup_pending_inline): Take a tree, not a
16179         struct pending_inline *.  All callers changed.
16180         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
16181         RID_PROTECTED entries in ridpointers[] array here.
16182         * decl.c (duplicate_decls): Do not refer to struct
16183         pending_inline.
16184         (record_builtin_type, init_decl_processing): Use RID_MAX not
16185         CP_RID_MAX.
16186         (grokdeclarator): Use C_IS_RESERVED_WORD.
16187         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
16188         cpplib.
16189         (grok_x_components): Do not inspect pending_inlines chain.
16191         * cp-tree.h (struct lang_identifier): Add rid_code entry.
16192         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
16193         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
16194         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
16195         TIME_IDENTIFIER_FILEINFO): Kill.
16196         Update prototypes.
16197         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
16198         single 32-bit word.
16199         * parse.y: Call do_pending_inlines unconditionally.
16200         reinit_parse_for_method is now snarf_method.  fn.defpen is no
16201         longer necessary.  Remove unnecessary <itype> annotation on
16202         SCOPE.  Do not refer to end_of_file or struct pending_inline.
16203         * semantics.c (begin_inline_definitions): Call
16204         do_pending_inlines unconditionally.
16206         * lex.c: Remove all code now shared with C front end.
16207         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
16208         into the get_identifier table.  Rewrite pragma handling to
16209         work with the registry.  Move code to save tokens for later
16210         processing to spew.c.
16212         * spew.c: Rewrite everything in terms of token streams instead
16213         of text.  Move routines here from lex.c / input.c as
16214         appropriate.  GC-mark trees hanging off the pending inlines
16215         chain.
16217 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
16219         * NEWS: Mention that the named return value extension has been
16220         deprecated.
16221         * cp-tree.h (original_result_rtx): Define.
16222         (TREE_REFERENCE_EXPR): Remove.
16223         (DECL_VPARENT): Likewise.
16224         (pushdecl_nonclass_level): Likewise.
16225         (store_return_init): Likewise.
16226         (reinit_lang_specific): Likewise.
16227         (genrtl_named_return_value): Change prototype.
16228         * decl.c (original_result_rtx): Remove.
16229         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
16230         Do not generate RTL for local variables here.
16231         (store_return_init): Remove.
16232         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
16233         store_return_init.
16234         (finish_named_return_value): Adjust accordingly.  Warn that this
16235         extension is deprecated.
16236         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
16238 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16240         * pt.c (type_unification_real): Replace switch with if.
16241         (unify): Tsubst non-type parms before comparing.
16243 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16245         * error.c (dump_typename): New function, broken out of ...
16246         (dump_type): ... here. Use it.
16247         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
16249 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16251         * init.c (build_offset_ref): Deal with namespace scoped
16252         TEMPLATE_ID_EXPRs.
16254 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
16256         * class.c (resolve_address_of_overloaded_function): Add
16257         explanation message.
16258         * decl.c (define_case_label): Reformat explanation.
16259         * decl2.c (finish_static_data_member_decl): Likewise.
16260         (grokfield): Likewise.
16261         * friend.c (do_friend): Likewise.
16263 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
16265         * tree.c (walk_tree): Expose tail recursion.
16266         (walk_stmt_tree): New function.
16267         * cp-tree.h: Prototype walk_stmt_tree.
16268         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
16269         the BLOCKs directly.  If a BLOCK has no variables after
16270         pruning, discard it.
16271         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
16272         restore the line number.
16274 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
16276         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
16277         (pt.o): Remove dependency on HTAB_H.
16278         * cp-tree.h: Include hashtab.h.
16279         (walk_tree): Change prototype.
16280         (walk_tree_without_duplicates): New function.
16281         * decl.c (check_default_argument): Use it.
16282         * optimize.c (remap_decl): Adjust calls to walk_tree.
16283         (copy_body): Likewise.
16284         (expand_calls_inline): Likewise.
16285         (calls_setjmp_p): Use walk_tree_without_duplicates.
16286         * pt.c: Don't include hashtab.h.
16287         (for_each_template_parm): Use walk_tree_without_duplicates.
16288         * semantics.c (finish-stmt_tree): Likewise.
16289         (expand_body): Likewise.
16290         * tree.c (walk_tree): Add additional parameter.
16291         (walk_tree_without_duplicates): New function.
16292         (count_trees): Use it.
16293         (verify_stmt_tree): Adjust call to walk_tree.
16294         (find_tree): Use walk_tree_without_duplicates.
16295         (no_linkage_check): Likewise.
16296         (break_out_target_exprs): Adjust call to walk_tree.
16297         (cp_unsave): Likewise.
16299 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
16301         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
16302         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16303         * cp-tree.h (TYPE_BINFO): Adjust comment.
16304         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
16305         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16306         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16307         (TYPE_TEMPLATE_INFO): Likewise.
16308         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
16309         * class.c (push_nested_class): Likewise.
16310         * decl.c (lookup_name_real): Likewise.
16311         (grokdeclarator): Likewise.
16312         (grok_op_properties): Likewise.
16313         (xref_tag): Likewise.
16314         (xref_basetypes): Likewise.
16315         * decl2.c (constructor_name_full): Likewise.
16316         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
16317         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
16318         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
16319         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16320         (dump_type_suffix): Likewise.
16321         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
16322         instead.
16323         (get_aggr_from_typedef): Likewise.
16324         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
16325         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16326         (write_template_parm): Likewise.
16327         (write_template_template_parm): Check tree code instead of
16328         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16329         * method.c (build_overload_nested_name): Add
16330         BOUND_TEMPLATE_TEMPLATE_PARM.
16331         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
16332         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16333         * pt.c (convert_template_argument): Check tree code instead of
16334         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16335         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
16336         (for_each_template_parm): Adjust comment.
16337         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
16338         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16339         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
16340         template_args_equal to compare template template parameter cases.
16341         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16342         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
16343         instead.
16344         * tree.c (copy_template_template_parm): Decide whether to create
16345         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
16346         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
16347         (copy_tree_r): Likewise.
16348         * typeck.c (comptypes): Likewise.  Check tree code instead of
16349         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
16351 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
16353         * decl.c (finish_function): Move the code for handling functions
16354         marked with the constructor and destructor attributes inside the
16355         expand_p block.
16357 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16359         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
16361 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16363         * pt.c (lookup_template_class): Remove abort.
16364         * tree.c (get_type_decl): Allow error_mark_node.
16366 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
16368         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
16369         TEMPLATE_ID_EXPRs.
16371 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
16373         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
16374         new ABI mangling.
16376 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
16378         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
16379         union tag mismatch error reporting.
16381 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
16383         * call.c (build_scoped_method_call): Check it is not a namespace.
16385 2000-08-30  Jason Merrill  <jason@redhat.com>
16387         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
16389         * tree.c (bot_manip): Check TREE_CONSTANT rather than
16390         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
16391         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
16393         * decl.c (start_function): Always call make_function_rtl.
16395 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
16397         * semantics.c (prune_unused_decls): New function.
16398         (finish_stmt_tree): Call it via walk_tree.
16400 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
16402         * class.c (build_secondary_vtable): Constify a char *.
16403         * decl.c (init_decl_processing): Initialize function_id_node,
16404         pretty_function_id_node, and func_id_node.
16405         * input.c (struct input_source): Constify 'str'.
16406         (feed_input): Constify first argument.
16407         * mangle.c (write_identifier): Constify argument.
16408         * pt.c (mangle_class_name_for_template): Constify argument.
16410 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
16412         * typeck.c (mark_addressable): Remove code that pokes around in
16413         RTL.
16415 2000-08-28  Jason Merrill  <jason@redhat.com>
16417         * lex.c (file_name_nondirectory): Move to toplev.c.
16419         * cp-tree.h (LOCAL_CLASS_P): New macro.
16420         * class.c (finish_struct_1): Use it.
16422 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
16424         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
16425         (write_encoding): Pass another argument to write_name.
16426         (write_name): Add ignore_local_scope parameter.  Fix handling of
16427         local names.
16428         (write_nested_name): Use write_unqualified_name.
16429         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
16430         (write_template_prefix): Use write_unqualified_name.
16431         (write_component): Remove.
16432         (write_local_name): Add parameter.  Use direct local entity to
16433         discriminator calculation.
16434         (write_class_enum_type): Pass another argument to write_name.
16435         (write_template_template_arg): Likewise.
16436         (make_guard_variable): Likewise.
16438 2000-08-27  Jason Merrill  <jason@redhat.com>
16440         * decl.c (pushdecl): Matching decls for local externs are found in
16441         the current level.  Propagate linkage information from previous
16442         declarations.
16444 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
16446         * ir.texi (Expressions): Fix typo.
16448 2000-08-25  Greg McGary  <greg@mcgary.org>
16450         * tree.c (init_tree): Use ARRAY_SIZE.
16452 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16454         * error.c (cp_tree_printer): Rework.
16456 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
16458         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
16459         dyn-string.o.
16460         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
16461         (cp-demangle.o): Remove target.
16462         (dyn-string.o): Likewise.
16464         * decl.c (grokfndecl): Require that `main' return an `int'.
16465         * mangle.c (write_encoding): Don't mangle return types for
16466         conversion functions.
16468 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16470         * error.c (tree_formatting_info): New data type.
16471         (tree_being_formatted): New macro.
16472         (tree_formatting_flags): Likewise.
16473         (put_whitespace): Likewise.
16474         (print_tree_identifier): Likewise.
16475         (print_identifier): Likewise.
16476         (cp_tree_printer, print_function_argument_list, print_declaration,
16477         print_expression, print_function_declaration,
16478         print_function_parameter, print_type, print_cv_qualifier): New
16479         functions.
16480         (init_error): Initialize lang_printer.
16482 2000-08-24  Jason Merrill  <jason@redhat.com>
16484         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
16485         adjustment necessary.
16487 2000-08-24  Greg McGary  <greg@mcgary.org>
16489         * cp-tree.h (MAIN_NAME_P): Remove macro.
16491 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
16493         * error.c (print_instantiation_context): Don't forget to flush the
16494         buffer.
16496 2000-08-23  Jason Merrill  <jason@redhat.com>
16498         * typeck.c (build_ptrmemfunc): Save the input pmf.
16500         * method.c (process_modifiers): Use same_type_p.
16502 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
16504         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
16505         * mangle.c (write_function_type): Change prototype.
16506         (write_encoding): Don't mangle return types for
16507         constructors or destructors.
16508         (write_type): Adjust call to write_function_type.
16509         * pt.c (instantiate_template): Instantiate alternate entry points
16510         when instantiating the main function.
16512 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16514         * error.c (cp_print_error_function): Don't use embedded '\n' in
16515         output_printf.
16517 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
16519         * decl.c (init_decl_processing): Remove bogus initialization.
16520         * error.c (lang_print_error_function): Restore here.
16521         (init_error): Initialize print_error_function.
16523 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
16525         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
16527 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
16529         * Makefile.in (error.o): Depends on diagnostic.h
16531         * cp-tree.h (problematic_instantiation_changed,
16532         record_last_problematic_instantiation, current_instantiation,
16533         print_instantiation_context): Declare.
16534         (maybe_print_template_context): Remove.
16536         * decl.c (init_decl_processing): Set print_error_function to NULL.
16537         (lang_print_error_function): Remove, since we're using a new
16538         machinery.
16540         * error.c: #include diagnostic.h
16541         (function_category): New function.
16542         (cp_diagnostic_starter): Likewise.
16543         (cp_diagnostic_finalizer): Likewise.
16544         (cp_print_error_function): Likewise.
16545         (maybe_print_instantiation_context): Likewise.
16546         (print_instantiation_full_context): Likewise.
16547         (print_instantiation_partial_context): Likewise.
16548         (print_instantiation_context): Define.
16549         (init_error): Initialize diagnostic pager and finalizer.
16551         * pt.c (problematic_instantiation_changed): Define.
16552         (record_last_problematic_instantiation): Likewise.
16553         (current_instantiation): Likewise.
16554         (maybe_print_template_context): Remove.
16555         (print_template_context): Likewise.
16556         (current_tinst_level): Make static to reflect Brendan Kehoe's
16557         change of 1995-04-13.
16558         (push_tinst_level): Call print_instantiation_context.
16560 2000-08-21  Nix  <nix@esperi.demon.co.uk>
16562         * lang-specs.h: Do not process -o or run the assembler if
16563         -fsyntax-only.
16565 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
16567         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
16568         variables.
16569         * decl2.c (lang_decode_option): Disable gettext attributes for
16570         -ansi.
16572 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
16574         * lex.c (lang_init_options): Default diagnostic message maximum
16575         length to 80, when line-wrapping.
16577 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
16579         * class.c (build_vtbl_initializer): Clear the entire
16580         vtbl_init_data.  Start keeping track of the functions for which we
16581         have created vcall offsets here.
16582         (dfs_build_vcall_offset_vtbl_entries): Remove.
16583         (build_vcall_offset_vtbl_entries): Reimplement.
16584         (add_vcall_offset_vtbl_entries_r): New function.
16585         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
16586         computing when vcall offsets are necessary.
16588 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16590         * decl.c (member_function_or_else): Use cp_error ... %T.
16591         (grokdeclarator): Likewise.
16592         (start_method): Likewise.
16593         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
16595 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16597         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
16598         TYPE_DECLs.
16600 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16602         * cp-tree.h (PTRMEM_OK_P): New macro.
16603         (itf_ptrmem_ok): New enumeration value.
16604         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
16605         argument. Diagnose implicit pointer to member.
16606         (instantiate_type): Don't diagnose implicit pointer to member
16607         here. Pass itf_ptrmem_ok if ok. Adjust calls to
16608         resolve_address_of_overloaded_function.
16609         * init.c (build_offset_ref): Set PTRMEM_OK_P.
16610         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
16611         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
16612         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
16613         (build_unary_op): Deal with single non-static member in
16614         microsoft-land.
16616 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16618         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
16620 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
16622         * cp-tree.h (enum_name_string): Remove prototype.
16623         (report_case_error): Remove prototype.
16624         * cp/typeck2.c (enum_name_string): Remove.
16625         (report_case_error): Remove.
16626         * error.c (dump_expr): Deal with enum values directly.
16627         Correctly negate integer constant.
16629 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16631         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
16632         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
16633         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
16634         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
16635         (__cxa_vec_new): Use __cxa_vec_new2.
16636         (__cxa_vec_delete): Use __cxa_vec_delete2.
16638 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16640         * vec.cc (__cxa_vec_new): Set "C" linkage.
16641         (__cxa_vec_ctor): Likewise.
16642         (__cxa_vec_cctor): Likewise.
16643         (__cxa_vec_dtor): Likewise.
16644         (__cxa_vec_delete): Likewise.
16645         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
16646         (__cxa_vec_ctor): Likewise.
16647         (__cxa_vec_cctor): Likewise.
16648         (__cxa_vec_dtor): Likewise.
16649         (__cxa_vec_delete): Likewise.
16651 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16653         * class.c (instantiate_type): Reinstate local variable
16654         deleted in previous change.
16656         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
16657         itf_no_attributes.
16659 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16661         * cp-tree.h (instantiate_type_flags): New enumeration.
16662         (instantiate_type): Change parameter.
16663         * class.c (instantiate_type): Adjust prototype. Adjust.
16664         * call.c (standard_conversion): Adjust instantiate_type call.
16665         (reference_binding): Likewise.
16666         (build_op_delete_call): Likewise.
16667         (convert_like_real): Likewise.
16668         * cvt.c (cp_convert_to_pointer): Likewise.
16669         (convert_to_reference): Likewise.
16670         * pt.c (convert_nontype_argument): Likewise.
16671         * typeck.c (build_binary_op): Likewise.
16672         (build_ptrmemfunc): Likewise.
16673         (convert_for_assignment): Likewise.
16675 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
16677         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
16678         (current_aggr): Define.
16679         * decl.c (grokdeclarator): Make sure a friend class is an
16680         elaborated type specifier.
16681         * parse.y (current_aggr): Remove static definition.
16682         (cp_parse_init): Adjust.
16683         (structsp): Clear and restore current_aggr.
16684         (component_decl_list): Clear current_aggr.
16686         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
16687         aggregate tag on the typename's context.
16689         * pt.c (tsubst_friend_class): Return error_mark_node, if
16690         parms becomes NULL.
16691         (instantiate_class_template): Ignore error_mark_node friend types.
16693 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
16695         * cvt.c (warn_ref_binding): New static function, broken out of ...
16696         (convert_to_reference): ... here. Use it.
16698 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
16700         * parse.y (template_arg): Add rule for template qualified with
16701         global scope.
16703 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16705         * decl2.c (add_function): Reorganize.
16706         (arg_assoc): Do not consider function template decls.
16708 2000-08-11  Jason Merrill  <jason@redhat.com>
16710         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
16711         looking inside.
16713 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16715         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
16716         (lookup_nested_tag): Likewise.
16718         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
16719         can be produced.
16721 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16723         * parse.y (named_complex_class_head_sans_basetype): Remove
16724         always true if.
16726 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16728         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
16729         explicit TEMPLATE_ID_EXPR args.
16730         (build_expr_from_tree, case CALL_EXPR): Likewise.
16732 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
16734         * decl.c (check_tag_decl): Diagnose typename's which don't
16735         declare anything.
16737 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
16739         * init.c (build_aggr_init): Reject bogus array initializers
16740         early.
16742 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16744         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
16745         runtime.
16746         * cp/tinfo.cc (__dynamic_cast): Likewise.
16747         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
16749 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
16751         * cvt.c (convert_to_pointer_force): Fix error message when
16752         attempting to cast from ambiguous base.
16754 2000-08-08  Jason Merrill  <jason@redhat.com>
16756         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
16757         (tsubst_template_arg_vector): Likewise.
16759         * decl2.c (build_anon_union_vars): Choose the largest field; don't
16760         assume that one will be as large as the union.
16762 2000-08-07  Kazu Hirata  <kazu@hxi.com>
16764         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
16765         * decl.c (pop_labels): Likewise.
16767 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
16769         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
16770         specifications.
16771         (__pointer_to_member_type_info): Likewise.
16772         (__base_class_info): Likewise.
16773         (__class_type_info): Likewise.
16774         (__si_class_type_info): Likewise.
16775         (__vmi_class_type_info): Likewise.
16776         * tinfo.cc (__si_class_type_info::__do_find_public_src):
16777         Changed member names to match specifications.
16778         (__vmi_class_type_info::__do_find_public_src): Likewise.
16779         (__si_class_type_info::__do_dyncast): Likewise.
16780         (__vmi_class_type_info::__do_dyncast): Likewise.
16781         (__si_class_type_info::__do_upcast): Likewise.
16782         (__vmi_class_type_info::__do_upcast): Likewise.
16783         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
16784         (__pbase_type_info::__pointer_catch): Likewise.
16785         (__pointer_type_info::__pointer_catch): Likewise.
16786         (__pointer_to_member_type_info::__pointer_catch): Likewise.
16788 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
16790         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
16791         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
16792         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
16794 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
16796         * cp-tree.h (add_method): Change prototype.
16797         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
16798         Don't double the size of the method vector in the error case.
16799         (handle_using_decl): Adjust call to add_method.
16800         (add_implicitly_declared_members): Likewise.
16801         (clone_function_decl): Likewise.
16802         * decl2.c (check_classfn): Likewise.
16803         * semantics.c (finish_member_declaration): Likewise.
16805 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
16807         * decl.c (flag_isoc94): New variable.
16809 2000-08-02  Jason Merrill  <jason@redhat.com>
16811         * pt.c (do_type_instantiation): Add complain parm; don't complain
16812         if called recursively.
16813         * cp-tree.h, parse.y: Adjust.
16815 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
16817         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
16818         -Wno-strict-prototypes.
16820         * g++spec.c: Adjust type of second argument to
16821         lang_specific_driver, and update code as necessary.
16823         * cp-tree.h: Don't prototype min_precision here.
16824         (my_friendly_assert): Cast expression to void.
16825         * semantics.c (do_poplevel): Initialize scope_stmts.
16827 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
16829         * cp-tree.h (DECL_NEEDED_P): Tweak.
16831 2000-07-28  Jason Merrill  <jason@redhat.com>
16833         * lang-specs.h: Use %i in rule for .ii files.
16835 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
16837         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
16839 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
16841         Allow indirect primary bases.
16842         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
16843         primary_base.
16844         (CLASSTYPE_VFIELD_PARENT): Remove.
16845         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
16846         (BINFO_PRIMARY_BINFO): Remove.
16847         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
16848         (BINFO_VBASE_PRIMARY_P): Likewise.
16849         (BINFO_PRIMARY_BASE_OF): New macro.
16850         (BINFO_INDIRECT_PRIMARY_P): Likewise.
16851         (get_primary_binfo): New function.
16852         * decl.c (lang_mark_tree): Make lang_type::primary_base.
16853         * class.c (vcall_offset_data_s): Rename to ...
16854         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
16855         and add ctor_vtbl_p.
16856         (get_derived_offset): Use get_primary_binfo.
16857         (dfs_mark_primary_bases): Adjust handling of virtual primary
16858         bases.
16859         (mark_primary_bases): Likewise.
16860         (set_primary_base): Take a binfo, not an integer, as a
16861         representation of the primary base.
16862         (indirect_primary_base_p): Remove.
16863         (determine_primary_base): Adjust for indirect primary bases.
16864         (dfs_find_final_overrider): Fix typo in coment.
16865         (update_vtable_entry_for_fn): Use get_primary_binfo.
16866         (layout_nonempty_base_or_field): Tweak.
16867         (build_base_fields): Adjust for new primary base semantics.
16868         (dfs_propagate_binfo_offsets): Remove.
16869         (propagate_binfo_offsets): Rewrite.
16870         (dfs_set_offset_for_shared_vbases): Remove.
16871         (layout_virtual_bases): Don't use it.
16872         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
16873         ABI.
16874         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
16875         CLASSTYPE_VFIELD_PARENT.
16876         (dfs_get_primary_binfo): New function.
16877         (get_primary_binfo): Likewise.
16878         (dump_class_hierarchy_r): Tweak printing of primary bases.
16879         (build_vtbl_initializer): Fix typo in comments.  Use
16880         vtbl_init_data.
16881         (build_vcall_and_vbase_vtbl_entries): Likewise.
16882         (build_vbaes_offset_vtbl_entries): Likewise.
16883         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
16884         BV_VCALL_INDEX to handle indirect primary bases.
16885         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
16886         (build_rtti_vtbl_entries): Likewise.
16887         * search.c (get_shared_vbase_if_not_primary): Tweak.
16888         (find_vbase_instance): Likewise.
16889         (binfo_for_vtable): Simplify.
16890         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
16891         (make_binfo): Make it have 11 entries.
16893 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
16895         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
16896         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
16897         ascertaining primaryness.
16898         (G): Remove template_args.
16899         (decl_is_template_id): New function.
16900         (write_encoding): Use decl_is_template_id.
16901         (write_name): Likewise.  Handle type_decls.  Get main variant of
16902         type decls.
16903         (write_nested_name): Likewise.
16904         (write_prefix): Likewise.
16905         (write_template_prefix): Likewise.
16906         (write_special_name_constructor): Remove defunct production from
16907         comment.
16908         (write_bare_function_type): Remove comment about absent parameter.
16909         (write_template_template_arg): Add missing grammar production to
16910         comment.
16912 2000-07-27  Jason Merrill  <jason@redhat.com>
16914         * decl.c (duplicate_decls): If common_type produces a non-typedef
16915         type for a typedef, just use the old type.
16917 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
16919         * cp-tree.h (function_depth): Declare.
16920         (verify_stmt_tree): Likewise.
16921         (find_tree): Likewise.
16922         * decl.c (function_depth): Give it external linkage.
16923         * optimize.c (optimize_function): Increment and decrement it.
16924         * tree.c (verify_stmt_tree_r): New function.
16925         (verify_stmt_tree): Likewise.
16926         (find_tree_r): Likewise.
16927         (find_tree): Likewise.
16929 2000-07-27  Jason Merrill  <jason@redhat.com>
16931         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
16932         TYPE_PTRMEMFUNC_P.
16933         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
16935 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16937         * decl.c (start_cleanup_fn): Mark the function as `inline'.
16938         * decl2.c (get_guard): Call cp_finish_decl, not
16939         rest_of_decl_compilation, for local guards.
16940         * lex.c (do_identifier): Remove unused variable.
16942 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
16944         * parse.y:  Add missing ';'.
16946 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
16948         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
16949         of `extern "C++"'.
16951 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16953         Kill strict_prototype. Backwards compatibility only for
16954         non NO_IMPLICIT_EXTERN_C systems.
16955         * cp-tree.h (flag_strict_prototype): Remove.
16956         (strict_prototype): Remove.
16957         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16958         * decl.c (maybe_push_to_top_level): Adjust.
16959         (pop_from_top_level): Adjust.
16960         (decls_match): Only allow sloppy parm matching for ancient
16961         system headers.
16962         (init_decl_processing): Adjust.
16963         (grokdeclarator): Adjust.
16964         * decl2.c (flag_strict_prototype): Remove.
16965         (strict_prototype): Remove.
16966         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
16967         (lang_f_options): Remove "strict-prototype".
16968         (unsupported-options): Add "strict-prototype".
16969         * lex.c (do_identifier): Adjust.
16970         (do_scoped_id): Adjust.
16971         * parse.y (empty_parms): Adjust.
16972         * class.c (push_lang_context): Adjust.
16973         (pop_lang_context): Adjust.
16974         * typeck.c (comp_target_parms): Adjust.
16976 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
16978         * decl.c (poplevel): Deal with anonymous variables at for scope.
16979         (maybe_inject_for_scope_var): Likewise.
16981 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
16983         * decl.c: Remove all signal handling code, now done in toplev.c.
16985 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
16987         * decl.c (make_rtl_for_nonlocal_decl): Rework.
16989         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
16990         correctly.
16992 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
16994         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
16995         Define my_friendly_assert and my_friendly_abort as macros
16996         which may call friendly_abort.  Prototype friendly abort, not
16997         my_friendly_abort or my_friendly_assert.
16998         * decl.c (signal_catch): Report the signal caught in the error
16999         message.  Call fatal directly.
17000         * typeck2.c (ack, my_friendly_assert): Delete.
17001         (my_friendly_abort): Rename to friendly_abort.  Expect file,
17002         line, and function parameters.  Report the abort code, then
17003         call fancy_abort.  Do not mask an abort if errors have
17004         already occurred.
17006 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
17008         * typeck.c (comp_target_parms): Remove obsolete parameter.
17009         (comp_target_types): Adjust.
17011 2000-07-17  Jason Merrill  <jason@redhat.com>
17013         * typeck.c (mark_addressable): Never set TREE_USED.
17014         * call.c (build_call): Don't abort on calls to library functions
17015         that have been declared normally.
17017         * typeck.c (build_binary_op): Fix grammar in warning.
17019         * exception.cc (__eh_free): Fix prototype.
17021         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
17023         * decl.c (pushdecl): Handle seeing an OVERLOAD in
17024         IDENTIFIER_NAMESPACE_VALUE.
17026 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
17028         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
17029         * method.c (use_thunk): Correct handling of vcall offsets.
17031 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
17033         * .cvsignore: parse.h and parse.c have no cp- prefix.
17035 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
17037         * .cvsignore: New file.
17039 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
17041         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
17043 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
17045         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
17046         * parse.c: Remove.
17047         * parse.h: Likewise.
17049 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
17051         * class.c (layout_class_type): Add pointers to virtual bases after
17052         base classes under the old ABI.
17054 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
17056         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
17057         (finish_continue_stmt): Likewise.
17058         (begin_for_stmt): Remove call to note_level_for_for.
17059         (finish_goto_stmt): Change call from build_min_nt
17060         to build_stmt.
17061         (finish_expr_stmt): Likewise.
17062         (begin_if_stmt): Likewise.
17063         (begin_while_stmt): Likewise.
17064         (finish_while_stmt): Likewise.
17065         (finish_return_stmt): Likewise.
17066         (begin_for_stmt): Likewise.
17067         (finish_for_stmt): Likewise.
17068         (finish_break_stmt): Likewise.
17069         (begin_switch_stmt): Likewise.
17070         (finish_case_label): Likewise.
17071         (genrtl_try_block): Likewise.
17072         (begin_try_block): Likewise.
17073         (begin_handler): Likewise.
17074         (begin_compound_stmt): Likewise.
17075         (finish_asm_stmt): Likewise.
17076         (finish_label_stmt): Likewise.
17077         (add_decl_stmt): Likewise.
17078         (finish_subobject): Likewise.
17079         (finish_decl_cleanup): Likewise.
17080         (finish_named_return_value): Likewise.
17081         (setup_vtbl_ptr): Likewise.
17082         (add_scope_stmt): Likewise.
17083         * decl.c (finish_constructor_body): Likewise.
17084         (finish_destructor_body): Likewise.
17085         * optimize.c (copy_body_r): Likewise.
17086         (initialize_inlined_parameters): Likewise.
17087         (declare_return_variable): Likewise.
17088         (expand_call_inline): Likewise.
17090 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
17092         * semantics.c (expand_body): Sync interface information
17093         at the end of function body expansion.
17095 2000-07-09  Jason Merrill  <jason@redhat.com>
17097         * init.c (build_new_1): Bail early if the call to new fails.
17099         * decl.c (compute_array_index_type): Check specifically for
17100         an INTEGER_CST, not just TREE_CONSTANT.
17102         * decl.c (duplicate_decls): Don't call duplicate_decls on
17103         the DECL_TEMPLATE_RESULT.
17104         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
17105         codes.
17107         * error.c (dump_template_bindings): Don't crash if we had an
17108         invalid argument list.
17110         * typeck.c (c_expand_start_case): Do narrowing here.
17111         * semantics.c (finish_switch_cond): Not here.
17113 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
17115         * parse.y (asm_clobbers): Do string concatenation.
17117 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
17119         * decl.c (pushtag): Don't put local classes in template functions
17120         on the local_classes list.
17122 2000-07-04  Scott Snyder  <snyder@fnal.gov>
17124         * decl2.c (get_guard): Add missing return for old ABI local
17125         variable case.
17127 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
17129         * cp-tree.h (char_type_p): New function.
17130         * decl.c (init_decl_processing): Don't initialize
17131         signed_wchar_type_node or unsigned_wchar_type_node.
17132         (complete_array_type): Handle brace-enclosed string-constants.
17133         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
17134         * tree.c (char_type_p): New function.
17135         * typeck2.c (digest_init): Use char_type_p.
17137 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
17139         * pt.c (tsubst): Don't layout type, if it's error_mark.
17141 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
17143         * pt.c (instantiate_pending_templates): Reset template level.
17145 2000-07-05  Jason Merrill  <jason@redhat.com>
17147         * call.c (joust): Don't complain about `operator char *()' beating
17148         `operator const char *() const'.
17150 2000-07-04  scott snyder  <snyder@fnal.gov>
17151             Jason Merrill  <jason@redhat.com>
17153         * repo.c (repo_get_id): Handle the case where a class with virtual
17154         bases has a null TYPE_BINFO_VTABLE.
17156 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
17157             Jason Merrill  <jason@redhat.com>
17159         * parse.y (member_init): Just pass in the type.
17160         * init.c (expand_member_init): Handle getting a type.
17162 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17163             Jason Merrill  <jason@redhat.com>
17165         * decl.c (finish_function): Warn if a function has no return
17166         statement.
17167         Suggested by Andrew Koenig.
17168         * typeck.c (check_return_expr): Do set current_function_returns_value
17169         if we got an error_mark_node.
17171 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
17173         * decl2.c (push_decl_namespace): Push the original namespace.
17175 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
17177         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
17178         * semantics.c (begin_class_definition): Clear it.
17180 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
17182         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
17183         (genrtl_expr_stmt): Likewise.
17184         (genrtl_decl_stmt): Likewise.
17185         (genrtl_if_stmt): Likewise.
17186         (genrtl_while_stmt): Likewise.
17187         (genrtl_do_stmt): Likewise.
17188         (genrtl_return_stmt): Likewise.
17189         (genrtl_for_stmt): Likewise.
17190         (genrtl_break_stmt): Likewise.
17191         (genrtl_continue_stmt): Likewise.
17192         (genrtl_scope_stmt): Likewise.
17193         (genrtl_switch_stmt): Likewise.
17194         (genrtl_case_label): Likewise.
17195         (genrtl_begin_compound_stmt): Likewise.
17196         (genrtl_finish_compound_stmt): Likewise.
17197         (genrtl_compound_stmt): Likewise.
17198         (genrtl_asm_stmt): Likewise.
17200         * init.c (begin_init_stmts): Remove call to
17201         genrtl_begin_compound_stmt.
17202         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
17204         * semantics.c (lang_expand_stmt): Changed call to
17205         genrtl_compound_stmt to ignore return value.
17207 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
17209         * mangle.c (canonicalize_for_substitution): Return the canonical
17210         variant of a type.
17212         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
17213         TYPE_DECL.
17214         * typeck.c (commonparms): Remove obstack manipulations.
17216 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
17218         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
17220         * Makefile.in (OBJS): Added ../c-semantics.o.
17221         (OBJDEPS): Likewise.
17223         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
17224         ../c-common.h.
17225         (struct stmt_tree): Added comment.
17226         (current_function_name_declared): Removed.
17227         (stmts_are_full_exprs_p): Likewise.
17228         (genrtl_do_pushlevel): Likewise.
17229         (genrtl_clear_out_block): Likewise.
17230         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
17231         (DECL_ANON_UNION_ELEMS): Likewise.
17232         (emit_local_var): Likewise.
17233         (make_rtl_for_local_static): Likewise.
17234         (do_case): Likewise.
17235         (expand_stmt): Likewise.
17236         (genrtl_decl_cleanup): Likewise.
17237         (c_expand_asm_operands): Likewise.
17238         (c_expand_return): Likewise.
17239         (c_expand_start_case): Likewise.
17241         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
17242         (emit_local_var): Likewise.
17243         (initialize_local_var): Change reference to
17244         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17245         Change reference to stmts_are_full_exprs_p to
17246         current_stmt_tree->stmts_are_full_exprs_p.
17247         (push_cp_function_context): Likewise.
17249         * expect.c (expand_throw): Change reference to
17250         stmts_are_full_exprs_p.
17252         * init.c (build_aggr_init): Change reference to
17253         stmts_are_full_exprs_p.
17254         (build_vec_init): Likewise.
17256         * optimize.c (maybe_clone_body): Change reference to
17257         current_function_name_declared to
17258         cp_function_chain->name_declared.
17260         * pt.c (instantiate_decl): Change reference to
17261         current_function_name_declared to
17262         cp_function_chain->name_declared.
17264         * semantics.c (expand_cond): Moved declaration to c-common.h.
17265         (genrtl_do_pushlevel): Moved to c-semantics.c.
17266         (genrtl_clear_out_block): Likewise.
17267         (genrtl_goto_stmt): Likewise.
17268         (genrtl_expr_stmt): Likewise.
17269         (genrtl_decl_stmt): Likewise.
17270         (gerntl_if_stmt): Likewise.
17271         (genrtl_while_stmt): Likewise.
17272         (genrtl_do_stmt): Likewise.
17273         (genrtl_return_stmt): Likewise.
17274         (genrtl_for_stmt): Likewise.
17275         (genrtl_break_stmt): Likewise.
17276         (genrtl_continue_stmt): Likewise.
17277         (genrtl_scope_stmt): Likewise.
17278         (genrtl_switch_stmt): Likewise.
17279         (genrtl_case_label): Likewise.
17280         (genrtl_begin_compound_stmt): Likewise.
17281         (genrtl_finish_compound_stmt): Likewise.
17282         (genrtl_compound_stmt): Likewise.
17283         (genrtl_asm_stmt): Likewise.
17284         (genrtl_decl_cleanup): Likewise.
17285         (expand_cond): Likewise.
17286         (expand_stmt): Renamed to ...
17287         (lang_expand_stmt): ... this.
17288         (lang_expand_expr_stmt): Initialize.
17289         (set_current_function_name_declared): Likewise.
17290         (stmts_are_full_exprs_p): Likewise.
17291         (current_function_name_declared): Likewise.
17292         (anon_aggr_type_p): Likewise.
17293         (do_poplevel): Change reference to
17294         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
17295         Change reference to stmts_are_full_exprs_p to
17296         current_stmt_tree->stmts_are_full_exprs_p.
17297         (add_tree): Likewise.
17298         (finish_expr_stmt): Likewise.
17299         (prep_stmt): Likewise.
17300         (lang_expand_stmt): Likewise.
17301         (begin_compound_stmt): Change reference to
17302         current_function_name_declared to
17303         cp_function_chain->name_declared and call to
17304         current_function_name_declared().
17305         (setup_vtbl_ptr): Likewise.
17306         (genrtl_do_poplevel): Removed.
17308 2000-06-30  Jason Merrill  <jason@redhat.com>
17310         * init.c (init_init_processing): Go back to aligning like
17311         double_type_node for old ABI.
17312         (get_cookie_size): Make cookie larger if we get a type that needs
17313         more alignment.
17314         (build_vec_delete): Call it.
17316         * typeck.c (qualify_type_recursive): New fn.
17317         (composite_pointer_type): Use it.
17318         (build_binary_op): Use composite_pointer_type.
17320 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
17321             Jason Merrill  <jason@redhat.com>
17323         * typeck.c (check_return_expr): Don't complain about returning
17324         NULL from operator new if -fcheck-new.
17325         * cp-tree.h: Declare flag_check_new here.
17326         * init.c: Not here.
17328 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
17330         * mangle.c (find_substitution): Use same_type_p.
17331         (write_encoding): Don't check for substitutions.
17333 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
17335         * parse.y (expr_no_comma_rangle): New non-terminal.
17336         (template_parm): Use it for default parameter case.
17337         (template_arg): Use it.
17338         (expr_no_commas): Remove commented out undefined extensions.
17339         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17340         * parse.h, parse.c: Rebuilt.
17342 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
17344         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
17345         (finish_asm_stmt): Do it here, instead.
17347         * cp-tree.h (ridpointers): Don't declare.
17348         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
17349         (record_builtin_java_type): Likewise.
17350         (init_decl_processing): Likewise.
17351         * lex.c: Move inclusion of lex.h.
17352         (ridpointers): Don't define.
17353         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
17354         RID_MAX.
17355         * lex.h (enum rid): Rename to ...
17356         (enum cp_rid): ... this.
17357         (ridpointers): Don't declare.
17358         * parse.y: Move inclusion of lex.h.
17359         * parse.c: Regenerated.
17360         * spew.c: Move inclusion of lex.h.
17362         * cp-tree.h (struct language_function): Remove temp_name_counter.
17363         (temp_name_counter): Remove.
17364         (get_temp_name): Change prototype.
17365         (get_guard): New function.
17366         (get_guard_cond): Likewise.
17367         (set_guard): Likewise.
17368         * cvt.c (build_up_reference): Adjust call to get_temp_name.
17369         * decl.c (expand_static_init): Use get_guard and friends to
17370         implement guard variables.
17371         * decl2.c (get_temp_name): Assume that the variables created are
17372         always static.
17373         (get_sentry): Rename to ...
17374         (get_guard): ... this.  Implement new ABI guard variables.
17375         (get_guard_bits): New function.
17376         (get_guard_cond): Likewise.
17377         (set_guard): Likewise.
17378         (start_static_initialization_or_destruction): Use them.
17379         (do_static_initialization): Replace sentry with guard throughout.
17380         (do_static_destruction): Likewise.
17381         * init.c (create_temporary_var): Add comment.
17383 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
17385         * mangle.c (find_substitution): Use same_type_p.
17386         (write_encoding): Don't check for substitutions.
17388 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
17390         * parse.y (expr_no_comma_rangle): New non-terminal.
17391         (template_parm): Use it for default parameter case.
17392         (template_arg): Use it.
17393         (expr_no_commas): Remove commented out undefined extensions.
17394         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
17395         * parse.h, parse.c: Rebuilt.
17397 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
17399         * cp-tree.h (flag_const_strings): Remove.
17400         (warn_parentheses): Likewise.
17401         (warn_format): Likewise.
17402         (common_type): Likewise.
17403         (default_conversion): Likewise.
17404         (build_binary_op): Likewise.
17405         (cp_build_binary_op): New macro.
17406         * call.c (build_new_op): Use cp_build_binary_op instead of
17407         build_binary_op.
17408         * class.c (build_vtable_entry_ref): Likewise.
17409         * decl.c (expand_static_init): Likewise.
17410         (compute_array_index_type): Likewise.
17411         (build_enumerator): Likewise.
17412         * decl2.c (delete_sanity): Likewise.
17413         (start_static_initialization_or_destruction): Likewise.
17414         * error.c (dump_type_suffix): Likewise.
17415         * init.c (resolve_offset_ref): Likewise.
17416         (build_new): Likewise.
17417         (build_new_1): Likewise.
17418         (build_vec_delete_1): Likewise.
17419         (build_vec_init): Likewise.
17420         (build_delete): Likewise.
17421         * rtti.c (synthesize_tinfo_fn): Likewise.
17422         (synthesize_tinfo_var): Likewise.
17423         * search.c (expand_upcast_fixups): Likewise.
17424         (fixup_all_virtual_upcast_offsets): Likewise.
17425         * typeck.c (build_array_ref): Likewise.
17426         (get_member_function_from_ptrfunc): Likewise.
17427         (build_binary_op): Add parameter.
17428         (pointer_int_sum): Use cp_build_binary_op.
17429         (pointer_diff): Likewise.
17430         (build_modify_expr): Likewise.
17431         (get_delta_difference): Likewise.
17432         (build_ptrmemfunc): Likewise.
17434 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
17436         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
17437         * decl.c (create_implicit_typedef): Adjust.
17438         * decl2.c (build_artificial_parm): Adjust.
17439         * method.c (implicitly_declare_fn): Adjust.
17440         * pt.c (push_inline_template_parms_recursive): Adjust.
17441         (process_template_parm): Adjust.
17442         (overloaded_template_name): Adjust.
17443         * semantics.c (finish_template_template_parm): Adjust.
17445 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
17447         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
17448         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
17449         where to emit thunks.
17450         (build_vtt): Adjust call to build_vtt_inits.
17451         (build_vtt_inits): Add parameter to indicate whether or not
17452         sub-VTTs for virtual bases should be included.  Adjust handling of
17453         construction vtables.
17454         (get_matching_base): New function.
17455         (dfs_build_vtt_inits): Rename to ...
17456         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
17457         construction vtables.
17458         (dfs_fixup_binfo_vtbls): Likewise.
17459         (build_ctor_vtbl_groups): Build construction vtables for virtual
17460         bases, too.
17461         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
17462         to build construction vtbls.
17463         (dfs_accumulate_vtbl_inits): Adjust handling of
17464         construction vtables.
17466         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
17467         types correctly.
17469 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
17471         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
17473 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17475         * search.c (hides): Remove.
17476         (is_subobject_of_p): Add most_derived parameter. Use
17477         CANONICAL_BINFO.
17478         (lookup_field_queue_p): Adjust.
17479         (lookup_field_r): Adjust.
17481 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
17483         * decl2.c (handle_class_head): Bash typedefs to the type's main
17484         decl.
17486 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
17488         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
17489         (begin_global_stmt_expr): ... this.
17490         (genrtl_finish_stmt_expr): Rename to ...
17491         (finish_global_stmt_expr): ... this.
17492         * init.c (begin_init_stmts): Adjust calls.
17493         (finish_init_stmts): Likewise.
17494         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
17495         (begin_global_stmt_expr): ... this.
17496         (genrtl_finish_stmt_expr): Rename to ...
17497         (finish_global_stmt_expr): ... this.
17499 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17501         * search.c (lookup_member): Fix typo in comment.
17503 2000-06-24  Jason Merrill  <jason@redhat.com>
17505         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
17506         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
17508 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17510         * parse.y (complex_direct_notype_declarator): Support global_scope.
17511         * Makefile.in: Adjust conflict count.
17513 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
17515         * parse.y (template_arg): Convert TEMPLATE_DECL
17516         that is a template template parameter to
17517         TEMPLATE_TEMPLATE_PARM here.
17519         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
17520         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
17521         (copy_template_template_parm): Adjust prototype.
17522         * decl.c (grokdeclarator): Remove dead code.
17523         * pt.c (process_template_parm): Tidy.
17524         (lookup_template_class): Construct nodes in
17525         copy_template_template_parm.
17526         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
17527         lookup_template_class.  Use TYPE_TI_TEMPLATE.
17528         * tree.c (copy_template_template_parm): Add NEWARGS
17529         parameter.
17530         (mapcar): Adjust call to copy_template_template_parm.
17531         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
17532         * method.c (build_template_template_parm_names): Change error
17533         code to avoid compilation warning.
17535         * gxxint.texi: Document template template parameter
17536         name mangling.
17538 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
17540         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
17541         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
17542         (cp-demangle.o): New rule.
17543         (dyn-string.o): Likewise.
17544         * inc/cxxabi.h (__cxa_demangle): New declaration.
17546 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
17548         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
17549         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
17550         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
17551         a tree, not an int.
17552         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
17553         (make_thunk): Change prototype.
17554         (emit_thunk): Rename to use_thunk.
17555         (mangle_thunk): Change prototype.
17556         * class.c (get_derived_offset): Simplify.
17557         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
17558         BV_GENERATE_THUNK_WITH_VTABLE_P.
17559         (build_primary_vtable): Simplify.
17560         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
17561         (dfs_find_base): Remove.
17562         (update_vtable_entry_for_fn): Correct bug in finding the base
17563         where a virtual function was first declared.  Figure out whether
17564         or not to emit a vcall-thunk with the vtables in which it appears.
17565         Correct logic for deciding whether to use an ordinary thunk, or a
17566         vcall thunk.
17567         (finish_struct_1): Remove unnecssary code.
17568         (build_vtbl_initializer): Use ssize_int for the running counter of
17569         negative indices.
17570         (build_vtbl_initializer): Only use vcall thunks where necessary.
17571         Mark thunks as needing to be emitted with their vtables, or not.
17572         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
17573         indices.  Use size_binop.
17574         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
17575         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
17576         size_binop.
17577         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
17578         (build_vtable_entry): Mark thunks as needing to be emitted with
17579         their vtables, or not.
17580         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
17581         * decl2.c (mark_vtable_entries): Use use_thunk instead of
17582         emit_thunk.
17583         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
17584         information.
17585         * error.c (dump_expr): Use BV_FN.
17586         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
17587         not an int.
17588         * method.c (make_thunk): Likewise.
17589         (emit_thunk): Rename to use_thunk.  Allow callers to decide
17590         whether or not to actually emit the thunk.  Adjust for changes in
17591         representation of vcall offsets.
17592         * search.c (dfs_get_pure_virtuals): Use BV_FN.
17593         * semantics.c (emit_associated_thunks): New function.
17594         (expand_body): Use it.
17595         * ir.texi: Adjust decriptions of thunks.
17597 2000-06-22  Jason Merrill  <jason@redhat.com>
17599         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
17600         (tsubst_friend_function): Copy it here.
17602         * decl.c (grok_op_properties): Fix typo.
17604         * decl2.c (delete_sanity): Clarify warning, avoid failure on
17605         deleting void*.
17607         * pt.c (check_explicit_specialization): Clarify error.
17609         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
17610         an old OVERLOAD when we're declaring a non-function.
17611         (pushdecl, destroy_local_var): Check for error_mark_node.
17612         (warn_extern_redeclared_static): Also bail early if
17613         we're a CONST_DECL.
17614         (push_overloaded_decl): Ignore an old error_mark_node.
17616 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
17618         * call.c (build_x_va_arg): Check if in a template decl.
17619         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
17621 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17623         * class.c (push_lang_context): TYPE_NAME gets you to the Java
17624         types DECLs.
17625         * decl.c (check_goto): Computed gotos assumed OK.
17627 2000-06-20  Jason Merrill  <jason@redhat.com>
17629         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
17630         for which we don't need to look for instantiations.
17632 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
17634         * parse.y (program): Always call finish_translation_unit.
17635         * parse.c, parse.h: Rebuilt.
17637 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
17639         * method.c: Don't include hard-reg-set.h.
17641 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17643         * rtti.c (get_base_offset): Cope when vbase field is in a base.
17645 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
17647         * call.c (build_conditional_expr): Use VOID_TYPE_P.
17648         * cvt.c (cp_convert_to_pointer): Likewise.
17649         (convert_to_void): Likewise.
17650         * error.c (dump_expr): Likewise.
17651         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
17652         * init.c (build_delete): Likewise.
17653         * method.c (emit_thunk): Likewise.
17654         * optmize.c (declare_return_variable): Likewise.
17655         * rtti.c (get_tinfo_decl_dynamic): Likewise.
17656         (get_typeid): Likewise.
17657         (build_dynamic_cast_1): Likewise.
17658         * typeck.c (composite_pointer_type): Likewise.
17659         (common_type): Likewise.
17660         (build_indirect_ref): Likewise.
17661         (build_binary_op): Likewise.
17662         (build_x_compound_expr): Likewise.
17663         (check_return_expr): Likewise.
17664         * typeck2.c (add_exception_specifier): Likewise.
17666         * mangle.c (write_method_parms): Use direct comparison for end
17667         of parmlist.
17669 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
17671         * cp-tree.h (genrtl_try_block): Declare function.
17672         (genrtl_handler): Likewise.
17673         (genrtl_catch_block): Likewise.
17674         (genrtl_ctor_stmt): Likewise.
17675         (genrtl_subobject): Likewise.
17676         (genrtl_decl_cleanup): Likewise.
17677         (genrtl_do_poplevel): Likewise.
17678         (genrtl_do_pushlevel): Likewise.
17679         (genrtl_clear_out_block): Likewise.
17680         (genrtl_goto_stmt): Likewise.
17681         (genrtl_expr_stmt): Likewise.
17682         (genrtl_decl_stmt): Likewise.
17683         (genrtl_if_stmt): Likewise.
17684         (genrtl_while_stmt): Likewise.
17685         (genrtl_do_stmt): Likewise.
17686         (genrtl_return_stmt): Likewise.
17687         (genrtl_for_stmt): Likewise.
17688         (genrtl_break_stmt): Likewise.
17689         (genrtl_continue_stmt): Likewise.
17690         (genrtl_scope_stmt): Likewise.
17691         (genrtl_switch_stmt): Likewise.
17692         (genrtl_case_label): Likewise.
17693         (genrtl_begin_compound_stmt): Likewise.
17694         (genrtl_finish_compound_stmt): Likewise.
17695         (genrtl_compound_stmt): Likewise.
17696         (genrtl_asm_stmt): Likewise.
17697         (genrtl_named_return_value): Likewise.
17698         (genrtl_begin_stmt_expr): Likewise.
17699         (genrtl_finish_stmt_expr): Likewise.
17700         (finish_for_stmt): Removed first argument.
17701         (finish_switch_stmt): Likewise.
17703         * semantics.c (genrtl_try_block): Define function.
17704         (genrtl_handler): Likewise.
17705         (genrtl_catch_block): Likewise.
17706         (genrtl_ctor_stmt): Likewise.
17707         (genrtl_subobject): Likewise.
17708         (genrtl_decl_cleanup): Likewise.
17709         (genrtl_do_poplevel): Likewise.
17710         (genrtl_do_pushlevel): Likewise.
17711         (genrtl_clear_out_block): Likewise.
17712         (genrtl_goto_stmt): Likewise.
17713         (genrtl_expr_stmt): Likewise.
17714         (genrtl_decl_stmt): Likewise.
17715         (genrtl_if_stmt): Likewise.
17716         (genrtl_while_stmt): Likewise.
17717         (genrtl_do_stmt): Likewise.
17718         (genrtl_return_stmt): Likewise.
17719         (genrtl_for_stmt): Likewise.
17720         (genrtl_break_stmt): Likewise.
17721         (genrtl_continue_stmt): Likewise.
17722         (genrtl_scope_stmt): Likewise.
17723         (genrtl_switch_stmt): Likewise.
17724         (genrtl_case_label): Likewise.
17725         (genrtl_begin_compound_stmt): Likewise.
17726         (genrtl_finish_compound_stmt): Likewise.
17727         (genrtl_compound_stmt): Likewise.
17728         (genrtl_asm_stmt): Likewise.
17729         (genrtl_named_return_value): Likewise.
17730         (genrtl_begin_stmt_expr): Likewise.
17731         (genrtl_finish_stmt_expr): Likewise.
17732         (finish_for_stmt): Removed first argument and generate rtl
17733         specific code.
17734         (finish_switch_stmt): Likewise.
17735         (do_poplevel): Removed generate rtl specific code.
17736         (do_pushlevel): Likewise.
17737         (add_tree): Likewise.
17738         (finish_goto_stmt): Likewise.
17739         (finish_expr_stmt): Likewise.
17740         (begin_if_stmt): Likewise.
17741         (finish_if_stmt_cond): Likewise.
17742         (finish_then_clause): Likewise.
17743         (begin_else_clause): Likewise.
17744         (finish_else_clause): Likewise.
17745         (finish_if_stmt): Likewise.
17746         (clear_out_block): Likewise.
17747         (begin_while_stmt): Likewise.
17748         (finish_while_stmt_cond): Likewise.
17749         (finish_while_stmt): Likewise.
17750         (begin_do_stmt): Likewise.
17751         (finish_do_body): Likewise.
17752         (finish_do_stmt): Likewise.
17753         (finish_return_stmt): Likewise.
17754         (begin_for_stmt): Likewise.
17755         (finish_for_init_stmt): Likewise.
17756         (finish_for_cond): Likewise.
17757         (finish_for_expr): Likewise.
17758         (finish_break_stmt): Likewise.
17759         (finish_continue_stmt): Likewise.
17760         (begin_switch_stmt): Likewise.
17761         (finish_switch_cond): Likewise.
17762         (finish_case_label): Likewise.
17763         (begin_try_block): Likewise.
17764         (begin_function_try_block): Likewise.
17765         (finish_try_block): Likewise.
17766         (finish_cleanup_try_block): Likewise.
17767         (finish_cleanup): Likewise.
17768         (finish_function_try_block): Likewise.
17769         (finish_handler_sequence): Likewise.
17770         (finish_function_handler_sequence): Likewise.
17771         (begin_handler): Likewise.
17772         (finish_handler_parms): Likewise.
17773         (begin_catch_block): Likewise.
17774         (finish_handler): Likewise.
17775         (begin_compound_stmt): Likewise.
17776         (finish_compound_stmt): Likewise.
17777         (finish_asm_stmt): Likewise.
17778         (finish_label_stmt): Likewise.
17779         (finish_label_decl): Likewise.
17780         (finish_subobject): Likewise.
17781         (finish_decl_cleanup): Likewise.
17782         (finish_named_return_value): Likewise.
17783         (begin_stmt_expr): Likewise.
17784         (finish_stmt_expr): Likewise.
17786         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
17787         to call genrtl_expr_stmt when appropriate.
17789         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
17790         begin_compound_expr to call genrtl_begin_stmt_expr and
17791         genrtl_begin_compound_expr when appropriate.
17792         (finish_init_stmts): Changed calls to finish_compound_expr and
17793         finish_stmt_expr to call genrtl_finish_compound_expr and
17794         genrtl_finish_stmt_expr when appropriate.
17795         (expand_default_init): Changed call to finish_expr_stmt to call
17796         genrtl_expr_stmt when appropriate.
17797         (build_vec_init): Likewise.
17799         * parse.y (simple_stmt): Removed first argument from call to
17800         finish_for_stmt. Removed first argument from call to
17801         finish_switch_stmt.
17803         * parse.c: Regenerated.
17805         * pt.c (tsubst_expr): Removed first argument from call to
17806         finish_for_stmt. Removed first argument from call to
17807         finish_switch_stmt.
17809 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
17811         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
17812         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
17814         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
17815         (cplus_tree_code_length[]): Likewise.
17816         (cplus_tree_code_name[]): Likewise.
17817         (init_parse): Added call to add_c_tree_codes. Changed
17818         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
17820 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
17822         * cp-tree.h (finish_mem_initializers): Declare.
17823         (count_trees): Likewise.
17824         * parse.y (base_init): Use finish_mem_initializers.
17825         * semantics.c (finish_mem_initializers): New function.
17827         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
17828         the number of trees.
17829         (n_trees): Remove.
17830         (count_trees): Don't use it.
17832 2000-06-15  Jason Merrill  <jason@redhat.com>
17834         * tree.c (count_trees): New debugging function.
17836         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
17837         * init.c (build_member_call): Pull out the name of a DECL.
17839         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
17840         * semantics.c (expand_body): Push to TV_INTEGRATION here.
17841         * optimize.c (optimize_function): Not here.
17842         * pt.c (instantiate_decl): Push to TV_PARSE.
17844 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
17846         * cp-tree.h (struct language_function): Remove x_base_init_list
17847         and x_member_init_list.
17848         (current_base_init_list): Remove.
17849         (current_member_init_list): Likewise.
17850         (setup_vtbl_ptr): Change prototype.
17851         (emit_base_init): Likewise.
17852         (expand_member_init): Likewise.
17853         (reinit_parse_for_function): Remove.
17854         * decl.c (save_function_data): Don't clear x_base_init_list and
17855         x_member_init_list.
17856         (mark_language_function): Don't mark them.
17857         * init.c (perform_member_init): Tweak comment.
17858         (sort_member_init): Take the list of initializers as an argument.
17859         (sort_base_init): Likewise.
17860         (emit_base_init): Likewise.
17861         (expand_member_init): Return the initializer.  Don't use global
17862         variables.
17863         * lex.c (reinit_parse_for_function): Remove.
17864         * method.c (build_template_parm_names): Correct substitution.
17865         (do_build_copy_constructor): Don't use current_member_init_list
17866         and current_base_init_list.
17867         (synthesize_method): Likewise.
17868         * parse.y (base_init): Split mem-initializers into
17869         base-initializers and field-initializers.
17870         (member_init_list): Build up the list here.
17871         (member_init): Return the initializer.
17872         (fn.depfn): Don't use reinit_parse_for_function.
17873         * parse.c: Regenerated.
17874         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
17875         ERROR_MARK.
17876         (tsubst_expr): Don't use current_member_init_list
17877         and current_base_init_list.
17878         (tsubst_expr_values): Rename to ...
17879         (tsubst_initializer_list): ... this.  Use convert_from_reference.
17880         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
17881         and current_base_init_list.
17882         (begin_function_definition): Don't call reinit_parse_for_function.
17884         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
17886         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
17887         correctly.
17889         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
17891 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
17893         * cp-tree.h (IF_COND): Move to c-common.h.
17894         (THEN_CLAUSE): Likewise.
17895         (ELSE_CLAUSE): Likewise.
17896         (WHILE_COND): Likewise.
17897         (WHILE_BODY): Likewise.
17898         (DO_COND): Likewise.
17899         (DO_BODY): Likewise.
17900         (RETURN_EXPR): Likewise.
17901         (EXPR_STMT_EXPR): Likewise.
17902         (FOR_INIT_STMT): Likewise.
17903         (FOR_COND): Likewise.
17904         (FOR_EXPR): Likewise.
17905         (FOR_BODY): Likewise.
17906         (SWITCH_COND): Likewise.
17907         (SWITCH_BODY): Likewise.
17908         (CASE_LOW): Likewise.
17909         (CASE_HIGH): Likewise.
17910         (GOTO_DESTINATION): Likewise.
17911         (COMPOUND_BODY): Likewise.
17912         (ASM_CV_QUAL): Likewise.
17913         (ASM_STRING): Likewise.
17914         (ASM_OUTPUTS): Likewise.
17915         (ASM_INPUTS): Likewise.
17916         (ASM_CLOBBERS): Likewise.
17917         (DECL_STMT_DECL): Likewise.
17918         (STMT_EXPR_STMT): Likewise.
17919         (LABEL_STMT_LABEL): Likewise.
17920         (SCOPE_BEGIN_P): Likewise.
17921         (SCOPE_END_P): Likewise.
17922         (SCOPE_STMT_BLOCK): Likewise.
17923         (SCOPE_NULLIFIED_P): Likewise.
17924         (SCOPE_NO_CLEANUPS_P): Likewise.
17925         (SCOPE_PARTIAL_P): Likewise.
17926         (ASM_VOLATILE_P): Likewise.
17927         (STMT_LINENO): Likewise.
17928         (STMT_LINENO_FOR_FN_P): Likewise.
17930         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
17931         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
17932         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
17933         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
17934         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
17936         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
17938         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
17939         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
17941         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
17942         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
17943         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
17945 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
17947         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
17948         * class.c (dfs_find_final_overrider): Set it appropriately.
17949         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
17950         avoid unneeded secondary vptrs.
17952 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
17954         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
17955         (check_bitfield_decl, check_field_decl): Likewise.
17956         (build_vtbl_or_vbase_field, build_base_field): Likewise.
17957         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
17958         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
17959         (xfer_tag, finish_enum): Likewise.
17960         * decl2.c (finish_builtin_type): Likewise.
17961         * init.c (init_init_processing): Likewise.
17962         * pt.c (instantiate_class_template): Likewise.
17963         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
17964         * cp-tree.h (struct lang_type): Add user_align member.
17965         (CLASSTYPE_USER_ALIGN): Define.
17967 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
17969         * Make-lang.in (c++.install-common): Install g++-cross in
17970         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
17971         $(target_alias)-g++ and $(target_alias)-c++.
17973 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
17975         * class.c (vcall_offset_data_s): Add last_init and fns.
17976         (overrides): Rename to same_signature_p.
17977         (dfs_find_final_overrider): Adjust accordingly.
17978         (mark_overriders): Likewise.
17979         (warn_hidden): Likewise.
17980         (build_vtbl_initializer): Reorganize machinery for building things
17981         at negative offsets.
17982         (build_vcall_and_vbase_vtbl_entries): Likewise.
17983         (build_vbase_offset_vtbl_entries): Likewise.
17984         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
17985         offset entries.  Do not create two entries for functions with the
17986         same signature.
17987         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
17988         (build_rtti_vtbl_entries): Reorganize machinery for building things
17989         at negative offsets.
17991         * optimize.c (expand_call_inline): Don't recurse into the code
17992         used to initialize the parameters more than once.
17994 2000-06-11  Mark Mitchell <mark@codesourcery.com>
17996         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
17997         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
17998         (find_substitution): Only use the `Sa' substitution for
17999         std::allocator, not instantiations of it.
18000         (write_template_prefix): Move comment.  Only use a TREE_LIST to
18001         represent substitutions for a member template.
18002         (write_array_type): Mangle array dimensions correctly.
18003         * optimize.c (maybe_clone_body): Copy more information from the
18004         cloned function.
18005         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
18006         on the regenerated declaration.
18008 2000-06-11  Chip Salzenberg  <chip@valinux.com>
18009             Mark Mitchell <mark@codesourcery.com>
18011         * class.c (build_vtable): Clarify comment.
18012         (build_ctor_vtbl_group): Pass the most derived type to
18013         build_vtable.
18015 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18017         * decl2.c (compare_options): Don't needlessly cast away const-ness.
18019 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
18021         * decl.c (add_binding): Handle duplicate declarations of external
18022         variables.
18024 2000-06-09  Chip Salzenberg  <chip@valinux.com>
18025             Mark Mitchell <mark@codesourcery.com>
18027         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
18028         argument.
18029         (write_signed_number): New macro.
18030         (write_unsigned_number): Likewise.
18031         (write_source_name): Use them.
18032         (write_number): Handle signed and unsigned values.
18033         (write_integer_cst): Use tree_int_cst_sgn, and use
18034         write_unsigned_number or write_signed_number as appropriate.
18035         (write_discriminator): Use write_unsigned_number or
18036         write_signed_number as appropriate.
18037         (write_template_arg_literal): Likewise.
18038         (write_array_type): Use tree_low_cst.
18039         (write_template_parm):  Use write_unsigned_number or
18040         write_signed_number as appropriate.
18041         (write_substitution): Adjust call to write_number.
18042         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
18043         (write_expression): Handle non-type template arguments of
18044         reference type correctly.
18045         (mangle_thunk): Use write_signed_number.
18047 2000-06-09  Chip Salzenberg  <chip@valinux.com>
18049         * mangle.c (find_substition): Don't mangle objects with typename
18050         substitutions (e.g. "cin" as "Si").
18052 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
18054         * call.c (add_candidate): Use ggc_alloc_cleared.
18055         * decl.c (lookup_label): Likewise.
18056         * lex.c (retrofit_lang_decl): Likewise.
18058 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
18060         * semantics.c (expand_body): Push to TV_EXPAND.
18061         * optimize.c (optimize_function): Push to TV_INTEGRATION.
18062         * decl.c (start_function): Always call announce_function.
18064         * tinfo2.cc: Just declare abort.
18066 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
18068         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
18069         whenever @ is a symbolic name.
18071 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
18073         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
18075 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
18077         * decl.c (pushdecl): Look up functions by DECL_NAME, not
18078         DECL_ASSEMBLER_NAME.
18080 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
18082         * decl2.c (c_language): Define.
18084 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
18086         * lex.c (lang_init_options): Tweak.
18088         * decl2.c: Remove #inclusion of diagnostic.h
18089         (lang_decode_option): Move diagnostic formatting options to
18090         toplevel.
18092         * lang-options.h: Remove documentation for diagnostic options.
18094         * Makefile.in (lex.o): Depends upon diagnostic.h
18096 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
18098         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
18099         the same DECL_RESULT, it's not a redefinition.
18100         * pt.c (tsubst_decl): Remove code to handle illegal
18101         specializations.
18103 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
18105         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
18107 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
18109         * search.c (maybe_suppress_debug_info): Don't check
18110         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
18112         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
18113         here if extern_p.
18115         Remember instantiation context in deferred instantiations.
18116         * cp-tree.h (struct tinst_level): Remove.
18117         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
18118         * pt.c (current_tinst_level): Now a tree.
18119         (print_template_context, push_tinst_level, pop_tinst_level,
18120         tinst_for_decl): Adjust.
18121         (reopen_tinst_level): New fn.
18122         (init_pt): Register current_tinst_level as a root.
18123         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
18124         of the pending templates list.
18125         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
18126         * lex.c (extract_interface_info): Adjust.
18127         * decl2.c (warn_if_unknown_interface): Adjust.
18129 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
18131         * class.c (indirect_primary_base_p): New function.
18132         (determine_primary_base): Use it.
18134 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
18136         Update new-abi dynamic cast algorithm.
18137         * tinfo.cc (__class_type_info::__dyncast_result): Add
18138         whole_details. Adjust constructor.
18139         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
18140         Avoid unnecessary searching.
18141         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
18143 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18145         * decl.c (init_decl_processing): Don't call record_component_aliases.
18146         * tree.c (build_cplus_array_type_1): Likewise.
18148 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
18150         * ir.texi: Correct typo.
18151         * mangle.c (write_expression): Handle non-type template arguments
18152         with reference type.
18153         * method.c (build_overload_value): Likewise.
18154         * pt.c (convert_nontype_argument): Explicitly represent conversion
18155         to a reference with an ADDR_EXPR.
18156         (unify): Always unify arguments in left-to-right order.
18158 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
18159             Mark Mitchell  <mark@codesourcery.com>
18161         * Make-lang.in (CXX_SRCS): Add mangle.c.
18162         * Makefile.in (CXX_OBJS): Add mangle.o.
18163         (mangle.o): New rule.
18165         * class.c (local_classes): New variable.
18166         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
18167         (get_vtt_name): Use mangle_vtt_name for new ABI.
18168         (init_class_processing): Initialize local_classes.
18169         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
18170         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
18171         (std_identifier): New macro.
18172         (DECL_VOLATILE_MEMFUNC_P): New macro.
18173         (DECL_NAMESPACE_STD_P): Likewise.
18174         (local_classes): Declare.
18175         (get_mostly_instantiated_function_type): Declare.
18176         (init_mangle): Declare.
18177         (mangle_decl): Likewise.
18178         (mangle_type_string): Likewise.
18179         (mangle_type): Likewise.
18180         (mangle_typeinfo_for_type): Likewise.
18181         (mangle_typeinfo_string_for_type): Likewise.
18182         (mangle_vtbl_for_type): Likewise.
18183         (mangle_vtt_for_type): Likewise.
18184         (mangle_ctor_vtbl_for_type): Likewise.
18185         (mangle_thunk): Likewise.
18186         (mangle_conv_op_name_for_type): Likewise.
18187         (mangle_guard_variable): Likewise.
18188         * decl.c (pushtag): Keep track of local classes.
18189         (initialize_predefined_identifiers): Initialize std_identifier.
18190         (init_decl_processing): Use std_identifier.
18191         (start_decl): Don't treat instantiations as specializations.
18192         (grokdeclarator): Likewise.
18193         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
18194         name for fully-instantiated templates.
18195         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
18196         destructors with the new ABI.
18197         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
18198         (grokfield): Use mangle_type for new ABI.
18199         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
18200         (get_sentry): Use mangle_guard_variable for new ABI.
18201         (start_static_initialization_or_destruction): Likewise.
18202         * expr.c (extract_aggr_init): Remove.
18203         (extract_scalar_init): Likewise.
18204         (extract_init): Remove #if 0'd code.
18205         * mangle.c: New function.
18206         * method.c (build_mangled_name): Assert not flag_new_abi.
18207         (build_static_name): Likewise.
18208         (build_decl_overload_real): Likewise.
18209         (build_typename_overload): Likewise.
18210         (build_overload_with_type): Likewise.
18211         (build_overload_name): Likewise.
18212         (get_ctor_vtbl_name): Likewise.
18213         (start_squangling): Likewise.
18214         (get_id_2): Likewise.
18215         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
18216         (init_method): Call init_mangle for new ABI.
18217         (make_thunk): Call mangle_thunk for new ABI.
18218         * operators.def: Correct new ABI manglings for the `%' operator.
18219         Add `::' operator.
18220         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
18221         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
18222         (lookup_template_class): Call mangle_decl for new ABI.
18223         (get_mostly_instantiated_function_type): New function.
18224         (set_mangled_name_for_template_decl): Use it.
18225         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
18226         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
18227         conversion op names.
18228         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
18229         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
18230         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
18231         mangle_typeinfo_string_for_type.
18233 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
18235         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
18236         (INNERMOST_TEMPLATE_ARGS): New macro.
18237         (innermost_args): Remove.
18238         (get_innermost_template_args): New function.
18239         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
18240         * error.c (dump_function_decl): Be caution when using
18241         most_general_template.
18242         * method.c (build_template_parm_names):  Use
18243         INNERMOST_TEMPLATE_ARGS.
18244         * pt.c (add_to_template_args): Tidy comment
18245         (get_innermost_template_args): New function.
18246         (check_explicit_specialization): Clear DECL_INITIAL for a new
18247         specialization.
18248         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
18249         Tidy.
18250         (push_template_decl): Always register specializations of the most
18251         general template.
18252         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
18253         (coerce_template_parms): Likewise.
18254         (lookup_template_class): Likewise.
18255         (innermost_args): Remove.
18256         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
18257         (tsubst_decl): Handle tricky specializations.  Use
18258         get_innermost_template_args.
18259         (instantiate_template): Simplify handling of partial
18260         instantiations.
18261         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
18262         (most_general_template): Reimplement, in a more straightforward
18263         manner.
18264         (regenerate_decl_from_template): Tweak formatting.  Use
18265         TMPL_ARGS_DEPTH for clarity.
18266         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
18268         * dump.c (dequeue_and_dump): Dump information about thunks.
18270 2000-06-01  Richard Henderson  <rth@cygnus.com>
18272         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
18274 2000-06-01  Richard Henderson  <rth@cygnus.com>
18276         * decl2.c (unsupported_options): Fix typo, make const.
18277         (lang_decode_option): Fix bsearch argument order.
18279 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
18281         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
18282         on FIELD_DECLs.
18284 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18286         * cp-tree.h (c_get_alias_set): Deleted.
18287         * Makefile.in (decl.o): Include ../expr.h.
18288         * decl.c (expr.h): Include.
18289         (init_decl_processing): Call record_component_aliases for arrays.
18290         (grokdeclarator): Likewise.
18291         Set TREE_ADDRESSABLE for fields that aren't bitfields.
18292         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
18294 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
18296         Remove guiding declaration support.
18297         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
18298         (flag_guiding_decls): Remove.
18299         * call.c (build_user_type_conversion_1): Remove support for
18300         guiding decls.
18301         (build_new_function_call): Likewise.
18302         (build_new_op): Likewise.
18303         (build_new_method_call): Likewise.
18304         * decl.c (start_function): Likewise.
18305         * friend.c (is_friend): Likewise.
18306         (do_friend): Likewise.
18307         * decl2.c ((flag_dump_translation_unit): Make it const.
18308         (flag_guiding_decls): Remove.
18309         (unsupported_options): New variable
18310         (compare_options): New function.
18311         (lang_decode_option): Use them.
18313         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
18315         * method.c (mangle_expression): Adjust test for legal expression
18316         operators.
18318         * pt.c (instantiate_decl): Save and restore the local
18319         specializations list.
18321 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
18323         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
18325 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
18327         * call.c (add_template_candidate_real): Handle member template
18328         constructors for classes with virtual bases.
18329         (build_user_type_conversion_1): Use in_charge_arg_for_name.
18330         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
18332         * ir.texi: Update thunk documentation.
18334         * call.c (joust): Fix handling of overloaded builtin operators.
18336 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
18338         * cp-tree.h (DECL_ANTICIPATED): New macro.
18339         Document new use of DECL_LANG_FLAG_7.
18340         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
18341         in the user namespace.
18342         * lex.c (do_identifier): If the identifier's declaration has
18343         DECL_ANTICIPATED on, it has not yet been declared.  But do not
18344         replace it with an ordinary implicit declaration.
18346         * tinfo2.cc: Include stdlib.h.
18348 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
18350         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
18351         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
18352         CLASSTYPE_ALIGN.
18354 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
18356         * decl2.c (lang_decode_option): Use skip_leading_substring instead
18357         of plain strncmp.
18359 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
18361         * operators.def (<?): Duplicated, should have been...
18362         (>?): this.  Fixed.
18364 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
18365             Mark Mitchell  <mark@codesourcery.com>
18367         * cp-tree.h (ansi_opname): Make it a macro.
18368         (ansi_assopname): Likewise.
18369         (struct lang_decl_flags): Add assignment_operator_p.
18370         (struct lang_decl): Add operator_code.
18371         (DECL_VTT_PARM): Adjust.
18372         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
18373         overloaded operator.
18374         (SET_OVERLOADED_OPERATOR_CODE): New macro.
18375         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
18376         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
18377         (opname_tab): Remove.
18378         (assignop_tab): Likewise.
18379         (operator_name_info_t): New type.
18380         (operator_name_info): New variable.
18381         (assignment_operator_name_info): Likewise.
18382         (build_cp_library_fn): Remove declaration.
18383         (push_cp_library_fn): Likewise.
18384         (operator_name_string): Likewise.
18385         (build_decl_overload): Likewise.
18386         * call.c (print_z_candidates): Simplify.
18387         (build_object_call): Adjust usage of ansi_opname.  Use
18388         DECL_OVERLOADED_OPERATOR_P.
18389         (op_error): Adjust operator name lookup.
18390         (build_conditional_expr): Adjust usage of ansi_opname.
18391         (build_new_op): Likewise.
18392         (build_op_delete_call): Likewise.
18393         (build_over_call): Likewise.
18394         (joust): Use DECL_OVERLOADED_OPERATOR_P.
18395         * decl.c (duplicate_decls): Copy operator_code.
18396         (init_decl_processing): Adjust parameters to push_cp_library_fn.
18397         (builtin_function): Adjust parameters to build_library_fn_1.
18398         (build_library_fn_1): Accept an overloaded operator code.
18399         (build_library_fn): Pass ERROR_MARK.
18400         (build_cp_library_fn): Accept an overloaded operator code.
18401         (push_cp_library_fn): Likewise.
18402         (grokfndecl): Tweak.
18403         (grokdeclarator): Simplify code to compute names of overloaded
18404         operators.  Adjust use of ansi_opname.
18405         (ambi_op_p): Work on tree_codes, not identifiers.
18406         (unary_op_p): Likewise.
18407         (grok_op_properties): Likewise.
18408         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
18409         (lang_mark_tree): Don't try to mark the operator_code.
18410         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
18411         * error.c (dump_decl): Remove special handling for operator
18412         names.
18413         (dump_function_name): Likewise.
18414         (dump_expr): Adjust name lookup of operators.
18415         (op_to_string): Simplify.
18416         (assop_to_string): Likewise.
18417         * init.c (build_new_1): Adjust use of ansi_opname.
18418         * lex.c (opname_tab): Remove.
18419         (assignop_tab): Likewise.
18420         (ansi_opname): Likewise.
18421         (ansi_assopname): Likewise.
18422         (operator_name_string): Likewise.
18423         (reinit_lang_specific): Likewise.
18424         (operator_name_info): New variable.
18425         (assignment_operator_name_info): Likewise.
18426         (init_operators): New function.
18427         (init_parse): Use it.
18428         (do_identifier): Adjust use of ansi_opname.
18429         * method.c (mangle_expression): Don't use ansi_opname for
18430         mangling.
18431         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
18432         (build_decl_overload): Remove.
18433         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
18434         (do_build_assign_ref): Adjust use of ansi_opname.
18435         (synthesize_method): Likewise.
18436         (implicitly_declare_fn): Likewise.
18437         * operators.def: New file.
18438         * parse.y (operator): Adjust use of ansi_opname.
18439         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
18440         (set_mangled_name_for_template_decl): Don't play games with
18441         current_namespace.
18442         (special_function_p): Adjust use of ansi_opname.
18443         * typeck.c (check_return_expr): Likewise.
18444         * Make-lang.in (cc1plus): Depend on operators.def.
18445         * Makefile.in (lex.o): Likewise.
18446         (decl.o): Likewise.
18448 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
18450         * Make-lang.in (cplib2.ready): Eradicate.
18452 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18454         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
18455         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
18456         (built_min, cp_tree_equal): Likewise.
18458 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18460         * class.c (layout_nonempty_base_or_field): Replace
18461         `record_layout_info' with `record_layout_info_s'.
18463 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
18465         Fix goto checking.
18466         * cp-tree.h (struct language_function): x_named_labels is now
18467         a struct named_label_list*.
18468         * decl.c (struct named_label_use_list): Renamed from...
18469         (struct named_label_list): ...this.  New struct.
18470         (push_binding_level): Don't set eh_region.
18471         (note_level_for_eh): New fn.
18472         (pop_label): Take label and old value directly.
18473         (pop_labels): Adjust for new named_labels format.
18474         (lookup_label): Likewise.
18475         (poplevel): Note characteristics of a binding level containing a
18476         named label.  Mess with named label lists earlier.
18477         (mark_named_label_lists): New fn.
18478         (mark_lang_function): Call it.
18479         (use_label): New fn, split out from...
18480         (make_label_decl): ...here.  Don't call it.
18481         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
18482         check_previous_gotos): New fns, split out from...
18483         (define_label): ...here.
18484         (check_switch_goto): New fn.
18485         (define_case_label): Call it.
18486         (check_goto): New fn.
18487         * semantics.c (finish_goto_stmt): Call it and use_label.
18488         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
18489         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
18491 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
18493         * class.c (build_vtable_entry_ref): Correct usage of
18494         get_vtbl_decl_for_binfo.
18496         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
18497         * method.c (implicitly_declare_fn): Not here.
18499 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
18501         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
18502         (CPTI_PTMD_DESC_TYPE): ... here.
18503         (ptmd_desc_type_node): Rename to ...
18504         (ptm_desc_type_node): ... here.
18505         * decl.c: Likewise.
18506         * rtti.c (ptmd_initializer): Rename to ...
18507         (ptm_initializer): ... here.
18508         (sythesize_tinfo_var): Adjust. Deal with pointer to member
18509         function.
18510         (create_tinfo_types): Adjust.
18512 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
18514         Finish implementation of VTTs.
18515         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
18516         CPTI_VTT_PARM_IDENTIFIER.
18517         (vtt_parm_identifier): New macro.
18518         (vtt_parm_type): Likewise.
18519         (BINFO_SUBVTT_INDEX): Likewise.
18520         (BINFO_VPTR_INDEX): Likewise.
18521         (struct lang_decl): Add vtt_parm.
18522         (DECL_VTT_PARM): New macro.
18523         (DECL_USE_VTT_PARM): Likewise.
18524         (DECL_NEEDS_VTT_PARM_P): Likewise.
18525         (get_vtt_name): Declare.
18526         (build_artificial_parm): Likewise.
18527         (fixup_all_virtual_upcast_offsets): Likewise.
18528         (expand_indirect_vtbls_init): Remove.
18529         * call.c (build_new_method_call): Pass the vtt to subobject
18530         constructors and destructors.
18531         * class.c (get_vtt_name): Give it external linkage.
18532         (build_clone): Handle the magic VTT parameters for clones.
18533         (clone_function_decl): Fix typo in comment.
18534         (build_vtt): Keep track of the indices in the VTTs where various
18535         entities are stored.
18536         (build_vtt_inits): Likewise.
18537         (dfs_build_vtt_inits): Likewise.
18538         (build_ctor_vtbl_group): Tweak type of construction vtables.
18539         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
18540         primary bases, when building construction vtables.
18541         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
18542         (initialize_predefined_identifiers): Add vtt_parm_identifier.
18543         (init_decl_processing): Initialize vtt_parm_type.
18544         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
18545         (lang_mark_tree): Make vtt_parm.
18546         * decl2.c (build_artificial_parm): New function.
18547         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
18548         (grokclassfn): Use build_artificial_parm.
18549         * init.c (initialize_vtbl_ptrs): Call
18550         fixup_all_virtual_upcast_offsets directly.
18551         (perform_member_init): Use the complete subobject destructor for
18552         member cleanups.
18553         (build_vtbl_address): New function.
18554         (expand_virtual_init): Handle VTTs.
18555         * optimize (maybe_clone_body): Likewise.
18556         * search.c (fixup_all_virtual_upcast_offsets): Give it external
18557         linkage.
18558         (expand_indirect_vtbls_init): Remove.
18559         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
18560         * tree.c (make_binfo): Make them bigger.
18562 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18564         * inc/cxxabi.h (__pbase_type_info): Define, based on
18565         __pointer_type_info.
18566         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
18567         (__pointer_to_member_type_info): Likewise.
18568         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
18569         (__pointer_to_member_type_info::__is_pointer_p): Remove.
18570         (__pointer_type_info::__do_catch): Rename to ...
18571         (__pbase_type_info::__do_catch): ... here. Adjust.
18572         (__pbase_type_info::__pointer_catch): Implement.
18573         (__pointer_type_info::__pointer_catch): Adjust.
18574         (__pointer_to_member_type_info::__pointer_catch): Adjust.
18576 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
18578         * tinfo.h (__user_type_info::contained_virtual_p): New
18579         predicate.
18580         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
18581         shaped hierarchy.
18582         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
18583         diamond shaped hierarchy. Add early out for mixed diamond and
18584         duplicate shaped hierarchy.
18586 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
18588         * cp-tree.h (build_delete): Change prototype.
18589         (build_vec_delete): Likewise.
18590         * call.c (build_scoped_method_call): Use special_function_kind
18591         values to indicate the kind of destruction to be done.
18592         (build_method_call): Likewise.
18593         * decl.c (finish_destructor_body): Likewise.
18594         (maybe_build_cleanup_1): Likewise.  Rename to ...
18595         (maybe_build_cleanup): ... this.
18596         * decl2.c (delete_sanity): Use special_function_kind
18597         values to indicate the kind of destruction to be done.
18598         (build_cleanup): Likewise.
18599         * init.c (perform_member_init): Likewise.
18600         (build_vec_delete_1): Likewise.
18601         (build_dtor_call): Simplify.
18602         (build_delete): Use special_function_kind
18603         values to indicate the kind of destruction to be done.
18604         (build_vbase_delete): Likewise.
18605         (build_vec_delete): Likewise.
18607         * init.c (sort_member_init): Fix typo in error message generation
18608         code.
18610 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
18612         * semantics.c (begin_class_definition): make the packed
18613         attribute be sensitive to the "-fpack-struct" command line flag
18615 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
18617         Update new-abi upcast algorithm.
18618         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
18619         prototype and meaning of return value.
18620         (__si_class_type_info::__do_upcast): Likewise.
18621         (__vmi_class_type_info::__do_upcast): Likewise.
18622         * tinfo.cc (__class_type_info::__upcast_result): Replace
18623         whole2dst with part2dst. Adjust ctor.
18624         (__class_type_info::__do_upcast): Adjust call of worker function.
18625         (__class_type_info::__do_upcast): Adjust.
18626         (__si_class_type_info::__do_upcast): Adjust. Use parent's
18627         __do_upcast.
18628         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
18629         virtual base in diamond hierarchy bug.
18631 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
18633         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
18634         and bitfield to tinfo_fn_p.
18635         (DECL_TINFO_FN_P): Adjust.
18636         (SET_DECL_TINFO_FN_P): Likewise.
18637         (DECL_MUTABLE_P): Likewise.
18638         (DECL_C_BIT_FIELD): Likewise.
18639         (SET_DECL_C_BIT_FIELD): Likewise.
18640         (CLEAR_DECL_C_BIT_FIELD): Likewise.
18641         (DECL_UNINLINABLE): Likewise.
18642         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
18643         (handle_using_decl): Remove assertion.
18644         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
18645         to build FIELD_DECLs.
18646         (build_base_field): Likewise.
18647         (layout_class_type): Likewise.
18648         * decl.c (init_decl_processing): Likewise.
18649         (build_ptrmemfunc_type): Likewise.
18650         (grokdeclarator): Likewise.
18651         * decl2.c (grok_x_components): Likewise.
18652         * except.c (call_eh_info): Likewise.
18653         * init.c (init_init_processing): Likewise.
18654         * rtti.c (expand_class_desc): Likewise.
18655         (create_pseudo_type_info): Likewise.
18656         (get_vmi_pseudo_type_info): Likewise.
18657         (create_tinfo_types): Likewise.
18658         * ptree.c (print_lang_decl): Adjust.
18659         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
18660         before checking DECL_MUTABLE_P.
18662         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
18663         parameters for template functions.
18664         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
18665         destructors as well as constructors.
18667 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
18669         * class.c (build_ctor_vtbl_group): Set inits.
18670         * optimize.c (maybe_clone_body): Set DECL_INLINE and
18671         DECL_THIS_INLINE appropriately for clones.
18673         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
18674         (DECL_CONV_FN_P): Simplify.
18675         (DECL_OPERATOR): Remove.
18676         (language_to_string): Declare.
18677         * decl.c (duplicate_decls): Fix typo in comment.
18678         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
18679         (grok_op_properties): Use DECL_CONV_FN_P instead of
18680         IDENTIFIER_TYPENAME_P.
18681         * dump.c (dequeue_and_dump): Dump the language linkage of
18682         declarations.
18683         * error.c (language_to_string): Give it external linkage.
18684         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
18685         (implicitly_declare_fn): Set DECL_LANGUAGE.
18686         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
18687         IDENTIFIER_TYPENAME_P.
18688         (tsubst_decl): Likewise.
18689         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
18690         * semantics.c (finish_member_declaration): Don't mark members of
18691         classes declared in an extern "C" region as extern "C".
18693 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18695         * decl2.c (qualified_lookup_using_namespace): Look through
18696         namespace aliases.
18698         * decl.c (push_using_decl): Return the old decl on namespace level.
18700 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
18702         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
18703         (VTT_NAME_PREFIX): New macro.
18704         (CTOR_VTBL_NAME_PREFIX): Likewise.
18705         (get_ctor_vtbl_name): New function.
18706         * class.c (get_vtable_name): Simplify.
18707         (get_vtt_name): New function.
18708         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
18709         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
18710         when a virtual base becomes primary.
18711         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
18712         VTTs.
18713         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
18714         additional parameters.
18715         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
18716         (initialize_array): New function.
18717         (build_vtt): Likewise.
18718         (build_vtt_inits): Likewise.
18719         (dfs_build_vtt_inits): Likewise.
18720         (dfs_fixup_binfo_vtbls): Likewise.
18721         (build_ctor_vtbl_group): Likewise.
18722         (initialize_vtable): Use initialize_array.
18723         (accumulate_vtbl_inits): Reimplement to handle construction
18724         vtables.
18725         (dfs_accumulate_vtbl_inits): Likewise.
18726         (bulid_vtbl_initializer): Adjust parameter name.
18727         * method.c (build_typename_overload): Remove #if 0'd code.
18728         (get_ctor_vtbl_name): New function.
18729         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
18730         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
18732         * cp-tree.h (struct lang_type): Remove search_slot.
18733         (CLASSTYPE_SEARCH_SLOT): Remove.
18734         (emit_base_init): Change prototype.
18735         (initialize_vtbl_ptrs): Likewise.
18736         (expand_indirect_vtbls_init): Likewise.
18737         (clear_search_slots): Remove.
18738         * decl.c (lang_mark_tree): Don't mark search_slot.
18739         * init.c (initialize_vtbl_ptrs): Simplify.
18740         (emit_base_init): Likewise.
18741         * search.c (struct vbase_info): Document decl_ptr.
18742         (convert_pointer_to_single_level): Remove.
18743         (dfs_find_vbases): Remove.
18744         (dfs_init_base_pointers): Simplify.
18745         (dfs_clear_vbase_slots): Remove.
18746         (dfs_vtable_path_unmark): New function.
18747         (init_vbase_pointers): Simplify.
18748         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
18749         (expand_indirect_vtbls_init): Simplify.  Don't call
18750         mark_all_temps_used.
18751         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
18752         initialize_vtbl_ptrs.
18754 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
18756         * except.c: Add static prototypes.
18758 2000-05-20  H.J. Lu  <hjl@gnu.org>
18760         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
18762 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
18764         Don't create a separate copy of virtual bases for the
18765         CLASSTYPE_VBASECLASSES list.
18766         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
18767         (BINFO_FOR_VBASE): Remove.
18768         (CANONICAL_BINFO): Adjust.
18769         (binfo_for_vbase): New function.
18770         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18771         instead of BINFO_FOR_VBASE.
18772         (build_vbase_pointer): Likewise.
18773         (build_secondary_vtable): Likewise.
18774         (dfs_mark_primary_bases): Likewise.
18775         (mark_primary_bases): Likewise.
18776         (layout_nonempty_base_or_field): Likewise.
18777         (dfs_set_offset_for_shared_vbases): Likewise.
18778         (dfs_set_offset_for_unshared_vbases): Likewise.
18779         (layout_virtual_bases): Likewise.  Adjust for changes to the
18780         CLASSTYPE_VBASECLASSES list.
18781         (dump_class_hierarchy_r): Use binfo_for_vbase
18782         instead of BINFO_FOR_VBASE.
18783         (dump_class_hierarchy): Likewise.
18784         (finish_vtbls): Likewise.
18785         (build_vtbl_initializer): Adjust for changes to the
18786         CLASSTYPE_VBASECLASSES list.
18787         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
18788         * decl.c (finish_destructor_body): Adjust for changes to the
18789         CLASSTYPE_VBASECLASSES list.
18790         * init.c (sort_base_init): Use binfo_for_vbase.
18791         (construct_virtual_bases): Adjust for changes to the
18792         CLASSTYPE_VBASECLASSES list.
18793         (expand_member_init): Use binfo_for_vbase.
18794         (build_vbase_delete):  Adjust for changes to the
18795         CLASSTYPE_VBASECLASSES list.
18796         * method.c (do_build_copy_constructor): Likewise.
18797         * rtti.c (get_base_offset): Use binfo_for_vbase.
18798         (expand_class_desc): Remove #if 0'd code.
18799         * search.c (struct vbase_info): Remove vbase_types.
18800         (get_base_distance):  Use binfo_for_vbase.
18801         (lookup_field_queue_p): Use CANONICAL_BINFO.
18802         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
18803         (get_pure_virtuals): Adjust for changes to the
18804         CLASSTYPE_VBASECLASSES list.
18805         (dfs_find_vbases): Use binfo_for_vbase.
18806         (dfs_init_vbase_pointers): Likewise.
18807         (init_vbase_pointers): Don't initialize vi.vbase_types.
18808         (virtual_context): Use binfo_for_vbase.
18809         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
18810         CLASSTYPE_VBASECLASSES list.
18811         (expand_indirect_vtbls_init): Simplify.
18812         (dfs_get_vbase_types): Don't replicate virtual bases.
18813         (find_vbase_instance): Use binfo_for_vbase.
18814         (binfo_for_vbase): New function.
18815         * typeck.c (get_delta_difference): Use binfo_for_vbase.
18817 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
18819         * decl2.c (finish_anon_union): Generalize error messages to handle
18820         anonymous structures.
18821         * init.c (perform_member_init): Remove `name' parameter.
18822         (build_field_list): New function.
18823         (sort_member_init): Handle anonymous union initialization order
18824         correctly.  Check for multiple initializations of the same union.
18825         (emit_base_init): Don't look up fields by name here.
18826         (expand_member_init): Record the result of name lookup for future
18827         reference.
18828         * typeck.c (build_component_ref): Fix formatting.
18830 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
18832         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
18833         * typeck.c (build_x_compound_expr): Replace warn_unused with
18834         warn_unused_value.
18836         * decl2.c (lang_decode_option): Update -Wall unused flags by
18837         calling set_Wunused.
18839 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
18841         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
18842         * init.c (dfs_vtable_path_unmark): Remove.
18843         * search.c (marked_new_vtable_p): Likewise.
18844         (unmarked_new_vtable_p): Likewise.
18845         (dfs_search_slot_nonempty_p): Likewise.
18846         (dfs_mark): Likewise.
18847         (dfs_vtable_path_unmark): Likewise.
18848         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
18849         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
18850         (dfs_init_vbase_pointers): Remove special-case new ABI code.
18851         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
18852         (init_vbase_pointers): Simplify.
18853         (expand_indirect_vtbls_init): Likewise.
18855         * class.c (copy_virtuals): New function.
18856         (build_primary_table): Use it.
18857         (build_secondary_vtable): Likewise.
18858         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
18859         indicate that no vcall offset is required.
18860         (add_virtual_function): Likewise.
18861         (modify_all_vtables): Likewise.
18862         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18863         (dfs_accumulate_vtbl_inits): Likewise.
18864         (build_vtbl_initializer): Make changes to handle construction
18865         vtables.
18866         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18867         (build_rtti_vtbl_entries): Likewise.
18868         (build_vtable_entries): Handle a NULL vcall_index.
18870 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
18872         * decl2.c (lang_decode_option): Fix thinko.
18874 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
18876         * except.c (check_handlers): New fn.
18877         * cp-tree.h: Declare it.
18878         * semantics.c (finish_handler_sequence): Call it.
18879         (finish_function_handler_sequence): Likewise.
18880         (finish_handler_parms): Set TREE_TYPE on the handler.
18881         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
18882         * search.c (get_base_distance_recursive): If protect>1, ignore
18883         special access.
18884         (get_base_distance): Don't reduce watch_access.
18886 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
18888         * lex.c: #include diagnostic.h.
18889         (lang_init_options): Set default prefixing rules.
18891         * lang-options.h: Add -fdiagnostics-show-location=.
18893         * decl2.c: #include diagnostic.h.
18894         (lang_decode_option): Handle -fdiagnostics-show-location=.
18896 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
18898         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
18899         * vec.cc: Revert my 2000-05-07 change.
18901 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
18903         * class.c (check_field_decls): Complain about non-static data
18904         members with same name as class in class with constructor.
18906 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
18908         * decl.c (grokdeclarator): Allow non-static data members with
18909         same name as class.
18911 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
18913         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
18914         and pending_inline.filename.  Update prototypes.
18915         * decl.c (define_label): Constify filename parameter.
18916         * decl2.c (warn_if_unknown_interface): Constify local char *.
18917         * input.c Constify input_source.filename. Don't declare
18918         input_filename or lineno.  Constify filename parameter to feed_input.
18919         * lex.c (init_parse): Constify parameter and return value.
18920         (cp_pragma_interface, cp_pragma_implementation): Constify
18921         filename argument.
18922         (reinit_parse_for_method, reinit_parse_for_block,
18923         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
18924         Constify local char *.
18925         * pt.c: Don't declare lineno or input_filename.
18926         (print_template_context, tsubst_friend_function, tsubst_decl,
18927         tsubst, instantiate_decl): Constify local char *.
18928         * semantics.c (expand_body): Constify local char *.
18929         * tree.c (build_srcloc): Constify filename parameter.
18930         * typeck.c (c_expand_asm_operands): Constify filename
18931         parameter.
18933 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
18935         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
18936         offsetof expansion.
18938 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
18940         * inc/cxxabi.h:  Fix typos in comment.
18941         (__base_class_info::__offset): Use a static_cast.
18943 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
18945         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
18946         of std::size_t and std::ptrdiff_t respectively.
18947         * tinfo.cc: Likewise.
18948         * vec.cc: Likewise.
18950 2000-05-06  Richard Henderson  <rth@cygnus.com>
18952         * typeck.c (build_c_cast): Don't warn integer->pointer size
18953         mismatch for constants.
18955 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
18957         * rtti.c (ptmd_initializer): Set non-public, if class is
18958         incomplete.
18960         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
18961         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18962         __cxa_vec_delete): Likewise.
18963         * tinfo.cc (__dynamic_cast): Likewise.
18964         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18965         __cxa_vec_delete): Likewise.
18967 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18969         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
18970         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
18971         (lang_decl_flags): Add vcall_offset.
18972         (THUNK_VCALL_OFFSET): Use it.
18973         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
18974         * method.c (make_thunk): Create the lang_decl here, not in
18975         emit_thunk.
18976         (emit_thunk): Make generic thunks into ordinary functions once
18977         they have been fed to expand_body.
18978         * semantics.c (expand_body): Set current_function_is_thunk here.
18980 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18982         * class.c (update_vtable_entry_for_fn): Prototype.
18984         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
18985         and `tmpl'.
18987         * search.c (dfs_build_inheritance_graph_order): Prototype.
18989 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
18991         * cp-tree.h (special_function_kind): Add various kinds of
18992         destructors.
18993         (special_function_p): New function.
18994         * class.c (overrides): Don't let one kind of destructor override
18995         another.
18996         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
18997         whether or not to instantiate a template.
18998         * tree.c (special_function_p): Define.
19000 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
19002         * cp-tree.def (THUNK_DECL): Remove.
19003         * cp-tree.h (DECL_THUNK_P): New macro.
19004         (DECL_NON_THUNK_FUNCTION_P): Likewise.
19005         (DECL_EXTERN_C_FUNCTION_P): Likewise.
19006         (SET_DECL_THUNK_P): Likewise.
19007         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
19008         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
19009         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
19010         * decl.c (decls_match): Use DECL_EXTERN_C_P.
19011         (duplicate_decls): Likewise.
19012         (pushdecl): Likewise.  Adjust thunk handling.
19013         (grokfndecl): Use DECL_EXTERN_C_P.
19014         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
19015         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
19016         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
19017         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
19018         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
19019         DECL_NO_STATIC_CHAIN.
19020         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
19021         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
19022         * search.c (covariant_return_p): Remove THUNK_DECL handling.
19023         * ir.texi: Update.
19025 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
19027         * tree.c (walk_tree): Set lineno.
19029 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
19031         * exception.cc: Update license notice.
19032         * new.cc: Likewise.
19033         * new1.cc: Likewise.
19034         * new2.cc: Likewise.
19035         * tinfo.cc: Likewise.
19036         * tinfo2.cc: Likewise.
19037         * vec.cc: Likewise.
19038         * inc/cxxabi.h: Likewise.
19039         * inc/exception: Likewise.
19040         * inc/new: Likewise.
19041         * inc/new.h: Likewise.
19042         * inc/typeinfo: Likewise.
19044 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
19046         * tree.c (build_target_expr_with_type): If we already have a
19047         TARGET_EXPR, just return it.
19049         * optimize.c (initialize_inlined_parameters): Don't generate an
19050         EXPR_STMT if we can just use DECL_INITIAL.
19051         * decl.c (emit_local_var): Only make the initialization a
19052         full-expression if stmts_are_full_exprs_p.
19054 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
19056         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
19057         macro.
19058         * call.c (standard_conversion): Use it.
19059         (direct_reference_binding): Likewise.
19060         (build_over_call): Likewise.
19061         (is_properly_derived_from): Likewise.
19062         (compare_ics): Likewise.
19063         * class.c (resolves_to_fixed_type_p): Likewise.
19064         * optimize.c (declare_return_variable): Likewise.
19065         * pt.c (is_specialization_of): Likewise.
19066         (unify): Likewise.
19067         * typeck.c (comp_target_parms): Likeiwse.
19068         (build_static_cast): Likewise.
19069         (build_reinterpret_cast): Likewise.
19070         (build_const_cast): Likewise.
19071         (comp_ptr_ttypes_real): Likewise.
19072         (comp_ptr_ttypes_const): Likewise.
19073         * typeck2.c (process_init_constructor): Likewise.
19075 2000-04-30  Scott Snyder <snyder@fnal.gov>
19077         * decl.c (finish_destructor_body): Use the base destructor when
19078         destroying virtual bases.
19080 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
19082         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
19083         STMT_EXPRs.
19084         * optimize.c (struct inline_data): Add target_exprs field.
19085         (declare_return_variable): When a function returns an aggregate,
19086         use the variable declared in the TARGET_EXPR as the remapped
19087         DECL_RESULT.
19088         (expand_call_inline): Update the pending target_exprs stack.
19089         (optimize_function): Initialize the stack.
19091         * decl2.c (finish_file): Fix typo in comment.
19093         * method.c (emit_thunk): Don't try to return a `void' value.
19095         * optimize.c (initialize_inlined_parameters): If the parameter is
19096         addressable, we need to make a new VAR_DECL, even if the
19097         initializer is constant.
19099 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
19101         * decl.c (grok_op_properties): Add an extra check of argtypes.
19103 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
19105         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
19106         variables.
19107         (initialize_inlined_parameters): Try to avoid creating new
19108         VAR_DECLs.
19110 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
19112         * lex.c (my_get_run_time): Remove.
19113         (init_filename_times): Use get_run_time instead of my_get_run_time.
19114         (check_newline): Likewise.
19115         (dump_time_statistics): Likewise.
19116         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
19117         of computing elapsed time explicitly.
19119 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
19121         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
19122         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
19123         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
19124         before calling decl_constant_value.
19125         * class.c (check_bitfield_decl): Likewise.
19126         * cvt.c (ocp_convert): Likewise.
19127         (convert): Likewise.
19128         * decl.c (compute_array_index_type): Likewise.
19129         (build_enumerator): Likewise.
19130         * decl2.c (check_cp_case_value): Likewise.
19131         * pt.c (convert_nontype_argument): Likewise.
19132         (tsubst): Likewise.
19133         * typeck.c (decay_conversion): Likewise.
19134         (build_compound_expr): Likewise.
19135         (build_reinterpret_cast): Likewise.
19136         (build_c_cast): Likewise.
19137         (convert_for_assignment): Likewise.
19139 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
19141         * decl.c (finish_function): Don't play games with DECL_INLINE.
19143 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
19145         * ir.texi: Correct typo.
19147 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19149         * decl.c (grokdeclarator): Reject VLAs as members.
19151 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
19153         * call.c (standard_conversion): Accept conversion between
19154         COMPLEX_TYPEs.
19156         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
19158 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
19160         * decl2.c (finish_file): Remove double setup for accounting
19161         compile time.
19163 2000-04-24  Robert Lipe <robertlipe@usa.net>
19165         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
19167 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
19169         * new.cc (set_new_handler): Needs to be in std::.
19171 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
19173         * cp-tree.h (lang_decl): Remove pretty_function_p.
19174         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
19175         language-specific node.
19176         * decl.c (cp_make_fname_decl): Use build_decl, not
19177         build_lang_decl, to build the variables.
19178         (grokvardecl): Don't call build_lang_decl for local variables in
19179         templates.
19180         (grokdeclarator): Don't call build_lang_decl for local type
19181         declarations in templates.
19182         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
19183         zero'd memory, rather than calling memset.
19184         * pt.c: Include hashtab.h.
19185         (local_specializations): New variable.
19186         (retrieve_local_specialization): Use it.
19187         (register_local_specialization): Likewise.
19188         (tsubst_decl): Don't assume local variables have
19189         DECL_LANG_SPECIFIC.
19190         (instantiate_decl): Set up local_specializations.
19191         * Makefile.in (HTAB_H): New variable.
19193 2000-04-23  Richard Henderson  <rth@cygnus.com>
19195         * typeck.c (c_expand_asm_operands): Restore the original
19196         contents of the output list.
19198 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
19200         * ir.texi:  Document complex number representation.
19202 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
19204         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
19205         (target_incomplete_p): New function.
19206         (tinfo_base_init): Create comdat NTBS name variable.
19207         (ptr_initializer): Add non_public parameter. Calculate it.
19208         (ptmd_initializer): Likewise.
19209         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
19210         (create_real_tinfo_var): Add non_public parameter. Use it.
19211         Push proxy into global namespace.
19212         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
19213         New enumeration.
19214         * inc/typeinfo (type_info::before, type_info::operator==):
19215         Compare __name addresses.
19217         * tinfo2.cc: Remove new-abi builtins comment.
19219 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
19221         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
19223         * call.c (joust): Exit early if we get the same function, too.
19225         * decl2.c (key_method): Return NULL_TREE for template classes.
19226         (import_export_class): Don't need to check for template classes.
19228 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
19230         * lex.c: Remove references to cccp.c.
19232 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
19234         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
19235         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
19236         (DECL_DESTRUCTOR_P): Use destructor_attr.
19237         (DECL_CONST_MEMFUNC_P): Reimplement.
19238         (DECL_VOLATILE_MEMFUNC_P): Remove.
19239         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
19240         (overrides): Use DECL_DESTRUCTOR_P.
19241         (check_for_override): Likewise.
19242         * decl.c (start_function): Likewise.
19243         * decl2.c (grokfclassfn): Likewise.
19244         (check_classfn): Likewise.
19245         (grok_function_init): Likewise.
19247 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
19249         * decl2.c (grokfield): Issue error on illegal data member
19250         declaration.
19252 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
19254         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
19256 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
19258         * class.c (build_vtable_entry): Don't build thunks for type-info
19259         functions.
19261 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
19263         * decl.c (decls_match): Allow a redeclaration of a builtin to
19264         specify args while the builtin did not.
19266 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
19268         * cp-tree.def (THUNK_DECL): Add to documentation.
19269         * cp-tree.h (flag_huge_objects): Declare.
19270         * class.c (modify_vtable_entry): Tidy.
19271         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
19272         Calculate delta appropriately for the new ABI.
19273         (dfs_modify_vtables): Use it.
19274         (modify_all_vtables): Fix thinko in code to add overriding copies
19275         of functions to primary vtables.
19276         (build_clone): Fix typo in comment.
19277         (clone_function_decl): Correct order of destructors in vtable.
19278         (build_vbase_offset_vtbl_entries): Adjust comment.
19279         (dfs_vcall_offset_queue_p): Remove.
19280         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
19281         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
19282         (build_vtable_entry): Correct check for pure virtual functions.
19283         Don't declare flag_huge_objects.
19284         * decl.c (flag_huge_objects): Remove declaration.
19285         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
19286         Use int_size_in_bytes.
19287         (emit_thunk): Handle vcall offset thunks.
19289 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19291         * decl2.c (parse_time, varconst_time): Delete declarations.
19292         (finish_file): Delete LINENO declaration.
19293         START_TIME and THIS_TIME now long.
19295 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
19297         * class.c (build_base_field): Reformat comment.
19299         * inc/cxxabi.h (stddef.h): Comment inclusion.
19300         (__base_class_info::__offset): Comment shift.
19302 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
19304         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
19305         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
19306         (cp_push_exception_identifier): New macro.
19307         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
19308         (DECL_BASE_DESTRUCTOR_P): Likewise.
19309         (DECL_DELETING_DESTRUCTOR_P): Likewise.
19310         (get_vtbl_decl_for_binfo): Fix formatting.
19311         (in_charge_arg_for_name): New macro.
19312         (maybe_build_cleanup_and_delete): Remove declaration.
19313         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
19314         (in_charge_arg_for_name): New function.
19315         (build_new_method_call): Use it.  Handle cloned destructors.
19316         (build_clone): Don't make the base constructor virtual.
19317         Automatically defer generated functions.
19318         (clone_function_decl): Handle destructors, too.
19319         (clone_constructors_and_destructors): Likewise.
19320         (create_vtable_ptr): Don't create a vtable entry for a cloned
19321         function.
19322         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
19323         (initialize_predefined_identifiers): Update appropriately.
19324         (finish_destructor_body): Simplify.
19325         (maybe_build_cleanup_and_delete): Remove.
19326         * except.c (expand_throw): Handle new-ABI destructors.
19327         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
19328         (build_dtor_call): New function.
19329         (build_delete): Use it.  Simplify.
19330         * optimize.c (maybe_clone_body): Handle destructors.
19331         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
19333         * exception.cc (cleanup_fn): New typedef.
19334         (CALL_CLEANUP): New macro.
19335         (cp_eh_info): Use them.
19336         (__cp_push_exception): Likewise.
19337         (__cp_pop_exception): Likewise.
19339 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
19341         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
19342         (complete_dtor_identifier): New macro.
19343         (CLASSTYPE_FIRST_CONVERSION): Remove.
19344         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
19345         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
19346         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
19347         (CLASSTYPE_CONSTRUCTORS): Likewise.
19348         (CLASSTYPE_DESTRUCTORS): Likewise.
19349         (lang_decl): Add cloned_function.
19350         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
19351         (DECL_BASE_CONSTRUCTOR_P): Likewise.
19352         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
19353         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
19354         (DECL_CLONED_FUNCTION_P): Likewise.
19355         (DECL_CLONED_FUNCTION): Likewise.
19356         (clone_function_decl): Declare.
19357         (maybe_clone_body): Likewise.
19358         * call.c (build_user_type_conversion_1): Call complete object
19359         constructors in the new ABI.
19360         (build_new_method_call): Don't add in-charge parameters under the
19361         new ABI.
19362         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
19363         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
19364         CLASSTYPE_DESTRUCTOR_SLOT.
19365         (build_clone): New function.
19366         (clone_function_decl): Likewise.
19367         (clone_constructors_and_destructors): Likewise.
19368         (check_bases_and_members): Use it.
19369         * decl.c (iniitialize_predefined_identifiers): Initialize
19370         complete_dtor_identifier.
19371         (finish_function): Don't add extra code to a clone.
19372         (lang_mark_tree): Mark cloned_function.
19373         * decl2.c (mark_used): Don't bother trying to instantiate things
19374         we synthesized.
19375         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
19376         * method.c (set_mangled_name_for_decl): Don't treat clones as
19377         constructors.
19378         (synthesize_method): Sythesize cloned functions, not the clones.
19379         * optimize.c (inline_data): Update comment on ret_label.
19380         (remap_block): Don't assume DECL_INITIAL exists.
19381         (copy_body_r): Allow ret_label to be NULL.
19382         (maybe_clone_body): Define.
19383         * pt.c (tsubst_decl): Handle clones.
19384         (instantiate_clone): New function.
19385         (instantiate_template): Use it.
19386         (set_mangled_name_for_template_decl): Don't treat clones as
19387         constructors.
19388         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
19389         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
19390         * semantics.c (expand_body): Clone function bodies as necessary.
19392         * optimize.c (remap_decl): Avoid sharing structure for arrays
19393         whose size is only known at run-time.
19394         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
19396         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
19397         to has_in_charge_parm_p.
19398         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
19399         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
19400         (DECL_COPY_CONSTRUCTOR_P): New macro.
19401         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
19402         (build_user_type_conversion_1): Likewise.
19403         (convert_like_real): Likewise.
19404         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
19405         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
19406         (copy_args_p): Likewise.
19407         (grok_ctor_properties): Likewise.
19408         (start_function): Likewise.
19409         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
19410         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
19411         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
19412         * method.c (do_build_copy_constructor): Use
19413         DECL_HAS_IN_CHARGE_PARM_P.
19414         (synthesize_method): Likewise.
19415         * pt.c (instantiate_template): Remove goto.
19416         * tree.c (build_cplus_method_type): Remove mention of obstacks in
19417         comment.
19419         * cp-tre.h (finish_function): Change prototype.
19420         * decl.c (end_cleanup_fn): Adjust caller.
19421         (finish_function): Take only one parameter.
19422         * decl2.c (finish_objects): Adjust caller.
19423         (finish_static_storage_duration_function): Likewise.
19424         * method.c (emit_thunk): Likewise.
19425         * parse.y: Likewise.
19426         * parse.c: Regenerated.
19427         * pt.c (instantiate_decl): Likewise.
19428         * rtti.c (synthesize_tinfo_fn): Likewise.
19429         * semantics.c (expand_body): Likewise.
19431         * cp-tree.h (copy_decl): New function.
19432         * class.c (finish_struct_1): Use it.
19433         * lex.c (copy_decl): Define it.
19434         * pt.c (tsubst_decl): Likewise.
19435         * tree.c (copy_template_template_parm): Likewise.
19437         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
19438         has_nonpublic_assign_ref.
19439         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
19440         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
19441         * class.c (finish_struct_methods): Don't set
19442         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
19443         (interface_only): Don't declare.
19444         (interface_unknown): Likewise.
19446 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19448         * tree.h (HAVE_TEMPLATES): Remove definition.
19449         * lang-options.h (-fthis-is-variable): Remove documentation.
19451 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
19453         * class.c (instantiate_type): Handle object-relative template-id.
19455         * semantics.c (finish_expr_stmt): Call convert_to_void here.
19456         * decl.c (cplus_expand_expr_stmt): Not here.
19458         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
19459         Initialize exprtype earlier.
19461         * parse.y (fn.def1): Check for defining types in return types.
19463         * decl.c (check_tag_decl): Notice extra fundamental types.
19464         Diagnose empty decls in classes, too.
19466         * decl.c (grokdeclarator): Don't override an anonymous name if no
19467         declarator was given.
19469         * cvt.c (convert_to_void): Call resolve_offset_ref.
19471         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
19473         * decl2.c (decl_namespace): Handle getting a type.
19475         * typeck.c (build_c_cast): Re-enable warning for cast between
19476         pointer and integer of different size.
19478 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
19480         * inc/cxxabi.h (__pointer_type_info): Add restrict and
19481         incomplete flags.
19482         (__pointer_type_info::__pointer_catch): New virtual function.
19483         (__pointer_to_member_type_info): Derive from
19484         __pointer_type_info. Adjust.
19485         (__pointer_to_member_type_info::__do_catch): Remove.
19486         (__pointer_to_member_type_info::__is_pointer_p): Declare.
19487         (__pointer_to_member_type_info::__pointer_catch): Declare.
19488         * rtti.c (qualifier_flags): Add restrict flag.
19489         (ptmd_initializer): Reorder members.
19490         (create_tinfo_types): Expand comments. Reorder
19491         ptmd_desc_type_node members.
19492         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
19493         Implement.
19494         (__pointer_type_info::__do_catch): Move specific code into
19495         __pointer_catch. Call it.
19496         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
19497         specific catch checking. Fix void conversion check.
19498         (__pointer_to_member_type_info::__do_catch): Remove.
19499         (__pointer_to_member_type_info::__pointer_catch): Implement.
19501 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19503         * lex.c (init_parse): Remove traces of classof and headof.
19504         * decl2.c (flag_operator_names): Default to 1.
19505         (lang_decode_option): Do not set it for -ansi.
19507 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
19509         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
19510         (DECL_MAIN_VARIANT): Remove.
19511         * decl.c (duplicate_decls): Don't set it.
19512         (start_function): Likewise.
19513         (lang_mark_tree): Don't mark it.
19514         * decl2.c (defer_fn): Don't use it.
19515         * lex.c (retrofit_lang_decl): Don't set it.
19516         * pt.c (tsubst_decl): Likewise.
19517         * ptree.c (print_lang_decl): Don't print it.
19518         * typeck.c (mark_addressable): Don't use it.
19520 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19522         * vec.cc: Include <new> and <exception>.
19523         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
19524         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
19525         terminate.
19526         (__cxa_vec_delete): Catch dtor exceptions.
19528 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
19530         Prepend __ to implementation defined names.
19531         * inc/typeinfo (type_info): Rename _name to __name.
19532         (type_info::type_info): Rename parameter.
19533         (type_info::operator==, type_info::operator!=,
19534         type_info::before): Likewise.
19535         (type_info::is_pointer_p, type_info::is_function_p,
19536         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
19537         parameters.
19538         * inc/cxxabi.h
19539         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
19540         (__pointer_type_info::__pointer_type_info): Likewise.
19541         (__pointer_type_info::is_pointer_p,
19542         __pointer_type_info::do_catch): Prepend __. Rename parameters.
19543         (__array_type_info::__array_type_info): Rename parameters.
19544         (__function_type_info::__function_type_info): Likewise.
19545         (__function_type_info::is_function_p): Prepend __.
19546         (__enum_type_info::__enum_type_info): Rename parameters.
19547         (__pointer_to_member_type_info::__pointer_to_member_type_info):
19548         Likewise.
19549         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
19550         parameters.
19551         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
19552         (__class_type_info::__class_type_info): Rename parameters.
19553         (__class_type_info::sub_kind): Prepend __. Adjust member names.
19554         (__class_type_info::upcast_result,
19555         __class_type_info::dyncast_result): Prepend __. Move definition
19556         into tinfo.cc.
19557         (__class_type_info::do_upcast, __class_type_info::do_catch,
19558         __class_type_info::find_public_src,
19559         __class_type_info::do_dyncast,
19560         __class_type_info::do_find_public_src): Prepend __. Rename
19561         parameters.
19562         (__si_class_type_info::__si_class_type_info): Rename parameters.
19563         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
19564         __si_class_type_info::do_find_public_src): Prepent __. Rename
19565         parameters.
19566         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
19567         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
19568         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
19569         parameters.
19570         (__dynamic_cast): Rename parameters.
19571         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
19572         type_info::do_catch, type_info::do_upcast): Prepend __.
19573         (contained_p, public_p, virtual_p, contained_public_p,
19574         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
19575         (__class_type_info::do_catch,
19576         __class_type_info::do_upcast): Prepend __. Adjust.
19577         (__class_type_info::__upcast_result,
19578         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
19579         Adjust.
19580         (__class_type_info::find_public_src): Prepend __. Adjust.
19581         (__class_type_info::do_find_public_src,
19582         __si_class_type_info::do_find_public_src,
19583         __vmi_class_type_info::do_find_public_src): Likewise.
19584         (__class_type_info::do_dyncast,
19585         __si_class_type_info::do_dyncast,
19586         __vmi_class_type_info::do_dyncast): Likewise.
19587         (__class_type_info::do_upcast,
19588         __si_class_type_info::do_upcast,
19589         __vmi_class_type_info::do_upcast): Likewise.
19590         (__dynamic_cast): Adjust.
19591         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
19592         (__function_type_info::is_function_p): Likewise.
19593         (__pointer_type_info::do_catch): Likewise. Adjust.
19594         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
19595         (__throw_type_match_rtti_2): Adjust.
19596         (__is_pointer): Adjust.
19598 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
19600         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
19601         (complete_ctor_identifier): New macro.
19602         (special_function_kind): Add sfk_copy_constructor and
19603         sfk_assignment_operator.
19604         (LOOKUP_HAS_IN_CHARGE): Remove.
19605         (cons_up_default_function): Rename to ...
19606         (implicitly_declare_fn): ... this.
19607         * call.c (build_new_method_call): Add in-charge parameters for
19608         constructors here.
19609         * class.c (add_implicitly_declared_members): Change parameter name
19610         from cant_have_assignment to cant_have_const_assignment.
19611         Replace calls to cons_up_default_function to implicitly_declare_fn.
19612         * cvt.c (ocp_convert): Use complete_ctor_identifier.
19613         * decl.c (initialize_predefined_identifiers): Initialize it.
19614         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
19615         complex expression.
19616         * init.c (expand_default_init): Don't calculate the in-charge
19617         parameter here.
19618         (build_new_1): Likewise.
19619         * lex.c (cons_up_default_function): Move to method.c.
19620         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
19621         (implicitly_declare_fn): New function.
19622         * typeck.c (build_static_cast): Use complete_ctor_identifier.
19623         (build_modify_expr): Likewise.
19624         * typeck2.c (build_functional_cast): Likewise.
19626         Under the new ABI, constructors don't return `this'.
19627         * cp-tree.h (warn_reorder): Declare.
19628         (special_function_kind): New enum.
19629         (global_base_init_list): Remove declaration.
19630         (emit_base_init): Don't return a value.
19631         (check_base_init): Don't declare.
19632         (is_aggr_typedef): Likewise.
19633         * decl.c (check_special_function_return_type): New function.
19634         (return_types): Remove.
19635         (grokdeclarator): Use check_special_function_return_type.
19636         (start_function): Don't initialize ctor_label under the new ABI.
19637         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
19638         * init.c (begin_init_stmts): Move to top of file.
19639         (finish_init_stmts): Likewise.
19640         (warn_reorder): Don't declare.
19641         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
19642         value.
19643         (check_base_init): Remove.
19644         (is_aggr_typedef): Likewise.
19645         (build_new_1): Don't use the return value of a constructor.
19646         * semantics.c (setup_vtbl_ptr): Don't use the return value
19647         of emit_base_init.
19648         * typeck.c (check_return_expr): Don't magically convert return
19649         statements into `return this' in constructors under the new ABI.
19651         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
19652         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
19653         (base_ctor_identifier): New macro.
19654         (base_dtor_identifier): Likewise.
19655         (deleting_dtor_identifier): Likewise.
19656         * decl.c: Don't include obstack.h.
19657         (obstack_chunk_alloc): Don't define.
19658         (obstack_chunk_free): Likewise.
19659         (struct predefined_identifier): New type.
19660         (initialize_predefined_identifiers): New function.
19661         (init_decl_processing): Use it.
19662         (debug_temp_inits): Remove.
19663         (start_method): Don't call preserve_data.
19664         (hack_incomplete_structures): Update comment.
19665         * init.c (init_init_processing): Don't initialize
19666         nelts_identifier.
19667         (build_offset_rf): Remove dead code.
19668         (build_delete): Use CLASSTYPE_N_BASECLASSES.
19669         * search.c (init_search_processing): Don't initialize
19670         vptr_identifier.
19672 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19674         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
19675         some sign_compare warnings.
19677 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19679         Rename abi::__vmi_class_type_info members.
19680         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
19681         base_list, detail_masks members to vmi_flags, vmi_base_count,
19682         vmi_bases and vmi_flags_masks respectively.
19683         (__vmi_class_type_info::vmi_flags_masks): Rename
19684         details_unknown_mask to flags_unknown_mask.
19685         * tinfo.cc (__class_type_info::do_upcast): Adjust.
19686         (__vmi_class_type_info::do_find_public_src): Adjust.
19687         (__vmi_class_type_info::do_dyncast): Adjust.
19688         (__vmi_class_type_info::do_upcast): Adjust.
19690 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
19692         * tinfo.cc (convert_to_base): New function.
19693         (get_vbase_offset): Remove. Move into convert_to_base.
19694         (__vmi_class_type_info::do_find_public_src): Adjust.
19695         (__vmi_class_type_info::do_dyncast): Adjust.
19696         (__vmi_class_type_info::do_upcast): Adjust.
19698 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
19700         * tinfo.cc (operator=): Use __builtin_strcmp.
19701         * tinfo2.cc (before): Likewise.
19703 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
19705         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
19706         (DECL_SAVED_INLINE): Rename to ...
19707         (DECL_DEFERRED_FN): ... this.
19708         (in_function_p): Remove declaration.
19709         (mark_inline_for_output): Rename to ...
19710         (defer_fn): ... this.
19711         * decl.c (finish_function): Adjust call to mark_inline_for_output.
19712         (in_function_p): Remove definition.
19713         * decl2.c (saved_inlines): Rename to ...
19714         (deferred_fns): ... this.
19715         (saved_inlines_used): Rename to ...
19716         (deferred_fns_used): ... this.
19717         (mark_inline_for_output): Rename to ...
19718         (defer_fn): ... this.
19719         (finish_file): Adjust accordingly.
19720         (init_decl2): Likewise.
19721         * lex.c (cons_up_default_function): Likewise.
19722         * pt.c (mark_decl_instantiated): Likewise.
19723         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
19724         circumstances.
19725         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
19726         * semantics.c (expand_body): Defer more functions.
19728 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19730         * vec.cc: New file.
19731         * Make-lang.in (CXX_LIB2FUNCS): Add it.
19732         (vec.o): Build it.
19733         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
19734         __cxa_vec_delete): Declare.
19736 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
19738         * rtti.c (dfs_class_hint_mark): New static function.
19739         (dfs_class_hint_unmark): New static function.
19740         (class_hint_flags): Use them.
19742 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
19744         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
19746 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
19748         * cp-tree.h (instantiate_decl): Change prototype.
19749         * decl2.c (mark_used): Adjust call.
19750         * optimize.c (inlinable_function_p): Adjust handling of templates.
19751         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
19752         (do_type_instantiation): Likewise.
19753         (instantiate_decl): Defer more templates.
19754         (instantiate_pending_templates): Adjust logic to handle inline
19755         friend functions.
19757         * Makefile.in (GGC_H): New variable.  Use it throughout in place
19758         of ggc.h.
19760         * call.c: Don't include obstack.h.  Include ggc.h.
19761         (obstack_chunk_alloc): Don't define.
19762         (obstack_chunk_free): Likewise.
19763         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
19764         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
19765         (pop_switch): Free it.
19767         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
19769         * dump.c (dequeue_and_dump): Don't try to print the bit_position
19770         if we don't have a DECL_FIELD_OFFSET.
19772 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
19774         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
19775         special_function_p.
19777 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19779         * cfns.gperf (hash, libc_name_p): Prototype.
19781         * rtti.c (build_dynamic_cast_1): Constification.
19783         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
19785         * semantics.c (deferred_type_access_control): Prototype.
19787 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
19789         Correct many new ABI issues regarding vbase and vcall offset
19790         layout.
19791         * cp-tree.h (BINFO_VTABLE): Document.
19792         (struct lang_type): Tweak formatting.
19793         (BINFO_PRIMARY_BINFO): Add to documentation.
19794         (CLASSTYPE_VSIZE): Fix typo in comment.
19795         (CLASSTYPE_VBASECLASSES): Update documentation.
19796         (BINFO_VBASE_MARKED): Remove.
19797         (SET_BINFO_VBASE_MARKED): Likewise.
19798         (CLEAR_BINFO_VBASE_MARKED): Likewise.
19799         (BINFO_FIELDS_MARKED): Remove.
19800         (SET_BINFO_FIELDS_MARKED): Likewise.
19801         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
19802         (enum access_kind): New enumeration.
19803         (num_extra_vtbl_entries): Remove declaration.
19804         (size_extra_vtbl_entries): Likewise.
19805         (get_vtbl_decl_for_binfo): New function.
19806         (dfs_vbase_unmark): Remove declaration.
19807         (mark_primary_bases): Likewise.
19808         * class.c (SAME_FN): Remove.
19809         (struct vcall_offset_data_s): Move definition.
19810         (build_vbase_pointer): Use `build', not `build_binary_op', to
19811         access the vbase pointer under the new ABI.
19812         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
19813         (build_primary_vtable): Likewise.
19814         (dfs_mark_primary_bases): Move here from search.c.
19815         (mark_primary_bases): Likewise.
19816         (determine_primary_bases): Under the new ABI, don't make a base
19817         class a primary base just because we don't yet have any virtual
19818         functions.
19819         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
19820         (num_vfun_entries): Remove.
19821         (dfs_count_virtuals): Likewise.
19822         (num_extra_vtbl_entries): Likewise.
19823         (size_extra_vtbl_entries): Likewise.
19824         (layout_virtual_bases): Iterate in inheritance graph order under
19825         the new ABI.
19826         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
19827         indicate that a vfield is present.
19828         (init_class_processing): Initialize access_public_node, etc., from
19829         ak_public, etc.
19830         (get_vtbl_decl_for_binfo): New function.
19831         (dump_class_hierarchy_r): Likewise.
19832         (dump_class_hierarchy): Use it.
19833         (finish_vtbls): Build the vtbls in inheritance graph order.
19834         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
19835         (initialize_vtable): Use get_vtbl_decl_for_binfo.
19836         (accumulate_vtbl_inits): Add comments explaining why a pre-order
19837         walk is required.
19838         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
19839         where the vptr points, even for primary vtables.
19840         (build_vtbl_initializer): Adjust handling of vbase and vcall
19841         offsets.
19842         (build_vcall_and_vbase_vtable_entries): New function.
19843         (dfs_build_vbase_offset_vtbl_entries): Remove.
19844         (build_vbase_offset_vtbl_entries): Reimplement.
19845         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
19846         were already handled in a primary base class vtable.
19847         (build_vcall_offset_vtbl_entries): Adjust.
19848         (build_rtti_vtbl_entries): Adjust.
19849         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
19850         * init.c (expand_virtual_init): Simplify.
19851         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
19852         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
19853         * search.c (BINFO_ACCESS): New macro.
19854         (SET_BINFO_ACCESS): Likewise.
19855         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
19856         (access_in_type): Likewise.
19857         (dfs_accessible_p): Likewise.
19858         (protected_accessible_p): Likewise.
19859         (lookup_fnfields_1): Adjust documentation.
19860         (dfs_mark_primary_bases): Move to class.c
19861         (mark_primary_bases): Likewise.
19862         (dfs_vbase_unmark): Remove.
19863         (virtual_context): Use BINFO_FOR_VBASE.
19864         (dfs_get_vbase_types): Simplify.
19865         (dfs_build_inheritance_graph_order): New function.
19866         (get_vbase_types): Use it.
19867         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
19869         * tinfo.cc (get_vbase_offset): New function.
19870         (__vmi_class_type_info::do_find_public_src): Use it.
19871         (__vmi_class_type_info::do_dyncast): Likewise.
19872         (__vmi_class_type_info::do_upcast): Likewise.
19874 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
19876         * lang-specs.h: Pass -fno-show-column to the preprocessor.
19878 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
19880         * rtti.c (class_hint_flags): Rename flags.
19881         (class_initializer): Remove flags.
19882         (synthesize_tinfo_var): Combine offset and flags. Add flags
19883         for __vmi_class_type_info.
19884         (create_tinfo_types): Remove flags from __class_type_info and
19885         __si_class_type_info. Merge flags and offset from
19886         base_class_type_info.
19887         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
19888         (__base_class_info::is_virtual_p): Adjust.
19889         (__base_class_info::is_public_p): Adjust.
19890         (__base_class_info::offset): New accessor.
19891         (__class_type_info::details): Remove member.
19892         (__class_type_info::__class_type_info): Lose details.
19893         (__class_type_info::detail_masks): Remove.
19894         (__si_class_type_info::__si_class_type_info): Lose details.
19895         (__vmi_class_type_info::details): New member.
19896         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
19897         (__vmi_class_type_info::detail_masks): New member.
19898         * tinfo.cc (__class_type_info::do_upcast): Initialize result
19899         with unknown_details_mask.
19900         (__vmi_class_type_info::do_find_public_src): Adjust
19901         (__vmi_class_type_info::do_dyncast): Adjust.
19902         (__vmi_class_type_info::do_upcast): Set result details, if
19903         needed. Adjust.
19904         (__dynamic_cast): Temporarily #if out optimization.
19906 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
19908         * rtti.c (get_tinfo_decl): Mark used.
19909         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
19910         mark as dealt with, if we output it.
19912 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19914         * class.c: Reorganize to put virtual function table initialization
19915         machinery at the end of the file.
19917 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
19919         * class.c (finish_struct): Use bitsize_zero_node.
19920         * pt.c (instantiate_class_template): Likewise.
19922 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
19924         Put RTTI entries at negative offsets in new ABI.
19925         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
19926         vbase offset at index -3, not -1.
19927         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
19928         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
19929         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
19930         (build_rtti_vtbl_entries): New function.
19931         (set_rtti_entry): Remove.
19932         (build_primary_vtable): Don't use it.
19933         (build_secondary_vtable): Likewise.
19934         (start_vtable): Remove.
19935         (first_vfun_index): New function.
19936         (set_vindex): Likewise.
19937         (add_virtual_function): Don't call start_vtable.  Do call
19938         set_vindex.
19939         (set_primary_base): Rename parameter.
19940         (determine_primary_base): Likewise.
19941         (num_vfun_entries): Don't use skip_rtti_stuff.
19942         (num_extra_vtbl_entries): Include RTTI information.
19943         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
19944         (skip_rtti_stuff): Remove.
19945         (dfs_modify_vtables): Don't use it.
19946         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
19947         (layout_nonempty_base_or_field): Update size handling.
19948         (create_vtable_ptr): Tweak.
19949         (layout_class_type): Adjust parameter names.
19950         (finish_struct_1): Simplify.
19951         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
19952         (skip_rtti_stuff): Remove.
19953         (first_vfun_index): New function.
19954         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19955         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
19956         (marked_vtable_pathp): Declare.
19957         (unmarked_vtable_pathp): Likewise.
19958         * error.c (dump_expr): Use first_vfun_index to calculate vtable
19959         offsets.
19960         * rtti.c (build_headof): Look for RTTI at negative offsets.
19961         (get_tinfo_decl_dynamic): Likewise.
19962         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
19963         here.
19964         (create_pseudo_type_info): Do it here instead.  Adjust so that
19965         vptr points at first virtual function.
19966         * search.c (marked_vtable_pathp): Make it global.
19967         (unmarked_vtable_pathp): Likewise.
19968         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
19969         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19970         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
19971         (get_pure_virtuals): Likewise.
19972         (expand_upcast_fixups): Likewise.
19973         * tree.c (debug_binfo): Likewise.
19974         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
19975         negative offset.
19977 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19979         * class.c (check_field_decl): Fix typo.
19980         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
19981         (check_methods): Likewise.
19982         (check_field_decls): Likewise.
19983         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
19984         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
19985         Use DECL_RESULT_FLD, not DECL_RESULT.
19986         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
19987         * lex.c (identifier_type): Likewise.
19988         * pt.c (determine_specialization, lookup_template_class): Likewise.
19989         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
19990         (resolve_overloaded_unification, more_specialized): Likewise.
19991         * semantics.c (finish_member_declaration): Likewise.
19992         * typeck.c (build_x_function_call): Likewise.
19994 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
19996         * class.c (layout_empty_base): Handle empty bases with non-byte
19997         alignment.
19998         (build_base_field): Likewise.
19999         (layout_virtual_bases): Likewise.
20001         * class.c (finish_struct_1): Fix typo in this change:
20003         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20005 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
20007         * decl.c (grokdeclarator): Count partial specializations when
20008         keeping track of how many template classes have been seen.
20010         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
20012 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20014         * class.c (build_vbase_pointer_fields): layout_field now place_field.
20015         (get_vfield_offset): Use byte_position.
20016         (set_rtti_entry): Set OFFSET to ssizetype zero.
20017         (get_binfo_offset_as_int): Deleted.
20018         (dfs_record_base_offsets): Use tree_low_cst.
20019         (dfs_search_base_offsets): Likewise.
20020         (layout_nonempty_base_or_field): Reflect changes in RLI format
20021         and call byte_position.
20022         (layout_empty_base): Convert offset to ssizetype.
20023         (build_base_field): use rli_size_unit_so_far.
20024         (dfs_propagate_binfo_offsets): Do computation in proper type.
20025         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
20026         (layout_class_type): Reflect changes in RLI names and fields.
20027         (finish_struct_1): Set DECL_FIELD_OFFSET.
20028         * dump.c (dequeue_and_dump): Call bit_position.
20029         * expr.c (cplus_expand_constant): Use byte_position.
20030         * rtti.c (expand_class_desc): Use bitsize_one_node.
20031         * typeck.c (build_component_addr): Use byte_position and don't
20032         special case for zero offset.
20034 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
20036         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
20038         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
20039         tinfo object.
20040         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
20041         vtable.
20043 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20045         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
20046         DECL_P macros.
20047         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
20048         make_typename_type, check_initializer, cp_finish_decl,
20049         xref_tag): Likewise.
20050         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
20051         decl_namespace, arg_assoc_template_arg, arg_assoc,
20052         validate_nonmember_using_decl, do_class_using_decl): Likewise.
20053         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
20054         args_to_string): Likewise.
20055         * friend.c (is_friend): Likewise.
20056         * lex.c (note_got_semicolon, note_list_got_semicolon,
20057         is_global): Likewise.
20058         * method.c (build_overload_nested_name, build_overload_value,
20059         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
20060         * parse.y (typename_sub, typename_sub1): Likewise.
20061         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
20062         process_partial_specialization, convert_template_argument,
20063         template_args_equal, add_pending_template, lookup_template_class,
20064         for_each_template_parm_r, maybe_fold_nontype_arg,
20065         tsubst, instantiate_template, type_unification_real, unify,
20066         instantiate_pending_templates, set_mangled_name_for_template_decl):
20067         Likewise.
20068         * repo.c (repo_get_id, repo_template_used): Likewise.
20069         * search.c (lookup_field_1): Likewise.
20070         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
20071         * xref.c (classname): Likewise.
20073 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
20075         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
20076         (CANONICAL_BINFO): New macro.
20077         (BINFO_NEW_VTABLE_MARKED): Use it.
20078         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
20079         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
20080         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
20081         not TREE_TYPE.
20082         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20083         (build_secondary_vtable): Likewise.
20084         (dfs_finish_vtbls): Likewise.
20085         (dfs_accumulate_vtbl_inits): Likewise.
20086         (accumulate_vtbl_inits): New function.
20087         (finish_vtbls): Make sure that virtual bases come after
20088         non-virtual bases in the vtable group.
20089         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
20090         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20091         * search.c (struct vbase_info): Move definition.
20092         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
20093         (unmarked_new_vtable_p): Likewise.
20094         (dfs_mark_vtable_path): Remove.
20095         (dfs_mark_new_vtable): Remove.
20096         (dfs_unmark_new_vtable): Likewise.
20097         (dfs_clear_search_slot): Likewise.
20098         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
20099         (dfs_clear_vbase_slots): Likewise.
20100         (init_vbase_pointers): LIkewise.
20102 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
20104         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
20105         SIZETYPE to a non-SIZETYPE.
20107 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
20109         * class.c (layout_virtual_bases): Adjust names in conditionally
20110         compiled code.
20112         * class.c (record_base_offsets): New function.
20113         (layout_conflict_p): Likewise.
20114         (layout_nonempty_base_or_field): Use it.
20115         (layout_empty_base): New function.
20116         (build_base_field): Use it.
20117         (build_base_fields): Update comment.
20118         (layout_virtual_bases): Fold in a little code form
20119         layout_basetypes.  Use layout_empty_base.
20120         (layout_basetypes): Remove.
20121         (end_of_class): New function.
20122         (layout_class_type): Use it.  Adjust.
20124         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
20125         (fntype_p): Remove.
20126         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
20127         comment.
20128         (dfs_skip_nonprimary_vbases_markedp): Likewise.
20129         * typeck.c (fntype_p): Remove.
20131         * cp-tree.h (TI_SPEC_INFO): Remove.
20132         (CLASSTYPE_TI_SPEC_INFO): Likewise.
20133         * pt.c (process_partial_specialization): Likewise.
20135         * class.c (build_base_field): Fix thinko in computation of binfo
20136         offsets.
20138         * tree.c (mark_local_for_remap_p): Mark variables declared in
20139         TARGET_EXPRs as well.
20141 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
20143         * typeck.c (require_complete_type, complete_type,
20144         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
20145         build_array_ref, convert_arguments, pointer_diff,
20146         build_x_unary_op, build_unary_op, build_c_cast,
20147         build_modify_expr): Use COMPLETE_TYPE_P etc.
20148         * call.c (is_complete, convert_like_real,
20149         build_new_method_call): Likewise.
20150         * class.c (build_vbase_pointer_fields, check_bases,
20151         build_base_field, finish_struct_1, pushclass): Likewise.
20152         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
20153         * decl.c (maybe_process_template_type_declaration, pushtag,
20154         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
20155         layout_var_decl, check_initializer, cp_finish_decl,
20156         grokdeclarator, require_complete_types_for_parms,
20157         grok_op_properties, xref_tag, xref_basetypes,
20158         check_function_type): Likewise.
20159         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
20160         * friend.c (do_friend): Likewise.
20161         * init.c (build_offset_ref): Likewise.
20162         * parse.y (structsp): Likewise.
20163         * pt.c (maybe_process_partial_specialization,
20164         tsubst_friend_function, instantiate_class_template, tsubst,
20165         do_type_instantiation, instantiate_pending_templates): Likewise.
20166         * repo.c (repo_get_id): Likewise.
20167         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
20168         synthesize_tinfo_var, emit_support_tinfos): Likewise.
20169         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
20170         * semantics.c (begin_class_definition): Likewise.
20171         * tree.c (build_cplus_method_type): Likewise.
20172         * typeck2.c (digest_init, build_functional_cast,
20173         add_exception_specifier): Likewise.
20174         * parse.h, parse.c: Regenerated.
20176 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
20178         * inc/cxxabi.h: New header file. Define new-abi entry points.
20179         (__pointer_type_info::target): Rename member to ...
20180         (__pointer_type_info::type): ... here.
20181         (__base_class_info::type): Rename member to ...
20182         (__base_class_info::base): ... here.
20183         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
20184         * cp-tree.h (CPTI_ABI): New global tree enumeration.
20185         (abi_node): New global tree node.
20186         * decl.c (abi_node): Document.
20187         (init_decl_processing): Initialize abi_node.
20188         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
20189         (get_vmi_pseudo_type_info): Likewise.
20190         (create_tinfo_types): Likewise.
20191         (emit_support_tinfos): Likewise.
20192         * tinfo.h (cxxabi.h): Include for new-abi.
20193         Move rtti class definitions to new header file.
20194         * tinfo.cc (abi): Use the namespace.
20195         (std): Move new abi rtti classes from here ...
20196         (__cxxabiv1): ... to here.
20197         * tinfo2.cc (cxxabi.h): Include for new-abi.
20198         Move rtti class definitions to new header file.
20199         (std): Move new abi rtti classes from here ...
20200         (__cxxabiv1): ... to here.
20201         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
20202         namespace.
20204 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
20205             Jason Merrill  <jason@casey.cygnus.com>
20207         * method.c (build_overload_int): Use host_integerp.
20209 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
20211         * init.c (build_offset_ref): Handle the case of a templated member
20212         function.
20214 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20216         * except.c (expand_exception_blocks): Clear catch_clauses_last.
20218 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
20220         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
20221         * class.c (check_bitfield_decl): Turn illegal bitfields into
20222         non-bitfields.
20223         (dfs_propagate_binfo_offsets): Adjust for new size_binop
20224         semantics.
20225         (dfs_offset_for_unshared_vbases): Likewise.
20226         * cvt.c (cp_convert_to_pointer): Convert NULL to a
20227         pointer-to-member correctly under the new ABI.
20228         * expr.c (cplus_expand_constant): Don't use cp_convert when
20229         turning an offset into a pointer-to-member.
20230         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
20231         when dereferencing them under the new ABI.
20232         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
20233         of pointers-to-members under the new ABI.
20235         * class.c (check_bitfield_decl): Remove restriction on really long
20236         bitfields.
20237         (layout_class_type): Implement new ABI handling of bitfields
20238         longer than their types.
20240 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20242         * parse.y (extdefs): Call ggc_collect.
20243         * parse.c: Regenerated.
20245 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
20247         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
20248         (note_name_declared_in_class): Use OVL_CURRENT to get at a
20249         potential overload.
20251 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20253         * class.c (build_vbase_path): Use integer_zerop.
20254         (build_vtable_entry): Use tree_low_cst.
20255         (get_vfield_offset): Use bit_position.
20256         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
20257         Use tree_low_cst.
20258         (check_bitfield_decl): Set DECL_SIZE using convert.
20259         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
20260         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
20261         Use tree_low_cst.
20262         (finish_struct_1): Use bit_position.
20263         (dump_class_hierarchy): Use tree_low_cst.
20264         * cp-tree.h (min_precision): Add declaration.
20265         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
20266         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
20267         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
20268         * expr.c (cplus_expand_constant): Use bit_position.
20269         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
20270         * rtti.c (get_base_offset): Use bit_position.
20271         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
20272         host_integerp, and tree_low_cst.
20273         (pointer_int_sum): Use integer_zerop.
20274         (build_component_addr): Use bit_position.
20276 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
20278         * typeck.c (require_complete_type): Don't assume size_zero_node.
20279         (complete_type_or_else): Likewise.
20281 2000-03-16  Steven Grady <grady@digitaldeck.com>
20282             Jason Merrill  <jason@casey.cygnus.com>
20284         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
20286 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
20288         * decl2.c (grokfield): Bail out if type is error_mark_node.
20290 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20292         * tinfo2.cc (__ptr_to_member_data): Rename to ...
20293         (__pointer_to_member_data): ... here. Adjust.
20294         * rtti.c (create_tinfo_types): Adjust.
20296 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20298         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
20299         * decl.c (ref_desc_type_node): Undocument.
20300         * rtti.c (ptr_ref_initializer): Rename to ...
20301         (ptr_initializer): ... here. Adjust comments.
20302         (ptmd_initializer): Fix comment thinko.
20303         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
20304         (create_tinfo_types): Remove ref_desc_type_node init.
20305         * tinfo2.cc (__reference_type_info): Remove.
20307 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
20309         * decl.c (cp_finish_decl): Remove obsolete comment.
20311         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
20313 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
20315         * cp-tree.h: Tweak documentation.
20316         * class.c (build_vbase_pointer_fields): Layout the fields, too.
20317         (avoid_overlap): Remove.
20318         (get_binfo_offset_as_int): New function.
20319         (dfs_serach_base_offsets): Likewise.
20320         (layout_nonempty_base_or_field): Likewise.
20321         (build_base_field): Layout fields here.  Avoid placing two objects
20322         of the same type at the same address, under the new ABI.
20323         (build_base_fields): Adjust accordingly.
20324         (create_vtable_ptr): Return the new field, but don't attach it to
20325         TYPE_FIELDS.
20326         (remove_base_field): Remove.
20327         (remove_base_fields): Remove.
20328         (layout_basetypes): Adjust accordingly.
20329         (layout_class_type): Call layout_field for each field, rather than
20330         just making a wholesale call to layout_type.
20332 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
20334         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
20336 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
20338         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
20340         * except.c (dtor_nothrow): New fn.
20341         (do_pop_exception): Use it.  Take type parm.
20342         (push_eh_cleanup): Take type parm.
20343         (expand_start_catch_block): Pass it.
20344         (build_eh_type_type_ref): Accept null type.
20346 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
20348         * cp-tree.h (revert_static_member_fn): Change prototype.
20349         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
20350         (grok_op_properties): Likewise.
20351         (start_function): Likewise.
20352         (revert_static_member_fn): Simplify.
20353         * pt.c (check_explicit_specialization): Adjust call to
20354         revert_static_member_fn.
20356 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
20358         * cp-tree.h (scope_kind): New type.
20359         (tmpl_spec_kind): Likewise.
20360         (declare_pseudo_global_level): Remove.
20361         (pseudo_global_level_p): Rename to template_parm_scope_p.
20362         (pushlevel): Remove declaration.
20363         (begin_scope): New function.
20364         (finish_scope): Likewise.
20365         (current_tmpl_spec_kind): Likewise.
20366         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
20367         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
20368         Add template_spec_p.
20369         (toplevel_bindings_p): Adjust.
20370         (declare_pseudo_global_level): Remove.
20371         (pseudo_global_level_p): Rename to template_parm_scope_p.
20372         (current_tmpl_spec_kind): New function.
20373         (begin_scope): Likewise.
20374         (finish_scope): Likewise.
20375         (maybe_push_to_top_level): Adjust.
20376         (maybe_process_template_type_declaration): Likewise.
20377         (pushtag): Likewise.
20378         (pushdecl_nonclass_level): Likewise.
20379         (lookup_tag): Likewise.
20380         (grokfndecl): Handle member template specializations.  Share
20381         constructor and non-constructor code.
20382         * decl2.c (check_classfn): Handle member template specializations.
20383         * pt.c (begin_template_parm_list): Use begin_scope.
20384         (begin_specialization): Likewise.
20385         (end_specialization): Likewise.
20386         (check_explicit_specialization): Use current_tmpl_spec_kind.
20387         Handle member template specializations.
20388         (end_template_decl): Use finish_scope.  Remove call to
20389         get_pending_sizes.
20390         (push_template_decl_real): Remove bogus error message.
20391         (tsubst_decl): Fix typo in code contained in comment.
20392         (instantiate_template): Handle member template specializations.
20393         (most_general_template): Likewise.
20395 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
20397         * lex.c (whitespace_cr): Compress consecutive calls to warning().
20398         (do_identifier): Ditto for error().
20400         * pt.c (convert_nontype_argument): Ditto for cp_error().
20401         (convert_template_argument): Ditto for cp_pedwarn().
20403 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
20405         * exception.cc (__check_null_eh_spec): New fn.
20406         * except.c (expand_end_eh_spec): Call it if the spec is throw().
20408 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
20410         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
20411         * except.c (expand_end_eh_spec): Add the return type.
20412         * rtti.c (throw_bad_cast): Add the parmtypes.
20413         (throw_bad_typeid): Likewise.
20415         * semantics.c (expand_stmt): Only leave out rtl for unused
20416         artificials, and set DECL_IGNORED_P on them as well.
20417         * decl.c (wrapup_globals_for_namespace): Likewise.
20419 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
20421         * decl.c (maybe_commonize_var): Skip all artificial decls.
20422         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
20424 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
20426         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
20427         * cp-tree.h: Declare flag_enforce_eh_specs.
20428         * decl.c (store_parm_decls, finish_function): Check it.
20430         C library functions don't throw.
20431         * Makefile.in (cfns.h): New target.
20432         (except.o): Depend on it.
20433         * Make-lang.in (cc1plus): Depend on cfns.gperf.
20434         * cfns.gperf: New file.
20435         * cfns.h: Generated.
20436         * except.c: Include it.
20437         (nothrow_libfn_p): New fn.
20438         * decl.c (grokfndecl): Use it.
20439         * cp-tree.h: Declare it.
20441         * decl.c (push_overloaded_decl_1, auto_function,
20442         define_function): Lose.
20443         (build_library_fn_1): New static fn.
20444         (builtin_function): Use it.
20445         (get_atexit_node): Use build_library_fn_ptr.
20446         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
20447         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
20448         push_void_library_fn, push_throw_library_fn): New fns.
20449         * cp-tree.h: Declare them.
20450         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
20451         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
20452         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
20453         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
20454         * rtti.c (build_runtime_decl): Lose.
20455         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
20456         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
20457         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
20459         * call.c (build_call): Remove result_type parm.
20460         Call mark_used on unused artificial fns.
20461         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
20463 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
20465         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
20466         appropriate.
20467         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
20468         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
20469         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
20470         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
20471         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
20472         expand_generic_desc): Likewise.
20474 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20476         * exception.cc (__cp_pop_exception): Cleanup the original object.
20478 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20480         * decl.c (grok_op_properties): Merge conversion to void warning
20481         with other silly op warnings.
20483 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
20485         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
20486         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
20488 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20490         * decl.c (cp_make_fname_decl): New function.
20491         (wrapup_globals_for_namespace): Don't emit unused static vars.
20492         (init_decl_processing): Remove comment about use of
20493         array_domain_type. Set make_fname_decl.
20494         (cp_finish_decl): Remove __FUNCTION__ nadgering.
20495         * semantics.c (begin_compound_stmt): Remove
20496         current_function_name_declared flagging.
20497         (expand_stmt): Don't emit unused local statics.
20498         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
20499         specially.
20501 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
20503         * typeck.c (convert_for_assignment): Don't look at array
20504         initializer.
20505         * call.c (convert_like_real): Likewise.
20507 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
20509         Add initial support for '\uNNNN' specifier.
20510         * lex.c (read_ucs): New fn.
20511         (readescape, skip_white_space): Call it.
20512         (is_extended_char, is_extended_char_1): New fns.
20513         (utf8_extend_token): New fn, #if 0'd out.
20514         (real_yylex): Treat extended chars like letters.
20516         * search.c (note_debug_info_needed): Walk the bases even if we
20517         weren't deferring the type itself.
20519 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20521         * decl2.c (finish_objects): Constify a char*.
20523         * method.c (emit_thunk): Likewise.
20525 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
20527         * typeck.c (dubious_conversion_warnings): Look through
20528         REFERENCE_TYPE.
20530 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20532         * class.c (dfs_modify_vtables): I is now unsigned.
20533         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
20534         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
20535         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
20536         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
20537         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
20538         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
20539         Call integer_all_onesp.
20540         * typeck2.c (process_init_constructor): Use compare_tree_int.
20542         * lang-specs.h (as): Don't call if -syntax-only.
20544 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
20546         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
20547         RTL_EXPR_HAS_NO_SCOPE after all.
20549 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
20551         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
20552         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
20553         RTL_EXPR_HAS_NO_SCOPE.
20555         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
20556         later.
20558         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
20560 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
20562         * call.c (convert_like): Macrofy.
20563         (convert_like_with_context): New macro.
20564         (convert_like_real): Renamed from convert_like.  Add calling
20565         context parameters, for diagnostics. Add recursive flag.  Call
20566         dubious_conversion_warnings for outer conversion.
20567         (build_user_type_conversion): Use convert_like_with_context.
20568         (build_over_call): Likewise. Don't warn about dubious
20569         conversions here. Adjust convert_default_arg calls.
20570         (convert_default_arg): Add context parameters for diagnostics.
20571         Pass through to convert_like_with_context.
20572         * cp-tree.h (convert_default_arg): Add context parameters.
20573         (dubious_conversion_warnings): Prototype new function.
20574         * typeck.c (convert_arguments): Adjust convert_default_arg call.
20575         (dubious_conversion_warnings): New function, broken
20576         out of convert_for_assignment.
20577         (convert_for_assignment): Adjust.
20579 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
20581         * decl2.c (key_method): Break out from...
20582         (import_export_vtable, import_export_class): ...here.
20584         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
20585         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
20587         * search.c (note_debug_info_needed, dfs_debug_mark,
20588         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
20589         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
20591 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
20593         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
20594         typos.
20596 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
20598         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
20599         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
20600         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
20601         (lang_type): Split gets_new into has_new and has_array_new.
20602         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20603         (TYPE_GETS_NEW): Split into ...
20604         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
20605         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
20606         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
20607         (build_op_new_call): Don't declare.
20608         (build_new_1): Likewise.
20609         * call.c (build_op_new_call): Remove.
20610         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20611         instead of TYPE_NEEDS_DESTRUCTOR.
20612         (finish_struct_bits): Likewise.
20613         (add_implicitly_declared_members): Likewise.
20614         (check_field_decl): Likewise.
20615         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
20616         correctly under the new ABI.
20617         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
20618         instead of TYPE_NEEDS_DESTRUCTOR.
20619         (initialize_local_var): Likewise.
20620         (destroy_local_var): Likewise.
20621         (cp_finish_decl): Likewise.
20622         (register_dtor_fn): Likewise.
20623         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
20624         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
20625         TYPE_VEC_DELETE_TAKES_SIZE here.
20626         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
20627         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
20628         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20629         (finish_destructor_body): Likewise.
20630         (maybe_build_cleanup_1): Likewise.
20631         * decl2.c (do_static_destruction): Likewise.
20632         * init.c (build_new_1): Make it static.
20633         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20634         (expand_cleanup_for_base): Likewise.
20635         (get_cookie_size): New function.
20636         (build_new_1): Handle array-new cookies correctly under the new
20637         ABI.
20638         (build_vec_delete_1): Likewise.
20639         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20640         (build_delete): Likewise.
20641         (build_vec_delete): Handle array-new cookies correctly under the new
20642         ABI.
20643         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20644         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
20645         TYPE_HAS_ARRAY_NEW_OPERATOR.
20646         * ptree.c (print_lang_type): Check them.
20647         * search.c (context_for_name_lookup): Fix typo in comment.
20648         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
20649         * tree.c (break_out_cleanups): Likewise.
20650         (build_cplus_array_test_1): Likewise.
20651         (cp_build_qualified_type_real): Likewise.
20652         * typeck.c (complete_type): Likewise.
20654         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
20655         the command-line, not the end.
20657 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
20659         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
20661 2000-03-02  Tom Tromey  <tromey@cygnus.com>
20663         * cp-tree.h (build_java_class_ref): Declare.
20664         * init.c (build_java_class_ref): No longer static.
20665         * except.c (expand_throw): Generate a Java-style `throw' if the
20666         thrown object is a "Java" object.
20667         (initialize_handler_parm): Generate a Java-style lookup of
20668         exception info if the caught object is a "Java" object.
20669         (catch_language, catch_language_init): New globals.
20670         (decl_is_java_type): New function.
20671         (expand_start_catch_block): Don't call push_eh_info() or
20672         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
20673         class reference to build_catch_block.
20675 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20677         * typeck.c (comptypes): Treat sizetype like its language equivalent.
20679 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
20681         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
20682         to merge reference/pointer code and fix incorrect warnings.
20684 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
20686         * search.c (protected_accessible_p): Use context_for_name_lookup.
20688         * init.c (construct_virtual_bases): Fix thinko.
20689         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
20691 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20693         * decl.c (current_function_decl): Move to toplev.c.
20695 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
20697         * pt.c (fn_type_unification): Unify return type, whenever
20698         provided.
20699         (get_bindings_real): Only pass return type when necessary.
20700         Remove explicit return type check.
20701         * class.c (resolve_address_of_overloaded_function): Pass desired
20702         return type to fn_type_unification.
20704 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20706         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
20707         DECL_FIELD_SIZE.
20708         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
20709         DECL_FIELD_SIZE.
20710         * rtti.c (expand_class_desc): Likewise.
20711         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
20712         (THUNK_VCALL_OFFSET): Likewise.
20713         (THUNK_DELTA): Reflect changes in ../tree.h.
20715 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
20717         * search.c (protected_accessible_p): Also allow the access if
20718         the member is public in DERIVED.  Lose TYPE parm.
20719         (friend_accessible_p): Lose TYPE parm.
20720         (accessible_p): Adjust.
20722 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20724         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
20725         on things that are not sizes; ssize_binop deleted.
20726         Call size_diffop when appropriate.
20727         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20728         (build_primary_vtable, build_secondary_vtable): Likewise.
20729         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
20730         Variable I is HOST_WIDE_INT.
20731         (get_vfield_offset): Pass proper types to size_binop.
20732         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
20733         (finish_struct_1): Likewise.
20734         (skip_rtti_stuff): Arg N is now pointer to signed.
20735         (layout_class_type): Use size_zero_node.
20736         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
20737         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
20738         * decl.c (complete_arry_type): Pass proper types to size_binop.
20739         (xref_basetypes): BINFO_OFFSET is sizetype.
20740         * error.c (dump_expr): Don't use size_binop non-sizes.
20741         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
20742         * init.c (construct_virtual_bases): Fix type error.
20743         (build_vec_delete_1): Pass proper type to size_binop and don't
20744         fold result.
20745         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
20746         * rtti.c (get_base_offset): Pass proper type to size_binop.
20747         * search.c (dfs_find_vbases): Fix type error.
20748         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
20749         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
20750         * tree.c (debug_binfo): Variable N is signed.
20751         Use HOST_WIDE_INT_PRINT_DEC.
20752         * typeck.c (comptypes): sizetype is same as equivalent integer type.
20753         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
20754         size_one_node and size_zero_node.
20755         (c_alignof): Use size_one_node.
20756         (build_component_addr): Pass proper types to size_binop.
20757         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
20759 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
20761         Implement class scope using-declarations for functions.
20762         * class.c (handle_using_decl): Call add_method for used functions.
20763         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
20764         (add_method): Used functions are hidden by local functions.
20765         (check_bases_and_members): Handle using-decls before finalizing
20766         CLASSTYPE_METHOD_VEC.
20767         * call.c (add_function_candidate): Add ctype parm; if nonzero,
20768         override the type of 'this' accordingly.
20769         (add_template_candidate, add_template_candidate_real): Add ctype parm.
20770         (convert_class_to_reference, build_user_type_conversion_1,
20771         build_new_function_call, build_object_call, build_new_op,
20772         build_new_method_call): Pass ctype parm.
20774         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
20775         the baselink.
20776         * call.c (convert_class_to_reference, build_user_type_conversion_1,
20777         build_new_function_call, build_object_call, build_new_op,
20778         build_new_method_call, build_op_delete_call): Don't get basetype_path
20779         from a baselink.
20780         * typeck.c (build_component_ref): Likewise.
20781         * init.c (build_offset_ref): Likewise.
20782         (resolve_offset_ref): Don't call enforce_access.
20783         Call build_scoped_ref.
20784         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
20785         would cause an error or if -pedantic.
20786         * class.c (alter_access): Lose binfo parm.
20788 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20790         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
20791         types.
20793 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
20795         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
20796         pseudo_type_info creation into the std namespace
20798 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
20800         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
20801         (import_export_class): Remove declaration.
20802         * decl2.c (import_export_class): Make it static.
20803         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
20804         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
20805         EXPR_WITH_FILE_LOCATION.
20806         * lex.c (check_newline): Tweak filename/lineno setting.
20807         * semantics.c (begin_while_stmt): Fix typo in comment.
20809 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20811         * lang-options.h (-fmessage-length=): Add missing option.
20813         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
20815 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
20817         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
20819 2000-02-25  Jim Wilson  <wilson@cygnus.com>
20821         * optimize.c (expand_call_inline): Emit the return label before
20822         evaluating the return value.
20824 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
20826         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
20827         than duplicating functionality here.
20828         * optimize.c: Include input.h.
20829         (expand_call_inline): Use push_srcloc and pop_srcloc.
20830         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
20831         * parse.c: Regenerated.
20832         * Makefile.in (lex.o): Depend on input.h.
20833         (optimize.o): Likewise.
20835 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
20837         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
20838         function type, rather than ICE.
20840 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
20842         * decl.c (grokdeclarator): Call decl_type_access_control.
20843         * parse.y (parse_end_decl): Don't call decl_type_access_control if
20844         decl is null.
20846 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
20848         * decl.c (decls_match): Remove obsolete static member nadgering.
20850 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20852         * decl.c (grokdeclarator): Change ANSI to ISO.
20853         * lex.c (consume_string, readescape, do_identifier): Likewise.
20854         (parse_float, real_yylex): Likewise.
20855         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
20856         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
20857         new_type_id, maybe_label_decls, simple_stmt,
20858         for.init.statement): Likewise.
20859         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
20860         * semantics.c (finish_named_return_value): Likewise.
20861         * parse.c: Regenerate.
20863 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
20865         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
20866         (CPTI_CLASS_STAR_TYPE): Remove.
20867         (vtable_index_type): Likewise.
20868         (class_star_type_node): Remove.
20869         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
20870         (build_binary_op_nodefault): Remove.
20871         * call.c (build_new_op): Use build_binary_op instead of
20872         build_binary_op_nodefault.
20873         * decl.c (init_decl_processing): Remove class_star_type_node
20874         initialization.  Make delta_type_node ptrdiff_type_node under the
20875         new ABI.  Initialize vtable_index_type.
20876         (build_ptrmemfunc_type): Build different structures for the new
20877         ABI.
20878         (build_enumerator): Use build_binary_op instead of
20879         build_binary_op_nodefault.
20880         * method.c (build_overload_value): Mangle pointers-to-members
20881         appropriately under the new ABI.
20882         * typeck.c (build_array_ref): Use build_binary_op instead of
20883         build_binary_op_nodefault.
20884         (get_member_function_from_ptrfunc): Adjust for the new ABI.
20885         (build_binary_op_nodefault): Rename to ...
20886         (build_binary_op): ... this.  Remove old version.  Adjust for
20887         pointer-to-member comparisons under the new ABI.
20888         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
20889         (build_ptrmemfunc): Adjust for the new ABI.
20890         (expand_ptrmemfunc_cst): Likewise.
20891         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
20892         (pfn_from_ptrmemfunc): Adjust for the new ABI.
20894 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
20896         * call.c (build_object_call): Compress consecutive calls to
20897         cp_error.
20898         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
20899         (build_op_delete_call): Adjust message formatting.
20901         * class.c (check_bases): Compress consecutive calls to
20902         cp_pedwarn.
20903         (finish_struct_anon): Say 'ISO C++'.
20905         * decl.c (start_decl): Same here.
20906         (grok_reference_init): Likewise.
20907         (grokfndecl): Correct message formatting.
20908         (grokfndecl): Improve diagnostic.
20909         (check_static_variable_definition): Likewise. Say 'ISO C++'
20910         (compute_array_index_type): Say 'ISO C++'
20911         (create_array_type_for_decl): Compress consecutive calls to
20912         cp_error.
20913         (grokdeclarator): Say 'ISO C++'
20914         (grok_op_properties): Likewise.
20916         * decl2.c (delete_sanity): Clairify diagnostic.
20917         (check_member_template): Same here.
20918         (grok_function_init): Use consistent terminology.
20920         * expr.c (do_case): Say 'ISO C++'
20922         * friend.c (do_friend): Compress consecutive calls to warning.
20924 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
20926         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
20927         * class.c (build_secondary_vtable): Reorganize.  Don't create a
20928         new vtable under the new ABI.
20929         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
20930         computing the size.
20931         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
20932         the initializing elements.
20933         (initialize_vtable): New function.
20934         (dfs_finish_vtbls): Use it.
20935         (dfs_accumulate_vtbl_inits): New function.
20936         (finish_vtbls): Merge primary and secondary vtables under the new
20937         ABI.
20938         (finish_struct_1): Remove redundant call to layout_vtable_decl.
20939         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
20940         aren't VAR_DECLs.
20942         * class.c (build_vtable): New function, split out from ...
20943         (get_vtable_decl): ... here, and ...
20944         (build_secondary_vtable): ... here.
20946         * pt.c (tsubst_decl): Fix formatting.
20948 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
20950         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
20951         (avoid_overlap, build_base_field): Likewise.
20952         (build_base_field, build_base_fields, is_empty_class):
20953         Test DECL_SIZE with integer_zero.
20954         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
20955         * cp-tree.h (struct lang_type): New field size_unit.
20956         (CLASSTYPE_SIZE_UNIT): New macro.
20957         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
20958         (cp_finish_decl): Delete -Wlarger-than processing.
20959         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
20960         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
20961         * tree.c (make_binfo): binfo vector is one entry longer.
20962         (walk_tree): Walk DECL_SIZE_UNIT.
20964 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
20966         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
20967         comment.
20968         (build_vtable_entry): Don't assume all vtable entries are
20969         functions.
20970         (build_vtbl_initializer): Adjust accordingly.
20971         (get_vtable_decl): Fix formatting.
20973 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
20975         * semantics.c (deferred_type_access_control): Walk the entire
20976         type_lookups list.
20977         (save_type_access_control): Rename from
20978         initial_deferred_type_access_control.  Just remember the value.
20979         (decl_type_access_control): New fn.
20980         (begin_function_definition): Use deferred_type_access_control, after
20981         we've started the function.  Set type_lookups to error_mark_node.
20982         * parse.y (frob_specs, fn.def1): Adjust.
20983         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
20984         (parse_end_decl, parse_bitfield0, parse_method): New fns.
20985         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
20986         (after_type_component_declarator0): Likewise.
20987         (after_type_component_declarator): Likewise.
20988         (notype_component_declarator): Likewise.
20989         * cp-tree.h: Adjust.
20991         * decl.c (redeclaration_error_message): Allow redeclaration of
20992         namespace-scope decls.
20994 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
20996         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
20998 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
21000         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
21001         * decl2.c (grokclassfn): Likewise.
21003         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
21005         * decl2.c (lang_decode_option): Don't set default message length
21006         here.
21007         * lex.c (lang_init_options): Set it here.
21009 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
21011         Make DECL_CONTEXT mean the class in which a member function was
21012         declared, even for a virtual function.
21013         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
21014         (DECL_FRIEND_CONTEXT): New macro.
21015         (DECL_REAL_CONTEXT): Remove.
21016         (SET_DECL_FRIEND_CONTEXT): Likewise.
21017         (DECL_VIRTUAL_CONTEXT): Adjust.
21018         (DECL_CLASS_SCOPE_P): Use TYPE_P.
21019         (add_friends): Remove.
21020         (hack_decl_function_context): Likewise.
21021         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
21022         CP_DECL_CONTEXT.
21023         (build_over_call): Fix indentation.  Use DECL_CONTEXT
21024         instead of DECL_CLASS_CONTEXT.
21025         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
21026         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21027         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21028         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
21029         (build_base_field): Likewise.
21030         (finish_struct_1): Likewise.
21031         (build_self_reference): Likewise.
21032         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
21033         DECL_REAL_CONTEXT.
21034         (pushtag): Use decl_function_context, not
21035         hack_decl_function_context.
21036         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21037         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
21038         (pushdecl): Remove bogus code.
21039         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
21040         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21041         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21042         Use decl_function_context, nothack_decl_function_context.
21043         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
21044         (grokdeclarator): Likewise.  Use decl_function_context, not
21045         hack_decl_function_context.
21046         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
21047         (start_function): Use DECL_FRIEND_CONTEXT, not
21048         DECL_CLASS_CONTEXT.  Use decl_function_context, not
21049         hack_decl_function_context.
21050         (finish_function): Use decl_function_context, not
21051         hack_decl_function_context.
21052         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
21053         DECL_CLASS_CONTEXT.
21054         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
21055         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
21056         (grokfield): Likewise.
21057         (finish_builtin_type): Likewise.
21058         (finish_vtable_vardec): Use decl_function_context, not
21059         hack_decl_function_context.
21060         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21061         (start_static_initialization_or_destruction): Likewise.
21062         (finish_static_initialization_or_destruction): Likewise.
21063         (mark_used): Adjust logic for deciding when to synthesize methods.
21064         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
21065         DECL_REAL_CONTEXT.
21066         * error.c (dump_function_decl): Use DECL_CONTEXT, not
21067         DECL_CLASS_CONTEXT.
21068         * friend.c (is_friend): Likewise.
21069         (add_friends): Remove.
21070         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
21071         * lex.c (begin_definition_of_inclass_inline): Use
21072         decl_function_context, not hack_decl_function_context.
21073         (process_next_inline): Likewise.
21074         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
21075         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
21076         DECL_CLASSS_CONTEXT.
21077         (hack_identifier): Likewise.
21078         (synthesize_method):  Use decl_function_context, not
21079         hack_decl_function_context.
21080         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
21081         DECL_REAL_CONTEXT.
21082         (is_member_template): Use decl_function_context, not
21083         hack_decl_function_context.  Use DECL_CONTEXT, not
21084         DECL_CLASS_CONTEXT.
21085         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
21086         DECL_CLASS_CONTEXT.
21087         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
21088         DECL_REAL_CONTEXT.
21089         (push_template_decl_real): Likewise.
21090         (instantiate_class_template): Don't call add_friends.
21091         (tsubst_default_argument): Use DECL_CONTEXT, not
21092         DECL_REAL_CONTEXT.
21093         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
21094         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21095         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
21096         DECL_CLASS_CONTEXT.
21097         * repo.c (repo_inline_used): Likewise.
21098         * search.c (current_scope): Adjust for new _CONTEXT macros.
21099         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
21100         DECL_REAL_CONTEXT.
21101         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
21102         (lookup_fnfields_here):Likewise.
21103         (check_final_overrider): Likewise.
21104         (init_vbase_pointers): Likewise.
21105         (virtual_context): Likewise.
21106         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
21107         (expand_body): Use decl_function_context, not
21108         hack_decl_function_context.
21109         * tree.c (hack_decl_function_context): Remove.
21110         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
21111         DECL_CLASS_CONTEXT.
21112         * typeck2.c (error_not_base_type): Likewise.
21114 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
21116         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
21118 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21120         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
21122 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
21124         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
21126 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
21128         * decl2.c (lang_decode_option): Enable automatic line wrapping.
21130 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
21132         * parse.y (frob_specs): Split out...
21133         (parse_decl): From here.
21134         (fn.def2): Call initial_deferred_type_access_control.
21135         (after_type_component_declarator0): Call frob_specs.
21136         (notype_component_declarator0): Likewise.
21137         * search.c (friend_accessible_p): Nested classes are friends of their
21138         enclosing classes.
21140 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
21142         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
21143         used to create an implicit temporary.
21145         * class.c (dfs_modify_vtables): Tweak calculation of functions to
21146         override.
21148 2000-02-08  Nathan Sidwell  <nathan@acm.org>
21150         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
21151         strip array element qualifiers too.
21153 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
21155         * decl.c (store_parm_decls): Don't build cleanups for parameters
21156         while processing_template_decl.
21158 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
21160         * cp-tree.h (struct saved_scope): Add incomplete field.
21161         (namespace_scope_incomplete): New macro.
21162         * decl.c (pushdecl): Use it.
21163         (hack_incomplete_structures): Use it.  See through artificial
21164         binding levels.
21165         (mark_saved_scope): Mark it.
21167         Implement access control for nested types.
21168         * search.c (type_access_control): New fn.
21169         (accessible_p): Now we do perform access control for types.
21170         * semantics.c (deferred_type_access_control): New fn.
21171         (initial_deferred_type_access_control): New fn.
21172         (begin_function_definition): Call it.  Add lookups parm.
21173         * decl.c (struct binding_level): Add this_class field.
21174         (pushlevel_class): Set it.
21175         (mark_binding_level): Mark it.
21176         (lookup_name_real): Use it.  Call type_access_control.
21177         (mark_saved_scope): Mark lookups field.
21178         * cp-tree.h (flagged_type_tree): Add lookups field.
21179         (struct saved_scope): Add lookups field.
21180         (type_lookups): New macro.
21181         * parse.y (declmods): Now <ftype>.
21182         (parse_decl): Add lookups parm.  Call
21183         initial_deferred_type_access_control.
21184         (lang_extdef): Clear type_lookups.
21185         (typed_declspecs, declmods, typespec): Set lookups field.
21186         (initdcl): Call deferred_type_access_control.
21187         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
21188         component_decl_1, named_parm): Adjust.
21189         * friend.c (is_friend): Nested classes are friends of their
21190         enclosing classes.
21192         * class.c (currently_open_derived_class): New fn.
21193         * method.c (hack_identifier): Use it.
21195         * lex.c (do_identifier): Remove obsolete code.
21197         * parse.y (typed_typespecs): Propagate new_type_flag properly.
21199 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
21201         * tinfo.h: Remove apostrophes from C++ comment (xgettext
21202         thinks this file is plain C).
21204 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21206         * Makefile.in (call.o): Depend on $(EXPR_H).
21208         * call.c: Include "expr.h".
21210         * class.c (dump_class_hierarchy): Add prototype.
21212         * search.c (dfs_get_pure_virtuals): Likewise.
21214 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
21216         * parse.y (simple_stmt): Allow :: token in asm parameter list.
21217         * parse.c: Rebuilt.
21219 2000-01-31  Jim Wilson  <wilson@cygnus.com>
21221         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
21222         Store it in DECL_FCONTEXT.
21223         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
21225 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
21227         * tinfo.h (old abi): #include "tconfig.h".
21228         * tinfo.cc (convert_to_base): Move into old abi section.
21230 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
21232         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
21233         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
21234         (BINFO_PRIMARY_BINFO): New macro.
21235         (BF_DELTA): Rename to ...
21236         (BV_DELTA): ... this.
21237         (BF_VCALL_INDEX): Rename to ...
21238         (BV_VCALL_INDEX): ... this.
21239         (BF_FN): Rename to ...
21240         (BV_FN): ... this.
21241         * class.c (build_vbase_path): Adjust for changes to reverse_path.
21242         (set_rtti_entry): Rename BF_ macros to BV_ variants.
21243         (modify_vtable_entry): Simplify.
21244         (add_virtual_function): Rename BF_ macros to BV_ variants.
21245         (build_vtable_initializer): Likewise.
21246         (get_class_offset_1): Remove.
21247         (dfs_get_class_offset): Likewise.
21248         (get_class_offset): Likewise.
21249         (dfs_find_final_overrider): New function.
21250         (find_final_overrider): Likewise.
21251         (modify_one_vtable): Remove.
21252         (dfs_find_base): New function.
21253         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
21254         find_final_overrider.
21255         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
21256         virtuals.
21257         (dfs_fixup_vtable_deltas): Remove.
21258         (override_one_vtable): Remove.
21259         (merge_overrides): Likewise.
21260         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
21261         unreal chilren of virtual bases.
21262         (finish_struct_1): Don't use merge_overrides.  Don't use
21263         dfs_fixup_vtable_deltas.
21264         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
21265         BINFOs.
21267 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
21268             Jason Merrill  <jason@yorick.cygnus.com>
21270         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
21272 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
21274         * exception.cc (__throw_bad_typeid): Add missing std::.
21276 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21278         * cp-tree.h (make_thunk): PROTO -> PARAMS.
21280 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
21282         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
21284         Runtime support for new-abi rtti.
21285         * inc/typeinfo (type_info::operator!=): Define in class.
21286         (type_info::before, type_info::name, type_info::operator==,
21287         type_info::operator!=): Define new ABI implementations.
21288         (type_info::is_pointer_p, type_info::is_function_p): Declare
21289         new virtual functions.
21290         (type_info::do_catch, type_info::do_upcast): Likewise.
21292         * tinfo.h (__base_class_info): Define new class.
21293         (__class_type_info): Likewise.
21294         (__si_class_type_info): Likewise.
21295         (__vmi_class_type_info): Likewise.
21296         (__dynamic_cast): Prototype.
21298         * tinfo.cc: Conditionalize old and new rtti mechanisms.
21299         (type_info::is_pointer_p): Define new function.
21300         (type_info::is_function_p): Likewise.
21301         (type_info::do_catch): Likewise.
21302         (type_info::do_upcast): Likewise.
21303         (vtable_prefix): New structure for vtable access.
21304         (adjust_pointer): Define new template function.
21305         (contained_p, public_p, virtual_p, contained_public_p,
21306         contained_nonpublic_p, contained_nonvirtual_p): Define new
21307         functions.
21308         (nonvirtual_base_type): New local variable.
21309         (__class_type_info::~__class_type_info): Define.
21310         (__si_class_type_info::~__si_class_type_info): Likewise.
21311         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
21312         (__class_type_info::do_catch): Define new function.
21313         (__class_type_info::do_upcast): Likewise.
21314         (__class_type_info::find_public_src): Likewise.
21315         (__class_type_info::do_find_public_src): Likewise.
21316         (__si_class_type_info::do_find_public_src): Likewise.
21317         (__vmi_class_type_info::do_find_public_src): Likewise.
21318         (__class_type_info::do_dyncast): Likewise.
21319         (__si_class_type_info::do_dyncast): Likewise.
21320         (__vmi_class_type_info::do_dyncast): Likewise.
21321         (__class_type_info::do_upcast): Likewise.
21322         (__si_class_type_info::do_upcast): Likewise.
21323         (__vmi_class_type_info::do_upcast): Likewise.
21324         (__dynamic_cast): Likewise.
21326         * tinfo2.cc (__fundamental_type_info): Define new class.
21327         (__pointer_type_info): Likewise.
21328         (__reference_type_info): Likewise.
21329         (__array_type_info): Likewise.
21330         (__function_type_info): Likewise.
21331         (__enum_type_info): Likewise.
21332         (__ptr_to_member_type_info): Likewise.
21333         (__fundamental_type_info::~__fundamental_type_info): Define.
21334         (__pointer_type_info::~__pointer_type_info): Likewise.
21335         (__reference_type_info::~__reference_type_info): Likewise.
21336         (__array_type_info::~__array_type_info): Likewise.
21337         (__function_type_info::~__function_type_info): Likewise.
21338         (__enum_type_info::~__enum_type_info): Likewise.
21339         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
21340         (__pointer_type_info::do_catch): Define new function.
21341         (__ptr_to_member_type_info::do_catch): Define new function.
21343         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
21344         (__is_pointer): Likewise.
21346         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
21348 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
21350         * cp/class.c (build_vtable): Rename to build_primary_vtable.
21351         (prepare_fresh_vtable): Rename to build_secondary_vtable.
21352         (make_new_vtable): New function.
21353         (modify_vtable_entry): Handle generation of new vtables correctly.
21354         (modify_one_vtable): Remove unused parameter.
21355         (dfs_fixup_vtable_deltas): Likewise.
21356         (override_one_vtable): Use build_secondary_vtable.
21357         (finish_struct_1): Use build_primary_vtable and
21358         build_secondary_vtable.
21360 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
21362         * cp/decl.c: Adjust variable names, comments, help strings.
21364 2000-01-29  Nathan Sidwell  <nathan@acm.org>
21366         * new2.cc (operator delete[]): Use operator delete, don't assume
21367         implementation.
21369 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
21371         * class.c (build_vtbl_initializer): Add argument to
21372         build_vtable_entry call.
21374 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
21376         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
21377         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
21378         (BF_DELTA): New macro.
21379         (BF_VCALL_INDEX): Likewise.
21380         (BF_FN): Likewise.
21381         (THUNK_VCALL_OFFSET): Likewise.
21382         (make_thunk): Change prototype.
21383         * class.c (build_vtable_entry): Integrate
21384         build_vtable_entry_for_fn.  Handle vcall indices.
21385         (build_vtable_entry_for_fn): Remove.
21386         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
21387         BF_VCALL_INDEX, BF_FN.
21388         (modify_vtable_entry): Integrate common code from
21389         modify_one_vtable and dfs_fixup_vtable_deltas.
21390         (add_virtual_function): Set BF_VCALL_INDEX.
21391         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
21392         and BF_FN.
21393         (modify_one_vtable): Simplify.
21394         (dfs_fixup_vtable_deltas): Likewise.
21395         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
21396         * method.c (make_thunk): Handle vcall indices.
21398 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
21400         Compiler side new abi rtti (not enabled).
21401         * cp-tree.h (new_abi_rtti_p): New macro.
21402         (emit_support_tinfos): Prototype new function.
21403         (tinfo_decl_p): Likewise.
21404         (emit_tinfo_decl): Likwise.
21405         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
21406         macros.
21407         (doing_runtime): New local static.
21408         (init_rtti_processing): Add new-abi initializer.
21409         (get_tinfo_decl): Add new-abi logic.
21410         (tinfo_from_decl): Likewise.
21411         (build_dynamic_cast_1): Likewise.
21412         (qualifier_flags): New static function.
21413         (tinfo_base_init): Likewise.
21414         (generic_initializer): Likewise.
21415         (ptr_ref_initializer): Likewise.
21416         (ptmd_initializer): Likewise.
21417         (class_hint_flags): Likewise.
21418         (class_initializer): Likewise.
21419         (synthesize_tinfo_var): Likewise.
21420         (create_real_tinfo_var): Likewise.
21421         (create_pseudo_type_info): Likewise.
21422         (get_vmi_pseudo_type_info): Likewise.
21423         (create_tinfo_types): Likewise.
21424         (emit_support_tinfos): New global function.
21425         (tinfo_decl_p): New global predicate.
21426         (emit_tinfo_decl): New global function.
21427         * class.c (set_rtti_entry): Generalize for old and new rtti.
21428         (build_vtbl_initializer): Likewise.
21429         * decl2.c (finish_file): Likewise.
21431 2000-01-27  Jim Wilson  <wilson@cygnus.com>
21433         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
21434         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
21436 2000-01-27  Mike Stump  <mrs@wrs.com>
21438         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
21439         for scopes.
21441 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
21443         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
21445 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
21447         * optimize.c (calls_setjmp_r): Supply new argument
21448         to special_function_p.
21450 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21452         * call.c: PROTO -> PARAMS.
21453         * class.c: Likewise.
21454         * cp-tree.h: Likewise.
21455         * cvt.c: Likewise.
21456         * decl.c: Likewise.
21457         * decl.h: Likewise.
21458         * decl2.c: Likewise.
21459         * dump.c: Likewise.
21460         * errfn.c: Likewise.
21461         * error.c: Likewise.
21462         * except.c: Likewise.
21463         * expr.c: Likewise.
21464         * init.c: Likewise.
21465         * input.c: Likewise.
21466         * lex.c: Likewise.
21467         * lex.h: Likewise.
21468         * method.c: Likewise.
21469         * optimize.c: Likewise.
21470         * parse.y: Likewise.
21471         * pt.c: Likewise.
21472         * repo.c: Likewise.
21473         * rtti.c: Likewise.
21474         * search.c: Likewise.
21475         * semantics.c: Likewise.
21476         * spew.c: Likewise.
21477         * tree.c: Likewise.
21478         * typeck.c: Likewise.
21479         * typeck2.c: Likewise.
21480         * xref.c: Likewise.
21482 2000-01-25  Richard Henderson  <rth@cygnus.com>
21484         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
21486 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
21488         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
21489         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
21490         (struct vcall_offset_data_s): New type.
21491         (dfs_vcall_offset_queue_p): New function.
21492         (dfs_build_vcall_offset_vtbl_entries): Likewise.
21493         (build_vcall_offset_vtbl_entries): Likewise.
21494         (layout_vtable_decl): Likewise.
21495         (num_vfun_entries): Likewise.
21496         (num_extra_vtbl_entries): Add the entries for vcall offsets.
21497         (build_vtbl_initializer): Likewise.
21498         (dfs_finish_vtabls): Use layout_vtable_decl.
21499         (modify_one_vtables): Always duplicate vtables under the new ABI.
21500         (finish_struct_1): Use layout_vtable_decl.
21502 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21504         * decl.c (member_function_or_else): Change third arg from a format
21505         specifier to an `enum overload_flags'.  Callers changed.
21507 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
21509         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
21510         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
21511         build_const_cast, get_delta_difference, check_return_expr): Avoid
21512         ANSI string concatenation usage.
21514 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
21516         * class.c (layout_class_type): Put the fields required to make a
21517         class non-empty at the end, not the beginning, of the TYPE_FIELDs
21518         list.
21520 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
21522         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
21523         template.
21525         * decl2.c (mark_used): Do instantiate inlines that have been
21526         explicitly instantiated.
21528 2000-01-24  Richard Henderson  <rth@cygnus.com>
21530         * call.c (build_over_call): Use expand_tree_builtin.
21531         * typeck.c (build_function_call_real): Likewise.
21532         (build_binary_op_nodefault): Handle unordered compares.
21534 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21536         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
21537         cp_tree_index values.
21538         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
21539         New global node #defines for them.
21540         * rtti.c (call_void_fn): Replace with ...
21541         (build_runtime_decl): ... new static function.
21542         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
21543         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
21544         (build_dynamic_cast_1): Always produce correctly typed result.
21545         Explicitly produce type_info addresses. Use dynamic_cast_node.
21546         * exception.cc (__throw_bad_cast): Return `void *'.
21547         (__throw_bad_typeid): Return `const type_info &'.
21549 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21551         * cp-tree.h (get_vtable_decl): Prototype new function.
21552         * class.c (get_vtable_decl): New function. Broken out from ...
21553         (build_vtable): ... here. Use it.
21554         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
21555         by get_vtable_decl.
21557 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
21559         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
21560         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
21561         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
21562         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
21563         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
21564         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
21565         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
21566         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
21567         (CPTI_TINFO_VAR_ID): New enumeration.
21568         (__tp_desc_type_node, __access_mode_type_node,
21569         __bltn_desc_type_node, __user_desc_type_node,
21570         __class_desc_type_node, __ptr_desc_type_node,
21571         __attr_desc_type_node, __func_desc_type_node,
21572         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
21573         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
21574         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
21575         enum_desc_type_node, class_desc_type_node,
21576         si_class_desc_type_node, vmi_class_desc_type_node,
21577         ptmd_desc_type_node, base_desc_type_node): New #defines.
21578         (tinfo_fn_id, tinfo_fn_type): Rename to ...
21579         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
21580         (tinfo_var_id): New enumeration.
21581         (DECL_TINFO_FN_P): Augment comment.
21582         * decl.c (cp_global_trees): Adjust documentation.
21583         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
21584         tinfo_decl_type and tinfo_var_id.
21585         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
21586         (build_typeid): Remove unused variable.
21587         (get_tinfo_var): Use tinfo_var_id.
21588         (tinfo_name): New static function.
21589         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
21590         (tinfo_from_decl): Likewise.
21591         (get_base_offset): New static function, broken out of
21592         expand_class_desc.
21593         (expand_si_desc): Use tinfo_name.
21594         (expand_class_desc): Likewise. Lose local static variable.
21595         Use base_desc_type_node. Use get_base_offset.
21596         (expand_ptr_desc): Use tinfo_name.
21597         (expand_attr_desc): Likewise.
21598         (expand_generic_desc): Likewise.
21600         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
21601         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
21603 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21605         * cp-tree.h (__eprintf): Remove declaration.
21606         * tree.c (__eprintf): Remove definition.
21608 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
21609             Mark Mitchell  <mark@codesourcery.com>
21611         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
21612         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
21614 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
21616         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
21618 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
21620         * cp-tree.h (register_dtor_fn): New function.
21621         * decl.c (destroy_local_static): Rename to ...
21622         (register_dtor_fn): ... this.  Give it external linkage.
21623         (expand_static_init): Use it.
21624         * decl2.c (do_static_initialization): Likewise, if using
21625         __cxa_atexit.
21626         (do_static_destruction): Check that __cxa_atexit is not in use.
21627         (finish_file): Don't call do_static_destruction if using
21628         __cxa_atexit.
21630         * typeck.c (convert_arguments): Restore two-message error
21631         reporting.
21633 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
21635         Remap dynamic cast hint values to be consistent across ABIs.
21636         * search.c (dynamic_cast_base_recurse): Remap generated value.
21637         (get_dynamic_cast_base_type): Adjust documentation.
21638         * tinfo.h (__user_type_info::dyncast): Likewise.
21639         (__user_type_info::find_public_subobj): Remap BOFF meaning.
21640         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
21641         (__class_type_info::do_dyncast): Likewise.
21642         (__class_type_info::do_find_public_subobj): Likewise.
21643         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
21645 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21647         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
21649         * typeck2.c (incomplete_type_error): Restore previous
21650         cp_error and cp_error_at call sequence.
21652 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
21654         * class.c (dump_class_hierarchy): Make format agree with argument;
21655         cast pointer to unsigned long and print with %lx.
21657 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
21659         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
21661         * typeck.c (composite_pointer_type, common_type,
21662         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
21663         build_function_call_real, convert_arguments,
21664         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
21665         build_unary_op, mark_addressable, build_compound_expr,
21666         build_static_cast, build_reinterpret_cast, build_const_cast,
21667         build_c_cast, build_modify_expr, get_delta_difference,
21668         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
21669         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
21670         into a single one.
21671         * typeck2.c (readonly_error, abstract_virtuals_error,
21672         process_init_constructor, check_for_new_type): Likewise.
21674 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
21676         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
21677         VAR_DECLs.
21679 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
21681         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
21682         (build_x_typeid): Likewise.
21683         (get_tinfo_fn): Likewise.
21684         (get_tinfo_fn_unused): Rename to ...
21685         (get_tinfo_decl): ... here.
21686         * rtti.c (build_headof): Replace logic error with assertion.
21687         (get_tinfo_fn_dynamic): Rename to ...
21688         (get_tinfo_decl_dynamic): ... here. Make static. Use
21689         complete_type_or_else.
21690         (build_x_typeid): Move into ...
21691         (build_typeid): ... here. Adjust call to
21692         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
21693         throw_bad_typeid expression.
21694         (get_tinfo_fn_unused): Rename to ...
21695         (get_tinfo_decl): ... here. Adjust comment.
21696         (get_tinfo_fn): Delete.
21697         (tinfo_from_decl): New static function.
21698         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
21699         (get_typeid): Use complete_type_or_else.
21700         (build_dynamic_cast_1): Adjust calls to
21701         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
21702         * parse.y (primary): Adjust call to build_typeid.
21703         * except.c (build_eh_type_type_ref): Adjust call to
21704         get_tinfo_decl. Mark as used.
21705         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
21706         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
21707         * parse.c: Regenerated.
21709 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
21711         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
21712         calling convention.
21713         (resolves_to_fixed_type_p): Document calling convention.
21714         * rtti.c (build_x_typeid): Initialize NONNULL.
21716         * cp-tree.h (build_shared_int_cst): New function.
21717         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
21718         * class.c (modify_vtable_entry): Likewise.
21719         (add_virtual_function): Split out code to generated shared
21720         INTEGER_CSTs to build_share_int_cst.
21721         (modify_all_vtables): Handle all the overridden functions here.
21722         Add overridden functions from non-primary virtual bases to the
21723         primary vtable.
21724         (finish_struct_1): Adjust call to modify_all_vtables.  Add
21725         overridden functions from non-primary bases to the vtable.
21726         * tree.c (build_shared_int_cst): New function.
21728         * cp-tree.h (scratchalloc): Remove.
21729         (build_scratch_list): Likewise.
21730         * call.c (convert_class_to_reference): Replace build_scratch_list
21731         and build_expr_list with build_tree_list.
21732         (add_candidate): Replace scratchalloc with expralloc.  Note memory
21733         leak.
21734         (build_user_type_conversion_1):  Replace build_scratch_list
21735         and build_expr_list with build_tree_list.
21736         (build_new_op): Likewise.
21737         (build_op_delete_call): Likewise.
21738         (convert_like): Likewise.
21739         * cvt.c (ocp_convert): Likewise.
21740         * decl.c (start_decl): Likewise.
21741         (start_function): Likewise.
21742         (finish_destructor_body): Likewise.
21743         (maybe_build_cleanup_1): Likewise.
21744         * decl2.c (reparse_decl_as_expr): Likewise.
21745         * init.c (perform_member_init): Likewise.
21746         (expand_cleanup_for_base): Likewise.
21747         (build_builtin_delete_call): Likewise.
21748         (build_new_1): Likewise.
21749         (build_delete): Likewise.
21750         * method.c (do_build_assign_ref): Likewise.
21751         * parse.y (already_scoped_stmt): Likewise.
21752         (nontrivial_exprlist): Likewise.
21753         (net_initializer): Likewise.
21754         (initlist): Likewise.
21755         * parse.c: Regenerated.
21756         * rtti.c (build_x_typeid): Likewise.
21757         (build_dynamic_cast_1): Likewise.
21758         * typeck.c (build_x_compound_expr): Likewise.
21759         (build_static_cast): Likewise.
21760         (build_modify_expr): Likewise.
21762         * cp-tree.h (DECL_VINDEX): Add documentation.
21763         * class.c (build_vtable_entry): Likewise.
21764         (start_vtable): Add comment.
21765         (add_virtual_function): Replace pending_hard_virtuals with
21766         overridden_virtuals and pending_virtuals with new_virtuals.
21767         Replace redundant assignments with assertions.
21768         (check_for_override): Add comment.
21769         (check_bases_and_members): Replace pending_hard_virtuals with
21770         overridden_virtuals and pending_virtuals with new_virtuals.
21771         (create_vtbl_ptr): Likewise.
21772         (layout_class_type): Likewise.
21773         (finish_struct_1): Likewise.  Add comments.
21775 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
21777         * class.c (finish_struct_1): Replace redundant code with
21778         assertions.
21780         * cp-tree.h (flag_new_abi): Move.
21781         (flag_use_cxa_atexit): Likewise.
21782         (flag_honor_std): Likewise.
21783         (flag_rtti): Likewise.
21784         (vbase_offsets_in_vtable_p): Define.
21785         (vptrs_present_everywhere_p): Likewise.
21786         (TYPE_CONTAINS_VPTR_P): Likewise.
21787         (dfs_walk_real): Declare.
21788         * class.c (build_vbase_pointer_fields): Check
21789         vbase_offsets_in_vtable_p.
21790         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
21791         BINFO_VPTR_FIELD.
21792         (build_vbase_offset_vtbl_entries): Simplify.
21793         (build_vbase_offset_vtbl_entries): Adjust.
21794         (build_vbase_pointer): Add ability to look up vbase offsets in
21795         vtable.
21796         (start_vtable): New function.
21797         (add_virtual_function): Use it.
21798         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
21799         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
21800         (build_vtbl_initializer): Take the type of the complete object as
21801         input.  Use it to correctly calculate vbase offsets.
21802         (dfs_finish_vtbls): Pass the complete type to
21803         build_vtbl_initializer.
21804         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
21805         (create_vtable_ptr): Create a vtable even if there are no
21806         new virtual functions, under the new ABI.
21807         (finish_struct_1): Likewise.
21808         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
21809         * decl.c (exapnd_static_init): Remove call to
21810         preserve_initializer.
21811         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
21812         vtables.
21813         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
21814         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
21815         (construct_virtual_bases): Don't initialize virtual base pointers
21816         under the new ABI.
21817         (build_aggr_init): Clean up comment.
21818         (expand_aggr_init_1): Likewise.
21819         * rtti.c (expand_class_desc): Store the virtual function table
21820         index where the vbase offset lives in the offset field.
21821         * search.c (dfs_walk_real): Make it global.
21822         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
21823         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
21825         * tinfo.h (USItype): Make it signed under the new ABI.
21826         * tinfo.cc (convert_to_base): New function.  Encapsulate base
21827         conversion logic here.
21828         (__class_type_info::do_upcast): Use it.
21829         (__class_type_info::do_dyncast): Likewise.
21830         (__class_type_info::do_find_public_subobj): Likewise.
21832         * init.c (construct_virtual_bases): Don't look up the addresses of
21833         virtual bases at run-time.
21835         * class.c (build_vbase_pointer): Relocate.
21836         (build_vbase_pointer_fields): Likewise.
21837         (dfs_build_vbase_offset_vtbl_entries): Likewise.
21838         (build_vbase_offset_vtbl_entries): Likewise.
21840         * decl.c (init_decl_processing): Complain if -fnew-abi
21841         -fno-vtable-thunks is used.
21843         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
21844         flag_new_abi.
21846 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
21848         * cp-tree.h (num_extra_vtbl_entries): New function.
21849         (size_extra_vtbl_entries): Likewise.
21850         (dfs_vtable_path_unmark): Likewise.
21851         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
21852         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
21853         * class.c (num_extra_vtbl_entries): New function.
21854         (size_extra_vtbl_entries): Likewise.
21855         (dfs_build_vbase_offset_vtbl_entries): New function.
21856         (build_vbase_offset_vtbl_entries): Likewise.
21857         (build_vtbl_initializer): Use it.
21858         (finish_struct_1): Adjust vtable sizes (using
21859         num_extra_vtbl_entries).
21860         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
21861         THUNK_DECL is non-NULL before expanding it.
21862         * init.c (expand_virtual_init): Adjust the vtable pointer by
21863         size_extra_vtbl_entries before storing it.
21864         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
21865         Handle TREE_LIST parameters here, not in the dfs_* functions.
21866         (dfs_unmarked_real_bases_queue_p): Adjust.
21867         (dfs_marked_real_bases_queue_p): Likewise.
21868         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
21869         (dfs_vtable_path_marked_real_bases_queue_p): New function.
21870         (dfs_vtable_path_unmark): Likewise.
21872 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
21874         * optimize.c (copy_body_r): Clear the operand three of a
21875         TARGET_EXPR when copying it.
21877 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
21879         * method.c (build_decl_overload_real): Check whether we are in ::
21880         before returning __builtin_new/delete.
21882 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
21884         * pt.c (tsubst_friend_function): Improve comment.
21885         (instantiate_decl): Avoid crashing when a "nested" function is
21886         instantiated from the top level.
21888         * dump.c (dqeueue_and_dump): Dump
21889         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
21891 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
21893         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
21895 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
21897         * g++spec.c (lang_specific_driver): Add -fnew-abi if
21898         ENABLE_NEW_GXX_ABI defined.
21899         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
21900         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
21901         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
21903 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
21905         * decl.c (start_cleanup_fn): Call pushdecl.
21907         * call.c (convert_class_to_reference): Fix typos.
21908         (build_conditional_expr): Handle errors gracefully.
21909         * class.c (push_nested_class): Likewise.
21910         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
21911         (DECL_THIS_EXTERN): Use it.
21912         (DECL_THIS_STATIC): Likewise.
21913         * cvt.c (convert_to_void): Handle errors gracefully.
21914         (build_expr_type_conversion): Likewise.
21915         * decl.c (maybe_push_decl): Likewise.
21916         (start_decl_1): Likewise.
21917         (require_complete_types_for_parms): Likewise.
21918         * parse.y (structsp): Likewise.
21919         (base_class): Likewise.
21920         * parse.c: Regenerated.
21921         * pt.c (finish_member_template_decl): Likewise.
21922         * typeck.c (decay_conversion): Likewise.
21924         * cp-tree.h (dfs_skip_vbases): New function.
21925         (find_vbase_instance): Likewise.
21926         * class.c (determine_primary_base): Allow a nearly empty base to
21927         serve as a primary base class under the new ABI.
21928         (get_class_offset_1): Rename to ...
21929         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
21930         messages here.
21931         (get_class_offset): Use it.  Issue error messages here.
21932         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
21933         find the right copies of virtual bases.
21934         (fixup_vtable_deltas1): Rename to ...
21935         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
21936         bases as primary bases.
21937         (fixup_vtable_deltas): Remove.
21938         (override_one_vtable): Handle virtual bases as primary bases.
21939         (merge_overrides): Likewise.
21940         (finish_struct_1): Likewise.
21941         (dump_class_hierarchy): Dump primary-ness of bases as well.
21942         * search.c (mark_primary_bases): Use a pre-order traversal to
21943         handle primary virtual bases.
21944         (dfs_skip_vbases): New fiunction.
21945         (expand_upcast_fixups): Adjust to handle primary virtual bases.
21946         (fixup_virtual_upcast_offsets): Likewise.
21947         (fixup_all_virtual_upcast_offsets): Likewise.
21948         (dfs_find_vbase_instances): New function.
21949         (find_vbase_instance): Likewise.
21951 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
21953         * lex.c (DIR_SEPARATOR): Delete macro.
21955 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
21957        * decl2.c (lang_decode_option): Handle automatic line wrapping
21958        option.
21960 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
21962         * friend.c (do_friend): Don't resolve scopes when processing
21963         template declarations, even if the qualifying scope doesn't
21964         involve template parameters.
21966 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
21968         * class.c (dfs_modify_vtables_queue_p): Remove.
21969         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
21970         and dfs_marked_real_bases_queue_p instead of
21971         dfs_modify_vtables_queue_p.
21973         * class.c (build_vbase_path): Simplify.
21974         (dfs_propagate_binfo_offsets): New function.
21975         (propagate_binfo_offsets): Use it.
21976         (remove_base_field): Simplify.
21977         (dfs_set_offset_for_vbases): Remove.
21978         (dfs_set_offset_for_shared_vbases): New function.
21979         (dfs_set_offset_for_unshared_vbases): Likewise.
21980         (layout_virtual_bases): Use them.
21981         (layout_basetypes): Don't call propagate_binfo_offsets.
21982         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
21983         for the vbases.
21985         * class.c (build_base_field): New function, split out from ...
21986         (build_base_fields): ... here.  Use it.  Allocate primary bases
21987         first, under the new ABI.
21988         (get_vtable_entry): Remove.
21989         (remove_base_field): New function, split out from ...
21990         (remove_base_fields): ... here.  Adjust since primary bases come
21991         first under the new ABI.
21993         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
21994         (initialize_vtbl_ptrs): New function.
21995         (expand_indirect_vtbls_init): Change prototype.
21996         (convert_pointer_to_vbase): Declare.
21997         * init.c (expand_direct_vtbls_init): Remove.
21998         (dfs_initialize_vtbl_ptrs): New function.
21999         (initialize_vtbl_ptrs): Likewise.
22000         (emit_base_init): Use initialize_vtbl_ptrs.
22001         * search.c (convert_pointer_to_vbase): Make it global.
22002         (expand_indirect_vtbls_init): Remove vtable initialization code.
22003         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
22005         * class.c (dfs_finish_vtbls): New function.
22006         (finish_vtbls): Use it.
22007         (dump_class_hierarchy): New function.
22009         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
22010         (BINFO_VBASE_PRIMARY_P): New macro.
22011         (BINFO_VIRTUALS): Add to documentation.
22012         (SET_BINFO_PRIMARY_MARKED_P): Remove.
22013         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22014         (dfs_mark_primary_bases_queue_p): Likewise.
22015         (dfs_unmarked_real_bases_queue_p): New function.
22016         (dfs_marked_real_bases_queue_p): Likewise.
22017         * search.c (dfs_mark_primary_bases): Adjust.
22018         (mark_primary_bases): Likewise.
22019         (get_shared_vbase_if_not_primary): New function.
22020         (dfs_unmarked_real_bases_queue_p): Likewise.
22021         (dfs_marked_real_bases_queue_p): Likewise.
22022         (dfs_get_pure_virtuals): Simplify.
22023         (get_pure_virtuals): Likewise.
22025 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
22027         * lex.c: Include tm_p.h.
22029 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
22031         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
22033 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
22035         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
22036         * pt.c (instantiate_decl): Defer comdat templates that might not be
22037         needed.
22039         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
22040         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
22041         (finish_file): Likewise.
22043         * decl2.c (import_export_class): Undo 12/14 change.
22045         * error.c (dump_decl): operator new, not operatornew.
22047         * class.c (field_decl_cmp): A nontype is "greater" than a type.
22048         * search.c (lookup_field_1): Look for the last field with the
22049         desired name.
22051 2000-01-05  Nathan Sidwell  <nathan@acm.org>
22053         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
22054         FUNCTION_DECL.
22056 2000-01-05  Nathan Sidwell  <nathan@acm.org>
22058         * typeck.c (build_static_cast): Don't strip target qualifiers
22059         when casting from a class.
22061 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
22063         * class.c (warn_hidden): Initialize variable `fndecl'.
22065 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
22067         * decl.c (flag_isoc9x): New variable to be able to use code in
22068         c-common.c.  For now always zero.
22070 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
22072         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
22073         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
22074         or unshare_base_binfos for virtual bases here.
22075         * search.c (dfs_get_vbase_types): Do it here.
22076         (get_vbase_types): Adjust.
22078 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
22080         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
22081         (BINFO_PRIMARY_MARKED_P): Use flag 5.
22082         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22083         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22084         (unmark_primary_bases): Remove declaration.
22085         (unmarkedp): Declare.
22086         (dfs_vbase_unmark): Likewise.
22087         * class.c (determine_primary_base): Return immediately if there
22088         are no base classes.  Call mark_primary_bases here.
22089         (modify_all_direct_vtables): Remove.
22090         (modify_all_indirect_vtables): Remove.
22091         (dfs_modify_vtables_queue_p): New function.
22092         (dfs_modify_vtables): New function.
22093         (modify_all_vtables): Use them.
22094         (build_base_fields): Build FIELD_DECLs for primary virtual base
22095         classes.
22096         (create_vtable_ptr): Don't call determine_primary_base here.
22097         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
22098         (dfs_set_offset_for_vbases): ... this.
22099         (layout_virtual_bases): Use it.
22100         (layout_class_type): Call determine_primary_base here.
22101         * search.c (unmarkedp): Make it global.
22102         (shared_marked_p): Simplify.
22103         (shared_unmarked_p): Likewise.
22104         (dfs_primary_bases_queue_p): Remove.
22105         (dfs_unmark_primary_bases): Likewise.
22106         (unmark_primary_bases): Likewise.
22107         (mark_primary_bases): Simplify.
22108         (get_pure_virtuals): Don't call mark_primary_bases here.
22109         (dfs_vbase_unmark): New function.
22110         (get_vbase_types): Simplify.
22112         * class.c (struct base_info): Remove.
22113         (determine_primary_base): Take has_virtual_p rather than a
22114         base_info as input.  Don't calculate max_has_virtual.
22115         (finish_struct_bits): Remove max_has_virtual argument.
22116         (create_vtable_ptr): Remove max_has_virtual_p argument.
22117         (layout_virtual_bases): Remove max argument.
22118         (layout_basetypes): Likewise.
22119         (layout_class_type): Remove max_has_virtual_p argument.
22120         (finish_struct_1): Remove max_has_virtual.
22122         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
22123         (layout_basetypes): Remove.
22124         * class.c (propagate_binfo_offsets): Moved here from tree.c.
22125         Update to handle primary virtual bases.
22126         (remove_base_fields): New function, split out from
22127         layout_basetypes.
22128         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
22129         (layout_virtual_bases): New function, split out from
22130         layout_basetypes.  Update to handle primary virtual bases.
22131         (layout_basetypes): Moved here from tree.c.  Use
22132         remove_base_fields and layout_virtual_bases.
22133         * search.c (dfs_mark_primary_bases_queue_p): New function.
22134         (mark_primary_bases): Use it.
22135         * tree.c (CEIL): Remove.
22136         (propagate_binfo_offsets): Remove.
22137         (layout_basetypes): Remove.
22139 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
22141         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
22142         (BINFO_PRIMARY_MARKED_P): New macro.
22143         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
22144         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
22145         (mark_primary_bases): New function.
22146         (unmark_primary_bases): Likewise.
22147         * search.c (get_abstract_virtuals_1): Remove.
22148         (dfs_mark_primary_bases): New function.
22149         (mark_primary_bases): Likewise.
22150         (dfs_unmark_primary_bases): Likewise.
22151         (unmark_primary_bases): Likewise.
22152         (dfs_get_pure_virtuals): Likewise.
22154 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
22156         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
22157         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
22158         (modify_one_vtable): Adjust.
22159         (fixup_vtable_deltas1): Likewise.
22160         (override_one_vtable): Likewise.
22161         * search.c (get_abstract_virtuals_1): Likewise.
22162         (get_pure_virtuals): Likewise.
22163         (expand_upcast_fixups): Likewise.
22164         * tree.c (debug_binfo): Likewise.
22166         * class.c (build_vtable): Don't return a value.  Don't rebuild
22167         vtables for bases that have already been handled.
22168         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
22169         already been handled.
22170         (modify_one_vtable): Adjust accordingly.
22171         (fixup_vtable_deltas1): Likewise.
22172         (finish_struct_1): Likewise.
22174 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
22176         * call.c (build_new_method_call): Also check destructors.