* targhooks.c: New file.
[official-gcc.git] / gcc / cp / ChangeLog
blobdafa9c545a2cdd00fcab4e2c55f75609d4ce6493
1 2003-09-03  DJ Delorie  <dj@redhat.com>
3         * decl.c (finish_function): Pass fndecl to aggregate_value_p.
5 2003-09-03  Mark Mitchell  <mark@codesourcery.com>
7         PR c++/12053
8         * class.c (include_empty_classes): Correct logic for ABI version 1.
10 2003-09-03  Richard Henderson  <rth@redhat.com>
12         * optimize.c (optimize_function): Push/pop ggc context around
13         the call to optimize_inline_calls.
15 2003-09-02  Scott Brumbaugh  <scottb.lists@verizon.net>
17         PR c++/11553
18         * parser.c (cp_parser_decl_specifier_seq): Add check for a
19         duplicate friend decl-specifier.
21 2003-09-02  Mark Mitchell  <mark@codesourcery.com>
23         PR c++/11847
24         * pt.c (convert_nontype_argument): Correct representation of
25         REFERENCE_TYPE expressions.
27         PR c++/11808
28         * cp-tree.h (KOENIG_LOOKUP_P): New macro.
29         (finish_call_expr): Change prototype.
30         * parser.c (cp_parser_postfix_expression): Adjust call to
31         finish_call_expr.
32         * pt.c (tsubst_copy_and_build): Use KOENIG_LOOKUP_P.
33         * semantics.c (finish_call_expr): Add koenig_p parameter.
35 2003-09-01  Mark Mitchell  <mark@codesourcery.com>
37         PR c++/12114
38         * cp-tree.h (initialize_reference): Change prototype.
39         * call.c (initialize_reference): Add cleanup parameter.
40         * decl.c (grok_reference_init): Likewise.
41         (check_initializer): Likewise.
42         (cp_finish_decl): Insert a CLEANUP_STMT if necessary.
43         (duplicate_decls): When replacing an anticipated builtin, do not
44         honor TREE_NOTHROW.
45         * typeck.c (convert_for_initialization): Correct call to
46         initialize_reference.
48         PR c++/11972
49         * pt.c (dependent_type_p_r): Pass only the innermost template
50         arguments to any_dependent_template_arguments_p.
52 2003-09-01  Josef Zlomek  <zlomekj@suse.cz>
54         * error.c (dump_expr): Kill BIT_ANDTC_EXPR.
55         * lex.c (init_operators): Kill BIT_ANDTC_EXPR.
56         * pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
57         * typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
58         (tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
60 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
62         PR c++/12093
63         * pt.c (build_non_dependent_expr): Do not build a
64         NON_DEPENDENT_EXPR for a STRING_CST.
66         PR c++/11928
67         * search.c (add_conversions): Avoid adding two conversion
68         operators for the same type.
70 2003-08-29  Mark Mitchell  <mark@codesourcery.com>
72         PR c++/6196
73         * pt.c (tsubst_copy_and_build): Correct handling of
74         address-of-label extension.
75         * semantics.c (finish_goto_stmt): The address of a label must go
76         through the lvalue-to-rvalue conversion.
78 2003-08-29  Richard Henderson  <rth@redhat.com>
79             Jason Merrill <jason@redhat.com>
81         * cp-lang.c (LANG_HOOKS_RTL_EXPAND_START): New.
82         (LANG_HOOKS_RTL_EXPAND_STMT): New.
83         * cp-tree.h (cxx_expand_function_start): Declare.
84         * decl.c (start_function): Use allocate_struct_function.
85         Move stmts_are_full_exprs_p assertion from expand_body.
86         Do not free_after_parsing or free_after_compilation.
87         (cxx_push_function_context): Move code to set struct function
88         data from genrtl_start_function.
89         * optimize.c (optimize_function): Don't inc/dec function_depth.
90         * semantics.c (expand_body): Use tree_rest_of_compilation.
91         (cxx_expand_function_start): Rename from genrtl_start_function,
92         omit bits done by tree_rest_of_compilation.
93         (genrtl_finish_function): Remove.
94         (clear_decl_rtl): Move to ../tree-optimize.c.
96 2003-08-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
98         PR c++/11811
99         * cxx-pretty-print.c (pp_cxx_canonical_template_parameter): New
100         function. 
101         * cxx-pretty-print.h: Declare.
102         * error.c (dump_template_parameter): Use it.
103         (dump_type): Likewise.
105 2003-08-28  Mark Mitchell  <mark@codesourcery.com>
107         * init.c (decl_constant_value): Deal with COND_EXPR specially.
108         * call.c (build_conditional_expr): Revert previous patch.
110         PR optimization/5079
111         * call.c (build_conditional_expr): Use decl_constant_value to
112         simplify the arguments.
114 2003-08-26  Dan Nicolaescu  <dann@ics.uci.edu>
116         * parser.c (struct cp_token): Use enum bitfields.
117         (CP_TOKEN_BLOCK_NUM_TOKENS): Make sure cp_token_block fits in a
118         512B allocation unit.
119         (cp_parser_token_tree_map_node): Use enum bitfields.
121 2003-08-26  Nathan Sidwell  <nathan@codesourcery.com>
123         PR c++/11871
124         * decl.c (push_class_level_binding): Correct old_decl value from
125         my 2003-07-29 reorganization.
127         * call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
128         (build_new_method_call): Add goto finish.
129         * semantics.c (simplify_aggr_init_exprs_r): Don't set
130         TREE_SIDE_EFFECTS on a call.
132 2003-08-25  Richard Henderson  <rth@redhat.com>
134         * cxx-pretty-print.c (pp_cxx_class_name): Remove unused function.
136 2003-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
138         * cxx-pretty-print.h (pp_cxx_flag_default_argument): New flag.
139         (cxx_pretty_printer): Adjust base type.
140         (pp_cxx_function_specifier): Declare.
141         * cxx-pretty-print.c (pp_cxx_whitespace): New macro.
142         (pp_cxx_left_paren): Likewise.
143         (pp_cxx_right_paren): Likewise.
144         (pp_cxx_dot): Likewise.
145         (pp_cxx_arrow): Likewise.
146         (pp_cxx_semicolon): Likewise.
147         (pp_cxx_identifier): Likewise.
148         (pp_cxx_cv_qualifier_seq): Likewise.
149         (pp_cxx_storage_class_specifier): Likewise.
150         (pp_cxx_expression_list): Likewise.
151         (pp_cxx_space_for_pointer_operator): Likewise.
152         (pp_cxx_init_declarator): Likewise.
153         (pp_cxx_call_argument_list): Likewise.
154         (pp_cxx_nonconsecutive_character): Tidy.
155         (pp_cxx_conversion_function_id): New function.
156         (pp_cxx_template_id): Likewise.
157         (pp_cxx_template_keyword_if_needed): Likewise.
158         (pp_cxx_nested_name_specifier): Likewise.
159         (pp_cxx_unqualified_id): Tidy
160         (pp_cxx_qualified_id): Handle more nodes.
161         (pp_cxx_primary_expression): Tidy.
162         (pp_cxx_postfix_expression): Likewise.
163         (pp_cxx_new_expression): Tidy.
164         (pp_cxx_delete_expression): Likewise.
165         (pp_cxx_cast_expression): New function.
166         (pp_cxx_pm_expression): Tidy.
167         (pp_cxx_conditional_expression): Likewise.
168         (pp_cxx_assignment_operator): New function.
169         (pp_cxx_assignment_expression): Tidy.
170         (pp_cxx_expression): New function.
171         (pp_cxx_function_specifier): Likewise.
172         (pp_cxx_decl_specifier_seq): Likewise.
173         (pp_cxx_simple_type_specifier): Tidy.
174         (pp_cxx_type_specifier_seq): Likewise.
175         (pp_cxx_ptr_operator): New function.
176         (pp_cxx_implicit_parameter_type): Likewise.
177         (pp_cxx_parameter_declaration): Tidy.
178         (pp_cxx_parameter_declaration_clause): New function.
179         (pp_cxx_exception_specification): Likewise.
180         (pp_cxx_direct_declarator): Tidy.
181         (pp_cxx_declarator): Likewise.
182         (pp_cxx_ctor_initializer): New function.
183         (pp_cxx_function_definition): Likewise.
184         (pp_cxx_abstract_declarator): Tidy.
185         (pp_cxx_direct_abstract_declarator): Likewise.
186         (pp_cxx_type_id): Likewise.
187         (pp_cxx_exception_declaration): New function.
188         (pp_cxx_statement): Likewise.
189         (pp_cxx_simple_declaration): Likewise.
190         (pp_cxx_template_parameter_list): Likewise.
191         (pp_cxx_template_parameter): Likewise.
192         (pp_cxx_template_declaration): Likewise.
193         (pp_cxx_explicit_specialization): Likewise.
194         (pp_cxx_explicit_instantiation): Likewise.
195         (pp_cxx_declaration): Tidy.
196         (pp_cxx_pretty_printer_init): Initialize more fields.
198 2003-08-25  Mark Mitchell  <mark@codesourcery.com>
200         PR c++/8795
201         * cp-tree.h (build_cplus_method_type): Remove.
202         * call.c (standard_conversion): Use build_method_type_directly
203         instead of build_cplus_method_type.
204         * class.c (build_clone): Likewise.
205         (adjust_clone_args): Likewise.
206         * decl.c (build_ptrmem_type): Likewise.
207         (grokdeclarator): Likewise.
208         (check_function_type): Likewise.
209         * decl2.c (grok_method_quals): Likewise.
210         (maybe_retrofit_in_chrg): Likewise.
211         * pt.c (copy_default_args_to_explicit_spec): Likewise.
212         (tsubst_function_type): Likewise.
213         (tsubst): Likewise.
214         * tree.c (build_cplus_method_type): Remove.
215         * typeck.c (merge_types): Use build_method_type_directly.
217 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
219         PR c++/3765
220         * search.c (dfs_access_in_type): Fix typo in comment.
221         (dfs_accessible_queue_p): Likewise.
222         (dfs_accessible_p): Only terminate when a friend is found.
223         (accessible_p): Return immediately if access_in_type allows
224         access.
226 2003-08-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
228         PR c++/641, c++/11876
229         * friend.c (add_friend): Add complain parameter.
230         (make_friend_class): Likewise.
231         (do_friend): Adjust add_friend call.
232         * decl.c (grokdeclarator): Adjust make_friend_class call.
233         * parser.c (cp_parser_member_declaration): Likewise.
234         (cp_parser_template_declaration_after_exp): Likewise.
235         * pt.c (instantiate_class_template): Adjust make_friend_class
236         and add_friend call.
237         * cp-tree.h (make_friend_class): Adjust declaration.
238         (add_friend): Likewise.
240 2003-08-21  Jason Merrill  <jason@redhat.com>
242         PR c++/11283
243         * call.c (build_conditional_expr): Ignore cv-qual differences for
244         non-class types.
246 2003-08-21  Mark Mitchell  <mark@codesourcery.com>
248         PR c++/11551
249         * parser.c (cp_parser_id_expression): Add declarator_p parameter.
250         (cp_parser_primary_expression): Adjust call to
251         cp_parser_id_expression.
252         (cp_parser_unqualified_id): Complain about the use of
253         typedef-names in a destructor declarator.
254         (cp_parser_postfix_expression): Adjust call to
255         cp_parser_id_expression.
256         (cp_parser_type_parameter): Likewise.
257         (cp_parser_template_argument): Likewise.
258         (cp_parser_declarator_id): Likewise.
260         PR c++/11919
261         * call.c (standard_conversion): Use same_type_p, not pointer
262         equality, to compare types.
264         PR c++/10762
265         * parser.c (cp_parser_using_declaration): Check for invalid uses
266         of template-ids here...
267         * decl2.c (do_class_using_decl): ... rather than here.
269 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
271         PR c++/11834
272         * pt.c (more_specialized): Bump processing_template_decl.
274 2003-08-21  Jason Merrill  <jason@redhat.com>
276         PR c++/11614
277         * decl.c (grokdeclarator): Recognize a flexible array based on the
278         type, not the form of the declarator.
280 2003-08-20  Jason Merrill  <jason@redhat.com>
282         * semantics.c (simplify_aggr_init_expr): Split out from
283         simplify_aggr_init_exprs_r.  Convert slot address to match
284         the return type.
285         * cp-tree.h: Declare it.
286         * tree.c (cp_copy_res_decl_for_inlining): Don't clobber the
287         DECL_NAME of a user variable.
289 2003-08-20  Nathan Sidwell  <nathan@codesourcery.com>
291         PR c++/11945
292         * pt.c (build_non_dependent_expr): Look inside COND_EXPR and
293         COMPOUND_EXPR.
294         * semantics.c (finish_expr_stmt): Always convert to void.
295         * typeck.c (build_x_compound_exp): Always convert to void.
297 2003-08-19  Mark Mitchell  <mark@codesourcery.com>
299         PR c++/11684
300         * cp-tree.h (grok_op_properties): Change prototype.
301         * decl.c (grok_op_properties): Add complain parameter.
302         (grokfndecl): Pass it.
303         * pt.c (tsubst_decl): Adjust accordingly.
305         PR c++/10926
306         * decl.c (start_method): Return immediately if push_template_decl
307         does not like the declaration.
308         * pt.c (push_template_decl_real): Disallow member template
309         destructors.
311         PR c++/11036
312         * cp-tree.h (add_binding): Add prototype.
313         * class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
314         (maybe_warn_about_overly_private_class): Use
315         CLASSTYPE_DESTRUCTORS.
316         (pushclass): Adjust call to set_identifier_type_value.
317         * decl.c (add_binding): Give it external linkage.
318         (push_local_binding): Adjust call to add_binding.
319         (push_class_binding): Likewise.
320         (set_identifier_type_value_with_scope): Change prototype.  Use
321         add_binding for global bindings.
322         (set_identifier_type_value): Adjust accordingly.
323         (pushtag): Likewise.
324         (pushdecl): Use set_identifier_type_value, not
325         set_identifier_type_value_with_scope.
326         (pushdecl_namespace_level): Adjust calls to
327         SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
328         (pushdecl_class_level): Likewise.
329         (lookup_tag): Use select_decl.
330         (select_decl): Improve comment.
331         (record_builtin_type): Do not call pushdecl.
332         (cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
333         (cp_finish_decl): Adjust call to set_identifier_type_value.
334         (check_elaborated_type_specifier): Improve checks for invalid uses
335         of typedefs.
336         (xref_tag): Adjust call to check_elaborated_type_specifier.
337         * decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
338         * name-lookup.c (set_namespace_binding): Use add_binding.
339         * parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
340         rather than an IDENTIFIER_NODE, to represent built-in types, if
341         requested by the caller.
342         (cp_parser_postfix_expression): Adjust call.
343         (cp_parser_type_specifier): Likewise.
344         (cp_parser_elaborated_type_specifier): Adjust call to
345         check_elaborated_type_specifier.
346         * typeck2.c (build_functional_cast): Do not perform name lookups.
348         PR c++/10717
349         * decl.c (expand_static_init): Remove unncessary code.
351 2003-08-19  Andrew Pinski  <pinskia@physics.uc.edu>
353         PR c++/10538, PR c/5582
354         * cp/cp-lang.c (LANG_HOOKS_DECL_UNINIT): Define.
356 2003-08-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
358         PR c++/11174
359         * init.c (build_offset_ref): Perform access checking for
360         pointer to member correctly.
362 2003-08-19  Gabriel Dos Reis  <gdr@integrable-solutions.net>
364         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTICS): Fix spelling.
366 2003-08-18  Nathan Sidwell  <nathan@codesourcery.com>
368         PR c++/11957
369         * cp-tree.h (finish_stmt_expr): Add bool parameter.
370         * init.c (finish_init_stmts): Pass true to finish_stmt_expr. Don't
371         adjust the stmt_expr here.
372         (build_vec_init): Use finish_stmt_expr_expr, convert result to
373         array type.
374         * parser.c (cp_parser_primar_expression): Adjust finish_stmt_expr
375         call.
376         * pt.c (tsubst_copy): Likewise.
377         * semantics.c (finish_stmt_expr): Add parameter.
379         * pt.c (instantiate_class_template): Push to class's scope before
380         tsubsting base.
382 Sun Aug 17 10:05:38 CEST 2003  Jan Hubicka  <jh@suse.cz>
384         PR C++/11702
385         * semantics.c (finish_id_expression): Mark all functions as used.
387 2003-08-16  Nathan Sidwell  <nathan@codesourcery.com>
389         PR c++/11512
390         * cvt.c (convert_to_void): Indicate which side of conditional has
391         no effects, and rhs of comma operator. Test for no sideeffect
392         expressions here and always build a convert expr.
393         * init.c (expand_default_init): Convert the init to void.
394         * typeck.c (build_x_compound_expr): Do not check for side effects
395         here.
396         (build_compound_expr): Do not convert lhs when building a
397         template.
399 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
401         * cp-tree.def (NON_DEPENDENT_EXPR): Add operand.
402         * decl2.c (build_offset_ref_call_from_tree): Use
403         build_non_dependent_expr.
404         * error.c (dump_expr) <NON_DEPENDENT_EXPR case>: Dump the operand.
405         * pt.c (build_non_dependent_expr): Set operand.
407 2003-08-14  Jan Hubicka  <jh@suse.cz>
409         * decl2.c (mark_member_pointers): Rename to...
410         (mark_member_pointers_and_eh_tinfos): ... this one; deal with eh tinfos
411         (lower_function): Update call.
412         * except.c (eh_type_info): Break out from ...
413         (build_eh_type): ... here; tinfo is already used.
414         (finish_eh_spec_block): Mark tinfos as used.
415         * semantics.c (finish_handler_params): Mark tinfo as used.
416         * cp-tree.h (eh_type_info): Declare.
418 2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>
420         * pt.c (instantiate_class_template): Set location before
421         substuting bases.
423         * decl.c (make_typename_type): Use my_friendly_assert.
424         * pt.c (tsubst_aggr_type): Rearrange context substitution.
426 Thu Aug 14 12:19:25 CEST 2003  Jan Hubicka  <jh@suse.cz>
428         * method.c (use_thunk): Expand body directly.
430 2003-08-12  Mark Mitchell  <mark@codesourcery.com>
432         PR c++/11703
433         * call.c (type_passed_as): Use TYPE_SIZE, not TYPE_PRECISION to
434         determine whether or not to promote types.
435         (convert_for_arg_passing): Likewise.
436         * decl2.c (cp_build_parm_decl): Do not set DECL_ARG_TYPE in
437         templates.
438         * pt.c (tsubst_decl): Do not expect it to be set.
440         PR c++/9512
441         PR c++/10923
442         * cp-tree.h (check_elaborated_type_specifier): Declare.
443         (handle_class_head): Remove.
444         (note_got_semicolon): Likewise.
445         (note_list_got_semicolon): Likewise.
446         (finish_class_definition): Likewise.
447         * decl.c (check_elaborated_type_specifier): Make it public.
448         Robustify.
449         (handle_class_head): Remove.
450         * parser.c (cp_parser_elaborated_type_specifier): Use
451         check_elaborated_type_specifier.
452         (cp_parser_class_specifier): Do not call finish_class_definition.
453         (cp_parser_class_head): Or handle_class_head.  Check for
454         over-qualified names.
455         * semantics.c (finish_class_definition): Remove.
457         * parser.c (cp_parser_check_for_definition_in_return_type): New
458         function.
459         (cp_parser_simple_declaration): Adjust call to
460         cp_parser_init_declarator.
461         (cp_parser_decl_specifier_seq): Change type of
462         declares_class_or_enum parameter.
463         (cp_parser_explicit_instantiation): Adjust accordingly.
464         (cp_parser_type_specifier): Change type of
465         declares_class_or_enum parameter.
466         (cp_parser_init_declarator): Add declares_class_or_enum
467         parameter.
468         (cp_parser_parameter_declaration): Adjust call to
469         cp_parser_decl_specifier_seq.
470         (cp_parser_function_definition): Likewise.
471         (cp_parser_member_declaration): Likewise.
472         (cp_parser_single_declaration): Likewise.
474         * cp-tree.h (lang_type_class): Remove has_call_overloaded,
475         has_array_ref_overloaded, has_arrow_overloaded, and got_semicolon.
476         (TYPE_OVERLOADS_CALL_EXPR): Remove.
477         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
478         (TYPE_OVERLOADS_ARROW): Likewise.
479         (CLASSTYPE_GOT_SEMICOLON): Likewise.
480         * class.c (check_bases): Do not set them.
481         (finish_struct_1): Likewise.
482         * decl.c (cp_finish_decl): Do not set CLASSTYPE_GOT_SEMICOLON.
483         (build_ptrmemfunc_type): Likewise.
484         (grok_op_properties): Do not set TYPE_OVERLOADS_*.
485         (start_function): Do not check CLASSTYPE_GOT_SEMICOLON.
486         * decl2.c (grokfield): Do not set CLASSTYPE_GOT_SEMICOLON.
487         * lex.c (note_got_semicolon): Remove.
488         (note_list_got_semicolon): Likewise.
489         * parser.c (cp_parser_simple_declaration): Do not call
490         note_list_got_semicolon.
491         * pt.c (list_eq): Remove.
492         (lookup_template_class): Do not set CLASSTYPE_GOT_SEMICOLON.
493         (instantiate_class_template): Do not set TYPE_OVERLOADS*.
494         (instantiate_class_template): Do not set CLASSTYPE_GOT_SEMICOLON.
495         * ptree.c (cxx_print_type): Do not print them.
496         * semantics.c (finish_member_class_template): Do not call
497         note_list_got_semicolon.
499 2003-08-11  Aldy Hernandez  <aldyh@redhat.com>
501         * call.c (standard_conversion): Opaque pointers interconvert.
503         * testsuite/g++.dg/other/opaque-3.C: New.
505 2003-08-11  Mark Mitchell  <mark@codesourcery.com>
507         * typeck.c (merge_types): Handle cv-qualified pointer-to-member
508         types correctly.
510 2003-08-10  Mark Mitchell  <mark@codesourcery.com>
512         PR c++/11789
513         * cp-tree.h (get_vbase): Remove.
514         (get_vbase_types): Remove.
515         * init.c (expand_member_init): Correct logic for looking up base
516         classes.
518 2003-08-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
520         * error.c (dump_expr): Tidy.
521         * cxx-pretty-print.c (pp_cxx_nonconsecutive_character): New.
522         (pp_cxx_begin_template_argument_list): Likewise.
523         (pp_cxx_end_template_argument_list): Likewise.
524         (is_destructor_name): Likewise.
525         (pp_cxx_unqualified_id): Likewise.
526         (pp_cxx_qualified_id): Likewise.
527         (pp_cxx_id_expression): Likewise.
528         (pp_cxx_new_expression): Likewise.
529         (pp_cxx_delete_expression): Likewise.
530         (pp_cxx_pm_expression): Likewise.
531         (pp_cxx_type_specifier): Rework.
532         (pp_cxx_type_id): Likewise.
533         (pp_cxx_primary_expression): Likewise.
534         (pp_cxx_postfix_expression): Likewise.
535         (pp_cxx_unary_expression): Likewise.
536         (pp_cxx_multiplicative_expression): Likewise.
537         (pp_cxx_conditional_expression): Likewise.
538         (pp_cxx_assignment_expression): Likewise.
539         (pp_cxx_pretty_printer_init): Tidy.
541 2003-08-10  Nathan Sidwell  <nathan@codesourcery.com>
543         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): non-NULL
544         NODE is always a TREE_VEC of non-zero size.
545         (NUM_TMPL_ARGS): NODE is always a TREE_VEC.
546         * decl2.c (arg_assoc): Template args will be a vec.
547         * error.c (dump_decl) <TEMPLATE_ID_EXPR case>: Call
548         dump_template_argument_list.
549         (dump_template_parms): Args will be a vec.
550         * parser.c (cp_parser_template_argument_list): Produce a
551         vector, not a list.
552         * pt.c (coerce_template_parms): Args are always vectors.
553         (mangle_class_name_for_template): Likewise.
554         (lookup_template_function): Likewise.
555         (lookup_template_class): Likewise.
556         (tsubst_template_args): Likewise.
557         (tsubst_baselink): Use tsubst_template_args.
558         (tsubst_qualified_id): Likewise.
559         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Likewise.
560         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR case>: Likewise.
561         (any_dependent_template_args_p):  Args are always vectors.
562         * tree.c (cp_tree_equal): Add TEMPLATE_ID_EXPR case.
564         PR c++/11670
565         * call.c (convert_like_real): Add rvalue binding error message.
566         * error.c (dump_expr) <NOP_EXPR case>: Detect when the no expr is
567         really a cast.
569         PR c++/10530
570         * pt.c (dependent_type_p_r): A dependent template-id is a class
571         type with dependent template arguments, or a bound template
572         template parameter.
573         (type_dependent_expression_p): A template function decl cannot
574         have a dependent context.
576 2003-08-07  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
578         PR c++/5767
579         * parser.c (cp_parser_class_name): Return immediately when scope
580         is error_mark_node.
582 2003-08-07  Aldy Hernandez  <aldyh@redhat.com>
584         * cp/Make-lang.in (cp/call.o): Add dependency for target.h.
586         * cp/call.c (standard_conversion): Support opaque types.
587         Include target.h.
588         (strip_top_quals): Use cp_build_qualified_type instead of
589         TYPE_MAIN_VARIANT.
591         * cp/typeck.c (convert_for_assignment): Support opaque types.
593         * testsuite/g++.dg/other/opaque-1.C: New.
595         * testsuite/g++.dg/other/opaque-2.C: New.
597 2003-08-06  Aldy Hernandez  <aldyh@redhat.com>
599         * decl.c (grokparms): Use cp_build_qualified_type instead
600         TYPE_MAIN_VARIANT.
602 2003-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
604         * cxx-pretty-print.h: New file.
605         * cxx-pretty-print.c: Likewise.
606         * error.c (scratch_pretty_printer): Change type.
607         (init_error): Tidy.
608         (dump_aggr_type): Likewise.
609         (dump_global_iord): Likewise.
610         (dump_expr): Likewise.
611         (dump_char): Remove.
612         * cp-lang.c (LANG_HOOKS_INITIALIZE_DIAGNOSTITCS): Define.
613         (cxx_initialize_diagnostics): New function.
614         * Make-lang.in (CXX_OBJS): Add cp/cxx-pretty-print.o
615         (CXX_PRETTY_PRINT_H): New variable.
616         (cp/cxx-pretty-print.o): New rule.
617         (cp/cp-lang.o): Update dependence.
618         (cp/error.o): Likewise.
620 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
622         * cp-tree.h (struct lang_decl): Don't include c_lang_decl.
623         (DECL_DECLARED_INLINE_P): Remove.
624         * decl2.c (import_export_decl): Only look at DECL_DECLARED_INLINE_P
625         if decl is a FUNCTION_DECL.  This never made sense, but now it is
626         required to avoid a tree check failure.
627         * decl.c (grokfndecl): Don't touch DID_INLINE_FUNC.
628         * optimize.c (maybe_clone_body): Likewise.
630 2003-08-04  Roger Sayle  <roger@eyesopen.com>
632         * decl.c (cxx_insert_default_attributes): Delete.
633         * cp-tree.h (cxx_insert_default_attributes): Don't prototype.
634         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Don't define.
636 2003-08-03  Nathan Sidwell  <nathan@codesourcery.com>
638         PR c++/11704
639         * pt.c (type_dependent_expression_p): Cope with COMPONENT_REF with
640         unknown type.
642         PR c++/11766
643         * typeck.c (comp_ptr_ttypes_real): Don't loop on pointers to
644         member functions.
646 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
648         PR c++/9447
649         * cp-tree.def (USING_DECL): Document its type.
650         * class.c (pushclass): If we're entering a template, push any
651         dependent using decls it has.
652         * decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
653         a dependent scope.
654         * pt.c (tsubst_decl) <USING_DECL case>: Set type.
655         (tsubst): Remove USING_DECL checks.
656         (type_dependent_expression_p): Remove USING_DECL case.
657         * semantics.c (finish_member_declaration): A USING_DECL's type
658         indicates whether it is dependent.
660 2003-08-02  Nathan Sidwell  <nathan@codesourcery.com>
662         * cp-tree.h (pushclass): Remove unneeded parameter.
663         * class.c (pushclass): Remove unneeded MODIFY parm. Adjust.
664         (push_nested_class): Adjust pushclass call.
665         * pt.c (instantiate_class_template): Likewise.
666         * semantics.c (begin_class_definition): Likewise.
668 2003-08-01  Nathanael Nerode  <neroden@gcc.gnu.org>
670         * typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
672 2003-08-01  Mark Mitchell  <mark@codesourcery.com>
674         PR c++/11697
675         * decl.c (decls_match): Don't ignore the types of template
676         classes.
678         PR c++/11744
679         * pt.c (tsubst_copy_and_build): Refine Koenig lookup logic.
681 2003-08-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
683         PR c++/8442, c++/8806
684         * decl.c (qualify_lookup): Accept TEMPLATE_DECL if types are
685         preferred.
686         (check_elaborated_type_specifier): Add allow_template_p
687         parameter.  Check tag mismatch and class template.
688         (xref_tag): Add template_header_p parameter.  Add assertion
689         that name is an IDENTIFIER_NODE.  Remove implicit typename
690         warning.  Simplify lookup process if globalize is true.
691         (cxx_init_decl_processing): Adjust call to xref_tag.
692         (xref_tag_from_type): Likewise.
693         * decl2.c (handle_class_head): Likewise.
694         * parser.c (cp_parser_elaborated_type_specifier,
695         cp_parser_class_head): Likewise.
696         * rtti.c (init_rtti_processing, build_dynamic_cast1,
697         tinfo_base_init, emit_support_tinfos): Likewise.
698         * class.c (is_base_of_enclosing_class): Remove.
699         * pt.c (convert_template_argument): Don't accept RECORD_TYPE as
700         template template argument.
701         * cp-tree.h (xref_tag): Adjust declaration.
702         (is_base_of_enclosing_class): Remove.
703         * NEWS: Document template template argument change.
705 2003-08-01  Nathan Sidwell  <nathan@codesourcery.com>
707         * parser.c (cp_parser_init_declarator,
708         cp_paser_member_declaration): Reformat.
709         * pt.c (lookup_template_class, type_unification_real, unify,
710         type_dependent_expression_p): Reformat.
712         PR c++/11295
713         * cp-tree.h (tubst_flags_t): Add tf_stmt_expr_cmpd,
714         tf_stmt_expr_body.
715         (finish_stmt_expr_expr): Declare.
716         * parser.c (cp_parser_primary_expression): Tell
717         cp_parser_compount_statement that it is a statement expression.
718         (cp_parser_statement, cp_parser_labeled_statement,
719         cp_parser_compound_statement, cp_parser_statement_seq_opt): Add
720         in_statement_expr_p parameter.
721         (cp_parser_expression_statement): Likewise. Call
722         finish_stmt_expr_expr for final expression of a statement
723         expression.
724         (cp_parser_for_init_statement,
725         cp_parser_implicitly_scoped_statement,
726         cp_parser_already_scoped_statement, cp_parser_function_definition,
727         cp_parser_try_block, cp_parser_handled): Adjust.
728         * pt.c (tsubst_copy) <STMT_EXPR case>: Pass tf_stmt_expr.
729         (tsubst_expr): Process tf_stmt_expr and tf_stmt_exprs flags.
730         (tsubst_expr) <EXPR_STMT case>: Check tf_stmt_exprs flag.
731         * semantics.c (finish_expr_stmt): Do not deal with statement
732         expressions.
733         (begin_stmt_expr): Clear last_expr_type.
734         (finish_stmt_expr_expr): New.
735         (finish_stmt_expr): Process the value expression.
737         * typeck.c (build_compound_expr): If RHS is a TARGET_EXPR, put the
738         compound expr inside the target's initializer.
740         PR c++/11525
741         * parser.c (cp_parser_primary_expression): Do not set
742         non-constant-p merely because it is a dependent scope.
744         PR c++/9447
745         * decl2.c (do_class_using_decl): Set type to NULL_TREE.
746         * semantics.c (finish_expr_stmt): Do not convert to void in a
747         template.
749 2003-07-31  Nathan Sidwell  <nathan@codesourcery.com>
751         * pt.c (coerce_template_parms): Refactor.
752         (fn_type_unification): Increment processing_template_decl when
753         tsubsting an incomplete set of explicit args.
755         PR c++/11347
756         * pt.c (instantiate_class_template): Increment
757         processing_template_decl around the tsubst of a template member
758         class.
759         (tsubst_qualified_id): Assert we do not have a dependent scope.
761         * pt.c (coerce_template_template_parms, lookup_template_class,
762         can_complete_type_without_circularity, instantiate_class_template,
763         tsubst_decl, unify): Reformat.
765 Thu Jul 31 01:07:41 CEST 2003  Jan Hubicka  <jh@suse.cz>
767         * decl2.c (maybe_make_one_only): Use mark_referenced.
768         * method.c (use_thunk): Likewsie.
770 Wed Jul 30 19:12:48 CEST 2003  Jan Hubicka  <jh@suse.cz>
772         * class.c (build_vtable_entry_ref): Kill.
773         (build_vtbl_ref_1): Do not call build_vtable_entry_ref.
774         (build_vfn_ref): Do not call build_vtable_entry_ref.
775         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Kill.
776         * cp-tree.h (prepare_assemble_variable): Kill.
777         * cp-decl.c (prepare_assemble_variable): Kill.
779 2003-07-29  Geoffrey Keating  <geoffk@apple.com>
781         * parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
782         of setting valid_pch by hand.
784 2003-07-29  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
786         * decl.c (finish_enum): Initialize underlying_type.
788 2003-07-29  Nathan Sidwell  <nathan@codesourcery.com>
790         PR c++/9447
791         * decl.c (add_binding): Add bval local variable.
792         (push_class_level_binding): Likewise. Allow a USING_DECL to be
793         pushed.
794         * decl2.c (do_class_using_decl):  The type of a using decl is
795         unknown.
796         * parser.c (cp_parser_postfix_expression): Refactor unqualified-id
797         function call lookup code.
798         * pt.c (tsubst): A USING_DECL will have unknown type.
799         (tsubst_copy_and_build): Allow a using decl.
800         (type_dependent_expression_p): A USING_DECL will make it
801         dependent.
802         * semantics.c (finish_member_declaration): Push a dependent using
803         declaration.
805 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
807         PR c++/11530
808         * parser.c (cp_parser_postfix_expression): Do not call mark_used.
809         * semantics.c (finish_id_expression): Call mark_used for all
810         declarations.
812 2003-07-28  Mark Mitchell  <mark@codesourcery.com>
814         PR c++/11667
815         * call.c (standard_conversion): Allow all integral->enumeral
816         conversions, after marking them as bad.
817         * decl.c (finish_enum): Make sure that all enumerators are
818         properly converted to the underlying type.
819         (build_enumerator): Set DECL_CONTEXT for namespace-scope
820         enumeration types.
821         * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly.
822         (tsubst_enum): Tidy.
824         * Make-lang.in (typeck.o): Depend on convert.h.
825         (class.o): Likewise.
826         (rtti.o): Likewise.
827         * call.c: Include convert.h.
828         (convert_arg_to_ellipsis): Use convert_to_real.
829         * class.c: Include convert.h.
830         (build_base_path): Use convert_to_integer.
831         * rtti.c: Include convert.h.
832         (build_headof): Use convert_to_integer.
833         * typeck.c: Include convert.h.
834         (decay_conversion): Use convert_to_integer.
835         (build_unary_op): Use build_nop.
836         (get_delta_difference): Use convert_to_integer.
837         (build_ptrmemfunc): Avoid unncessary conversions.
839 Mon Jul 28 23:55:10 CEST 2003  Jan Hubicka  <jh@suse.cz>
841         * decl2.c (mark_member_pointers): Verify that member pointer points to
842         the function.
844 2003-07-28  Nathan Sidwell  <nathan@codesourcery.com>
846         * cp-tree.h (begin_compound_stmt): No scope arg is a bool.
847         (finish_compound_stmt): Remove no scope arg.
848         * decl.c (register_dtor_fn): Adjust begin_compound_stmt and
849         end_compound_stmt calls.
850         (expand_static_init, begin_destructor_body, begin_function_body,
851         finish_function_body): Likewise.
852         * decl2.c (start_objects, finish_objects,
853         start_static_storage_duration_function,
854         finish_static_storage_duration_function): Likewise.
855         * init.c (begin_init_stmts, finish_init_stmts,
856         construct_virtual_base, build_vec_init): Likewise.
857         * method.c (do_build_assign_ref, synthesize_method): Likewise.
858         * parser.c (cp_parser_compound_statement,
859         cp_parser_implicitly_scoped_statement,
860         cp_parser_already_scoped_statement): Likewise.
861         * pt.c (tsubst_expr): Likewise.
862         * semantics.c (begin_compound_stmt): No scope arg is a bool.
863         (finish_compound_stmt): Remove no scope arg.
865         * error.c (dump_expr) <COMPOUND_EXPR case>: A compound expr is
866         always dyadic.
868 2003-07-27  Mark Mitchell  <mark@codesourcery.com>
870         * call.c (standard_conversion): Tweak handling of
871         pointer-to-member types.
872         * pt.c (tsubst): Correctly qualify pointers-to-data member types.
873         * typeck.c (comp_ptr_ttypes_real): Check qualifiers on
874         pointer-to-data member types.
876 2003-07-27  Nathan Sidwell  <nathan@codesourcery.com>
878         * parser.c (cp_parser_type_parameter): Reformat.
879         (cp_parser_parameter_declaration): Deprecate default args where
880         not allowed.
882 2003-07-26  Nathan Sidwell  <nathan@codesourcery.com>
884         * cfns.h: Rebuilt.
886         * cp-tree.h (begin_init_stmts, finish_init_stmts): Remove.
887         (begin_global_stmt_expr, finish_global_stmt_expr): Remove.
888         * init.c (begin_init_stmts): Make static. Return is_global
889         value. Always call begin_stmt_expr.
890         (finish_init_stmts): Make static. Add is_global parm. Always
891         building a stmt tree.
892         (build_aggr_init): Adjust begin_init_stmts, finish_init_stmts calls.
893         (build_vec_init): Likewise. Always building a stmt tree.
894         (expand_default_init): Always building a stmt tree.
895         (get_temp_regvar): Likewise.
896         * semantics.c (begin_global_stmt_expr,
897         finish_global_stmt_expr): Remove.
899 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
901         * cp-tree.h (build_compound_expr): Take LHS & RHS args.
902         (build_x_compound_expr_from_list): Declare.
903         * typeck.c (build_x_compound_expr_from_list): New.
904         (build_x_compound_expr): Adjust.
905         (build_compound_expr): Remove unreachable code. Take two
906         parameters, adjust.
907         * decl.c (grok_reference_init): Use
908         build_x_compound_expr_from_list.
909         (expand_static_init): Adjust build_compound_expr call.
910         (cxx_maybe_build_cleanup): Likewise.
911         * init.c (perform_member_init): Use
912         build_x_compound_expr_from_list.
913         (build_new_1): Likewise.
914         (build_vec_delete): Adjust build_compound_expr calls.
915         (build_vbase_delete): Likewise.
916         * typeck2.c (store_init_value): Use
917         build_x_compound_expr_from_list.
918         (build_functional_cast): Likewise.
920 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
922         * cp-tree.h (enum tsubst_flags_t): Add tf_user.
923         * decl.c (make_typename_type): Pass it.
924         * pt.c (lookup_template_class): Use it.
925         (resolve_typename_type): Pass it.
926         * semantics.c (finish_template_type): Pass it.
928 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
930         PR c++/11617
931         * cp-tree.h (qualified_name_lookup_error): Declare.
932         * pt.c (tsubst_qualified_id): Use qualified_name_lookup_error for
933         errors.
934         (tsubst_expr) <DECL_STMT case>: Likewise.
935         (tsubst_copy_and_build) <COMPONENT_REF case>: Likewise.
936         * semantics.c (qualified_name_lookup_error): New, broken out of ...
937         (finish_id_expression): ... here. Use it.
939 2003-07-25  Falk Hueffner  <falk.hueffner@student.uni-tuebingen.de>
941         * cfns.gperf: Add '%%' delimiter to placate gperf 3.0.
943 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
945         PR c++/11596
946         * pt.c (maybe_fold_nontype_arg, maybe_fold_nontype_args): Remove.
947         (tsubst_template_arg): New.
948         (tsubst_template_arg_vector): Rename to ...
949         (tsubst_template_args): ... this. Accept a TREE_LIST form. Use
950         tsubst_template_arg.
951         (coerce_template_parms): Use tsubst_template_arg for default
952         value.
953         (tsubst_template_parms): Likewise.
954         (tsubst_aggr_type): Adjust.
955         (tsubst_decl): Likewise.
956         (tsubst): Use tsubst_template_arg for a DOMAIN. Adjust.
957         (tsubst_copy) <TEMPLATE_ID_EXPR case>: Use tsubst_template_args.
959 2003-07-25 Gabriel Dos Reis  <gdr@integrable-solutions.net>
961         * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
962         * error.c: Use the new pretty-printer framework.
964 2003-07-24  Per Bothner  <pbothner@apple.com>
966         * decl.c (pushdecl_class_level): Don't use push_srcloc/pop_srcloc
967         which causes errors messages to incorrectly mention included files.
969 2003-07-24  Mark Mitchell  <mark@codesourcery.com>
971         * cp-tree.h (convert_to_base_statically): Declare.
972         * call.c (build_special_member_call): Convert INSTANCE to the base
973         type.
974         * class.c (convert_to_base_statically): New method.
975         * init.c (construct_virtual_base): Use it.
976         * method.c (do_build_assign_ref): Fix typo in comment.
978 2003-07-24  Jason Merrill  <jason@redhat.com>
980         * decl.c: Just set truthvalue_* to boolean_*.
982 2003-07-24  Nathan Sidwell  <nathan@codesourcery.com>
984         * decl.c (reshape_init): Remove unreachable code.
986 2003-07-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
988         PR c++/11513
989         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): Use current_scope.
991 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
993         PR c++/11645
994         * cp-tree.h (accessible_base_p): Declare.
995         * call.c (build_over_call): Use it.
996         * search.c (accessible_base_p): New function, split out from ...
997         (lookup_base): ... here.
999         PR c++/11517
1000         * call.c (build_conditional_expr): Use perform_implicit_conversion
1001         and error_operand_p.  Robustify.
1002         * typeck.c (build_unary_op): Use perform_implicit_conversion.
1004 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
1006         PR c++/10953
1007         * parser.c (cp_parser_nested_name_specifier): Reset scope on
1008         failure.
1009         (cp_parser_elaborated_type_specifier): Likewise.
1011 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
1013         Eliminate use of POINTER_TYPE for pointers-to-members.
1014         * call.c (standard_conversion): Rework pointer-to-member handling.
1015         Add comments.
1016         (add_builtin_candidate): Likewise.
1017         (resolve_scoped_fn_name): Remove.
1018         (build_conditional_expr): Rework pointer-to-member handling.
1019         (compare_ics): Likewise.
1020         * class.c (check_field_decls): Use TYPE_PTR_P.
1021         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
1022         handling.
1023         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
1024         (TYPE_PTRMEM_P): Add comment.
1025         (TYPE_PTR_P): Simplify.
1026         (TYPE_PTROB_P): Correct definition.
1027         (TYPE_PTR_TO_MEMBER_P): New macro.
1028         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
1029         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1030         (resolved_scoped_fn_name): Remove declaration.
1031         (build_offset_ref): Change prototype.
1032         (resolve_offset_ref): Remove.
1033         (comp_target_types): Remove.
1034         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
1035         handling.
1036         (convert_to_reference): Use can_convert.
1037         (ocp_convert): Improve error handling.  Rework pointer-to-member
1038         handling.
1039         (perform_qualification_conversions): Rework pointer-to-member
1040         handling.
1041         * decl.c (build_ptrmem_type): Handle functions too.
1042         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
1043         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
1044         (grokparms): Remove OFFSET_TYPE error message.
1045         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
1046         * error.c (dump_type_prefix): Likewise.
1047         * expr.c (cplus_expand_constant): Use build_nop.
1048         * init.c (build_offset_ref): Add address_p parameter.  Fold in
1049         necessary bits from resolve_offset_ref.
1050         (resolve_offset_ref): Remove.
1051         * parser.c (cp_parser_postfix_expression): Remove special case
1052         code for OFFSET_TYPE.
1053         * pt.c (convert_nontype_argument): Rework pointer-to-member
1054         handling.
1055         (convert_template_argument): Likewise.
1056         (unify): Likewise.
1057         (invalid_nontype_parm_type_p): Likewise.
1058         (dependent_type_p_r): Likewise.
1059         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
1060         (target_incomplete_p_): Rework pointer-to-member
1061         handling.
1062         (get_pseudo_ti_init): Likewise.
1063         (get_pseudo_ti_desc): Likewise.
1064         * semantics.c (finish_qualified_id_expr): Adjust call to
1065         build_offset_ref.  Remove use of resolve_offset_ref.
1066         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
1067         * typeck.c (target_type): Use TYPE_PTRMEM_P.
1068         (type_unknown_p): Remove obsolete code about the time before
1069         non-dependent expressions were handled correctly.
1070         (qualify_type_recursive): Remove.
1071         (composite_pointer_type_r): New function.
1072         (composite_pointer_type): Use it.
1073         (merge_types): Remove dead comments.
1074         (comp_cv_target_types): Remove.
1075         (comp_target_types): Likewise.
1076         (comp_target_parms): Likewise.
1077         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
1078         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
1079         (build_binary_op): Do not use of comp_target_types.
1080         (pointer_diff): Remove OFFSET_TYPE case.
1081         (build_unary_op): Adjust pointer-to-member handling.
1082         (unary_complex_lvalue): Likewise.
1083         (check_for_casting_away_constness): Add description parameter.
1084         (build_static_cast): Pass it.
1085         (build_reinterpret_cast): Use check_for_casting_away_constness.
1086         (build_const_cast): Adjust pointer-to-member handling.
1087         (build_c_cast): Likewise.
1088         (convert_for_assignment): Remove OFFSET_TYPE error message.
1089         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
1090         (comp_ptr_ttypes_reinterpret): Remove.
1091         (casts_away_constness_r): Adjust pointer-to-member handling.
1092         (casts_away_constness): Liekwise.
1093         (strip_all_pointer_quals): Remove.
1094         * typeck2.c (digest_init): Adjust pointer-to-member handling.
1095         (build_m_component_ref): Likewise.
1097 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
1099         * lex.c (unqualified_fn_lookup_error): Mention that the error
1100         message needs to be kept in synch with the manual.
1102 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1104         PR c++/11614
1105         * decl.c (grokdeclarator): An array member is only a flexible
1106         array member if the field itself is the array.
1108 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1110         PR c++/10793
1111         * decl.c (xref_basetypes): Handle error_mark_node.
1113 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
1115         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
1116         * tree.c (lvalue_p_1): Set it.
1117         * class.c (check_field): Don't allow non-packed non-POD fields to
1118         be packed.
1119         * call.c (reference_binding): Need a temporary for all bitfield
1120         and packed fields.
1121         (convert_like_real): Check it is ok to make a temporary here.
1123 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
1125         * cp-tree.h (hack_identifier): Remove.
1126         * method.c (hack_identifier): Remove.
1127         * semantics.c (finish_id_expression): Expand hack_identifier
1128         here. Simplify.
1130 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1132         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
1133         semantics.c typeck.c: Remove unnecessary casts.
1135 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1137         * cp-tree.h (hack_identifier): Remove.
1138         * method.c (hack_identifier): Remove.
1139         * semantics.c (finish_id_expression): Expand hack_identifier
1140         here. Simplify.
1142 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
1144         * cp-tree.h (finish_non_static_data_member): Add object param.
1145         * method.c (hack_identifier): Adjust.
1146         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
1147         again for a FIELD_DECL.
1148         * semantics.c (finish_non_static_data_member): Add object
1149         parameter. Always save the DECL in the COMPONENT_REF.
1150         * call.c (resolve_scoped_fn_name): Adjust.
1152 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
1154         * pt.c (get_bindings): Make definition consistent with
1155         forward declaration.
1157 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1159         PR c++/7809
1160         * friend.c (add_friend): Check access for member functions
1161         and templates.
1163 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1165         PR c++/10668
1166         * typeck.c (build_class_member_access_expr): Improve diagnostic.
1168 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
1170         PR c++/11547
1171         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
1172         macro.
1173         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
1174         * decl.c (duplicate_decls): Merge
1175         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1176         * parser.c (cp_parser_postfix_expression): Adjust call to
1177         cp_parser_initializer_list and
1178         cp_parser_parenthesized_expression_list.
1179         (cp_parser_parenthesized_expression_list): Add non_constant_p.
1180         (cp_parser_new_placement): Adjust call to
1181         cp_parser_parenthesized_expression_list.
1182         (cp_parser_direct_new_declarator): Likewise.
1183         (cp_parser_conditional_expression): Remove.
1184         (cp_parser_constant_expression): Parse an assignment-expression,
1185         not a conditional-expression.
1186         (cp_parser_simple_declaration): Resolve expression/declaration
1187         ambiguity more quickly.
1188         (cp_parser_mem_initializer): Adjust call to
1189         cp_parser_parenthesized_expression_list.
1190         (cp_parser_init_declarator): Keep track of whether or not the
1191         initializer is a constant-expression.
1192         (cp_parser_initializer): Add non_constant_p parameter.
1193         (cp_parser_initializer_clause): Likewise.
1194         (cp_parser_initializer_list): Likewise.
1195         (cp_parser_attribute_list): Adjust call to
1196         cp_parser_parenthesized_expression_list.
1197         (cp_parser_functional_cast): Likewise.
1198         * pt.c (tsubst_decl): Copy
1199         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1200         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
1201         * semantics.c (finish_id_expression): Use
1202         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
1204 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
1206         * lang-options.h: Remove.
1208 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
1210         PR c/10962
1211         * class.c (field_decl_cmp): Remove.
1212         (resort_field_decl_cmp): Remove.
1213         (resort_sorted_fields): Remove.
1214         (add_fields_to_vec): Rename to ...
1215         (add_fields_to_record_type): this.
1216         (finish_struct_1): Change to be using
1217         sorted_fields_type's fields.
1218         * cp-tree.h (lang_decl): In lang_decl_u3
1219         change sorted_fields to be a pointer to
1220         sorted_fields_type.
1221         (resort_sorted_fields): Remove prototype.
1222         * search.c (lookup_field_1): Change to be using
1223         sorted_fields_type's fields.
1225 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1227         PR c++/5421
1228         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
1229         is a member of other class.
1230         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
1231         is a specialization of function template.
1233 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1235         PR c++/10903
1236         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
1237         Improve.
1239 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
1241         * cp-tree.def (LOOKUP_EXPR): Remove.
1242         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
1243         (LOOKUP_EXPR_GLOBAL): Remove.
1244         (get_bindings): Remove.
1245         (is_aggr_type_2): Remove.
1246         * call.c (resolved_scoped_fn_name): Remove support for
1247         LOOKUP_EXPR.
1248         * decl.c (grokfndecl): Likewise.
1249         (grokdeclarator): Likewise.
1250         * error.c (dump_decl): Likewise.
1251         (dump_expr): Likewise.
1252         * friend.c (do_friend): Likewise.
1253         * init.c (build_offset_ref): Likewise.
1254         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
1255         LOOKUP_EXPRs
1256         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
1257         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
1258         test.
1259         * pt.c (get_bindings): Give it internal linkage.
1260         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
1261         (lookup_template_function): Likewise.
1262         (for_each_tempalte_parm_r): Likewise.
1263         (tsubst_decl): Likewise.
1264         (tsubst_qualified_id): Handle template template parameters.
1265         (tsubst_copy): Remove support for LOOKUP_EXPR.
1266         (tsubst_copy_and_build): Likewise.
1267         (most_general_template): Likewise.
1268         (value_dependent_expression_p): Likewise.
1269         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
1270         always dependent.
1271         * semantics.c (perform_koenig_lookup): Do not create
1272         IDENTIFIER_NODEs.
1273         (finish_fname): Likewise.
1274         (finish_id_expression): Likewise.
1275         * tree.c (is_aggr_type_2): Remove.
1277 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1279         PR c++/11531
1280         * typeck.c (check_return_expr): Fix thinko in diagnostic.
1282 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1284         PR c++/10108
1285         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
1286         error_mark_node.
1288 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
1290         PR c++/11509
1291         * pt.c (dependent_scope_ref_p): New function.
1292         (value_dependent_expression_p): Use it.
1293         (type_dependent_expression_p): Likewise.
1295         * pt.c (tsubst_friend_function): Use reregister_specialization.
1297         PR c++/7019
1298         * cp-tree.h (lookup_qualified_name): Adjust prototype.
1299         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
1300         call to is_aggr_type.
1301         * parser.c (cp_parser_lookup_name): Adjust call to
1302         lookup_qualified_name.
1303         * pt.c (tsubst_qualified_id): Likewise.
1304         (tsubst_copy_and_build): Likewise.
1305         * semantics.c (finish_qualified_id_expr): Deal with erroneous
1306         expressions.
1308 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
1310         PR c++/11510
1311         * call.c (op_error): Properly format  REALPART_EXPR and
1312         IMAGPART_EXPR.
1313         * error.c (dump_expr): Likewise.
1315 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
1317         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
1319 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1321         PR c++/5293
1322         * call.c (initialize_reference): Improve diagnostic.
1324 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1326         PR c++/11154
1327         * pt.c (more_specialized_class): Add full_args parameter.
1328         (most_specialized_class): Adjust calls to more_specialized_class.
1329         * cp-tree.h (more_specialized_class): Adjust declaration.
1331 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
1333         * lex.c (enum tree_node_kind): Delete.
1335 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
1337         PR c++/11503
1338         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
1339         (SET_DECL_SELF_REFERENCE_P): Likewise.
1340         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
1341         * pt.c (tsubst_decl): Copy it.
1342         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
1344         * pt.c (reregister_specialization): Fix thinko in previous change.
1346         * cp-tree.h (cp_id_kind): New type.
1347         (unqualified_name_lookup_error): Change prototype.
1348         (unqualified_fn_lookup_error): New function.
1349         (do_identifier): Remove.
1350         (do_scoped_id): Likewise.
1351         (tsubst_copy_and_build): Change prototype.
1352         (reregister_specialization): New function.
1353         (perform_koenig_lookup): Likewise.
1354         (finish_id_expression): Likewise.
1355         * call.c (build_method_call): Adjust call to
1356         unqualified_name_lookup_error.
1357         * decl.c (duplicate_decls): Use reregister_specialization.
1358         * lex.c (is_global): Remove.
1359         (unqualified_name_lookup_error): Return a value.
1360         (do_identifier): Remove.
1361         (do_scoped_id): Likewise.
1362         (identifier_typedecl_value): Remove.
1363         (unqualified_fn_lookup_error): New function.
1364         * parser.c (cp_parser_id_kind): Remove.
1365         (cp_parser_non_constant_id_expression): Remove.
1366         (cp_parser_primary_expression): Use finish_id_expression.
1367         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
1368         cp_parser_id_kind.
1369         (cp_parser_postfix_expression): Use perform_koenig_lookup.
1370         (cp_parser_template_argument): Use cp_id_kind.
1371         (cp_parser_fold_non_dependent_expr): Adjust call to
1372         tsubst_copy_and_build.
1373         * pt.c (unregister_specialization): Rename to ...
1374         (reregister_specialization): This.
1375         (tsubst_friend_function): Use it.
1376         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
1377         (tsubst_qualified_id): Likewise.
1378         (tsubst_expr): Likewise.
1379         (tsubst_copy_and_build): Add function_p parameter.  Use
1380         finish_id_expression.  Introduce RECUR macro.
1381         (tsubst_non_call_postfix_expression): New function.
1382         (regenerate_decl_from_template): Use reregister_specialization.
1383         * semantics.c (perform_koenig_lookup): New function.
1384         (finish_id_expression): Likewise.
1386 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1388         * pt.c (push_access_scope_real): Remove.
1389         (push_access_scope): Move code from push_access_scope_real.
1390         (pop_access_scope): Don't check for TEMPLATE_DECL.
1391         (instantiate_template): Defer access checking during template
1392         substitution.
1393         (regenerate_decl_from_template): Tidy.
1395 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
1397         PR c++/11437
1398         * operators.def: Add definitions for __imag__, __real__.
1400 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
1402         PR c++/11050
1403         * parser.c (cp_parser_expression_list): Rename to ...
1404         (cp_parser_parenthesized_expression_list): ... here. Add attribute
1405         parameter, parse the surounding parentheses.
1406         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
1407         parameters. Return int.
1408         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
1409         (cp_parser_postfix_expression): Adjust function call parsing.
1410         (cp_parser_new_placement): Adjust.
1411         (cp_parser_new_initializer): Likewise.
1412         (cp_parser_cast_expression): Likewise.
1413         (cp_parser_selection_statement): Likewise.
1414         (cp_parser_mem_initializer): Likewise.
1415         (cp_parser_asm_definition): Likewise.
1416         (cp_parser_init_declarator): Likewise.
1417         (cp_parser_declarator): Make
1418         cdtor_or_conv_p an int ptr.
1419         (cp_parser_direct_declarator): Likewise. Check for a parameter
1420         list on cdtors & conv functions.
1421         (cp_parser_initializer): Adjust.
1422         (cp_parser_member_declaration): Adjust.
1423         (cp_parser_attribute_list): Move code into
1424         cp_parser_parens_expression_list.
1425         (cp_parser_functional_cast): Adjust.
1426         * pt.c (type_dependent_expression_p): Erroneous expressions are
1427         non-dependent.
1429 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
1431         * decl.c (cp_finish_decl): Handle 'used' attribute.
1433         * cp-lang.c (c_reset_state): New dummy routine.
1434         * cp-tree.h (finish_file): Move prototype to c-common.h.
1435         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
1437 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
1439         PR c++/8327
1440         * pt.c (tsubst_qualified_id): Implement suggested resolution for
1441         Core Issue 2.
1442         (type_dependent_expression_p): Likewise.
1444 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
1446         * typeck.c (build_binary_op): Do not warn about signed
1447         vs. unsigned comparisons in the bodies of templates.
1449         PR c++/9411
1450         * parser.c (cp_parser_postfix_expression): Check dependency of
1451         functions.
1453 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
1455         PR c++/10032
1456         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
1457         still errors.
1459         PR c++/10527
1460         * error.c (decl_to_string): Do not print default argument
1461         expressions.
1463         * cp-tree.h (break_out_calls): Remove declaration.
1464         * tree.c (break_out_calls): Remove.
1465         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
1467 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
1469         PR c++ 9483
1470         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
1471         * decl2.c (constructor_name_p): Avoid repeated constructor_name
1472         calls.
1473         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
1475 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
1477         * typeck.c (build_x_unary_op): Take note of the fact that
1478         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
1479         trees.
1481         * parser.c (cp_parser_primary_expression): Preserve the form of
1482         qualified expressions in templates, even if they are not
1483         dependent.
1484         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
1485         (tsubst_qualified_id): Likewise.
1486         * search.c (accessible_p): Treat everything in the body of a
1487         template as accessible.
1489 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
1491         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
1492         * cp-tree.h (build_call_from_tree): Remove.
1493         (build_member_call): Likewise.
1494         (dependent_template_arg_p): Remove.
1495         (any_dependent_template_arguments_p): New function.
1496         (dependent_template_id_p): Likewise.
1497         (any_type_dependent_arguments_p): Likewise.
1498         (build_non_dependent_expr): Likewise.
1499         (build_non_dependent_args): Likewise.
1500         (build_x_compound_expr): Adjust prototype.
1501         * call.c (build_new_method_call): Handle non-dependent expressions
1502         correctly.
1503         * decl2.c (grok_array_decl): Likewise.
1504         (build_offset_ref_call_from_tree): Likewise.
1505         (build_call_from_tree): Remove.
1506         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
1507         (dump_expr): Likewise.
1508         * init.c (build_member_call): Remove.
1509         * mangle.c (write_expression): Update handling for template-ids.
1510         * parser.c (cp_parser_primary_expression): Use
1511         any_dependent_template_arguments_p.  Update constant-expression
1512         handling.
1513         (cp_parser_postfix_expression): Use
1514         any_type_dependent_arguments_p.  Simplify call processing.
1515         (cp_parser_unary_expression): Simplify.
1516         (cp_parser_expression): Adjust for changes to
1517         build_x_compound_expr.
1518         (cp_parser_template_argument): Implement standard-conforming
1519         parsing of non-type template arguments.
1520         (cp_parser_direct_declarator): Use
1521         cp_parser_fold_non_dependent_expr.
1522         (cp_parser_fold_non_dependent_expr): New function.
1523         (cp_parser_next_token_ends_template_argument_p): Likewise.
1524         * pt.c (convert_template_argument): Do not call
1525         maybe_fold_nontype_arg.
1526         (tsubst_baselink): Likewise.
1527         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
1528         processing work correctly for non-dependent expressions.  Adjust
1529         handling of COMPOUND_EXPR.  Simplify call processing.
1530         (value_dependent_expression_p): Deal with functional casts and
1531         sizeof/alignof correctly.
1532         (type_dependent_expression_p): Handle overloaded functions.
1533         (any_type_dependent_arguments_p): New function.
1534         (any_dependent_template_arguments_p): Likewise.
1535         (dependent_template_p): Treat SCOPE_REFs as dependent.
1536         (dependent_template_id_p): Simplify.
1537         (build_non_dependent_expr): New function.
1538         (build_non_dependent_args): Likewise.
1539         * semantics.c (finish_stmt_expr): Don't make dependent
1540         statement-expresions have void type.
1541         (finish_call_expr): Handle non-dependent expressions
1542         correctly.
1543         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
1544         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
1545         type size_t, even in templates.
1546         (expr_sizeof): Likewise.
1547         (finish_class_member_access_expr): Handle non-dependent expressions
1548         correctly.
1549         (build_x_indirect_ref): Likewise.
1550         (build_x_binary_op): Likewise.
1551         (build_x_unary_op): Likewise.
1552         (build_x_conditional_expr): Likewise.
1553         (build_x_compound_expr): Likewise.
1554         * typeck2.c (build_x_arrow): Likewise.
1556 Wed Jul  9 02:28:39 CEST 2003  Jan Hubicka  <jh@suse.cz>
1558         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
1559         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
1560         (start_function): Use DECL_ESTIMATED_INSNS.
1561         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
1563         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
1564         unit-at-a-time
1566 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1568         PR c++/11030
1569         * pt.c (instantiate_class_template): Don't call xref_tag to
1570         inject name when the friend class is a specialization.
1572 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
1574         * cp-tree.h (build_scoped_method_call): Remove.
1575         (lookup_qualified_name): Remove parameter.
1576         (tsubst_copy_and_build): Declare.
1577         (finish_qualified_object_call_expr): Remove.
1578         (check_accessibility_of_qualified_id): New function.
1579         (finish_qualified_id_expr): Likewise.
1580         (non_reference): Likewise.
1581         (build_expr_from-tree): Remove.
1582         * call.c (non_reference): Remove.
1583         (build_scoped_method_call): Likewise.
1584         (build_method_call): Use error_operand_p.  Assert that we are not
1585         processing a template.
1586         (standard_conversion): Use non_reference.
1587         * class.c (build_vtbl_entry_ref): Likewise.
1588         (build_vtbl_ref_1): Likewise.
1589         * cvt.c (build_expr_type_conversion): Use non_reference.
1590         * decl.c (lookup_qualified_name): Remove flags parameter.
1591         (grok_op_properties): Use non_reference.
1592         * decl2.c (grok_array_decl): Likewise.
1593         (build_expr_from_tree): Remove.
1594         (build_offset_ref_call_from_tree): Update comment.
1595         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
1596         * except.c (prepare_eh_types): Use non_reference.
1597         (can_convert_eh): Likewise.
1598         * init.c (build_dtor_call): Avoid using build_method_call.
1599         * mangle.c (write_template_param): Remove misleading comment.
1600         * method.c (locate_copy): Use non_reference.
1601         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
1602         (cp_parser_primary_expression): Do not create SCOPE_REFs is
1603         non-dependent contexts.
1604         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
1605         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
1606         build_expr_from_tree.
1607         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
1608         Use check_accessibility_of_qualified_id.
1609         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
1610         build_expr_from_tree.
1611         (tsubst_baselink): New function.
1612         (tsubst_qualified_id): Likewise.
1613         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
1614         (tsubst_expr): Adjust call to lookup_qualified_name.
1615         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
1616         handling of CALL_EXPRs.
1617         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
1618         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
1619         * search.c (check_final_overrider): Likewise.
1620         * semantics.c (check_accessibility_of_qualified_id): New function.
1621         (finish_qualified_object_call_expr): Remove.
1622         * typeck.c (target_type): Use non_reference.
1623         (cxx_sizeof_or_alignof_type): Likewise.
1624         (dubious_conversion_warnings): Likewise.
1625         (convert_for_initialization): Likewise.
1626         (non_reference): New function.
1628 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1630         * decl.c (print_binding_level, print_other_binding_stack,
1631         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
1632         stdio calls.
1633         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
1635 2003-07-07  Andreas Jaeger  <aj@suse.de>
1637         * friend.c: Convert to ISO C90 prototypes.
1639         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
1640         language.
1641         * cfns.h: Regenerate.
1643         * typeck.c: Convert remaining prototypes to ISO C90.
1644         * search.c: Likewise.
1646         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
1647         * semantics.c (expand_or_defer_fn): Likewise
1648         * mangle.c (discriminator_for_string_literal): Likewise.
1649         * g++spec.c (lang_specific_driver): Likewise.
1651         * search.c (lookup_base_r): Remove unused variable.
1653 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
1655         * semantics.c: (genrtl_try_block) Adjust emit_line_note
1656         calls.
1658 2003-07-07  Andreas Jaeger  <aj@suse.de>
1660         * search.c (lookup_base_r): Remove unused variable.
1662 2003-07-06  Michael Chastain  <mec@shout.net>
1664         PR debug/10055
1665         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
1666         assigning to input_filename directly.
1668 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
1670         * call.c: Fix comment formatting.
1671         * class.c: Likewise.
1672         * cp-tree.h: Likewise.
1673         * decl.c: Likewise.
1674         * decl2.c: Likewise.
1675         * error.c: Likewise.
1676         * method.c: Likewise.
1677         * name-lookup.c: Likewise.
1678         * parser.c: Likewise.
1679         * pt.c: Likewise.
1680         * rtti.c: Likewise.
1681         * search.c: Likewise.
1682         * typeck.c: Likewise.
1684 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
1686         PR c++/11345
1687         * search.c (lookup_base_r): Remove is_non_public and
1688         within_current_scope parameters.  Remove other dead code.
1689         (lookup_base): Adjust call to lookup_base_r.
1690         (adjust_result_of_qualified_name_lookup): Improve comment.
1691         * semantics.c (finish_call_expr): Use maybe_dummy_object.
1693 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
1695         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
1696         LANG_HOOKS_MISSING_ARGUMENT): Override.
1698 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
1700         PR c++/11431
1701         * typeck.c (build_static_cast): Check for reference conversions
1702         earlier.
1704 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
1706         * cp-tree.h (perform_integral_promotions): Declare.
1707         * call.c (build_addr_func): Use decay_conversion.
1708         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
1709         (convert_for_arg_passing): Use perform_integral_promotions.
1710         * cvt.c (build_expr_type_conversion): Use decay_conversion.
1711         (type_promotes_to): Do not return a cv-qualified type.
1712         * decl.c (grok_reference_init): Fix formatting.
1713         (get_atexit_node): Use decay_conversion.
1714         (build_enumerator): Use perform_integral_promotions.
1715         * init.c (build_vec_init): Use decay_conversion.
1716         * semantics.c (finish_expr_stmt): Likewise.
1717         (finish_switch_cond): Use perform_integral_promotions.
1718         * typeck.c (default_conversion): Likewise.
1719         (perform_integral_promotions): New function.
1720         (build_indirect_ref): Use decay_conversion.
1721         (build_array_ref): Use perform_integral_promotions.
1722         (convert_arguments): Use decay_conversion.
1723         (build_unary_op): Use perform_integral_promotions.
1724         (build_c_cast): Use decay_conversion.
1725         (build_modify_expr): Likewise.
1726         (convert_for_initialization): Likewise.
1727         * typeck2.c (build_x_arrow): Likewise.
1729 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
1731         * call.c: Fix comment typos.
1732         * class.c: Likewise.
1733         * cp-tree.h: Likewise.
1734         * cvt.c: Likewise.
1735         * decl2.c: Likewise.
1736         * decl.c: Likewise.
1737         * init.c: Likewise.
1738         * mangle.c: Likewise.
1739         * parser.c: Likewise.
1740         * pt.c: Likewise.
1741         * search.c: Likewise.
1742         * semantics.c: Likewise.
1743         * tree.c: Likewise.
1744         * typeck.c: Likewise.
1746 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
1748         * parser.c (cp_lexer_read_token): No need to handle string
1749         constant concatenation.
1751 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1753         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
1754         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
1755         ATTRIBUTE_GCC_CXXDIAG.
1757 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
1759         * call.c (build_addr_func): Handle bound pointers-to-members.
1760         (build_method_call): Do not call resolve_offset_ref.
1761         (implicit_conversion): Likewise.
1762         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
1763         resolve_offset_ref.
1764         (resolve_args): Do not call resolve_offset_ref.
1765         (build_conditional_expr): Likewise.
1766         (build_new_method_call): Likewise.
1767         * cp-tree.def (OFFSET_REF): Update documentation.
1768         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
1769         pointers to members to pointers.
1770         (ocp_convert): Do not call resolve_offset_ref.
1771         (convert_to_void): Likewise.
1772         (build_expr_type_conversion): Likewise.
1773         * decl2.c (delete_sanity): Likewise.
1774         * init.c (resolve_offset_ref): Simplify greatly.
1775         (build_vec_delete): Do not call resolve_offset_ref.
1776         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
1777         if appropriate.
1778         (cp_parser_unary_expression): Use
1779         cp_parser_simple_cast_expression.
1780         (cp_parser_delete_expression): Likewise.
1781         (cp_parser_cast_expression): Likewise.
1782         (cp_parser_pm_expression): Use cp_parser_binary_op.
1783         (cp_parser_simple_cast_expression): New function.
1784         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
1785         * semantics.c (finish_increment_expr): Likewise.
1786         (finish_typeof): Likewise.
1787         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
1788         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
1789         (decay_conversion): Do not call resolve_offset_ref.
1790         (finish_class_member_access_expr): Likewise.
1791         (convert_arguments): Likewise.
1792         (build_x_binary_op): Handle DOTSTAR_EXPR.
1793         (condition_conversion): Do not call resolve_offset_ref.
1794         (unary_complex_lvalue): Likewise.
1795         (build_static_cast): Likewise.
1796         (build_reinterpret_cast): Likewise.
1797         (build_const_cast): Likewise.
1798         (build_c_cast): Likewise.
1799         (build_modify_expr): Likewise.
1800         (convert_for_assignment): Likewise.
1801         (convert_for_initialization): Likewise.
1802         * typeck2.c (build_x_arrow): Likewise.
1803         (build_m_component_ref): Simplify.
1805         * call.c (build_scoped_method_call): Use convert_to_void.
1806         (build_method_call): Likewise.
1807         * class.c (check_field_decls): Remove dead code.
1808         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
1809         * decl2.c (grok_array_decl): Remove dead code.
1810         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1811         as pointer-to-member representation.
1812         * init.c (build_offset_ref): Tidy.
1813         (build_vec_delete_1): Use convert_to_void.
1814         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
1815         as pointer-to-member representation.
1817 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
1819         PR c++/9162
1820         * decl.c (grokdeclarator): Return friend decls, not
1821         void_type_node.
1822         * decl2.c (grokfield): Alter friend decl check.
1823         * parser.c (struct cp_parser): Document default_arg chain on
1824         unparsed_functions_queue.
1825         (cp_parser_save_default_args): New.
1826         (cp_parser_init_declarator, cp_parser_function_definition,
1827         cp_parser_member_declaration): Call it.
1828         (cp_parser_class_specifier): Remove unused variable. Alter
1829         processing of unparsed_functions_queue.
1831 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1833         * class.c (add_method, check_field_decl): Fix format specifier.
1834         * decl.c (duplicate_decls, pushdecl, check_goto,
1835         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
1836         start_enum): Likewise.
1837         * decl2.c (ambiguous_decl): Likewise.
1838         * pt.c (redeclare_class_template): Likewise.
1840 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
1842         PR c++/10219
1843         * pt.c (type_unification_real): Don't unify exprs of error type.
1844         * tree.c (error_type): Don't die on error_type.
1846         PR c++/9779
1847         * decl2.c (arg_assoc_class): Don't die on NULL type.
1848         * typeck.c (type_unknown_p): Don't die on untyped expressions.
1850 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1852         PR c++/6949
1853         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
1854         classes.
1856 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1858         * error.c (locate_error): %P takes an `int', not a `tree'.
1860 Wed Jul  2 00:36:48 CEST 2003  Jan Hubicka  <jh@suse.cz>
1862         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
1863         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
1864         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
1865         massaging.
1867         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
1868         (expand_or_defer_fn): Declare.
1869         (lower_function): Declare.
1870         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
1871         * decl2.c: Include cgraph.h and varpool.h
1872         (maybe_emit_vtables):  Make explicit instantations as needed.
1873         (mark_member_pointers, lower_function): New functions.
1874         (finish_file): Do unit-at-a-time.
1875         * method.c (synthesize_method): Use expand_or_defer_fn.
1876         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
1877         * parser.c (cp_parser_function_definition_after_decl): Use
1878         expand_or_defer_fn.
1879         * pt.c (instantiate_decl): Likewise.
1880         * semantics.c: Include cgraph.h
1881         (expand_or_defer_fn): Break out from ...
1882         (expand_body): ... here; deal with unit-at-a-time.
1883         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
1884         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
1886 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1888         * call.c (resolve_scoped_fn_name): Return error_mark_node for
1889         erroneous cases.
1891 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1893         PR c++/11149
1894         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
1895         is a class type.
1897 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
1899         PR c++/8046
1900         * error.c (dump_decl): Handle BIT_NOT_EXPR as
1901         pseudo destructor calls.
1903 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
1905         * cp-tree.h (define_label): Replace filename and lineno
1906         arguments with a location_t.
1907         * decl.c (pop_label): Adjust define_label call.
1908         (define_label): Replace filename and lineno arguments with a
1909         location_t.
1910         * semantics.c (finish_label): Adjust define_label call.
1912 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
1914         PR c++/9559
1915         * decl2.c (grokfield): Do not build NOP_EXPRs around the
1916         error_mark_node.
1918 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
1920         * Make-lang.in: Update.
1921         * cp-lang.c (c_language): Define.
1922         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
1923         * cp-tree.h (cxx_init_options): Remove.
1924         * lex.c: Don't include diagnostic.h.
1925         (cxx_init_options): Remove.
1927 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
1929         PR c++/4933
1930         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
1931         tree generated within a template. Use dump_expr to dump an
1932         expression sizeof.
1934 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
1936         * mangle.c (write_expression): Exit gracefully when trying to
1937         mangle a CALL_EXPR.
1939 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
1941         PR c++/10750
1942         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
1943         (value- or type-) dependent expression as DECL_INITIAL is a
1944         valid constant-expression (at parser time).
1946 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
1948         PR c++/11106
1949         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
1950         USING_DECL, instead of print_tree_identifier.
1952 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1954         * cp-tree.h (language_to_string): Adjust declaration.
1955         * dump.c (cp_dump_tree): Adjust usage.
1956         * error.c (dump_char): Use output_formatted_scalar. Tidy.
1957         (parm_to_string): Lose unused parameter.  Tidy.
1958         (expr_to_string): Likewise.
1959         (code_to_string): Likewise.
1960         (language_to_string): Likewise.
1961         (op_to_string): Likewise.
1962         (assop_to_string): Likewise.
1963         (digit_buffer): Remove.
1964         (dump_type): Format builtin vector type as __vector__.
1966 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1968         * error.c (print_integer): Remove.
1969         (dump_type_suffix): Adjust.
1970         (dump_expr): Likewise.
1972 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
1974         * error.c (print_instantiation_partial_context): Take a
1975         location_t.
1976         (print_instantiation_full_context): Adjust.
1977         (print_instantiation_context): Adjust.
1979         * cp-tree.h (cp_line_of, cp_file_of): Remove.
1980         * error.c (cp_line_of, cp_file_of): Merge into ...
1981         (location_of): ... here. Make static, return a location_t.
1982         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
1984 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
1986         PR c++/10784
1987         * call.c (joust): Move warn_conversion check outwards.
1989 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
1991         * decl.c (build_typename_type)
1992         * mangle.c (write_template_template_arg)
1993         * parser.c (cp_parser_scope_through_which_access_occurs)
1994         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
1995         * repo.c (get_base_filename)
1996         * semantics.c (maybe_convert_cond):
1997         Mark the definition static, matching the forward declaration.
1999 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2001         PR c++/10468
2002         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
2004 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
2006         PR c++/10796
2007         * decl.c (finish_enum): Implement DR377.
2009         * decl.c (cp_finish_decl): Don't make variables with reference
2010         type readonly while they are being initialized.
2012 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
2014         PR c++/11332
2015         * typeck.c (build_static_cast): Avoid returning expressions with
2016         reference type.
2018 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2020         * call.c (build_op_delete_call): Use strip_array_call. Correct
2021         error message to say 'delete' or 'delete[]'.
2023 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
2025         PR c++/8266
2026         * pt.c (check_explicit_specialization): When looking up a
2027         template function from an identifier outside class-scope, bind
2028         it to CP_DECL_CONTEXT.
2030 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
2032         PR c++/10990
2033         * search.c (lookup_base_r): Rely on accessible_p, rather than
2034         trying to emulate that logic here.
2036         PR c++/10931
2037         * call.c (convert_like): Pass issue_conversion_warnings.
2038         (convert_like_with_context): Likewise.
2039         (convert_like_real): Add issue_conversion_warnings parameter.
2040         (perform_direct_initialization_if_possible): New function.
2041         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
2042         * typeck.c (check_for_casting_away_constness): New function.
2043         (build_static_cast): Rewrite.
2045 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
2047         * call.c (enforce_access): Assert we get a binfo.
2048         (build_op_delete_call): Pass a binfo to
2049         perform_or_defer_access_check.
2050         * class.c (alter_access): Likewise.
2051         * decl.c (make_typename_type): Likewise.
2052         (make_unbound_class_template): Likewise.
2053         * lex.c (do_identifier): Likewise.
2054         * method.c (hack_identifier): Likewise.
2055         * parser.c (cp_parser_lookup_name): Likewise.
2056         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
2057         test.
2058         * semantics.c (finish_non_static_data_member): Likewise.
2059         (perform_or_defer_access_check): Expect a binfo.
2060         * typeck.c (comptypes): Expect types.
2062         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
2063         * friend.c (make_friend_class): Likewise.
2064         * pt.c (check_default_tmpl_args): Likewise.
2065         (lookup_template_class): Likewise.
2067 Tue Jun 24 15:30:05 CEST 2003  Jan Hubicka  <jh@suse.cz>
2069         * method.c (thunk_labelno): Move outside ifdef block to make garbage
2070         collector happy.
2072 Tue Jun 24 13:52:34 CEST 2003  Jan Hubicka  <jh@suse.cz>
2074         * class.c (build_vtable): Make vtables.
2075         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
2076         * decl2.c (output_vtable_inherit): Rename to ...
2077         (prepare_assemble_variable): ... this one; change interface.
2078         (maybe_emit_vtables): Do not call output_vtable_inherit.
2079         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
2080         * cp-tree.h (prepare_assemble_variable): New.
2082 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
2084         * method.c: add prototype for make_alias_for_thunk.
2085         (thunk_labelno, make_alias_for_thunk): only define
2086         if ASM_OUTPUT_DEF is defined.
2088 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2090         * method.c (thunk_labelno): New variable.
2091         (make_alias_for_thunk): New function.
2092         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
2093         into the same section as the function it is calling.
2094         Include gt-cp-method.h.
2095         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
2096         (cp/method.o): Depend on gt-cp-method.h.
2097         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
2099 Mon Jun 23 19:41:27 CEST 2003  Jan Hubicka  <jh@suse.cz>
2101         * decl.c (register_dtor_fn): Mark cleanup as used.
2102         * decl2.c (mark_vtable_entries): Skip nops.
2103         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
2104         (build_dynamic_cast_1): Likewise.
2105         (tinfo_base_init): Likewise.
2106         (emit_tinfo_decl): Likewise.
2108 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
2110         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
2111         to it.
2113 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2115         PR c++/10784
2116         * call.c (joust): Warn about choosing conversion sequence only if
2117         -Wconversion.
2119 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2121         PR c++/10864
2122         * call.c (op_error): Tidy.
2123         * error.c (dump_expr): Properly format 'T()' when T is an
2124         aggregate type.
2126 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
2128         PR c++/10915
2129         * decl.c (grok_op_properties): Warn possible confusing conversion
2130         only if -Wconversion.
2132 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
2134         PR c++/10749
2135         * parser.c (cp_parser_class_head): See through dependent names
2136         when parsing a class-head.
2138         PR c++/10845
2139         * pt.c (try_class_unification): Correct handling of member class
2140         templates.
2142 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2144         * semantics.c (genrtl_finish_function): Adjust
2145         expand_function_end call.
2147 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
2149         PR c++/10939
2150         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
2151         functions.
2152         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
2154         PR c++/9649
2155         * cp-tree.h (pushdecl_class_level): Change prototype.
2156         (push_class_level_binding): Likewise.
2157         * decl.c (add_binding): Reject duplicate static data members.
2158         (pushdecl_class_level): Return a value indicating whether or not
2159         the binding was valid.
2160         (push_class_level_binding): Likewise.
2161         * semantics.c (finish_member_declaration): Don't keep invalid
2162         declarations.
2164         PR c++/11041
2165         * call.c (initialize_reference): Do not use cp_finish_decl to emit
2166         temporary variables.
2167         * cp-tree.h (static_aggregates): Declare.
2168         (pushdecl_top_level_and_finish): Likewise.
2169         * decl.c (pushdecl_top_level_1): New function.
2170         (pushdecl_top_level): Use it.
2171         (pushdecl_top_level_and_finish): New function.
2172         (initialize_local_var): Remove redundant code.
2173         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
2174         building_stmt_tree.
2175         * decl.h (static_aggregates): Remove.
2176         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
2177         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
2178         (tinfo_base_init): Likewise.
2180 2003-06-19  Matt Austern  <austern@apple.com>
2182         PR c++/11228
2183         * init.c (build_zero_init): Assert that number of array elements
2184         is an integer constant.
2185         (build_default_init) Don't use build_zero_init for arrays with
2186         variable number of elements.
2188 2003-06-19  Andreas Jaeger  <aj@suse.de>
2190         * cp-tree.h: Remove duplicated declarations.
2192 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
2194         * pt.c: Convert to ISO C.
2195         * semantics.c: Convert to ISO C.
2197 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2199         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
2200         at_least_as_qualified_p, more_qualified_p): Return bool.
2201         * typeck.c: ANSIFY function definitions.
2202         (comp_array_types): Take redeclaration bool parameter.
2203         (comptypes): Rearrange STRICT handling.
2204         (at_least_as_qualified_p, more_qualified_p,
2205         comp_cv_qualification): Cache cv quals.
2206         (compparms): Rearrange loop.
2208 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
2210         * cp-tree.h (COMPARE_RELAXED): Rename to ...
2211         (COMPARE_DERIVED): ... here. Adjust comment.
2212         (resolve_typename_type_in_current_instantiation): Remove.
2213         (cp_tree_equal, comptypes): Return a bool.
2214         * cvt.c (convert_to_reference): Adjust comptypes call.
2215         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
2216         (resolve_typename_type_in_current_instantiation): Remove.
2217         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
2218         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
2219         calls. Refactor code.
2220         * typeck.c (comp_array_types): Return bool. Lose callback.
2221         parameter. Adjust cp_tree_equal calls.
2222         (comptypes): Return bool. Adjust strict handling. Remove relaxed
2223         enumeration and java type handling. Deal with typename types here.
2224         Adjust recursive and cp_tree_equals calls. Adjust base and derived
2225         checking.
2226         (comp_target_types): Remove unreachable code. Adjust
2227         same_or_base_type_p calls.
2228         (ptr_reasonably_similar): Adjust base and derived check.
2230         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
2231         unused calculation.
2232         (check_return_expr): Adjust error messages.
2233         * cp-tree.def (SCOPE_REF): Correct comment.
2235 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2237         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2238         string again.
2240 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
2242         * optimize.c (dump_function): Form complete flag name by
2243         prefixing 'fdump-' to string returned by dump_flag_name().
2245 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2247         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
2248         string.
2250 2003-06-17  Jason Merrill  <jason@redhat.com>
2252         PR c++/10929
2253         * decl.c (grokfndecl): Don't mark a function inline for
2254         -finline-functions if it isn't defined.
2256 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
2258         PR c++/10712
2259         * class.c (handle_using_decl): Robustify.
2261         PR c++/11105
2262         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
2263         * mangle.c (struct globals): Remove internal_mangling_p.
2264         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
2265         (write_template_parm): Don't write out the level number.
2266         (conv_type_names): New variable.
2267         (hash_type): New function.
2268         (compare_type): Likewise.
2269         (mangle_conv_op_name_for_type): Don't try to mangle conversion
2270         operator names.
2271         * search.c (lookup_conversion_operator): New function.
2272         (lookup_fnfields_1): Use it.
2274 2003-06-17  Andreas Jaeger  <aj@suse.de>
2276         * except.c: Remove duplicate declaration of push_eh_cleanup.
2278         * call.c: Remove extra declaration of inhibit_warnings.
2280 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
2282         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
2283         * mangle.c: Convert to ISO C.
2285 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2287         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
2288         macro.
2290 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
2292         * tree.c: Convert to ISO C.
2294 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
2296         * cp-tree.h: Follow spelling conventions.
2297         * mangle.c: Likewise.
2298         * method.c: Likewise.
2299         * parser.c: Likewise.
2301 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
2303         * decl.c (start_function): Adjust init_function_start call.
2304         * method.c (use_thunk): Likewise.
2305         * semantics.c (genrtl_start_function): Likewise.
2307 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
2309         * Make-lang.in: Remove c-options.o.
2311 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
2313         * lex.c: Convert to ISO C.
2315         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
2316         * init.c: removes use of PARAMS macro.  Use ISO style function
2317         declarations.  (Not copyright-significant change.)
2319         * rtti.c: Remove PARAMS.
2321         * typeck2.c: Convert to ISO C.
2323 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
2325         PR c++/10635
2326         * typeck.c (build_c_cast): Check that the destination type is
2327         complete.
2329 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
2331         PR c++/10432
2332         * cp-tree.h (finish_declarator): Remove.
2333         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
2334         erroneous declarations.
2335         * semantics.c (finish_declarator): Remove.
2337 2003-06-11  Roger Sayle  <roger@eyesopen.com>
2339         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
2340         global static constructor/destructor if it will be empty, i.e.
2341         either doesn't call any ctors/dtors or only calls pure or const
2342         ctors/dtors.
2344 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
2346         * mangle.c (tm_p.h): Include it.
2347         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
2349         PR c++/11131
2350         * tree.c (cp_cannot_inline_fn): Check for "inline" before
2351         instantiation.
2353 2003-06-10  Jason Merrill  <jason@redhat.com>
2355         PR c++/10968
2356         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
2358 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
2360         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
2361         (start_cleanup_cnt): New.
2363 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
2365         PR c++/11131
2366         * cp-tree.h (template_for_substitution): Declare.
2367         * decl2.c (mark_used): Use it when figuring out whether or not a
2368         function is inline.
2369         * pt.c (template_for_substitution): Give it external linkage.
2370         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
2371         possible.
2373 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
2375         PR 8861
2376         * mangle.c (write_real_cst): New function.  Implement
2377         ABI-compliant mangling of floating-point literals when
2378         -fabi-version>=2; provide backward compatibility with 3.3 when
2379         -fabi-version=1 (with warning).  Clarify commentary.
2380         (write_template_arg_literal): Use write_real_cst.
2382 2003-06-07  Andreas Jaeger  <aj@suse.de>
2384         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
2386 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
2388         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
2389         (LANG_HOOKS_HANDLE_OPTION): Override.
2390         * cp-tree.h (cxx_init_options): Update.
2391         * lex.c (cxx_init_options): Update.
2393 Thu Jun  5 18:33:40 CEST 2003  Jan Hubicka  <jh@suse.cz>
2395         * Make-lang.in:  Add support for stageprofile and stagefeedback
2397 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
2399         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
2401 2003-06-04  Andreas Jaeger  <aj@suse.de>
2403         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
2405 2003-06-03  Jason Merrill  <jason@redhat.com>
2407         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
2409         * cp/decl.c (reshape_init): Handle vectors.
2411         * testsuite/g++.dg/init/array10.C: New.
2413 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2415         PR c++/10940
2416         * pt.c (check_explicit_specialization): Check for 'static'
2417         earlier.
2419 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
2421         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
2422         the operand of a CONSTRUCTOR node.
2424 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
2426         * decl.c (cp_binding_level::this_entity): Rename from this_class.
2427         (cxx_scope_descriptor): New function.
2428         (cxx_scope_debug): Likewise.
2429         (push_binding_level): Use it.
2430         (pop_binding_level): Likewise.
2431         (suspend_binding_level): Likewise.
2432         (resume_binding_level): Likewise.
2433         (pushlevel_class): Adjust use of this_class.
2434         (pushtag): Likewise.
2435         (lookup_name_real): Likewise.
2436         (global_scope_name): New variable.
2437         (initialize_predefined_identifiers): Initialize it.
2438         (push_namespace): Use it.
2439         (make_cxx_scope): New function.
2440         (pushlevel): Use it.
2441         (pushlevel_class): Likewise.
2442         (push_binding_level): Simplify.  Loose the last two arguments.
2443         (make_binding_level): Remove.
2444         (initial_push__namespace_scope): New function.
2445         (push_namespace): Use it.  Simplify.
2446         (cxx_init_decl_processing): Likewise.
2447         (declare_namespace_level): Remove.
2449 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2451         PR c++/10956
2452         * pt.c (instantiate_decl): Don't use full template arguments if
2453         we are dealing with specializations.
2455 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2457         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
2458         (binding_depth): Unconditionally define.
2459         (is_class_level): Likewise.
2460         (indent): Likewise.  Take an indenting parameter.
2461         (push_binding_level): Remove conditional definittion.
2462         (pop_binding_level): Likewise.
2463         (suspend_binding_level): Likewise.
2464         (resume_binding_level): Likewise.
2465         (pushlevel): Likewise.
2466         (pushlevel_class): Likewise.
2467         (poplevel_class): Likewise.
2468         (pop_everything): Likewise.
2470 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
2472         * name-lookup.h (global_scope_p): New macro.
2473         * decl.c (pop_binding_level): Use it.  Don't refer directly to
2474         global_binding_level.
2475         (suspend_binding_level): Likewise.
2476         (global_bindings_p): Likewise.
2477         (print_other_binding_stack): Likewise.
2478         (print_binding_stack): Likewise.
2479         (maybe_push_to_top_level): Likewise.
2480         (pushdecl_namespace_level): Likewise.
2481         (cxx_init_decl_processing): Likewise.
2482         (start_decl): Likewise.
2483         (cp_finish_decl): Likewise.
2484         (start_function): Likewise.
2485         (global_binding_level): Remove.
2487 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2489         * parser.c (cp_parser_explicit_instantiation): Restore old
2490         access before template instantiation.
2492 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
2494         * lang-specs.h: Use -o to specify preprocessor's output file.
2495         Make -no-integrated-cpp work when building PCH files.
2497 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2499         PR c++/10682
2500         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
2501         check for implicitly created typedef to an enum.
2503 2003-05-21  Jason Merrill  <jason@redhat.com>
2505         * init.c (build_vec_delete): Copy the address into a temporary
2506         variable before calling build_vec_delete_1.
2507         * decl2.c (delete_sanity): Don't call stabilize_reference.
2509 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
2511         * pt.c (register_specialization): Update the decl's location,
2512         if necessary.
2513         (check_explicit_specialization): Likewise.
2515 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2517         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
2519 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
2521         PR c++/9738
2522         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
2523         if the old decl had instantiated DECL_RTL.
2524         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
2526 2003-05-19  Matt Austern  <austern@apple.com>
2528         * lang-options.h: Document -Wno-invalid-offsetof
2529         * typeck.c (build_class_member_access_expr): Don't complain about
2530         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
2532 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
2534         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
2535         (binding_entry_make): Make entry->chain NULL after getting an entry.
2536         fix the spelling of chain in a comment.
2537         (binding_table_free): speed up by having temporary variable.
2538         (binding_table_new): set table->chain to be NULL after allocating
2539         a table.
2540         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
2541         binding->previous to NULL after getting an binding for speed.
2543 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2545         * cp-tree.h (struct lang_type_class): Replace data member tags
2546         with hash-table nested_udts.
2547         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
2548         * class.c (unreverse_member_declarations): Don't touch
2549         CLASSTYPE_TAGS.
2550         (pushclass): Use cxx_remember_type_decls.
2551         * decl.c (struct cp_binding_level): Replace data member tags with
2552         hash-table type_decls.
2553         (pop_binding_level): Handle level->type_decls.
2554         (kept_level_p): Adjust.
2555         (poplevel): Remove unused local variable.
2556         (bt_print_entry): New function.
2557         (print_binding_level): Use it.
2558         (push_namespace): Build current_binding_level->type_decls.
2559         (maybe_process_template_type_declaration): Adjust.
2560         (pushtag): Likewise.
2561         (clear_anon_tags): Use binding_table_remove_anonymous_types.
2562         (gettags): Remove.
2563         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
2564         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
2565         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
2566         (cxx_init_decl_processing): Build global_binding_level->type_decls.
2567         (store_parm_decls): Remove pointless code.
2568         * name-lookup.c (free_binding_entry): New variable.
2569         (ENTRY_INDEX): New macro.
2570         (struct binding_table_s): New datatype.
2571         (binding_entry_make): New function.
2572         (binding_entry_free): Likewise.
2573         (binding_table_construct): Likewise.
2574         (binding_table_free): Likewise.
2575         (binding_table_new): Likewise.
2576         (binding_table_expand): Likewise.
2577         (binding_table_insert): Likewise.
2578         (binding_table_find): Likewise.
2579         (binding_table_find_anon_type): Likewise.
2580         (binding_table_reverse_maybe_remap): Likewise.
2581         (binding_table_remove_anonymous_types): Likewise.
2582         (binding_table_foreach): Likewise.
2583         * name-lookup.h (binding_table): New type.
2584         (binding_entry): Likewise.
2585         (bt_foreach_proc): Likewise.
2586         (struct binding_entry_s): New datatype.
2587         (SCOPE_DEFAULT_HT_SIZE): New macro.
2588         (CLASS_SCOPE_HT_SIZE): Likewise.
2589         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
2590         (NAMESPACE_STD_HT_SIZE): Likewise.
2591         (GLOBAL_SCOPE_HT_SIZE): Likewise.
2592         (binding_table_new): Declare.
2593         (binding_table_free): Likewise.
2594         (binding_table_insert): Likewise.
2595         (binding_table_find_anon_type): Likewise.
2596         (binding_table_reverse_maybe_remap): Likewise.
2597         (binding_table_remove_anonymous_types): Likewise.
2598         (binding_table_foreach): Likewise.
2599         (binding_table_find): Likewise.
2600         (cxx_remember_type_decls): Likewise.
2601         * pt.c (bt_instantiate_type_proc): New function.
2602         (do_type_instantiation): Use it.
2603         * search.c (lookup_field_r): Use binding_table_find.
2605 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2607         * semantics.c (perform_deferred_access_checks): Don't discard
2608         checked access.
2610 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2612         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
2613         libiberty VA_ macros, always use stdarg.
2614         * rtti.c (create_pseudo_type_info): Likewise.
2615         * tree.c (build_min_nt, build_min): Likewise.
2617 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2619         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
2620         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
2621         collapse multiple function calls into one.
2622         * tree.c (debug_binfo): Likewise.
2624 2003-05-15  Jason Merrill  <jason@redhat.com>
2626         PR c++/5388
2627         * call.c (conditional_conversion): Don't consider implicit
2628         conversions if T2 is a base of T1.
2629         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
2630         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2632         * parser.c (cp_parser_primary_expression): Convert a static data
2633         member from reference.
2635 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
2637         * call.c (build_op_delete_call): Avoid creating unnecessary types.
2638         * class.c (instantiate_type): Remove tests for tf_no_attributes.
2639         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
2640         (COMPARE_NO_ATTRIBUTES): Remove.
2641         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
2643         PR c++/8385
2644         * semantics.c (finish_typeof): Refine type-dependency check.
2646 2003-05-13  Jason Merrill  <jason@redhat.com>
2648         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
2649         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
2651 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2653         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
2655 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2657         PR c++/10230, c++/10481
2658         * semantics.c (finish_non_static_data_member): Handle when the
2659         non-static member is not from a base of the current class type.
2661 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2663         PR c++/10552
2664         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
2665         template and has dependent context.
2667 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2669         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
2671 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2673         PR c++/9252
2674         * cp-tree.h (saved_scope): Remove check_access field.
2675         (tsubst_flags_t): Remove tf_parsing.
2676         * decl.c (maybe_push_to_top_level): Don't initialize
2677         scope_chain->check_access.
2678         (make_typename_type, make_unbound_class_template): Don't use
2679         tf_parsing.
2680         (register_dtor_fn): Use push/pop_deferring_access_checks
2681         instead of scope_chain->check_access.
2682         * method.c (use_thunk): Likewise.
2683         * parser.c (cp_parser_explicit_instantiation
2684         (cp_parser_constructor_declarator_p): Don't call
2685         push/pop_deferring_access_checks here.
2686         (cp_parser_template_argument, cp_parser_class_name): Don't use
2687         tf_parsing.
2688         (yyparse): Check flag_access_control.
2689         * pt.c (instantiate_class_template): Call
2690         push/pop_deferring_access_checks.
2691         * semantics.c (push_deferring_access_checks): Propagate
2692         dk_no_check.
2693         (perform_or_defer_access_check): Make sure basetype_path is
2694         a type before comparison.
2695         * call.c (build_op_delete_call, build_over_call): Use
2696         perform_or_defer_access_check.
2697         * class.c (alter_access): Likewise.
2698         * init.c (build_offset_ref): Likewise.
2699         * lex.c (do_identifier): Likewise.
2700         * method.c (hack_identifier): Likewise.
2701         * search.c (lookup_member): Likewise.
2702         * semantics.c (finish_non_static_data_member): Likewise.
2703         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
2704         instead of flag_access_control.
2706 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2708         PR c++/9554
2709         * parser.c (cp_parser_class_name): Remove check_access parameter.
2710         All caller adjusted.  Update declaration.
2711         (cp_parser_lookup_name): Likewise.
2712         * semantics.c (push_deferring_access_checks): Change parameter type
2713         to enum deferring_kind.  All caller adjusted.
2714         (resume_deferring_access_checks): Adjust to use new enum.
2715         (stop_deferring_access_checks): Likewise.
2716         (perform_or_defer_access_check): Likewise.
2717         * cp-tree.h (deferring_kind): New enum.
2718         (deferred_access): Adjust field type.
2719         (push_deferring_access_checks): Update declaration.
2721 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2723         PR c++/10555, c++/10576
2724         * pt.c (lookup_template_class): Handle class template with
2725         multiple levels of parameters when one of the levels contain
2726         errors.
2728 2003-05-08  Jason Merrill  <jason@redhat.com>
2730         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
2731         expression.  Undo some of the recent reorg.
2733 2003-05-07  Richard Henderson  <rth@redhat.com>
2735         PR c++/10570
2736         * cfns.gperf: Comment out POSIX thread cancellation points,
2737         plus abort and raise.
2738         * cfns.h: Regenerate.
2740 2003-05-07  Jason Merrill  <jason@redhat.com>
2742         * call.c (build_conditional_expr): Don't assume that the folded
2743         expression has result_type.
2745 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2747         * typeck.c (build_unary_op): Deal with const qualifier in
2748         invalid pointer-to-member earlier.
2750 2003-05-05  Jason Merrill  <jason@redhat.com>
2752         PR c++/9537
2753         * call.c (conditional_conversion): Build an RVALUE_CONV if
2754         we're just changing the cv-quals.
2755         (build_conditional_expr): Don't call convert to change
2756         cv-quals.
2758 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2760         PR c++/10496
2761         * typeck.c (build_unary_op): Don't output const qualifier when
2762         output invalid pointer-to-member diagnostics.
2764 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2766         * decl.c: Fix typos.
2768 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2770         PR c++/4494
2771         * decl.c (start_function): Use same_type_p to check return type
2772         of main.
2774 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
2776         PR c/10604
2777         * cp/typeck.c (build_x_compound_expr): No need to check
2778         extra_warnings as well as warn_unused_value.
2780 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2782         PR c++/9364, c++/10553, c++/10586
2783         * decl.c (make_typename_type): Don't crash on illegal code.
2785 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
2787         * class.c (finish_struct): Use location_t and input_location
2788         directly.
2789         * decl.c (make_label_decl): Likewise.
2790         (use_label): Likewise.
2791         * decl2.c (warn_if_unknown_interface): Likewise.
2792         (start_static_initialization_or_destruction): Likewise.
2793         (generate_ctor_or_dtor_function): Likewise.
2794         (finish_file): Likewise.
2795         * error.c (print_instantiation_full_context): Likewise.
2796         * init.c (create_temporary_var): Likewise.
2797         * method.c (synthesize_method): Likewise.
2798         * parser.c (cp_token): Likewise.
2799         (cp_lexer_set_source_position_from_token): Likewise.
2800         (cp_lexer_get_preprocessor_token): Likewise.
2801         (cp_parser_statement): Likewise.
2802         * pt.c (tsubst_friend_function): Likewise.
2803         (instantiate_class_template): Likewise.
2804         (tsubst_decl): Likewise.
2805         (tsubst): Likewise.
2806         (instantiate_decl): Likewise.
2807         * semantics.c (begin_class_definition): Likewise.
2808         (expand_body): Likewise.
2810 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
2812         * class.c (finish_struct): Rename lineno to input_line.
2813         * decl.c (push_binding_level, pop_binding_level,
2814         suspend_binding_level, resume_binding_level, make_label_decl,
2815         use_label, start_function): Likewise.
2816         * decl2.c (warn_if_unknown_interface,
2817         start_static_initialization_or_destruction,
2818         generate_ctor_or_dtor_function, finish_file): Likewise.
2819         * error.c (cp_line_of, print_instantiation_full_context,
2820         print_instantiation_context): Likewise.
2821         * except.c (check_handlers_1, check_handlers): Likewise.
2822         * init.c (create_temporary_var): Likewise.
2823         * method.c (use_thunk, synthesize_method): Likewise.
2824         * parser.c (cp_lexer_set_source_position_from_token,
2825         cp_lexer_get_preprocessor_token): Likewise.
2826         * pt.c (push_tinst_level, pop_tinst_level,
2827         tsubst_friend_function, instantiate_class_template, tsubst_decl,
2828         tsubst, tsubst_expr, instantiate_decl): Likewise.
2829         * semantics.c (genrtl_try_block, finish_label_stmt,
2830         begin_class_definition, expand_body,
2831         genrtl_finish_function): Likewise.
2832         * tree.c (build_min_nt, build_min): Likewise.
2834 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
2836         * decl2.c (comdat_linkage): Don't externalize explicit
2837         instantiations.
2839 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2841         PR c++/10554
2842         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
2843         is not NULL.
2845 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
2847         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
2848         (struct lang_identifier): ... to here.
2849         (LANG_ID_FIELD): Remove.
2850         (SET_LANG_ID): Remove.
2851         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
2852         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
2853         (IDENTIFIER_IMPLICIT_DECL): Likewise.
2854         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
2855         (IDENTIFIER_ERROR_LOCUS): Likewise.
2856         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2858 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2860         PR c++/8772
2861         * pt.c (convert_template_argument): Correct diagnostic.
2863 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2865         PR c++/9432, c++/9528
2866         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
2868 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
2870         * decl.c (check_previous_goto_1): Adjust prototype.
2871         (check_previous_goto): Adjust use.
2872         (check_switch_goto): Likewise.
2873         (use_label): Adjust.
2874         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
2875         (struct named_label_use_list): Use location_t datatype.
2877 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
2879         PR c++/10551
2880         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
2881         that have not yet been written out.
2883 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
2885         PR c++/10549
2886         * class.c (layout_class_type): Mark overlong bitfields as having
2887         the maximum size permitted by their type, after layout.
2889         PR c++/10527
2890         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
2892 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2894         * call.c (build_operator_new_call): Fix typo.
2895         * lang-options.h: Likewise.
2897 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
2899         PR c++/10515
2900         * cp-tree.h (lookup_field_1): Declare it.
2901         * search.c (lookup_field_1): Make it public.
2902         * decl.c (reshape_init): Handle designated initializers.
2904         * decl.c (maybe_commonize_var): Further tweak support for systems
2905         without weak symbols.
2907 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
2909         * decl.c (maybe_commonize_var): Fix thinko in last patch.
2911 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
2913         PR c++/10506
2914         * method.c (use_thunk): Decrement immediate_size_expand.
2916         PR c++/10503
2917         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
2918         (DECL_MAYBE_TEMPLATE): Remove.
2919         * class.c (fixed_type_or_null): Avoid infinite recursion.
2921         * decl.c (maybe_commonize_var): Make the code match the comments.
2922         * pt.c (instantiate_decl): Move call to import_export_decl.
2924 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
2926         * decl2.c (finish_file): Fix merge botch.
2928 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
2930         * decl2.c (finish_file): Don't call import_export_decl for
2931         functions that are not defined.
2932         (handle_class_head): Robustify.
2933         * pt.c (instantiate_decl): Do not call cp_finish_decl for
2934         variables that are not defined.
2936 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
2938         * call.c (print_z_candidates): Fix off by one error.
2940 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
2942         PR c++/10337
2943         * call.c (joust): Don't warn about conversion ops that are exact
2944         or cv-conversions. Rearrange to avoid multiple type comparisons.
2946 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
2948         PR c++/10471
2949         * call.c (build_cxx_call): Robustify.
2951 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
2953         * Make-lang.in (lex.o): Remove mbchar.h.
2954         * lex.c (MULTIBYTE_CHARS): Lose.
2955         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
2956         in c-lex.c.
2958 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
2960         PR c++/9847
2961         * cp-tree.h (duplicate_tag_error): Remove.
2962         * class.c (duplicate_tag_error): Remove.
2963         * semantics.c (begin_class_definition): Return immediately for a
2964         duplicate class definition.
2966         PR c++/10451
2967         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
2969 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
2971         PR c++/10446
2972         * search.c (lookup_fnfields_1): Handle empty slots in the method
2973         vector.
2975         PR c++/10428
2976         * decl.c (check_elaborated_type_specifier): New function, split
2977         out from ...
2978         (xref_tag): ... here.  Use the new function in more places.
2980         * rtti.c (throw_bad_typeid): Use build_cxx_call.
2982 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
2984         * call.c (build_over_call): Use build_cxx_call.
2985         (build_cxx_call): New method, split out of build_over_call.
2986         * cp-tree.h (language_function): Add can_throw.
2987         (build_cxx_call): Declare it.
2988         * decl.c (finish_function): If a function does not contain any
2989         calls to functions that can throw an exception, indicate that
2990         fact.
2991         * decl2.c (mark_used): Do not defer the instantiation of
2992         functions, if the current function does not throw.
2993         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
2994         * pt.c (instantiate_decl): Make sure import_export_decl is called
2995         before emitting things.
2996         * rtti.c (throw_bad_cast): Use build_cxx_call.
2997         (build_dynamic_cast_1): Likewise.
2998         * typeck.c (build_function_call): Likewise.
3000 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
3002         PR c++/9881
3003         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
3004         expressions. Reverts my 2002-08-08 patch.
3006         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
3007         cheaper early exit.
3009 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3011         * cp/decl2.c (start_static_storage_duration_function): Take count
3012         arg, don't check if it wraps round.
3013         (generate_ctor_or_dtor_function): Add locus arg, use it.
3014         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
3015         locus.
3016         (finish_file): Set line numbers to past EOF for synthesized
3017         functions.
3019 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3021         PR c++/10405
3022         * search.c (lookup_field_1): Final scan goes backwards for
3023         types, forwards for non-types.
3025 2003-04-17  Roger Sayle  <roger@eyesopen.com>
3027         PR c/10375
3028         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
3029         "nothrow" function attributes.
3031 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3033         PR c++/10347
3034         * pt.c (type_dependent_expression_p): Handle array new.
3036 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
3038         PR c++/10381
3039         * parser.c (cp_parser_primary_expression): Reorganize logic for
3040         dealing with name lookup failures.
3042 2003-04-15  Jason Merrill  <jason@redhat.com>
3044         * decl2.c (mark_used): Don't instantiate anything if
3045         skip_evaluation.
3047 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
3049         * tree.c (build_cplus_array_type_1): Do not call
3050         uses_template_parms() on a NULL index_type.
3052 2003-04-13  Roger Sayle  <roger@eyesopen.com>
3054         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
3056 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
3058         PR c++/10300
3059         * init.c (build_new_1): Reorganize.
3061 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3063         * class.c (initialize_array)
3064         * decl.c (reshape_init)
3065         * decl2.c (build_expr_from_tree)
3066         * init.c (build_zero_init)
3067         * pt.c (tsubst_copy, tsubst_copy_and_build)
3068         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
3069         (ptm_initializer, class_initializer, get_pseudo_ti_init)
3070         * semantics.c (finish_compound_literal)
3071         * typeck.c (build_ptrmemfunc1)
3072         * typeck2.c (store_init_value, process_init_constructor)
3073         (build_functional_cast): Use build_constructor.
3075 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
3077         * call.c (print_z_candidates): Use gcc_gettext_width, not
3078         strlen, to determine how much padding to use.
3080 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
3082         * decl.c: Update all calls to shadow_warning.
3084 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
3086         * class.c (layout_class_type): Correct handling for overlong
3087         bit-fields whose width is the same as an integer type.
3089 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3091         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
3092         * cp-lang.c (cp_tree_size): New function.
3093         (LANG_HOOKS_TREE_SIZE): Override.
3095         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
3096         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
3097         (union lang_tree_node): Remove common and srcloc members.
3098         (build_srcloc_here): Don't prototype.
3099         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
3100         * pt.c (pending_templates): Correct comment.
3101         * tree.c (build_srcloc, build_srcloc_here): Kill.
3103 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
3105         * call.c: Include intl.h.
3106         (print_z_candidate): Always use inform; get rid of errfn
3107         argument. Reorganize so that all the strings get picked up
3108         by xgettext.  Note obligation of caller to pass first argument
3109         through gettext.
3110         (print_z_candidates): Update to match.  Indent second and
3111         successive candidates by strlen() of translated message.
3112         (joust): Restructure ambiguous-conversion pedwarn so that
3113         translators see a complete sentence.  Update calls to
3114         print_z_candidate.
3116         * Make-lang.in (cp/call.o): Update dependencies.
3118 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3120         * decl.c (set_current_binding_level): Delete, revert last change.
3121         (current_binding_level): Modify to allow it as as lvalue.
3123 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3125         * name-lookup.c (find_binding): Pass appropriate pointer type to
3126         POP_TIMEVAR_AND_RETURN.
3128 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3130         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
3131         * cp-tree.h: Don't insist on having GNUC.
3133 2003-04-03  Jason Merrill  <jason@redhat.com>
3135         * cvt.c (ocp_convert): Only abort if we try to convert an object
3136         of TREE_ADDRESSABLE type.
3138         * class.c (build_vtable): Set DECL_ALIGN here.
3139         (get_vtable_decl): Not here.
3140         (layout_vtable_decl): Or here.
3141         (create_vtable_ptr): Or here.
3142         (layout_class_type): Or here.
3143         (check_bitfield_decl): Don't mess with field alignment.
3145 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3147         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
3148         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
3149         * rtti.c (dfs_class_hint_mark): Likewise.
3151         * decl.c (push_local_name, push_class_level_binding,
3152         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
3153         functions returning void.
3154         * decl2.c (add_using_namespace): Likewise.
3156         * decl.c (print_binding_level, print_other_binding_stack,
3157         print_binding_stack): Cast argument of %p specifier to void*.
3158         * ptree.c (cxx_print_decl): Likewise.
3160         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
3161         VAR_FUNCTION_OR_PARM_DECL_CHECK,
3162         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
3163         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
3164         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
3166         * decl.c (set_current_binding_level): New macro.  Use throughout
3167         when setting the current binding level.
3169         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
3170         in enum.
3171         * method.c (mangling_flags): Likewise.
3173         * cp-tree.h (lang_type_header): Add __extension__ and use
3174         CHAR_BITFIELD for members.
3176 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
3178         PR other/9274
3179         * mangle.c: Include gt-cp-mangle.h.
3180         (subst_identifiers): Mark with GTY.
3181         * config-lang.in (gtfiles): Add cp/mangle.c.
3182         * Make-lang.in: (gt-cp-mangle.h): New rule.
3183         (cp/mangle.o): Depends on gt-cp-mangle.h.
3185 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
3187         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
3188         after \$(srcdir)/cp/name-lookup.h.
3189         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
3190         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
3191         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
3192         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
3194 2003-03-31  Jason Merrill  <jason@redhat.com>
3196         PR java/10145
3197         * class.c (check_field_decl): Don't set DECL_ALIGN.
3199 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
3201         PR c++/7647
3202         * decl.c (grokdeclarator): Tidy, slightly.
3203         * search.c (lookup_field_1): Add want_type parameter.
3204         (lookup_field_r): Adjust call to lookup_field_1.
3206 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3208         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
3210 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
3212         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
3213         prototype.
3214         (cxx_scope_find_binding_for_name): Likewise.
3215         * decl.c (find_binding: Move to name-lookup.c.
3216         (binding_for_name): Likewise.
3217         (cxx_scope_find_binding_for_name): Likewise.
3218         (BINDING_LEVEL):  Remove.
3219         (push_binding): Tidy.
3220         (push_class_binding): Likewise.
3221         (pop_binding): Likewise.
3222         (poplevel): Likewise.
3223         (poplevel_class): Likewise.
3224         (set_identifier_type_value_with_scope): Likewise.
3225         (push_overloaded_decl): Likewise.
3226         (lookup_tag): Likewise.
3227         (unqualified_namespace_lookup): Likewise.
3228         (lookup_name_current_level): Likewise.
3229         (maybe_inject_for_scope_var): Likewise.
3230         (namespace_binding): Move to name-lookup.c.
3231         (set_namespace_binding): Likewise.
3232         * decl2.c (lookup_using_namespace): Tidy.
3233         (qualified_lookup_using_namespace): Likewise.
3234         (do_toplevel_using_decl): Likewise.
3235         * name-lookup.c: Include "timevar.h"
3236         * name-lookup.h (cxx_scope):  Declare.
3237         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
3238         member declaration.
3239         (BINDING_SCOPE): Adjust definition.
3240         (BINDING_HAS_LEVEL_P): Remove.
3242 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3244         * name-lookup.c: New file.
3245         * name-lookup.h: Likewise..
3246         * decl.c (push_binding): Adjust use cxx_binding_make.
3247         (free_bindings): Move to name-lookup.c
3248         (pop_binding): Use cxx_binding_free.
3249         (binding_for_name): Tidy.
3250         * cp-tree.h: Include "name-lookup.h"
3251         (cxx_binding_make): Move to name-lookup.h
3252         (cxx_binding_clear): Likewise.
3253         (struct cxx_binding): Likewise.
3254         (LOCAL_BINDING_P): Likewise.
3255         (INHERITED_VALUE_BINDING_P): Likewise.
3256         (BINDING_SCOPE): Likewise.
3257         (BINDING_HAS_LEVEL_P): Likewise.
3258         (BINDING_VALUE): Likewise.
3259         (BINDING_TYPE): Likewise.
3260         * config-lang.in (gtfiles): Add cp/name-lookup.h
3261         * Make-lang.in (cp/name-lookup.o): New rule.
3262         (CXX_OBJS): Add cp/name-lookup.o
3263         (CXX_TREE_H): Add cp/name-lookup.h
3265 2003-03-28  Jason Merrill  <jason@redhat.com>
3267         PR c++/10245
3268         * cvt.c (force_rvalue): New fn.
3269         * call.c (build_conditional_expr): Use it.
3270         * cp-tree.h: Declare it.
3272 2003-03-28  Mike Stump  <mrs@apple.com>
3274         * error.c (dump_expr): Add 0x to printed hex numbers to make
3275         output match source code better.
3277 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
3279         PR c++/10218
3280         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
3281         definitions.
3283         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
3284         non-existant ssdf_decls array.
3285         (finish_file): Call generator_ctor_or_dtor_function when there are
3286         static constructors or destructors and no other static
3287         initializations.
3289 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
3291         PR c++/10047
3292         * decl2.c (finish_file): Don't warn about explicitly instantiated
3293         inline decls.
3295 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
3297         PR c++/10224
3298         * pt.c (lookup_template_class): Only check instantiated args if
3299         they do not contain template parameters.
3301 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
3303         PR c++/10158
3304         * parser.c (cp_parser_function_definition): Set
3305         DECL_INITIALIZED_IN_CLASS for members.
3306         * pt.c (instantiate_decl): Only reduce the template args for
3307         friends that are not defined in class.
3309 2003-03-25  Jason Merrill  <jason@redhat.com>
3311         * call.c (print_z_candidate): Change name of first arg to msgid.
3312         (joust): Add comment for translators.
3314 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3316         PR c++/9898, PR c++/383, DR 322
3317         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
3318         through reference types on both PARM and ARG.
3320 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3322         PR c++/10119
3323         * error.c (dump_expr) <BASELINK>: Use dump_expr.
3324         * pt.c (maybe_fold_nontype_args): New function.
3325         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
3326         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
3327         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
3328         maybe_fold_nontype_args.
3330 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3332         PR c++/10026
3333         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
3335 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
3337         PR c++/7086
3338         * typeck.c (cxx_mark_addressable):  Adjust call to
3339         gen_mem_addressof or put_var_into_stack.
3341 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
3343         PR c++/9978, c++/9708
3344         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
3345         * call.c (add_template_candidate_real): Adjust
3346         instantiate_template call.
3347         * class.c (resolve_address_of_overloaded_function): Likewise.
3348         * decl.c (build_enumerator): Set TREE_CONSTANT.
3349         * pt.c (check_instantiated_args): New.
3350         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
3351         TREE_READONLY.
3352         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
3353         (reduce_template_parm_level): Likewise.
3354         (process_template_parm): Likewise.
3355         (check_explicit_specialization): Adjust instantiate_template call.
3356         (convert_template_argument): Don't check non-type argument here.
3357         (lookup_template_class): Check them here.
3358         (tsubst_friend_function): Adjust instantiate_template call.
3359         (instantiate_template): Add tsubst_flags parameter, use it. Check
3360         instantiated args.
3362 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
3364         * decl.c: Update calls to shadow_warning.
3366 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
3368         PR c++/9898
3369         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
3370         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
3372 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
3374         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
3375         friends.
3376         * cp/pt.c (instantiate_class_template): Fix formatting.
3378 2003-03-14  Matt Austern  <austern@apple.com>
3380         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
3381         (unemitted_tinfo_decl_p): Remove.
3382         (emit_tinfo_decl): Change declaration to remove unused parameter.
3383         * decl2.c (finish_file): Change tinfo emission to loop through
3384         unemitted_tinfo_decls array instead of looping through all decls.
3385         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
3386         unused second parameter.
3387         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
3388         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
3389         (emit_tinfo_decl): remove unused second parameter, add assertion
3390         that decl hasn't already been emitted.
3392 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
3394         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
3395         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
3396         return statements.
3398 2003-03-19  Jason Merrill  <jason@redhat.com>
3400         PR c++/8316, c++/9315, c++/10136
3401         * call.c (print_z_candidate): Split out from...
3402         (print_z_candidiates): ...here.
3403         (joust): Use it.
3405 2003-03-17  Roger Sayle  <roger@eyesopen.com>
3407         PR c++/10031
3408         * decl.c (duplicate_decls): Use the new type when prototyping
3409         anticipated decls, even when the types match.  This defines the
3410         exception list for the built-in function.
3412 2003-03-17  Jason Merrill  <jason@redhat.com>
3414         PR c++/10091
3415         * typeck.c (build_class_member_access_expr): Compare
3416         TYPE_MAIN_VARIANTs.
3418 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
3420         PR c++/9639
3421         * parser.c (cp_parser_declarator_id): Clear parser->scope.
3423 2003-03-16  Jason Merrill  <jason@redhat.com>
3425         PR c++/9993
3426         * decl.c (finish_function): Only allow the NRVO to use variables
3427         declared at function scope.
3429 2003-03-17  Andreas Jaeger  <aj@suse.de>
3431         * Make-lang.in (cp/TAGS): Remove.
3433 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3435         PR c++/9629
3436         * cp-tree.h (struct language_function): Add in_base_initializer.
3437         (in_base_initializer): define it.
3438         (expand_member_init): Remove INIT param.
3439         * init.c (expand_member_init): Remove INIT param, return the member.
3440         (emit_mem_initializers): Set in_base_initializer.
3441         * class.c (build_base_path): Check in_base_initializer.
3442         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
3443         * pt.c (tsubst_initializer_list): Likewise.
3445 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
3447         * decl.c (binding_for_name): Fix initialization thinko.
3449 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
3451         Compile-time improvement: 2/n.
3452         * cp-tree.h (struct cxx_binding): New datatype;
3453         (struct lang_identifier): Use it.
3454         (LOCAL_BINDING_P): Adjust definition.
3455         (INHERITED_VALUE_BINDING_P): Likewise.
3456         (BINDING_SCOPE): Likewise.
3457         (BINDING_HAS_LEVEL_P): Likewise.
3458         (BINDING_VALUE): Likewise.
3459         (BINDING_TYPE): Likewise.
3460         (IDENTIFIER_VALUE): Likewise.
3461         (struct tree_binding): Remove.
3462         (TS_CP_BINDING): Likewise.
3463         ((union lang_tree_node): Remove field "binding".
3464         (cxx_binding_clear): New macro.
3465         (binding_for_name): Adjust return type.
3466         (qualified_lookup_using_namespace): Adjust prototype.
3467         (lookup_using_namespace): Adjust prototype.
3468         (cxx_scope_find_binding_for_name): Declare.
3469         * cp-tree.def: Remove CPLUS_BINDING definition.
3470         * decl.c (push_binding): Adjust local variable type.
3471         (add_binding): Likewise.
3472         (push_class_binding): Likewise.
3473         (pop_binding): Likewise.
3474         (poplevel): Likewise.
3475         (poplevel_class): Likewise.
3476         (free_bindings):  Adjust type.
3477         (find_binding): Adjust return type, add a third parameter. Remove
3478         non-useful assertion now that we use static typing.
3479         (cxx_scope_find_binding_for_name): New function.
3480         (binding_for_name): Use it.  Adjust local variable type. Simplify.
3481         (namespace_binding):  Simplify.
3482         (set_namespace_binding): Likewise.
3483         (set_identifier_type_value_with_scope): Adjust local variable type.
3484         (lookup_tag): Don't type-abuse of local variable 'old'.
3485         (lookup_namespace_name): Likewise.  Allocate binding on stack.
3486         (select_decl): Adjust prototype.
3487         (unqualified_namespace_lookup):  Allocate binding on stack.
3488         Don't type-abuse of local variable 'val'.
3489         (lookup_name_real): Likewise.
3490         (maybe_inject_for_scope_var): Adjust local variable type.
3491         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
3492         (namespace_binding): Adjust logic, simplify.
3493         (BINDING_LEVEL): Adjust definition.
3494         (push_class_level_binding): Adjust local variable type.
3495         (struct cxx_saved_binding): Adjust field 'binding' type.
3496         * decl2.c (ambiguous_decl): Adjust prototype.
3497         (lookup_using_namespace): Adjust local variable type.
3498         (qualified_lookup_using_namespace): Catch type error and correct
3499         ensueing logic error.
3500         (do_nonmember_using_decl): Adjust local variable type.  Allocate
3501         temporary cxx_binding on stack.
3502         (do_toplevel_using_decl): Adjust local variable type.
3503         * ptree.c (cxx_print_cxx_binding): New function.
3504         (cxx_print_identifier): Use it.
3505         (cxx_print_xnode): Delete CPLUS_BINDING case label.
3507 2003-03-15  Roger Sayle  <roger@eyesopen.com>
3509         * tree.c (count_functions): Fix whitespace.
3511 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
3513         * Make-lang.in: Update.
3515 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3517         PR c++/6440
3518         * pt.c (maybe_process_partial_specialization): Handle
3519         member class template when enclosing class template is
3520         explicit specialized.
3521         (most_general_template): Stop looking when DECL is already
3522         specialized.
3524 2003-03-13  Jason Merrill  <jason@redhat.com>
3526         PR c++/9420
3527         * search.c (lookup_conversions): Call complete_type here.
3528         * call.c (implicit_conversion): Not here.
3530 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
3532         * decl2.c (do_nonmember_using_decl): Correct handling of
3533         simultaneous type/non-type bindings.
3535         * call.c (initialize_reference): Remove bogus assertion.
3536         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
3538 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
3540         PR c++/7050
3541         * expr.c (cxx_expand_expr): Return const0_rtx for throw
3542         expressions.
3544 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3546         PR c++/9474
3547         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3548         to merge old and new declarations.
3550 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
3552         * g++.1: Remove.
3553         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
3554         (cp/g++.1): Build it from scratch in the build tree.
3555         (c++.install-man): Depend on it.  Install it from the build tree.
3556         (c++.mostlyclean): Clean it.
3558 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3560         PR c++/9474
3561         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
3562         to merge old and new declarations.
3564         PR c++/9924
3565         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
3567 2003-03-11  Jason Merrill  <jason@redhat.com>
3569         PR c++/9820
3570         * search.c (lookup_member): Fix handling of functions in a class
3571         being defined.
3573 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
3575         PR c++/8700
3576         * call.c (convert_class_to_reference): Adjust usage of
3577         splice_viable.
3578         (any_viable): Remove.
3579         (splice_viable): Combine with any_viable.
3580         (print_z_candidates): Avoid printing duplicates.
3581         (build_user_type_conversion_1): Adjust usage of splice_viable.
3582         (build_new_function_call): Likewise.
3583         (build_operator_new_call): Likewise.
3584         (build_object_call): Likewise.
3585         (build_conditional_expr): Likewise.
3586         (build_new_op): Likewise.
3587         (build_new_method_call): Likewise.
3588         (joust): Remove spurious comment.
3589         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
3590         * decl2.c (arg_assoc_class): Simplify.
3591         * friend.c (add_friend): Likewise.
3593 2003-03-11  Jason Merrill  <jason@redhat.com>
3595         PR c++/8660
3596         * decl2.c (check_classfn): A member template only matches a
3597         member template.
3599 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
3601         * Make-lang.in (CXX_C_OBJS): Update.
3602         * lang-specs.h: Don't define __GNUG__ here.
3604 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
3606         * call.c (perform_overload_resolution): New function.
3607         (build_new_function_call): Use it.
3608         (build_operator_new_call): Likewise.
3609         (add_candidates): Add explicit_targs and template_only parameters.
3610         (build_new_op): Adjust accordingly.
3611         * cp-tree.h (build_operator_new_call): New function.
3612         (build_function_call_real): Remove.
3613         (build_function_call_maybe): Likewise.
3614         * init.c (build_new_1): Use build_operator_new_call.
3615         * typeck.c (build_function_call_real): Rename to ...
3616         (build_function_call): ... this.
3618 2003-03-10  Devang Patel  <dpatel@apple.com>
3620         PR c++/9394
3621         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
3623 2003-03-10  Jason Merrill  <jason@redhat.com>
3625         PR c++/9798
3626         * decl.c (push_using_directive): Push before recursing.
3628         PR c++/9868, c++/9524
3629         * call.c (resolve_scoped_fn_name): Handle the case of a function
3630         pointer member.
3632         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
3633         argument in the pointer-to-member case.
3635 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
3637         PR c++/9373
3638         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
3639         pointers to member functions.
3641         PR c++/8534
3642         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
3643         in pointer-to-member-function types.
3645 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3647         * expr.c (cplus_expand_constant): Use C90 prototype style.
3648         (cxx_expand_expr): Likewise.
3650 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3652         PR c++/9970
3653         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
3654         functions.
3656 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
3658         * lang-specs.h (c++-header): Change .pch to .gch.
3660 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
3662         * cp-tree.h (cxx_init): Update prototype.
3663         * lex.c (cxx_init): Similarly.
3665 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
3667         PR c++/9823
3668         * cp-tree.h (begin_mem_initializers): Remove.
3669         * parser.c (cp_parser_mem_initializer_list): Inline it here.
3670         Do not call finish_mem_initializers if not in a constructor.
3671         (cp_parser_class_head): Fix typo in error message.
3672         * semantics.c (begin_mem_initializers): Remove.
3673         * testsuite/g++.dg/parser/constructor1.C: New test.
3675         PR c++/9809
3676         * call.c (add_function_candidate): Skip builtin fuctions that have
3677         not yet been declared.
3679         PR c++/9982
3680         * init.c (build_new_1): Correct logic for determining whether or
3681         not to use an array cookie.
3683         PR c++/9524
3684         * parser.c (cp_parser_postfix_expression): Call
3685         finish_non_static_data_member, even when processing_template_decl.
3687         PR c++/9912
3688         * cp-tree.h (is_ancestor): New function.
3689         (handle_class_head): Change prototype.
3690         * decl2.c (is_namespace_ancestor): Rename to ...
3691         (namespace_anecestor): ... this.
3692         (set_decl_namespace): Adjust accordingly.
3693         (handle_class_head): Remove unncessary parameters.
3694         * parser.c (cp_parser_class_head): Check that
3695         nested-name-specifiers are used appropriately.
3697 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
3699         * call.c (reference_binding): Remove REF_IS_VAR parameter.
3700         (implicit_conversion): Adjust call to reference_binding.
3701         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
3702         (initialize_reference): Adjust handling for references bound to
3703         rvalues.
3704         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
3705         prototype.
3706         (real_non_cast_lvalue_p): New method.
3707         * cvt.c (build_up_reference): Adjust use of
3708         make_temporary_var_for_ref_to_temp.
3709         * tree.c (real_non_cast_lvalue_p): New method.
3711 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3713         * except.c (init_exception_processing): Use C90 prototype style.
3714         (cp_protect_cleanup_actions): Likewise.
3715         (prepare_eh_type): Likewise.
3716         (build_eh_type_type): Likewise.
3717         (build_exc_ptr): Likewise.
3718         (do_begin_catch): Likewise.
3719         (dtor_nothrow): Likewise.
3720         (do_end_catch): Likewise.
3721         (push_eh_cleanup): Likewise.
3722         (decl_is_java_type): Likewise.
3723         (choose_personality_routine): Likewise.
3724         (initialize_handler_parm): Likewise.
3725         (expand_start_catch_block): Likewise.
3726         (expand_end_catch_block): Likewise.
3727         (begin_eh_spec_block): Likewise.
3728         (finish_eh_spec_block): Likewise.
3729         (do_allocate_exception): Likewise.
3730         (do_free_exception): Likewise.
3731         (wrap_cleanups_r): Likewise.
3732         (stabilize_throw_expr): Likewise.
3733         (build_throw): Likewise.
3734         (complete_ptr_ref_or_void_ptr_p): Likewise.
3735         (is_admissible_throw_operand): Likewise.
3736         (nothrow_libfn_p): Likewise.
3737         (can_convert_eh): Likewise.
3738         (check_handlers_1): Likewise.
3739         (check_handlers): Likewise.
3741 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
3743         * call.c (merge_conversion_sequences): New function.
3744         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
3745         (convert_class_to_reference): Correct handling of second
3746         standard conversion sequence in a user-defined conversion
3747         sequence.
3748         (build_user_type_conversion_1): Use merge_conversion_sequences.
3749         * cp-tree.def: Add comments for CONV nodes.
3750         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
3752 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3754         * error.c (init_error): Use C90 prototype style.
3755         (dump_scope): Likewise.
3756         (dump_qualifiers): Likewise.
3757         (dump_template_argument): Likewise.
3758         (dump_template_argument_list): Likewise.
3759         (dump_template_parameter): Likewise.
3760         (dump_template_bindings): Likewise.
3761         (dump_type): Likewise.
3762         (dump_typename): Likewise.
3763         (class_key_or_enum): Likewise.
3764         (dump_aggr_type): Likewise.
3765         (dump_type_prefix): Likewise.
3766         (dump_type_suffix): Likewise.
3767         (dump_global_iord): Likewise.
3768         (dump_simple_decl): Likewise.
3769         (dump_decl): Likewise.
3770         (dump_template_decl): Likewise.
3771         (dump_function_decl): Likewise.
3772         (dump_parameters): Likewise.
3773         (dump_exception_spec): Likewise.
3774         (dump_function_name): Likewise.
3775         (dump_template_parms): Likewise.
3776         (dump_char): Likewise.
3777         (dump_expr_list): Likewise.
3778         (dump_expr): Likewise.
3779         (dump_binary_op): Likewise.
3780         (dump_unary_op): Likewise.
3781         (type_as_string): Likewise.
3782         (expr_as_string): Likewise.
3783         (decl_as_string): Likewise.
3784         (context_as_string): Likewise.
3785         (lang_decl_name): Likewise.
3786         (cp_file_of): Likewise.
3787         (cp_line_of): Likewise.
3788         (decl_to_string): Likewise.
3789         (expr_to_string): Likewise.
3790         (fndecl_to_string): Likewise.
3791         (code_to_string): Likewise.
3792         (language_to_string): Likewise.
3793         (parm_to_string): Likewise.
3794         (op_to_string): Likewise.
3795         (type_to_string): Likewise.
3796         (assop_to_string): Likewise.
3797         (args_to_string): Likewise.
3798         (cv_to_string): Likewise.
3799         (cxx_print_error_function): Likewise.
3800         (cp_diagnostic_starter): Likewise.
3801         (cp_diagnostic_finalizer): Likewise.
3802         (cp_print_error_function): Likewise.
3803         (function_category): Likewise.
3804         (print_instantiation_full_context): Likewise.
3805         (print_instantiation_partial_context): Likewise.
3806         (maybe_print_instantiation_context): Likewise.
3807         (print_instantiation_context): Likewise.
3808         (cp_printer): Likewise.
3809         (print_integer): Likewise.
3810         (print_non_consecutive_character): Likewise.
3811         (locate_error): Likewise.
3813 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
3815         PR c++/9965
3816         * call.c (reference_binding): Add ref_is_var parameter.
3817         (implicit_conversion): Adjust call to reference_binding.
3818         (initialize_reference): Likewise.
3820         PR c++/9400
3821         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
3822         PARM_DECLs.
3824         PR c++/9791
3825         * class.c (get_basefndecls): Use lookup_fnfields_1.
3827 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3829         PR c++/9188
3830         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
3831         in error message.
3832         (cp_parser_single_declaration): Likewise.
3834 2003-03-05  Jason Merrill  <jason@redhat.com>
3836         PR c++/9440
3837         * call.c (build_conditional_expr): Use convert rather than an
3838         explicit NOP_EXPR.
3840 2003-03-02  Matt Austern  <austern@apple.com>
3842         * decl.c (cp_binding_level): Add static_decls varray member.
3843         (add_decl_to_level): Add static/inline namespace scope
3844         declarations to static_decls array.
3845         (wrapup_global_for_namespace): Pass static_decls only, instead of
3846         all decls, to wrapup_global_declarations/check_global_declarations.
3847         (push_namespace): Initialize static_decls for ordinary namespaces.
3848         (cxx_init_decl_processing): Initialize static_decls for global
3849         namespace.
3851 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
3853         * class.c (end_of_class): Correct thinko.
3855 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
3857         * config-lang.in: Replace ${libstdcxx_version} by its value.
3859 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
3861         * cp-tree.h (cxx_saved_binding): Declare.
3862         (struct saved_scope): Adjust type of field 'old_binding'.
3863         * decl.c (cxx_saved_binding_make): New macro.
3864         (struct cxx_saved_binding): Define.
3865         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
3866         C++ bindings.
3867         (maybe_push_to_top_level): Adjust local variable type.
3868         (pop_from_top_level): Likewise.
3870 2003-03-04  Tom Tromey  <tromey@redhat.com>
3872         * Make-lang.in (c++.tags): New target.
3874 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
3876         * Make-lang.in: Update.
3878 2003-03-03  Jason Merrill  <jason@redhat.com>
3880         * decl.c (finish_enum): Do set the type in a template. Simplify.
3881         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
3883 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
3885         PR c++/9878
3886         * call.c (convert_class_to_reference): Correct conversion
3887         sequences.
3888         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
3889         (implicit_conversion): Adjust call to reference_binding.
3890         (add_candidate): Change type of candidates parameter.
3891         (add_function_candidate): Likewise.
3892         (add_conv_candidate): Likewise.
3893         (build_builtin_candidate): Likewise.
3894         (add_builtin_candidate): Likewise.
3895         (add_builtin_candidates): Likewise.
3896         (add_template_candidate_real): Likewise.
3897         (add_template_candidate): Likewise.
3898         (add_template_conv_candidate): Likewise.
3899         (build_user_type_conversion_1): Adjust accordingly.
3900         (build_object_call): Likewise.
3901         (build_conditional_expr): Likewise.
3902         (add_candidates): Likewise.
3903         (build_new_op): Likewise.
3904         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
3905         (build_new_method_call): Adjust calls to add_function_candidate.
3906         (make_temporary_var_for_ref_to_temp): New function.
3907         (initialize_reference): Add decl parameter.
3908         * class.c (build_rtti_vtbl_entries): Use build_address and
3909         build_nop.
3910         * cp-tree.h (initialize_reference): Change prototype.
3911         (make_temporary_var_for_ref_to_temp): New function.
3912         (build_type_conversion): Change prototype.
3913         (build_address): New function.
3914         (build_nop): Likewise.
3915         * cvt.c (cp_convert_to_pointer): Adjust call to
3916         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
3917         Use build_nop.
3918         (convert_to_pointer_force): Use build_nop.
3919         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
3920         (convert_to_reference): Adjust call to build_type_conversion.
3921         (ocp_convert): Likewise.
3922         (build_type_conversion): Remove for_sure parameter.
3923         * decl.c (grok_reference_init): Use initialize_reference.
3924         * typeck.c (build_address): New function.
3925         (build_nop): Likewise.
3926         (build_unary_op): Use them.
3927         (build_ptrmemfunc): Tidy slightly.
3928         (convert_for_initialization): Adjust call to
3929         initialize_reference.
3930         * typeck2.c (store_init_value): Remove #if 0'd code.
3932 2003-03-03  Jason Merrill  <jason@redhat.com>
3934         * decl.c (start_function): Clear DECL_NUM_STMTS.
3936         * class.c (get_vtable_decl): Use vtbl_type_node.
3937         (build_primary_vtable): Check for it.
3939 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
3941         * decl.c (check_initializer): Check for vector_opaque_p.
3943 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
3945         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
3946           invoke an external cpp during compilation.
3948 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3950         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
3951         that of warning().
3952         (start_decl): Likewise.
3953         (start_function): Likewise.
3955 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
3957         * Make-lang.in (CXX_C_OBJS): Update.
3959 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
3961         PR c++/9892
3962         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
3963         instantiating it.
3965 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
3967         * parser.c (cp_parser_init_declarator): Revert opaque
3968         vector_opaque_p change.
3969         Do not include target.h.
3971 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
3973         PR c++/9879
3974         * cp-tree.h (build_zero_init): Add parameter.
3975         * decl.c (cp_finish_decl): Adjust call.
3976         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
3977         calls.
3978         (build_default_init): Add nelts parameter.  Adjust calls to
3979         build_zero_init.
3980         (build_new_1): Adjust call to build_default_init.
3981         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
3983 2003-02-26  Devang Patel  <dpatel@apple.com>
3985         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
3986         required.  Postpone enum setting for template decls.
3987         (build_enumerator): Delay copying value node until finish_enum
3988         (). Remove #if 0'ed code.
3989         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
3990         (tsubst_copy): Add check for enum type.
3992 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
3994         PR c++/9683
3995         * decl2.c (prune_vars_needing_no_initialization): Do not throw
3996         away initializations for DECL_EXTERNAL VAR_DECLs.
3997         (finish_file): Adjust accordingly.
3998         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
4000 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
4002         * decl.c (add_binding): Time TV_NAME_LOOKUP.
4003         (push_class_binding): Likewise.
4004         (set_namespace_binding): Likewise.
4006 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
4008         PR c++/9836
4009         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
4010         specializations back to the main template.
4011         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
4012         * pt.c (resolve_typename_type): Likewise.
4014 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
4016         PR c++/9778
4017         * pt.c (tsubst_copy_and_build): For a templated function inside a
4018         scope, process template arguments.
4020 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4022         PR c++/9602
4023         * typeck2.c (abstract_virtuals_error): Don't check when
4024         TYPE is still template parameter dependent.
4026 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
4028         PR c++/5333
4029         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
4030         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
4031         * pt.c (instantiate_class_template): Don't try to instantiate
4032         dependent types.
4033         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
4035 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
4037         PR c++/9749
4038         * decl.c (grokdeclarator): Do not allow parameters with variably
4039         modified types.
4041 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
4043         * search.c (grow_bfs_bases): Remove. Fold into ...
4044         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
4045         in previous patch.
4047 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
4049         PR c++/9729
4050         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
4051         when the G++ 3.2 ABI prevents correct compilation.
4053 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
4055         Change base class access representation. Share virtual base
4056         binfos.
4057         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
4058         call.
4059         * cp/class.c (build_base_path): Likewise.
4060         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
4061         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
4062         (make_new_vtable): Adjust.
4063         (force_canonical_binfo_r): Delete.
4064         (force_canonical_binfo): Delete.
4065         (mark_primary_virtual_base): Delete.
4066         (dfs_unshared_virtual_bases): Delete.
4067         (mark_primary_bases): Adjust.
4068         (maybe_warn_about_overly_private_class): Adjust.
4069         (dfs_base_derived_from): Delete.
4070         (base_derived_from): Follow the inheritance chain.
4071         (struct find_final_overrider_data): Add vpath member.
4072         (dfs_find_final_overrider): Adjust.
4073         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
4074         (find_final_overrider): Adjust.
4075         (update_vtable_entry_for_fn): Adjust.
4076         (modify_all_vtables): Adjust.
4077         (walk_subobject_offsets): Adjust.
4078         (layout_nonempty_base_or_field): Adjust.
4079         (layout_empty_base): Remove last parameter. Adjust.
4080         (build_base_field): Adjust.
4081         (build_base_fields): Adjust.
4082         (propagate_binfo_offsets): Remove last parameter. Adjust.
4083         (dfs_set_offset_for_unshared_vbases): Delete.
4084         (layout_virtual_bases): Adjust.
4085         (finish_struct_1): Adjust.
4086         (init_class_processing): Don't init access nodes.
4087         (dfs_get_primary_binfo): Delete.
4088         (get_primary_binfo): Adjust.
4089         (dump_class_hierarchy_r): Remove most derived arg, add IGO
4090         parameter. Adjust.
4091         (dump_class_hierarchy): Adjust.
4092         (finish_vtbls): Adjust.
4093         (get_original_base): Delete.
4094         (build_vtt_inits): Adjust.
4095         (dfs_build_secondary_vptr_vtt_inits): Adjust.
4096         (dfs_ctor_vtable_bases_queue_p): Adjust.
4097         (build_ctor_vtbl_group): Adjust.
4098         (dfs_accumulate_vtbl_inits): Adjust.
4099         (build_vtbl_initializer): Adjust.
4100         (build_vbase_offset_vtbl_entries): Adjust.
4101         (add_vcall_offset_vtbl_entries_1): Adjust.
4102         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
4103         (access_*_node): Remove.
4104         (CANONICAL_BINFO): Delete.
4105         (BINFO_UNSHARED_MARKED): Remove.
4106         (BINFO_MARKED): Set LANG_FLAG_0 directly.
4107         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
4108         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
4109         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
4110         Delete.
4111         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
4112         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4113         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
4114         Delete.
4115         (BINFO_DEPENDENT_BASE_P): New.
4116         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
4117         index.
4118         (markedp, unmarkedp): Adjust.
4119         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
4120         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
4121         find_vbase_instance, binfo_for_vbase): Delete.
4122         (copied_binfo, original_binfo): Declare.
4123         (finish_base_specifier): Add virtual_p arg.
4124         (unshare_base_binfos): Delete.
4125         (copy_base_binfos): Declare.
4126         (reverse_path): Delete.
4127         * cp/decl.c (xref_basetypes): Access and virtuality passed
4128         differently. Don't copy direct base binfos here. Call
4129         copy_base_binfos.
4130         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
4131         (initialize_vtbl_ptrs): Adjust.
4132         (expand_member_init): Adjust.
4133         * cp/parser.c (cp_parser_base_specifier): Adjust.
4134         * cp/pt.c (instantiate_class_template): Adjust.
4135         (get_template_base_recursive): Adjust.
4136         * cp/rtti.c (get_pseudo_ti_init): Adjust.
4137         (get_pseudo_ti_desc): Adjust.
4138         * cp/tree.c (unshare_base_binfos): Rename to ...
4139         (copy_base_binfos): ... here, reimplement.
4140         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
4141         (reverse_path): Remove.
4142         * cp/typeck.c (get_delta_difference): Adjust error messages.
4143         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
4144         * cp/search.c (lookup_base_r): Adjust.
4145         (dynamic_cast_base_recurse): Adjust.
4146         (canonical_binfo): Remove.
4147         (dfs_canonical_queue): Remove.
4148         (dfs_assert_unmarked_p): Remove.
4149         (assert_canonical_unmarked): Remove.
4150         (shared_marked_p, shared_unmarked_p): Remove.
4151         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
4152         (dfs_access_in_type): Adjust.
4153         (access_in_type): Adjust.
4154         (dfs_accessible_queue_p): Adjust.
4155         (dfs_accessible_p): Adjust.
4156         (is_subobject_of_p_1, is_subobject_of_p): Remove.
4157         (struct lookup_field_info): Remove from_dep_base_p field.
4158         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
4159         (lookup_field_r): Remove dependent base code.
4160         (lookup_member): Likewise.
4161         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
4162         (dfs_unmarked_real_bases_queue_p): Remove.
4163         (dfs_marked_real_bases_queue_p): Remove.
4164         (dfs_skip_vbases): Remove.
4165         (dfs_get_pure_virtuals): Adjust.
4166         (markedp, unmarkedp): Adjust.
4167         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
4168         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
4169         (dfs_unmark): Adjust.
4170         (dfs_get_vbase_types):Remove.
4171         (dfs_build_inheritance_graph_order): Remove.
4172         (get_vbase_types): Remove
4173         (dfs_find_vbase_instance): Remove.
4174         (find_vbase_instance): Remove.
4175         (dfs_debug_unmarkedp): Adjust.
4176         (dependent_base_p): Remove.
4177         (dfs_push_type_decls): Adjust.
4178         (dfs_push_decls): Adjust.
4179         (dfs_no_overlap_yet): Adjust.
4180         (copied_binfo): New function.
4181         (original_binfo): New function.
4182         (binfo_for_vbase): Remove.
4184 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
4186         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
4187         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
4188         vectors, for speed.
4190 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
4192         PR c++/9704
4193         * class.c (layout_class_type): In the 3.2 ABI, take into account
4194         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
4196 2003-02-18  Matt Austern <austern@apple.com>
4198         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
4199         nothing for C++.
4200         * cp/decl.c (wrapup_globals_for_namespace): Remove special
4201         handling of global namespace.
4203 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
4205         * cp-tree.h (rid_to_yy): Delete.
4206         (C_RID_YYCODE): Delete.
4207         (finish_file): Delete redundant declaration.
4209 2003-02-18  Jason Merrill  <jason@redhat.com>
4211         PR c++/9623
4212         * decl.c (reshape_init): Don't mess with initializer labels.
4214         PR c++/9485
4215         * parser.c (cp_parser_postfix_expression): Set idk properly for
4216         object->scope::member.
4218 2003-02-18  Ben Elliston  <bje@redhat.com>
4220         PR other/7350
4221         * decl.c (duplicate_decls): Fix typo in comment.
4223 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
4225         PR debug/9717
4226         * class.c (build_base_field): Mark fields for base classes with
4227         DECL_IGNORED_P.
4229 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4231         PR c++/9457
4232         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
4233         CONSTRUCTOR_ELTS only once.
4235 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4237         PR c++/9459
4238         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
4239         (dump_type_suffix): Likewise.
4241 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4243         * search.c: ANSIfy function declarations and definitions.
4244         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
4245         * call.c (build_method_call, resolve_scoped_fn_name,
4246         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
4247         calls.
4248         * class.c (handle_using_decl): Likewise.
4249         * decl.c (make_typename_type, make_unmound_class_template,
4250         start_decl, compute_array_index_type): Likewise.
4251         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
4252         * init.c (expand_member_init, build_member_call): Likewise.
4253         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
4254         resolve_typename_type): Likewise.
4255         * typeck.c (lookup_destructor, finish_class_member_access_exprm
4256         build_prememfunc_access_expr): Likewise.
4258 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
4260         * decl2.c: Include "timevar.h".
4261         (namespace_ancestor): Time name lookup.
4262         (add_using_namespace): Likewise.
4263         (lookup_using_namespace): Likewise.
4264         (qualified_lookup_using_namespace): Likewise.
4265         (decl_namespace): Likewise.
4266         (lookup_arg_dependent): Likewise.
4267         * lex.c (do_identifier): Likewise.
4268         (do_scoped_id): Likewise.
4269         * pt.c (lookup_template_class): Likewise.
4271 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
4273         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
4275 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4277         * decl.c: Include "timevar.h".
4278         (poplevel): Time name lookup.
4279         (find_binding): Likewise.
4280         (push_namespace): Likewise.
4281         (pop_nested_namespace): Likewise.
4282         (store_bindings): Likewise.
4283         (maybe_push_to_top_level): Likewise.
4284         (pop_from_top_level): Likewise.
4285         (push_local_name): Likewise.
4286         (pushtag): Likewise.
4287         (pushdecl): Likewise.
4288         (pushdecl_with_scope): Likewise.
4289         (pushdecl_namespace_level): Likewise.
4290         (pushdecl_top_level): Likewise.
4291         (pushdecl_class_level): Likewise.
4292         (push_class_level_binding): Likewise.
4293         (push_using_decl): Likewise.
4294         (push_using_directive): Likewise.
4295         (push_overloaded_decl): Likewise.
4296         (lookup_label): Likewise.
4297         (define_label): Likewise.
4298         (lookup_tag): Likewise.
4299         (lookup_tag_reverse): Likewise.
4300         (lookup_namespace_name): Likewise.
4301         (select_decl): Likewise.
4302         (unqualified_namespace_lookup): Likewise.
4303         (lookup_name_real): Likewise.
4304         (lookup_name_current_level): Likewise.
4305         (lookup_type_current_level): Likewise.
4306         (maybe_inject_for_scope_var): Likewise.
4307         (xref_tag): Likewise.
4309         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
4311 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
4313         * decl.c (build_enumerator):  Remove unneeded test.
4315 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
4317         * cp-tree.h (struct lang_type_header): Make all fields unsigned
4318         char.
4320 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
4322         PR c++/7129
4323         * call.c (z_candidate): Add args.
4324         (convert_class_to_reference): Set it.
4325         (implicit_conversion): Tidy.
4326         (add_candidate): Add args parameter.
4327         (add_function_candidate): Adjust call to add_candidate.
4328         (add_conv_candidate): Likewise.
4329         (build_builtin_candidate): Likewise.
4330         (build_user_type_conversion_1): Eliminate wasteful tree_cons
4331         usage.
4332         (build_new_function_call): Likewise.
4333         (build_object_call): Likewise.
4334         (add_candidates): New function.
4335         (build_new_op): Use it.
4336         (covert_like_real): Adjust call to build_over_call.
4337         (build_over_call): Remove args parameter.
4338         * operators.def: Add <?= and >?=.
4340 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
4342         * typeck.c (build_indirect_ref): Don't check flag_volatile.
4344 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4346         PR c++/8849
4347         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
4349 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
4351         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
4352         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
4353         (BINFO_LANG_ELTS): New #define.
4354         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
4356 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
4358         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
4360 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
4362         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
4363         for class types.
4364         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
4365         rather than TYPE_LANG_FLAG_0.
4366         (TYPE_BUILT_IN): Remove.
4367         (TYPE_DEPENDENT_P): New macro.
4368         (TYPE_DEPENDENT_P_VALID): Likewise.
4369         (lang_type_class): Add fields_readonly.
4370         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
4371         * pt.c (dependent_type_p_r): New function, split out from ...
4372         (dependent_type_p): ... here.  Memoize results.
4373         * search.c (dependent_base_p): Use dependent_type_p, not
4374         uses_template_parms.
4375         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
4376         for class types.
4378 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
4380         * call.c (build_field_call): Use build_new_op, not build_opfncall.
4381         (prep_operand): New function.
4382         (build_new_op): Use it.  Remove dead code.
4383         * class.c (pushclass): Change "modify" parameter type from int to
4384         bool.
4385         (currently_open_class): Use same_type_p, not pointer equality.
4386         (push_nested_class): Adjust calls to pushclass, remove modify
4387         parameter.
4388         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
4389         (pushclass): Change prototype.
4390         (push_nested_class): Likewise.
4391         (grokoptypename): Remove.
4392         (build_opfncall): Remove.
4393         (value_dependent_expression_p): Declare.
4394         (resolve_typename_type): Likewise.
4395         (resolve_typename_type_in_current_instantiation): Likewise.
4396         (enter_scope_of): Remove.
4397         (tsubst): Remove.
4398         (tsubst_expr): Likewise.
4399         (tsubst_copy): Likewise.
4400         (tsubst_copy_and_build): Likewise.
4401         * decl.c (warn_about_implicit_typename_lookup): Remove.
4402         (finish_case_label): Return error_mark_node for erroneous labels.
4403         (start_decl): Adjust calls to push_nested_class.
4404         (grokfndecl): Call push_scope/pop_scope around call to
4405         duplicate_decls.
4406         (grokdeclarator): Do not call tsubst.
4407         (start_function): Adjust calls to push_nested_class.
4408         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
4409         (check_classfn): Use push_scope/pop_scope around type comparisions.
4410         (grokoptypename): Remove.
4411         (push_sscope): Adjust call to push_nested_class.
4412         * error.c (dump_type): Show cv-qualification of typename types.
4413         * init.c (build_member_call): Use build_new_op, not
4414         build_opfncall.
4415         * method.c (build_opfncall): Remove.
4416         * parser.c (cp_parser): Add allow_non_constant_expression_p and
4417         non_constant_expression_p.
4418         (cp_parser_constant_expression): Adjust prototype.
4419         (cp_parser_resolve_typename_type): Remove.
4420         (cp_parser_non_constant_expression): New function.
4421         (cp_parser_non_constant_id_expression): Likewise.
4422         (cp_parser_new): Set allow_non_constant_expression_p and
4423         non_constant_expression_p.
4424         (cp_parser_primary_expression): Reject `this' and `va_arg' in
4425         constant-expressions.  Note that dependent names aren't really
4426         constant.
4427         (cp_parser_postfix_expression): Reject conversions to non-integral
4428         types in constant-expressions.  Neither are increments or
4429         decrements.
4430         (cp_parser_unary_expression): Reject increments and decrements in
4431         constant-expressions.
4432         (cp_parser_direct_new_declarator): Adjust call to
4433         cp_parser_constant_expression.
4434         (cp_parser_cast_expression): Reject conversions to non-integral
4435         types in constant-expressions.
4436         (cp_parser_assignment_expression): Rejects assignments in
4437         constant-expressions.
4438         (cp_parser_expression): Reject commas in constant-expressions.
4439         (cp_parser_labeled_statement): Adjust call to
4440         cp_parser_constant_expression.
4441         (cp_parser_direct_declarator): Simplify array bounds, even in
4442         templates, when they are non-dependent.  Use
4443         resolve_typename_type, not cp_parser_resolve_typename_type.
4444         (cp_parser_class_head): Use resolve_typename_type, not
4445         cp_parser_resolve_typename_type.
4446         (cp_parser_member_declaration): Adjust call to
4447         cp_parser_constant_expression.
4448         (cp_parser_constant_initializer): Likewise.
4449         (cp_parser_constructor_declarator): Use resolve_typename_type, not
4450         cp_parser_resolve_typename_type.
4451         (cp_parser_late_parsing_default_args): Adjust call to
4452         push_nested_class.
4453         * pt.c (tsubst): Give it internal linkage.
4454         (tsubst_expr): Likewise.
4455         (tsubst_copy): Likewise.
4456         (tsubst_copy_and_build): Likewise.
4457         (push_access_scope_real): Likewise.
4458         (tsubst_friend_class): Likewise.
4459         (instantiate_class_template): Adjust call to pushclass.
4460         (value_dependent_expression_p): Give it external linkage.
4461         Robustify.
4462         (resolve_typename_type): New function.
4463         * semantics.c (finish_call_expr): Use build_new_op, not
4464         build_opfncall.
4465         (begin_constructor_declarator): Remove.
4466         (begin_class_definition): Adjust call to pushclass.
4467         (enter_scope_of): Remove.
4468         * typeck.c (comptypes): Resolve typename types as appropriate.
4469         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
4470         (build_x_compound_expr): Likewise.
4471         (build_modify_expr): Likewise.
4472         (build_x_modify_expr): Likewise.
4473         * typeck2.c (build_x_arrow): Likewise.
4475 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
4477         * pt.c (last_pending_template) Declare GTY().
4479 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4481         PR c++/8591
4482         * parser.c (cp_parser_elaborated_type_specifier): Convert
4483         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
4484         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
4486 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
4488         PR c++/9437
4489         * pt.c (unify): Don't unify '*T' with 'U C::*'.
4491         PR c++/3902
4492         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
4493         inside a declarator.
4495 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
4497         * class.c (update_vtable_entry_for_fn): Add index parameter.
4498         Generate vcall thunk for covariant overriding from a virtual
4499         primary base.
4500         (dfs_modify_vtables): Adjust.
4502 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
4504         PR c++/9403
4505         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
4506         template keyword.
4507         (cp_parser_base_specifier): Look for and consume a
4508         TEMPLATE keyword. Replace switch with array index.
4510         PR c++/795
4511         * semantics.c (finish_non_static_data_member): Remember the
4512         field's type even in a template.
4514         PR c++/9415
4515         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
4516         already scoped.
4518         PR c++/8545
4519         * parser.c (cp_parser_cast_expression): Be more tentative.
4521 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4523         * cp-tree.h (flagged_type_tree_s): Remove.
4524         (check_for_new_type): Likewise.
4525         * typeck2.c (check_for_new_type): Likewise.
4527 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
4529         * dump.c: ANSIfy function declarations and definitions.
4531         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
4533 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4535         PR c++/9354
4536         * init.c (build_new): Set the type of the new-expression, even
4537         when processing_templte_decl.
4539         PR c++/9216
4540         * parser.c (cp_parser_primary_expression): Improve error message
4541         for templates used in an expression context.
4543         PR c++/8696
4544         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
4545         parse when encountering "typedef".
4547 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
4549         * class.c, parser.c: ANSIfy function definitions and declarations.
4551 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4553         PR c++/9328
4554         * error.c (dump_decl): For an OVERLOAD, just print the name of the
4555         function; it doesn't make sense to try to print its type.
4556         * semantics.c (finish_typeof): Issue errors about invalid uses.
4558         PR c++/9298
4559         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
4560         function.
4561         (cp_parser_expression_statement): Use it.
4562         (cp_parser_explicit_instantiation): Likewise.
4563         * pt.c (do_decl_instantiation): Improve error handling logic.
4565 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
4567         PR c++/9384
4568         * parser.c (cp_parser_using_declaration): Issue error messages
4569         about name resolution failures here.
4571         PR c++/9388
4572         * class.c (currently_open_derived_class): Use dependent_type_p.
4573         * cp-tree.h (dependent_type_p): New function.
4574         (dependent_template_arg_p): Likewise.
4575         (dependent_template_p): Likewise.
4576         (type_dependent_expression_p): Likewise.
4577         * parser.c (cp_parser_dependent_type_p): Remove.
4578         (cp_parser_value_dependent_type_p): Likewise.
4579         (cp_parser_type_dependent_expression_p): Likewise.
4580         (cp_parser_dependent_template_arg_p): Likewise.
4581         (cp_parser_dependent_template_id_p): Likewise.
4582         (cp_parser_dependent_template_p): Likewise.
4583         (cp_parser_diagnose_invalid_type_name): Replace
4584         cp_parser_dependent_type_p with dependent_type_p, etc.
4585         (cp_parser_primary_expresion): Likewise.
4586         (cp_parser_nested_name_specifier_opt): Likewise.
4587         (cp_parser_postfix_expression): Likewise.
4588         (cp_parser_unary_expression): Likewise.
4589         (cp_parser_template_name): Likewise.
4590         (cp_parser_class_name): Likewise.
4591         (cp_parser_lookup_name): Likewise.
4592         * pt.c (dependent_type_p): New function.
4593         (value_dependent_expression_p): Likewise.
4594         (type_dependent_expression_p): Likewise.
4595         (dependent_template_arg_p): Likewise.
4596         (dependent_template_id_p): Likewise.
4597         (dependent_template_p): Likewise.
4599         PR c++/9285
4600         PR c++/9294
4601         * parser.c (cp_parser_simple_declaration): Return quickly when
4602         encountering errors.
4604 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4606         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
4608 2003-01-17  Jason Merrill  <jason@redhat.com>
4610         PR c++/9167, c++/9358
4611         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
4613 2003-01-17  Jason Merrill  <jason@redhat.com>
4615         PR c++/9342
4616         * call.c (build_conditional_expr): Always do lvalue-rvalue
4617         conversion.
4619 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
4621         PR c++/9294
4622         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
4623         * cp-tree.h (BASELINK_BINFO): Adjust.
4624         (BASELINK_FUNCTIONS): Likewise.
4625         (BASELINK_ACCESS_BINFO): Likewise.
4626         (tree_baselink): New structure.
4627         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
4628         (lang_tree_node): Add baselink.
4629         * decl.c (cp_tree_node_structure): Add BASELINK case.
4630         * search.c (build_baselink): Adjust.
4631         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
4632         test from TREE_LIST case.
4634         PR c++/9272
4635         * parser.c (cp_parser_constructor_declarator_p): Do not assume
4636         that a constructor cannot be declared outside of its own class.
4638         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
4639         be resolved, neither can the qualified name.
4641         * rtti.c (get_pseudo_ti_desc): Fix thinko.
4643 2003-01-16  Jason Merrill  <jason@redhat.com>
4645         PR c++/8564
4646         * init.c (build_vec_init): Re-add maxindex parm.
4647         (perform_member_init, build_aggr_init): Pass it.
4648         (build_new_1): Pass it. Use an incomplete array type for full_type.
4649         * typeck.c (build_modify_expr): Pass it.
4650         * cp-tree.h: Adjust.
4652 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
4654         * cp-tree.h (tsubst_copy_and_build): New declaration.
4655         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
4656         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
4657         (tsubst_copy_and_build): New function.
4659 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
4661         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
4662         (PARTIAL_INSTANTIATION_P): Remove.
4663         (IMPLICIT_TYPENAME_P): Likewise.
4664         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
4665         (build_typename_type): Remove declaration.
4666         (parmlist_is_exprlist): Likewise.
4667         * decl.c (build_typename_type): Make it static, remove third
4668         parameter.
4669         (push_class_binding): Don't do implicit typename stuff.
4670         (make_typename_type): Likewise.
4671         (lookup_name_real): Likewise.
4672         (grokdeclarator): Don't try to convert declarations into
4673         initializations.  Don't do implicit typename stuff.
4674         (parmlist_is_exprlist): Remove.
4675         (xref_basetypes): Simplify.
4676         * decl2.c (grokfield): Don't try to convert declarations into
4677         initializations.
4678         (build_anon_union_vars): Do this while processing templates, too.
4679         (finish_anon_union): Likewise.
4680         * error.c (dump_type): Remove implicit typename handling.
4681         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
4682         (cp_parser_primary_expression): Correct handling of names not
4683         found by unqualified name lookup in templates.
4684         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
4685         of types when possible.
4686         (cp_parser_simple_declaration): Complain intelligently about some
4687         invalid declarations.
4688         (cp_parser_member_declaration): Likewise.
4689         (cp_parser_constructor_declarator_p): Don't check when we're in a
4690         function scope.
4691         * pt.c (instantiate_class_template): Remove
4692         PARTIAL_INSTANTIATION_P gunk.
4693         * search.c (lookup_field_r): Don't build implicit typenames.
4694         (marked_pushdecls_p): Don't enter dependent base types.
4695         (unmarked_pushdecls_p): Likewise.
4696         * semantics.c (begin_class_definition): Remove implicit typename
4697         stuff.
4699 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
4701         PR c++/9212
4702         * parser.c (cp_parser_direct_declarator): If accepting either
4703         abstract or named, the name must be an unqualified-id.
4705 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4707         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
4709 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4711         * decl2.c (check_classfn): Fix uninitialized warning.
4712         (build_anon_union_vars): Likewise.
4713         * pt.c (tsubst_copy): Likewise.
4715 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
4717         Further conform g++'s __vmi_class_type_info to the C++ ABI
4718         specification.
4719         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
4720         the specification.
4721         (class_hint_flags): Likewise.
4723 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4725         * config-lang.in: Add semantics.c to gtfiles.
4726         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
4727         (saved_scope): Likewise.
4728         (type_lookups): Remove.
4729         (deferred_access): New structure.
4730         (type_access_control): Remove.
4731         (save_type_access_control): Likewise.
4732         (reset_type_access_control): Likewise.
4733         (decl_type_access_control): Likewise.
4734         (push_deferring_access_checks): Declare.
4735         (resume_deferring_access_checks): Likewise.
4736         (stop_deferring_access_checks): Likewise.
4737         (pop_deferring_access_checks): Likewise.
4738         (get_deferred_access_checks): Likewise.
4739         (pop_to_parent_deferring_access_checks): Likewise.
4740         (perform_deferred_access_checks): Likewise.
4741         (perform_or_defer_access_check): Likewise.
4742         * decl.c (make_typename_type): Use perform_or_defer_access_check.
4743         (make_unbound_class_template): Likewise.
4744         (grokdeclarator): Don't call decl_type_access_control.
4745         * parser.c (cp_parser_context): Remove deferred_access_checks
4746         and deferring_access_checks_p fields.
4747         (cp_parser_context_new): Adjust.
4748         (cp_parser): Remove access_checks_lists.
4749         (cp_parser_defer_access_check): Remove.
4750         (cp_parser_start_deferring_access_checks): Remove.
4751         (cp_parser_stop_deferring_access_checks): Remove.
4752         (cp_parser_perform_deferred_access_checks): Remove.
4753         (cp_parser_nested_name_specifier_opt): Use new deferred access
4754         functions.
4755         (cp_parser_simple_declaration): Likewise.
4756         (cp_parser_template_id): Likewise.
4757         (cp_parser_function_definition): Likewise.
4758         (cp_parser_class_specifier): Likewise.
4759         (cp_parser_lookup_name): Likewise.
4760         (cp_parser_single_declaration): Likewise.
4761         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
4762         (cp_parser_parse_tentatively): Likewise.
4763         (cp_parser_parse_definitely): Likewise.
4764         (yyparse): Likewise.
4765         (cp_parser_init_declarator): Remove access_checks parameter.
4766         Use new deferred access functions.
4767         (cp_parser_function_definition_from_specifiers_and_declarator):
4768         Likewise.
4769         (cp_parser_class_head): Remove deferring_access_checks_p and
4770         saved_access_checks parameters.  Use new deferred access functions.
4771         (cp_parser_member_specification_opt): Don't call
4772         reset_type_access_control.
4773         * search.c (type_access_control): Remove.
4774         * semantics.c: Include "gt-cp-semantics.h".
4775         (deferred_type_access_control): Remove.
4776         (deferred_access_stack): New variable.
4777         (deferred_access_free_list): Likewise.
4778         (push_deferring_access_checks): New function.
4779         (resume_deferring_access_checks): Likewise.
4780         (stop_deferring_access_checks): Likewise.
4781         (pop_deferring_access_checks): Likewise.
4782         (get_deferred_access_checks): Likewise.
4783         (pop_to_parent_deferring_access_checks): Likewise.
4784         (perform_deferred_access_checks): New function, adapted from
4785         cp_parser_perform_deferred_access_checks.
4786         (perform_or_defer_access_check): New function, adapted from
4787         cp_parser_defer_access_check.
4788         (current_type_lookups): Remove.
4789         (deferred_type_access_control): Likewise.
4790         (decl_type_access_control): Likewise.
4791         (save_type_access_control): Likewise.
4792         (reset_type_access_control): Likewise.
4793         (begin_function_definition): Adjust.
4794         (begin_class_definiton): Likewise.
4796 2003-01-13  Jason Merrill  <jason@redhat.com>
4798         PR c++/8748
4799         * class.c (build_base_path): Take the address before calling save_expr.
4801         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
4802         all the ambiguous conversions are bad.
4804         * class.c (maybe_warn_about_overly_private_class): Don't stop
4805         searching when we find a nonprivate method.
4807         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
4809 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
4811         * cp-tree.h (get_arglist_len_in_bytes): Remove.
4813         PR c++/9264
4814         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
4815         typeame types more robustly.
4817 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
4819         * parser.c:  Fix comment typos.
4821 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
4823         PR c++/9099
4824         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
4825         an object_type which is not a class type.
4827 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
4829         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
4830         (cp_parser_late_parsing_default_args): Likewise.
4832 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
4834         * cfns.gperf: ANSIfy function declarations.
4835         * cfns.h: Regenerate.
4836         * cp-tree.h: ANSIfy function declarations.
4838 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
4840         * cp-tree.h (reparse_absdcl_as_expr): Remove.
4841         (reparse_absdcl_as_casts): Likewise.
4842         (reparse_decl_as_expr): Likewise.
4843         (finish_decl_parsing): Likewise.
4844         * decl2.c (reparse_absdcl_as_expr): Remove.
4845         (reparse_absdcl_as_casts): Likewise.
4846         (repase_decl_as_expr): Likewise.
4847         (finish_decl_parsing): Likewise.
4849         PR c++/9128
4850         PR c++/9153
4851         PR c++/9171
4852         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
4853         function.
4854         (cp_parser_nested_name_specifier_opt): Correct the
4855         check_dependency_p false.
4856         (cp_parser_postfix_expression): Fix formatting.
4857         (cp_parser_decl_specifier_seq): Avoid looking for constructor
4858         declarators when possible.
4859         (cp_parser_template_id): Avoid performing name-lookup when
4860         possible.
4861         (cp_parser_class_head): Do not count specializations when counting
4862         levels of templates.
4863         (cp_parser_constructor_declarator_p): Return immediately if
4864         there's no chance that the tokens form a constructor declarator.
4865         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
4866         expression with reference type.
4867         (get_tinfo_decl_dynamic): Do not return an expression with
4868         reference type.
4869         (build_typeid): Add comment.  Do not return an expression with
4870         reference type.
4871         * typeck.c (build_class_member_access_expr): Improve handling of
4872         conditionals and comma-expressions as objects.
4874 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
4876         * cfns.gperf: ANSIfy function declarations.
4877         * cfns.h: Regenerate.
4878         * cp-tree.h: ANSIfy function declarations.
4879         * parser.c: ANSIfy function declarations & definitions.
4881         * decl.c (bad_specifiers): Fix parameter order error I introduced.
4883 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
4885         Merge from pch-branch:
4887         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
4889         Merge to tag pch-merge-20030102:
4891         * semantics.c (finish_translation_unit): Don't call finish_file.
4892         * parser.c: Don't include ggc.h.
4893         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
4894         read first token here.  Don't allow PCH files after the first
4895         token is read.
4896         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
4897         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
4898         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
4899         (cp_parser_late_parsing_for_member): Don't duplicate call to
4900         cp_lexer_set_source_position_from_token.
4901         (cp_parser_late_parsing_default_args): Likewise.
4902         (yyparse): Call finish_file after clearing the_parser.
4904         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
4906         * Make-lang.in: Remove $(GGC_H) from all dependencies.
4907         (CXX_TREE_H): Add $(GGC_H).
4908         * class.c: Don't include ggc.h.
4909         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
4910         (method_name_cmp): Likewise.
4911         (resort_data): New variable.
4912         (resort_field_decl_cmp): New.
4913         (resort_method_name_cmp): New.
4914         (resort_sorted_fields): New.
4915         (resort_type_method_vec): New.
4916         (finish_struct_methods): Delete cast.
4917         (finish_struct_1): Delete cast.
4918         * cp-tree.h: Include ggc.h.
4919         (struct lang_type_class): Add reorder attribute to field `methods'.
4920         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
4921         (resort_sorted_fields): New prototype.
4922         (resort_type_method_vec): New prototype.
4923         * call.c: Don't include ggc.h.
4924         * decl.c: Likewise.
4925         * decl2.c: Likewise.
4926         * init.c: Likewise.
4927         * lex.c: Likewise.
4928         * method.c: Likewise.
4929         * optimize.c: Likewise.
4930         * parse.y: Likewise.
4931         * pt.c: Likewise.
4932         * repo.c: Likewise.
4933         * search.c: Likewise.
4934         * semantics.c: Likewise.
4935         * spew.c: Likewise.
4936         * tree.c: Likewise.
4938         * lang-specs.h: Remove comment.
4940         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
4942         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
4943         (operator_name_info): Mark to be saved for PCH, specify size.
4944         (assignment_operator_name_info): Likewise.
4946         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
4948         * decl.c (anon_cnt): Mark to be saved for PCH.
4950         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
4952         * lex.c  (init_reswords): Delete now-untrue comment.
4953         Allocate ridpointers using GGC.
4955         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
4957         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
4959         * g++spec.c (lang_specific_driver): Don't include standard
4960         libraries in `added'.
4962         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
4964         * decl2.c (finish_file): Call c_common_write_pch.
4965         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
4967         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
4969         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
4970         files when using g++.
4971         * lang-specs.h: Handle compiling C++ header files.
4973 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
4975         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
4977 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4979         * pt.c (push_access_scope_real): Call push_to_top_level for
4980         function in namespace scope.
4981         (pop_access_scope): Call pop_from_top_level for function in
4982         namespace scope.
4984 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
4986         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
4988 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
4990         * Make-lang.in (c++.install-common, c++.install-man,
4991         c++.uninstall): Prepend $(DESTDIR) to destination paths in
4992         all (un)installation commands.
4993         (c++.install-common): Rewrite $(LN) commands to support
4994         DESTDIR with "ln" as well as with "ln -s".
4996 2003-01-08  Jason Merrill  <jason@redhat.com>
4998         * parser.c (cp_parser_primary_expression): See through explicitly
4999         scoped ALIAS_DECLs, too.
5001 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
5003         * decl.c: Remove some #if 0 code.
5005         * decl.c: ANSIfy function declarations.
5007 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
5009         * parser.c (cp_parser_asm_definition): Correct handling of omitted
5010         operands.
5012 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5014         PR c++/9030
5015         * decl.c (make_typename_type): Check access only when tf_error.
5016         (make_unbound_class_template): Likewise.
5017         * pt.c (saved_access_scope): New variable.
5018         (push_access_scope_real): New function.
5019         (push_access_scope): Likewise.
5020         (pop_access_scope): Likewise.
5021         (tsubst_default_argument): Use them.
5022         (instantiate_template): Likewise.
5023         (regenerate_decl_from_template): Likewise.
5024         (instantiate_decl): Likewise.
5025         (get_mostly_instantiated_function_type): Likewise.
5027 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
5029         * tree.c: Delete bogus #if 0 code.
5031 2003-01-07  Andreas Schwab  <schwab@suse.de>
5033         * class.c (layout_class_type): Don't use
5034         PCC_BITFIELD_TYPE_MATTERS if not defined.
5036 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
5038         PR c++/9165
5039         * decl2.c (build_cleanup): Mark the object as used.
5041         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
5042         (hash_local_specialization): New function.
5043         (register_local_specialization): Revert 2003-01-05 change.
5044         (instantiate_decl): Use hash_local_specialization when creating
5045         the local_specializations table.
5047         * decl2.c (mark_used): Do not synthesize thunks.
5049         * class.c (layout_class_type): Correct handling of unnamed
5050         bitfields wider than their types.
5052         PR c++/9189
5053         * parser.c (cp_parser): Remove default_arg_types.  Update
5054         documentation for unparsed_functions_queues.
5055         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
5056         parameter.
5057         (cp_parser_new): Don't set parser->default_arg_types.
5058         (cp_parser_function_definition): Adjust usage of
5059         unparsed_funtions_queues.
5060         (cp_parser_class_specifier): Don't mess with
5061         parser->default_arg_types.  Handle default argument processing in
5062         a separate phase from function body processing.
5063         (cp_parser_template_declaration_after_export): Adjust usage of
5064         unparsed_functions_queues.
5065         (cp_parser_late_parsing_for_member): Do not handle default
5066         arguments.
5068 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
5070         PR c++/9109
5071         * parser.c (cp_parser_declarator_kind): New enum.
5072         (cp_parser_declarator): Adjust.
5073         (cp_parser_direct_declarator): Adjust. Allow for either named or
5074         abstract declarator. Prefer abstract, if possible. Allow
5075         parenthesized function name.
5076         (cp_parser_condition): Adjust cp_parser_declarator call.
5077         (cp_parser_explicit_instantiation): Likewise.
5078         (cp_parser_init_declarator): Likewise.
5079         (cp_parser_type_id): Likewise.
5080         (cp_parser_function_definition): Likewise.
5081         (cp_parser_member_declaration): Likewise.
5082         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
5083         the tentative parsing.
5084         (cp_parser_exception_declaration): Likewise.
5086 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
5088         * parser.c (cp_parser_template_parameter): Adjust call to
5089         cp_parser_parameter_declaration.
5090         (cp_parser_parameter_declaration_list): Likewise.
5091         (cp_parser_parameter_declaration): Replace
5092         greater_than_is_operator_p with template_parm_p parameter.  Do not
5093         cache tokens for template default arguments.
5095         * pt.c (retrieve_local_specialization): Use htab_find, not
5096         htab_find_with_hash.
5097         (register_local_specialization): Use htab_find_slot, not
5098         htab_find_slot_with_hash.
5099         (instantiate_decl): Pass a hash function to htab_create.
5101 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5103         * parser.c (cp_parser_binary_expression,
5104         cp_parser_multiplicative_expression,
5105         cp_parser_additive_expression, cp_parser_shift_expression,
5106         cp_parser_relational_expression, cp_parser_equality_expression,
5107         cp_parser_and_expression, cp_parser_exclusive_or_expression,
5108         cp_parser_inclusive_or_expression,
5109         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
5110         cp_parser_binary_expression): Const-ify.
5112 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
5114         * method.c (use_thunk): Disable access control while building the
5115         body of the thunk.
5117 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
5119         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
5120         front end.
5122 2003-01-03  Matt Austern  <austern@apple.com>
5124         * cp-tree.h (struct lang_type_class): add field for key method
5125         (cp_global_trees): rename dynamic_classes to keyed_classes
5126         (key_method): add definition
5127         * class.c (finish_struct_1): compute class's key method, and add
5128         the class to keyed_classes list if there is no key method.
5129         * decl.c (finish_function): add class to keyed_classes list if we
5130         see a definition of the class's key method.
5131         * pt.c (instantiate_class_template): add template specialization
5132         of a dynamic class to keyed_classes list.
5133         * decl2.c (key_method): remove
5134         (finish_file): iterate only through keyed_classes list when
5135         deciding whether to emit vtables, remove class from its list after
5136         we do the emission.
5138 2003-01-02  Jason Merrill  <jason@redhat.com>
5140         * call.c (build_conditional_expr): Stabilize lvalues properly.
5141         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
5142         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
5143         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
5145         * call.c (convert_like_real): Call decl_constant_value for an
5146         IDENTITY_CONV even if there are no more conversions.
5148         * cvt.c (build_up_reference): Don't push unnamed temps.
5150         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
5152         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
5153         for a backend struct.
5155         * except.c (wrap_cleanups_r, build_throw): Make
5156         MUST_NOT_THROW_EXPRs void.
5157         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
5159         * init.c (build_vec_delete_1): Pre-evaluate the base address.
5161         * init.c (get_temp_regvar): Simplify logic.
5163         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
5164         our replacement is a decl.
5166         * decl.c (cp_make_fname_decl): Push the decls inside the
5167         outermost scope.
5169 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5171         PR c++/45, c++/3784
5172         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
5173         the same too.
5175 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
5177         * parser.c (struct cp_parser): Add access_checks_lists field
5178         (cp_parser_simple_declaration): Use.
5179         (cp_parser_init_declarator): Likewise.
5181 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5183         * parser.c (cp_parser_declaration): Accept the __extension__
5184         keyword before the declaration.
5186         PR c++/2843
5187         * parser.c (cp_parser_parameter_declaration): Allow attributes to
5188         appear after the declarator.
5190         * call.c (build_new_method_call): Fix typo in message format
5191         string.
5193 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
5195         * parser.c (cp_lexer_next_token_is): Declare it inline.
5196         (cp_lexer_set_source_position_from_token): Likewise.
5197         (cp_lexer_debugging_p): Likewise.
5198         (cp_parser_parsing_tentatively): Likewise.
5199         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
5200         to the cp_lexer_peek_token.
5202         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
5203         expression.
5205 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
5207         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
5208         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
5209         cp/repo.c: Fix copyright years.
5211 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
5213         * lex.c: Remove superfluous include of cpplib.h.
5214         (CONSTRAINT): Define without conditions.
5215         (init_cp_pragma): Use c_register_pragma.
5217 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5219         * .cvsignore: Remove.
5221 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
5223         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
5224           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
5225           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
5226           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
5227           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
5228           copyright header.
5229         * lex.h: parse.y is dead, so don't mention it.  Also replace the
5230           copyright header with the default GNU copyright header.
5232 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5234         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
5235         (lookup_name_namespace_only): Likewise.
5236         (begin_only_namespace_names): Likewise.
5237         (end_only_namespace_names): Likewise.
5238         * decl.c (only_namespace_names): Remove.
5239         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
5240         (lookup_name_real): Do not check only_namespace_names.
5241         (lookup_name_namespace_only): Remove.
5242         (begin_only_namespace_names): Likewise.
5243         (end_only_namespace_names): Likewise.
5244         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
5245         nested-name-specifiers more gracefully.
5246         (cp_parser_class_or_namespace_name): Avoid looking up namespace
5247         names when they cannot possibly appear.
5248         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
5249         (cp_parser_elaborated_type_specifier): Likewise.
5250         (cp_parser_namespace_name): Only look for namespace names.
5251         (cp_parser_lookup_name): Add is_namespace parameter.
5252         (cp_parser_lookup_name_simple): Adjust call to
5253         cp_parser_lookup_name.
5255         * parser.c (cp_parser_dependent_type_p): Fix thinko.
5257 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
5259         * .cvsignore: Update.
5261 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
5263         * class.c (modify_vtable_entry): Remove unused variable.
5264         (get_vcall_index): Always expect a non-thunk.
5265         (update_vtable_entry_for_fn): Combine covariant adjustments, when
5266         overriding a thunk. Pass get_vcall_index a non-thunk.
5268         * decl2.c (finish_file): Mark undefined inlines as extern.
5270 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5272         * cp-tree.def (RETURN_INIT): Remove.
5273         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
5274         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
5275         (note_level_for_for): Remove.
5276         (note_level_for_try): Likewise.
5277         (note_level_for_catch): Likewise.
5278         (finish_named_return_value): Likewise.
5279         (do_pushlevel): Change prototype.
5280         (pending_lang_change): Remove.
5281         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
5282         sk_for.
5283         (note_level_for_for): Remove.
5284         (note_level_for_try): Likewise.
5285         (note_level_for_catch): Likewise.
5286         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
5287         * parser.c (cp_parser_context_free_list): Make it "deletable".
5288         (cp_parser_template_argument): Remove misleading comment.
5289         * pt.c (tsubst_expr): Remove RETURN_INIT code.
5290         * semantics.c (genrtl_named_return_value): Remove.
5291         (do_pushlevel): Take a scope kind as an argument.
5292         (begin_if_stmt): Adjust.
5293         (begin_while_stmt): Likewise.
5294         (begin_for_stmt): Likewise.
5295         (finish_for_init_stmt): Likewise.
5296         (begin_switch_stmt): Likewise.
5297         (begin_handler): Likewise.
5298         (begin_compound_stmt): Likewise.
5299         (finish_named_return_value): Remove.
5300         (cp_expand_stmt): Remove RETURN_INIT case.
5301         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
5303 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
5305         PR c++/9112
5306         * parser.c (cp_parser_direct_declarator): Handle erroneous
5307         parenthesized declarators correctly.
5309 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5311         * cp-tree.h (pending_lang_change): Declare.
5313 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
5315         * parser.c (cp_parser_context_free_list): New variable.
5316         (cp_parser_context_new): Use it.
5317         (cp_parser_error): Check return code from
5318         cp_parser_simulate_error.
5319         (cp_parser_simulate_error): Return a value.
5320         (cp_parser_id_expression): Optimize common case.
5321         (cp_parser_class_name): Likewise.
5322         (cp_parser_class_specifier): Adjust call to
5323         cp_parser_late_parsing_default_args.
5324         (cp_parser_lookup_name): Optimize common case.
5325         (cp_parser_late_parsing_for_member): Adjust call to
5326         cp_parser_late_parsing_default_args.
5327         (cp_parser_late_parsing_default_args): Add scope parameter.
5328         (cp_parser_require): Avoid creating the error message unless it's
5329         needed.
5330         (cp_parser_parse_definitely): Place free'd contexts on the free
5331         list.
5333         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
5335 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
5337         * parser.c (cp_parser_parameter_declaration_clause): Treat system
5338         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
5340 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5342         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
5343         GCC, not GNU CC.
5345 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
5347         * parse.y: Remove.
5348         * spew.c: Likewise.
5349         * Make-lang.in (gt-cp-spew.h): Remove.
5350         * cp-tree.h (do_pending_lang_change): Remove.
5351         (do_identifier): Change prototype.
5352         (finish_id_expr): Remove.
5353         * decl.c (lookup_name_real): Remove yylex variable.
5354         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
5355         * lex.c (init_cpp_parse): Remove.
5356         (reduce_cmp): Likewise.
5357         (token_cmp): Likewise.
5358         (yychar): Likewise.
5359         (lastiddecl): Likewise.
5360         (token_count): Likewise.
5361         (reduce_count): Likewise.
5362         (yyhook): Likewise.
5363         (print_parse_statistics): Likewise.
5364         (do_pending_lang_change): Likewise.
5365         (do_identifier): Remove parsing parameter.
5366         * lex.h (lastiddecl): Remove.
5367         (looking_for_typename): Remove.
5368         (looking_for_template): Likewise.
5369         (pending_lang_change): Likewise.
5370         (yylex): Likewise.
5371         * semantics.c (finish_id_expr): Remove.
5373         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
5374         thread" correctly.
5376 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5378         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
5379         end, not the C front end.
5381 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
5383         * cp-tree.h (THUNK_TARGET): New macro.
5384         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
5385         (finish_thunk): Remove offset parms.
5386         * class.c (find_final_overrider): Look through thunks.
5387         (get_vcall_index): Use THUNK_TARGET.
5388         (update_vtable_entry_for_fn): Look through thunks. Set covariant
5389         fixed offset here. Adjust finish_thunk call.
5390         (build_vtbl_initializer): Adjust finish_thunk calls.
5391         * mangle.c (mangle_call_offset): Remove superfluous if.
5392         (mangle_thunk): Adjust.
5393         * method.c (make_thunk): Adjust.
5394         (finish_thunk): Adjust.
5395         (thunk_adjust): Remove assert.
5396         (use_thunk): Use THUNK_TARGET
5397         * dump1.c (cp_dump_tree): Adjust thunk dumping.
5399         PR c++/9054
5400         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
5401         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
5403 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5405         Remove traditional C constructs 4/n.
5406         * decl2.c (grok_method_quals, warn_if_unknown_interface,
5407         grok_x_components, cp_build_parm_decl, build_artificial_parm,
5408         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
5409         delete_sanity, check_member_template, check_java_method,
5410         check_classfn, finish_static_data_member_decl, grokfield,
5411         grokbitfield, grokoptypename, grok_function_init,
5412         cplus_decl_attributes, constructor_name, defer_fn,
5413         build_anon_union_vars, finish_anon_union, coerce_new_type,
5414         coerce_delete_type, comdat_linkage, maybe_make_one_only,
5415         key_method, import_export_vtable, import_export_class,
5416         output_vtable_inherit, import_export_decl, import_export_tinfo,
5417         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
5418         set_guard, start_objects, finish_objects,
5419         start_static_storage_duration_function,
5420         finish_static_storage_duration_function, get_priority_info,
5421         start_static_initialization_or_destruction,
5422         finish_static_initialization_or_destruction,
5423         do_static_initialization, do_static_destruction,
5424         prune_vars_needing_no_initialization, write_out_vars,
5425         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
5426         add_using_namespace, merge_functions, ambiguous_decl,
5427         lookup_using_namespace, lookup_using_namespace,
5428         qualified_lookup_using_namespace, set_decl_namespace,
5429         decl_namespace, current_decl_namespace, push_decl_namespace,
5430         pop_decl_namespace, push_scope, pop_scope, add_function,
5431         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
5432         lookup_arg_dependent, do_namespace_alias,
5433         validate_nonmember_using_decl, do_nonmember_using_decl,
5434         do_toplevel_using_decl, do_local_using_decl,
5435         do_class_using_decl, do_using_directive, check_default_args,
5436         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
5437         * parser.c (cp_parser_class_head): Use booleanss.
5438         * decl.c (walk_globals, walk_vtables): Likewise.
5439         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
5440         walk_globals): Change return type from 'int' to 'bool'.
5441         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
5442         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
5443         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
5444         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
5445         qualifier_flags, tinfo_base_init, generic_initializer,
5446         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
5447         dfs_class_hint_unmark, class_hint_flags, class_initializer,
5448         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
5449         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
5450         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
5451         * repo.c (repo_compile_flags, repo_template_declared,
5452         repo_template_defined, repo_class_defined, repo_get_id,
5453         repo_template_used, repo_vtable_used, repo_inline_used,
5454         repo_tinfo_used, repo_template_instantiated, extract_string,
5455         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
5456         finish_repo): Likewise.
5457         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
5458         cxx_print_xnode): Likewise..
5459         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
5460         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
5461         * cxxfilt.c (demangle_it, print_demangler_list, usage,
5462         standard_symbol_characters, hp_symbol_characters, main, fatal):
5463         Likewise.
5464         (strip_underscore):  Change type from 'int' to 'bool'.
5465         (main): Use boolean constants.
5467 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5469         Remove traditional C constructs 3/n.
5470         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
5471         build_up_reference, warn_ref_binding, convert_to_reference,
5472         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
5473         convert_to_void, convert, convert_force, build_type_conversion,
5474         build_expr_type_conversion, type_promotes_to,
5475         perform_qualification_conversions): Use C90 prototyping style.
5476         * decl2.c (grok_array_decl): Use boolean constant.
5477         (delete_sanity): Likewise.
5478         * typeck.c (build_unary_op): Likewise.
5479         * semantics.c (finish_switch_cond): Likewise.
5480         * parser.c (cp_parser_direct_new_declarator): Likewise.
5481         * init.c (build_new): Likewise.
5483 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
5485         * Make-lang.in (po-generated): Remove parse.c.
5486         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
5487         ($(srcdir)/cp/parse.h): Remove target.
5488         ($(srcdir)/cp/parse.c): Likewise.
5489         (gt-cp-parse.h): Likewise.
5490         (gt-cp-parser.h): New target.
5491         (c++.distclean): Do not remove parse.output.
5492         (c++.maintainer-clean): Do not remove parse.c or parse.h.
5493         (cp/spew.o): Remove target.
5494         (cp/lex.o): Adjust dependencies.
5495         (cp/pt.o): Likewise.
5496         (cp/parse.o): Likewise.
5497         (cp/TAGS): Do not mention parse.c.
5498         (cp/parser.o): New target.
5499         * NEWS: Mention the new parser.
5500         * call.c (build_scoped_method_call): Simplify.
5501         (build_method_call): Likewise.
5502         (build_new_function_call): Adjust calls to add_function_candidate
5503         and add_template_candidate.
5504         (build_new_op): Improve handling of erroroneous operands.
5505         (convert_default_arg): Remove circular argument processing.
5506         (name_as_c_string): New function.
5507         (build_new_method_call): Use it.
5508         (perform_implicit_conversion): Use error_operand_p.
5509         * class.c (finish_struct_anon): Use constructor_name_p.
5510         (check_field_decls): Likewise.
5511         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
5512         (resolve_address_of_overloaded_function): Likewise.
5513         (instantiate_type): Tweak pointer-to-member handling.
5514         (get_primary_binfo): Remove incorrect assertion.
5515         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
5516         * cp-tree.h (DEFARG_TOKENS): New macro.
5517         (default_arg): New structure.
5518         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
5519         (lang_tree_node): Add default_arg.
5520         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
5521         (type_info_ref_type): New macro.
5522         (saved_scope): Make processing_explicit_instantiation a boolean.
5523         (check_access): New field.
5524         (unparsed_text): Remove.
5525         (language_function): Remove unparsed_inlines.
5526         (error_operand_p): New macro.
5527         (lang_decl): Adjust pending_inline_info.
5528         (DEFARG_POINTER): Remove.
5529         (tag_types): Add typenames.
5530         (lookup_ualified_name): Declare.
5531         (lookup_name_real): Likewise.
5532         (shadow_tag): Adjust prototype.
5533         (get_scope_of_declarator): Declare it.
5534         (process_next_inline): Remove it.
5535         (check_for_missing_semicolon): Likewise.
5536         (maybe_get_template_decl_from_type_decl): Declare it.
5537         (finish_label_stmt): Adjust prototype.
5538         (finish_non_static_data_meber): Declare it.
5539         (finish_pseudo_destructor_call_expr): Rename to ...
5540         (finish_pseudo_destructor_expr): ... this.
5541         (finish_compound_literal): Declare it.
5542         (begin_inline_definitions): Remove it.
5543         (init_spew): Remove.
5544         (peekyylex): Likewise.
5545         (arbitrate_lookup): Likewise.
5546         (frob_opname): Likewise.
5547         (maybe_snarf_defarg): Likewise.
5548         (add_defarg_fn): Likewise.
5549         (do_pending_defargs): Likewise.
5550         (done_pending_defargs): Likewise.
5551         (unprocessed_defarg_fn): Likewise.
5552         (replace_defarg): Likewise.
5553         (end_input): Likewise.
5554         (get_overloaded_fn): Likewise.
5555         * cvt.c (convert_to_reference): Improve error handling.
5556         * decl.c (lookup_name_real): Do not declare it static.
5557         (maybe_push_to_top_level): Set check_access.
5558         (identifier_type_value): Adjust call to lookup_name_real.
5559         (lookup_qualified_name): New method.
5560         (lookup_name_real): Remove special-case parsing code.
5561         (lookup_name-nonclass): Adjust call to lookup_name_real.
5562         (lookup_name_namespace_only): Likewise.
5563         (lookup_name): Likewise.
5564         (check_tag_decl): Return the type declared.
5565         (shadow_tag): Likewise.
5566         (register_dtor_fn): Tweak check_access.
5567         (grokfndecl): Use constructor_name_p.
5568         (get_scope_of_declarator): New function.
5569         (grokdeclarator): Obscure tweaks for slightly different declarator
5570         representations.
5571         (start_method): Return error_mark_node to indicate failure.
5572         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
5573         * decl2.c (constructor_name_full): Simplify.
5574         (constructor_name): Use it.
5575         (build_expr_from_tree): Adjust for changes to do new parser.
5576         (push_scope): Improve robustness.
5577         (validate_nonmember_using_decl): Process declarations, not names.
5578         (do_class_using_decl): Likewise.
5579         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
5580         here.
5581         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
5582         * expr.c (cxx_expand_expr): Handle BASELINKs.
5583         * init.c (member_init_ok_or_else): Issue more errors.
5584         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
5585         * lex.c: Do not include parse.h.
5586         (yypring): Do not declare.
5587         (yylval): Likewise.
5588         (make_reference_declarator): Remove error-generating code.
5589         (rid_to_yy): Remove.
5590         (cxx_init): Do not call init_spew.
5591         (yypring): Remove.
5592         (check_for_missing_semicolon): Remove.
5593         * lex.h (got_scope): Remove.
5594         (got_object): Remove.
5595         * method.c (hack_identifier): Use finish_non_static_data_member.
5596         (implicitly_declare_fn): Adjust use of constructor_name.
5597         * parser.c: New file.
5598         * pt.c (parse.h): Do not include it.
5599         (maybe_get_template_decl_from_template): Do not declare it.
5600         (finish_member_template_decl): Tweak.
5601         (begin_explicit_instantiation): Adjust for
5602         processing_explicit_instantiation being boolean.
5603         (end_explicit_instantiation): Likewise.
5604         (maybe_process_partial_specialization): Tighten specialization
5605         test.
5606         (retrieve_local_specialization): Adjust ue of hash table.
5607         (eq_local_specializations): New function.
5608         (register_local_specialization): Likewise.
5609         (push_template_decl_real): Remove unnecessary test.
5610         (maybe_get_template_decl_from_type_decl): Don't make it static.
5611         (for_each_template_parm_r): Handle TYPEOF_TYPE.
5612         (tsubst_copy): Use retrieive_local_specialization to handle
5613         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
5614         Handle COMPONENT_REFs with pseudo-destructor-expressions.
5615         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
5616         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
5617         (unify): Tweak handling of CONST_DECLs.
5618         (regenerate_decl_from_template): Use push_nested_class.
5619         (template_for_substitution): New funciton.
5620         (instantiate_decl): Use it.  Register parameters as local
5621         specializations.
5622         * rtti.c (init_rtti_processing): Set type_info_ref_type.
5623         (build_typeid): Use it.
5624         (get_typeid): Likeise.
5625         * search.c (accessible_p): Use check_access, not
5626         flag_access_control.
5627         (adjust_result_of_qualified_name_lookup): Pay attention to the
5628         context_class.
5629         * semantics.c (finish_asm_stmt): Adjust error handling.
5630         (finish_label_stmt): Return the statement.
5631         (finish_non_static_data_member): New function.
5632         (finish_class_expr): Handle BASELINKs.
5633         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
5634         (finish_object_call_expr): Simplify handling during templates.
5635         (finish_pseudo_destructor_call_expr): Rename to ...
5636         (finish_pseudo_dtor_expr): ... this.
5637         (finish_compound_literal): New function.
5638         (begin_inline_definitions): Remove.
5639         (finish_sizeof): Remove special template handling.
5640         * spew.c: Do not include parse.h.
5641         * tree.c (get_overloaded_fn): Remove.
5642         * typeck.c (build_class_member_access_expr): Handle
5643         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
5644         (lookup_destructor): New function.
5645         (finish_class_member_access_expr): Use it.
5646         (convert_arguments): Simplify.
5647         (build_unary_op): Handle BASELINKs.
5649 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
5651         PR c++/4803
5652         * decl2.c (mark_used): Defer inline functions.
5653         (finish_file): Merge deferred_fns loops. Check all used
5654         inline functions have a definition.
5655         * method.c (make_thunk): Thunks are not inline.
5657         PR c++/5116, c++/764
5658         * call.c (build_new_op): Make sure template class operands are
5659         instantiated.
5661 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
5663         PR C++/7964
5664         * cp-tree.h (resolve_scoped_fn_name): Prototype.
5665         * call.c (resolve_scoped_fn_name): New function. Deal with
5666         more template expansion. Broken out of ...
5667         * parse.y (parse_finish_call_expr): ... here. Call it.
5668         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
5669         resolve_scoped_fn_name and build_call_from_tree.
5671         PR c++/9053
5672         * decl.c (duplicate_decls): Templates may be disambiguated by
5673         return type.
5675         PR c++/8702
5676         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
5677         conversion operators on failure.
5679 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5681         Remove traditional C constructs 2/n.
5682         * call.c (tourney, build_field_call, equal_functions, joust,
5683         compare_ics, build_over_call, build_java_interface_fn_ref,
5684         convert_like_real, op_error, build_object_call, resolve_args,
5685         build_vfield_ref, check_dtor_name, build_scoped_method_call,
5686         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
5687         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
5688         standard_conversion, reference_related_p,
5689         reference_compatible_p, convert_class_to_reference,
5690         direct_reference_binding, reference_binding,
5691         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
5692         add_template_conv_candidate, any_viable, any_strictly_viable,
5693         build_this, splice_viable, print_z_candidates,
5694         build_user_type_conversion, build_new_function_call,
5695         conditional_conversion, build_conditional_expr, build_new_op,
5696         build_op_delete_call, enforce_access, call_builtin_trap,
5697         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
5698         convert_default_arg, type_passed_as, convert_for_arg_passing,
5699         in_charge_arg_for_name, is_properly_derived_from,
5700         maybe_handle_implicit_object, maybe_handle_ref_bind,
5701         source_type, add_warning, can_convert, can_convert_arg,
5702         perform_implicit_conversion, can_convert_arg_bad,
5703         initialize_reference, add_conv_candidate,
5704         add_template_candidate_real, add_template_candidate): Ansify.
5706 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
5708         PR c++/8572
5709         * cp-tree.h (grokoptypename): Add SCOPE parameter.
5710         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
5711         if in a template scope.
5712         * parse.y (unoperator): Return the scope.
5713         (operator_name): Adjust grokoptypename call.
5715 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5717         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
5718         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
5719         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
5721 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
5723         * ChangeLog: Fix a typo.
5724         * class.c: Fix comment typos.
5725         * cp-tree.h: Likewise.
5727 2002-12-18  Jason Merrill  <jason@redhat.com>
5729         Handle anonymous unions at the tree level.
5730         C++ ABI change: Mangle anonymous unions using the name of their
5731         first named field (by depth-first search).  Should not cause
5732         binary compatibility problems, though, as the compiler previously
5733         didn't emit anything for affected unions.
5734         * cp-tree.def (ALIAS_DECL): New tree code.
5735         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
5736         first field, not the largest.
5737         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
5738         push the decl, and write it out at namespace scope.
5739         * decl.c (lookup_name_real): See through an ALIAS_DECL.
5740         (pushdecl): Add namespace bindings for ALIAS_DECLs.
5741         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
5742         of a decl which doesn't have one.
5743         * typeck.c (build_class_member_access_expr): Don't recurse if
5744         we already have the type we want.
5746 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5748         PR c++/8099
5749         * friend.c (make_friend_class): Allow partial specialization
5750         when declaration is not a template friend.
5752 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5754         PR c++/3663
5755         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
5756         TREE_PROTECTED to created decl nodes.
5758 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
5760         * class.c (build_base_field): Do not set DECL_PACKED on the
5761         FIELD_DECL.
5763 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5765         * cp-tree.h (struct tree_srcloc): Use location_t.
5766         (SOURCE_LOCUS): New.
5767         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
5769 2002-12-17  Jason Merrill  <jason@redhat.com>
5771         * decl.c (finish_function): Also complain about no return in
5772         templates.
5773         * semantics.c (finish_return_stmt): Also call check_return_expr in
5774         templates.
5775         * typeck.c (check_return_expr): In a template, just remember that we
5776         saw a return.
5778 2002-12-16  Jason Merrill  <jason@redhat.com>
5780         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
5781         of the CALL_EXPR.
5783         * semantics.c (do_pushlevel): Call pushlevel after adding the
5784         SCOPE_STMT.
5785         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
5786         * parse.y (function_body): Go back to using compstmt.
5787         * decl.c (pushdecl): Skip another level to get to the parms level.
5789         * call.c (build_new_method_call): Use is_dummy_object to determine
5790         whether or not to evaluate the object parameter to a static member
5791         function.
5793 2002-12-14  Jason Merrill  <jason@redhat.com>
5795         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
5796         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
5797         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
5798         don't bother with an AGGR_INIT_EXPR.
5799         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
5800         just generate a new decl normally.  Take return slot parm.
5801         * cp-tree.h: Adjust prototype.
5803 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5805         PR C++/8031
5806         * cvt.c (convert_to_pointer_force): Don't try comparing against
5807         erronous type.
5809 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
5811         * cp-tree.h: Have the multiple-include guards around
5812         the entire file.
5814 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
5816         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
5817         for SPEW_DEBUG.
5818         (snarf_method): Same.
5819         (snarf_defarg): Same.
5821 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
5823         PR c++/8372
5824         * pt.c (tsubst_copy): Handle destructor names more correctly.
5826 2002-12-10  Matt Austern   <austern@apple.com>
5828         * cp-tree.h: get rid of needs_virtual_reinit bit.
5830 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
5832         * NEWS: Document removal of in-class initialization extension for
5833         static data members of non-arithmetic, non-enumeration type.
5834         * decl.c (check_static_variable_definition): Do not allow that
5835         extension.
5836         * decl2.c (grokfield): Do not call digest_init when processing
5837         templates.
5839 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5841         * error.c (dump_expr): Fix format specifier warning.
5843 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
5845         * class.c (finish_struct_1): Correct comment.
5846         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
5848 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5850         PR C++/8799
5851         * error.c (dump_expr): Don't ever try to dump a non-existent
5852         expression.
5854 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
5856         Implement covariant returns.
5857         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
5858         (struct lang_decl_flags): Add this_thunk_p flag.
5859         Rename vcall_offset to virtual_offset.
5860         (struct lang_decl): Rename delta to fixed_offset.
5861         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
5862         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
5863         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
5864         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
5865         (make_thunk): Add this_adjusting arg.
5866         (finish_thunk): Declare.
5867         (mangle_thunk): Add this_adjusting arg.
5868         * class.c (get_vcall_index): Use base function for lookup.
5869         (update_vtable_entry_for_fn): Generate covariant thunk.
5870         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
5871         (build_vtbl_initializer): Use base function for lookup.
5872         Finish covariant thunk here. Adjust thunk generation.
5873         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
5874         Adjust thunk dumping.
5875         * mangle.c (mangle_call_offset): New function.
5876         (mangle_thunk): Adjust for covariant thunks.
5877         * method.c (make_thunk): Adjust. Do not set name here.
5878         (finish_thunk): New function. Set name here.
5879         (use_thunk): Generate covariant thunks too.
5880         (thunk_adjust): New function.
5881         * search.c (covariant_return_p): Remove. Fold into ...
5882         (check_final_overrider): ... here. Simplify.
5883         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
5885 2002-12-03  Jason Merrill  <jason@redhat.com>
5887         PR c++/8674
5888         * call.c (build_over_call): Check specifically for TARGET_EXPR
5889         when eliding.
5891         PR c++/8461, c++/8625
5892         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
5893         (cp_convert_parm_for_inlining): Remove.
5894         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
5895         Remove.
5896         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
5897         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
5899         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
5900         an ambiguous conversion.
5902 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
5904         PR c++/8688
5905         * decl.c (reshape_init): Handle erroneous initializers.
5907 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
5909         PR c++/8720
5910         * spew.c (remove_last_token): Make sure that last_chunk is set
5911         correctly.
5913         PR c++/8615
5914         * error.c (dump_expr): Handle character constants with
5915         TREE_OVERFLOW set.
5917 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5919         DR 180
5920         * decl.c (grokdeclarator): Require class-key for all friend class.
5921         Output the correct type and context in the error message.
5923 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
5925         PR c++/5919
5926         * pt.c (unify): Use variably_modified_type_p to test validity of
5927         template argument types.
5929         PR c++/8727
5930         * cp-tree.h (lang_type_class): Add typeinfo_var.
5931         (CLASSTYPE_TYPEINFO_VAR): New macro.
5932         * rtti.c (get_tinfo_decl): Use it.
5934         PR c++/8663
5935         * init.c (expand_member_init): Always get the main variant of a
5936         base class.
5938 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
5940         PR c++/8332
5941         PR c++/8493
5942         * decl.c (cxx_init_decl_processing): Use size_type_node, not
5943         c_size_type_node.
5944         * decl2.c (coerce_new_type): Likewise.
5945         * except.c (do_allocate_exception): Likewise.
5947 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
5949         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
5950         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
5951         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
5952         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5953         typeck2.c: Include coretypes.h and tm.h.
5954         * Make-lang.in: Update dependencies.
5956 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
5958         PR c++/8227
5959         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
5960         (check_initializer): Validate the type of the initialized
5961         variable, even if the initializer is absent.
5962         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
5964         PR c++/8214
5965         * typeck.c (convert_for_assignment): Do not use
5966         decl_constant_value on the operand.
5968         PR c++/8511
5969         * pt.c (instantiate_decl): Handle template friends defined outside
5970         of the class correctly.
5972 2002-11-29  Joe Buck <jbuck@synopsys.com>
5974         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
5975         anonymous structs.
5977 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
5979         * class.c (walk_subobject_offsets): Recur on binfos as well as on
5980         types.
5981         (layout_nonempty_base_or_field): Pass it a binfo when processing a
5982         base class.
5983         (layout_empty_base): Likewise.
5984         (build_base_field): Likewise.
5986 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
5988         * class.c (build_base_field): Make sure we get the canonical base
5989         when descending through primary bases.
5991 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
5993         * decl.c (check_initializer): Don't error on initialisation of
5994         a scalar with a brace-enclosed expression.
5996 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
5998         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
5999         (template_parms_equal): Remove prototype.
6000         * typeck.c (buuld_indirect_ref): Reformat.
6002 2002-11-25  Jason Merrill  <jason@redhat.com>
6004         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
6005         and a DO_STMT.
6007 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
6009         * tree.c (cp_build_qualified_type_real): Correct handling of
6010         array types.
6011         * class.c (walk_subobject_offsets): Fix thinko.
6012         (build_base_field): Record offsets of empty bases in primary
6013         virtual bases.
6014         (layout_class_type): Record offsets of empty bases in fields.
6016         * search.c (is_subobject_of_p_1): Fix thinko.
6017         (lookup_field_queue_p): Likewise.
6019 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
6021         * class.c (layout_class_type): Reuse tail padding when laying out
6022         virtual bases.
6024 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
6026         * rtti.c (qualifier_flags): Fix thinko.
6028 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6030         Remove traditional C constructs 1/n.
6031         * cp-tree.h (init_method, set_mangled_name_for_decl,
6032         build_opfncall, hack_identifier, make_thunk, use_thunk,
6033         synthesize_method, implicitly_declare_fn,
6034         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
6035         maybe_clone_body): Remove use of PARAMS.
6037         * method.c (do_build_assign_ref, do_build_copy_constructor,
6038         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
6039         Likewise.
6040         (synthesize_method): Use 'bool' type and constants instead of
6041         'int'.
6042         (locate_copy): Likewise.
6043         (implicitly_declare_fn): Likewise.
6045         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
6046         Remove old-style declaration.
6047         (maybe_clone_body): Use 'bool' type and constants.
6049 2002-11-21  Glen Nakamura  <glen@imodulo.com>
6051         PR c++/8342
6052         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
6053         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
6054         of the branches of a COND_EXPR.
6056 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
6058         * pt.c (for_each_template_parm): Free allocated memory.
6059         * search.c (is_subobject_of_p_1): New function.
6060         (is_subobject_of_p): Avoid walking virtual bases multiple times.
6062 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
6064         * g++spec.c (lang_specific_spec_functions): New.
6066 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
6068         * ChangeLog: Follow spelling conventions.
6069         * class.c: Likewise.
6070         * decl2.c: Likewise.
6072 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
6074         * search.c (dfs_push_decls): Do not try to reorder elements
6075         3..n of method_vec if method_vec has only two elements.
6076         Reverse order of two tests to avoid accessing unallocated
6077         memory.
6079 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
6081         * class.c (dfs_find_final_overrider): Adjust so that the most
6082         derived object is a binfo, rather than a class type.
6083         (find_final_overrider): Likewise.
6084         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
6085         (add_vcall_offset): Likewise.
6087 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6089         PR c++/8389
6090         * pt.c (instantiate_template): Push class scope for member
6091         functions.
6092         (get_mostly_instantiated_function_type): Likewise.  Don't call
6093         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
6094         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
6095         * mangle.c (write_encoding, write_unqualified_name): Adjust.
6097 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6099         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
6100         vcall offfsets.  Split out ...
6101         (add_vcall_offset): ... new function.
6103         PR c++/8338
6104         * pt.c (for_each_template_parm): Add htab parameter.
6105         (process_partial_specialization): Adjust call.
6106         (push_template_decl_real): Likewise.
6107         (pair_fn_data): Add visited.
6108         (for_each_template_parm_r): Avoid walking duplicates more than
6109         once.
6110         (uses_template_parms): Adjust call to for_each_template_parm.
6112 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
6114         * class.c (add_implicitly_declared_members): Put implicitly
6115         declared functions at the end of TYPE_METHODs when -fabi-version
6116         is at least 2.
6118 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
6120         * decl2.c (finish_file): Correct spelling.
6122 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
6124         * call.c (build_special_member_call): Do not try to lookup VTTs by
6125         name.
6126         * class.c (vtbl_init_data): Add generate_vcall_entries.
6127         (get_vtable_decl): Do not look up virtual tables by name.
6128         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
6129         (set_primary_base): Do not set CLASSTYPE_RTTI.
6130         (determine_primary_base): Likewise.
6131         (get_matching_virtual): Remove.
6132         (get_vcall_index): New function.
6133         (update_vtable_entry_for_fn): Do not try to use virtual thunks
6134         when they are not required.  Assign vcall indices at this point.
6135         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
6136         Do update dynamic_classes.
6137         (build_vtt): Do not add VTTs to the symbol table.
6138         (build_ctor_vtbl_group): Likewise.
6139         (build_vtbl_initializer): Simplify handling of vcall indices.
6140         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
6141         for the most derived class.
6142         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
6143         the vtable.
6144         * cp-tree.h (dynamic_classes): New macro.
6145         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
6146         (CLASSTYPE_RTTI): Remove.
6147         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
6148         (CLASSTYPE_VCALL_INDICES): New macro.
6149         (CLASSTYPE_VTABLES): Likewise.
6150         (BV_USE_VCALL_INDEX_P): Remove.
6151         (build_vtable_path): Remove.
6152         * decl2.c (finish_vtable_vardecl): Remove.
6153         (key_method): Remove #if 0'd code.
6154         (finish_vtable_vardecl): Rename to ...
6155         (maybe_emit_vtables): ... this.
6156         (finish_file): Use it.
6157         * search.c (look_for_overrides_here): Update comment.
6159 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
6161         PR c/7353 redux
6162         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
6164 2002-10-30  Jason Merrill  <jason@redhat.com>
6166         PR c++/8186
6167         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
6168         * call.c (convert_for_arg_passing): Set it.
6169         * except.c (stabilize_throw_expr): Recurse for such an arg.
6171 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
6173         * cp-tree.h (lang_decl_flags): Remove init_priority.
6174         (lang_decl): Add delta.
6175         (GLOBAL_INIT_PRIORITY): Remove.
6176         (THUNK_DELTA): Revise definition.
6177         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
6178         * dump.c (cp_dump_tree): Don't dump it.
6180 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
6182         PR c++/8160
6183         * typeck2.c (process_init_constructor): Call complete_array_type.
6185         PR c++/8149
6186         * decl.c (make_typename_type): Issue errors about invalid results.
6188 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6190         Core issue 287, PR c++/7639
6191         * cp-tree.h (lang_type_class): Add decl_list field.
6192         (CLASSTYPE_DECL_LIST): New macro.
6193         (maybe_add_class_template_decl_list): Add declaration.
6194         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
6195         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
6196         (maybe_add_class_template_decl_list): New function.
6197         (add_implicitly_declared_members): Use it.
6198         * decl.c (maybe_process_template_type_declaration): Likewise.
6199         (pushtag): Likewise.
6200         * friend.c (add_friend): Likewise.
6201         (make_friend_class): Likewise.
6202         * semantics.c (finish_member_declaration): Likewise.
6203         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
6204         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
6205         to process members and friends in the order of declaration.
6207 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
6209         PR c++/8287
6210         * decl.c (finish_destructor_body): Create the label to jump to
6211         when returning from a destructor here.
6212         (finish_function_body): Rather than here.
6214 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
6216         PR c++/7266
6217         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
6218         SCOPE_REF is not null before dereferencing it.
6220 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
6222         * call.c (build_over_call): Use DECL_CONTEXT, not
6223         DECL_VIRTUAL_CONTEXT.
6224         * class.c (modify_vtable_entry): Don't mess with
6225         DECL_VIRTUAL_CONTEXT.
6226         (set_vindex): Remove.
6227         (set_primary_base): Remove vfuns_p parameter.
6228         (determine_primary_base): Likewise.
6229         (modify_all_vtables): Likewise.
6230         (layout_class_type): Likewise.  Adjust calls to other functions
6231         accordingly.
6232         (finish_struct_1): Adjust calls to modified functions.  Set
6233         DECL_VINDEX here.
6234         * cp-tree.h (lang_type_class): Remove vsize.
6235         (CLASSTYPE_VSIZE): Remove.
6236         (lang_decl): Remove thunks.
6237         (DECL_THUNKS): Adjust.
6238         (DECL_VIRTUAL_CONTEXT): Remove.
6239         (duplicate_decls): Don't copy it.
6240         * pt.c (build_template_decl): Don't set it.
6241         (tsubst_decl): Likewise.
6242         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
6244         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
6245         (build_vtable_entry): Remove.
6246         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
6247         (lang_decl): Add thunks.
6248         (DECL_THUNKS): New macro.
6249         * decl.c (duplicate_decls): Copy it.
6250         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
6251         * semantics.c (emit_associated_thunks): Simplify.
6253 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
6255         PR c++/7228
6256         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
6257         lang_type structure exists before accessing field.
6258         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
6259         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
6260         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
6261         * class.c (check_field_decls): Use new macros.
6262         * typeck2.c (process_init_constructor): Remove redundant check for
6263         existence of lang_type structure.
6265 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
6267         * class.c (end_of_base): New method.
6268         (end_of_class): Use it.  Check indirect virtual bases.
6270         * class.c (check_field_decls): Fix typo.
6272 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
6274         PR c++/8067
6275         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
6276         related variables.
6278         PR c++/7679
6279         * spew.c (next_token): Do not return an endless stream of
6280         END_OF_SAVED_INPUT tokens.
6281         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
6282         the cached token stream.
6283         (snarf_defarg): Likewise.
6285 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
6287         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
6288         variably_modified_type_p.
6289         * cp-tree.h: Remove prototype of variably_modified_type_p.
6290         * tree.c (variably_modified_type_p): Remove; now implemented
6291         in language-independent code.
6293 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
6295         PR c++/6579
6296         * spew.c (snarf_parenthesized_expression): New function.
6297         (snarf_block): Use it.
6299 2002-10-22  Richard Henderson  <rth@redhat.com>
6301         * method.c (use_thunk): Always compute vcall_value; assert that
6302         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
6303         for vcall thunks as well.
6305 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
6307         * class.c (empty_base_at_nonzero_offset_p): New function.
6308         (layout_nonempty_base_or_field): Do not check for conflicts when
6309         laying out a virtual base using the GCC 3.2 ABI.
6310         (build_base_field): Correct checking for presence of empty classes
6311         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
6313         * class.c (include_empty_classes): Use normalize_rli.
6314         (layout_class_type): Likewise.
6316         * decl.c (reshape_init): Tweak handling of character arrays.
6318         PR c++/8218
6319         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
6320         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
6321         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
6322         (check_field_decls): Likewise.
6323         (layout_class_type): Likewise.
6324         (finish_struct_1): Initialize it.
6325         (walk_subobject_offsets): Use it to prune searches.
6327 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
6329         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
6330         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
6331         TARGET_ASM_OUTPUT_MI_THUNK in comments.
6333 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
6335         * decl.c (start_decl): Point users of the old initialized-
6336         typedef extension at __typeof__.
6338 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6340         * Make-lang.in (method.o): Depend on TARGET_H.
6341         * method.c (target.h): Include it.
6342         (use_thunk): Use target hooks.  Use vcall thunks, if available.
6344 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6346         * class.c (base_derived_from): Make sure return value is a bool.
6348 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
6350         * class.c (find_final_overrider_data_s): Remove overriding_fn and
6351         overriding_base.
6352         (dfs_base_derived_from): New function.
6353         (base_derived_from): Likewise.
6354         (dfs_find_final_overrider): Use base_derived_from.
6355         (find_final_overrider): Adjust.
6357 2002-10-18  Jason Merrill  <jason@redhat.com>
6359         PR c++/8080
6360         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
6361         with condition decls in a template.
6363 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
6365         * class.c (add_method): Compare template parms too.
6367 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
6369         PR c++/7584
6370         * class.c (handle_using_decl): Allow the declaration used to be
6371         from an ambiguous base.
6373         * pt.c (convert_template_argument): Revert this change:
6374                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6375                 * pt.c (convert_template_argument): Do not fold non-type
6376                 template rguments when inside a template.
6378         * init.c (expand_default_init): Handle brace-enclosed initializers
6379         correctly.
6381 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6383         * mangle.c (write_expression): Correct handling of enumeration
6384         constants.
6385         (write_template_arg): Likewise.
6386         * pt.c (convert_template_argument): Do not fold non-type template
6387         arguments when inside a template.
6389         PR c++/7478
6390         * cvt.c (convert_to_reference): Allow references as the incoming
6391         type.
6393 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
6395         PR c++/7524
6396         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
6397         build_qualified_type.
6399 2002-10-15  Richard Henderson  <rth@redhat.com>
6401         * error.c (dump_expr): Use real_to_decimal directly, and with
6402         the new arguments.
6404 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
6406         * decl.c (reshape_init): Fix typo.
6408         * cp-tree.h (operator_name_info_t): Add arity.
6409         * lex.c (init_operators): Initialize it.
6410         * mangle.c (write_conversion_operator_name): New function.
6411         (write_unqualified_name): Use it.
6412         (write_template_args): Accept template arguments as a TREE_LIST.
6413         (write_expression): Adjust handling of qualified names to match
6414         specification.
6416 2002-10-15  Jason Merrill  <jason@redhat.com>
6418         * call.c (call_builtin_trap): New fn.
6419         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
6420         (build_call): Don't set current_function_returns_abnormally outside
6421         a function.
6423 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
6425         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
6426         clear CLASSTYPE_EMPTY_P.
6427         (build_base_field): Likewise.
6428         (build_base_fields): Likewise.
6429         (check_bases_and_members): Likewise.
6430         (create_vtbl_ptr): Likewise.
6431         (layout_class_type): Likewise.  Ensure that empty classes have
6432         size zero when used as base classes in the 3.2 ABI.
6433         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
6434         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
6435         parameter.
6436         (is_empty_class): Correct definition when using post-3.2 ABI.
6437         * cp-tree.h (lang_type_class): Add empty_p.
6438         (CLASSTYPE_EMPTY_P): New macro.
6440 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
6442         * init.c (build_delete): Do not apply save_expr for arrays.
6443         (build_vec_delete): Likewise.
6445 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
6447         * decl.c (layout_var_decl): Call layout_decl even for variables
6448         whose type is an array with unspecified bounds.
6450         PR c++/7176
6451         * lex.c (do_identifier): Add another option for the parsing
6452         parameter.
6453         * parse.y (do_id): Use it.
6455 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6457         PRs C++/6803, C++/7721 and C++/7803
6458         * decl.c (grokdeclarator): Gracefully handle template-name as
6459         decl-specifier.
6461 2002-10-11  Jason Molenda  <jmolenda@apple.com>
6463         * init.c (build_field_list): Provide uses_unions_p with a default
6464         value.
6466 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
6468         PR c++/5661
6469         * cp-tree.h (variably_modified_type_p): New function.
6470         (grokdeclarator) Tighten check for variably modified types as
6471         fields.
6472         * pt.c (convert_template_argument): Do not allow variably modified
6473         types as template arguments.
6474         * tree.c (variably_modified_type_p): New function.
6476         * NEWS: Document removal of "new X = ..." extension.
6477         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
6478         brace-enclosed initializers.
6479         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
6480         (initialize_local_var): Remove declaration.
6481         (expand_static_init): Likewise.
6482         * decl.c (next_initializable_field): New function.
6483         (reshape_init): Likewise.
6484         (check_initializer): Use them.  Build dynamic initializer for
6485         aggregates here too.
6486         (initialize_local_var): Simplify, and incorporate cleanup
6487         insertion code as well.
6488         (destroy_local_var): Remove.
6489         (cp_finish_decl): Tidy.
6490         (expand_static_init): Fold checks for whether or not a variable
6491         needs initialization into this function.  Simplify.
6492         * decl2.c (do_static_initialization): Simplify.
6493         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
6494         be done for us automatically.
6495         (expand_default_init): Handle brace-enclosed initializers
6496         correctly.
6497         (expand_aggr_init_1): Remove RTL-generation code.
6498         (build_vec_init): Remove "new X = ..." support.
6499         * parse.y (new_initializer): Likewise.
6500         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
6501         brace-enclosed initializer.
6502         (create_pseudo_type_info): Likewise.
6503         * typeck2.c (store_init_value): Don't try to handle digest_init
6504         being called more than once.
6505         (digest_init): Tidy handling of brace-enclosed initializers.
6507 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6509         * decl.c (typename_hash): Use htab_hash_pointer.
6511 2002-10-10  Jim Wilson  <wilson@redhat.com>
6513         * decl.c (duplicate_decls): Don't call decl_attributes.
6515 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
6517         PR c/7353
6518         * decl.c (start_decl): Unconditionally issue error for
6519         'typedef foo = bar'.
6520         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
6521         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
6523 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6525         * decl2.c (prune_vtable_vardecl): Delete unused function.
6527 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6529         PR c++/7754
6530         * decl2.c (finish_anon_union): Do not expand anonymous unions when
6531         procesing template functions.
6532         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6533         type. Call layout_decl.
6534         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6536 2002-10-07  Richard Henderson  <rth@redhat.com>
6538         * decl2.c, pt.c: Revert c++/7754 fix.
6540 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6542         PR c++/7804
6543         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
6545 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6547         PR c++/7931
6548         * pt.c (for_each_template_parm_r): Handle BASELINKs.
6550         PR c++/7754
6551         * decl2.c (finish_anon_union): Do not expand anonymous unions when
6552         procesing template functions.
6553         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
6554         type. Call layout_decl.
6555         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
6557 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
6559         PR c++/8006
6560         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
6561         template parameters.
6562         (globals): Add entity and need_abi_warning.
6563         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
6564         CLASSTYPE_TEMPLATE_INFO.
6565         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
6566         TYPE_TI_TEMPLATE.
6567         (write_prefix): Handle typename types correctly.
6568         (write_template_prefix): Handle template template parameters
6569         correctly.
6570         (start_mangling): Add entity parameter.
6571         (finish_mangling): Warn about names whose mangling will change.
6572         (mangle_decl_string): Adjust.
6573         (mangle_type_string): Likewise.
6574         (mangle_special_for_type): Likewise.
6575         (mangle_ctor_vtbl_for_type): Likewise.
6576         (mangle_thunk): Likewise.
6577         (mangle_guard_variable): Likewise.
6578         (mangle_ref_init_variable): Likewise.
6580 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
6582         PR c++/7188.
6583         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
6584         * cp-tree.h (emit_base_init): Rename to ....
6585         (emit_mem_initializers): ... this.
6586         (expand_member_init): Change prototype.
6587         * init.c (perform_member_init): Compute explicit, rather than
6588         requiring it as a parameter.
6589         (sort_member_init): Rename to ...
6590         (sort_mem_initializers): ... this.  Process bases and data members
6591         together.
6592         (sort_base_init): Remove.
6593         (emit_base_init): Rename to ...
6594         (emit_mem_initializers): ... this.
6595         (expand_aggr_vbase_init_1): Remove.
6596         (construct_virtual_bases): Rename to ...
6597         (construct_virtual_base): ... this.
6598         (expand_member_init): Rework handling of base initializers.
6599         * method.c (do_build_copy_constructor): Use
6600         finish_mem_initializers.
6601         * parse.y (member_init): Adjust calls to expand_member_init.
6602         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
6603         (tsubst_initializer_list): Use expand_member_init.
6604         * semantics.c (finish_mem_intiailizers): Simplify.
6606 2002-10-02  Matt Austern  <austern@apple.com>
6607         * decl.c (walk_vtables_r): Fixed typo that caused result to
6608         never get a nonzero value.
6610 2002-10-02  Roger Sayle  <roger@eyesopen.com>
6612         PR optimization/6627
6613         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
6614         from here, and move it to tree.h.
6615         * decl.c (cxx_init_decl_processing): If storing the vbit
6616         in function pointers, ensure that force_align_functions_log
6617         is atleast one.
6619 2002-10-02  Matt Austern  <austern@apple.com>
6621         * class.c (check_field_decls): Changed warning about const member
6622         variables so that it doesn't get issued for a class aggregate.
6624 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
6626         * decl.c (cp_finish_decl): Make sure array types are laid out,
6627         even if the array bounds are unknown.
6629 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
6631         * class.c (build_vtbl_initializer): Change build_c_cast
6632         to build1.
6634 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
6636         * decl.c (cp_finish_decl): Make sure array types are laid out,
6637         even if the array bounds are unknown.
6639         * decl.c (cp_finish_decl): Correct check for dynamic
6640         initialization of thread-local storage.
6642 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
6644         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
6645         overloaded.
6647 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
6649         * class.c (build_vtbl_initializer): Add cast.
6650         (add_vcall_offset_vtbl_entries_1):
6651         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
6653 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
6655         * class.c (walk_subobject_offsets): Correct the calculation of
6656         offsets for virtual bases.  Correct the counting of array
6657         elements.
6658         (layout_nonempty_base_or_field): Simplify.  Correct the
6659         calculation of offsets to be propagated through the binfo
6660         hierarchy.
6661         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
6662         Add the FIELD_DECL to TYPE_FIELDS.
6663         (build_base_fields): Adjust accordingly.
6664         (layout_virtual_bases): Use build_base_field.
6665         (end_of_class): Return a tree, not an integer.
6666         (warn_about_ambiguous_direct_bases): Rename to ...
6667         (warn_about_ambiguous_bases): ... this.
6668         (include_empty_classes): New function.
6669         (layout_class_type): Create an alternative version of the type to
6670         be used when as a base class type.  Do not call
6671         finish_record_layout until we are done laying out the class.
6672         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
6673         as_base.
6674         (CLASSTYPE_SIZE): Reimplement.
6675         (CLASSTYPE_SIZE_UNIT): Likewise.
6676         (CLASSTYPE_ALIGN): Likweise.
6677         (CLASSTYPE_USER_ALIGN): Likewise.
6678         (CLASSTYPE_AS_BASE): New macro.
6679         (DECL_INITIALIZED_P): Likewise.
6680         (extract_init): Remove prototype.
6681         (build_forced_zero_init): Rename to ...
6682         (build_zero_init): ... this.
6683         (force_store_init_value): Remove.
6684         * decl.c (obscure_complex_init): Remove.
6685         (duplicate_decls): Copy DECL_INITIALIZED_P.
6686         (check_initializer): Do not leave junk in DECL_INITIAL.
6687         (cp_finish_decl): Handle zero-initialization of entities with
6688         static storage duration.
6689         * expr.c (extract_init): Remove.
6690         * init.c (build_forced_zero_init): Remove.
6691         (build_zero_init): New function.
6692         (build_default_init): Use it.
6693         (build_field_list): Skip FIELD_DECLs for base subobjects.
6694         (push_base_cleanups): Likewise.
6695         * method.c (do_build_assign_ref): Likewise.
6696         (synthesize_exception_spec): Likewise.
6697         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
6698         (regenerate_decl_from_template): To not set DECL_INITIAL for a
6699         static data member whose initialization took place in its class.
6700         (instantiate_decl): Do not pass an initializer to cp_finish_decl
6701         in that situation.
6702         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
6703         (dfs_unuse_fields): Likewise.
6704         * tree.c (pod_type_p): Handle error_mark_node.
6705         (zero_init_p): Likewise.
6706         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
6707         subobjects.
6708         * typeck2.c (store_init_value): Remove #if 0'd code.
6709         (force_store_init_value): Remove.
6710         (process_init_constructor): Use build_zero_init.
6712 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
6714         PR c++/7788
6715         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
6717 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
6719         * cp-tree.h: Fix comment typos.
6720         * decl.c: Likewise.
6721         * pt.c: Likewise.
6723 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
6725         * cp/class.c (contains_empty_class_p): New method.
6726         (walk_subobject_offsets): Correct computation of field offset.
6727         (layout_empty_base): Correct placement of emtpy base classes.
6728         (layout_class_type): Warn about ABI changes.
6730 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
6732         * cp/class.c (layout_virtual_bases): Do not round the size of the
6733         type to a multiple of the alignment before laying out virtual bases.
6734         (layout_class_type): Correct handling of bit-fields that are wider
6735         than their type inside unions.  Round the size of the type to a
6736         even number of bytes when computing the size without virtual
6737         bases.
6738         * cp/cp-tree.h (abi_version_at_least): New macro.
6740 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
6742         * ChangeLog: Follow spelling conventions.
6743         * ChangeLog.2: Likewise.
6744         * call.c: Likewise.
6745         * class.c: Likewise.
6746         * cp-tree.h: Likewise.
6747         * cvt.c: Likewise.
6748         * decl.c: Likewise.
6749         * decl2.c: Likewise.
6750         * except.c: Likewise.
6751         * friend.c: Likewise.
6752         * g++spec.c: Likewise.
6753         * init.c: Likewise.
6754         * lex.c: Likewise.
6755         * mangle.c: Likewise.
6756         * method.c: Likewise.
6757         * operators.def: Likewise.
6758         * optimize.c: Likewise.
6759         * pt.c: Likewise.
6760         * rtti.c: Likewise.
6761         * search.c: Likewise.
6762         * semantics.c: Likewise.
6763         * spew.c: Likewise.
6764         * tree.c: Likewise.
6765         * typeck.c: Likewise.
6767 2002-09-18  Devang Patel  <dpatel@apple.com>
6769         * cp/cp-tree.h: New prototype for walk_vtabls().
6770         * cp/decl.c (walk_vtables_r): New function.
6771         (struct cp_binding_level): Add new members, namespaces,
6772         names_size and vtables.
6773         (add_decl_to_level): Add decl in namespaces or vtables
6774         chain, if conditions match.
6775         (walk_vtables): New function.
6776         (walk_namespaces_r): Travers separate namespace chain
6777         for namespace decls.
6778         (wrapup_globals_for_namespace): Use names_size instead
6779         of list_length().
6780         * cp/decl2.c (finish_file): Use walk_vtables() instead of
6781         walk_globals() to walk vtable decls.
6783 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
6785         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
6786         ICE with invalid pointers & references.
6788 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
6790         * Make-lang.in: Remove all references to the demangler.
6791         * cxxfilt.c: Moved to binutils.
6793 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
6795         PR c++/7718
6796         * pt.c (tsubst_decl): Remove assert.
6798         Remove DR 295 implementation.
6799         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
6800         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
6801         about ignoring volatile qualifiers.
6803         * search.c (lookup_member): Correct documentation.
6805 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
6807         * cp-tree.h (union lang_tree_node): Add chain_next option.
6809 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
6811         * parse.y (parse_finish_call_expr): Check lookup_member result.
6813         PR c++/7015
6814         * semantic.c (finish_asm_stmt): Fix operand/output_operands
6815         thinko.
6816         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
6818 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
6820         PR c++/7919
6821         * call.c (build_over_call): Convert this pointer for fns found by
6822         using decls.
6824 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
6826         * ChangeLog: Follow spelling conventions.
6827         * ChangeLog.1: Likewise.
6829 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
6831         PR c++/7768
6832         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
6834 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
6836         * error.c: Fix comment formatting.
6837         * except.c: Likewise.
6838         * expr.c: Likewise.
6839         * friend.c: Likewise.
6840         * g++spec.c: Likewise.
6841         * init.c: Likewise.
6842         * lex.c: Likewise.
6843         * mangle.c: Likewise.
6844         * method.c: Likewise.
6845         * optimize.c: Likewise.
6846         * pt.c: Likewise.
6847         * rtti.c: Likewise.
6848         * search.c: Likewise.
6849         * semantics.c: Likewise.
6850         * spew.c: Likewise.
6851         * tree.c: Likewise.
6852         * typeck.c: Likewise.
6853         * typeck2.c: Likewise.
6855 2002-09-13  Matt Austern  <austern@apple.com>
6857         PR C++/7828
6858         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
6859         * cp/call.c: Change call-by-const-reference mechanism to use
6860         non_cast_lvalue_p when deciding whether the create a temporary.
6861         We need a temporary when passing, e.g. (long) x by const ref.
6863 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
6865         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
6867 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
6869         * decl.c: Fix comment formatting.
6870         * decl2.c: Likewise.
6872 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
6874         * call.c: Fix comment formatting.
6875         * class.c: Likewise.
6876         * cp-lang.c: Likewise.
6877         * cp-tree.h: Likewise.
6878         * cvt.c: Likewise.
6880 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
6882         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
6883         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
6884         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
6885         minor adjustments (use version_string, eliminate yet another
6886         duplicate of xmalloc)
6888 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6890         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
6892 2002-09-05  Jason Merrill  <jason@redhat.com>
6894         * typeck2.c (add_exception_specifier): Only pedwarn for an
6895         incomplete type.
6896         (require_complete_eh_spec_types): New fn.
6897         (cxx_incomplete_type_diagnostic): Also support pedwarning.
6898         * typeck.c (complete_type_or_diagnostic): Likewise.
6899         * call.c (build_call): Call require_complete_eh_spec_types.
6900         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
6901         on an incomplete type.
6903 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
6905         * decl.c (start_cleanup_fn): Clear interface_only before
6906         start_function, restore it afterwards.
6908 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
6910         * cp-tree.h (finish_builtin_type): Remove.
6911         * decl2.c (finish_builtin_type): Move to common code.
6912         * decl.c (build_ptrmemfunc_type): Adjust.
6913         * rtti.c (create_pseudo_type_info): Adjust.
6914         (create_tinfo_types): Adjust.
6916 2002-08-31  Jason Merrill  <jason@redhat.com>
6918         * cp-lang.c (cp_expr_size): Allow initialization from a
6919         CONSTRUCTOR.
6921 2002-08-30  Richard Henderson  <rth@redhat.com>
6923         PR opt/7515
6924         * tree.c: Include target.h.
6925         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
6926         don't bind locally.
6927         * Makefile.in (tree.o): Update.
6929 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
6931         * class.c (layout_virtual_bases): Warn about bugs in G++ that
6932         result in incorrect object layouts.
6933         (layout_class_type): Likewise.
6935 2002-08-24  Matt Austern  <austern@apple.com>
6937         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
6938         are allowable.
6939         (real_lvalue_p): Update caller.
6940         (lvalue_p): Ditto.
6941         (non_cast_lvalue_or_else): New.
6942         * tree.h: Declare it.
6943         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
6945 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
6947         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
6948         and COND_EXPR specially; fix error message output.
6950 2002-08-22  Jason Merrill  <jason@redhat.com>
6952         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
6953         * semantics.c (nullify_returns_r): Likewise.
6955 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6957         Fix PR/7621
6958         * typeck.c (finish_class_member_access_expr): Diagnose cases where
6959         name lookup finds nothing.
6961 2002-08-15  Jason Merrill  <jason@redhat.com>
6963         * semantics.c (finish_then_clause): Remove redundant assignment.
6964         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
6965         extra binding level outside the if/switch statement.
6966         (finish_while_cond, finish_for_cond): Rewrite complex condition
6967         into the loop body.
6969 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
6971         * parse.y (sizeof, alignof, typeof): New non-terminals to
6972         increment skip_evaluation.  Replace terminals with them and
6973         decrement skip_evaluation at the end of rules using them.
6974         * decl2.c (mark_used): Don't assemble_external if
6975         skipping evaluation.
6977 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
6979         Fix PR/7504
6980         * parse.y (parse_finish_call_expr): Handle incomplete
6981         type used to name a scope.
6983 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
6985         PR c++/7598
6986         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
6987         regression caused by my 2002-08-08 patch.
6989 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
6991         * decl.c (pushdecl_class_level): Honor requests to bind names to
6992         OVERLOADs.
6994 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6996         * decl2.c (build_call_from_tree): Fix uninitialized variable.
6997         * parse.y (parse_finish_call_expr): Likewise.
6998         * repo.c (old_args, old_dir, old_main): Const-ify.
7000 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
7002         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
7003         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
7004         * optimize.c (maybe_clone_body): Likewise.
7005         * pt.c (tsubst_enum): Likewise.
7006         (lookup_template_class): Likewise.
7007         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
7009 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
7011         * lang-specs.h: Remove -ansi.
7013 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7015         * tree.c (maybe_dummy_object): Replace // with /* */
7017 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
7019         * call.c (standard_conversion): Use build_ptrmem_type.
7020         * cp-tree.h (build_ptrmem_type): New function.
7021         (adjust_result_of_qualified_name_lookup): Likewise.
7022         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
7023         static data members.
7024         (build_ptrmem_type): New function.
7025         (grokdeclarator): Do not use build_offset_type when encountering a
7026         qualified name.
7027         * parse.y (parse_finish_call_expr): Use
7028         adjust_result_of_qualified_name_lookup.
7029         * search.c (adjust_result_of_qualified_name_lookup): New function.
7030         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
7031         accessing OFFSET_TYPEs directly.
7033 2002-08-08  Mike Stump  <mrs@apple.com>
7035         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
7036         (type_decays_to): Likewise.
7037         * class.c (find_final_overrider): Likewise.
7038         (maybe_note_name_used_in_class): Likewise.
7039         * decl.c (current_tmpl_spec_kind): Likewise.
7040         (add_binding): Likewise.
7041         (push_class_binding): Likewise.
7042         (duplicate_decls): Likewise.
7043         (layout_var_decl): Likewise.
7044         (grokfndecl): Likewise.
7045         (grokdeclarator): Likewise.
7046         (check_default_argument): Likewise.
7047         * decl2.c (handle_class_head): Likewise.
7048         * error.c (dump_template_decl): Likewise.
7049         * init.c (build_offset_ref): Likewise.
7050         * pt.c (check_specialization_scope): Likewise.
7051         (determine_specialization): Likewise.
7052         (check_explicit_specialization): Likewise.
7053         (maybe_check_template_type): Likewise.
7054         (process_partial_specialization): Likewise.
7055         (check_default_tmpl_args): Likewise.
7056         (push_template_decl_real): Likewise.
7057         (convert_template_argument): Likewise.
7058         (try_class_unification): Likewise.
7059         (get_bindings_real): Likewise.
7060         (do_decl_instantiation): Likewise.
7061         * semantics.c (begin_function_definition): Likewise.
7062         (finish_member_declaration): Likewise.
7063         (check_multiple_declarators): Likewise.
7064         * typeck.c (comp_array_types): Likewise.
7065         (comptypes): Likewise.
7066         (expr_sizeof): Likewise.
7067         (build_binary_op): Likewise.
7068         (dubious_conversion_warnings): Likewise.
7069         (check_return_expr): Likewise.
7071 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
7073         * typeck.c (build_class_member_access_expr): Do not return
7074         error_mark_node when no error has occurred.
7076 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7078         * typeck.c (build_component_addr): Remove.
7079         (build_unary_op): Just check it's not a bitfield, and then build
7080         an ADDR_EXPR.
7082 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7084         * class.c (convert_to_base): Correct check for error_mark_node.
7085         (create_vtable_ptr): Remove unused VFUNS_P parm.
7087 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7089         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
7091 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
7093         Rework build_component_ref.
7094         * call.c (build_vfield_ref): Do not go through build_component_ref.
7095         (build_field_call): Use build_class_member_access_expr.
7096         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
7097         (build_object_call): Likewise.
7098         * class.c (convert_to_base): New function.
7099         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
7100         (instantiate_type): Handle BASELINKs.
7101         * cp-tree.def (BASELINK): New tree code.
7102         * cp-tree.h (BASELINK_P): Reimplement.
7103         (SET_BASELINK_P): Remove.
7104         (BASELINK_BINFO): Reimplement.
7105         (BASELINK_FUNCTIONS): Likewise.
7106         (BASELINK_ACCESS_BINFO): Likewise.
7107         (BASELINK_OPTYPE): Likewise.
7108         (convert_to_base): New function.
7109         (name_p): Likewise.
7110         (build_object_ref): Remove.
7111         (build_component_ref_1): Likewise.
7112         (build_component_ref): Likewise.
7113         (build_x_component_ref): Likewise.
7114         (build_class_member_access_expr): New function.
7115         (finish_class_member_access_expr): Likewise.
7116         (build_ptrmemfunc_access_expr): Likewise.
7117         * decl.c (grokdeclarator): Handle BASELINKs.
7118         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
7119         finish_class_member_access_expr.
7120         (arg_assoc): Handle BASELINKs.
7121         (do_class_using_decl): Likewise.
7122         * error.c (dump_decl): Likewise.
7123         (dump_expr): Use build_ptrmemfunc_access_expr.
7124         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
7125         destructors.
7126         (build_throw): Use BASELINK_FUNCTIONS.
7127         * init.c (perform_member_init): Use
7128         build_class_member_access_expr.
7129         (build_offset_ref): Handle BASELINKs.  Use
7130         build_class_member_access_expr.
7131         * method.c (hack_identifier): Likewise.
7132         * parse.y (do_id): Use BASELINK, not TREE_LIST.
7133         (primary): Remove uses of build_object_ref.
7134         * pt.c (lookup_template_function): Handle BASELINKs.
7135         (resolve_overloaded_unification): Likewise.
7136         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
7137         (lookup_field): Use BASELINK, not TREE_LIST.
7138         (lookup_fnfiels): Likewise.
7139         (setup_class_bindings): Likewise.
7140         * semantics.c (finish_object_call_expr): Do not use
7141         build_method_call when we already know what function is being
7142         called.
7143         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
7144         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
7145         TREE_CHAIN.
7146         (name_p): New function.
7147         * typeck.c (build_object_ref): Remove.
7148         (build_component_ref_1): Likewise.
7149         (build_x_component_ref): Likewise.
7150         (build_class_member_access_expr): New function.
7151         (finish_class_member_access_expr): Likewise.
7152         (build_ptrmemfunc_access_expr): Likewise.
7153         (get_member_function_from_ptrfunc): Use
7154         build_ptrmemfunc_access_expr.
7155         (build_binary_op): Likewise.
7156         (build_unary_op): Likewise.
7157         (build_ptrmemfunc): Likewise.
7158         (pfn_from_ptrmemfunc): Likewise.
7159         * typeck2.c (build_m_component_ref): Adjust comment.
7161 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
7163         * Make-lang.in (CXX_C_OBJS): Update.
7164         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
7165         * cp-tree.h (cxx_decode_option): Remove.
7166         * decl2.c (compare_options, lang_f_options, unsupported_options,
7167         cxx_decode_option): Remove.
7169 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
7171         * typeck.c (build_x_unary_op): Handle pointer-to-member.
7173 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7175         * class.c: Don't include obstack.h.
7176         (popclass):
7177         * decl2.c: Delete bogus comment.
7178         * error.c: Don't include obstack.h.
7179         * except.c: Likewise.
7180         (dump_type): Correct comment.
7181         * method.c: Don't include obstack.h.
7182         * tree.c: Likewise.
7184 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
7186         Fix PR/2213
7187         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
7188         expressions to pointer-to-data-member of pointer-to-member-functions.
7190 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7192         * cvt.c (ocp_convert): Delete obsolete code.
7193         * parse.y (permanent_obstack): Delete declaration.
7194         * pt.c (permanent_obstack): Delete declaration.
7195         * repo.c (permanent_obstack): Delete declaration.
7196         (open_repo_file): Use xmalloc instead of permanent_obstack.
7197         (init_repo): Use xstrdup instead of permanent_obstack.
7199 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
7201         * cp-tree.h (VF_DERIVED_VALUE): Remove.
7202         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
7204 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
7206         PR 7470.
7207         C++ ABI change - vfunc ordering.
7208         * class.c (add_virtual_function): Remove.
7209         (dfs_modify_all_vtables): Take list of all declared
7210         virtuals. Assign all that are not in primary base.
7211         (check_for_override): Adjust comments.
7212         (create_vtable_ptr): Take single list of virtuals. Build chain
7213         of declared virtuals here.
7214         (layout_class_type): Take single list of virtuals. Adjust.
7215         (finish_struct_1): Keep virtuals on single list. Adjust.
7217 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7219         * init.c (build_member_call): Use build_new_method_call, not
7220         build_method_call.
7222 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
7224         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
7226 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
7228         * call.c (build_method_call): Issue a more helpful error message
7229         about ambiguous method names.
7231 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
7233         * tree.c (build_shared_int_cst): Make cache file scope, and
7234         GTY it.
7236 2002-08-02  Jason Merrill  <jason@redhat.com>
7238         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
7239         (cp_expr_size): New fn.
7240         * call.c (build_over_call): Lose empty class hackery.
7241         (convert_arg_to_ellipsis): Promote non-POD warning to error.
7242         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
7244         * semantics.c (expand_body): Do tree optimization in the function
7245         context, too.
7247 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
7249         * cp-tree.h: Move all warning and flag declarations to c-common.h.
7250         * decl.c: Move all warning and flag variables to c-common.c.
7251         * decl2.c: Move all warning and flag variables to c-common.c.
7252         * lex.c (flag_digraphs): Remove.
7253         (warn_traditional): Now in c-common.c.
7255 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
7257         * call.c (build_field_call): Do not look up the field by name.
7258         (build_method_call): Simplify.
7259         (struct z_candidate): Add access_path and conversion_path.  Remove
7260         basetype_path.
7261         (convert_class_to_reference): Adjust use of
7262         add_function_candidate.
7263         (add_candidate): Add conversion_path argument.
7264         (add_function_candidate): Use it.
7265         (add_conv_dndidate): Likewise.
7266         (build_builtin_candidate): Likewise.
7267         (add_template_candidate_real): Add conversion_path argument.
7268         (add_template_conv_candidate): Likewise.
7269         (add_template_candidate): Likewise.
7270         (build_user_type_conversion_1): Use it.
7271         (build_new_function_call): Remove name lookup code.  Adjust use of
7272         add_template_candidate and add_function_candidate.
7273         (build_new_op): Likewise.
7274         (convert_like_real): Use build_special_member_call.
7275         (build_over_call): Use cand->conversion_path.
7276         (build_special_member_call): New method.
7277         (build_new_method_call): Remove name lookup code.
7278         * cp-tree.def (OFFSET_REF): Update documentation.
7279         (TEMPLATE_ID_EXPR): Likewise.
7280         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
7281         (BASELINK_OPTYPE): Likewise.
7282         (build_new_method_call): Adjust prototype.
7283         (build_special_member_call): New method.
7284         (build_baselink): New method.
7285         (build_offset_ref_call_from_tree): Likewise.
7286         (build_call_from_tree): Likewise.
7287         (finish_qualified_call_expr): Remove.
7288         (finish_call_expr): Adjust prototype.
7289         (build_x_function_call): Remove.
7290         * cvt.c (ocp_convert): Use build_special_member_call.
7291         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
7292         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
7293         CALL_EXPR.
7294         (build_offset_ref_call_from_tree): New function.
7295         (build_call_from_tree): Likewise.
7296         * init.c (expand_cleanup): Use build_special_member_call.
7297         (expand_default_init): Likewise.
7298         (build_member_call): Use finish_call_expr.
7299         (build_new_1): Use build_special_member_call.
7300         (push_base_cleanups): Likewise.
7301         * method.c (do_build_assign_ref): Likewise.
7302         * parse.y (template_id): Do not pass a COMPONENT_REF to
7303         lookup_template_function.
7304         (primary): Use parse_finish_call_epxr, not finish_call_expr.
7305         (parse_finish_call_expr): New function.
7306         * pt.c (lookup_template_function): Add assertions.
7307         * search.c (lookup_base): Allow T to be a binfo.
7308         (build_baselink): New function.
7309         (lookup_member): Use it.
7310         * semantics.c (finish_call_expr): Do not do name lookup.
7311         (finish_object_call_expr): Remove #if 0'd code.
7312         (finish_qualified_call_expr): Remove.
7313         * typeck.c (build_x_function_call): Remove.
7314         (build_static_case): Use build_special_member_call.
7315         * typeck2.c (build_functional_cast): Likewise.
7317 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
7319         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
7321 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
7323         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
7325 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
7327         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
7328         documentation.
7330 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
7332         * cp-tree.h: Comment typo fix.
7334 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
7336         * spew.c (space_for_token): Allocate zeroed memory for a new token
7337         chunk.
7339 2002-07-27  Roger Sayle  <roger@eyesopen.com>
7341         * decl.c (builtin_function_1): No need to explicitly mark
7342         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
7344 2002-07-27  Roger Sayle  <roger@eyesopen.com>
7346         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
7348 2002-07-26  Jason Merrill  <jason@redhat.com>
7350         * call.c (build_over_call): Likewise.
7351         (cp_convert_parm_for_inlining): New fn.
7352         (convert_for_arg_passing): New fn.
7353         (convert_default_arg, build_over_call): Use it.
7354         (type_passed_as): New fn.
7355         * pt.c (tsubst_decl): Use it.
7356         * decl2.c (cp_build_parm_decl): New fn.
7357         (build_artificial_parm): Use it.
7358         (start_static_storage_duration_function): Likewise.
7359         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
7360         (grokparms): Don't mess with DECL_ARG_TYPE.
7361         * typeck.c (convert_arguments): Use convert_for_arg_passing.
7362         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
7363         Define.
7364         * cp-tree.h: Declare new fns.
7366 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
7368         * cp-tree.h (flag_operator_names): Remove.
7369         * decl2.c (flag_operator_names): Remove.
7370         (lang_f_options): Remove operator-names.
7371         * lex.c (D_OPNAME): Remove.
7372         (reswords): Remove operator names.
7373         (rid_to_yy): Remove operator names.
7374         (init_reswords): No need to handle D_OPNAME.
7375         * spew.c (read_process_identifier): There are no operator
7376         names.
7378 2002-07-26  Jason Merrill  <jason@redhat.com>
7380         * dump.c (cp_dump_tree): Call c_dump_tree.
7381         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
7383 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
7385         * error.c (print_whitespace): Remove.
7386         * g++spec.c (LIBUNWIND): Move.
7387         * mangle.c (mangled_position, write_signed_number): Remove.
7389 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
7391         * decl2.c (cxx_decode_option): Similarly.
7393 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
7395         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
7396         (cxx_sizeof_or_alignof_type): Take a third argument.
7397         (cxx_sizeof): Adjust definition.
7398         (cxx_alignof): Likewise.
7399         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
7400         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
7401         complaining.
7402         (c_sizeof_nowarn): Remove definition.
7403         (build_unary_op): Use cxx_sizeof_nowarn.
7405 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
7407         * tree.c (cp_build_qualified_type_real): When copying
7408         pointer-to-method types, unshare the record that holds
7409         the cached pointer-to-member-function type.
7411 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
7413         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
7415 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
7417         Fix PR/7363:
7418         * typeck.c (cxx_sizeof_or_alignof_type): New function.
7419         (c_sizeof): Remove definition.
7420         (expr_sizeof): Use cxx_sizeof.
7421         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
7422         * decl.c (finish_destructor_body): Use cxx_sizeof.
7423         * semantics.c (finish_alignof): Likewise.
7424         (finish_alignof): Use cxx_alignof.
7425         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
7426         (cxx_sizeof_or_alignof_type): Declare.
7427         (my_friendly_assert): Move to ../c-common.h.
7429 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
7431         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
7433 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7435         PR c++/7347, c++/7348
7436         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
7437         * decl.c (make_typename_type): Use it.
7438         (make_unbound_class_template): Likewise.
7439         (lookup_name_real): Don't call type_access_control if scope is
7440         template parameter dependent.
7441         * parse.y (template_arg): Call make_unbound_class_template with
7442         tf_parsing set.
7443         (nest_name_specifier): Call make_typename_type with tf_parsing set.
7444         (typename_sub0): Likewise.
7445         (typename_sub1): Likewise.
7446         (instantiate_decl): Push class scope.
7447         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
7448         for both static variable and member function template.
7449         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
7450         and arguments.
7451         * search.c (type_access_control): Do type access for TEMPLATE_DECL
7452         too.
7454 2002-07-20  Roger Sayle  <roger@eyesopen.com>
7456         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
7457         test by using positive_option.  Make whitespace consistent.
7459 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
7461         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
7462         members with 'locus'.  Adjust use throughout.
7463         (struct feed):  Likewise.
7464         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
7465         Adjust use.
7466         (snarf_defarg): Use error(), not error_with_file_and_line().
7468 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
7470         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
7471         cpp_options is included.
7473 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7475         PR c++/2862, c++/2863
7476         * pt.c (determine_specialization): Compare the length of
7477         TYPE_ARG_TYPES.  Tidy.
7479 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7481         PR c++/3797
7482         * decl.c (duplicate_decls): Don't propagate inlining parameters from
7483         olddecl to newdecl when newdecl is a specialization of the
7484         instantiation olddecl.
7486 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7488         PR c++/4802, c++/5387
7489         * decl.c (make_typename_type): Use enforce_access.
7491 2002-07-17  Scott Snyder <snyder@fnal.gov>
7493         PR c++/7320
7494         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
7496 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
7498         * class.c (add_method): Correct handling of conversion operators.
7500 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
7502         PR c++/7224
7503         * class.c (add_method): Simplify.
7505 2002-07-11  Jason Merrill  <jason@redhat.com>
7507         PR c++/7279
7508         * tree.c (cp_copy_res_decl_for_inlining): Also copy
7509         TREE_ADDRESSABLE.
7511 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
7513         * pt.c (template_parm_this_level_p, push_template_decl_real):
7514         Pass depth as int pointer.
7516 2002-07-11  Tim Josling  <tej@melbpc.org.au>
7518         Remove front end hard coding from gengtype.c.
7520         * config-lang.in (gtfiles): Add files needed for this front end.
7522 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
7524         * cp-tree.h (unqualified_name_lookup_error): Declare it.
7525         (begin_function_definition): Adjust prototype.
7526         * lex.c (unqualified_name_lookup_error): New function, split out
7527         from ...
7528         (do_identifier): ... here.
7529         * parse.y (parse_begin_function_definition): New function.
7530         (fn.def1): Use it.
7531         * semantics.c (begin_function_definition): Accept decl-specifiers
7532         and attributes as separate parameters.
7534 2002-07-10  Jason Merrill  <jason@redhat.com>
7536         PR c++/6255
7537         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
7538         modifying the old one.
7540 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
7542         * cp-tree.h (constructor_name_p): Declare it.
7543         (check_template_template_default_arg): Likewise.
7544         * class.c (handle_using_decl): Use constructor_name_p.
7545         * decl.c (grokdeclarator): Likewise.
7546         * decl2.c (constructor_name_p): Define it.
7547         * init.c (build_member_call): Use constructor_name_p.
7548         * parse.y (template_parm): Use check_template_template_default_arg.
7549         * pt.c (check_explicit_specialization): Use constructor_name_p.
7550         * semantics.c (check_template_template_default_arg): New function.
7552 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7554         * pt.c (can_complete_type_without_circularity): Add static to
7555         function definition.
7557 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
7559         * cp-tree.h (have_extern_spec): Declare it
7560         * decl.c (have_extern_spec): Define it.
7561         (start_decl): Eliminate use of used_extern_spec.
7562         (start_function): Likewise.
7563         * parse.y (have_extern_spec): Remove declaration.
7564         (used_extern_spec): Likewise.
7565         (frob_specs): Eliminate use of used_extern_spec.
7566         (.hush_warning): Likewise.
7568 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
7570         * Make-lang.in (cp/parse.o): Depend on decl.h.
7571         * cp-tree.h (do_decl_instantiation): Change prototype.
7572         * parse.y: Include decl.h.
7573         (parse_decl_instantiation): New function.
7574         (explicit_instantiation): Use it.
7575         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
7576         and DECLSPECS.
7578 2002-07-07  Roger Sayle  <roger@eyesopen.com>
7580         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
7581         constructor and destructor tests when passed a TEMPLATE_DECL.
7583 2002-07-05  Jason Merrill  <jason@redhat.com>
7585         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
7586         pointers.
7588         PR optimization/7145
7589         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
7591 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
7593         Repair damage on weak-impared targets caused by my previous patch.
7594         * cp-tree.h (import_export_tinfo): Add parameter.
7595         * decl2.c (import_export_tinfo): Add parameter, post adjust
7596         DECL_COMDAT.
7597         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
7598         import_export_tinfo.
7600 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7602         PR c++/6944
7603         * init.c (build_aggr_init): Remove qualifiers of init before calling
7604         build_vec_init.
7605         (build_vec_init): Flatten multi-dimensional array during cleanup.
7606         (build_vec_delete_1): Abort if the type of each element is array.
7608 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
7610         * pt.c (instantiate_class_template): Fix typo.
7612 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7614         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
7615         by CVS conflict in my last patch.
7617 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7619         PR c++/6716
7620         * pt.c (can_complete_type_without_circularity): New function.
7621         (instantiate_class_template): Use it.
7622         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
7623         message due to incomplete fields.
7625 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
7627         PR c++/7112
7628         * mangle.c (write_expression): Add mangling for sizeof when
7629         applied to a type.
7630         * operators.def: Remove stale comment.
7632 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7634         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
7635         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
7636         (tinfo_decl_type): Replace with ...
7637         (type_info_ptr_type): ... this.
7638         (import_export_tinfo): Declare.
7639         (tinfo_decl_p): Rename to ...
7640         (unemitted_tinfo_decl_p): ... this.
7641         * decl2.c (import_export_decl): Break out tinfo handling into ...
7642         (import_export_tinfo): ... here. New function.
7643         (finish_file): Adjust.
7644         * rtti.c (TINFO_REAL_NAME): New macro.
7645         (init_rtti_processing): Create the tinfo types.
7646         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
7647         (get_tinfo_decl): Adjust.
7648         (get_tinfo_ptr): New function.
7649         (get_type_id): Use it.
7650         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
7651         (ptr_initializer): Use get_tinfo_ptr.
7652         (ptm_initializer): Likewise.
7653         (synthesize_tinfo_var): Break into ...
7654         (get_pseudo_ti_init): ... this. Just create the initializer.
7655         (get_pseudo_ti_desc): .. and this.
7656         (create_real_tinfo_var): Remove.
7657         (create_pseudo_type_info): Don't create the vtable decl here.
7658         (get_vmi_pseudo_type_info): Remove.
7659         (create_tinfo_types): Adjust.
7660         (tinfo_decl_p): Rename to ...
7661         (unemitted_tinfo_decl_p): ... here. Adjust.
7662         (emit_tinfo_decl): Adjust. Create the initializer.
7664 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
7666         PR c++/6695
7667         * pt.c (tsubst_friend_class): Substitute into the context of the
7668         friend before using it.
7670 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
7672         * cp-tree.h (xref_tag): Change prototype.
7673         (handle_class_head): Likewise.
7674         (build_x_component_ref): Likewise.
7675         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
7676         (xref_tag): Take attributes as a separate parameter.
7677         (xref_tag_from_type): Adjust call to xref_tag.
7678         * decl2.c (build_expr_from_tree): Adjust call to
7679         build_x_component_ref.
7680         (handle_class_head): Take attributes as a separate parameter.
7681         * parse.y (parse_xref_tag): New function.
7682         (parse_handle_class_head): Likewise.
7683         (primary): Use parse_xref_tag.
7684         (class_head_decl): Use parse_handle_class_head.
7685         (class_head_defn): Likewise.
7686         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
7687         (build_dynamic_cast_1): Likewise.
7688         (create_pseudo_type_info): Likewise.
7689         (emit_support_tinfos): Likewise.
7690         * typeck.c (build_object_ref): Adjust call to
7691         build_x_component_ref.
7692         (build_x_component_ref): Remove protect parameter.
7694 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
7696         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
7697         * class.c (handle_using_decl): Likewise.
7698         (instantiate_type): Likewise.
7699         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
7700         (xref_basetypes): Change prototype.
7701         (begin_mem_initializers): New function.
7702         (get_overloaded_fn): Likewise.
7703         * decl.c (xref_basetypes): Simplify.
7704         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
7705         * init.c (build_offset_ref): Likewise.
7706         * parse.y (base_init): Use begin_mem_initializers().
7707         (structsp): Adjust call to xref_basetypes.
7708         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
7709         (instantiate_class_template): Adjust call to xref_basetypes.
7710         * semantics.c (begin_mem_initializers): New function.
7711         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
7712         (really_overlaoded_fn): Likewise.
7713         (get_overloaded_fn): New function.'
7714         (get_first_fn): USe BASELINK_FUNCTIONS.
7716 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
7718         * cp-tree.h (SCALAR_TYPE_P): New macro.
7719         (check_for_out_of_scope_variable): New function.
7720         (at_class_scope_p): Likewise.
7721         (finish_fname): Likewise.
7722         * class.c (finish_struct): Use at_function_scope_p.
7723         * decl.c (check_for_out_of_scope_variable): New function, split
7724         out from do_identifier.
7725         (finish_enum): Use at_function_scope_p.
7726         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
7727         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
7728         (primary): Use at_function_scope_p.
7729         * search.c (at_class_scope_p): New function.
7730         * semantics.c (finish_fname): Likewise.
7731         (check_multiple_declarators): Use at_function_scope_p.
7733 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
7735         * parse.y (parse_scoped_id): New function.
7736         (primary): Use it.
7737         * cp-tree.h (do_scoped_id): Adjust declaration.
7738         * lex.c (do_scoped_id): Remove call to yylex.
7739         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
7740         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
7741         expanding it inline.
7743 2002-06-23  Matt Thomas  <matt@3am-software.com>
7745         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
7746         "#if VMS_TARGET".
7748 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7750         * mangle.c (integer_type_codes): Const-ify.
7752 2002-06-20  Richard Henderson  <rth@redhat.com>
7754         PR c++/6747
7755         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
7756         Call put_var_into_stack.
7758 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7760         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
7761         array size calculation.
7763 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7765         PR c++/6892
7766         * pt.c (tsubst_expr): Handle FILE_STMT.
7768 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7770         PR c++/6723
7771         * pt.c (lookup_template_class): Don't build complete argument of
7772         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
7773         argument.
7775 2002-06-19  Akim Demaille  <akim@epita.fr>
7777         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
7778         decl.h's TYPENAME.
7779         * spew.c, lex.c: Adjust.
7780         * parse.y (explicit_instantiation): Add empty action to override
7781         the default $$ = $1 where it introduces a type clash.
7783 2002-06-14  Jason Merrill  <jason@redhat.com>
7785         * semantics.c (begin_for_stmt): Push the 'for' scope before
7786         adding the FOR_STMT.
7788         C++ ABI changes.
7789         * class.c (build_base_field): Set DECL_PACKED.
7790         (layout_class_type): Don't use tail padding of PODs.
7791         * mangle.c (write_unqualified_name): Fix template conversion op
7792         mangling.
7794 2002-06-16  Richard Henderson  <rth@redhat.com>
7796         PR opt/6793
7797         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
7798         after template instantiation.
7800 2002-06-16  Richard Henderson  <rth@redhat.com>
7802         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
7804 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
7806         * cp-tree.h (compiler_error): Remove declaration.
7807         * lex.c (compiler_error): Remove definition.
7809 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
7811         * g++spec.c (LIBUNWIND): New.
7812         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
7814 2002-06-13  Jessica Han  <jessica@cup.hp.com>
7816         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
7817         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
7818         (build_vbase_offset_vtbl_entries): Likewise.
7819         * rtti.c (build_headof): Likewise.
7820         (get_tinfo_decl_dynamic): Likewise.
7821         (create_pseudo_type_info): Likewise.
7823 2002-06-12  Stan Shebs  <shebs@apple.com>
7825         * mpw-config.in: Remove file, no longer used.
7826         * mpw-make.sed: Ditto.
7828 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
7830         * decl2.c: Update call to cpp_handle_option.
7832 2002-06-07  H.J. Lu  (hjl@gnu.org)
7834         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
7836 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
7838         * error.c (cp_error_at): Fix typo.
7840 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
7842         * error.c (cp_diagnostic_starter): Adjust call.
7843         (maybe_print_instantiation_context): Change prototype to take a
7844         'diagnostic_info *'.
7845         (print_instantiation_full_context): Likewise.
7846         (print_instantiation_partial_context): Likewise.
7847         (cp_diagnostic_starter): Likewise.
7848         (cp_diagnostic_finalizer): Likewise.
7849         (cp_print_error_function): Likewise.
7850         (cp_printer): Take a secondary parameter as a 'text_info *'.
7851         Remove output_state savings.  Adjust calls.
7853 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
7855         * pt.c (inline_parm_levels): Mark for GC.
7857         * mangle.c (start_mangling): Allocate G.substitutions here...
7858         (init_mangle): ... rather than here.
7859         (finish_mangling): Clear the varray pointer when done with it.
7860         * spew.c (yylexstring): Don't use VARRAY_FREE.
7861         * search.c (bfs_walk): Don't use VARRAY_FREE.
7862         * decl2.c (pending_statics): Use gengtype to mark.
7863         (deferred_fns): Likewise.
7864         (ssdf_decls): Likewise.
7865         (init_decl2): Delete.
7866         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
7867         (cxx_init_decl_processing): Don't call init_decl2.
7868         (cxx_pop_function_context): Don't use VARRAY_FREE.
7869         * cp-tree.h (struct saved_scope): No need for special marking
7870         of varrays.
7871         (struct language_function): Likewise.
7872         (local_classes): Use gengtype to mark.
7873         (init_decl2): Delete prototype.
7874         * class.c (init_class_processing): Don't use
7875         ggc_add_tree_varray_root.
7876         (build_vtbl_initializer): Don't use VARRAY_FREE.
7878         * decl.c (typename_compare): Don't use same_type_p.
7880         * decl.c: Include hashtab.h instead of hash.h.
7881         (typename_hash): Update to use htab_h.
7882         (typename_compare): Likewise.
7883         (typename_htab): Use gengtype to mark.
7884         (build_typename_type): Update to use htab_h.
7885         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
7887         * Make-lang.in (gt-cp-tree.h): New rule.
7888         (cp/tree.o): Depend on gt-cp-tree.h.
7889         * config-lang.in (gtfiles): Add cp/tree.c.
7890         * tree.c: Include gt-cp-tree.h.
7891         (list_hash_table): Use gengtype to mark.
7892         (init_tree): Use gengtype to mark trees.
7894         * Make-lang.in (cp/decl.o): Add debug.h dependency.
7895         * call.c (struct z_candidate): Use gengtype.
7896         (USER_CONV_CAND): Use WRAPPER_ZC.
7897         (convert_class_to_reference): Use build_zc_wrapper.
7898         (build_type_conversion_1): Likewise.
7899         (build_over_call): Use WRAPPER_ZC.
7900         (add_warning): Use build_zc_wrapper.
7901         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
7902         * cp-tree.h (struct lang_identifier): Use gengtype.
7903         (struct template_parm_index_s): Likewise.
7904         (struct ptrmem_cst): Likewise.
7905         (struct tree_binding): Likewise.
7906         (struct tree_overload): Likewise.
7907         (struct tree_srcloc): Likewise.
7908         (struct tree_wrapper): Likewise.  Also modify to have a pointer
7909         to struct z_candidate rather than void.
7910         (enum cp_tree_node_structure_enum): New.
7911         (union lang_tree_node): New.
7912         (cxx_mark_tree): Delete prototype.
7913         (cp_tree_node_structure): New prototype.
7914         (build_ptr_wrapper): Delete prototype.
7915         (build_int_wrapper): Delete prototype.
7916         (build_zc_wrapper): New prototype.
7917         * decl.c: Include debug.h
7918         (cxx_mark_tree): Delete.
7919         (cp_tree_node_structure): New.
7920         * tree.c (build_ptr_wrapper): Delete.
7921         (build_int_wrapper): Delete.
7922         (build_zc_wrapper): New.
7924         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
7925         Correct typo.  Patch from k_fukui@highway.ne.jp.
7927         * semantics.c (current_stmt_tree): Update for change to
7928         struct language_function.
7929         (finish_mem_initializers): Likewise.
7930         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
7931         * cp-tree.h (struct language_function): Rename from
7932         cp_language_function.  Change all uses.
7933         (cp_function_chain): Don't need to cast.
7935         * class.c (duplicate_tag_error): Reset discriminator.
7936         (check_bases_and_members): Update for data structure changes.
7937         * cp-tree.h (struct lang_id2): Use gengtype.
7938         (flagged_type_tree): Likewise.
7939         (SET_LANG_ID): Use GGC on struct lang_id2.
7940         (struct cp_language_function): Use gengtype.  Remove field
7941         'x_vcalls_possible_p'.
7942         (current_vcalls_possible_p): Delete.
7943         (struct lang_type_header): New.
7944         (struct lang_type_class): Rename from struct lang_type.  Include
7945         struct lang_type_header.
7946         (struct lang_type_ptrmem): New.
7947         (struct lang_type): New.
7948         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
7949         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
7950         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
7951         (struct lang_decl_flags): Use gengtype.  Add discriminators.
7952         (struct lang_decl): Use gengtype.  Add and use discriminators.
7953         Update the macros that reference moved fields.
7954         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
7955         (SET_DECL_THUNK_P): Set discriminator too.
7956         (clear_inline_text_obstack): Delete prototype.
7957         (finish_inline_definitions): Delete prototype.
7958         (mark_pending_inlines): Delete prototype.
7959         (lang_check_failed): New prototype.
7960         * decl.c (struct named_label_use_list): Use gengtype.
7961         (struct named_label_list): Likewise.
7962         (mark_binding_level): Delete.
7963         (mark_named_label_lists): Delete.
7964         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
7965         (cxx_init_decl_processing): Use generated marker routine.
7966         (begin_destructor_body): Delete dead set to
7967         current_vcalls_possible_p.
7968         (mark_lang_function): Delete.
7969         (mark_cp_function_context): Delete.
7970         (lang_mark_tree): Use generated marker routines.
7971         * decl2.c (start_objects): Set discriminator when setting
7972         GLOBAL_INIT_PRIORITY.
7973         * lex.c (retrofit_lang_decl): Set discriminators.
7974         (copy_lang_type): Update for changes to lang_type structure.
7975         (cp_make_lang_type): Set discriminator.
7976         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
7977         * search.c: Include ggc.h.
7978         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
7979         (finish_inline_definitions): Delete.
7980         * spew.c (struct token): Use gengtype.
7981         (struct token_chunk): New.
7982         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
7983         (struct feed): Use gengtype.
7984         (feed_obstack): Delete.
7985         (feed): Mark as GC root.
7986         (pending_inlines): Mark as GC root.
7987         (pending_inlines_tail): Likewise.
7988         (processing_these_inlines): Likewise.
7989         (token_obstack): Make static.
7990         (first_token): Likewise.
7991         (init_spew): Don't initialize deleted things; use gengtype for roots.
7992         (clear_inline_text_obstack): Delete.
7993         (feed_input): Use GC for struct feed.  Update for changes to
7994         struct unparsed_text.
7995         (mark_pending_inlines): Delete.
7996         (next_token): Rename from add_token.  Change all callers.  Update
7997         for changes to struct unparsed_text.
7998         (space_for_token): New.
7999         (remove_last_token): New.
8000         (alloc_unparsed_text): New.
8001         (snarf_block): Take an unparsed_text.  Update for changes to struct
8002         unparsed_text.
8003         (snarf_method): Update for changes to struct unparsed_text.
8004         (snarf_defarg): Update for changes to struct unparsed_text.
8005         * tree.c (lang_check_failed): New.
8007         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
8008         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
8009         (cp/spew.o): Add dependency on gt-<filename>.h.
8010         (cp/decl2.o): Add dependency on gt-<filename>.h.
8011         (cp/call.o): Add dependency on gt-<filename>.h.
8012         (cp/pt.o): Add dependency on gt-<filename>.h.
8013         (cp/repo.o): Add dependency on gt-<filename>.h.
8014         (cp/parse.o): Add dependency on gt-<filename>.h.
8015         * call.c: Use gengtype for roots.
8016         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
8017         decl2.c parse.y pt.c repo.c spew.c.
8018         * cp-tree.h: Use gengtype for roots.
8019         (struct saved_scope): Use GGC, gengtype.
8020         (cp_parse_init): Delete prototype.
8021         (init_pt): Delete prototype.
8022         * decl.c: Use gengtype for roots.
8023         (mark_saved_scope): Delete.
8024         (cxx_init_decl_processing): Don't call deleted initilisation
8025         routines.
8026         (signed_size_zero_node): Delete, unused.
8027         * decl.h: Use gengtype for roots.
8028         * decl2.c: Use gengtype for roots.
8029         * lex.h: Use gengtype for roots.
8030         * parse.y: Use gengtype for roots.
8031         (cp_parse_init): Delete.
8032         * pt.c: Use gengtype for roots.
8033         (init_pt): Delete.
8034         * repo.c: Use gengtype for roots.
8035         * spew.c: Use gengtype for roots.
8037         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
8038         (cp/decl.o): Add dependency on gtype-cp.h.
8039         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
8040         Include gtype-cp.h.  Allow for filename changes.
8042         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
8043         (cp/decl.o): Add cp/gt-decl.h dependency.
8044         * config-lang.in (gtfiles): New.
8045         * tree.h: Rename struct binding_level to struct cp_binding_level.
8046         * decl.c: Rename struct binding_level to struct cp_binding_level.
8047         Include cp/gt-decl.h.
8048         (struct cp_binding_level): Use gengtype.
8049         (make_binding_level): Use GGC on struct cp_binding_level.
8050         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
8051         (cxx_init_decl_processing): Mark free_binding_level as
8052         deletable.
8054         * decl.c (mark_cp_function_context): Update calling sequence.
8056         * decl.c (start_function): Don't free 'struct
8057         cp_language_function'.
8058         (pop_cp_function_context): Likewise.
8059         (save_function_data): Allocate it using GC.
8060         * semantics.c (genrtl_start_function): Don't free 'struct
8061         cp_language_function'.
8063 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
8065         * lang-specs.h: Use cpp_debug_options.
8067 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8069         * mangle.c, tree.c: Include real.h.
8070         * Make-lang.in: Update dependency lists.
8072 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8074         * lex.c: Don't include c-lex.h.
8075         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
8077 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
8079         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
8081 2002-05-22  Richard Henderson  <rth@redhat.com>
8083         * decl.c (obscure_complex_init): Check for VAR_DECL
8084         before using DECL_THREAD_LOCAL.
8086 2002-05-22  Richard Henderson  <rth@redhat.com>
8088         * decl.c (check_tag_decl): Handle RID_THREAD.
8089         (obscure_complex_init): Reject run-time init of tls.
8090         (grokvardecl, grokdeclarator): Handle RID_THREAD.
8091         * lex.c (reswords): Add __thread.
8092         (rid_to_yy): Map RID_THREAD to SCSPEC.
8094 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
8096         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
8097         * cp-tree.h (cxx_post_options): Kill.
8098         * cp-lex.c (cxx_post_options): Kill.
8100 2002-05-21  Richard Henderson  <rth@redhat.com>
8102         * lex.c (rid_to_yy): Add RID_THREAD.
8104 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
8106         * init.c (build_vec_init): Test for trivial copy-assignment when
8107         copy-assigning arrays.
8109 2002-05-20  Andreas Jaeger  <aj@suse.de>
8111         * init.c (build_default_init): Remove unused variable.
8113 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
8115         * call.c (any_strictly_viable): New.
8116         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
8118 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8120         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
8122 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8124         PR c++/186, DR 259
8125         * pt.c (do_decl_instantiation): Don't complain explicit
8126         instantiation after explicit specialization.
8127         (do_type_instantiation): Likewise.
8129 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
8131         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
8132         renamed from...
8133         (complete_type_or_else): ... this.  Redefined as macro.
8134         (cxx_incomplete_type_diagnostic): Declare.
8135         (cxx_incomplete_type_error): Define as macro.
8136         * init.c (build_delete): Warn about incomplete types other than
8137         void, and use the built-in operator delete for them.
8138         * typeck.c (complete_type_or_diagnostic): Renamed from
8139         complete_type_or_else.  Added warn_only argument, passed to...
8140         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
8141         warnings or errors depending on new warn_only argument.  Renamed
8142         from...
8143         (cxx_incomplete_type_error): ... this.  New implementation in
8144         terms of cxx_incomplete_type_diagnostic.
8146 2002-05-18  Jason Merrill  <jason@redhat.com>
8148         PR c++/6611
8149         * decl2.c (import_export_decl): If we clear
8150         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
8152 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8154         PR c++/6620
8155         * pt.c (verify_class_unification): Don't check if PARM is template
8156         parameter dependent.  Simplify.
8157         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
8158         parameter dependent expression.
8160 2002-05-14  Jason Merrill  <jason@redhat.com>
8162         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
8163         Do set DECL_COMDAT.
8164         (synthesize_tinfo_var): Take the public decl.
8165         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
8166         (emit_tinfo_decl): Adjust.  Call import_export_decl.
8167         * decl2.c (import_export_decl): Simplify tinfo decl handling.
8169 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
8171         * cp-tree.h (struct lang_type): Added non_zero_init.
8172         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
8173         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
8174         * class.c (check_field_decls): Test non_zero_init.
8175         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
8176         zero-to-NULL conversions.
8177         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
8178         type that needs zero-initialization without zeros.
8179         (check_initializer_decl): Compute zero-initializer for types
8180         that require a non-trivial one.
8181         * init.c (build_forced_zero_init): New function.
8182         (build_default_init): Use it.
8183         * tree.c (zero_init_p): New function.
8184         * typeck2.c (force_store_init_value): New function.
8185         (process_init_constructor): Create non-trivial zero-initializers
8186         for array members and class fields.
8188 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
8190         * lang-specs.h: Remove redundant -lang-c++.
8192 2002-05-13  Jason Merrill  <jason@redhat.com>
8194         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
8195         (fixed_type_or_null): See through reference vars.
8196         (build_base_path): Vtable contents are constant.
8197         * typeck.c (get_member_function_from_ptrfunc): Likewise.
8199 2002-05-12  Jason Merrill  <jason@redhat.com>
8201         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
8202         structs are safe.
8204 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8206         * cp-tree.h (flag_ansi): Remove.
8207         * decl2.c (flag_ansi): Remove.
8208         (cxx_decode_option): Set flag_iso and flag_undef.
8210 2002-05-09  Jason Merrill  <jason@redhat.com>
8212         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
8213         Use subtraction rather than a bitmask to get the index.
8214         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
8216         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
8218 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
8220         * Make-lang.in (decl2.o): Update.
8221         * cp-tree.h (warn_multichar): Remove.
8222         * decl2.c: Include c-common.h.
8223         (warn_multichar): Remove.
8225 2002-05-03  Jason Merrill  <jason@redhat.com>
8227         * tree.c (build_cplus_array_type): Only const and volatile get
8228         special handling.
8230         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
8232 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
8234         ABI change, returning simple classes from functions.
8235         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
8236         TYPE_HAS_TRIVIAL_INIT_REF is false or
8237         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
8239 2002-04-30  Jason Merrill  <jason@redhat.com>
8241         PR debug/6436
8242         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
8243         anonymous class with a typedef if there are attributes.
8245 2002-04-29  Paul Eggert  <eggert@twinsun.com>
8247         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
8249 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
8251         PR c++/6477
8252         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
8253         non-NULL first.
8255 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
8257         PR c++/6492
8258         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
8259         enter that scope before name lookup.
8261         PR c++/6486
8262         * method.c (do_build_copy_constructor): Avoid building
8263         cv-qualified reference types.
8265 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
8267         PR c++/5719
8268         * decl.c (grok_op_properties): Assignment ops don't have to return
8269         by value. operator% should.
8271 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
8273         PR c/6343
8274         * decl.c (duplicate_decls): Call merge_weak.
8276 2002-04-26  Richard Henderson  <rth@redhat.com>
8278         * parse.y (malloced_yyss, malloced_yyvs): New.
8279         (yyoverflow): Re-add.  Set them.
8280         (free_parser_stacks): New.
8282 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
8284         PR c++/6497
8285         * method.c (do_build_assign_ref): Pass a derivation to
8286         build_method_call when calling base class assignment operators.
8288 2002-04-26  Richard Henderson  <rth@redhat.com>
8290         * parse.y (yyoverflow): Revert.
8292 2002-04-26  Richard Henderson  <rth@redhat.com>
8294         PR c/3581
8295         * parse.y (string): Remove.  Update all uses to use STRING
8296         instead, and not call combine_strings.
8297         * rtti.c (tinfo_name): Use fix_string_type.
8298         * semantics.c (finish_asm_stmt): Don't call combine_strings.
8299         * spew.c (yylexstring): New.
8300         (read_token): Use it.
8302 2002-04-25  Richard Henderson  <rth@redhat.com>
8304         PR c/2161
8305         * parse.y (yyoverflow): New.
8307 2002-04-25  Jason Merrill  <jason@redhat.com>
8309         PR c++/5607
8310         * search.c (check_final_overrider): No longer static.
8311         * class.c (update_vtable_entry_for_fn): Call it.
8312         * cp-tree.h: Adjust.
8314 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8316         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8317         * cp-tree.h (cxx_set_yydebug): Die.
8318         * lex.c (YYDEBUG): Get from c-lex.h.
8319         (cxx_set_yydebug): Remove.
8320         * parse.y: Include c-lex.h.
8321         (YYDEBUG): Get from c-lex.h.
8323 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
8325         PR c++/6438.
8326         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
8327         void.
8329 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
8331         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
8332         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
8333         Redefine.
8334         * cp-tree.h (cp_attribute_table): Rename.
8335         * decl.c (lang_attribute_table): Remove declaration.
8336         (cxx_init_decl_processing): Don't set it.
8337         * tree.c (cp_attribute_table): Rename.
8339 2002-04-24  Jason Merrill  <jason@redhat.com>
8341         PR c++/6331
8342         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
8343         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
8344         The pedwarn for array assignment is now unconditional.
8345         * tree.c (build_cplus_array_type_1): Still process simple array types
8346         normally in templates.
8348         PR c++/6395
8349         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
8350         stuff for comdats.
8352 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
8354         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
8355         node with attributes.
8357 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
8359         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
8360         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
8362 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
8364         PR c++/6256:
8365         * pt.c (tsubst_friend_class): Handle templates with explicit
8366         nested names.
8368         PR c++/6331:
8369         * typeck.c (merge_types): Remember the cv-qualification of pointer
8370         types when merging them.
8372 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8374         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
8375         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
8376         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
8377         cxx_mark_function_context): New.
8378         * decl.c (push_cp_function_context, pop_cp_function_context,
8379         mark_cp_function_context): Rename for consistency.
8380         (cxx_init_decl_processing): Don't set old hooks.
8382 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
8384         * call.c (convert_type_from_ellipsis): Rename, update.
8385         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
8386         * cp-tree.h (convert_type_from_ellipsis): Rename.
8387         * decl.c (cxx_init_decl_processing): Don't set hook.
8389 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8391         * call.c (build_new_method_call): Update.
8392         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
8393         * cp-tree.h (cxx_incomplete_type_error): New.
8394         * decl.c (grokdeclarator, grokparms): Update.
8395         * decl2.c (check_classfn): Update.
8396         * pt.c (tsubst): Update.
8397         * typeck.c (complete_type_or_else, expr_sizeof,
8398         decay_conversion): Update.
8399         * typeck2.c (incomplete_type_error): Rename.
8400         (add_exception_specifier): Update.
8402 2002-04-18  Jason Merrill  <jason@redhat.com>
8404         PR c++/5658
8405         * search.c (setup_class_bindings): A class template qualifies as a
8406         type binding.
8408 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
8410         PR c++/6316
8411         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
8412         before expanding.
8414 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
8416         * init.c (begin_init_stmts): Remove commented out code.
8417         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
8418         * semantics.c (begin_gobal_stmt_expr): Adjust call to
8419         expand_start_stmt_expr.
8421 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
8423         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
8424         dso_handle itself, to __cxa_atexit.
8426 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8428         * error.c (cxx_print_error_function): Adjust call to macros.
8430 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
8432         * class.c (layout_virtual_bases): Do all dsize computation on trees.
8434 2002-04-14  Jason Merrill  <jason@redhat.com>
8436         * typeck.c (get_member_function_from_ptrfunc): Don't do
8437         gratuitious division and multiplication on
8438         ptrmemfunc_vbit_in_delta targets.
8440 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8442         PR c++/5373.
8443         * semantics.c (finish_expr_stmt): Remember the type of the
8444         expression before any conversions are performed.
8446 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8448         PR c++/5189.
8449         * call.c (add_template_candidate_real): Do not treat member
8450         templates as copy constructors.
8452 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8454         * decl.c (duplicate_decls): Do not copy the RTL for a variable
8455         declaration if the old variable had an incomplete type and the new
8456         variable does not.
8457         (complete_vars): Do not call layout_decl for completed variables.
8459 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
8461         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
8462         with an explicit one.
8463         (follow_tag_typedef): New.
8464         (lookup_tag): Use it to extract the tag of an explicit typedef.
8465         (xref_tag): Likewise.
8467 2002-04-11  Andrew Haley  <aph@redhat.com>
8469         * typeck.c (type_after_usual_arithmetic_conversions):
8470         If two types have the same variant, return immediately.
8471         When two floating-point operands are the same precision:
8472           convert to float if one of the operands is float;
8473           if neither operand is one of the standard types, return the type
8474           of the first operand.
8476 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
8478         PR c++/5507
8479         * decl.c (make_typename_type): Remove implicit typenameness.
8481 2002-04-09  Jason Merrill  <jason@redhat.com>
8483         PR optimization/6189
8484         * semantics.c (genrtl_start_function): Don't free
8485         DECL_SAVED_FUNCTION_DATA for inline functions.
8487         * init.c (build_member_call): For now, don't convert to
8488         intermediate base if it would cause an error.
8490 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
8492         * parse.y (namespace_qualifier, maybe_identifier,
8493         begin_explicit_instantiation, end_explicit_instantiation,
8494         apparent_template_type, .finish_template_type,
8495         do_id, maybe_init, defarg_again, component_decl_1):
8496         Add ending ';', in accordance with POSIX.
8498 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
8500         PR c++/5571
8501         * class.c (layout_class_type): Remember incomplete static
8502         variables.
8503         (finish_struct_1): Call complete_vars, not
8504         hack_incomplete_structures.
8505         * cp-tree.h (hack_incomplete_structures): Rename to ...
8506         (complete_vars): ... this.
8507         (struct saved_scope): Remove incomplete.
8508         (namespace_scope_incomplete): Remove.
8509         * decl.c (struct binding_level): Remove incomplete.
8510         (incomplete_vars): New variable.
8511         (mark_binding_level): Don't mark incomplete.
8512         (print_binding_level): Don't print it.
8513         (mark_saved_scope): Don't mark incomplete.
8514         (pushdecl): Use maybe_register_incopmlete_var.
8515         (cxx_init_decl_processing): Register incomplete_vars for GC.
8516         (start_decl_1): Clarify error message.
8517         (hack_incomplete_vars): Remove.
8518         (maybe_register_incomplete_var): New function.
8519         (complete_vars): Likewise.
8521 2002-04-06  Jason Merrill  <jason@redhat.com>
8523         PR c++/4934
8524         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
8525         set before checking it.
8527         PR c++/525
8528         * init.c (build_member_call): Use build_scoped_ref.
8529         (resolve_offset_ref): Likewise.
8530         * call.c (build_scoped_method_call): Likewise.
8531         * tree.c (maybe_dummy_object): Kludge around current_class_type being
8532         wrong.
8533         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
8534         * cp-tree.h: Adjust.
8536         * init.c (push_base_cleanups): Just use build_scoped_method_call.
8538         PR c++/6179
8539         * method.c (implicitly_declare_fn): Pass unqualified type to
8540         synthesize_exception_spec.
8542 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8544         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8545         * cvt.c: Update comment.
8546         * init.c (expand_cleanup_for_base): Update.
8547         * semantics.c (finish_parenthesized_expr): Update.
8548         * typeck.c (cp_truthvalue_conversion): Update.
8550 2002-04-04  Jason Merrill  <jason@redhat.com>
8552         * semantics.c (finish_eh_cleanup): New fn.
8553         * cp-tree.h: Add prototype.
8554         * init.c (perform_member_init, expand_cleanup_for_base): Use
8555         finish_eh_cleanup.
8556         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
8557         * cp-tree.h: Remove references.
8558         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
8559         * dump.c (cp_dump_tree): Likewise.
8560         * pt.c (tsubst_expr): Likewise.
8561         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
8562         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
8563         * tree.c (cp_statement_code_p): Likewise.
8565         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
8567         PR c++/5636
8568         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
8569         cleanup for nrv.
8571         PR c++/5104
8572         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
8573         specifiers.
8574         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
8576 2002-04-03  Richard Henderson  <rth@redhat.com>
8578         * cp-lang.c (cxx_warn_unused_global_decl): New.
8579         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
8581 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8583         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
8584         * tree.c (init_tree): Don't set hook.
8586 2002-04-03  Roger Sayle  <roger@eyesopen.com>
8588         PR c++/5998:
8589         * decl.c (duplicate_decls): Don't mess with assembler names when
8590         redeclaring builtin functions as static.
8592 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8594         * call.c (build_addr_func): Update.
8595         * class.c (resolve_address_of_overloaded_function): Update.
8596         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8597         * cp-tree.h (cxx_mark_addressable): New.
8598         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
8599         * decl2.c (build_cleanup): Update.
8600         * except.c (build_throw): Update.
8601         * init.c (resolve_offset_ref): Update.
8602         * pt.c (convert_nontype_argument): Update.
8603         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
8604         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
8605         unary_complex_lvalue): Update.
8606         (mark_addressable): Rename.
8608 2002-04-01  Roger Sayle  <roger@eyesopen.com>
8610         PR c++/5998:
8611         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
8612         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
8613         but follow the SET_DECL_RTL idiom used elsewhere in the function.
8615 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8617         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8618         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8619         * decl.c (grokdeclarator): Update.
8620         * mangle.c (write_integer_cst): Update.
8621         * typeck.c (build_binary_op): Update.
8623 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8625         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
8626         * lex.c (cxx_init): Don't set hook.
8628 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8630         * Make-lang.in (error.o): Update.
8631         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8632         * cp-tree.h (struct diagnostic_context): Predeclare.
8633         (cxx_print_error_function): New.
8634         * error.c: Include langhooks-def.h.
8635         (lang_print_error_function): Rename.  Update.
8636         (init_error): Don't set hook.
8638 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8640         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
8641         Redefine.
8642         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
8643         * decl.c (finish_enum): Similarly.
8644         * error.c (dump_type): Similarly.
8645         * lex.c (cxx_init): Similarly.
8646         * mangle.c (write_builtin_type): Similarly.
8647         * typeck.c (comptypes): Similarly.
8649 2002-03-28  Roger Sayle  <roger@eyesopen.com>
8651         PR c++/5998:
8652         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
8653         in the g++ front-end.
8654         (duplicate_decl): Allow redefinition of anticipated built-ins.
8655         Fix inlining problem by over-writing the old DECL_RTL.
8656         (lookup_namespace_name): Fail to find an identifier in the
8657         specified namespace if its still anticipated.
8658         (builtin_function_1): New function split out from builtin_function
8659         to create a builtin in the current namespace with given context.
8660         (builtin_function): Call builtin_function_1 to define the
8661         appropriate builtins in both the std and global namespaces.
8662         (select_decl): Don't test for anticipated decls here.
8663         (unqualified_namespace_lookup): Instead ignore them whilst
8664         searching through scopes and namespaces.
8665         * decl2.c (do_nonmember_using_decl): If a using declaration
8666         specifies an anticipated built-in function, mark it as no longer
8667         anticipated in that scope.
8668         (ambiguous_decl):  Avoid resolving to an anticipated decl.
8669         * lex.c (do_scoped_id): Fail to find an identifier in the global
8670         namespace if its still anticipated.
8672 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8674         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
8675         * cp-tree.h (cp_make_lang_type): Rename.
8676         * lex.c (cp_make_lang_type): Rename.
8677         (make_aggr_type): Update.
8678         * tree.c (init_tree): Don't set make_lang_type_fn.
8680 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
8682         PR c++/6073
8683         * class.c (finish_struct_1): Update static field's DECL_MODE even
8684         if its type is a variant of t.
8686 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8688         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
8689         * cp-tree.h (cxx_insert_default_attributes): New.
8690         * decl.c (insert_default_attributes): Rename.
8692 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
8694         PR c++/4884
8695         * call.c (build_op_delete_call): Allow for the fact the placement
8696         may be a COMPOUND_EXPR.
8698 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8700         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8701         * cp-tree.h (init_cplus_expand): Remove.
8702         (cxx_expand_expr): New.
8703         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
8704         fix prototype.
8705         (init_cplus_expand): Remove.
8706         * lex.c (cxx_init): Don't call init_cplus_expand.
8708 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
8710         PR c++/4884.
8711         * init.c (build_new_1): Allow for the fact the result of
8712         build_function_call may be a COMPOUND_EXPR.
8714 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8716         PR c++/5682
8717         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
8718         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8719         (dfs_skip_nonprimary_vbases_markedp): Remove.
8720         * search.c (get_shared_vbase_if_not_primary): Remove.
8721         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
8722         (dfs_skip_nonprimary_vbases_markedp): Remove.
8723         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
8724         (dfs_marked_real_bases_queue_p): Likewise.
8726 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
8728         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8729         * cp-tree.h (cxx_mark_tree): New.
8730         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
8732 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8734         * cp-tree.h (cxx_maybe_build_cleanup): New.
8735         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
8736         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
8737         * tree.c (build_target_expr): Update.
8738         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
8740 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
8742         * decl2.c (cxx_decode_option): Handle -E.
8743         * lang-specs.h (default_compilers): Preprocess with cc1plus.
8744         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
8746 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
8748         PR c++/6037
8749         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
8751 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8753         * error.c (dump_type): Be careful about implicit typenames.
8755 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
8757         PR C++/3656
8758         * semantics.c (finish_base_specifier): Handle erronous base
8759         classes.
8761 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
8763         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
8764         REAL_IS_NOT_DOUBLE.
8766 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
8768         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
8769         an index into the vtable_entry array regardless of
8770         TARGET_PTRMEMFUNC_VBIT_LOCATION.
8772 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
8774         * tree.c (cp_cannot_inline_tree_fn): Same.
8776 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
8778         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8779         insert_block, getdecls, global_bindings_p): New.
8781 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
8783         PR c++/4361
8784         * mangle.c (struct globals) Add internal_mangling_p member.
8785         (write_template_param): Do internal mangling, if needed.
8786         (mangle_conv_op_name_for_type): Request internal mangling.
8788 2002-03-20  Jason Merrill  <jason@redhat.com>
8790         PR c++/2136
8791         * init.c (build_delete): Check access for a member op delete here.
8792         * decl2.c (delete_sanity): Not here.
8794 2002-03-19  Jason Merrill  <jason@redhat.com>
8796         PR c++/5118
8797         * class.c (get_vfield_name): Use the constructor_name.
8799 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8801         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8802         * cp-tree.h (lang_printable_name): Rename.
8803         * error.c (lang_decl_name): Use new hook.
8804         * lex.c (cxx_init): Remove old hook.
8805         * pt.c (tsubst_decl): Use new hook.
8806         * tree.c (lang_printable_name): Rename.
8808 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
8810         PR c++/3882
8811         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
8812         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
8813         only after recording the declaration.
8815 2002-03-18  Jason Merrill  <jason@redhat.com>
8817         PR c++/2039
8818         * init.c (resolve_offset_ref): Hand off to build_component_ref.
8820         PR c++/4222, c++/5995
8821         * call.c (build_over_call): Fix empty class logic.
8823         PR c++/3870
8824         * cp-tree.h (struct saved_scope): Add last_parms field.
8825         * decl.c (maybe_push_to_top_level): Save last_function_parms.
8826         (pop_from_top_level): Restore it.
8828         PR c++/4377
8829         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
8830         NON_LVALUE_EXPRs.
8832         PR c++/4003
8833         * pt.c (tsubst_friend_function): Use decl_namespace_context.
8835         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
8836         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
8837         type with a nontrivial destructor.
8839 2002-03-17  Jason Merrill  <jason@redhat.com>
8841         PR c++/4460
8842         * class.c (build_base_path): Virtual base layout is fixed in
8843         in-charge [cd]tors.
8845 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
8847         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8848         * parse.y (yyparse): Remove macro.
8850 2002-03-17  Jason Merrill  <jason@redhat.com>
8852         PR c++/5757
8853         * init.c (build_new_1): Pass the right pointer to op delete.
8855 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
8857         PR c++/4361
8858         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
8859         conversion operators go.
8860         (struct lang_decl_flags): Add template_conv_p and unused
8861         bitfields.
8862         (DECL_TEMPLATE_CONV_FN_P): New macro.
8863         * call.c (build_user_type_conversion_1): Don't check second type
8864         conversion of overload set first.
8865         * class.c (add_method): Make sure templated conversion operators
8866         all end up on slot 2.
8867         * lex.c (do_identifier): A conversion operator token might be
8868         satisfied by a templated conversion operator.
8869         * pt.c (check_explicit_specialization): Use
8870         CLASSTYPE_FIRST_CONVERSION_SLOT.
8871         (template_parm_this_level_p): New function.
8872         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
8873         * search.c (lookup_fnfields_1): Template conversions will be on
8874         the first slot.
8875         * typeck.c (build_component_ref): Preserve the type of an
8876         conversion operator name on the overload type.
8877         (build_x_function_call): Retrieve the conversion operator name.
8879 2002-03-15  Richard Henderson  <rth@redhat.com>
8881         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
8883 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
8885         * cp-tree.h (CLEANUP_DECL): Remove.
8886         (CLEANUP_EXPR): Likewise.
8887         * decl.c (destroy_local_var): Simplify.
8888         (maybe_build_cleanup): Tidy.
8889         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
8890         * semantics.c (cp_expand_stmt): Likewise.
8891         * cp/tree.c (cp_statement_code_p): Likewise.
8893 2002-03-15  Jason Merrill  <jason@redhat.com>
8895         PR c++/5857
8896         * decl.c (duplicate_decls): Use merge_types instead of common_type.
8897         * typeck.c (common_type): Just hand off to
8898         type_after_usual_arithmetic_conversions and
8899         composite_pointer_type.
8900         (merge_types): New fn.
8901         (commonparms): Use it instead of common_type.
8902         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
8903         (composite_pointer_type): Also handle attributes.
8904         * cp-tree.h: Declare merge_types.
8906         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
8907         variables.
8908         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
8910 2002-03-14  Richard Henderson  <rth@redhat.com>
8912         * decl.c: Include c-pragma.h.
8913         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
8914         * Make-lang.in: Update dependencies.
8916 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
8918         PR c++/5908
8919         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
8920         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
8922 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
8924         * mangle.c (write_builtin_type): Handle 128-bit integers even if
8925         they are not a standard integer type.
8927 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
8929         * cp-tree.h (init_init_processing): Remove declaration.
8930         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
8931         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
8933 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8935         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
8936         Define.
8937         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
8938         tree_code_length.
8939         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
8940         cplus_tree_code_name): Delete.
8941         (cxx_init): Don't call add_c_tree_codes, instead set
8942         lang_unsafe_for_reeval.  Don't try to copy into the various
8943         tree_code arrays.
8945 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
8947         PR c++/5659
8948         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
8949         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
8950         definitions.
8952 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
8954         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
8955         DR209 is now not a defect.
8956         * cp-tree.h (skip_type_access_control): Remove.
8957         * decl.c (grokdeclarator): Do type access control for friend
8958         declarations.
8959         * semantics.c (decl_type_access_control): Don't reset
8960         current_type_lookups.
8961         (save_type_access_control): Always save the lookups.
8962         (skip_type_access_control): Remove.
8963         (finish_class_definition): Don't change type_lookups.
8965 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
8967         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
8968         It is incorrect.
8969         * typeck.c (build_static_cast): Compare non-qualified types
8970         with pointer to member conversions.
8972 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
8973             Daniel Berlin  <dan@dberlin.org>
8975         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
8976         (cxx_get_alias_set): Use it.
8978 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8980         * cp-tree.h (stabilize_expr): Prototype.
8982 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8984         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
8985         conditional return void.
8987 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
8989         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
8990         * cp-tree.h (cxx_unsave): New.
8991         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
8992         (init_tree): Update.
8994 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8996         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
8997         explicit sizeof/sizeof.
8998         * decl2.c (cxx_decode_option): Likewise.
8999         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
9001 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
9003         PR c++/775
9004         * decl.c (lookup_tag): Only reject enum/class mismatch, not
9005         class/union mismatch.
9006         * parse.y (check_class_key): New function.
9007         (structsp): Call it.
9009 2002-03-01  Michael Matz  <matz@suse.de>
9011         * typeck.c (cp_pointer_int_sum): Complete inner type which is
9012         used later by size_in_bytes().
9014 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
9016         * cp-tree.h:  Require __GNUC__ to be #defined.
9017         (build_init):  Add missing prototype.
9019 2002-03-01  Jason Merrill  <jason@redhat.com>
9021         * except.c: Don't include decl.h or obstack.h.  Do include
9022         tree-inline.h.
9023         (build_throw): Destroy temporaries from the thrown
9024         expression before calling __cxa_throw.  Construct a thrown
9025         temporary directly into the exception object.
9026         (stabilize_throw_expr): New function.
9027         (wrap_cleanups_r): New function.
9028         * tree.c (stabilize_expr): New function.
9029         * init.c (build_init): New function.
9030         * Make-lang.in (cp/except.o): Adjust .h deps.
9032 2002-02-28  Jason Merrill  <jason@redhat.com>
9034         * search.c (lookup_base_r): Don't clear is_non_public just because
9035         we found a friendly scope.
9037         * decl.c (finish_function): Only warn about missing return
9038         statement with -Wreturn-type.
9040 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9042         * class.c (build_clone): Update.
9043         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9044         * cp-tree.h (cxx_dup_lang_specific_decl): New.
9045         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
9046         (copy_decl): Update.
9047         * method.c (make_thunk): Update.
9049 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9051         * decl2.c: Delete traditional-mode-related code copied from
9052         the C front end but not used, or used only to permit the
9053         compiler to link.
9055 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
9057         PR c++/4093
9058         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
9059         to void.
9061 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
9063         PR other/5746
9064         * semantics.c (finish_switch_cond): Don't call get_unwidened
9065         if error_mark_node.
9067 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
9069         PR c++/2645, DR 295
9070         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
9071         tf_keep_type_decl.
9072         (make_typename_type): Use tsubst_flags_t.
9073         * decl.c (make_typename_type): Adjust. Return non-artificial
9074         TYPE_DECLs, if required.
9075         (grokdeclarator): Simplify CVR qualification handling. Allow bad
9076         qualifiers on typedef types.
9077         * decl2.c (handle_class_head): Adjust make_typename_type call.
9078         * parse.y (nested_name_specifier): Likewise.
9079         (typename_sub0): Likewise.
9080         (typename_sub1): Likewise.
9081         * pt.c (convert_template_argument): Adjust make_typename_type
9082         return value.
9083         (tsubst): Adjust cp_build_qualified_type_real calls.
9084         (check_cv_quals_for_unify): Cope with allowing bad qualifications
9085         on template type parms.
9086         (instantiate_decl): Recheck substitutions to give warnings on bad
9087         qualifications.
9088         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
9090 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
9092         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
9094         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
9095         unless DECL_ALWAYS_INLINE.
9097 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9099         * typeck.c (cp_pointer_int_sum): Renamed from
9100         pointer_int_sum, call pointer_int_sum.
9102 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
9104         * decl.c (duplicate_decls): Return 0 if issued error about
9105         redeclaration.
9107 2002-02-19  Jason Merrill  <jason@redhat.com>
9109         ABI change: Mangle `void (A::*)() const' as
9110         M1AKFvvE, not MK1AFvvE.
9111         * mangle.c (write_function_type): Write cv-quals for member
9112         function type here.
9113         (write_pointer_to_member_type): Not here.
9115 2002-02-18  Jason Merrill  <jason@redhat.com>
9117         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
9118         (do_decl_instantiation): Likewise.
9120 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9122         PR c++/5685
9123         * decl.c (duplicate_decls): Make warning unconditional
9124         if duplicate default argument declarations are present.
9126 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
9128         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
9129         shortening.
9131 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
9133         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
9134         remove incorrect comment. Move #if 0'd code to common path. Use
9135         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
9137 2002-02-13  Jason Merrill  <jason@redhat.com>
9139         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
9140         (finish_function): Don't warn if current_function_returns_null.
9142         * typeck2.c (digest_init): Do handle values of vector type.
9144         * typeck2.c (digest_init, process_init_constructor): Treat vectors
9145         like arrays.
9147 2002-02-11  Jason Merrill  <jason@redhat.com>
9149         * parse.y (reserved_declspecs): Don't handle attributes.
9150         (reserved_typespecquals): Handle them here.
9151         * Make-lang.in (parse.c): Adjust expected conflicts.
9153 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
9155         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
9156         instead of compstmt.
9157         (compstmt_or_stmtexpr): Renamed from compstmt.
9158         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
9160 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9162         Rename instantiate_type_flags to tsubst_flags_t & expand use.
9163         * cp-tree.h (instantiate_type_flags): Rename to ...
9164         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
9165         add tf_warning flag.
9166         (instantiate_type): Adjust prototype.
9167         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
9168         do_type_instantiation, cp_build_qualified_type_real): Likewise.
9169         cp_build_qualified_type: Adjust.
9170         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
9171         tf_*.
9172         * call.c (standard_conversion): Rename itf_* to tf_*.
9173         (reference_binding): Likewise.
9174         (convert_like_real): Likewise.
9175         * cvt.c (cp_convert_to_pointer): Likewise.
9176         (convert_to_reference): Likewise.
9177         * decl.c (lookup_namespace_name): Use tf_* flags.
9178         (make_typename_type): Likewise.
9179         (grokdeclarator): Likewise.
9180         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
9181         (coerce_template_template_parms, convert_template_argument,
9182         coerce_template_parms, maybe_get_template_decl_from_type_decl,
9183         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
9184         instantiate_class_template, tsubst_template_arg_vector,
9185         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
9186         tsubst_decl, tsubst_arg_types, tsubst_function_type,
9187         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
9188         instantiate_template, fn_type_unification,
9189         resolve_overloaded_unification, verify_class_unification,
9190         unify, get_bindings_real, do_type_instantiation,
9191         regenerate_decl_from_template, instantiate_decl,
9192         tsubst_initializer_list, tsubst_enum,
9193         get_mostly_instantiated_function_type,
9194         invalid_nontype_parm_type_p): Likewise.
9195         * tree.c (cp_build_qualified_type_real): Likewise.
9196         * typeck.c (build_binary_op): Rename itf_* to tf_*.
9197         (build_ptrmemfunc): Likewise.
9198         (convert_for_assignment): Likewise.
9200 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
9202         PR c++/109
9203         * decl.c (grokdeclarator): Allow friend declarations from
9204         dependent types.
9205         * decl2.c (handle_class_head): Don't push into template parm contexts.
9206         * pt.c (push_template_decl_real): Template parm contexts are never
9207         being defined.
9209 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
9211         * class.c: Include target.h.
9212         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
9213         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
9214         bit-field layout.
9215         * Make-lang.in: Adjust deps.
9217 2002-02-05  Jason Merrill  <jason@redhat.com>
9219         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
9221 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
9223         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
9224         (finish_switch_cond): Set SWITCH_TYPE.
9226 2002-02-04  Richard Henderson  <rth@redhat.com>
9228         * method.c (use_thunk): Always initialize the block tree.  Reindent.
9229         * semantics.c (expand_body): Emit thunks after function, not before.
9231 2002-02-04  Jason Merrill  <jason@redhat.com>
9233         * decl.c (start_function): Call cplus_decl_attributes immediately
9234         after grokdeclarator.
9236         * decl.c (start_function): Combine DECL_RESULT handling code.
9238 2002-02-03  Jason Merrill  <jason@redhat.com>
9240         * xref.c: Remove.
9241         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
9242         (cp/xref.o): Remove dependencies.
9243         * class.c (finish_struct_1, check_methods): Don't call xref fns.
9244         (finish_struct_1): Likewise.
9245         * friend.c (make_friend_class): Likewise.
9246         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
9247         * spew.c (read_process_identifier): Likewise.
9249 2002-02-01  Jason Merrill  <jason@redhat.com>
9251         PR c++/4872
9252         * decl.c (finish_function): Warn about a non-void function with
9253         no return statement and no abnormal exit.
9254         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
9255         (current_function_returns_abnormally): New macro.
9256         * call.c (build_call): Set it.
9258         * typeck.c (build_component_ref): Always complain about offsetof
9259         constructs on non-PODs.  Only make it an error for members of
9260         virtual bases.
9262         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
9263         (dump_function_decl): Always dump parms.
9265         * decl2.c (finish_static_data_member_decl): Complain about a local
9266         class with a static data member.
9268         PR c++/4286
9269         * search.c (lookup_field_1): Don't xref a static data member
9270         just because we looked it up.
9272 2002-01-31  Jason Merrill  <jason@redhat.com>
9274         * Make-lang.in (parse.c): Handle .output file.
9276         PR c++/3395
9277         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
9278         not TREE_TYPE.
9279         * semantics.c (finish_class_definition): Adjust.
9281         Allow attributes in parms and casts.
9282         * parse.y (named_parm): Don't strip attrs.
9283         (declmods): Remove 'attributes' production.
9284         (nonempty_cv_qualifiers): Accept attributes.
9285         (ATTRIBUTE): Give precedence.
9286         * decl.c (groktypename): Handle attributes.
9287         (grokparms): Likewise.
9289 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
9291         * decl2.c (cxx_decode_option): Pass 0 as last argument to
9292         cpp_handle_option.
9293         * lang-specs.h: Use cpp_unique_options instead of cpp_options
9294         when used together with cc1_options.
9296 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
9298         PR c++/5132
9299         * typeck2.c (digest_init): Make sure non-array core type is
9300         instantiated.
9301         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
9302         constructor, rather than build a new one.
9303         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
9304         PURPOSE of constructor elts.
9306 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
9308         * Make-lang.in (parse.c): Adjust expected number of
9309         shift-reduce conflicts.
9310         (decl.o): Depend on diagnostic.h.
9311         * decl.c: Include diagnostic.h.
9312         (grokdeclarator): Check for null pointer.
9313         (finish_function): Don't abort when
9314         current_binding_level->parm_flag != 1, if errors have
9315         occurred; throw away the statement tree and extra binding
9316         levels, and continue.
9317         * lex.c (note_list_got_semicolon): Check for null pointer.
9318         * method.c (hack_identifier): Just return error_mark_node if
9319         value is error_mark_node.
9320         * parse.y (primary: TYPEID(type_id)): No need to use
9321         TYPE_MAIN_VARIANT here.
9322         (handler_seq): Accept an empty list of catch clauses and
9323         generate a fake handler block to avoid later crashes.
9324         (ansi_raise_identifier): Accept the error token too.
9325         * semantics.c (begin_class_definition,
9326         finish_class_definition): Check for error_mark_node.
9328 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
9330         * typeck2.c (friendly_abort): Delete definition.
9331         * cp-tree.h (friendly_abort): Don't prototype.
9332         (my_friendly_assert): Use fancy_abort.
9334 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9336         * cp-tree.h (my_friendly_abort): Remove.
9338 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
9340         * spew.c (pending_inlines, pending_inlines_tail,
9341         processing_these_inlines): Make static.
9342         (mark_pending_inlines): Remove static.
9343         (begin_parsing_inclass_inline): If in function, save pi
9344         for GC to cp_function_chain->unparsed_inlines instead.
9345         (process_next_inline): Likewise.
9346         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
9347         (mark_pending_inlines): Add prototype.
9348         * decl.c (spew_debug): Remove unused extern.
9349         (mark_lang_function): Call mark_pending_inlines.
9351 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9353         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
9354         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
9355         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
9356         Change my_fancy_abort() to abort().
9358 2002-01-23  Jason Merrill  <jason@redhat.com>
9360         PR c++/5453
9361         * class.c (fixed_type_or_null): Fix thinko.
9363         PR c++/3331
9364         * init.c (resolve_offset_ref): Use build_indirect_ref.
9366         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
9368 2002-01-22  Jason Merrill  <jason@redhat.com>
9370         * parse.y (function_body): Suppress the block for the outermost
9371         curly braces.
9372         * decl.c (pushdecl): Don't try to skip it.
9373         (begin_function_body): Keep the block we create, not the next one.
9374         * init.c (emit_base_init): Don't mess with keep_next_level.
9376         * class.c (build_base_path): Tweak formatting.
9378 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9380         Fix regression introduced with patch for c++/775
9381         * parse.y (class_head_defn): Check for template specializations
9382         with a different class-key.
9384 2002-01-17  Jason Merrill  <jason@redhat.com>
9386         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
9387         (begin_function_body): Call them and keep_next_level.
9388         * init.c (emit_base_init): Call keep_next_level.
9389         * semantics.c (setup_vtbl_ptr): Lose.
9390         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
9391         (vtbls_set_up_p): Lose.
9392         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
9393         * method.c (do_build_copy_constructor): Likewise.
9394         (synthesize_method): Call finish_mem_initializers.
9395         * parse.y (nodecls): Likewise.
9397         * error.c (dump_type_suffix): Print the exception specs before
9398         recursing.
9399         (dump_function_decl): Here, too.
9401         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
9403 2002-01-10  Ira Ruben   <ira@apple.com>
9405         PR c++/907
9406         * decl.c (start_method): Handle attrlist.
9408 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
9410         * decl2.c (max_tinst_depth): Increase default limit to 500.
9412 2002-01-10  Graham Stott  <grahams@redhat.com>
9414         * spew.c (YYCHAR): Uppercase macro parameter and add
9415         parenthesis.
9416         (YYCODE): Likewise.
9417         (NAME): Uppercase macro parameter.
9419 2002-01-09  Graham Stott  <grahams@redhat.com>
9421         * decl.h (grokdeclarator): Wrap long line.
9423         * semantics.c (FINISH_COND): Uppercase macro paramaters and
9424         add parenthesis.
9426 2002-01-08  Graham Stott  <grahams@redhat.com>
9428         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
9429         (PALLOC): Uppercase macro parameter and whitespace.
9430         (SALLOC): Uppercase macro parameter.
9431         (SFREE): Uppercase macros parameter, add parenthese and
9432         whitespace.
9433         (STREQL): Uppercase macro parameter and whitespace.
9434         (STRNEQ): Likewise.
9435         (STRLSS): Likewise.
9436         (STRLEQ): Likewise.
9437         (STRGTR): Likewise.
9438         (STRGEQ): Likewise.
9440         * call.c (convert_like): Add parenthesis and wrap.
9441         (convert_like_with_context): Likewise.
9442         (ICS_RANK): Whitespace.
9443         (NEED_TEMPORARY_P): Remove parenthesis.
9445         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
9446         whitespace.
9447         (VTT_MARKED_BINFO_P): Likewise.
9449         * decl.c (BINDING_LEVEL): Add parenthesis.
9450         (DEF_OPERATOR): Likewise.
9452         * mangle.c (MANGLE_TRACE): Add parenthesis.
9453         (MANGLE_TRACE_TREE): Likewise.
9454         (write_signed_number): Likewise.
9455         (write_unsigned_number): Likewise.
9457         * pt.c (ccat): Uppercase macro parameter.
9458         (cat): Likewise
9460         * search.c (SET_BINFO_ACCESS): Add parenthesis.
9462 2002-01-07  Jason Merrill  <jason@redhat.com>
9464         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
9465         to pedwarn.
9467         PR c++/3536
9468         * method.c (make_thunk): If !flag_weak, give the thunk the
9469         function's linkage.
9470         (use_thunk): Here, too.
9472 2002-01-07  Graham Stott  <grahams@redhat.com>
9474         * error.c: Update copyright date.
9475         (print_scope_operator): Add parenthesis.
9476         (print_left_paren): Likewise.
9477         (print_right_paren): Likewise.
9478         (print_left_bracket): Likewise.
9479         (print_right_bracket): Likewise.
9480         (print_template_argument_list_start): Likewise.
9481         (print_template_argument_list_end): Likewise.
9482         (print_non_consecutive_character): Likewise.
9483         (print_tree_identifier): Likewise.
9484         (print_identifier): Likewise.
9485         (NEXT_CODE): Uppercase macro parameter.
9486         (ident_fndecl): Delete unused.
9487         (GLOBAL_THING): Likewise.
9489 2002-01-06  Graham Stott  <grahams@redhat.com>
9491         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
9492         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
9493         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
9494         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
9495         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
9496         (C_IS_RESERVED_WORD): Uppercase macro parameter.
9497         (C_RID_YYCODE) Likewise.
9498         (ptrmem_cst): Use rtx.
9499         (LOCAL_BINDING_P): Add whitespace.
9500         (INHERITED_VALUE_BINDING_P): Likewise.
9501         (BINDING_SCOPE): Wrap long line.
9502         (BINDING_HAS_LEVEL_P): Remove parenthesis.
9503         (BINDING_VALUE): Wrap long line.
9504         (BINDING_TYPE): Whitespace.
9505         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
9506         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
9507         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
9508         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
9509         (same_type_p): Uppercase macro parameters.
9510         (same_type_ignoring_top_level_qualifiers_p): Likewise.
9511         (OVL_FUNCTION): Wrap long line.
9512         (OVL_CHAIN): Whitespace.
9513         (OVL_CURRENT): Add parenthesis and whitespace.
9514         (OVL_NEXT): Whitespace.
9515         (OVL_USED): Likewise.
9516         (IDENTIFIER_TYPE_VALUE): Likewise.
9517         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
9518         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
9519         (LANG_ID_FIELD): Whitespace.
9520         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
9521         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
9522         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
9523         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
9524         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
9525         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
9526         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
9527         (IDENTIFIER_VIRTUAL_P): Likewise.
9528         (IDENTIFIER_OPNAME_P): Likewise.
9529         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
9530         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
9531         (C_SET_EXP_ORIGINAL_CODE): Likewise.
9532         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
9533         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
9534         (IS_AGGR_TYPE): Uppercase macro parameter.
9535         (CLASS_TYPE_P): Likewise.
9536         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
9537         (IS_AGGR_TYPE_2): Whitespace.
9538         (TAGGED_TYPE_P): Uppercase macro parameter.
9539         (TYPE_BUILT_IN): Whitespace.
9540         (TYPE_FOR_JAVA): Likewise.
9541         (FUNCTION_ARG_CHAIN): Remove parenthesis.
9542         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
9543         (FUNCTION_FIRST_USER_PARAM): Likewise.
9544         (PROMOTES_TO_AGGR_TYPE): Whitespace.
9545         (DERIVED_FROM_P): Add parenthesis and wrap.
9546         (UNIQUELY_DERIVED_FROM_P): Likewise.
9547         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
9548         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
9549         (CLASSTYPE_USE_TEMPLATE): Whitespace.
9550         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
9551         (TYPE_GETS_DELETE): Add parenthesis.
9552         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
9553         (TYPE_HAS_ASSIGN_REF): Likewise,
9554         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
9555         (TYPE_HAS_INIT_REF): Likewise.
9556         (TYPE_HAS_CONST_INIT_REF): Likewise.
9557         (TYPE_BEING_DEFINED): Likewise.
9558         (TYPE_LANG_SPECIFIC): Likewise.
9559         (CLASSTYPE_RTTI): Likewise.
9560         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
9561         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
9562         (TYPE_OVERLOADS_ARROW): Likewise.
9563         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
9564         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
9565         (CLASSTYPE_METHOD_VEC): Likewise.
9566         (CLASSTYPE_MARKED_N): Likewise.
9567         (CLASSTYPE_MARKED): Likewise.
9568         (CLASSTYPE_MARKED2): Likewise.
9569         (CLASSTYPE_MARKED3): Likewise.
9570         (CLASSTYPE_MARKED4): Likewise.
9571         (CLASSTYPE_MARKED5): Likewise.
9572         (CLASSTYPE_MARKED6): Likewise.
9573         (SET_CLASSTYPE_MARKED): Whitespace.
9574         (CLEAR_CLASSTYPE_MARKED): Likewise.
9575         (SET_CLASSTYPE_MARKED2): Likewise.
9576         (CLEAR_CLASSTYPE_MARKED2): Likewise.
9577         (SET_CLASSTYPE_MARKED3): Likewise.
9578         (CLEAR_CLASSTYPE_MARKED3): Likewise.
9579         (SET_CLASSTYPE_MARKED4): Likewise.
9580         (CLEAR_CLASSTYPE_MARKED4): Likewise.
9581         (SET_CLASSTYPE_MARKED5): Likewise.
9582         (CLEAR_CLASSTYPE_MARKED5): Likewise.
9583         (SET_CLASSTYPE_MARKED6): Likewise.
9584         (CLEAR_CLASSTYPE_MARKED6): Likewise.
9585         (CLASSTYPE_TAGS): Likewise.
9586         (CLASSTYPE_VSIZE): Likewise.
9587         (CLASSTYPE_VBASECLASSES): Likewise.
9588         (CANONICAL_BINFO): Add parenthesis.
9589         (CLASSTYPE_SIZE(NODE): Likewise.
9590         (CLASSTYPE_SIZE_UNIT): Likewise.
9591         (CLASSTYPE_ALIGN(NODE): Likewise.
9592         (CLASSTYPE_USER_ALIGN): Likewise.
9593         (TYPE_JAVA_INTERFACE): Likewise.
9594         (CLASSTYPE_PURE_VIRTUALS): Likewise.
9595         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
9596         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
9597         (CLASSTYPE_HAS_MUTABLE): Likewise.
9598         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
9599         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
9600         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
9601         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
9602         (CLASSTYPE_INTERFACE_ONLY): Likewise.
9603         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
9604         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9605         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
9606         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
9607         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
9608         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
9609         (BINFO_UNSHARED_MARKED): Whitespace.
9610         (BINFO_MARKED): Whitespace and wrap.
9611         (SET_BINFO_MARKED): Likewise.
9612         (CLEAR_BINFO_MARKED): Likewise.
9613         (BINFO_VTABLE_PATH_MARKED): Likewise.
9614         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
9615         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
9616         (BINFO_SUBVTT_INDEX): Remove parenthesis.
9617         (BINFO_VPTR_INDEX): Likewise.
9618         (BINFO_PRIMARY_BASE_OF): Likewise,
9619         (CLASSTYPE_VFIELDS): Whitespace.
9620         (VF_DERIVED_VALUE): Wrap long line.
9621         (NAMESPACE_LEVEL): Whitespace.
9622         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
9623         (DEFARG_POINTER): Whitespace.
9624         (DECL_NEEDED_P): Remove parenthesis.
9625         (DECL_LANGUAGE): Whitespace.
9626         (SET_DECL_LANGUAGE): Add parenthesis.
9627         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
9628         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
9629         (DECL_IN_AGGR_P): Whitespace.
9630         (DECL_FRIEND_P): Likewise.
9631         (DECL_BEFRIENDING_CLASSES): Likewise.
9632         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
9633         (DECL_NONCONVERTING_P): Whitespace.
9634         (DECL_PURE_VIRTUAL_P): Likewise.
9635         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
9636         (DECL_PENDING_INLINE_INFO): Whitespace.
9637         (DECL_SORTED_FIELDS): Likewise.
9638         (DECL_DEFERRED_FN): Likewise.
9639         (DECL_TEMPLATE_INFO): Likewise.
9640         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
9641         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
9642         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
9643         (TMPL_ARGS_LEVEL): Likewise.
9644         (SET_TMPL_ARGS_LEVEL): Likewise.
9645         (INNERMOST_TEMPLATE_PARMS): Whitespace.
9646         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
9647         (INTEGRAL_CODE_P(CODE): Add parenthesis.
9648         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
9649         (TYPE_HAS_CONSTRUCTOR): Whitespace.
9650         (TREE_HAS_CONSTRUCTOR): Likewise.
9651         (TYPE_HAS_DESTRUCTOR): Likewise.
9652         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
9653         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
9654         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
9655         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
9656         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
9657         (TYPE_PTRMEMFUNC_P): Likewise.
9658         (TYPE_PTRMEMFUNC_FLAG): Likewise.
9659         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
9660         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
9661         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
9662         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
9663         (DECL_ACCESS): Whitespace.
9664         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
9665         (DECL_GLOBAL_DTOR_P): Likewise.
9666         (GLOBAL_INIT_PRIORITY): Likewise.
9667         (DECL_TEMPLATE_PARMS): Likewise.
9668         (DECL_TEMPLATE_RESULT): Likewise.
9669         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
9670         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
9671         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
9672         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
9673         (PRIMARY_TEMPLATE_P): Add parenthesis.
9674         (DECL_USE_TEMPLATE): Whitespace.
9675         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9676         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
9677         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9678         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
9679         (CALL_DECLARATOR_PARMS): Remove parenthesis.
9680         (CALL_DECLARATOR_QUALS): Likewise.
9681         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
9682         (TEMP_NAME_P): Wrap.
9683         (VFIELD_NAME_P): Likewise.
9684         (B_SET): Uppercase macro parameters and add parenthesis.
9685         (B_CLR): Likewise.
9686         (B_TST): Likewise.
9687         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
9688         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
9689         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
9690         (same_or_base_type_p): Likewise.
9691         (cp_deprecated): Likewise.
9693 2002-01-05  Richard Henderson  <rth@redhat.com>
9695         * semantics.c (expand_body): Revert last change.
9697 2002-01-04  Jason Merrill  <jason@redhat.com>
9699         PR c++/4122
9700         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
9701         lost primary.
9703         * class.c (build_vtbl_initializer): Check for a lost primary
9704         before calculating the vtable entry to throw away.
9706 2002-01-02  Jason Merrill  <jason@redhat.com>
9708         * semantics.c (expand_body): Call outlining_inline_function when
9709         emitting an inline function out of line.
9711 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9713         PR c++/5116, c++/764 reversion
9714         * call.c (build_new_op): Revert the instantiations. They are
9715         incorrect.
9717 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9719         PR c++/5089
9720         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
9722 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9724         PR c++/3716
9725         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
9726         (tsubst, case POINTER_TYPE): Handle pmfs here.
9727         (tsubst, case OFFSET_TYPE): Check it is not an offset to
9728         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
9730 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9732         PR c++/35
9733         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
9734         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
9735         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
9736         PARM_DECL.
9737         (tsubst_template_parms): Break up loop statements.
9738         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
9739         parm PARM_DECLs don't get promoted.
9741 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9743         PR c++/5123
9744         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
9745         (build_x_function_call): Cope with a COMPONENT_REF containing a
9746         TEMPLATE_ID_EXPR.
9748 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9750         PR c++/5213
9751         * pt.c (convert_template_argument): Be more careful determining
9752         when RECORD_TYPE templates are or are not templates.
9754 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9756         PR c++/775
9757         * cp-tree.h (handle_class_head): Adjust prototype.
9758         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
9759         parameters. Use for all class heads.
9760         * parse.y (named_class_head_sans_basetype, named_class_head,
9761         named_complex_class_head_sans_basetype,
9762         named_class_head_sans_basetype_defn,
9763         unnamed_class_head): Remove.
9764         (class_head, class_head_apparent_template): Recognize class heads
9765         (class_head_decl, class_head_defn): New reductions. Process class
9766         heads.
9767         (structsp): Adjust class definition and class declaration
9768         reductions.
9769         (maybe_base_class_list): Give diagnostic on empty list.
9771 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9773         PR c++/4379
9774         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
9775         single non-static member.
9776         (unary_complex_lvalue): If it cannot be a pointer to member, don't
9777         make it so. Check it is not pointer to reference.
9779 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9781         PR c++/5132
9782         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
9783         are processing a template decl.
9785 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
9787         PR c++/5116, c++/764
9788         * call.c (build_new_op): Make sure template class operands are
9789         instantiated. Simplify arglist construction.
9791 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
9793         * call.c (build_user_type_conversion_1): Use my_friendly_assert
9794         rather than if ... abort.
9795         * cvt.c (convert_to_reference): Likewise.
9796         * semantics.c (setup_vtbl_ptr): Likewise.
9797         * pt.c (lookup_template_class): Comment typo.
9799 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
9801         PR c++/5125
9802         * pt.c (push_template_decl_real): Make sure DECL has
9803         DECL_LANG_SPECIFIC.
9805 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
9807         PR c++/335
9808         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
9809         for non-reference fields.
9810         * typeck.c (require_complete_type): Use resolve_offset_ref).
9812 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
9814         PR c++/196
9815         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
9817 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
9819         PR c++/160
9820         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
9821         up. Don't stabilize_references when initializing a reference.
9823 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9825         * decl2.c (lang_f_options): Const-ify.
9827 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
9829         * config-lang.in (diff_excludes): Remove.
9831 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
9833         PR c++/90
9834         * typeck.c (build_function_call_real): Use original function
9835         expression for errors.
9837 2001-12-18  Jason Merrill  <jason@redhat.com>
9839         PR c++/3242
9840         * class.c (add_method): Do compare 'this' quals when trying to match a
9841         used function.  Don't defer to another used function.
9843 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
9845         * pt.c (instantiate_clone): Remove, fold into ...
9846         (instantiate_template): ... here. Simplify by removing mutual
9847         recursion.
9848         * typeck2.c (build_m_component_ref): Don't cv qualify the function
9849         pointed to by a pointer to function.
9850         * class.c (delete_duplicate_fields_1): Typo.
9852 2001-12-18  Jason Merrill  <jason@redhat.com>
9854         C++ ABI change: destroy value arguments in caller.
9855         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
9856         create an extra binding level for the parameters.
9857         * decl.c (store_parm_decls): Don't do parameter cleanups.
9859 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
9861         * call.c (build_new_method_call): Use '%#V'.
9862         * error.c (cv_to_string): Use V parameter to determine padding.
9864 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
9866         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
9867         spellings in messages.
9869 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
9871         * cp-tree.h: Delete #defines for cp_error, cp_warning,
9872         cp_pedwarn, and cp_compiler_error.
9873         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
9874         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
9875         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
9876         typeck2.c: Change calls to the above macros to use their
9877         language-independent equivalents: error, warning, pedwarn, and
9878         internal_error respectively.
9880 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
9882         * decl2.c (finish_file): Remove back_end_hook.
9884 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
9886         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
9887         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
9888         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
9890 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
9892         * lang-options.h: Use American spelling in messages.
9894 2001-12-13  Jason Merrill  <jason@redhat.com>
9896         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
9898         Use cleanups to run base and member destructors.
9899         * init.c (push_base_cleanups): New function, split out from...
9900         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
9901         * decl.c (finish_destructor_body): Move vbase destruction code to
9902         push_base_cleanups.
9903         (begin_function_body, finish_function_body): New fns.
9904         (finish_function): Move [cd]tor handling and call_poplevel to
9905         finish_function_body.
9906         (pushdecl): Skip the new level.
9907         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
9908         (setup_vtbl_ptr): Call push_base_cleanups.
9909         * method.c (synthesize_method): Call {begin,end}_function_body.
9910         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
9911         * cp-tree.h: Declare new fns.
9912         * parse.y (function_body, .begin_function_body): New nonterminals.
9913         (fndef, pending_inline, function_try_block): Use function_body.
9914         (ctor_initializer_opt, function_try_block): No longer has a value.
9915         (base_init): Remove .set_base_init token.
9916         (.set_base_init, compstmt_or_error): Remove.
9917         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
9919         * optimize.c (maybe_clone_body): Fix parameter updating.
9921 2001-12-12  Jason Merrill  <jason@redhat.com>
9923         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
9924         * semantics.c (genrtl_start_function): Don't pass
9925         parms_have_cleanups or push an extra binding level.
9926         (genrtl_finish_function): Lose cleanup_label cruft.
9928         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
9929         (ctor_label): Remove.
9930         * semantics.c (finish_return_stmt): Lose ctor_label support.
9931         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
9932         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
9933         dtor_label.
9935         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
9936         check for [cd]tors.
9937         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
9939         * decl.c (finish_function): Check VMS_TARGET, not VMS.
9941         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
9942         (end_cleanup_fn): And poplevel.
9944         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
9945         if we're in a template.
9947 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
9949         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
9950         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
9951         THIS_NAME_P): Delete.
9952         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
9953         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
9954         with internal naming scheme.
9955         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
9957 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
9959         * decl.c (grokdeclarator): Deprecated implicit typename use.
9961 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
9963         PR g++/51
9964         * parse.y (frob_specs): Indicate it is a language linkage which
9965         contained the extern.
9966         * decl.c (grokdeclarator): Allow extern language linkage with
9967         other specifiers.
9969 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
9971         PR g++/72
9972         * decl.c (add_binding): Don't reject duplicate typedefs involving
9973         template parameters.
9975 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
9977         * parse.y, semantics.c: Similarly.
9979 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
9981         PR g++/87
9982         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
9983         (copy_args_p): Rename to ...
9984         (copy_fn_p): ... here.
9985         (grok_special_member_properties): New function.
9986         (grok_op_properties): Lose VIRTUALP parameter.
9987         (copy_assignment_arg_p): Remove.
9988         * call.c (build_over_call): Use copy_fn_p.
9989         * decl.c (grokfndecl): Reformat. Adjust call to
9990         grok_op_properties.
9991         (copy_args_p): Rename to ...
9992         (copy_fn_p): ... here. Reject template functions. Check for pass
9993         by value.
9994         (grok_special_member_properties): Remember special functions.
9995         (grok_ctor_properties): Don't remember them here, just check.
9996         (grok_op_properties): Likewise.
9997         (start_method): Call grok_special_member_properties.
9998         * decl2.c (grokfield): Likewise.
9999         (copy_assignment_arg_p): Remove.
10000         (grok_function_init): Don't remember abstract assignment here.
10001         * pt.c (instantiate_class_template): Call
10002         grok_special_member_properties.
10003         (tsubst_decl): Adjust grok_op_properties call.
10005 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
10007         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
10008         RID_TYPES_COMPATIBLE_P.
10010 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10012         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
10013         call to build_aggr_init.
10014         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
10016 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
10018         * parse.y: Replace uses of the string non-terminal with STRING.
10019         Don't perform string concatentaion here.
10020         (string): Remove non-terminal.
10021         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
10023 2001-12-05  Jason Merrill  <jason@redhat.com>
10025         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
10026         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
10027         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
10028         * pt.c (push_tinst_level): No longer static.
10029         * cp-tree.h: Declare them.
10031         * init.c (resolve_offset_ref): Don't check access for the base
10032         conversion to access a FIELD_DECL.
10034         * cp-tree.h (TYPE_REFFN_P): New macro.
10035         * decl.c (bad_specifiers): Check it, too.
10037         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
10038         on the __*_type_info type if we haven't seen a definition.
10040 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
10042         * decl.c: Include c-common.h.
10043         (shadow_warning): Move to c-common.c.
10045 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10047         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
10049 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10051         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
10053 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
10055         PR g++/164
10056         * init.c (sort_base_init): Allow binfos to be directly specified.
10057         * method.c (do_build_copy_constructor): Explicitly convert to the
10058         base instance.
10059         (do_build_assign_ref): Likewise.
10061 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
10063         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
10064         declaration and initialization.
10066 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
10068         * typeck2.c: Remove leading capital from diagnostic messages, as
10069         per GNU coding standards.
10071 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
10073         PR c++/3394
10074         * decl.c (xref_basetypes): Handle attributes between
10075         'class' and name.
10077 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
10079         PR g++/3381
10080         * parse.y (named_complex_class_head_sans_basetype): Add new
10081         reduction.
10082         * Make-lang.in (parse.c): Adjust expected conflict count.
10084 2001-12-03  Jason Merrill  <jason@redhat.com>
10086         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
10087         immediate binfos for our virtual bases.
10089 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
10091         * call.c (build_java_interface_fn_ref): Similarly.
10092         * except.c (is_admissible_throw_operand): Similarly.
10093         * init.c (build_java_class_ref): Similarly.
10094         * xref.c (open_xref_file): Similarly.
10096 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
10098         * class.c (finish_struct): Remove trailing periods from messages.
10099         * decl.c (check_tag_decl): Similarly.
10100         * lex.c (cxx_set_yydebug): Similarly.
10101         * typeck2.c (friendly_abort): Similarly.
10103 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10105         PR c++/3048
10106         * cp-tree.h (ovl_member): Remove.
10107         * decl2.c (merge_functions): Handle extern "C" functions
10108         specially.
10109         * tree.c (ovl_member): Remove.
10111 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10113         PR c++/4842
10114         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
10115         FUNCTION_DECL, as input.
10116         (mark_overriders): Remove.
10117         (warn_hidden): Rework for the new ABI.
10119 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
10121         PR c++/3471
10122         * call.c (convert_like_real): Do not build additional temporaries
10123         for rvalues of class type.
10125 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
10127         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
10128         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
10129         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
10130         (DERIVED_FROM_P): Likewise.
10131         (enum base_access): Renumber, add ba_quiet bit mask.
10132         (get_binfo): Remove.
10133         (get_base_distance): Remove.
10134         (binfo_value): Remove.
10135         (ACCESSIBLY_DERIVED_FROM_P): Remove.
10136         * call.c (standard_conversion): Use lookup_base.
10137         * class.c (strictly_overrides): Likewise.
10138         (layout_virtual_bases): Likewise.
10139         (warn_about_ambiguous_direct_bases): Likewise.
10140         (is_base_of_enclosing_class): Likewise.
10141         (add_vcall_offset_vtbl_entries_1): Likewise.
10142         * cvt.c (build_up_reference): Adjust comment.
10143         * init.c (build_member_call): Reformat.
10144         * search.c (get_binfo): Remove.
10145         (get_base_distance_recursive): Remove.
10146         (get_base_distance): Remove.
10147         (lookup_base_r): Tweak.
10148         (lookup_base): Add ba_quiet control. Complete the types here.
10149         (covariant_return_p): Use lookup_base.
10150         * tree.c (binfo_value): Remove.
10151         (maybe_dummy_object): Use lookup_base.
10152         * typeck.c (build_static_cast): Use lookup_base.
10153         (get_delta_difference): Likewise.
10154         * typeck2.c (binfo_or_else): Use lookup_base.
10155         (build_scoped_ref): Add back error_mark_check.
10156         (build_m_component_ref): Use lookup_base.
10158 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10160         * Make-lang.in (c++.generated-manpages): New dummy target.
10162 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10164         * Make-lang.in (cp-lang.o): Depends on c-common.h.
10165         * cp-lang.c (c-common.h): Include.
10166         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
10167         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
10168         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
10170 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
10172         * decl2.c (c_language): Move to c-common.c.
10173         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
10174         functions.
10175         (cxx_init): Update.
10177 2001-11-26  Jason Merrill  <jason@redhat.com>
10179         * call.c (joust): Remove COND_EXPR hack.
10181 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
10183         * search.c (lookup_base_r): Declare bk in variable declaration
10184         space.
10186 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
10188         PR g++/3145
10189         * class.c (build_vbase_pointer): Remove.
10190         (build_vbase_path): Remove.
10191         (build_base_path): New function.
10192         * cp-tree.h (base_access, base_kind): New enumerations.
10193         (build_base_path): Declare.
10194         (convert_pointer_to_real): Remove.
10195         (convert_pointer_to): Remove.
10196         (lookup_base): Declare.
10197         (convert_pointer_to_vbase): Remove.
10198         * call.c (build_scoped_method_call): Use lookup_base &
10199         build_base_path instead of convert_pointer_to_real,
10200         get_base_distance & get_binfo.
10201         (build_over_call): Likewise.
10202         * cvt.c (cp_convert_to_pointer): Likewise.
10203         (convert_to_pointer_force): Likewise.
10204         (build_up_reference): Likewise.
10205         (convert_pointer_to_real): Remove.
10206         (convert_pointer_to): Remove.
10207         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
10208         instead of convert_pointer_to_vbase & build_vbase_path.
10209         (emit_base_init): Use build_base_path instead of
10210         convert_pointer_to_real.
10211         (expand_virtual_init): Lose unrequired conversions.
10212         (resolve_offset_ref): Use lookup_base and build_base_path
10213         instead of convert_pointer_to.
10214         * rtti.c (build_dynamic_cast_1): Use lookup_base &
10215         build_base_path instead of get_base_distance & build_vbase_path.
10216         * search.c (get_vbase_1): Remove.
10217         (get_vbase): Remove.
10218         (convert_pointer_to_vbase): Remove.
10219         (lookup_base_r): New function.
10220         (lookup_base): New function.
10221         * typeck.c (require_complete_type): Use lookup_base &
10222         build_base_path instead of convert_pointer_to.
10223         (build_component_ref): Likewise.
10224         (build_x_function_call): Likewise.
10225         (get_member_function_from_ptrfunc): Likewise.
10226         (build_component_addr): Likewise.
10227         * typeck2.c (build_scoped_ref): Likewise.
10229 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10231         * cp-tree.h (CP_TYPE_QUALS): Removed.
10232         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
10233         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
10234         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
10235         * dump.c (cp_dump_tree): Use void* dump_info argument to match
10236         lang-hooks prototype.
10237         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
10238         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
10239         CP_TYPE_QUALS changed to cp_type_quals.
10240         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
10241         (CXX_C_OBJS): Remove c-dump.o.
10243 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
10245         PR c++/3637
10246         * pt.c (lookup_template_class): Ensure that all specializations
10247         are registered on the list corresponding to the most general
10248         template.
10250 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
10252         * call.c (non_reference): Add documentation.
10253         (convert_class_to_reference): Do not strip reference types
10254         from conversion operators.
10255         (maybe_handle_ref_bind): Simplify.
10256         (compare_ics): Correct handling of references.
10258 2001-11-19  John Wilkinson <johnw@research.att.com>
10260         * dump.c (dump_op): New function.
10261         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
10262         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
10263         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
10265 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
10267         PR4629
10268         * semantics.c (finish_sizeof): Make sure that expression created
10269         while processing a template do not have a type.
10270         (finish_alignof): Likewise.
10271         * typeck.c (c_sizeof): Likewise.
10272         (expr_sizeof): Likewise.
10274 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
10276         * lex.c (cxx_finish): Call c_common_finish.
10277         (finish_parse): Remove.
10279 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10281         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
10282         when displaying error message about missing array bounds.
10284 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10286         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
10287         CONST_CAST_EXPR.
10288         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
10290 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
10292         * cp-tree.h (print_class_statistics): Restore.
10294 2001-11-15  Jason Merrill  <jason@redhat.com>
10296         * method.c (use_thunk): Don't emit debugging information for thunks.
10298         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
10299         * decl.c (make_typename_type): Handle getting a class template.
10300         * search.c (lookup_field_r): A class template is good enough for
10301         want_type.
10303         * call.c (convert_like_real): Only use cp_convert for the bad part.
10304         (standard_conversion): Also allow bad int->enum.
10305         * typeck.c (ptr_reasonably_similar): Also allow functions to
10306         interconvert.  Pointers to same-size integers are reasonably
10307         similar.
10309         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
10310         give it void type.
10312 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
10314         PR g++/3154
10315         * init.c (sort_base_init): Remove unreachable code.
10316         (expand_member_init): Adjust comment to reflect reality. Simplify
10317         and remove unreachable code.
10319 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
10321         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
10322         (cxx_init): Update prototype.
10323         * decl.c (init_decl_processing): Rename.  Move null node init
10324         to its creation time.
10325         * lex.c (cxx_init_options): Update.
10326         (cxx_init): Combine with old init_parse; also call
10327         cxx_init_decl_processing.
10329 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
10331         * decl.c (check_initializer): Try to complete the type of an
10332         array element before checking whether it's complete.  Don't
10333         complain about arrays with complete element types but an
10334         unknown size.
10335         (cp_finish_decl): Build the hierarchical constructor before
10336         calling maybe_deduce_size_from_array_init.
10338 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
10340         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
10342 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
10344         PR g++/4206
10345         * parse.y (already_scoped_stmt): Remove.
10346         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
10348 2001-11-12  H.J. Lu <hjl@gnu.org>
10350         * cvt.c (ocp_convert): Don't warn the address of a weak
10351         function is always `true'.
10353 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10355         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
10356         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
10357         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
10358         * cp-tree.h (print_class_statistics): Remove.
10359         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
10360         cxx_print_identifier, cxx_set_yydebug): New.
10361         * lex.c (set_yydebug): Rename c_set_yydebug.
10362         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
10363         lang_print_xnode): Rename.
10364         * tree.c (print_lang_statistics): Rename.
10366 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10368         * class.c (dump_array): Fix format specifier warning.
10370 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
10372         * cp-lang.c (LANG_HOOKS_NAME): Override.
10373         (struct lang_hooks): Constify.
10374         * lex.c (cxx_init_options): Update.
10375         (lang_identify): Remove.
10376         * parse.y (language_string): Remove.
10378 2001-11-08  Andreas Franck  <afranck@gmx.de>
10380         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
10381         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
10382         suggested by autoconf.
10383         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
10384         (c++.install-common): Use the transformed target alias names.
10386 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10388         * Make-lang.in: Update.
10389         * cp-lang.c: Include langhooks-def.h.
10391 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10393         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
10395 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10397         * lex.c (copy_lang_type): Add static prototype.
10399 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10401         * pt.c (unify): Handle SCOPE_REF.
10403 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
10405         * tree.c (cp_copy_res_decl_for_inlining): Adjust
10406         DECL_ABSTRACT_ORIGIN for the return variable.
10408 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
10410         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
10412 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
10414         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
10415         semantics.c, spew.c: Fix spelling errors.
10417 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10419         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
10421 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
10423         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
10424         pop_everything.
10426 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10428         * cp-lang.c (cxx_get_alias_set): New function.
10429         Point LANG_HOOKS_GET_ALIAS_SET to it.
10431 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10433         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
10434         * cp-tree.h (make_unbound_class_template): Prototype new function.
10435         * decl.c (make_unbound_class_template): New function.
10436         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
10437         * error.c (dump_type): Likewise.
10438         * mangle.c (write_type): Likewise.
10439         * parse.y (template_parm): Likewise.
10440         (template_argument): Use make_unbound_class_template.
10441         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
10442         (tsubst): Likewise.
10443         (tsubst_copy): Likewise.
10444         (unify): Likewise.
10445         * tree.c (walk_tree): Likewise.
10446         * typeck.c (comptypes): Likewise.
10448 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10450         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
10451         extra calls into fewer ones.
10453 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
10455         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
10456         Warn when merging inline with attribute noinline.
10457         (start_decl, start_function): Warn if inline and attribute
10458         noinline appear in the same declaration.
10460 2001-10-16  H.J. Lu <hjl@gnu.org>
10462         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
10463         for tree checking disabled.
10465 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
10467         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
10468         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
10470 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
10472         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
10473         (unify): Only handle MINUS_EXPR specially if the above flag is set
10474         and the subtracted constant is 1.  Clear the flag on recursive calls.
10475         Set it when unifying the maximum value in an INTEGER_TYPE's range.
10477 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
10479         * decl.c (bad_specifiers): Don't allow exception specifications
10480         on any typedefs.
10482 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
10484         * cp/lex.c (init_cp_pragma): Similarly.
10486 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10488         * pt.c (lookup_template_class): Build complete template arguments
10489         for BOUND_TEMPLATE_TEMPLATE_PARM.
10491 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10493         * cp-tree.h (TYPE_BINFO): Update comment.
10494         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
10495         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
10496         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
10497         (copy_type): Prototype new function.
10498         * lex.c (copy_lang_decl): Gather tree node statistics.
10499         (copy_lang_type): New function.
10500         (copy_type): Likewise.
10501         (cp_make_lang_type): Create lang_type for
10502         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
10503         and BOUND_TEMPLATE_TEMPLATE_PARM.
10504         * pt.c (tsubst): Use copy_type instead of copy_node.
10505         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
10507 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10509         * pt.c (determine_specialization): Ignore functions without
10510         DECL_TEMPLATE_INFO.
10512 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
10514         PR g++/4476
10515         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
10517 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
10519         * typeck2.c (store_init_value): Don't re-digest a bracketed
10520         initializer.
10522         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
10523         ANON_AGGR_TYPE_P.
10525 2001-10-11  Richard Henderson  <rth@redhat.com>
10527         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
10528         of an asm statement.
10529         (build_vtbl_ref_1): Split out from build_vtbl_ref.
10530         (build_vfn_ref): Use it to handle vtable descriptors before
10531         calling build_vtable_entry_ref.
10532         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
10534 2001-10-10  Richard Henderson  <rth@redhat.com>
10536         * parse.y (asm_operand): Allow named operands.
10537         * semantics.c (finish_asm_stmt): Tweek for changed location
10538         of the operand constraint.
10540 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
10542         * call.c (standard_conversion): Add bad conversion between
10543         integers and pointers.
10544         (convert_like_real): Don't use convert_for_initialization for bad
10545         conversions; complain here and use cp_convert.
10546         (build_over_call): Don't handle bad conversions specially.
10547         (perform_implicit_conversion): Allow bad conversions.
10548         (can_convert_arg_bad): New fn.
10549         * cp-tree.h: Declare it.
10550         * typeck.c (convert_for_assignment): Use it.
10551         (ptr_reasonably_similar): Any target type is similar to void.
10553 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
10555         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
10556         (cp/cp-lang.o): New rule.
10557         * cp-tree.h: Declare hooks.
10558         * tree.c: Make hooks non-static.
10559         (init_tree): Don't initialize hooks here.
10560         * lex.c: Likewise.  Move definition of lang_hooks to...
10561         * cp-lang.c: ... new file.
10563 2001-10-08  Richard Henderson  <rth@redhat.com>
10565         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
10566         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
10568 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10570         * class.c (build_vtable_entry_ref): Const-ify.
10571         * decl.c (predefined_identifier,
10572         initialize_predefined_identifiers): Likewise.
10573         * init.c (build_new_1): Likewise.
10574         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
10575         Likewise.
10577 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
10579         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
10580         (INSNS_PER_STMT): Likewise.
10581         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
10582         (copy_body, initialize_inlined_parameters): Likewise.
10583         (declare_return_variable, inlinable_function_p): Likewise.
10584         (expand_call_inline, expand_calls_inline): Likewise.
10585         (optimize_inline_calls, clone_body): Likewise.
10586         * tree.c (walk_tree): Moved to ../tree-inline.c.
10587         (walk_tree_without_duplicates): Likewise.
10588         (copy_tree_r, remap_save_expr): Likewise.
10590 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
10592         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
10593         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
10594         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
10595         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
10596         (flag_inline_trees): Moved declaration to ../tree-inline.h.
10597         (walk_tree): Moved declaration to ../tree-inline.h.
10598         (walk_tree_without_duplicates, copy_tree_r): Likewise.
10599         (remap_save_expr): Likewise.
10600         * decl.c: Include tree-inline.h.
10601         (lang_mark_tree): Don't mark inlined_fns.
10602         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
10603         * optimize.c: Include tree-inline.h.
10604         (optimize_inline_calls): Move declaration to ../tree.h, as
10605         non-static.
10606         (remap_decl): Use language-independent constructs and hooks.
10607         (remap_block, copy_body_r, declare_return_variable): Likewise.
10608         (inlinable_function_p): Likewise.  Don't test for
10609         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
10610         no longer language-specific.
10611         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
10612         call of dump_function to...
10613         (optimize_function): Here...
10614         (clone_body): New function, extracted from...
10615         (maybe_clone_body): ... here.  Build decl_map locally and pass
10616         it on to clone_body.
10617         * pt.c, semantics.c: Include tree-inline.h.
10618         * tree.c: Likewise.
10619         (cp_walk_subtrees): New language-specific hook for tree inlining.
10620         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
10621         cp_is_overload_p, cp_auto_var_in_fn_p,
10622         cp_copy_res_decl_for_inlining): Likewise.
10623         (walk_tree): Move language-specific constructs into...
10624         (cp_walk_subtrees): this new function.
10625         (copy_tree_r): Use language-independent constructs and hooks.
10626         (init_tree): Initialize tree inlining hooks.
10627         (remap_save_expr): Adjust prototype so that the declaration
10628         does not require the definition of splay_tree.
10630 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10632         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
10633         to build the declaration instead of the declaration itself.
10635 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
10637         * decl2.c (cxx_decode_option): Add 'else'.
10639         * spew.c (end_input): No longer static.
10640         * cp-tree.h: Declare it.
10641         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
10643 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10645         * call.c (build_over_call), typeck.c (build_function_call_real):
10646         Pass type attributes to check_function_format rather than name or
10647         assembler name.  Don't require there to be a name or assembler
10648         name to check formats.
10650 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10652         * decl.c (init_decl_processing): Don't call
10653         init_function_format_info.  Initialize lang_attribute_table
10654         earlier.
10655         (builtin_function): Call decl_attributes.
10656         (insert_default_attributes): New.
10658 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
10660         * decl.c (grokdeclarator): Copy array typedef handling from C
10661         frontend.
10663         * decl.c (grokdeclarator): Copy too-large array handling from C
10664         frontend.
10666 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
10668         * config-lang.in (target_libs): Added target-gperf, so that we
10669         don't try to build it if C++ is disabled.
10671 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
10673         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
10674         (cp/errfn.o): Delete rule.
10675         (cp/error.o): Depend on flags.h.
10676         * errfn.c: Delete file.
10677         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
10678         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
10679         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
10680         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
10681         internal_error respectively.  Make cp_deprecated into a macro.
10682         Don't define cp_printer typedef or declare cp_printers.
10683         * error.c: Include flags.h.
10684         Delete: struct tree_formatting_info, print_function_argument_list,
10685         print_declaration, print_expression, print_function_declaration,
10686         print_function_parameter, print_type_id, print_cv_qualifier_seq,
10687         print_type_specifier_seq, print_simple_type_specifier,
10688         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
10689         print_parameter_declaration_clause, print_exception_specification,
10690         print_nested_name_specifier, and definition of cp_printers.
10691         (locate_error): New function.
10692         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
10693         rewritten in terms of locate_error and diagnostic.c.
10694         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
10695         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
10696         (init_error): Adjust to match.
10698 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10700         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
10702 2001-09-21  Richard Henderson  <rth@redhat.com>
10704         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
10705         (build_vtbl_initializer): Likewise.
10706         (build_vfn_ref): New.
10707         * cp-tree.h: Declare it.
10708         * call.c (build_over_call): Use it.
10709         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
10710         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
10712 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
10714         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
10716 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
10718         Table-driven attributes.
10719         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
10720         * decl2.c (cplus_decl_attributes): Only take one attributes
10721         parameter.
10722         * cp-tree.c (cplus_decl_attributes): Update prototype.
10723         * class.c (finish_struct), decl.c (start_decl, start_function),
10724         decl2.c (grokfield), friend.c (do_friend), parse.y
10725         (parse_bitfield): Update calls to cplus_decl_attributes.
10726         * decl.c (grokdeclarator): Take a pointer to a single ordinary
10727         attribute list.
10728         * decl.h (grokdeclarator): Update prototype.
10729         * decl2.c (grokfield): Take a single ordinary attribute list.
10730         * friend.c (do_friend): Likewise.
10731         * decl.c (shadow_tag, groktypename, start_decl,
10732         start_handler_parms, grokdeclarator, grokparms, start_function,
10733         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
10734         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
10735         (process_template_parm, do_decl_instantiation): Pass single
10736         ordinary attribute lists around.
10737         * decl.c (grokdeclarator): Correct handling of nested attributes.
10738         Revert the patch
10739         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
10740                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
10741                 not the left.
10742         .
10743         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
10744         (cp_attribute_table): Declare.
10745         * decl.c (valid_lang_attribute): Don't define.
10746         (lang_attribute_table): Define.
10747         (init_decl_processing): Initialize lang_attribute_table instead of
10748         valid_lang_attribute.
10749         * tree.c (cp_valid_lang_attribute): Remove.
10750         (handle_java_interface_attribute, handle_com_interface_attribute,
10751         handle_init_priority_attribute): New functions.
10752         (cp_attribute_table): New array.
10753         * decl2.c (import_export_class): Don't use
10754         targetm.valid_type_attribute.
10756 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10758         * Make-lang.in (cp/error.o): Depend on real.h
10759         * error.c: #include "real.h"
10761 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10763         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
10764         xmalloc/strcpy/strcat.
10766 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10768         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
10769         Const-ification.
10770         * pt.c (tsubst_decl): Likewise.
10772 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10774         * decl2.c (lang_f_options): Const-ification.
10775         * lex.c (cplus_tree_code_name): Likewise.
10776         * spew.c (yyerror): Likewise.
10778 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10780         PR c++/3986
10781         * class.c (force_canonical_binfo_r): Check & move an indirect
10782         primary base first.
10783         (force_canonical_binfo): Check that it's not already
10784         canonical.
10785         (mark_primary_virtual_base): Remove BINFO parameter.
10786         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
10788 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10790         Remove TYPE_NONCOPIED_PARTS.
10791         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
10792         CLASSTYPE_PURE_VIRTUALS.
10793         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
10794         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
10795         (layout_class_type): Don't call fixup_inline_methods here ...
10796         (finish_struct_1): ... call it here.
10798 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
10800         * decl.c (duplicate_decls): Remove code deadling with
10801         DECL_SAVED_INSNS.
10802         * decl2.c (finish_file): Likewise.
10803         * pt.c (instantiate_decl): Likewise.
10804         * semantics.c (expand_body): Don't defer local functions if
10805         they wouldn't be deferred for some other reason.  Don't
10806         generate RTL for functions that will not be emitted.
10807         (genrtl_start_function): Remove code deadling with
10808         DECL_SAVED_INSNS.
10809         (genrtl_finish_function): Likewise.
10811 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10813         PR c++/4203
10814         * call.c (build_over_call): Do not optimize any empty base
10815         construction.
10817 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10819         * error.c (dump_template_decl): Output template parameters
10820         together with their specifiers.
10821         Output `class' prefix for template template parameter.
10822         (dump_decl): Fix formatting.
10824 2001-08-30  Kurt Garloff  <garloff@suse.de>
10826         * optimize.c (inlinable_function_p): Allow only smaller single
10827         functions. Halve inline limit after reaching recursive limit.
10829 2001-08-30  Joern Rennecke <amylaar@redhat.com>
10830             Jason Merrill  <jason_merrill@redhat.com>
10832         * class.c (build_vtable_entry_ref): Subtract in char*, not
10833         ptrdiff_t.
10835 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
10837         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
10838         (build_cplus_array_type): Use cp_build_qualified_type, not
10839         TYPE_MAIN_VARIANT, to get an unqualified version.
10841         * decl2.c (grok_alignof): Lose.
10842         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
10843         * typeck.c (c_alignof): Lose.
10844         * semantics.c (finish_sizeof, finish_alignof): New.
10845         * parse.y: Use them.
10846         * cp-tree.h: Declare them.
10848 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
10850         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
10851         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
10852         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
10854 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
10856         * typeck2.c (add_exception_specifier): Only require complete type if
10857         not in processing template declaration.
10859 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10861         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
10862         GNU_xref_start_scope and GNU_xref_end_scope.
10864         * tree.c (TYPE_HASH): Moved to ../tree.h.
10866 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
10868         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
10869         on COMPOUND_EXPRs.
10871 2001-08-14  Richard Henderson  <rth@redhat.com>
10873         * class.c, cp-tree.h (build_vfn_ref): Remove.
10874         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
10876 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
10878         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
10879         empty class assignment as having side-effects to avoid
10880         spurious warnings.
10882 2001-08-13  Zack Weinberg  <zackw@panix.com>
10884         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
10885         * except.c: Include libfuncs.h.
10887 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10889         * decl.c (grokdeclarator): Clarify diagnostic message.
10891 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10893         * decl2.c (do_nonmember_using_decl): Replace using directive
10894         with using declaration in the error message.
10896 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10898         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
10899         criterion to avoid rebuilding expression tree instead of
10900         processing_template_decl.
10902 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
10904         Support named return value optimization for inlines, too.
10905         * decl.c (finish_function): Nullify returns here.
10906         * semantics.c (genrtl_start_function): Not here.
10907         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
10908         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
10909         Also nullify the CLEANUP_STMT for the nrv.
10910         * cp-tree.h: Declare it.
10911         * optimize.c (declare_return_variable): Replace the nrv with the
10912         return variable.
10913         * typeck.c (check_return_expr): Be more flexible on alignment check.
10914         Ignore cv-quals when checking for a matching type.
10916 2001-08-09  Richard Henderson  <rth@redhat.com>
10918         * decl2.c (finish_objects): Use target hooks instead of
10919         assemble_constructor and assemble_destructor.
10921 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10923         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
10925 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
10927         PR c++/3820
10928         Stop using TYPE_NONCOPIED_PARTS.
10929         * call.c (build_over_call): Be careful when copy constructing
10930         or assigning to an empty class.
10931         * class.c (check_bases_and_members): It has a
10932         COMPLEX_ASSIGN_REF if it has a vptr.
10933         (layout_class_type): Don't add empty class padding to
10934         TYPE_NONCOPIED_PARTS.
10935         (finish_struct_1): Don't add the VFIELD either.
10936         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
10937         initialization.
10939 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
10941         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
10943 2001-08-06  Richard Henderson  <rth@redhat.com>
10945         * decl2.c (finish_objects): Pass a symbol_ref and priority to
10946         assemble_{constructor,destructor}.  Remove priority handling.
10948 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10950         Don't allow template-id in using-declaration.
10951         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
10952         (do_class_using_decl): Likewise.
10954 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10956         * cp/spew.c (read_token): No need to pop buffers.
10958 2001-08-02  Stan Shebs  <shebs@apple.com>
10960         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
10961         (fnaddr_from_vtable_entry): Remove decl.
10962         * method.c (use_thunk): Update comment.
10964 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
10966         * repo.c (get_base_filename): Change return value to const char
10967         pointer.
10969 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
10971         Kill -fhonor-std.
10972         * NEWS: Document.
10973         * cp-tree.h (flag_honor_std): Remove.
10974         (CPTI_FAKE_STD): Remove.
10975         (std_node): Remove comment about it being NULL.
10976         (fake_std_node): Remove.
10977         * decl.c (in_fake_std): Remove.
10978         (walk_namespaces_r): Remove fake_std_node check.
10979         (push_namespace): Remove in_fake_std code.
10980         (pop_namespace): Likewise.
10981         (lookup_name_real): Remove fake_std_node check.
10982         (init_decl_processing): Always create std_node. Always add
10983         std:: things there.
10984         (builtin_function): Always put non '_' fns in std.
10985         * decl2.c (flag_honor_std): Remove.
10986         (lang_f_options): Remove honor-std.
10987         (unsupported_options): Add honor-std.
10988         (set_decl_namespace): Remove fake_std_node check.
10989         (validate_nonmember_using_decl): Likewise.
10990         (do_using_directive): Likewise.
10991         (handle_class_head): Likewise.
10992         * dump.c (cp_dump_tree): Likewise.
10993         * except.c (init_exception_processing): Adjust.
10994         * init.c (build_member_call): Remove fake_std_node check.
10995         (build_offset_ref): Likewise.
10996         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
10997         * rtti.c (init_rtti_processing): Adjust.
10999 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
11001         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
11002         operand while calling cp_tree_equal.
11004 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11006         The 3.0 ABI no longer has vbase pointer fields.
11007         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
11008         FORMAT_VBASE_NAME): Remove.
11009         * method.c (do_build_copy_constructor): Adjust.
11010         (do_build_assign_ref): Adjust.
11011         * search.c (lookup_field_r): Adjust.
11012         * typeck.c (build_component_ref): Adjust.
11014         The 3.0 ABI always has a vtable pointer at the start of every
11015         polymorphic class.
11016         * rtti.c (build_headof_sub): Remove.
11017         (build_headof): Adjust.
11018         (get_tinfo_decl_dynamic): No need to check flag_rtti
11019         here. Adjust.
11020         (create_real_tinfo_var): Explain why we need a hidden name.
11022 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11024         PR c++/3631
11025         * class.c (update_vtable_entry_for_fn): The fixed adjustment
11026         of a virtual thunk should be from declaring base.
11028 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
11030         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
11031         the shared virtual base, so preserving inheritance graph order.
11033 2001-07-30  Andreas Jaeger  <aj@suse.de>
11035         * decl2.c: Remove unused var global_temp_name_counter.
11037 2001-07-28  Richard Henderson  <rth@redhat.com>
11039         * method.c (pending_inlines): Remove.
11041 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11043         * class.c (mark_primary_virtual_base): Don't adjust base
11044         offsets here.
11045         (dfs_unshared_virtual_bases): Adjust them here.
11046         (mark_primary_bases): Explain why we adjust at the end.
11048 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
11050         * class.c (finish_struct_1): When copying the primary base's
11051         VFIELD, make sure we find it is at offset zero.
11053 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11055         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
11056         tsubst_expr for default template arguments.
11058 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11060         PR c++/3621
11061         * spew.c (yylex): Only copy the token's lineno, if it is
11062         nonzero.
11064 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11066         PR c++/3624
11067         * call.c (resolve_args): Simplify, call
11068         convert_from_reference.
11069         (build_new_op): Resolve and convert from reference ARG1
11070         earlier. Adjust ARG2 & ARG3 resolve and conversion.
11072 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
11074         * decl.c (last_function_parm_tags): Remove.
11075         (current_function_parm_tags): Remove.
11076         (init_decl_processing): Adjust.
11077         (start_function): Adjust.
11078         (store_parm_decls): Adjust.
11080         PR c++/3152
11081         * decl.c (grokdeclarator): Detect when a function typedef is
11082         declaring a function, and create last_function_parms correctly.
11084 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
11086         * call.c (joust): Only prefer a non-builtin candidate to a builtin
11087         one if they have the same signature.
11089         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
11090         it rather than toplevel_bindings_p.  Give it a mangled name if static.
11091         (convert_to_reference): Adjust.
11092         * decl2.c (get_temp_name): Lose.
11093         * mangle.c (mangle_ref_init_variable): New fn.
11094         (mangle_guard_variable): Strip the ref-init header.
11095         * cp-tree.h: Adjust.
11096         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
11097         initializer.
11098         (grok_reference_init): Always use DECL_INITIAL.
11100 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11102         PR c++/3416
11103         * call.c (build_conditional_expr): Recheck args after
11104         conversions.
11105         * cp-tree.h (build_conditional_expr): Move to correct file.
11106         * typeck.c (decay_conversion): Diagnose any unknown types
11107         reaching here.
11108         (build_binary_op): Don't do initial decay or default
11109         conversions on overloaded functions.
11110         (build_static_cast): Don't do a decay conversion here.
11112 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11114         PR c++/3543
11115         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
11116         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
11118 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11120         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
11121         (create_vtbl_ptr): ... here.
11123 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11125         * class.c (build_vbase_offset_vbtl_entries): Look for
11126         non-primary base of which we are a sub vtable.
11128 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
11130         * semantics.c (finish_this_expr):  Remove unused code.
11132 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
11134         Simplify rtti, now we've only one ABI.
11135         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
11136         CPTI_TINFO_VAR_ID.
11137         (tinfo_decl_id, tinfo_var_id): Remove.
11138         (get_typeid_1): Remove.
11139         * rtti.c
11140         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
11141         (typeid_ok_p): New function.
11142         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
11143         (get_tinfo_decl): Remove old abi documentation.
11144         (tinfo_from_decl): Remove.
11145         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
11146         (get_typeid_1): Remove.
11147         (get_base_offset): Remove.
11148         (synthesize_tinfo_var): Absorb get_base_offset.
11149         (create_real_tinfo_var): Don't use tinfo_decl_id.
11151 2001-07-23  Graham Stott  <grahams@redhat.com>
11153         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
11154         variable has_two_argument_delete_p.
11156 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
11158         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
11159         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
11160         (CPTI_INDEX_IDENTIFIER): Remove.
11161         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
11162         (delta2_identifier): Remove.
11163         (index_identifier): Remove.
11164         (pfn_or_delta2_identifier): Remove.
11165         (flag_vtable_thunks): Remove.
11166         (VTABLE_DELTA2_NAME): Remove.
11167         (VTABLE_INDEX_NAME): Remove.
11168         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
11169         (vfunc_ptr_type_node): Adjust.
11170         (VTABLE_NAME_PREFIX): Adjust.
11171         (build_vfn_ref): Lose first parameter.
11172         (fixup_all_virtual_upcast_offsets): Remove.
11173         * decl.c (initialize_predefined_identifiers): Remove
11174         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
11175         (init_decl_processing): Remove no-vtable-thunk code.
11176         * decl2.c (flag_vtable_thunks): Remove.
11177         (mark_vtable_entries): Remove no-vtable-thunk code.
11178         * error.c (dump_decl): Remove no-vtable-thunk code.
11179         (dump_expr): Adjust ptr to member function code.
11180         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
11181         code.
11182         * rtti.c (build_headof): Remove no-vtable-thunk code.
11183         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
11184         * search.c (get_base_distance): Remove expand_upcast_fixups case.
11185         (virtual_context) Remove.
11186         (expand_upcast_fixups): Remove.
11187         (fixup_virtual_upcast_offsets): Remove.
11188         (fixup_all_virtual_upcast_offsets): Remove.
11189         * typeck.c (get_member_function_from_ptrfunc): Remove
11190         no-vtable-thunk code.
11191         * call.c (build_over_call): Adjust call to build_vfn_ref.
11192         * class.c (build_vfn_ref): Lose first parameter. Remove
11193         no-vtable-thunk code.
11194         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
11195         (build_vtable_entry): Remove no-vtable-thunk code.
11197 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
11199         Remove old-abi remnants. Remove comments about old abi
11200         behavior. Remove references to 'new-abi' in comments.
11201         * cp-tree.h: Adjust comments.
11202         (vbase_offsets_in_vtable_p): Delete.
11203         (vcall_offsets_in_vtable_p): Delete.
11204         (vptrs_present_everywhere_p): Delete.
11205         (all_overridden_vfuns_in_vtables_p): Delete.
11206         (merge_primary_and_secondary_vtables_p): Delete.
11207         (TYPE_CONTAINS_VPTR_P): Adjust.
11208         (VTT_NAME_PREFIX): Remove.
11209         (CTOR_VTBL_NAME_PREFIX): Remove.
11210         (init_vbase_pointers): Remove.
11211         * class.c: Adjust coments.
11212         (build_vbase_pointer_fields): Delete.
11213         (build_vbase_pointer): Remove old-abi code.
11214         (build_secondary_vtable): Likewise.
11215         (modify_all_vtables): Likewise.
11216         (create_vtable_ptr): Likewise.
11217         (layout_class_type): Likewise.
11218         (finish_struct_1): Likewise.
11219         (finish_vtbls): Likewise.
11220         (dfs_finish_vtbls): Delete.
11221         (build_vbase_offset_vtbl_entries): Remove old-abi code.
11222         * cvt.c: Adjust comments.
11223         * decl.c: Adjust comments.
11224         * decl2.c: Adjust comments.
11225         * init.c: Adjust comments.
11226         (construct_virtual_bases): Remove old-abi code.
11227         * lang-specs.h: Remove -fno-new-abi.
11228         * mangle.c: Adjust comments.
11229         * rtti.c: Adjust comments.
11230         (get_base_offset): Remove old-abi-code.
11231         * search.c: Adjust comments.
11232         (dfs_init_vbase_pointers): Remove.
11233         (dfs_vtable_path_unmark): Remove.
11234         (init_vbase_pointers): Remove.
11235         * semantics.c: Adjust comments.
11236         (emit_associated_thunks): Remove old-abi code.
11237         * typeck.c: Adjust comments.
11239 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
11241         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
11242         params.h.
11244 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
11246         * class.c (finish_struct_anon): Forbid nested classes.
11248 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11250         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
11251         * optimize.c: Include debug.h.
11252         (maybe_clone_body): Use debug hook.
11253         * semantics.c: Include debug.h.
11254         (expand_body): Use debug hook.
11256 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
11258         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
11260 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
11262         * class.c (type_requires_array_cookie): New function.
11263         (check_methods): Don't try to figure out whether the type needs a
11264         cookie here.
11265         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
11266         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
11267         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
11268         * pt.c (instantiate_class_template): Don't set
11269         TYPE_VEC_DELETE_TAKES_SIZE.
11270         * NEWS: Document ABI changes from GCC 3.0.
11272 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
11273             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
11275         * NEWS (Changes in GCC 3.0): Fix typo.
11277 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11279         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
11280         which attributes are to be attached, and a flags argument.  Update
11281         call to decl_attributes.
11282         (grokfield): Update call to decl_attributes.
11283         * class.c (finish_struct): Update call to cplus_decl_attributes.
11284         * cp-tree.h (cplus_decl_attributes): Update prototype.
11285         * decl.c (start_decl, grokdeclarator, start_function): Update
11286         calls to decl_attributes and cplus_decl_attributes.
11287         * friend.c (do_friend): Update call to cplus_decl_attributes.
11288         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
11290 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
11292         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
11293         for `register' variables with an asm-specification.
11295 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
11297         * semantics.c (finish_asm_stmt): Mark the output operands
11298         to an asm addressable, if necessary.
11300 2001-07-11  Ben Elliston  <bje@redhat.com>
11302         * Revert this change -- there is a subtle bug.
11304         PR c++/80
11305         * decl.c (finish_enum): New "attributes" argument; pass it to
11306         cplus_decl_attributes.  Use a narrower type if the enum is packed.
11307         * cp-tree.h (finish_enum): Adjust prototype.
11308         * parse.y (enum_head): New non-terminal.
11309         (structsp): Use it. Enums now may be preceded or followed by
11310         optional attributes -- pass their chained tree to finish_enum().
11311         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
11313 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
11315         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
11316         variables.
11318 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
11320         * semantics.c (cp_expand_stmt): Fix for null
11321         current_function_return_value.
11323 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
11325         * call.c (build_op_delete_call): Initialize fn.
11326         (convert_like_real): Delete conditional.
11327         (joust): Initialize *w and *l.
11328         * class.c: Add prototype for binfo_ctor_vtable.
11329         (get_primary_binfo): Initialize result.
11330         * init.c (build_java_class_ref): Initialize name.
11332 2001-07-09  Erik Rozendaal  <dlr@acm.org>
11334         * typeck.c (unary_complex_lvalue): Do not duplicate the
11335         argument to modify, pre-, or post-increment when used as an
11336         lvalue and when the argument has side-effects.
11338 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11340         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11341         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
11342         cplus_decl_attributes even if attrs is NULL.
11343         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
11345 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11347         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
11348         calls to decl_attributes.
11350 2001-07-06  Ira Ruben   <ira@apple.com>
11352         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
11353         be DECL_TEMPLATE_RESULT.
11355 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11357         * cp-tree.h (copy_template_template_parm): Rename to ...
11358         (bind_template_template_parm): ... here.
11359         * tree.c (copy_template_template_parm): Rename to ...
11360         (bind_template_template_parm): ... here.  Remove the case when
11361         NEWARGS is NULL_TREE.
11362         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
11363         BOUND_TEMPLATE_TEMPLATE_PARM.
11364         * pt.c (lookup_template_class): Adjust.
11366 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
11368         * cvt.c (convert_lvalue): New fn.
11369         * cp-tree.h: Declare it.
11370         * method.c (do_build_assign_ref): Use it.
11371         (do_build_copy_constructor): Convert parm to base types
11372         before calling base constructors.
11374         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
11375         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
11376         optimize.
11377         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
11379 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
11381         * optimize.c (optimize_inline_calls): New function, broken out
11382         of ...
11383         (optimize_function): ... here. Call it. Don't inline if it is
11384         a thunk.
11385         (dump_function): Print name of dump flag causing this dump.
11386         * semantics.c (expand_body): Move thunk inline check to
11387         optimize_function.
11389 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11391         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
11392         (comptypes): Use target.comp_type_attributes.
11394 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11396         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
11398 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
11400         * error.c (lang_print_error_function): Add a `diagnostic_context *'
11401         parameter. Tweak.
11403 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11405         * decl2.c (import_export_class): Update.
11407 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11409         * error.c (init_error): Adjust settings.
11411 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
11413         * error.c (init_error): Adjust settings.
11415 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
11417         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
11418         return pointers to data members by reference rather than by value.
11420 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
11422         Implement the Named Return Value optimization.
11423         * cp-tree.h (struct cp_language_function): Add x_return_value.
11424         (current_function_return_value): Now a macro.
11425         * decl.c: Don't define it.
11426         (define_label, finish_case_label): Don't clear it.
11427         (init_decl_processing): Don't register it with GC.
11428         * semantics.c (genrtl_finish_function): Don't check it for
11429         no_return_label.  Copy the RTL from the return value to
11430         current_function_return_value and walk, calling...
11431         (nullify_returns_r): ...this new fn.
11432         * typeck.c (check_return_expr): Set current_function_return_value.
11434 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
11436         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
11437         sharing a ctor vtable with.  Merge code for cases 1 and 2.
11438         (binfo_ctor_vtable): New fn.
11439         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
11441 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
11443         * class.c (dfs_find_final_overrider): Fix logic.
11445         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
11446         virtual thunk instead of non-virtual.
11447         (get_matching_virtual): Uncomment.
11449         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
11450         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
11451         PARM, not ARG.
11453 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
11455         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
11456         we've not emerged from the hierarchy of RTTI_BINFO on reaching
11457         a non-virtual base.
11459 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
11461         * NEWS: Update release number.
11463 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
11465         PR c++/3130, c++/3131, c++/3132
11466         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
11467         * class.c (force_canonical_binfo_r): Move
11468         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
11469         virtual bases unless they're primary and what they're primary
11470         too has been moved.
11471         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
11472         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
11473         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
11474         derived binfo.
11475         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
11476         (layout_nonempty_base_or_field): Add most derived type
11477         parameter. Adjust.
11478         (layout_empty_base): Likewise.
11479         (build_base_field): Likewise.
11480         (build_base_fields): Likewise.
11481         (propagate_binfo_offsets): Add most derived type
11482         parameter. Skip non canonical virtual bases too.
11483         (dfs_set_offset_for_unshared_vbases): Don't skip primary
11484         bases. Do skip canonical bases.
11485         (layout_virtual_bases): Adjust.
11486         (layout_class_type): Adjust.
11487         (dfs_get_primary_binfo): Build list of virtual primary base
11488         candidates.
11489         (get_primary_binfo): Check that the shared virtual primary
11490         base candidate was found first.
11491         (accumulate_vtbl_inits): Don't do anything for non-vptr
11492         containing binfos. For case 1 primary virtual bases, keep
11493         checking that we've not emerged from the hierarchy of RTTI_BINFO.
11495 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
11497         PR c++/3089
11498         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
11499         hierarchy looking for primary bases for a ctor
11500         vtable. Recursively call oneself, if we meet our primary via
11501         this route and haven't met it yet via inheritance graph order.
11503 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
11505         * lang-options.h: Emit documentation for -fno-honor-std, not
11506         -fhonor-std.
11508 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
11510         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
11511         Don't clobber delta.
11512         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
11514 2001-06-10  Mark Mitchell <mark@codesourcery.com>
11515             Gabriel Dos Reis  <gdr@codesourcery.com>
11517         * Make-lang.in (cp/call.o): Depend on diagnostic.h
11518         (cp/typeck.o): Depend on diagnostic.h
11519         (cp/typeck2.o): Depend on diagnostic.h
11520         (cp/repo.o): Depend on dignostic.h
11521         * typeck.c: #include diagnostic.h
11522         (convert_for_initialization): Remove extern declaration for
11523         warningcount and errorcount.
11525         * call.c: #include diagnostic.h
11526         (convert_like_real): Remove extern declaration for warnincount and
11527         errorcount.
11529         * repo.c: #include diagnostic.h
11530         * typeck2.c: #include diagnostic.h
11532 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11534         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
11535         in previous change.
11537 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11539         PR c++/2929
11540         * friend.c (do_friend): Use push_decl_namespace for classes at
11541         namespace scope.
11543 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
11544             Jason Merrill <jason_merrill@redhat.com>
11546         PR c++/3061
11547         * class.c (build_secondary_vtable): Use assert, rather than an error
11548         message.
11549         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
11550         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
11551         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
11552         Don't set BINFO_VTABLE for a primary virtual base.
11554 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
11556         * decl.c (duplicate_decls): Update source position information
11557         when a template function is defined.
11559 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
11561         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
11563 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
11565         PR c++/2914
11566         * decl.c (pushtag): Don't push into a complete type's scope.
11568 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
11570         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
11571         (struct lang_decl_flags): Lose generate_with_vtable_p.
11572         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
11573         * class.c (copy_virtuals): Adjust.
11574         * decl2.c (mark_vtable_entries): Adjust.
11575         * method.c (make_thunk, build_vtable_entry): Adjust.
11576         * class.c (update_vtable_entry_for_fn): Only look as far as the
11577         first defining class.
11578         (build_vtbl_initializer): Put nothing in the slot for a function only
11579         defined in a lost primary virtual base.
11580         (add_vcall_offset_vtbl_entries_1): Use the same code for
11581         the lost primary case and the normal case.
11582         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
11583         (get_vfield_offset, get_derived_offset): Lose.
11584         (dfs_find_final_overrider): Use look_for_overrides_here.
11585         (get_matching_virtual): New fn.
11586         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
11587         not BV_VCALL_INDEX.
11588         * search.c (look_for_overrides_here): Split out from...
11589         (look_for_overrides_r): Here.
11591         * class.c (find_final_overrider): Return error_mark_node on error.
11593         * decl2.c (key_method): #if 0 accidental change.
11595 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11597         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
11598         (build_over_call): Likewise.
11599         * decl.c (grokparms): Likewise.
11600         * pt.c (tsubst_decl): Likewise.
11601         * typeck.c (convert_arguments): Likewise.
11603 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
11605         * semantics.c (begin_class_definition): Robustify.
11607         * pt.c (instantiate_decl): Tell the repository code about the
11608         clones, not the cloned functions.
11609         * repo.c (repo_template_used): Explicitly instantiate the cloned
11610         function, not the clones.
11612 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11614         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
11615         ICS_BAD_FLAG on created conversion.
11616         (compare_ics): Break out rank.
11618 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11620         * decl.c (xref_tag): Remove extraneous %s on dependent name
11621         lookup warning.
11623 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11625         * class.c (layout_vtable_decl): Fix off by one error on
11626         build_index_type.
11627         (build_vtt): Likewise.
11628         (build_ctor_vtbl_group): Likewise.
11630 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
11632         * class.c (maybe_indent_hierarchy): New function.
11633         (dump_class_hierarchy_r): Add flags. Dump extra binfo
11634         information, if enabled. Use maybe_indent_hierarchy. Adjust
11635         output format.
11636         (dump_class_hierarchy): Adjust prototype. Adjust output format.
11637         (dump_array, dump_vtable, dump_vtt): New functions.
11638         (finish_struct_1): Adjust hierarchy dumping.
11639         (initialize_vtable): Call dump_vtable.
11640         (build_vtt): Call dump_vtt.
11641         (build_ctor_vtbl_group): Call dump_vtable.
11642         * decl2.c (flag_dump_class_layout): Remove.
11643         (cxx_decode_option): Remove dump translation unit
11644         and dump class hierarchy check. Call dump_switch_p.
11645         (finish_file): Adjust dumping.
11646         (dump.c): Only dump base classes if not TDF_SLIM.
11647         Only dump namespace members if not TDF_SLIM.
11648         * optimize.c (dump_function): New function.
11649         (optimize_function): Call dump_function.
11650         * semantics.c (expand_body): Use dump_enabled_p.
11652 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
11654         PR g++/2936
11655         Part missed from first commit
11656         * decl2.c (finish_anon_union): Copy context.
11658 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
11660         PR g++/2936
11661         * optimize.c (remap_decl): Remap anonymous aggregate members too.
11663 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
11665         PR g++/2823
11666         * semantics.c (expand_body): Don't optimize thunks.
11668 2001-05-25  Sam TH  <sam@uchicago.edu>
11670         * cp-tree.h lex.h: Fix header include guards.
11672 2001-05-25  Mark Mitchell <mark@codesourcery.com>
11674         * decl.c (init_decl_processing): Tweak.
11676 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
11678         * decl.c (duplicate_decls): Tidy.
11679         (init_decl_processing): Always set flag_no_builtin.
11681 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
11683         PR c++/2184
11684         * decl2.c (do_local_using_decl): Push the decls, even in a
11685         template.
11687 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
11689         * optimize.c (initialize_inlined_parameters): Don't set
11690         TREE_READONLY for a VAR_DECL taking the place of an inlined
11691         PARM_DECL.
11693 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
11695         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
11696         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
11697         attribute.
11699 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
11701         * parse.y: Refer to compound literals as such, not as
11702         constructor-expressions.
11704 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
11706         * call.c (build_op_delete_call): Ignore exception-specifications
11707         when looking for matching delete operators.
11708         * init.c (build_new_1): Compute whether or not the allocation
11709         function used is a placement allocation function or not, and
11710         communicate this information to build_op_delete_call.
11712 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
11714         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
11715         (build_vtbl_ref): Adjust.
11716         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
11717         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
11718         Re-add vtable-gc.
11719         (unsupported_options): Correspondingly.
11721         * decl2.c (maybe_make_one_only): Check flag_weak, not
11722         supports_one_only().
11724         * cp-tree.def (START_CATCH_STMT): Lose.
11725         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
11726         * tree.c (cp_statement_code_p): Don't case it.
11727         * semantics.c (cp_expand_stmt): Likewise.
11728         * cp-tree.h (START_CATCH_TYPE): Lose.
11729         (HANDLER_TYPE): New.
11730         * except.c (expand_start_catch_block): Don't start any blocks.
11731         Return the type.
11732         (expand_end_catch_block): Don't end any blocks.
11733         * parse.y (handler): Don't pass anything from finish_handler_parms
11734         to finish_handler.
11735         * pt.c (tsubst_expr): Likewise.
11736         * semantics.c (begin_handler): Call note_level_for_catch here.
11737         (finish_handler_parms): Don't return anything.
11738         (genrtl_catch_block, begin_catch_block): Lose.
11739         (genrtl_handler): Call expand_start_catch here.
11741 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
11743         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
11744         (get_vtable_decl, build_vtt): Not here.
11746 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
11748         PR c++/2781
11749         * optimize.c (update_cloned_parm): Copy addressability and other
11750         flags.
11752 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11754         * pt.c (determine_specialization): Ignore artificial functions.
11756 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
11758         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
11759         (C_RID_CODE): Remove.
11760         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
11761         (init_parse): Don't do it here.
11763 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
11765         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
11766         function declaration to avoid stripping the symbol's attributes.
11768 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
11770         * decl.c (pushdecl): Adjust error string.
11771         (xref_tag): Adjust friend class injection warning. Remove the
11772         inherited name from the class shadowed scope.
11774 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
11776         * except.c (cp_protect_cleanup_actions): New function.
11777         (init_exception_processing): Don't set protect_cleanup_actions
11778         here.  Do set lang_protect_cleanup_actions.
11780 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
11782         * spew.c (read_token): Call yyerror on all unexpected tokens.
11784 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
11786         * init.c (member_init_ok_or_else): Take a tree rather than
11787         string for name.
11788         (expand_member_init): Adjust.
11790 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
11792         * decl.c (duplicate_decls): Suppress warning about duplicate
11793         decls if the first decl is a friend.
11795 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
11797         * except.c (choose_personality_routine): Export.  Add
11798         explanatory comment.  Take an enum languages, not a boolean.
11799         (initialize_handler_parm): Adjust to match.
11800         * cp-tree.h: Prototype choose_personality_routine.
11801         * lex.c (handle_pragma_java_exceptions): New function.
11802         (init_cp_pragma): Register #pragma GCC java_exceptions.
11804 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
11806         * method.c (build_mangled_C99_name): Remove unused prototype.
11808 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
11810         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
11811         * typeck.c (get_member_function_from_ptrfunc,
11812         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
11813         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
11815         Reverted Geoff Keating's 2001-05-03's patch.
11817 2001-05-11  Ira Ruben   <ira@apple.com>
11819         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
11821 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
11823         * cp-tree.h (finish_label_expr, lookup_label): Delete.
11824         * parse.y: Update for '&&'; don't issue warning here.
11825         * semantics.c (finish_label_expr): Delete.
11827 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
11829         * splay-tree.h (splay_tree_max): New function.
11830         (splay_tree_min): Likewise.
11832 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
11834         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
11835         (pfn_vflag_identifier): Define.
11836         Update comment about layout of pointer functions.
11837         (build_ptrmemfunc1): Update prototype.
11838         (expand_ptrmemfunc_cst): Update prototype.
11839         * decl.c (initialize_predefined_identifiers): Initialize
11840         pfn_vflag_identifier.
11841         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
11842         an extra field to the type.
11843         * expr.c (cplus_expand_constant): Pass 'flag' between
11844         expand_ptrmemfunc_cst and build_ptrmemfunc1.
11845         * typeck.c (get_member_function_from_ptrfunc): When
11846         FUNCTION_BOUNDARY < 16, look at additional field to determine
11847         if a pointer-to-member is a real pointer or a vtable offset.
11848         (build_ptrmemfunc1): Add new parameter to contain extra field.
11849         (build_ptrmemfunc): Pass the extra field around.
11850         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
11851         (pfn_from_ptrmemfunc): Ignore the extra field.
11853 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
11855         * cp-tree.h (flag_inline_trees): Update documentation.
11856         * decl.c (init_decl_processing): Adjust handling of
11857         flag_inline_functions and flag_inline_trees to support -O3.
11858         (grokfndecl): Set DECL_INLINE on all functions if that's what
11859         the user requested.
11860         (save_function_data): Clear DECL_INLINE in
11861         current_function_cannot_inline is non-NULL.
11862         * decl2.c (flag_inline_trees): Update documentation.
11864 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
11866         * dump.c (cp_dump_tree, USING_STMT case): New case.
11867         * tree.c (cp_statement_code_p): Add USING_STMT.
11868         * decl2.c (do_using_directive): Add the using directive statement.
11870         * tree.c (walk_tree): Reformat an if block.
11872 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
11874         * decl.c (compute_array_index_type): Don't try to do anything with
11875         the indices when processing a template.
11877 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11879         * call.c: NULL_PTR -> NULL.
11880         * class.c: Likewise.
11881         * cvt.c: Likewise.
11882         * decl.c: Likewise.
11883         * decl2.c: Likewise.
11884         * except.c: Likewise.
11885         * init.c: Likewise.
11886         * rtti.c: Likewise.
11887         * search.c: Likewise.
11888         * tree.c: Likewise.
11889         * typeck.c: Likewise.
11890         * typeck2.c: Likewise.
11892 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
11894         * decl2.c (do_using_directive): Revert previous patch.
11896 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
11898         * cp-tree.def (USING_STMT): New statement node.
11899         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
11900         * decl2.c (do_using_directive): Add USING_STMT to statement
11901         tree. Don't emit errors when processing template decl.
11902         * pt.c (tsubst_expr, USING_STMT case): New case.
11903         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
11905 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
11907         * call.c (build_new_op): Convert args from reference here.
11908         (build_conditional_expr): Don't convert here.
11910 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
11912         * spew.c (last_token_id): New static variable.
11913         (read_token): Set it here.
11914         (yyerror): Use it here.
11916 2001-04-30  Richard Henderson  <rth@redhat.com>
11918         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
11919         * decl.c: Likewise.
11921 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
11923         * gxxint.texi: Remove.
11924         * Make-lang.in: Remove all traces of gxxint.texi.
11926 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
11928         * decl2.c (start_static_initialization_or_destruction): Correct
11929         logic to handle the -fno-use-cxa-atexit case.
11931 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
11933         * optimize.c (update_cloned_parm): New function.
11934         (maybe_clone_body): Use it.  Update the `this' parameter too.
11936 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
11938         * decl2.c (unsupported_options): Add new-abi.
11939         * lang-options.h: Remove no longer supported options.
11941 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
11943         * except.c (can_convert_eh): Don't check template parms,
11944         typename types etc.
11946 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
11948         * optimize.c (maybe_clone_body): Copy parameter names and locations.
11950 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
11952         * cp-tree.h (adjust_clone_args): Prototype new function.
11953         * class.c (adjust_clone_args): New function.
11954         * decl.c (start_function): Call it for in charge ctors.
11956 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
11958         * method.c (use_thunk): Make sure that thunks really are emitted
11959         when requested.
11961 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
11963         * mangle.c (write_chars): New macro.
11964         (hwint_to_ascii): New function
11965         (write_number): Use it.
11966         (write_integer_cst): Deal with really big numbers.
11968 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
11970         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
11971         the clone.
11973 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
11975         * decl.c (grokdeclarator): Set context of namespace scope
11976         TYPE_DECLS.
11978 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
11980         * cp/optimize.c: Include hashtab.h.
11981         (struct inline_data): Add tree_pruner.
11982         (expand_call_inline, expand_calls_inline): Use it when calling
11983         walk_tree.
11984         (optimize_function): Initialize and free tree_pruner.
11986 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
11988         Lazy __FUNCTION__ generation.
11989         * cp-tree.def (FUNCTION_NAME): Remove.
11990         * cp-tree.h (function_name_declared_p): Remove.
11991         (cp_fname_init): Prototype.
11992         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
11993         don't call declare_function_name. Call start_fname_decls.
11994         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
11995         clobber the line number.
11996         (cp_fname_init): New function.
11997         (start_function): Call start_fname_decls.
11998         (finish_function): Call finish_fname_decls.
11999         * lex.c (reswords): Add slots for __FUNCTION__ et al.
12000         (rid_to_yy): Add mappings for __FUNCTION__ et al.
12001         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
12002         * parse.y (VAR_FUNC_NAME): New token.
12003         (primary): Add VAR_FUNC_NAME.
12004         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
12005         generation.
12006         (tsubst, FUNCTION_NAME case): Remove.
12007         (tsubst_copy, FUNCTION_NAME case): Remove.
12008         (tsubst_expr, DECL_STMT case): Be careful with a
12009         DECL_PRETTY_FUNCTION_P.
12010         (instantiate_decl): Remove function_name_declared_p.
12011         * semantics.c (begin_compound_statement): Don't call
12012         declare_function_name here.
12013         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
12014         (finish_translation_unit): Call finish_fname_decls.
12015         (expand_body): Remove function_name_declared_p.
12016         * typeck2.c (digest_init): Allow any ERROR_MARK.
12018 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
12020         * pt.c (tsubst_decl): Use VOID_TYPE_P.
12021         * semantics.c: Fix some typos.
12023 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
12025         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
12027 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12029         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
12031 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
12033         * except.c (build_throw): Wrap the initialization of the exception
12034         object in a MUST_NOT_THROW_EXPR.
12035         (do_free_exception): #if 0.
12037 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
12039         * cp-tree.h (finish_enum): Change prototype.
12040         * decl.c (finish_enum): Reorganize.
12041         * parse.y (structsp): Adjust calls to finish_enum.
12043 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12045         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
12046         't' case.
12048 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
12050         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
12051         (layout_empty_base): Return at end flag.
12052         (build_base_field): Likewise.
12053         (build_base_fields): Likewise.
12054         (layout_virtual_bases): Don't add 1 to eoc value.
12055         (end_of_class): Use full size for empty bases.
12056         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
12057         empty bases. Don't add 1 to eoc value. Only add trailing padding
12058         if we're an empty class with no empty bases.
12059         (dump_class_hierarchy): Dump size and alignment.
12061 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12063         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
12064         ICS_BAD_FLAG.
12066 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
12068         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
12069         is found, look first if name does not match the structure name.
12071 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
12073         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
12074         set.
12075         (SET_DECL_LANGUAGE): New macro.
12076         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
12077         (pushdecl): Likewise.
12078         (build_library_fn_1): Likewise.
12079         (build_cp_library_fn): Likewise.
12080         (grokfndecl): Likewise.
12081         (grokvardecl): Mark `extern "C"' variables as having C linkage.
12082         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
12083         * lex.c (retrofit_lang_decl): Likewise.
12084         * mangle.c (mangle_decl_string): Don't mangle the names of
12085         variables declared with C language linkage.
12086         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
12088 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
12090         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
12091         flag_access_control from uninitialized storage.
12093 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
12095         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
12096         * mangle.c (write_pointer_to_member_type): Fix mangling of
12097         pointers to cv-qualified member function types.
12099         * init.c (build_delete): Create a SAVE_EXPR for the address if
12100         we're going to use it more than once.
12102 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
12104         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
12105         (expand_ptremfunc_cst): Change prototype.
12106         (delta2_from_ptrmemfunc): Remove.
12107         * expr.c (cplus_expand_constant): Adjust call to
12108         expand_ptrmemfunc_cst.
12109         * typeck.c (build_ptrmemfunc1): Simplify.
12110         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
12111         results in a constant.
12112         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
12113         (delta2_from_ptrmemfunc): Remove.
12114         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
12116 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
12118         * cp-tree.h (decl_namespace_list): New macro.
12119         (struct saved_scope): Add decl_ns_list.
12120         * decl.c (mark_saved_scope): Mark it.
12121         * decl2.c: Lose static decl_namespace_list.
12122         (init_decl2): Don't save it.
12124 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12126         * cp-tree.h (warn_return_type, yylex): Delete redundant
12127         declarations.
12129         * decl.c (current_class_depth, global_namespace): Likewise.
12131         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
12133         * repo.c (flag_use_repository): Likewise.
12135 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12137         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
12138         set_block, pushdecl, getdecls, gettags, init_decl_processing,
12139         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
12140         lvalue_or_else, print_lang_statistics, comp_target_types,
12141         unsigned_type, signed_type, signed_or_unsigned_type,
12142         build_function_call, mark_addressable, incomplete_type_error):
12143         Delete redundant declarations.
12145 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
12147         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
12148         (TYPE_ANONYMOUS_P): New macro.
12149         (TAGGED_TYPE_P): New macro.
12150         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
12151         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
12152         * tree.c (no_linkage_helper): Likewise.
12153         * semantics.c (begin_class_definition): Likewise.
12154         * pt.c (convert_template_argument): Likewise.
12155         * lex.c (check_for_missing_semicolon): Likewise.
12157 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12159         * class.c (dfs_unshared_virtual_bases): New function.
12160         (mark_primary_bases): Call it.
12161         (check_bases): Ignore virtual bases when determining
12162         nearly-emptiness.
12164 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
12166         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
12168 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
12170         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
12171         cloned function to the clone.
12173 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12175         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
12177         * semantics.c: Include expr.h.
12179 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
12181         * method.c (implicitly_declare_fn): Commonize code for copy ctor
12182         and assignment op. Set TREE_USED for parameter.
12184 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
12186         * class.c (find_final_overrider_data): Add `candidates'.
12187         (dfs_find_final_overrider): Don't issue error messages
12188         prematurely.
12189         (find_final_overrider): Issue error messages here.
12190         (build_base_field): Don't warn about amgibuous direct bases here.
12191         (warn_about_ambiguous_direct_bases): New function.
12192         (layout_class_type): Use it.
12194 2001-04-10  Richard Henderson  <rth@redhat.com>
12196         * typeck.c (build_array_ref): Push the array reference inside
12197         COMPOUND_EXPR and COND_EXPR.
12199 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
12201         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
12202         * decl.c (duplicate_decls): Adjust accordingly.
12203         (maybe_commonize_var): Likewise.
12204         (grokfndecl): Likewise.
12205         (start_function): Likewise.
12206         (start_method): Likewise.
12207         * decl2.c (key_method): Likewise.
12208         (import_export_decl): Likewise.
12209         * method.c (implicitly_declare_fn): Likewise.
12210         * optimize.c (maybe_clone_body): Likewise.
12212 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
12214         * lang-specs.h: Add __DEPRECATED.
12216 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
12218         * search.c (get_dynamic_cast_base_type): When building a new
12219         constant, set its type to ssizetype.
12221 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
12223         * optimize.c (expand_call_inline): Only add newly inlined statements
12224         into inlined_stmts.
12226 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12228         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
12229         (OPERATOR_FORMAT): Likewise.
12230         (OPERATOR_TYPENAME_FORMAT): Likewise.
12231         * operators.def: Remove old name-mangling information.
12232         * decl.c (grok_op_properties): Adjust accordingly.
12233         * lex.c (init_operators): Likewise.
12234         * rtti.c (get_tinfo_decl): Issue error messages about types that
12235         have variable size.
12237 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
12239         * decl2.c (import_export_decl): Don't call import_export_class
12240         when processing an inline member function.
12241         * semantics.c (expand_body): Call import_export_decl before
12242         emitting inline functions.
12244 2001-03-28  Richard Henderson  <rth@redhat.com>
12246         IA-64 ABI Exception Handling:
12247         * cp-tree.def (EH_SPEC_BLOCK): New.
12248         (MUST_NOT_THROW_EXPR): New.
12249         * cp-tree.h: Update changed function declarations.
12250         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
12251         (CPTI_CALL_UNEXPECTED): New.
12252         (struct cp_language_function): Rename x_eh_spec_try_block
12253         to x_eh_spec_block.
12254         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
12255         * decl.c (current_binding_level): If no current function
12256         bindings, revert to scope_chain.
12257         (initialize_predefined_identifiers): Remove __cp_push_exception.
12258         (store_parm_decls): Use begin_eh_spec_block.
12259         (finish_function): Use finish_eh_spec_block.
12260         (mark_lang_function): Update for name changes.
12261         * decl2.c (finish_file): No mark_all_runtime_matches.
12262         * dump.c (cp_dump_tree): Handle new tree codes.
12263         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
12264         * except.c (catch_language_init, catch_language): Remove.
12265         (init_exception_processing): Don't set language code.
12266         Initialize call_unexpected_node, protect_cleanup_actions,
12267         eh_personality_libfunc, lang_eh_runtime_type.
12268         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
12269         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
12270         (prepare_eh_type): Split out type canonicalizations ...
12271         (build_eh_type_type): ... from here.
12272         (build_eh_type_type_ref): Remove.
12273         (mark_all_runtime_matches): Remove.
12274         (build_exc_ptr): New.
12275         (do_begin_catch, do_end_catch): New.
12276         (do_pop_exception): Remove.
12277         (build_terminate_handler): Remove.
12278         (choose_personality_routine): Split out language choice from ...
12279         (initialize_handler_parm): ... here.
12280         Use MUST_NOT_THROW_EXPR.
12281         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
12282         exception object handling.
12283         (expand_start_eh_spec, expand_end_eh_spec): Remove.
12284         (expand_exception_blocks, alloc_eh_object): Remove.
12285         (begin_eh_spec_block, finish_eh_spec_block): New.
12286         (do_allocate_exception, do_free_exception): New.
12287         (expand_throw): Merge into ...
12288         (build_throw): ... here.  Update for abi.
12289         * expr.c (cplus_expand_expr): No expand_internal_throw.
12290         Handle MUST_NOT_THROW_EXPR.
12291         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
12292         * semantics.c (*) Update for except.h name changes.
12293         (genrtl_try_block): No protect_with_terminate.
12294         (genrtl_eh_spec_block): New.
12295         (genrtl_handler): Don't emit the goto here.
12296         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
12297         (genrtl_finish_function): Don't expand_exception_blocks.
12298         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
12300 2001-03-28  Richard Henderson  <rth@redhat.com>
12302         * decl.c (struct named_label_list): Rename eh_region to
12303         in_try_scope, add in_catch_scope.
12304         (struct binding_level): Rename eh_region to is_try_scope,
12305         add is_catch_scope.
12306         (note_level_for_try): Rename from note_level_for_eh.
12307         (note_level_for_catch): New.
12308         (poplevel): Copy both is_try_scope and is_catch_scope to
12309         the named_label_list struct.
12310         (check_previous_goto_1): Don't check for catch block via
12311         DECL_ARTIFICIAL; use in_try_scope instead.
12312         (check_goto): Likewise.
12313         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
12314         * except.c (expand_start_catch_block): Call note_level_for_catch.
12315         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
12317 2001-03-27  Richard Henderson  <rth@redhat.com>
12319         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
12320         exceptions_via_longjmp.
12322 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
12324         * pt.c (check_default_tmpl_args):  Make error messages clearer.
12326 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
12328         * error.c:  Also undefine 'A' macro used for cp_printers definition.
12330 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12332         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
12334 2001-03-26  Mike Yang <yang@research.att.com>
12335             Mark Mitchell  <mark@codesourcery.com>
12337         * dump.c (dump_access): New function.
12338         (cp_dump_tree): Use it.  Dump basetype information for class
12339         types.
12341 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
12343         * Makefile.in (optimize.o): Depend on params.h.
12344         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
12345         (init_decl_processing): Set flag_no_inline when doing
12346         inlining-on-trees.
12347         * optimize.c: Include params.h.
12348         (struct inline_data): Improve documentation of FNS.  Add
12349         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
12350         (INSNS_PER_STMT): New macro.
12351         (remap_block): Use CLONING_P.
12352         (inlinable_function_p): Don't inline big functions.
12353         (expand_call_inline): Keep track of how much inlining we've done.
12354         (optimize_function): Set FIRST_INLINED_FN.
12355         (maybe_clone_body): Set CLONING_P.
12356         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
12357         tree nodes.
12358         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
12359         rest_of_compilation.  Clear DECL_RTL for local variables
12360         afterwards.
12361         (clear_decl_rtl): New function.
12363 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
12365         Implement DR 209
12366         * cp-tree.h (skip_type_access_control,
12367         reset_type_access_control): Prototype.
12368         * decl.c (grokdeclarator): Access of friends is not checked.
12369         * parse.y (component_decl_list): Reset type access control.
12370         * semantics.c (decl_type_access_control): Clear
12371         current_type_lookups.
12372         (save_type_access_control): Don't save if not deferring.
12373         (skip_type_access_control, reset_type_access_control): New
12374         functions.
12375         (begin_class_definition): Do type access control for basetypes.
12376         Start deferred access control.
12377         (finish_class_definition): Resume immediate access control if
12378         this is a local class.
12380 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12382         * class.c (add_method): Use memcpy/memmove, not bcopy.
12384         * decl.c (duplicate_decls): Likewise.
12386 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
12388         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
12389         not `_'.
12391 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
12393         * decl.c (local_names): Define.
12394         (push_local_name): New.
12395         (grok_reference_init): Return init if initializing static reference
12396         variable with non-constant instead of emitting it.
12397         Move expand_static_init call to cp_finish_decl.
12398         (layout_var_decl): Call push_local_name.
12399         (maybe_commonize_var): Allow inlining functions even if they have
12400         static local variables, use comdat_linkage for them if flag_weak.
12401         (check_initializer): Call obscure_complex_init if
12402         grok_reference_init returned nonzero.
12403         (save_function_data): Clear x_local_names.
12404         (pop_cp_function_context): Free x_local_names.
12405         (mark_inlined_fns): Remove.
12406         (mark_lang_function): Mark x_local_names.
12407         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
12408         Mark inlined_fns as tree, remove call to mark_inlined_fns.
12409         * class.c (alter_access): Ensure DECL_ACCESS is never set if
12410         DECL_DISCRIMINATOR_P.
12411         * cp-tree.h (cp_language_function): Add x_local_names.
12412         (lang_decl_flags): Add discriminator into u2.
12413         (lang_decl_inlined_fns): Remove.
12414         (lang_decl): inlined_fns is now a TREE_VEC.
12415         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
12416         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
12417         TREE_VEC, not a custom structure.
12418         (optimize_function): Likewise.
12419         * mangle.c (discriminator_for_local_entity): Discriminate among
12420         VAR_DECL local entities.
12421         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
12422         is not valid.
12424 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
12426         Add support for Java interface method calls.
12427         * cp-tree.h (struct lang_type): Add java_interface flag.
12428         (TYPE_JAVA_INTERFACE): New macro.
12429         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
12430         by setting TYPE_JAVA_INTERFACE.
12431         * call.c (java_iface_lookup_fn): New static.
12432         (build_over_call): If calling a method declared in a
12433         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
12434         expression which resolves the function address.
12435         (build_java_interface_fn_ref): New function.
12437 2001-03-22  Richard Henderson  <rth@redhat.com>
12439         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
12440         * except.c: Don't include it.
12442 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
12443             based on an idea from Joe Buck <jbuck@synopsys.com>
12445         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
12446         New nonterminals.
12447         (data_def, component_decl): Add reductions to bad_decl.
12449 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
12451         * method.c (do_build_assign_ref): Don't use build_modify_expr for
12452         anonymous aggregates, since they don't have assignment operator
12453         method.
12454         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
12455         assignment operators for anonymous structure fields.
12457 2001-03-21  Jason Merrill  <jason@redhat.com>
12459         * pt.c (instantiate_decl): Abort if we see a member constant
12460         instantiation that doesn't already have its initializer.
12461         Downgrade explicit instantiation without definition to pedwarn.
12463         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
12464         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
12465         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
12467         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
12468         (pending_vtables): Remove.
12469         * decl2.c (pending_vtables): Remove.
12470         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
12471         CLASSTYPE_VTABLE_NEEDS_WRITING.
12472         (import_export_class): Likewise.
12473         (init_decl2): Don't mark pending_vtables.
12474         * lex.c (handle_pragma_vtable): Just sorry.
12475         * pt.c (instantiate_class_template): Don't mess with
12476         CLASSTYPE_VTABLE_NEEDS_WRITING.
12477         (mark_class_instantiated): Likewise.
12478         * ptree.c (print_lang_type): Don't print it.
12479         * semantics.c (begin_class_definition): Don't set it.
12481         * pt.c (template_tail): Replace with last_pending_template.
12482         (maybe_templates, maybe_template_tail): Remove.
12483         (add_pending_template): Adjust.
12484         (instantiate_pending_templates): Adjust.
12486         * cp-tree.h (struct saved_scope): Remove lang_stack field.
12487         (current_lang_stack): Remove.
12488         * decl.c (maybe_push_to_top_level): Don't initialize it.
12489         (duplicate_decls): Use current_lang_depth.
12490         (xref_basetypes): Likewise.
12491         * class.c (current_lang_depth): New fn.
12492         (push_lang_context): Use more varray functionality.
12493         (pop_lang_context): Likewise.
12495         * error.c (GLOBAL_THING): Always use '__'.
12497 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
12499         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
12501         * mangle.c (mangle_decl_string): Mangle the names of overloaded
12502         operators, even when they have `extern "C"' linkage.
12504 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
12506         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
12507         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12508         where it's not necessary.
12509         (add_method): Remove optimization involving comparison of
12510         DECL_ASSEMBLER_NAME.
12511         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
12512         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12513         where it's not necessary.
12514         (check_methods): Likewise.
12515         (build_clone): Likewise.
12516         (built_vtt): Likewise.
12517         * cp-tree.h (DECL_NEEDED_P): Likewise.
12518         * decl.c (pushtag): Likewise.
12519         (duplicate_decls): Likewise.
12520         (pushdecl): Likewise.
12521         (builtin_function): Likewise.
12522         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
12523         (build_cp_library_fn): Likewise.
12524         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
12525         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12526         where it's not necessary.
12527         (make_rtl_for_nonlocal_decl): Likewise.
12528         (cp_finish_decl): Likewise.
12529         (grokfndecl): Likewise.
12530         (grokvardecl): Likewise.
12531         (grokdeclarator): Likewise.
12532         (start_function): Likewise.
12533         (cp_missing_return_ok_p): Likewise.
12534         * decl2.c (grokclassfn): Likewise.
12535         (check_classfn): Likewise.
12536         (finish_static_data_member_decl): Likewise.
12537         (grokfield): Likewise.
12538         * error.c (GLOBAL_IORD_P): Remove.
12539         (dump_global_iord): Improve output.
12540         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
12541         * except.c (nothrow_libfn_p): Summarily reject any function not in
12542         namespace-scope.
12543         * init.c (build_java_class_ref): Don't explicitly set
12544         DECL_ASSEMBLER_NAME after calling mangle_decl.
12545         * mangle.c (mangle_decl_string): Handle extern "C" functions.
12546         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
12547         * method.c (set_mangled_name_for_decl): Don't explicitly set
12548         DECL_ASSEMBLER_NAME after calling mangle_decl.
12549         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
12550         IDENTIFIER_GLOBAL_VALUE for the thunk.
12551         * pt.c (set_mangled_name_for_template_decl): Remove.
12552         (check_explicit_specialization): Don't use it.
12553         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
12554         (tsubst_friend_function): Likewise.
12555         (tsubst_decl): Likewise.
12556         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
12557         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
12558         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
12559         where it's not necessary.
12560         (tinfo_base_init): Likewise.
12561         (create_real_tinfo_var): Likewise.
12562         * search.c (looup_field_1): Likewise.
12563         * semantics.c (finish_named_return_value): Likewise.
12564         * tree.c (init_tree): Set lang_set_decl_assembler_name.
12566 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
12568         Correct semantics restrictions checking in throw-expression.
12569         * except.c (is_admissible_throw_operand): New function.
12570         (build_throw): Use it.
12572 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
12574         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
12575         and its ilk.
12577 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
12579         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12580         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
12581         * decl.c (duplicate_decls): Likewise.
12582         (builtin_function): Likewise.
12583         (build_library_fn): Likewise.
12584         (build_cp_library_fn): Likewise.
12585         (check_initializer): Likewise.
12586         (cp_finish_decl): Likewise.
12587         * decl2.c (grokfield): Likewise.
12588         (grok_function_init): Remove #if 0'd code.
12589         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
12590         * friend.c (do_friend): Likewise.
12591         * init.c (get_temp_regvar): Likewise.
12592         * method.c (make_thunk): Likewise.
12593         * pt.c (tsubst_friend_function): Likewise.
12594         (tsubst_decl): Likewise.
12595         (regenerate_decl_from_template): Likewise.
12596         * semantics.c (genrtl_named_return_value): Likewise.
12597         (expand_body): Likewise.
12598         (genrtl_finish_function): Likewise.
12599         * tree.c (cp_tree_equal): Likewise.
12601 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
12603         * call.c (convert_like_real): Add extra semantics to INNER
12604         parameter. Don't convert to temporary if a user conversion
12605         gives us an lvalue that we're about to bind to a reference.
12606         Set INNER to indicate pending reference binding on recursive
12607         calls.
12609 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
12611         * cp/lex.c: Delete duplicate pending_lang_change.
12613 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
12615         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
12616         Similarly.
12617         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
12618         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
12620 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
12622         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
12624 2001-03-08  Stan Shebs  <shebs@apple.com>
12626         * cp-tree.h (set_identifier_local_value): Remove unused decl.
12628 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
12630         * spew.c: Remove references to CPP_OSTRING.
12632 2001-03-06  Andrew Haley  <aph@redhat.com>
12634         * typeck.c (convert_arguments): Check that we have an fndecl.
12636 2001-03-05  Andrew Haley  <aph@redhat.com>
12638         * typeck.c (convert_arguments): Don't do ellipsis conversion for
12639         __built_in_constant_p.
12641 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
12643         * typeck.c (build_static_cast): Allow enum to enum conversions
12644         as per DR 128.
12646 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
12648         * class.c (check_field_decls): Pointers to member do not a
12649         non-pod struct make, as per DR 148.
12651 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
12653         * call.c (joust): cp_pedwarn when using gnu extension concerning
12654         worst conversion sequences.
12656 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
12658         * decl.c: Replace all uses of 'boolean' with 'bool'.
12660 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
12662         * lang-specs.h: Add zero initializer for cpp_spec field to
12663         all array elements that need one.  Don't put an #ifdef inside
12664         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
12665         use it.
12667 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
12669         Implement using decls inside template functions.
12670         * decl2.c (validate_nonmember_using_decl): Don't special case
12671         fake_std_node in the global namespace. Don't reject early when
12672         processing a template.
12673         (do_local_using_decl): Add to statement tree. Don't do further
12674         processing when building a template.
12675         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
12677 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
12679         * decl2.c (do_nonmember_using_decl): Don't complain if we find
12680         same function. Do complain about ambiguating extern "C"
12681         declarations.
12683 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
12685         Remove floating point and complex type template constant parms.
12686         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
12687         COMPLEX_TYPE extensions.
12688         (invalid_nontype_parm_type_p): Likewise.
12690 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
12692         * except.c (call_eh_info): Revert "match_function"'s type.
12694 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
12696         Fix ctor vtable vcall offsets.
12697         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
12698         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
12699         (get_matching_base): Remove.
12700         (get_original_base): New function.
12701         (build_vtbl_initializer): Initialize vid.rtti_binfo.
12702         Use a virtual thunk for a ctor vtable with an index
12703         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
12704         primary base within a constructor vtable. Only set
12705         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
12706         when primary base has been lost.
12707         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
12709 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
12711         * call.c (joust): Ensure more_specialized()'s argument length
12712         parameter has correct value for constructors.
12714 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
12716         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
12718         * decl.c (mark_inlined_fns): Prototype.
12720 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
12722         * spew.c (yylex): Correct handling of friends.
12724 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
12726         * mangle.c (write_encoding): Pass write_function_type the
12727         FUNCTION_DECL for the function being encoded.
12728         (write_function_type): Pass it along to write_bare_function_type.
12729         (write_bare_function_type): Pass it along to write_method_parms.
12730         (write_method_parms): Don't mangle the compiler-generated
12731         parameters to a constructor or destructor.
12733 2001-02-22  Andreas Jaeger  <aj@suse.de>
12735         * optimize.c: Include toplev.h for
12736         note_deferral_of_defined_inline_function prototype.
12738 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
12740         * cp-tree.h (struct lang_decl_inlined_fns): New.
12741         (struct lang_decls): Add inlined_fns.
12742         (DECL_INLINED_FNS): New macro.
12743         * optimize.c (struct inline_data): Add inlined_fns.
12744         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
12745         (inlinable_function_p): Likewise, fix typo in comment,
12746         function is not inlinable if it already inlined function currently
12747         being optimized.
12748         (expand_call_inline): Add fn to inlined_fns if necessary.
12749         (optimize_function): Initialize inlined_fns.
12750         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
12751         * decl.c (mark_inlined_fns): New function.
12752         (lang_mark_tree): Call it.
12754 2001-02-21  Jason Merrill  <jason@redhat.com>
12756         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
12757         (DECL_UNINLINABLE): Move to middle-end.
12759         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
12760         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
12761         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
12762         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
12763         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
12765         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
12766         second parm of op=.
12768 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
12770         * decl2.c (set_decl_namespace): Allow explicit instantiations in
12771         any namespace.
12773 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12775         * optimize.c (expand_call_inline): Don't walk subtrees of type
12776         nodes.
12778 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
12780         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
12781         for a destructor.
12783 2001-02-18  Jason Merrill  <jason@redhat.com>
12785         Do put the VTT parameter in DECL_ARGUMENTS.
12786         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
12787         (current_vtt_parm): New macro.
12788         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
12789         (DECL_HAS_VTT_PARM_P): New macro.
12790         (DECL_VTT_PARM): Remove.
12791         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
12792         * decl.c (duplicate_decls): Only copy the operator code if
12793         appropriate.
12794         (start_function): Set current_vtt_parm.
12795         (lang_mark_tree): Don't mark vtt_parm.
12796         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
12797         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
12798         * class.c (build_clone): Maybe remove the VTT parm.
12799         * optimize.c (maybe_clone_body): Set up the VTT parm.
12800         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
12801         * call.c (build_over_call): Just allow the VTT arg.
12802         * method.c (make_thunk): Don't set DECL_VTT_PARM.
12803         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
12804         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
12805         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
12806         * error.c (dump_function_decl): Likewise.
12807         * call.c (build_user_type_conversion_1, convert_like_real): Abort
12808         if we try to call a constructor with in-charge or VTT parms.
12809         * method.c (skip_artificial_parms_for): New fn.
12810         * call.c (add_function_candidate, build_over_call): Call it.
12811         * call.c (build_new_method_call): Use current_vtt_parm.
12812         * init.c (expand_virtual_init): Likewise.
12813         * class.c (same_signature_p): No longer static.
12814         * cp-tree.h: Declare it.
12815         * search.c (look_for_overrides_r): Use it.
12817 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
12819         * cp-tree.h (new_abi_rtti_p): Remove.
12820         (name_mangling_version): Likewise.
12821         (flag_do_squangling): Likewise.
12822         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
12823         * decl.c (grokfndecl): Likewise.
12824         * decl2.c (name_mangling_version): Remove.
12825         (flag_do_squangling): Likewise.
12826         (lang_f_options): Remove `squangle'.
12827         (unsupported_options): Add `squangle'.
12828         (cxx_decode_option): Issue a warning about uses of
12829         -fname-mangling-version.
12830         (finish_file): Remove old ABI support.
12831         * pt.c (check_explicit_specialization): Likewise.
12832         (tsubst_decl): Likewise.
12833         * rtti.c (init_rtti_processing): Likewise.
12834         (build_headof): Likewise.
12835         (get_tinfo_decl_dynamic): Likewise.
12836         (tinfo_from_decl): Likewise.
12837         (build_dynamic_cast_1): Likewise.
12838         (synthesize_tinfo_var): Likewise.
12839         * init.c (build_new): Allow enumeration types for the array-bounds
12840         in a direct-new-declarator.
12842         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
12844         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
12845         TREE_PROTECTED from the template being specialized.
12847 2001-02-17  Jason Merrill  <jason@redhat.com>
12849         * decl2.c (build_artificial_parm): Set TREE_READONLY.
12851         * decl.c (bad_specifiers): Allow throw specs on things with
12852         pointer-to-function or -member-function type.
12853         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
12854         a pmf.
12856 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
12858         * call.c (check_dtor_name): Handle template names correctly.
12860 2001-02-16  Jason Merrill  <jason@redhat.com>
12862         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
12863         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
12864         * optimize.c (maybe_clone_body): Don't substitute it.
12865         * call.c (build_new_method_call): Check in_chrg instead.
12866         * init.c (expand_virtual_init): Likewise.
12868 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
12870         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
12871         class-type introduces at least a type-name.
12873 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
12875         * call.c (convert_like_real): Create a temporary for non-lvalue.
12877 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
12879         * cp-tree.h: Fix typos in comments.
12881 2001-02-16  Jason Merrill  <jason@redhat.com>
12883         * optimize.c (remap_block): If we're compiling a clone, pass the
12884         new block to insert_block.
12886 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
12888         * semantics.c (finish_asm_stmt): Robustify.
12890 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
12892         * pt.c (push_template_decl_real): Don't remangle the name of a
12893         class template.
12895 2001-02-15  Jim Meyering  <meyering@lucent.com>
12897         * Make-lang.in (c++.install-common): Depend on installdirs.
12898         (c++.install-info): Likewise.
12899         (c++.install-man): Likewise.
12901 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
12903         * typeck2.c (build_m_component_ref): Robustify.
12905 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
12907         * friend.c (do_friend): Don't take the nested [template] class
12908         into account when deciding whether to warn about the friend
12909         function not referring to a template function.
12911 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
12913         * typeck.c (build_unary_op): Clarify error message.
12915 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
12917         * parse.y (component_constructor_declarator): allow optional
12918         parentheses around constructor class name.
12920 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12922         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
12923         section.
12924         * init.c (emit_base_init): Remove incorrect comment about
12925         virtual bases.
12926         * method.c (make_thunk): Fix comment alignment.
12928 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12930         Kill remnants of this is variable.
12931         * cp-tree.h (flag_this_is_variable): Remove.
12932         * decl2.c (flag_this_is_variable): Remove.
12933         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
12934         (build_vbase_path): The path is non-static, even in a cdtor.
12935         (resolves_to_fixed_type_p): Add additional return value.
12936         * search.c (init_vbase_pointers): Adjust.
12937         * tree.c (lvalue_p_1): Adjust.
12938         * typeck.c (mark_addressable): Adjust.
12940 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12942         * pt.c (unify): Don't check cv quals of array types.
12944 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
12946         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
12947         check whether we already have the type.
12949 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
12951         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
12952         * call.c (build_op_delete_call): Simplify to remove duplicate
12953         code.
12954         * class.c (clone_function_decl): Don't build the deleting variant
12955         of a non-virtual destructor.
12956         * decl.c (finish_destructor_body): Don't call delete if this is a
12957         non-virtual destructor.
12958         * init.c (build_delete): Explicitly call `operator delete' when
12959         deleting an object with a non-virtual destructor.
12961 2001-02-13  Jason Merrill  <jason@redhat.com>
12963         * lang-specs.h: Add more __EXCEPTIONS.
12965 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
12967         * typeck2.c (process_init_constructor): Check
12968         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
12970 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
12972         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
12973         Remove spurious information in comment. Allow further
12974         adjustments of REFERENCE_TYPE args.
12976 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
12978         * errfn.c (cp_deprecated): Tweak diagnostic text.
12979         * parse.y (new_initializer): Deprecate initializer lists
12980         extension.
12982 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
12984         Remove old ABI support.
12986 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
12988         * decl2.c (flag_vtable_thunks): Always set it to 1.
12989         (flag_new_abi): Likewise.
12990         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
12992         * Makefile.in (g++spec.o): Fix typo.
12994 2001-02-09  Jason Merrill  <jason@redhat.com>
12996         * lang-specs.h: Restore definition of __EXCEPTIONS.
12998 2001-02-08  Jason Merrill  <jason@redhat.com>
13000         * search.c (shared_member_p): New function.
13001         (lookup_field_r): Use it.
13002         * cp-tree.h (SHARED_MEMBER_P): Remove.
13004         * method.c (process_overload_item): Handle template-dependent array
13005         bounds.
13006         * pt.c (type_unification_real): If we end up with undeduced nontype
13007         parms, try again.
13009         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
13010         types.
13012         * typeck2.c (friendly_abort): Don't say anything if we have
13013         earlier errors or sorries.
13015         * decl.c (check_tag_decl): Notice attempts to redefine bool and
13016         wchar_t.  Ignore if in_system_header.
13018         * decl.c (maybe_push_cleanup_level): New fn...
13019         (start_decl_1): ...split out from here.
13020         * cvt.c (build_up_reference): Use it.
13021         * cp-tree.h: Declare it.
13023 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
13025         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
13026         spec.
13028 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
13030         * pt.c (lookup_template_class): Make sure it's a primary
13031         template or template_template_parm when called from the parser.
13032         (instantiate_template_class): Add assertion.
13034 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
13036         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
13037         from error_mark_node.
13039 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
13041         Fix specification and implementation bugs in V3 ABI
13042         construction vtables.
13043         * cp-tree.h (flag_dump_class_layout): New flag.
13044         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
13045         (BINFO_LOST_PRIMARY_P): New flag.
13046         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
13047         (BINFO_PRIMARY_MARKED_P): Rename to ...
13048         (BINFO_PRIMARY_P): ... here.
13049         (binfo_via_virtual): New prototype.
13050         * decl2.c (flag_dump_class_layout): New flag.
13051         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
13052         use `=' as a file name separator.
13053         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
13054         bases.
13055         (build_vtbl_address): If this is a virtual primary base, then
13056         get the vtbl of what it is ultimately primary for.
13057         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
13058         for BINFO_PRIMARY_P.
13059         (dfs_skip_nonprimary_vbases_markedp): Likewise.
13060         (get_shared_vbase_if_not_primary): Likewise.
13061         (dfs_get_pure_virtuals): Likewise.
13062         (expand_upcast_fixups): Likewise.
13063         (fixup_virtual_upcast_offsets): Likewise.
13064         (dfs_find_vbase_instance): Likewise.
13065         (find_vbase_instance): Likewise.
13066         (binfo_from_vbase): Adjust comment to reflect reality.
13067         (binfo_via_virtual): New function.
13068         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
13069         for binfo walking during VTT construction.
13070         (dfs_mark_primary_bases): Remove.
13071         (force_canonical_binfo_r): New function.
13072         (force_canonical_binfo): New function.
13073         (mark_primary_virtual_base): New function.
13074         (mark_primary_bases): Walk in inheritance graph order, use
13075         mark_primary_virtual_base.
13076         (determine_primary_base): Use some more intermediate variables.
13077         (dfs_find_final_overrider): Don't check for overriding along a
13078         virtual path.
13079         (dfs_modify_vtables): Walk into primary virtual bases too.
13080         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
13081         (build_base_fields): Likewise.
13082         (dfs_set_offset_for_unshared_vbases): Likewise.
13083         (layout_virtual_bases): Likewise.
13084         (end_of_class): Likewise.
13085         (finish_struct_1): Call dump_class_hierarchy, if requested.
13086         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
13087         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
13088         (dump_class_hierarchy): Add file parameter. Append to file, if
13089         required.
13090         (finish_vtbls): Adjust accumulate_vtbl_inits call.
13091         Use canonical base for virtual bases.
13092         (build_vtt): Add more comments. Adjust build_vtt_inits call.
13093         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
13094         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
13095         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
13096         virtual VTTs.
13097         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
13098         from DATA.  We want virtual primary bases and all bases via virtual.
13099         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
13100         virtual base when not a construction vtable.
13101         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
13102         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
13103         Use canonical bases when processing virtual bases.
13104         (accumulate_vtbl_inits): We're interested in any base via a
13105         virtual path.
13106         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
13107         within a construction vtable, determine what is being overridden.
13108         (build_vtbl_initializer): Add more comments
13109         (add_vcall_offset_vtbl_entries_1): Adjust comment.
13110         (build_rtti_vtbl_entries): Check if the base has lost its
13111         primary.
13113 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
13115         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
13117 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13119         * decl.c (pushdecl): Call abort instead of fatal.
13120         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
13121         * init.c (build_new_1): Likewise.
13122         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
13123         * decl.c (build_typename_type): hash_table_init now returns void.
13124         decl.c (init_decl_processing): Make an error non-fatal.
13126 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
13128         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
13129         Document.
13130         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
13131         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
13132         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
13133         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
13134         * decl.c (maybe_commonize_var): Use the new name-mangling where
13135         appropriate.
13136         * decl2.c (comdat_linkage): Enhance comments.  Make all
13137         compiler-generated things static, if COMDAT is not available.
13138         (get_tinfo_decl): Do not make typeinfo objects that belong in the
13139         library COMDAT.
13140         (tinfo_base_init): Use the correct mangled name for typeinfo
13141         strings, and push them into the global scope.
13142         (typeinfo_in_lib_p): New function.
13143         (synthesize_tinfo_var): Use it.
13144         (create_real_tinfo_var): Likewise.
13146 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
13148         * decl.c (push_class_binding): Use context_for_name_lookup instead
13149         of CP_DECL_CONTEXT.
13150         * search.c (context_for_name_lookup): Remove static.  Check for NULL
13151         context in the loop.
13152         * cp-tree.h (context_for_name_lookup): Add prototype.
13154 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
13156         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
13157         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
13158         Remove.
13159         * call.c (convert_class_to_reference, build_user_type_conversion_1,
13160         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
13162 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
13164         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
13165         of macros used when compiling g++spec.c.
13166         * g++spec.c (lang_specific_driver): Link with the shared
13167         libgcc by default.
13169 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
13171         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
13172         make_reference_declarator, make_call_declarator), method.c
13173         (implicitly_declare_fn), parse.y (namespace_using_decl,
13174         notype_unqualified_id, expr_or_declarator, new_type_id,
13175         after_type_declarator, direct_after_type_declarator,
13176         notype_declarator, complex_notype_declarator,
13177         complex_direct_notype_declarator, qualified_id,
13178         notype_qualified_id, overqualified_id, direct_new_declarator,
13179         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
13180         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
13181         instead of build_parse_node.
13183 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13185         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
13186         (minus_one_node): Moved to top level gcc directory.  Renamed
13187         to integer_minus_one_node.
13189         * init.c (init_init_processing): Don't set minus_one_node.
13190         (build_vec_init): Use integer_minus_one_node.
13192         * rtti.c (get_tinfo_decl_dynamic): Likewise.
13194 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
13196         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
13197         identical and they would be replaced with constant, remove
13198         MODIFY_EXPR from the tree.
13200 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13202         * Make-lang.in: Remove all dependencies on defaults.h.
13203         * call.c: Don't include defaults.h.
13204         * decl.c: Likewise.
13205         * decl2.c: Likewise.
13206         * except.c: Likewise.
13207         * pt.c: Likewise.
13208         * rtti.c: Likewise.
13209         * tree.c: Likewise.
13210         * typeck.c: Likewise.
13212 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
13214         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
13215         operators even in "C" linkage.
13216         * method.c (set_mangled_name_for_decl): Likewise.
13217         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
13218         overloaded operators in "C" linkage.
13220 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13222         * pt.c (tsubst_decl): Remove IN_DECL parameter.
13223         (tsubst_arg_types): Check parameter is not void.
13224         (tsubst): Adjust tsubst_decl call.
13226 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
13228         * call.c (add_builtin_candidate): Quote std properly, from
13229         previous change.
13231 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13233         * pt.c (check_explicit_specialization): Clone constructors and
13234         destructors.
13236 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13238         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
13239         indicates anything special about template depth. Make sure we
13240         only count the user visible template classes.
13242 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
13244         * call.c (build_conv): Typo in comment.
13245         (add_builtin_candidate): Add more explanation.
13246         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
13247         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
13248         when we have enumeral types.
13249         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
13250         candidates for relops and eqops.
13251         (joust): Simplify control flow. Allow a non-template user
13252         function to hide a builtin.
13254 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
13256         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
13257         (more_specialized): Add deduction parameter.
13258         * call.c (joust): Adjust more_specialized call.
13259         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
13260         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
13261         (get_bindings_order): Remove.
13262         (get_bindings_real): Add DEDUCE parameter.
13263         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
13264         REFERENCE_TYPE jig for DEDUCE_ORDER.
13265         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
13266         maybe_adjust_types_for_deduction.
13267         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
13268         directly.
13269         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
13270         (check_cv_quals_for_unify): Use new unify qualifier flags.
13271         (unify): Clear new unify qualifier flags.
13272         (get_bindings_real): Add DEDUCE parameter.
13273         (get_bindings): Adjust call to get_bindings_real.
13274         (get_bindings_overload): Likewise.
13275         (most_specialized_instantiation): Adjust call to
13276         more_specialized.
13278 2001-01-19  Jason Merrill  <jason@redhat.com>
13280         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
13282         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
13283         -fnew-abi.
13285 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
13287         * decl2.c (arg_assoc_class): Fix double iteration logic.
13289 2001-01-19  Jason Merrill  <jason@redhat.com>
13291         * init.c (build_delete): Always call convert_force to strip cv-quals.
13293         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
13294         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
13295         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
13297 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13299         * search.c (get_vbase_1): Count only virtual bases.
13301 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13303         * class.c (duplicate_tag_error): Robustify flag clearing.
13305 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13307         * cp-tree.h (lookup_template_class): Add complain parm.
13308         * decl.c (lookup_namespace_name): Adjust call to
13309         lookup_template_class.
13310         (make_typename_type): Likewise.
13311         * semantics.c (finish_template_type): Likewise.
13312         * pt.c (lookup_template_class): Add complain parm. Adjust.
13313         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
13314         (tsubst): Likewise.
13316 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
13318         * pt.c (copy_default_args_to_explicit_spec): Preserve
13319         object's CV quals. Reorganize.
13321 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13323         * typeck.c (build_modify_expr): Say `initialization' for
13324         INIT_EXPRs.
13325         * init.c (build_default_init): Convert to enumeral type, if
13326         needed.
13328 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
13330         * parse.y (nomods_initdcl0): Properly set things up for
13331         initdcl0_innards.
13333 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13335         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
13336         (type_unification_real): Set it.
13337         (unify): Use it.
13339 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13341         * decl.c (finish_destructor_body): Convert to vbase pointer here.
13343 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13345         * semantics.c (begin_class_definition): Check we're not inside a
13346         template parm list.
13348 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
13350         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
13351         BASELINK_P.
13353 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13355         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
13356         * call.c (build_over_call): Add comment.
13358 2001-01-16 Daniel Berlin <dberlin@redhat.com>
13360         * cvt.c (ocp_convert): Handle vector type conversion
13361         * typeck2.c (digest_init): Handle vector type initializations
13363 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
13365         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
13366           was given.
13368 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
13370         * pt.c (check_nontype_parm): Rename to ...
13371         (invalid_nontype_parm_type_p): ... here.
13372         (process_template_parm): Adjust.
13373         (convert_template_argument): Adjust.
13375 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
13377         * pt.c (check_nontype_parm): New function.
13378         (process_template_parm): Use it.
13379         (convert_template_argument): Use it.
13380         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
13381         member.
13383 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
13385         * tree.c: Add defaults.h
13386         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
13387         * Make-lang.in (cp/tree.o): Add defaults.h.
13389 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13391         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
13393 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13395         * g++.1: Change to be ".so man1/gcc.1".
13397 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13399         * Make-lang.in (c++.info, c++.install-info): Build and install g++
13400         internals info.
13401         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
13402         ($(srcdir)/cp/g++int.info): New target.
13403         * gxxint.texi: Add info directory entry.  Use @@ in email address.
13404         * .cvsignore: Update.
13406 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
13408         * typeck.c (build_c_cast): Do template processing earlier.
13409         Always pedwarn on array casts.
13411 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
13413         * friend.c (make_friend_class): Make sure a templated class is
13414         actually a template.
13416 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13418         * decl2.c (get_guard): Set linkage from guarded decl.
13420 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13422         * call.c (convert_default_arg): Check for unprocessed
13423         DEFAULT_ARG.
13424         * cp-tree.h (replace_defarg): Move to spew.c.
13425         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
13426         spew.c, which is where they really are.
13427         (done_pending_defargs): Declare.
13428         (unprocessed_defarg_fn): Declare.
13429         * decl.c (replace_defarg): Move to spew.c
13430         * parse.y (structsp): Call done_pending_defargs.
13431         * spew.c (defarg_fns): Rearrange list structure.
13432         (defarg_fnsdone): New static variable.
13433         (defarg_depfns): New static variable.
13434         (init_spew): Adjust.
13435         (add_defarg_fn): Store the type in TREE_TYPE.
13436         (do_pending_defargs): Detect and deal with ordering constraints
13437         and circularity.
13438         (done_pending_defargs): New function.
13439         (unprocessed_defarg_fn): New function.
13440         (replace_defarg): Moved from decl.c. Robustify. Don't save
13441         if circularity detected.
13443 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13445         * pt.c (unify): Check array has a domain, before checking
13446         whether it is variable sized.
13448 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13450         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
13451         parameters with pointers to arrays of unknown bound.
13453 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
13455         * parse.y (template_parm_header, template_spec_header): New
13456         reductions. Split out from ...
13457         (template_header): ... here. Use them.
13458         (template_template_parm): Use template_parm_header.
13459         * semantics.c (finish_template_template_parm): Add assert.
13461 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
13463         * mangle.c (write_builtin_type): Fix thinko.
13465         * pt.c (copy_default_args_to_explicit_spec_1): New function.
13466         (copy_default_args_to_explicit_spec): Likewise.
13467         (check_explicit_specialization): Use it.
13469         * class.c (finish_struct_1):  Remove last argument in call to
13470         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
13471         * decl.c (builtin_function): Likewise.
13472         (build_cp_library_fn): Likewise.
13473         (check_initializer): Likewise.
13474         (make_rtl_for_nonlocal_decl): Likewise.
13475         (cp_finish_decl): Likewise.
13476         (start_function): Likewise.
13477         * decl2.c (finish_anon_union): Likewise.
13478         * friend.c (do_friend): Likewise.
13479         * init.c (build_java_class_ref): Likewise.
13480         * method.c (make_thunk): Likewise.
13481         * pt.c (tsubst_friend_function): Likewise.
13482         * semantics.c (expand_body): Likewise.
13484 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
13486         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
13487         looking at DECL_CLONED_FUNCTION for non-functions.
13489 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13491         * error.c (dump_template_parameter): Use parm to determine how
13492         to print default value.
13494 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13496         * class.c (duplicate_tag_error): Clear more flags.
13498 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
13500         * call.c (build_new_method_call): Use binfo_for_vbase.
13502 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
13504         * cp-tree.h (flag_cond_mismatch): Don't declare.
13505         * decl2.c (flag_cond_mismatch): Don't define.
13506         (lang_f_options): Remove cond-mismatch.
13507         (unsupported_options): Add cond-mismatch.
13509 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
13511         * class.c (handle_using_decl): Reject using of constructor name
13512         of sourcing class. Allow injecting of a method with same name as
13513         nested class. Fixup error messages.
13515 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
13517         * decl2.c (lang_decode_option): Handle -Wformat=2.
13519 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13521         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
13522         initialized_in_class.
13523         (DECL_DEFINED_IN_CLASS_P): Rename to ...
13524         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
13525         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
13526         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
13527         * pt.c (check_default_tmpl_args): Adjust for
13528         DECL_INITIALIZED_IN_CLASS_P.
13529         (instantiate_class_template): Likewise.
13530         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
13532         * class.c (finish_struct): Constify saved_filename.
13534 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13536         * class.c (duplicate_tag_error): Adjust diagnostic.
13537         (finish_struct): Locally set location to start of struct.
13538         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
13540 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
13542         * decl.c (struct binding_level): Adjust class_shadowed comments
13543         to reflect reality.
13544         (push_class_level_binding): Adjust comments to reflect reality.
13545         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
13546         Don't set TREE_VALUE on the class_shadowed list.
13548 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13550         * decl2.c (acceptable_java_type): Allow references too.
13551         * init.c (build_java_class_ref): When using the new ABI, search
13552         `class$' and have it mangled with `mangle_decl.'
13553         * mangle.c (write_java_integer_type_codes): New function.
13554         (write_builtin_type): Detect and mangle Java integer and real
13555         types.
13557 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
13559         * decl2.c (grokfield): Don't accept `asm' specifiers for
13560         non-static data members.
13562 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13564         * expr.c (cplus_expand_expr): Don't reset `target'.
13566 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
13568         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
13570 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
13572         * parse.y (template_datadef): Check for error_mark_node.
13574 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
13576         * cp-tree.def (DEFAULT_ARG): Make `x' class.
13578 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
13580         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
13581         (record_builtin_type): Make non-static.
13582         (flag_short_double): Don't declare.
13583         (init_decl_processing): Remove the creation of many tree nodes now
13584         in c_common_nodes_and_builtins.
13585         (build_void_list_node): New function.
13586         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
13587         * cp-tree.h (flag_short_wchar): Don't declare.
13589 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
13591         * call.c (build_conv): Don't use build1 for USER_CONV.
13592         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
13594 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
13596         * lex.c (lang_init): Call c_common_lang_init.
13598 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
13600         * search.c (lookup_fnfields_here): Remove.
13601         (look_for_overrides_r): Use lookup_fnfields_1.
13602         Ignore functions from using declarations.
13604 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
13606         Implement exceptions specifiers for implicit member functions.
13607         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
13608         * method.c (synthesize_exception_spec): New function.
13609         (locate_dtor, locate_ctor, locate_copy): New functions.
13610         (implicitly_declare_fn): Generate the exception spec too.
13611         * search.c (check_final_overrider): Check artificial functions
13612         too.
13613         * typeck2.c (merge_exception_specifiers): New function.
13615 2001-01-03  Jason Merrill  <jason@redhat.com>
13617         * init.c (build_default_init): New fn.
13618         (perform_member_init): Split out from here.
13619         (build_new_1): Use it.  Simplify initialization logic.
13620         (build_vec_init): Take an array, rather than a pointer and maxindex.
13621         Speed up simple initializations.  Don't clean up if we're assigning.
13622         * cp-tree.h: Adjust.
13623         * decl2.c (do_static_initialization): Remove TREE_VEC case.
13624         * parse.y (new_initializer): Return void_zero_node for ().
13625         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
13626         * typeck2.c (digest_init): Only complain about user-written
13627         CONSTRUCTORs.
13629 2000-12-22  Mike Stump  <mrs@wrs.com>
13631         * decl2.c: (max_tinst_depth): Increase to 50.
13633 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
13635         * class.c (invalidate_class_lookup_cache): Zero the
13636         previous_class_values.
13637         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
13638         TREE_INT_CST_HIGH.
13639         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
13640         * decl.c (free_bindings): New variable.
13641         (push_binding): Don't create a new binding if we have one on the
13642         free list.
13643         (pop_binding): Put old bindings on the free list.
13644         (init_decl_processing): Use size_int, not build_int_2.
13645         Register free_bindings as a GC root.
13646         (cp_make_fname_decl): Use size_int, not build_int_2.
13647         (push_inline_template_parms_recursive): Likewise.
13648         (end_template_parm_list): Likewise.
13649         (for_each_template_parm): Do not use walk_tree_without_duplicates.
13650         (tsubst_template_parms): Use size_int, not build_int_2.
13651         (tsubst): Likewise.
13652         * rtti.c (get_vmi_pseudo_type_info): Likewise.
13654 2001-01-02  Richard Henderson  <rth@redhat.com>
13656         * parse.y (asm): Set ASM_INPUT_P.
13658 2001-01-02  Jason Merrill  <jason@redhat.com>
13660         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
13661         for v3 ABI.
13663         * typeck.c (cp_truthvalue_conversion): New fn.
13664         * cvt.c (ocp_convert): Use it.
13666         * cp-tree.h: Lose c-common.c decls.
13668         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
13669         * cvt.c (convert_to_void): Use type_unknown_p.
13671         * typeck.c (strip_all_pointer_quals): Also strip quals from
13672         pointer-to-member types.
13674         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
13675         parse.y as C.
13677         * call.c (build_new_method_call): Do evaluate the object parameter
13678         when accessing a static member.
13679         * typeck.c (build_component_ref): Likewise.
13681 2001-01-02  Andreas Jaeger  <aj@suse.de>
13683         * decl.c (cp_missing_noreturn_ok_p): New.
13684         (init_decl_processing): Set lang_missing_noreturn_ok_p.
13686 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
13688         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
13690 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
13692         * class.c (pushclass): Remove #if 0'd code.
13693         * cp-tree.h (overload_template_name): Remove.
13694         * decl.c (store_bindings): Simplify.
13695         (pop_from_top_level): Likewise.
13696         * pt.c (overload_template_name): Remove.
13697         (instantiate_decl): Don't call push_to_top_level if it's not
13698         needed.
13700 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
13702         * pt.c (register_local_specialization): Don't return a value.
13703         (lookup_template_class): Use move-to-front heuristic when looking
13704         up template instantiations.
13705         (instantiate_decl): Only push_to_top_level when we're actually
13706         going to instantiate the template.
13708 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
13710         * search.c (binfo_for_vtable): Return least derived class, not
13711         most.  Handle secondary vtables.
13713 2000-12-22  Jason Merrill  <jason@redhat.com>
13715         * pt.c (more_specialized): Don't optimize len==0.
13716         (fn_type_unification): If we're adding the return type, increase len.
13718         * typeck.c (build_binary_op): Fix pmf comparison logic.
13720         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
13721         DECL_STATIC_FUNCTION_P.
13723         * semantics.c (genrtl_finish_function): Don't try to jump to
13724         return_label unless it exists.
13726         In partial ordering for a call, ignore parms for which we don't have
13727         a real argument.
13728         * call.c (joust): Pass len to more_specialized.
13729         (add_template_candidate_real): Strip 'this', pass len.
13730         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
13731         (get_bindings_order): New fn.  Pass len down.
13732         (get_bindings_real): Strip 'this', pass len.
13733         (fn_type_unification): Likewise.
13734         (type_unification_real): Succeed after checking 'len' args.
13735         (most_specialized_instantiation): Lose explicit_args parm.
13736         * class.c (resolve_address_of_overloaded_function): Strip 'this',
13737         pass len.
13739 2000-12-21  Jason Merrill  <jason@redhat.com>
13741         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
13742         DECL_TEMPLATE_RESULT.
13744         * search.c (lookup_field_r): Call lookup_fnfields_1, not
13745         lookup_fnfields_here.
13747         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
13749         * call.c (build_object_call): Also allow conversions that return
13750         reference to pointer to function.
13751         (add_conv_candidate): Handle totype being ref to ptr to fn.
13752         (build_field_call): Also allow members of type reference to function.
13753         Lose support for calling pointer to METHOD_TYPE fields.
13755         * error.c (dump_expr): Handle *_CAST_EXPR.
13757         * typeck2.c (build_scoped_ref): Always convert to the naming class.
13759         * tree.c (break_out_cleanups): Lose.
13760         * cp-tree.h: Remove prototype.
13761         * typeck.c (build_component_ref): Don't break_out_cleanups.
13762         (build_compound_expr): Likewise.
13763         * semantics.c (finish_expr_stmt): Likewise.
13765 2000-12-20  Richard Henderson  <rth@redhat.com>
13767         * cp-tree.h: Update declarations.
13768         * decl.c (finish_case_label): Return the new stmt node.
13769         * semantics.c (finish_goto_stmt): Likewise.
13770         (finish_expr_stmt, finish_return_stmt): Likewise.
13771         (finish_break_stmt, finish_continue_stmt): Likewise.
13772         (finish_asm_stmt): Likewise.
13773         * parse.y (already_scoped_stmt): Set STMT_LINENO.
13774         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
13775         (simple_if, simple_stmt): Return the new stmt node.
13776         (save_lineno): New.
13778 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
13780         * cp-tree.h: Don't declare warn_long_long.
13782 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13784         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
13785         IS_AGGR_TYPE.
13787 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13789         * pt.c (unify): Handle when both ARG and PARM are
13790         BOUND_TEMPLATE_TEMPLATE_PARM.
13792 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13794         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
13795         DECL_TEMPLATE_PARM_P.
13797 2000-12-15  Jason Merrill  <jason@redhat.com>
13799         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
13801         * init.c (build_new_1): Don't strip quals from type.
13803         * decl.c (pushdecl): Don't check for linkage on a non-decl.
13805         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
13807         * call.c (build_new_function_call): Lose space before paren in
13808         error message.
13809         (build_new_method_call): Likewise.
13811         * typeck2.c (build_m_component_ref): Propagate quals from datum.
13813 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13815         * pt.c (check_explicit_specialization): Propagate default
13816         function arguments to explicit specializations.
13818 2000-12-13  DJ Delorie  <dj@redhat.com>
13820         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
13821         and <? operators.
13823 2000-12-08  Jason Merrill  <jason@redhat.com>
13825         * error.c (dump_function_name): Don't let the user see __comp_ctor.
13827         Clean up copy-initialization in overloading code.
13828         * call.c (build_user_type_conversion_1): Die if we are asked to
13829         convert to the same or a base type.
13830         (implicit_conversion): Avoid doing so.  Lose reference binding code.
13831         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
13832         direct-initialization.  Also do direct-init part of copy-init.
13833         (build_user_type_conversion): Don't provide context to convert_like.
13834         * cvt.c (ocp_convert): build_user_type_conversion will now provide
13835         the constructor call for copy-init.
13837         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
13838         instantiation of a member template.
13839         (do_decl_instantiation): Not here.
13841 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
13843         * class.c (check_field_decls): Don't special case anonymous
13844         fields in error messages.
13845         (note_name_declared_in_class): Use %D on diagnostic.
13847         * tree.c (pod_type_p): Use strip_array_types.
13848         (cp_valid_lang_attribute): Likewise.
13849         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
13850         multiple evaluations.
13851         (cp_has_mutable_p): Use strip_array_types.
13853 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
13855         * cp-tree.h (sufficient_parms_p): Declare new function.
13856         * call.c (sufficient_parms_p): New function, broken out of ...
13857         (add_function_candidate): ... here. Use it.
13858         (add_conv_candidate): Use it.
13859         * decl.c (grok_ctor_properties): Use it.
13861 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
13863         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
13865 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
13867         * decl2.c (lang_decode_option): Handle -Wformat-security.
13869 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13871         * pt.c (verify_class_unification): New function.
13872         (get_class_bindings): Use it.
13873         (try_class_unification): Tidy.
13874         (unify): Handle when argument of a template-id is not
13875         template parameter dependent.
13876         (template_args_equal): Handle when TREE_CODE's do not match.
13878 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
13880         * lang-specs.h (c++): When invoking the stand-alone preprocessor
13881         for -save-temps, pass all relevant -Defines to it, and then don't
13882         pass them to cc1plus.
13884 2000-12-05  Will Cohen  <wcohen@redhat.com>
13886         * decl.c (finish_case_label): Cleared
13887         more_cleanups_ok in surrounding function scopes.
13888         (define_label): Likewise.
13890 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
13892         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
13893         (get_matching_virtual): Remove.
13894         (look_for_overrides): Declare new function.
13895         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
13896         DECL_VINDEX here.
13897         * class.c (check_for_override): Move base class iteration code
13898         to look_for_overrides.
13899         * search.c (next_baselink): Remove.
13900         (get_virtuals_named_this): Remove.
13901         (get_virtual_destructor): Remove.
13902         (tree_has_any_destructors_p): Remove.
13903         (struct gvnt_info): Remove.
13904         (check_final_overrider): Remove `virtual' from error messages.
13905         (get_matching_virtuals): Remove. Move functionality to ...
13906         (look_for_overrides): ... here, and ...
13907         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
13908         to be overriding.
13910 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
13912         * typeck.c (get_delta_difference): If via a virtual base,
13913         return zero.
13914         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
13915         adjustment.
13917 2000-12-04  Richard Henderson  <rth@redhat.com>
13919         * error.c (dump_tree): Use output_add_string not OB_PUTS.
13921 2000-12-04  Jason Merrill  <jason@redhat.com>
13923         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
13924         (write_builtin_type): Pass intSI_type_node and the like through
13925         type_for_mode.
13926         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
13927         Pass intSI_type_node and the like through type_for_mode.
13928         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
13929         * pt.c (tsubst, unify): Likewise.
13930         * tree.c (walk_tree): Likewise.
13931         * error.c (dump_type): Likewise.
13932         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
13934         * Make-lang.in: Tweak top comment for emacs.
13935         (cp/TAGS): Restore.
13937         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
13939         * class.c (clone_function_decl): Robustify.
13941 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
13943         * decl.c (store_bindings): Only search in the non modified
13944         old_bindings for duplicates.
13946 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
13948         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
13949         TYPE_POLYMORPHIC_P.
13951         * typeck.c (build_static_cast): Remove unused variable.
13953 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
13955         * pt.c: Fix typo in comment.
13957 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
13959         * decl2.c (warn_format): Remove definition.
13960         (lang_decode_option): Handle -Wformat-nonliteral,
13961         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
13963 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
13965         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
13966         (init_decl_processing): Don't create string_type_node,
13967         const_string_type_node, wint_type_node, intmax_type_node,
13968         uintmax_type_node, default_function_type, ptrdiff_type_node and
13969         unsigned_ptrdiff_type_node.  Adjust position of call to
13970         c_common_nodes_and_builtins.
13971         (identifier_global_value): New function.
13973 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
13975         * call.c (standard_conversion): Reject pointer to member
13976         conversions from ambiguous, inaccessible or virtual bases.
13977         * typeck.c (build_static_cast): Don't check pointers to members
13978         specially.
13980 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
13982         * method.c (do_build_copy_constructor): Preserve cv
13983         qualifications when accessing source object members.
13984         (do_build_assign_ref): Likewise. Remove separate diagnostics for
13985         unnamed fields.
13987 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
13989         * method.c (do_build_assign_ref): Construct appropriately
13990         CV-qualified base reference. Don't allow const casts in base
13991         conversion.
13993 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
13995         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
13996         incomplete return type.
13998 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14000         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
14001         * semantics.c (finish_base_specifier): Accept a _TYPE not a
14002         _DECL.
14004 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14006         * spew.c (yyerror): Cope if yylval.ttype is NULL.
14008 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14010         * decl.c (grokdeclarator): Diagnose undefined template contexts.
14012 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
14014         * decl.c (grokdeclarator): Do type access control on friend
14015         class.
14017 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14019         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
14020         bison parser ickiness.
14021         * pt.c (tsubst_friend_function): Enter namespace scope when
14022         tsubsting the function name.
14023         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
14025 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
14027         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
14028         * cvt.c (cp_convert_to_pointer): Add force parameter.
14029         Allow conversions via virtual base if forced.
14030         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
14031         (ocp_convert): Likewise.
14032         * search.c (binfo_from_vbase): Return the virtual base's binfo.
14033         * typeck.c (get_delta_difference): Adjust handling of virtual
14034         bases.
14036 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
14038         * tree.c (struct list_hash): Remove.
14039         (list_hash_table): Make it be an htab.
14040         (struct list_proxy): New type.
14041         (list_hash_eq): New function.
14042         (list_hash_pieces): Renamed from ...
14043         (list_hash): ... this.
14044         (list_hash_lookup): Remove.
14045         (list_hash_add): Remove.
14046         (hash_tree_cons): Use the generic hashtable.
14047         (mark_list_hash): Remove.
14048         (init_tree): Create the hashtable.
14050 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
14052         * method.c (build_mangled_C9x_name): Rename to
14053         build_mangled_C99_name.  Change C9X references in comments to
14054         refer to C99.
14056 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14058         * parse.y (unary_expr): Move VA_ARG from here ...
14059         (primary): ... to here.
14061 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
14063         * semantics.c (finish_id_expr): If type is error_mark, return
14064         error_mark.
14066 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
14068         * pt.c (lookup_template_class): Simplify loop exit constructs.
14069         Cope when there is no partial instantiation of a template
14070         template member.
14072 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
14074         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
14076 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
14078         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
14079         prefix.
14081         * pt.c (do_decl_instantiate): Explicitly clone constructors and
14082         destructors that haven't already been cloned.
14084 2000-11-20  Richard Henderson  <rth@redhat.com>
14086         * parse.y (yyparse_1): Rename the parser entry point.
14088 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
14090         * mangle.c (write_name): Use <unscoped-name> for names directly in
14091         function scope.
14092         (write_unscoped_name): Accept names directly in function scope.
14094 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
14096         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
14097         * parse.y (extdef): Add EXPORT reduction.
14098         * spew.c (yylex): Don't skip export here.
14100 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
14102         * decl.c (init_decl_processing): Correct name of pure virtual
14103         function under the new ABI.
14104         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
14105         (throw_bad_typeid): Likewise for bad typeid function.
14107 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
14109         * decl.c (grokparms): Don't even function types of `void' type,
14110         either.
14111         * mangle.c (write_type): Don't crash when confronted with the
14112         error_mark_node.
14114         * decl.c (grokparms): Don't create parameters of `void' type.
14116 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
14118         * lex.c (mark_impl_file_chain): Delete.
14119         (init_parse): Remove call to ggc_add_string_root.  No need to
14120         ggc_strdup a string constant.  Do not add impl_file_chain to GC
14121         roots.
14122         (handle_pragma_implementation): No need to ggc_strdup main_filename.
14124 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14126         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
14128 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14130         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
14131         * decl.c (grokdeclarator): Don't reject void parms here.
14132         (require_complete_types_for_parms): Simplify, use
14133         complete_type_or_else.
14134         (grokparms): Remove bitrot. Remove funcdef parm.
14135         Deal with ellipsis parm lists here.
14136         * semantics.c (finish_parmlist): Don't append void_list_node
14137         here. Set PARMLIST_ELLIPSIS_P.
14139 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
14141         * typeck2.c (incomplete_type_error): Reorganize to avoid
14142         excessive diagnostics.
14144 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
14146         * lex.c (struct impl_files, internal_filename): Constify a char *.
14148 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
14150         * mangle.c (write_special_name_constructor): Don't generate
14151         assembler junk when confronted with an old-style constructor.
14152         (write_special_name_destructor): Likewise.
14153         (mangle_decl_string): Do it here instead.
14155 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
14157         * call.c (op_error): Make error messages clearer.
14159 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
14161         * decl.c (wrapup_globals_for_namespace): Don't mark things
14162         TREE_ASM_WRITTEN when they're not.
14164 2000-11-15  Jason Merrill  <jason@redhat.com>
14166         * typeck2.c (friendly_abort): Uncount the error before handing
14167         off to fancy_abort.
14169 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
14171         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
14173 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
14175         * class.c (build_vtbl_initializer): Fix typo in comment.
14176         * typeck.c (expr_sizeof): Don't crash on errors.
14178 2000-11-14  Jim Wilson  <wilson@redhat.com>
14180         * lang-specs.h: Add %2 after %(cc1_options).
14182 2000-11-14  Richard Henderson  <rth@redhat.com>
14184         * typeck.c (c_sizeof): Be strict about casting result value
14185         back to c_size_type_node.
14186         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
14188 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
14190         * typeck.c (build_unary_op): Use boolean_increment from
14191         c-common.c, moving the relevant code there.
14193 2000-11-11  Jason Merrill  <jason@redhat.com>
14195         * typeck.c (mark_addressable): Don't call put_var_into_stack.
14197         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
14198         in inlines.
14200 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14202         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
14203         * lex.c (copy_lang_decl): Likewise.
14205 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
14207         * dump.c (cp_dump_tree): Don't dump function bodies here.
14209         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
14210         (dump.o): Update dependency list.
14211         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
14212         (flag_dump_translation_unit): Likewise.
14213         (CP_TYPE_QUALS): Adjust definition.
14214         (DECL_C_BIT_FIELD): Remove.
14215         (SET_DECL_C_BIT_FIELD): Likewise.
14216         (CLEAR_DECL_C_BIT_FIELD): Likewise.
14217         (add_maybe_template): Likewise.
14218         (strip_array_types): Likewise.
14219         (dump_node_to_file): Likewise.
14220         (cp_dump_tree): New function.
14221         * decl.c (init_decl_processing): Set lang_dump_tree.
14222         * decl2.c (flag_dump_translation_unit): Remove.
14223         * dump.c: Move most of it to ../c-dump.c.
14224         (cp_dump_tree): New function.
14225         * pt.c (add_maybe_template): Remove.
14226         * typeck.c (strip_array_types): Likewise.
14228 2000-11-07  Eric Christopher  <echristo@redhat.com>
14230         * decl.c (init_decl_processing): Change definition of
14231         __wchar_t to wchar_t.  Remove artificial declaration of
14232         wchar_t.
14233         * lex.c: Change instances of __wchar_t to wchar_t.
14235 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
14237         * lex.c (do_identifier): Don't lookup_name for operators.
14238         * parse.y (operator): Save looking_for_typename.
14239         (unoperator): Restore it.
14240         * spew.c (frob_opname): Use nth_token for lookahead.
14242 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
14244         * decl.c (grok_op_properties): Always use coerce_new_type and
14245         coerce_delete_type.
14246         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
14247         exception specification. Tidy up.
14248         (coerce_delete_type): Preserve exception specification. Tidy up.
14250 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
14252         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
14253         (push_binding_level), error.c (cp_tree_printer), pt.c
14254         (process_partial_specialization, tsubst_template_arg_vector),
14255         search.c (lookup_member): Use memset () instead of bzero ().
14257 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
14259         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
14261 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
14263         * Make-lang.in (c++.distdir): Remove.
14265 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
14267         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
14268         declarations from different namespaces to be combined.
14270 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
14272         * decl.c: Include tm_p.h.
14274 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
14276         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
14278 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
14280         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
14281         (build_overload_value), repo.c (open_repo_file), xref.c
14282         (open_xref_file): Use strchr () and strrchr () instead of index ()
14283         and rindex ().
14285 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
14287         * call.c (build_over_call): Call fold on the CALL_EXPR.
14289 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
14291         * error.c (dump_template_decl): Separate template hearders with
14292         space not comma.
14294 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
14296         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
14297         TS_* flags with corresponding TFF_*.  Adjust prototypes of
14298         functions (which used to take a tree_string_flags) to take an int.
14300         * cp-tree.h (enum tree_string_flags): Remove
14301         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
14302         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
14303         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14304         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14305         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
14306         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
14307         (type_as_string, decl_as_string, expr_as_string,
14308         context_as_string): Adjust prototype.
14310         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
14311         instead of TS_PLAIN.
14313         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
14314         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
14315         plain `0'.
14317 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
14319         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
14320         (linkage_kind): New enumeration.
14321         (decl_linkage): New function.
14322         * decl2.c (comdat_linkage): Extend comment.
14323         * error.c (dump_function_decl): Print the arguments used to
14324         instantiate a template, even when not printing the type of the
14325         function.
14326         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
14327         not TREE_PUBLIC, to test for external linkage.
14328         * tree.c (decl_linkage): New function.
14330 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
14332         * pt.c (instantiate_decl): Always instantiate static data members
14333         initialized in-class.
14335 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
14337         * Make-lang.in: Move all build rules here from Makefile.in,
14338         adapt to new context.  Wrap all rules that change the current
14339         directory in parentheses.  Expunge all references to $(P).
14340         When one command depends on another and they're run all at
14341         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
14342         all object-file generation rules.  Delete obsolete variables.
14344         * Makefile.in: Delete.
14345         * config-lang.in: Delete outputs= line.
14347 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
14349         * error.c (dump_function_decl): Print no space between
14350         `ptr-operator' the `type-specifier' of the return type.
14351         (dump_type_prefix): Make sure we put space at the appropriate
14352         place.
14354 2000-10-23  Jason Merrill  <jason@redhat.com>
14356         * call.c (equal_functions): Also call decls_match for extern "C" fns.
14358 2000-10-22  Jason Merrill  <jason@redhat.com>
14360         * call.c (build_conditional_expr): Use ocp_convert to force
14361         rvalue conversion.
14363 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
14365         * call.c (standard_conversion): Use RVALUE_CONVs for all
14366         expressions that satisfy lvalue_p, not just those that satisfy
14367         real_lvalue_p.
14369         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
14371         * typeck.c (c_sizeof): Return an expression of `size_t' type,
14372         not one with TYPE_IS_SIZETYPE set.
14373         (dubious_conversion_warnings): Remove special-case code.
14375 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
14377         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
14378         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
14379         (dump_type_prefix): Print vector-of-int as 'int vector'.
14380         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
14381         * tree.c (walk_tree): Handle VECTOR_TYPE.
14383         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
14385 2000-10-21  Jason Merrill  <jason@redhat.com>
14387         * parse.y (operator): Set got_object from got_scope.
14388         Set looking_for_typename.
14389         * decl.c (lookup_name_real): Clear val after setting from_obj.
14390         Reorganize diagnostic.
14392 2000-10-20  Jason Merrill  <jason@redhat.com>
14394         * tree.c (walk_tree): Don't walk into default args.
14396         * error.c (dump_expr): Use host_integerp.
14398 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
14400         * typeck2.c (abstract_virtuals_error): Use "because" instead of
14401         "since" in error message.
14403 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14405         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
14407 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
14409         * decl.c (revert_static_member_fn): Fixed typo.
14411 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
14413         * class.c (subobject_offset_fn): New type.
14414         (dfs_record_base_offsets): Remove.
14415         (record_base_offsets): Likewise.
14416         (dfs_search_base_offsets): Likewise.
14417         (record_subobject_offset): New function.
14418         (check_subobject_offset): Likewise.
14419         (walk_subobject_offsets): Likewise.
14420         (record_subobject_offsets): Likewise.
14421         (layout_conflict_p): Reimplement.
14422         (layout_nonempty_base_or_field): Correct handling of type
14423         conflicts during layout.
14424         (layout_empty_base): Likewise.
14425         (build_base_field): Adjust to handle new representation of empty
14426         base offset table.
14427         (build_base_fields): Likewise.
14428         (layout_virtual_bases): Likewise.
14429         (splay_tree_compare_integer_csts): New function.
14430         (layout_class_type): Use a splay_tree, rather than a varray, to
14431         represent the offsets of empty bases.
14433         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
14434         * decl.c (select_decl): Don't return declarations that are
14435         DECL_ANTICIPATED.
14437 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
14439         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
14440         (fake_std_node): New macro.
14441         * decl.c (in_std): Rename to ...
14442         (in_fake_std): ... this.
14443         (flag_no_builtin): Remove.
14444         (flag_no_nonansi_builtin): Likewise.
14445         (walk_namespaces_r): Use fake_std_node.
14446         (push_namespace): Use std_identifier.
14447         (pop_namespace): Use in_fake_std.
14448         (lookup_name_real): Use fake_std_node.
14449         (init_decl_processing): When -fhonor-std, create the `std'
14450         namespace.  Don't create a dummy fake_std_node in that case.
14451         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
14452         (builtin_function): Put builtins whose names don't begin
14453         with `_' in the std namespace.
14454         * decl2.c (flag_no_builtin): Remove.
14455         (flag_no_nonansi_builtin): Likewise.
14456         (set_decl_namespace): Use fake_std_node.
14457         (validate_nonmember_using_decl): Likewise.
14458         (do_using_directive): Likewise.
14459         (handle_class_head): Likewise.
14460         * dump.c (dequeue_and_dump): Likewise.
14461         * except.c (init_exception_processing): Use std_identifier.
14462         * init.c (build_member_call): Use fake_std_node.
14463         * rtti.c (init_rtti_processing): Use std_identifier.
14465 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
14467         * cp-tree.h (back_end_hook): Remove declaration.
14468         * decl2.c (back_end_hook): Remove definition.
14470         * dump.c (dequeue_and_dump): Dump TREE_USED.
14472 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
14474         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
14476 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
14478         * decl.c (WINT_TYPE): Define.
14479         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
14480         c_size_type_node, signed_size_type_node and wint_type_node.
14482 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
14484         * decl2.c (warn_missing_format_attribute): New variable.
14485         (lang_decode_option): Decode -Wmissing-format-attribute.
14487 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
14489         * typeck.c (qualify_type): Remove.
14490         (composite_pointer_type): Fix handling of conversions to `cv void*'.
14492 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14494         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
14496 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14498         * Makefile.in (parse.c, parse.h): Create atomically.
14500 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
14502         * class.c (current_obstack): Remove.
14503         * decl.c (ggc_p): Remove.
14504         (start_decl): Don't use decl_tree_cons.
14505         (grokdeclarator): Don't use build_decl_list.
14506         (start_function): Don't use decl_tree_cons.
14507         (finish_function): Don't mess with obstacks.
14508         * decl2.c (grok_x_components): Don't use build_decl_list.
14509         * lex.c (make_call_declarator): Don't call decl_tree_cons.
14510         (implicitly_declare_fn): Don't call build_decl_list.
14511         * parse.y (frob_specs): Don't call build_decl_list or
14512         decl_tree_cons.
14513         (expr_or_declarator_intern): Don't call decl_tree_cons.
14514         (primary): Don't call build_decl_list.
14515         (fcast_or_absdcl): Likewise.
14516         (typed_declspecs): Don't call decl_tree_cons.
14517         (reserved_declspecs): Don't call build_decl_list.
14518         (declmods): Likewise.
14519         (reserved_typespecquals): Likewise.
14520         (aggr): Likewise.
14521         (new_type_id): Likewise.
14522         (cv_qualifiers): Likewise.
14523         (after_type_declarator_intern): Likewise.
14524         (notype_declarator_intern): Likewise.
14525         (absdcl_intern): Likewise.
14526         (named_parm): Likewise.
14527         * pt.c (most_specialized_class): Likewise.
14528         * repo.c (temporary_obstack): Make it a structure, not a pointer.
14529         (init_repo): Initialize it.
14530         * search.c (current_obstack): Remove.
14531         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
14533 2000-10-09  Richard Henderson  <rth@cygnus.com>
14535         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
14536         (c++ language support bits for libgcc): Remove.
14537         (c++.clean): Remove cplib2.txt cleanup.
14538         * config-lang.in (headers, lib2funcs): Remove.
14540         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
14541         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
14542         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
14543         * inc/new.h, inc/typeinfo: Remove files.
14545 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
14547         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
14548         defined.
14549         (init_decl_processing): Initialize intmax_type_node and
14550         uintmax_type_node.
14552 2000-10-06  Richard Henderson  <rth@cygnus.com>
14554         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
14555         (original_result_rtx): Remove.
14556         * decl.c (save_function_data): Don't clear x_result_rtx.
14557         (mark_lang_function): Don't mark it either.
14558         * expr.c (fixup_result_decl): Remove.
14559         * semantics.c (genrtl_named_return_value): Frob the return decl
14560         before calling emit_local_var.
14561         (genrtl_finish_function): Don't call fixup_result_decl.
14562         Always emit the jump to return_label.
14564 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
14566         * pt.c (lookup_template_class): Set current access for enum.
14567         (tsubst_enum): Set file & line for enum decl.
14569         * spew.c (yylex): Remove unused variable.
14571 2000-10-05  Richard Henderson  <rth@cygnus.com>
14573         * semantics.c (genrtl_finish_function): Don't init or check
14574         can_reach_end; remove noreturn and return value checks.
14576 2000-10-05  Tom Tromey  <tromey@cygnus.com>
14578         * init.c (build_java_class_ref): Use `build_static_name' with a
14579         suffix, not a prefix, to build the class object's name.
14581 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14583         * cp-tree.h (access_kind): Fix comment typo.
14584         * decl2.c (grokfield): Fix diagnostic typo.
14585         * semantics.c (finish_template_type): Fix comment typo.
14586         (finish_qualified_object_call_expr): Likewise.
14588 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14590         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
14591         tsubsting fails.
14593 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
14595         * spew.c (frob_id): New static function.
14596         (frob_opname): Use it.
14597         (yylex): Use it.
14599 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
14601         * decl.c (lang_mark_false_label_stack): Remove.
14602         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
14604 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
14606         * gxxint.texi: Use @email for formatting email addresses.
14608 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
14610         * error.c: Remove direct obstack manipulation.  Replace with
14611         output_buffer-based formatting.  Adjust calls to removed macros.
14612         (obstack_chunk_alloc, obstack_chunk_free): Remove.
14613         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
14614         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
14616 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
14618         * ir.texi: Move to ../c-tree.texi.
14620 2000-09-20  Jason Merrill  <jason@redhat.com>
14622         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
14624 2000-09-21  Andreas Jaeger  <aj@suse.de>
14626         * errfn.c: Move declaration of cp_printer and cp_printers to ...
14627         * cp-tree.h: ... here.
14629         * error.c: Remove declaration of cp_printer.
14631 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
14633         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
14635 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
14637         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
14638         users.
14640 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
14642         * decl.c (start_function): Robustify.
14644 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14646         * cp-tree.h (check_function_format): Accept a `status' parameter.
14648         * call.c, typeck.c: Updates calls to `check_function_format'.
14650 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
14652         * decl2.c (handle_class_head): Always push some scope even
14653         in the error case.
14655 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
14657         * cp-tree.h (struct cp_language_function): Remove
14658         x_scope_stmt_stack and name_declared.
14659         (current_scope_stmt_stack): Remove.
14660         (function_name_declared_p): New macro.
14661         (struct lang_decl_flags): Use c_lang_decl as a base class.
14662         (context): Remove.
14663         (struct lang_decl): Replace saved_tree with context.
14664         (DECL_FRIEND_CONTEXT): Adjust accordingly.
14665         (SET_DECL_FRIEND_CONTEXT): Likewise.
14666         (DECL_VIRTUAL_CONTEXT): Likewise.
14667         (DECL_SAVED_TREE): Remove.
14668         (C_DECLARED_LABEL_FLAG): Likewise.
14669         (cplus_expand_expr_stmt): Don't declare.
14670         (add_decl_stmt): Likewise.
14671         (add_scope_stmt): Likewise.
14672         * decl.c (mark_stmt_tree): Remove.
14673         (case_compare): Likewise.
14674         (finish_case_label): Use c_add_case_label.
14675         (init_decl_processing): Set more language-specific hooks.
14676         (build_enumerator): Fix typo in comment.
14677         (cplus_expand_expr_stmt): Remove.
14678         (mark_lang_function): Use mark_c_language_function.
14679         (lang_mark_tree): Use c_mark_lang_decl.
14680         * decl2.c: Change order of inclusion.
14681         * except.c: Likewise.
14682         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
14683         back on c_expand_expr.
14684         * friend.c: Include expr.h.
14685         * init.c: Change order of inclusion.
14686         * Makefile.in: Update dependencies.
14687         * lex.h (free_lang_decl_chain): Remove.
14688         * optimize.c (maybe_clone_body): Use function_name_declared_p.
14689         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
14690         it doesn't exist.
14691         (instantiate_decl): Use function_name_declared_p.
14692         * semantics.c (lang_expand_expr_stmt): Remove.
14693         (set_current_function_name_declared): Likewise.
14694         (current_function_name_declared): Likewise.
14695         (begin_compound_stmt): Use function_name_declared_p.
14696         (add_decl_stmt): Remove.
14697         (setup_vtbl_ptr): Use function_name_declared_p.
14698         (add_scope_stmt): Remove.
14699         (current_scope_stmt_stack): New function.
14700         (cp_expand_stmt): Don't handle SCOPE_STMTs.
14701         (expand_body): Use function_name_declared_p.
14702         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
14703         * typeck.c: Change order of includes.
14704         (convert_sequence): Remove.
14706 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
14708         * lex.c (reswords): Add _Complex.
14710 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14712         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
14714 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
14716         * init.c (begin_init_stmts): Don't use // comments.
14718 2000-09-12  Jason Merrill  <jason@redhat.com>
14720         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
14721         all non-extern arrays.
14723         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
14724         typenames, too.  Downgrade complaint to pedwarn.
14725         (xref_tag): Warn about surprising behavior of 'friend struct T'.
14726         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
14727         'class This::Inherited'.
14729 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
14731         * decl.c (finish_case_label): Given the LABEL_DECL a
14732         DECL_CONTEXT.
14734 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
14736         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
14737         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
14738         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
14739         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
14740         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
14741         New macros.
14742         (sorry_for_unsupported_tree, print_scope_operator,
14743         print_left_paren, print_right_paren, print_left_bracket,
14744         print_right_bracket, print_whitespace): Likewise.
14745         (aggr_variety): Rename to class_key_or_enum.
14746         (print_type): Rename to print_type_id.
14747         (print_type_specifier_seq, print_simple_type_specifier,
14748         print_elaborated_type_specifier,
14749         print_rest_of_abstract_declarator,
14750         print_parameter_declaration_clause, print_exception_specification,
14751         print_nested_name_specifier, print_template_id,
14752         typedef_original_name,  print_template_argument_list_start,
14753         print_template_argument_list_end): New functions.
14755 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14757         * ir.texi: Add more documentation.
14759 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
14761         * cp-tree.h (struct saved_scope): Remove x_function_parms.
14762         (current_function_parms): Don't define.
14763         (struct cp_language_function): Remove parms_stored.
14764         (current_function_just_assigned_this): Don't define.
14765         (current_function_parms_stored): Likewise.
14766         (static_ctors): Declare.
14767         (static_dtors): Likewise.
14768         (SF_EXPAND): Don't define.
14769         (expand_start_early_try_stmts): Remove declaration.
14770         (store_parm_decls): Likewise.
14771         * decl.c (static_ctors): Don't declare.
14772         (static_dtors): Likewise.
14773         (struct binding_level): Remove this_block.
14774         (poplevel): Remove dead code.
14775         (set_block): Likewise.
14776         (mark_binding_level): Don't mark this_block.
14777         (mark_saved_scope): Don't mark x_function_parms.
14778         (init_decl_processing): Don't add current_function_parms as a GC
14779         root.
14780         (check_function_type): Change prototype.
14781         (start_function): Remove RTL-generation code.
14782         (expand_start_early_try_stmts): Remove.
14783         (store_parm_decls): Give it internal linkage.  Remove
14784         RTL-generation code.
14785         (finish_function): Remove RTL-generation code.
14786         * decl2.c (static_ctors): Fix formatting.
14787         (static_dtors): Likewise.
14788         * method.c (use_thunk): Don't call store_parm_decls.
14789         (synthesize_method): Likewise.
14790         * optimize.c (maybe_clone_body): Likewise.
14791         * parse.y (fn.def2): Likewise.
14792         (.set_base_init): Likewise.
14793         (nodecls): Likewise.
14794         * pt.c (instantiate_decl): Likewise.
14795         * rtti.c (synthesize_tinfo_fn): Likewise.
14796         * semantics.c (genrtl_try_block): Simplify.
14797         (expand_body): Use genrtl_start_function and
14798         genrtl_finish_function.
14799         (genrtl_start_function): New function.
14800         (genrtl_finish_function): Likewise.
14802 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
14804         * error.c (cp_tree_printer, case 'P'): Append break.
14806 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
14808         * cp-tree.h (frob_opname): Declare.
14809         * parse.y (saved_scopes): New static variable.
14810         (cp_parse_init): Adjust.
14811         (do_id): If lastiddecl is NULL, do do_identifier.
14812         (operator): Save scope information.
14813         (unoperator): New reduction. Restore scope information.
14814         (operator_name): Append unoperator. Call frob_opname.
14815         * spew.c (frob_opname): Define.
14817 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
14819         * decl.c, rtti.c: Include defaults.h if not already included.
14820         Don't define the *_TYPE_SIZE macros.
14822 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
14824         * cp-tree.h (push_switch): Change prototype.
14825         (check_cp_case_value): Remove declaration.
14826         (decl_constant_value): Likewise.
14827         * decl.c (struct cp_switch): Add switch_stmt and cases.
14828         (case_compare): New function.
14829         (push_switch): Set switch_stmt.  Initialize cases.
14830         (pop_switch): Clean up cases.
14831         (define_case_label): Rename to ...
14832         (finish_case_label): ... this.  Do semantic analysis for case
14833         labels here.
14834         (start_function): Correct comment.
14835         * decl2.c (check_cp_case_value): Remove.
14836         * expr.c (do_case): Remove.
14837         * pt.c (tsubst_expr): Adjust call to finish_case_label.
14838         * semantics.c (genrtl_do_poplevel): Remove declaration.
14839         (RECHAIN_STMTS): Remove.
14840         (finish_break_stmt): Use build_break_stmt.
14841         (finish_continue_stmt): Use build_continue_stmt.
14842         (finish_switch_cond): Adjust condition here, rater than in
14843         c_expand_start_case.
14844         (finish_case_label): Remove.
14845         * typeck.c (c_expand_return): Remove.
14846         (c_expand_start_case): Likewise.
14848 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
14850         * ir.texi: Document type nodes.
14852 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
14854         * cp-tree.h (init_cp_semantics): Declare.
14855         (genrtl_try_block): Don't declare.
14856         (genrtl_handler): Likewise.
14857         (genrtl_catch_block): Likewise.
14858         (genrtl_ctor_stmt): Likewise.
14859         (genrtl_subobject): Likewise.
14860         (genrtl_do_poplevel): Likewise.
14861         (genrtl_named_return_value): Likewise.
14862         * lex.c (init_parse): Call init_cp_semantics.
14863         * semantics.c (genrtl_try_block): Give it internal linkage.
14864         (genrtl_handler): Likewise.
14865         (genrtl_catch_block): Likewise.
14866         (genrtl_ctor_stmt): Likewise.
14867         (genrtl_subobject): Likewise.
14868         (genrtl_do_poplevel): Likewise.
14869         (genrtl_named_return_value): Likewise.
14870         (lang_expand_stmt): Rename to ...
14871         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
14872         (init_cp_semantics): Define.
14874         * decl.c (initialize_local_var): Remove RTL-generating code.
14875         * semantics.c (genrtl_try_block): Fix formatting.
14877         Move statement-tree facilities from C++ to C front-end.
14878         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
14879         (void_zero_node): Remove.
14880         (stmt_tree): Likewise.
14881         (scope_chain): Adjust.
14882         (language_function): Rename to cp_language_function.
14883         (cp_function_chain): Adjust.
14884         (current_stmt_tree): Remove.
14885         (last_tree): Likewise.
14886         (last_expr_type): Likewise.
14887         (struct lang_decl): Adjust.
14888         (STMT_IS_FULL_EXPR_P): Remove.
14889         (add_tree): Remove.
14890         (begin_stmt_tree): Likewise.
14891         (finish_stmt_tree): Likewise.
14892         (walk_tree_fn): Likewise.
14893         (walk_stmt_tree): Likewise.
14894         * class.c (finish_struct): Replace use of add_tree with add_stmt.
14895         * decl.c (mark_stmt_tree): Adjust type.
14896         (init_decl_processing): Don't build void_zero_node.
14897         (initialize_local_var): Adjust usage of current_stmt_tree.
14898         (finish_enum): Use add_stmt, not add_tree.
14899         (save_function_data): Adjust use of language_function.
14900         (finish_constructor_body): Use add_stmt, not add_tree.
14901         (finish_destructor_body): Likewise.
14902         (push_cp_function_context): Adjust use of language_function.
14903         (pop_cp_function_context): Likewise.
14904         (mark_lang_function): Likewise.
14905         (mark_cp_function_context): Likewise.
14906         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
14907         (build_vec_init): Likewise.
14908         * semantics.c (SET_LAST_STMT): Remove.
14909         (RECHAIN_STMTS): Don't use it.
14910         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
14911         (current_stmt_tree): Define.
14912         (add_tree): Remove.
14913         (finish_goto_stmt): Use add_stmt, not add_tree.
14914         (finish_expr_stmt): Likewise.
14915         (begin_if_stmt): Likewise.
14916         (finish_then_clause): Likewise.
14917         (begin_while_stmt): Likewise.
14918         (begin_do_stmt): Likewise.
14919         (finish_return_stmt): Likewise.
14920         (begin_for_stmt): Likewise.
14921         (finish_break_stmt): Likewise.
14922         (finish_continue_stmt): Likewise.
14923         (begin_switch_stmt): Likewise.
14924         (finish_case_label): Likewise.
14925         (begin_try_block): Likewise.
14926         (begin_function_try_block): Likewise.
14927         (begin_handler): Likewise.
14928         (begin_catch_block): Likewise.
14929         (begin_compound_stmt): Likewise.
14930         (begin_asm_stmt): Likewise.
14931         (finish_asm_stmt): Likewise.
14932         (finish_label_stmt): Likewise.
14933         (add_decl_stmt): Likewise.
14934         (finish_subobject): Likewise.
14935         (finish_decl_cleanup): Likewise.
14936         (finish_named_return_value): Likewise.
14937         (setup_vtbl_ptr): Likewise.
14938         (add_scope_stmt): Likewise.
14939         (finish_stmt_expr): Likewise.
14940         (prune_unused_decls): Remove.
14941         (begin_stmt_tree): Likewise.
14942         (finish_stmt_tree): Likewise.
14943         (prep_stmt): Adjust use of current_stmt_tree.
14944         (lang_expand_stmt): Likewise.
14945         * tree.c (statement_code_p): Remove.
14946         (cp_statement_code_p): New function.
14947         (walk_stmt_tree): Remove.
14948         (init_tree): Set lang_statement_code_p.
14950 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
14952         Integrated preprocessor.
14954         * Make-lang.in, Makefile.in: Remove all references to input.c,
14955         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
14956         * gxx.gperf, hash.h, input.c: Delete.
14957         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
14958         initialized properly.
14960         * class.c (fixup_pending_inline): Take a tree, not a
14961         struct pending_inline *.  All callers changed.
14962         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
14963         RID_PROTECTED entries in ridpointers[] array here.
14964         * decl.c (duplicate_decls): Do not refer to struct
14965         pending_inline.
14966         (record_builtin_type, init_decl_processing): Use RID_MAX not
14967         CP_RID_MAX.
14968         (grokdeclarator): Use C_IS_RESERVED_WORD.
14969         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
14970         cpplib.
14971         (grok_x_components): Do not inspect pending_inlines chain.
14973         * cp-tree.h (struct lang_identifier): Add rid_code entry.
14974         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
14975         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
14976         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
14977         TIME_IDENTIFIER_FILEINFO): Kill.
14978         Update prototypes.
14979         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
14980         single 32-bit word.
14981         * parse.y: Call do_pending_inlines unconditionally.
14982         reinit_parse_for_method is now snarf_method.  fn.defpen is no
14983         longer necessary.  Remove unnecessary <itype> annotation on
14984         SCOPE.  Do not refer to end_of_file or struct pending_inline.
14985         * semantics.c (begin_inline_definitions): Call
14986         do_pending_inlines unconditionally.
14988         * lex.c: Remove all code now shared with C front end.
14989         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
14990         into the get_identifier table.  Rewrite pragma handling to
14991         work with the registry.  Move code to save tokens for later
14992         processing to spew.c.
14994         * spew.c: Rewrite everything in terms of token streams instead
14995         of text.  Move routines here from lex.c / input.c as
14996         appropriate.  GC-mark trees hanging off the pending inlines
14997         chain.
14999 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
15001         * NEWS: Mention that the named return value extension has been
15002         deprecated.
15003         * cp-tree.h (original_result_rtx): Define.
15004         (TREE_REFERENCE_EXPR): Remove.
15005         (DECL_VPARENT): Likewise.
15006         (pushdecl_nonclass_level): Likewise.
15007         (store_return_init): Likewise.
15008         (reinit_lang_specific): Likewise.
15009         (genrtl_named_return_value): Change prototype.
15010         * decl.c (original_result_rtx): Remove.
15011         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
15012         Do not generate RTL for local variables here.
15013         (store_return_init): Remove.
15014         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
15015         store_return_init.
15016         (finish_named_return_value): Adjust accordingly.  Warn that this
15017         extension is deprecated.
15018         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
15020 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15022         * pt.c (type_unification_real): Replace switch with if.
15023         (unify): Tsubst non-type parms before comparing.
15025 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15027         * error.c (dump_typename): New function, broken out of ...
15028         (dump_type): ... here. Use it.
15029         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
15031 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15033         * init.c (build_offset_ref): Deal with namespace scoped
15034         TEMPLATE_ID_EXPRs.
15036 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
15038         * class.c (resolve_address_of_overloaded_function): Add
15039         explanation message.
15040         * decl.c (define_case_label): Reformat explanation.
15041         * decl2.c (finish_static_data_member_decl): Likewise.
15042         (grokfield): Likewise.
15043         * friend.c (do_friend): Likewise.
15045 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
15047         * tree.c (walk_tree): Expose tail recursion.
15048         (walk_stmt_tree): New function.
15049         * cp-tree.h: Prototype walk_stmt_tree.
15050         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
15051         the BLOCKs directly.  If a BLOCK has no variables after
15052         pruning, discard it.
15053         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
15054         restore the line number.
15056 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
15058         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
15059         (pt.o): Remove dependency on HTAB_H.
15060         * cp-tree.h: Include hashtab.h.
15061         (walk_tree): Change prototype.
15062         (walk_tree_without_duplicates): New function.
15063         * decl.c (check_default_argument): Use it.
15064         * optimize.c (remap_decl): Adjust calls to walk_tree.
15065         (copy_body): Likewise.
15066         (expand_calls_inline): Likewise.
15067         (calls_setjmp_p): Use walk_tree_without_duplicates.
15068         * pt.c: Don't include hashtab.h.
15069         (for_each_template_parm): Use walk_tree_without_duplicates.
15070         * semantics.c (finish-stmt_tree): Likewise.
15071         (expand_body): Likewise.
15072         * tree.c (walk_tree): Add additional parameter.
15073         (walk_tree_without_duplicates): New function.
15074         (count_trees): Use it.
15075         (verify_stmt_tree): Adjust call to walk_tree.
15076         (find_tree): Use walk_tree_without_duplicates.
15077         (no_linkage_check): Likewise.
15078         (break_out_target_exprs): Adjust call to walk_tree.
15079         (cp_unsave): Likewise.
15081 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
15083         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
15084         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15085         * cp-tree.h (TYPE_BINFO): Adjust comment.
15086         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
15087         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
15088         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15089         (TYPE_TEMPLATE_INFO): Likewise.
15090         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
15091         * class.c (push_nested_class): Likewise.
15092         * decl.c (lookup_name_real): Likewise.
15093         (grokdeclarator): Likewise.
15094         (grok_op_properties): Likewise.
15095         (xref_tag): Likewise.
15096         (xref_basetypes): Likewise.
15097         * decl2.c (constructor_name_full): Likewise.
15098         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
15099         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
15100         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
15101         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15102         (dump_type_suffix): Likewise.
15103         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
15104         instead.
15105         (get_aggr_from_typedef): Likewise.
15106         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
15107         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15108         (write_template_parm): Likewise.
15109         (write_template_template_parm): Check tree code instead of
15110         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15111         * method.c (build_overload_nested_name): Add
15112         BOUND_TEMPLATE_TEMPLATE_PARM.
15113         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
15114         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15115         * pt.c (convert_template_argument): Check tree code instead of
15116         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15117         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
15118         (for_each_template_parm): Adjust comment.
15119         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
15120         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15121         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
15122         template_args_equal to compare template template parameter cases.
15123         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15124         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
15125         instead.
15126         * tree.c (copy_template_template_parm): Decide whether to create
15127         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
15128         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
15129         (copy_tree_r): Likewise.
15130         * typeck.c (comptypes): Likewise.  Check tree code instead of
15131         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
15133 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
15135         * decl.c (finish_function): Move the code for handling functions
15136         marked with the constructor and destructor attributes inside the
15137         expand_p block.
15139 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15141         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
15143 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15145         * pt.c (lookup_template_class): Remove abort.
15146         * tree.c (get_type_decl): Allow error_mark_node.
15148 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
15150         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
15151         TEMPLATE_ID_EXPRs.
15153 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
15155         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
15156         new ABI mangling.
15158 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15160         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
15161         union tag mismatch error reporting.
15163 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
15165         * call.c (build_scoped_method_call): Check it is not a namespace.
15167 2000-08-30  Jason Merrill  <jason@redhat.com>
15169         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
15171         * tree.c (bot_manip): Check TREE_CONSTANT rather than
15172         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
15173         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
15175         * decl.c (start_function): Always call make_function_rtl.
15177 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15179         * semantics.c (prune_unused_decls): New function.
15180         (finish_stmt_tree): Call it via walk_tree.
15182 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
15184         * class.c (build_secondary_vtable): Constify a char *.
15185         * decl.c (init_decl_processing): Initialize function_id_node,
15186         pretty_function_id_node, and func_id_node.
15187         * input.c (struct input_source): Constify 'str'.
15188         (feed_input): Constify first argument.
15189         * mangle.c (write_identifier): Constify argument.
15190         * pt.c (mangle_class_name_for_template): Constify argument.
15192 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
15194         * typeck.c (mark_addressable): Remove code that pokes around in
15195         RTL.
15197 2000-08-28  Jason Merrill  <jason@redhat.com>
15199         * lex.c (file_name_nondirectory): Move to toplev.c.
15201         * cp-tree.h (LOCAL_CLASS_P): New macro.
15202         * class.c (finish_struct_1): Use it.
15204 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
15206         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
15207         (write_encoding): Pass another argument to write_name.
15208         (write_name): Add ignore_local_scope parameter.  Fix handling of
15209         local names.
15210         (write_nested_name): Use write_unqualified_name.
15211         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
15212         (write_template_prefix): Use write_unqualified_name.
15213         (write_component): Remove.
15214         (write_local_name): Add parameter.  Use direct local entity to
15215         discriminator calculation.
15216         (write_class_enum_type): Pass another argument to write_name.
15217         (write_template_template_arg): Likewise.
15218         (make_guard_variable): Likewise.
15220 2000-08-27  Jason Merrill  <jason@redhat.com>
15222         * decl.c (pushdecl): Matching decls for local externs are found in
15223         the current level.  Propagate linkage information from previous
15224         declarations.
15226 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
15228         * ir.texi (Expressions): Fix typo.
15230 2000-08-25  Greg McGary  <greg@mcgary.org>
15232         * tree.c (init_tree): Use ARRAY_SIZE.
15234 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15236         * error.c (cp_tree_printer): Rework.
15238 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
15240         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
15241         dyn-string.o.
15242         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
15243         (cp-demangle.o): Remove target.
15244         (dyn-string.o): Likewise.
15246         * decl.c (grokfndecl): Require that `main' return an `int'.
15247         * mangle.c (write_encoding): Don't mangle return types for
15248         conversion functions.
15250 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15252         * error.c (tree_formatting_info): New data type.
15253         (tree_being_formatted): New macro.
15254         (tree_formatting_flags): Likewise.
15255         (put_whitespace): Likewise.
15256         (print_tree_identifier): Likewise.
15257         (print_identifier): Likewise.
15258         (cp_tree_printer, print_function_argument_list, print_declaration,
15259         print_expression, print_function_declaration,
15260         print_function_parameter, print_type, print_cv_qualifier): New
15261         functions.
15262         (init_error): Initialize lang_printer.
15264 2000-08-24  Jason Merrill  <jason@redhat.com>
15266         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
15267         adjustment necessary.
15269 2000-08-24  Greg McGary  <greg@mcgary.org>
15271         * cp-tree.h (MAIN_NAME_P): Remove macro.
15273 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
15275         * error.c (print_instantiation_context): Don't forget to flush the
15276         buffer.
15278 2000-08-23  Jason Merrill  <jason@redhat.com>
15280         * typeck.c (build_ptrmemfunc): Save the input pmf.
15282         * method.c (process_modifiers): Use same_type_p.
15284 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
15286         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
15287         * mangle.c (write_function_type): Change prototype.
15288         (write_encoding): Don't mangle return types for
15289         constructors or destructors.
15290         (write_type): Adjust call to write_function_type.
15291         * pt.c (instantiate_template): Instantiate alternate entry points
15292         when instantiating the main function.
15294 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
15296         * error.c (cp_print_error_function): Don't use embedded '\n' in
15297         output_printf.
15299 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
15301         * decl.c (init_decl_processing): Remove bogus initialization.
15302         * error.c (lang_print_error_function): Restore here.
15303         (init_error): Initialize print_error_function.
15305 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
15307         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
15309 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
15311         * Makefile.in (error.o): Depends on diagnostic.h
15313         * cp-tree.h (problematic_instantiation_changed,
15314         record_last_problematic_instantiation, current_instantiation,
15315         print_instantiation_context): Declare.
15316         (maybe_print_template_context): Remove.
15318         * decl.c (init_decl_processing): Set print_error_function to NULL.
15319         (lang_print_error_function): Remove, since we're using a new
15320         machinery.
15322         * error.c: #include diagnostic.h
15323         (function_category): New function.
15324         (cp_diagnostic_starter): Likewise.
15325         (cp_diagnostic_finalizer): Likewise.
15326         (cp_print_error_function): Likewise.
15327         (maybe_print_instantiation_context): Likewise.
15328         (print_instantiation_full_context): Likewise.
15329         (print_instantiation_partial_context): Likewise.
15330         (print_instantiation_context): Define.
15331         (init_error): Initialize diagnostic pager and finalizer.
15333         * pt.c (problematic_instantiation_changed): Define.
15334         (record_last_problematic_instantiation): Likewise.
15335         (current_instantiation): Likewise.
15336         (maybe_print_template_context): Remove.
15337         (print_template_context): Likewise.
15338         (current_tinst_level): Make static to reflect Brendan Kehoe's
15339         change of 1995-04-13.
15340         (push_tinst_level): Call print_instantiation_context.
15342 2000-08-21  Nix  <nix@esperi.demon.co.uk>
15344         * lang-specs.h: Do not process -o or run the assembler if
15345         -fsyntax-only.
15347 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
15349         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
15350         variables.
15351         * decl2.c (lang_decode_option): Disable gettext attributes for
15352         -ansi.
15354 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
15356         * lex.c (lang_init_options): Default diagnostic message maximum
15357         length to 80, when line-wrapping.
15359 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
15361         * class.c (build_vtbl_initializer): Clear the entire
15362         vtbl_init_data.  Start keeping track of the functions for which we
15363         have created vcall offsets here.
15364         (dfs_build_vcall_offset_vtbl_entries): Remove.
15365         (build_vcall_offset_vtbl_entries): Reimplement.
15366         (add_vcall_offset_vtbl_entries_r): New function.
15367         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
15368         computing when vcall offsets are necessary.
15370 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15372         * decl.c (member_function_or_else): Use cp_error ... %T.
15373         (grokdeclarator): Likewise.
15374         (start_method): Likewise.
15375         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
15377 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15379         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
15380         TYPE_DECLs.
15382 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15384         * cp-tree.h (PTRMEM_OK_P): New macro.
15385         (itf_ptrmem_ok): New enumeration value.
15386         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
15387         argument. Diagnose implicit pointer to member.
15388         (instantiate_type): Don't diagnose implicit pointer to member
15389         here. Pass itf_ptrmem_ok if ok. Adjust calls to
15390         resolve_address_of_overloaded_function.
15391         * init.c (build_offset_ref): Set PTRMEM_OK_P.
15392         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
15393         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
15394         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
15395         (build_unary_op): Deal with single non-static member in
15396         microsoft-land.
15398 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15400         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
15402 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
15404         * cp-tree.h (enum_name_string): Remove prototype.
15405         (report_case_error): Remove prototype.
15406         * cp/typeck2.c (enum_name_string): Remove.
15407         (report_case_error): Remove.
15408         * error.c (dump_expr): Deal with enum values directly.
15409         Correctly negate integer constant.
15411 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15413         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
15414         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
15415         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
15416         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
15417         (__cxa_vec_new): Use __cxa_vec_new2.
15418         (__cxa_vec_delete): Use __cxa_vec_delete2.
15420 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15422         * vec.cc (__cxa_vec_new): Set "C" linkage.
15423         (__cxa_vec_ctor): Likewise.
15424         (__cxa_vec_cctor): Likewise.
15425         (__cxa_vec_dtor): Likewise.
15426         (__cxa_vec_delete): Likewise.
15427         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
15428         (__cxa_vec_ctor): Likewise.
15429         (__cxa_vec_cctor): Likewise.
15430         (__cxa_vec_dtor): Likewise.
15431         (__cxa_vec_delete): Likewise.
15433 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15435         * class.c (instantiate_type): Reinstate local variable
15436         deleted in previous change.
15438         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
15439         itf_no_attributes.
15441 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15443         * cp-tree.h (instantiate_type_flags): New enumeration.
15444         (instantiate_type): Change parameter.
15445         * class.c (instantiate_type): Adjust prototype. Adjust.
15446         * call.c (standard_conversion): Adjust instantiate_type call.
15447         (reference_binding): Likewise.
15448         (build_op_delete_call): Likewise.
15449         (convert_like_real): Likewise.
15450         * cvt.c (cp_convert_to_pointer): Likewise.
15451         (convert_to_reference): Likewise.
15452         * pt.c (convert_nontype_argument): Likewise.
15453         * typeck.c (build_binary_op): Likewise.
15454         (build_ptrmemfunc): Likewise.
15455         (convert_for_assignment): Likewise.
15457 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
15459         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
15460         (current_aggr): Define.
15461         * decl.c (grokdeclarator): Make sure a friend class is an
15462         elaborated type specifier.
15463         * parse.y (current_aggr): Remove static definition.
15464         (cp_parse_init): Adjust.
15465         (structsp): Clear and restore current_aggr.
15466         (component_decl_list): Clear current_aggr.
15468         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
15469         aggregate tag on the typename's context.
15471         * pt.c (tsubst_friend_class): Return error_mark_node, if
15472         parms becomes NULL.
15473         (instantiate_class_template): Ignore error_mark_node friend types.
15475 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
15477         * cvt.c (warn_ref_binding): New static function, broken out of ...
15478         (convert_to_reference): ... here. Use it.
15480 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
15482         * parse.y (template_arg): Add rule for template qualified with
15483         global scope.
15485 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15487         * decl2.c (add_function): Reorganize.
15488         (arg_assoc): Do not consider function template decls.
15490 2000-08-11  Jason Merrill  <jason@redhat.com>
15492         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
15493         looking inside.
15495 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15497         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
15498         (lookup_nested_tag): Likewise.
15500         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
15501         can be produced.
15503 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15505         * parse.y (named_complex_class_head_sans_basetype): Remove
15506         always true if.
15508 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15510         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
15511         explicit TEMPLATE_ID_EXPR args.
15512         (build_expr_from_tree, case CALL_EXPR): Likewise.
15514 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
15516         * decl.c (check_tag_decl): Diagnose typename's which don't
15517         declare anything.
15519 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
15521         * init.c (build_aggr_init): Reject bogus array initializers
15522         early.
15524 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
15526         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
15527         runtime.
15528         * cp/tinfo.cc (__dynamic_cast): Likewise.
15529         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
15531 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
15533         * cvt.c (convert_to_pointer_force): Fix error message when
15534         attempting to cast from ambiguous base.
15536 2000-08-08  Jason Merrill  <jason@redhat.com>
15538         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
15539         (tsubst_template_arg_vector): Likewise.
15541         * decl2.c (build_anon_union_vars): Choose the largest field; don't
15542         assume that one will be as large as the union.
15544 2000-08-07  Kazu Hirata  <kazu@hxi.com>
15546         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
15547         * decl.c (pop_labels): Likewise.
15549 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
15551         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
15552         specifications.
15553         (__pointer_to_member_type_info): Likewise.
15554         (__base_class_info): Likewise.
15555         (__class_type_info): Likewise.
15556         (__si_class_type_info): Likewise.
15557         (__vmi_class_type_info): Likewise.
15558         * tinfo.cc (__si_class_type_info::__do_find_public_src):
15559         Changed member names to match specifications.
15560         (__vmi_class_type_info::__do_find_public_src): Likewise.
15561         (__si_class_type_info::__do_dyncast): Likewise.
15562         (__vmi_class_type_info::__do_dyncast): Likewise.
15563         (__si_class_type_info::__do_upcast): Likewise.
15564         (__vmi_class_type_info::__do_upcast): Likewise.
15565         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
15566         (__pbase_type_info::__pointer_catch): Likewise.
15567         (__pointer_type_info::__pointer_catch): Likewise.
15568         (__pointer_to_member_type_info::__pointer_catch): Likewise.
15570 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
15572         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
15573         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
15574         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
15576 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
15578         * cp-tree.h (add_method): Change prototype.
15579         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
15580         Don't double the size of the method vector in the error case.
15581         (handle_using_decl): Adjust call to add_method.
15582         (add_implicitly_declared_members): Likewise.
15583         (clone_function_decl): Likewise.
15584         * decl2.c (check_classfn): Likewise.
15585         * semantics.c (finish_member_declaration): Likewise.
15587 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
15589         * decl.c (flag_isoc94): New variable.
15591 2000-08-02  Jason Merrill  <jason@redhat.com>
15593         * pt.c (do_type_instantiation): Add complain parm; don't complain
15594         if called recursively.
15595         * cp-tree.h, parse.y: Adjust.
15597 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
15599         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
15600         -Wno-strict-prototypes.
15602         * g++spec.c: Adjust type of second argument to
15603         lang_specific_driver, and update code as necessary.
15605         * cp-tree.h: Don't prototype min_precision here.
15606         (my_friendly_assert): Cast expression to void.
15607         * semantics.c (do_poplevel): Initialize scope_stmts.
15609 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
15611         * cp-tree.h (DECL_NEEDED_P): Tweak.
15613 2000-07-28  Jason Merrill  <jason@redhat.com>
15615         * lang-specs.h: Use %i in rule for .ii files.
15617 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
15619         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
15621 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
15623         Allow indirect primary bases.
15624         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
15625         primary_base.
15626         (CLASSTYPE_VFIELD_PARENT): Remove.
15627         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
15628         (BINFO_PRIMARY_BINFO): Remove.
15629         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
15630         (BINFO_VBASE_PRIMARY_P): Likewise.
15631         (BINFO_PRIMARY_BASE_OF): New macro.
15632         (BINFO_INDIRECT_PRIMARY_P): Likewise.
15633         (get_primary_binfo): New function.
15634         * decl.c (lang_mark_tree): Make lang_type::primary_base.
15635         * class.c (vcall_offset_data_s): Rename to ...
15636         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
15637         and add ctor_vtbl_p.
15638         (get_derived_offset): Use get_primary_binfo.
15639         (dfs_mark_primary_bases): Adjust handling of virtual primary
15640         bases.
15641         (mark_primary_bases): Likewise.
15642         (set_primary_base): Take a binfo, not an integer, as a
15643         representation of the primary base.
15644         (indirect_primary_base_p): Remove.
15645         (determine_primary_base): Adjust for indirect primary bases.
15646         (dfs_find_final_overrider): Fix typo in coment.
15647         (update_vtable_entry_for_fn): Use get_primary_binfo.
15648         (layout_nonempty_base_or_field): Tweak.
15649         (build_base_fields): Adjust for new primary base semantics.
15650         (dfs_propagate_binfo_offsets): Remove.
15651         (propagate_binfo_offsets): Rewrite.
15652         (dfs_set_offset_for_shared_vbases): Remove.
15653         (layout_virtual_bases): Don't use it.
15654         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
15655         ABI.
15656         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
15657         CLASSTYPE_VFIELD_PARENT.
15658         (dfs_get_primary_binfo): New function.
15659         (get_primary_binfo): Likewise.
15660         (dump_class_hierarchy_r): Tweak printing of primary bases.
15661         (build_vtbl_initializer): Fix typo in comments.  Use
15662         vtbl_init_data.
15663         (build_vcall_and_vbase_vtbl_entries): Likewise.
15664         (build_vbaes_offset_vtbl_entries): Likewise.
15665         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
15666         BV_VCALL_INDEX to handle indirect primary bases.
15667         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
15668         (build_rtti_vtbl_entries): Likewise.
15669         * search.c (get_shared_vbase_if_not_primary): Tweak.
15670         (find_vbase_instance): Likewise.
15671         (binfo_for_vtable): Simplify.
15672         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
15673         (make_binfo): Make it have 11 entries.
15675 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
15677         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
15678         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
15679         ascertaining primaryness.
15680         (G): Remove template_args.
15681         (decl_is_template_id): New function.
15682         (write_encoding): Use decl_is_template_id.
15683         (write_name): Likewise.  Handle type_decls.  Get main variant of
15684         type decls.
15685         (write_nested_name): Likewise.
15686         (write_prefix): Likewise.
15687         (write_template_prefix): Likewise.
15688         (write_special_name_constructor): Remove defunct production from
15689         comment.
15690         (write_bare_function_type): Remove comment about absent parameter.
15691         (write_template_template_arg): Add missing grammar production to
15692         comment.
15694 2000-07-27  Jason Merrill  <jason@redhat.com>
15696         * decl.c (duplicate_decls): If common_type produces a non-typedef
15697         type for a typedef, just use the old type.
15699 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
15701         * cp-tree.h (function_depth): Declare.
15702         (verify_stmt_tree): Likewise.
15703         (find_tree): Likewise.
15704         * decl.c (function_depth): Give it external linkage.
15705         * optimize.c (optimize_function): Increment and decrement it.
15706         * tree.c (verify_stmt_tree_r): New function.
15707         (verify_stmt_tree): Likewise.
15708         (find_tree_r): Likewise.
15709         (find_tree): Likewise.
15711 2000-07-27  Jason Merrill  <jason@redhat.com>
15713         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
15714         TYPE_PTRMEMFUNC_P.
15715         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
15717 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
15719         * decl.c (start_cleanup_fn): Mark the function as `inline'.
15720         * decl2.c (get_guard): Call cp_finish_decl, not
15721         rest_of_decl_compilation, for local guards.
15722         * lex.c (do_identifier): Remove unused variable.
15724 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
15726         * parse.y:  Add missing ';'.
15728 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
15730         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
15731         of `extern "C++"'.
15733 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
15735         Kill strict_prototype. Backwards compatibility only for
15736         non NO_IMPLICIT_EXTERN_C systems.
15737         * cp-tree.h (flag_strict_prototype): Remove.
15738         (strict_prototype): Remove.
15739         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15740         * decl.c (maybe_push_to_top_level): Adjust.
15741         (pop_from_top_level): Adjust.
15742         (decls_match): Only allow sloppy parm matching for ancient
15743         system headers.
15744         (init_decl_processing): Adjust.
15745         (grokdeclarator): Adjust.
15746         * decl2.c (flag_strict_prototype): Remove.
15747         (strict_prototype): Remove.
15748         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
15749         (lang_f_options): Remove "strict-prototype".
15750         (unsupported-options): Add "strict-prototype".
15751         * lex.c (do_identifier): Adjust.
15752         (do_scoped_id): Adjust.
15753         * parse.y (empty_parms): Adjust.
15754         * class.c (push_lang_context): Adjust.
15755         (pop_lang_context): Adjust.
15756         * typeck.c (comp_target_parms): Adjust.
15758 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
15760         * decl.c (poplevel): Deal with anonymous variables at for scope.
15761         (maybe_inject_for_scope_var): Likewise.
15763 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
15765         * decl.c: Remove all signal handling code, now done in toplev.c.
15767 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
15769         * decl.c (make_rtl_for_nonlocal_decl): Rework.
15771         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
15772         correctly.
15774 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
15776         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
15777         Define my_friendly_assert and my_friendly_abort as macros
15778         which may call friendly_abort.  Prototype friendly abort, not
15779         my_friendly_abort or my_friendly_assert.
15780         * decl.c (signal_catch): Report the signal caught in the error
15781         message.  Call fatal directly.
15782         * typeck2.c (ack, my_friendly_assert): Delete.
15783         (my_friendly_abort): Rename to friendly_abort.  Expect file,
15784         line, and function parameters.  Report the abort code, then
15785         call fancy_abort.  Do not mask an abort if errors have
15786         already occurred.
15788 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
15790         * typeck.c (comp_target_parms): Remove obsolete parameter.
15791         (comp_target_types): Adjust.
15793 2000-07-17  Jason Merrill  <jason@redhat.com>
15795         * typeck.c (mark_addressable): Never set TREE_USED.
15796         * call.c (build_call): Don't abort on calls to library functions
15797         that have been declared normally.
15799         * typeck.c (build_binary_op): Fix grammar in warning.
15801         * exception.cc (__eh_free): Fix prototype.
15803         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
15805         * decl.c (pushdecl): Handle seeing an OVERLOAD in
15806         IDENTIFIER_NAMESPACE_VALUE.
15808 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
15810         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
15811         * method.c (use_thunk): Correct handling of vcall offsets.
15813 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
15815         * .cvsignore: parse.h and parse.c have no cp- prefix.
15817 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
15819         * .cvsignore: New file.
15821 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
15823         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
15825 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
15827         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
15828         * parse.c: Remove.
15829         * parse.h: Likewise.
15831 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
15833         * class.c (layout_class_type): Add pointers to virtual bases after
15834         base classes under the old ABI.
15836 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
15838         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
15839         (finish_continue_stmt): Likewise.
15840         (begin_for_stmt): Remove call to note_level_for_for.
15841         (finish_goto_stmt): Change call from build_min_nt
15842         to build_stmt.
15843         (finish_expr_stmt): Likewise.
15844         (begin_if_stmt): Likewise.
15845         (begin_while_stmt): Likewise.
15846         (finish_while_stmt): Likewise.
15847         (finish_return_stmt): Likewise.
15848         (begin_for_stmt): Likewise.
15849         (finish_for_stmt): Likewise.
15850         (finish_break_stmt): Likewise.
15851         (begin_switch_stmt): Likewise.
15852         (finish_case_label): Likewise.
15853         (genrtl_try_block): Likewise.
15854         (begin_try_block): Likewise.
15855         (begin_handler): Likewise.
15856         (begin_compound_stmt): Likewise.
15857         (finish_asm_stmt): Likewise.
15858         (finish_label_stmt): Likewise.
15859         (add_decl_stmt): Likewise.
15860         (finish_subobject): Likewise.
15861         (finish_decl_cleanup): Likewise.
15862         (finish_named_return_value): Likewise.
15863         (setup_vtbl_ptr): Likewise.
15864         (add_scope_stmt): Likewise.
15865         * decl.c (finish_constructor_body): Likewise.
15866         (finish_destructor_body): Likewise.
15867         * optimize.c (copy_body_r): Likewise.
15868         (initialize_inlined_parameters): Likewise.
15869         (declare_return_variable): Likewise.
15870         (expand_call_inline): Likewise.
15872 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
15874         * semantics.c (expand_body): Sync interface information
15875         at the end of function body expansion.
15877 2000-07-09  Jason Merrill  <jason@redhat.com>
15879         * init.c (build_new_1): Bail early if the call to new fails.
15881         * decl.c (compute_array_index_type): Check specifically for
15882         an INTEGER_CST, not just TREE_CONSTANT.
15884         * decl.c (duplicate_decls): Don't call duplicate_decls on
15885         the DECL_TEMPLATE_RESULT.
15886         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
15887         codes.
15889         * error.c (dump_template_bindings): Don't crash if we had an
15890         invalid argument list.
15892         * typeck.c (c_expand_start_case): Do narrowing here.
15893         * semantics.c (finish_switch_cond): Not here.
15895 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
15897         * parse.y (asm_clobbers): Do string concatenation.
15899 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
15901         * decl.c (pushtag): Don't put local classes in template functions
15902         on the local_classes list.
15904 2000-07-04  Scott Snyder  <snyder@fnal.gov>
15906         * decl2.c (get_guard): Add missing return for old ABI local
15907         variable case.
15909 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
15911         * cp-tree.h (char_type_p): New function.
15912         * decl.c (init_decl_processing): Don't initialize
15913         signed_wchar_type_node or unsigned_wchar_type_node.
15914         (complete_array_type): Handle brace-enclosed string-constants.
15915         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
15916         * tree.c (char_type_p): New function.
15917         * typeck2.c (digest_init): Use char_type_p.
15919 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
15921         * pt.c (tsubst): Don't layout type, if it's error_mark.
15923 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
15925         * pt.c (instantiate_pending_templates): Reset template level.
15927 2000-07-05  Jason Merrill  <jason@redhat.com>
15929         * call.c (joust): Don't complain about `operator char *()' beating
15930         `operator const char *() const'.
15932 2000-07-04  scott snyder  <snyder@fnal.gov>
15933             Jason Merrill  <jason@redhat.com>
15935         * repo.c (repo_get_id): Handle the case where a class with virtual
15936         bases has a null TYPE_BINFO_VTABLE.
15938 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
15939             Jason Merrill  <jason@redhat.com>
15941         * parse.y (member_init): Just pass in the type.
15942         * init.c (expand_member_init): Handle getting a type.
15944 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15945             Jason Merrill  <jason@redhat.com>
15947         * decl.c (finish_function): Warn if a function has no return
15948         statement.
15949         Suggested by Andrew Koenig.
15950         * typeck.c (check_return_expr): Do set current_function_returns_value
15951         if we got an error_mark_node.
15953 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
15955         * decl2.c (push_decl_namespace): Push the original namespace.
15957 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
15959         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
15960         * semantics.c (begin_class_definition): Clear it.
15962 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
15964         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
15965         (genrtl_expr_stmt): Likewise.
15966         (genrtl_decl_stmt): Likewise.
15967         (genrtl_if_stmt): Likewise.
15968         (genrtl_while_stmt): Likewise.
15969         (genrtl_do_stmt): Likewise.
15970         (genrtl_return_stmt): Likewise.
15971         (genrtl_for_stmt): Likewise.
15972         (genrtl_break_stmt): Likewise.
15973         (genrtl_continue_stmt): Likewise.
15974         (genrtl_scope_stmt): Likewise.
15975         (genrtl_switch_stmt): Likewise.
15976         (genrtl_case_label): Likewise.
15977         (genrtl_begin_compound_stmt): Likewise.
15978         (genrtl_finish_compound_stmt): Likewise.
15979         (genrtl_compound_stmt): Likewise.
15980         (genrtl_asm_stmt): Likewise.
15982         * init.c (begin_init_stmts): Remove call to
15983         genrtl_begin_compound_stmt.
15984         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
15986         * semantics.c (lang_expand_stmt): Changed call to
15987         genrtl_compound_stmt to ignore return value.
15989 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
15991         * mangle.c (canonicalize_for_substitution): Return the canonical
15992         variant of a type.
15994         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
15995         TYPE_DECL.
15996         * typeck.c (commonparms): Remove obstack manipulations.
15998 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
16000         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
16002         * Makefile.in (OBJS): Added ../c-semantics.o.
16003         (OBJDEPS): Likewise.
16005         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
16006         ../c-common.h.
16007         (struct stmt_tree): Added comment.
16008         (current_function_name_declared): Removed.
16009         (stmts_are_full_exprs_p): Likewise.
16010         (genrtl_do_pushlevel): Likewise.
16011         (genrtl_clear_out_block): Likewise.
16012         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
16013         (DECL_ANON_UNION_ELEMS): Likewise.
16014         (emit_local_var): Likewise.
16015         (make_rtl_for_local_static): Likewise.
16016         (do_case): Likewise.
16017         (expand_stmt): Likewise.
16018         (genrtl_decl_cleanup): Likewise.
16019         (c_expand_asm_operands): Likewise.
16020         (c_expand_return): Likewise.
16021         (c_expand_start_case): Likewise.
16023         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
16024         (emit_local_var): Likewise.
16025         (initialize_local_var): Change reference to
16026         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16027         Change reference to stmts_are_full_exprs_p to
16028         current_stmt_tree->stmts_are_full_exprs_p.
16029         (push_cp_function_context): Likewise.
16031         * expect.c (expand_throw): Change reference to
16032         stmts_are_full_exprs_p.
16034         * init.c (build_aggr_init): Change reference to
16035         stmts_are_full_exprs_p.
16036         (build_vec_init): Likewise.
16038         * optimize.c (maybe_clone_body): Change reference to
16039         current_function_name_declared to
16040         cp_function_chain->name_declared.
16042         * pt.c (instantiate_decl): Change reference to
16043         current_function_name_declared to
16044         cp_function_chain->name_declared.
16046         * semantics.c (expand_cond): Moved declaration to c-common.h.
16047         (genrtl_do_pushlevel): Moved to c-semantics.c.
16048         (genrtl_clear_out_block): Likewise.
16049         (genrtl_goto_stmt): Likewise.
16050         (genrtl_expr_stmt): Likewise.
16051         (genrtl_decl_stmt): Likewise.
16052         (gerntl_if_stmt): Likewise.
16053         (genrtl_while_stmt): Likewise.
16054         (genrtl_do_stmt): Likewise.
16055         (genrtl_return_stmt): Likewise.
16056         (genrtl_for_stmt): Likewise.
16057         (genrtl_break_stmt): Likewise.
16058         (genrtl_continue_stmt): Likewise.
16059         (genrtl_scope_stmt): Likewise.
16060         (genrtl_switch_stmt): Likewise.
16061         (genrtl_case_label): Likewise.
16062         (genrtl_begin_compound_stmt): Likewise.
16063         (genrtl_finish_compound_stmt): Likewise.
16064         (genrtl_compound_stmt): Likewise.
16065         (genrtl_asm_stmt): Likewise.
16066         (genrtl_decl_cleanup): Likewise.
16067         (expand_cond): Likewise.
16068         (expand_stmt): Renamed to ...
16069         (lang_expand_stmt): ... this.
16070         (lang_expand_expr_stmt): Initialize.
16071         (set_current_function_name_declared): Likewise.
16072         (stmts_are_full_exprs_p): Likewise.
16073         (current_function_name_declared): Likewise.
16074         (anon_aggr_type_p): Likewise.
16075         (do_poplevel): Change reference to
16076         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
16077         Change reference to stmts_are_full_exprs_p to
16078         current_stmt_tree->stmts_are_full_exprs_p.
16079         (add_tree): Likewise.
16080         (finish_expr_stmt): Likewise.
16081         (prep_stmt): Likewise.
16082         (lang_expand_stmt): Likewise.
16083         (begin_compound_stmt): Change reference to
16084         current_function_name_declared to
16085         cp_function_chain->name_declared and call to
16086         current_function_name_declared().
16087         (setup_vtbl_ptr): Likewise.
16088         (genrtl_do_poplevel): Removed.
16090 2000-06-30  Jason Merrill  <jason@redhat.com>
16092         * init.c (init_init_processing): Go back to aligning like
16093         double_type_node for old ABI.
16094         (get_cookie_size): Make cookie larger if we get a type that needs
16095         more alignment.
16096         (build_vec_delete): Call it.
16098         * typeck.c (qualify_type_recursive): New fn.
16099         (composite_pointer_type): Use it.
16100         (build_binary_op): Use composite_pointer_type.
16102 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
16103             Jason Merrill  <jason@redhat.com>
16105         * typeck.c (check_return_expr): Don't complain about returning
16106         NULL from operator new if -fcheck-new.
16107         * cp-tree.h: Declare flag_check_new here.
16108         * init.c: Not here.
16110 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16112         * mangle.c (find_substitution): Use same_type_p.
16113         (write_encoding): Don't check for substitutions.
16115 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16117         * parse.y (expr_no_comma_rangle): New non-terminal.
16118         (template_parm): Use it for default parameter case.
16119         (template_arg): Use it.
16120         (expr_no_commas): Remove commented out undefined extensions.
16121         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16122         * parse.h, parse.c: Rebuilt.
16124 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
16126         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
16127         (finish_asm_stmt): Do it here, instead.
16129         * cp-tree.h (ridpointers): Don't declare.
16130         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
16131         (record_builtin_java_type): Likewise.
16132         (init_decl_processing): Likewise.
16133         * lex.c: Move inclusion of lex.h.
16134         (ridpointers): Don't define.
16135         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
16136         RID_MAX.
16137         * lex.h (enum rid): Rename to ...
16138         (enum cp_rid): ... this.
16139         (ridpointers): Don't declare.
16140         * parse.y: Move inclusion of lex.h.
16141         * parse.c: Regenerated.
16142         * spew.c: Move inclusion of lex.h.
16144         * cp-tree.h (struct language_function): Remove temp_name_counter.
16145         (temp_name_counter): Remove.
16146         (get_temp_name): Change prototype.
16147         (get_guard): New function.
16148         (get_guard_cond): Likewise.
16149         (set_guard): Likewise.
16150         * cvt.c (build_up_reference): Adjust call to get_temp_name.
16151         * decl.c (expand_static_init): Use get_guard and friends to
16152         implement guard variables.
16153         * decl2.c (get_temp_name): Assume that the variables created are
16154         always static.
16155         (get_sentry): Rename to ...
16156         (get_guard): ... this.  Implement new ABI guard variables.
16157         (get_guard_bits): New function.
16158         (get_guard_cond): Likewise.
16159         (set_guard): Likewise.
16160         (start_static_initialization_or_destruction): Use them.
16161         (do_static_initialization): Replace sentry with guard throughout.
16162         (do_static_destruction): Likewise.
16163         * init.c (create_temporary_var): Add comment.
16165 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
16167         * mangle.c (find_substitution): Use same_type_p.
16168         (write_encoding): Don't check for substitutions.
16170 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
16172         * parse.y (expr_no_comma_rangle): New non-terminal.
16173         (template_parm): Use it for default parameter case.
16174         (template_arg): Use it.
16175         (expr_no_commas): Remove commented out undefined extensions.
16176         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
16177         * parse.h, parse.c: Rebuilt.
16179 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
16181         * cp-tree.h (flag_const_strings): Remove.
16182         (warn_parentheses): Likewise.
16183         (warn_format): Likewise.
16184         (common_type): Likewise.
16185         (default_conversion): Likewise.
16186         (build_binary_op): Likewise.
16187         (cp_build_binary_op): New macro.
16188         * call.c (build_new_op): Use cp_build_binary_op instead of
16189         build_binary_op.
16190         * class.c (build_vtable_entry_ref): Likewise.
16191         * decl.c (expand_static_init): Likewise.
16192         (compute_array_index_type): Likewise.
16193         (build_enumerator): Likewise.
16194         * decl2.c (delete_sanity): Likewise.
16195         (start_static_initialization_or_destruction): Likewise.
16196         * error.c (dump_type_suffix): Likewise.
16197         * init.c (resolve_offset_ref): Likewise.
16198         (build_new): Likewise.
16199         (build_new_1): Likewise.
16200         (build_vec_delete_1): Likewise.
16201         (build_vec_init): Likewise.
16202         (build_delete): Likewise.
16203         * rtti.c (synthesize_tinfo_fn): Likewise.
16204         (synthesize_tinfo_var): Likewise.
16205         * search.c (expand_upcast_fixups): Likewise.
16206         (fixup_all_virtual_upcast_offsets): Likewise.
16207         * typeck.c (build_array_ref): Likewise.
16208         (get_member_function_from_ptrfunc): Likewise.
16209         (build_binary_op): Add parameter.
16210         (pointer_int_sum): Use cp_build_binary_op.
16211         (pointer_diff): Likewise.
16212         (build_modify_expr): Likewise.
16213         (get_delta_difference): Likewise.
16214         (build_ptrmemfunc): Likewise.
16216 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
16218         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
16219         * decl.c (create_implicit_typedef): Adjust.
16220         * decl2.c (build_artificial_parm): Adjust.
16221         * method.c (implicitly_declare_fn): Adjust.
16222         * pt.c (push_inline_template_parms_recursive): Adjust.
16223         (process_template_parm): Adjust.
16224         (overloaded_template_name): Adjust.
16225         * semantics.c (finish_template_template_parm): Adjust.
16227 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
16229         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
16230         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
16231         where to emit thunks.
16232         (build_vtt): Adjust call to build_vtt_inits.
16233         (build_vtt_inits): Add parameter to indicate whether or not
16234         sub-VTTs for virtual bases should be included.  Adjust handling of
16235         construction vtables.
16236         (get_matching_base): New function.
16237         (dfs_build_vtt_inits): Rename to ...
16238         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
16239         construction vtables.
16240         (dfs_fixup_binfo_vtbls): Likewise.
16241         (build_ctor_vtbl_groups): Build construction vtables for virtual
16242         bases, too.
16243         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
16244         to build construction vtbls.
16245         (dfs_accumulate_vtbl_inits): Adjust handling of
16246         construction vtables.
16248         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
16249         types correctly.
16251 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
16253         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
16255 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16257         * search.c (hides): Remove.
16258         (is_subobject_of_p): Add most_derived parameter. Use
16259         CANONICAL_BINFO.
16260         (lookup_field_queue_p): Adjust.
16261         (lookup_field_r): Adjust.
16263 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
16265         * decl2.c (handle_class_head): Bash typedefs to the type's main
16266         decl.
16268 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
16270         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
16271         (begin_global_stmt_expr): ... this.
16272         (genrtl_finish_stmt_expr): Rename to ...
16273         (finish_global_stmt_expr): ... this.
16274         * init.c (begin_init_stmts): Adjust calls.
16275         (finish_init_stmts): Likewise.
16276         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
16277         (begin_global_stmt_expr): ... this.
16278         (genrtl_finish_stmt_expr): Rename to ...
16279         (finish_global_stmt_expr): ... this.
16281 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
16283         * search.c (lookup_member): Fix typo in comment.
16285 2000-06-24  Jason Merrill  <jason@redhat.com>
16287         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
16288         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
16290 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16292         * parse.y (complex_direct_notype_declarator): Support global_scope.
16293         * Makefile.in: Adjust conflict count.
16295 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16297         * parse.y (template_arg): Convert TEMPLATE_DECL
16298         that is a template template parameter to
16299         TEMPLATE_TEMPLATE_PARM here.
16301         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
16302         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
16303         (copy_template_template_parm): Adjust prototype.
16304         * decl.c (grokdeclarator): Remove dead code.
16305         * pt.c (process_template_parm): Tidy.
16306         (lookup_template_class): Construct nodes in
16307         copy_template_template_parm.
16308         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
16309         lookup_template_class.  Use TYPE_TI_TEMPLATE.
16310         * tree.c (copy_template_template_parm): Add NEWARGS
16311         parameter.
16312         (mapcar): Adjust call to copy_template_template_parm.
16313         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
16314         * method.c (build_template_template_parm_names): Change error
16315         code to avoid compilation warning.
16317         * gxxint.texi: Document template template parameter
16318         name mangling.
16320 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
16322         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
16323         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
16324         (cp-demangle.o): New rule.
16325         (dyn-string.o): Likewise.
16326         * inc/cxxabi.h (__cxa_demangle): New declaration.
16328 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
16330         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
16331         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
16332         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
16333         a tree, not an int.
16334         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
16335         (make_thunk): Change prototype.
16336         (emit_thunk): Rename to use_thunk.
16337         (mangle_thunk): Change prototype.
16338         * class.c (get_derived_offset): Simplify.
16339         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
16340         BV_GENERATE_THUNK_WITH_VTABLE_P.
16341         (build_primary_vtable): Simplify.
16342         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
16343         (dfs_find_base): Remove.
16344         (update_vtable_entry_for_fn): Correct bug in finding the base
16345         where a virtual function was first declared.  Figure out whether
16346         or not to emit a vcall-thunk with the vtables in which it appears.
16347         Correct logic for deciding whether to use an ordinary thunk, or a
16348         vcall thunk.
16349         (finish_struct_1): Remove unnecssary code.
16350         (build_vtbl_initializer): Use ssize_int for the running counter of
16351         negative indices.
16352         (build_vtbl_initializer): Only use vcall thunks where necessary.
16353         Mark thunks as needing to be emitted with their vtables, or not.
16354         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
16355         indices.  Use size_binop.
16356         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
16357         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
16358         size_binop.
16359         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
16360         (build_vtable_entry): Mark thunks as needing to be emitted with
16361         their vtables, or not.
16362         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
16363         * decl2.c (mark_vtable_entries): Use use_thunk instead of
16364         emit_thunk.
16365         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
16366         information.
16367         * error.c (dump_expr): Use BV_FN.
16368         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
16369         not an int.
16370         * method.c (make_thunk): Likewise.
16371         (emit_thunk): Rename to use_thunk.  Allow callers to decide
16372         whether or not to actually emit the thunk.  Adjust for changes in
16373         representation of vcall offsets.
16374         * search.c (dfs_get_pure_virtuals): Use BV_FN.
16375         * semantics.c (emit_associated_thunks): New function.
16376         (expand_body): Use it.
16377         * ir.texi: Adjust decriptions of thunks.
16379 2000-06-22  Jason Merrill  <jason@redhat.com>
16381         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
16382         (tsubst_friend_function): Copy it here.
16384         * decl.c (grok_op_properties): Fix typo.
16386         * decl2.c (delete_sanity): Clarify warning, avoid failure on
16387         deleting void*.
16389         * pt.c (check_explicit_specialization): Clarify error.
16391         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
16392         an old OVERLOAD when we're declaring a non-function.
16393         (pushdecl, destroy_local_var): Check for error_mark_node.
16394         (warn_extern_redeclared_static): Also bail early if
16395         we're a CONST_DECL.
16396         (push_overloaded_decl): Ignore an old error_mark_node.
16398 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
16400         * call.c (build_x_va_arg): Check if in a template decl.
16401         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
16403 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16405         * class.c (push_lang_context): TYPE_NAME gets you to the Java
16406         types DECLs.
16407         * decl.c (check_goto): Computed gotos assumed OK.
16409 2000-06-20  Jason Merrill  <jason@redhat.com>
16411         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
16412         for which we don't need to look for instantiations.
16414 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
16416         * parse.y (program): Always call finish_translation_unit.
16417         * parse.c, parse.h: Rebuilt.
16419 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
16421         * method.c: Don't include hard-reg-set.h.
16423 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
16425         * rtti.c (get_base_offset): Cope when vbase field is in a base.
16427 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
16429         * call.c (build_conditional_expr): Use VOID_TYPE_P.
16430         * cvt.c (cp_convert_to_pointer): Likewise.
16431         (convert_to_void): Likewise.
16432         * error.c (dump_expr): Likewise.
16433         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
16434         * init.c (build_delete): Likewise.
16435         * method.c (emit_thunk): Likewise.
16436         * optmize.c (declare_return_variable): Likewise.
16437         * rtti.c (get_tinfo_decl_dynamic): Likewise.
16438         (get_typeid): Likewise.
16439         (build_dynamic_cast_1): Likewise.
16440         * typeck.c (composite_pointer_type): Likewise.
16441         (common_type): Likewise.
16442         (build_indirect_ref): Likewise.
16443         (build_binary_op): Likewise.
16444         (build_x_compound_expr): Likewise.
16445         (check_return_expr): Likewise.
16446         * typeck2.c (add_exception_specifier): Likewise.
16448         * mangle.c (write_method_parms): Use direct comparison for end
16449         of parmlist.
16451 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
16453         * cp-tree.h (genrtl_try_block): Declare function.
16454         (genrtl_handler): Likewise.
16455         (genrtl_catch_block): Likewise.
16456         (genrtl_ctor_stmt): Likewise.
16457         (genrtl_subobject): Likewise.
16458         (genrtl_decl_cleanup): Likewise.
16459         (genrtl_do_poplevel): Likewise.
16460         (genrtl_do_pushlevel): Likewise.
16461         (genrtl_clear_out_block): Likewise.
16462         (genrtl_goto_stmt): Likewise.
16463         (genrtl_expr_stmt): Likewise.
16464         (genrtl_decl_stmt): Likewise.
16465         (genrtl_if_stmt): Likewise.
16466         (genrtl_while_stmt): Likewise.
16467         (genrtl_do_stmt): Likewise.
16468         (genrtl_return_stmt): Likewise.
16469         (genrtl_for_stmt): Likewise.
16470         (genrtl_break_stmt): Likewise.
16471         (genrtl_continue_stmt): Likewise.
16472         (genrtl_scope_stmt): Likewise.
16473         (genrtl_switch_stmt): Likewise.
16474         (genrtl_case_label): Likewise.
16475         (genrtl_begin_compound_stmt): Likewise.
16476         (genrtl_finish_compound_stmt): Likewise.
16477         (genrtl_compound_stmt): Likewise.
16478         (genrtl_asm_stmt): Likewise.
16479         (genrtl_named_return_value): Likewise.
16480         (genrtl_begin_stmt_expr): Likewise.
16481         (genrtl_finish_stmt_expr): Likewise.
16482         (finish_for_stmt): Removed first argument.
16483         (finish_switch_stmt): Likewise.
16485         * semantics.c (genrtl_try_block): Define function.
16486         (genrtl_handler): Likewise.
16487         (genrtl_catch_block): Likewise.
16488         (genrtl_ctor_stmt): Likewise.
16489         (genrtl_subobject): Likewise.
16490         (genrtl_decl_cleanup): Likewise.
16491         (genrtl_do_poplevel): Likewise.
16492         (genrtl_do_pushlevel): Likewise.
16493         (genrtl_clear_out_block): Likewise.
16494         (genrtl_goto_stmt): Likewise.
16495         (genrtl_expr_stmt): Likewise.
16496         (genrtl_decl_stmt): Likewise.
16497         (genrtl_if_stmt): Likewise.
16498         (genrtl_while_stmt): Likewise.
16499         (genrtl_do_stmt): Likewise.
16500         (genrtl_return_stmt): Likewise.
16501         (genrtl_for_stmt): Likewise.
16502         (genrtl_break_stmt): Likewise.
16503         (genrtl_continue_stmt): Likewise.
16504         (genrtl_scope_stmt): Likewise.
16505         (genrtl_switch_stmt): Likewise.
16506         (genrtl_case_label): Likewise.
16507         (genrtl_begin_compound_stmt): Likewise.
16508         (genrtl_finish_compound_stmt): Likewise.
16509         (genrtl_compound_stmt): Likewise.
16510         (genrtl_asm_stmt): Likewise.
16511         (genrtl_named_return_value): Likewise.
16512         (genrtl_begin_stmt_expr): Likewise.
16513         (genrtl_finish_stmt_expr): Likewise.
16514         (finish_for_stmt): Removed first argument and generate rtl
16515         specific code.
16516         (finish_switch_stmt): Likewise.
16517         (do_poplevel): Removed generate rtl specific code.
16518         (do_pushlevel): Likewise.
16519         (add_tree): Likewise.
16520         (finish_goto_stmt): Likewise.
16521         (finish_expr_stmt): Likewise.
16522         (begin_if_stmt): Likewise.
16523         (finish_if_stmt_cond): Likewise.
16524         (finish_then_clause): Likewise.
16525         (begin_else_clause): Likewise.
16526         (finish_else_clause): Likewise.
16527         (finish_if_stmt): Likewise.
16528         (clear_out_block): Likewise.
16529         (begin_while_stmt): Likewise.
16530         (finish_while_stmt_cond): Likewise.
16531         (finish_while_stmt): Likewise.
16532         (begin_do_stmt): Likewise.
16533         (finish_do_body): Likewise.
16534         (finish_do_stmt): Likewise.
16535         (finish_return_stmt): Likewise.
16536         (begin_for_stmt): Likewise.
16537         (finish_for_init_stmt): Likewise.
16538         (finish_for_cond): Likewise.
16539         (finish_for_expr): Likewise.
16540         (finish_break_stmt): Likewise.
16541         (finish_continue_stmt): Likewise.
16542         (begin_switch_stmt): Likewise.
16543         (finish_switch_cond): Likewise.
16544         (finish_case_label): Likewise.
16545         (begin_try_block): Likewise.
16546         (begin_function_try_block): Likewise.
16547         (finish_try_block): Likewise.
16548         (finish_cleanup_try_block): Likewise.
16549         (finish_cleanup): Likewise.
16550         (finish_function_try_block): Likewise.
16551         (finish_handler_sequence): Likewise.
16552         (finish_function_handler_sequence): Likewise.
16553         (begin_handler): Likewise.
16554         (finish_handler_parms): Likewise.
16555         (begin_catch_block): Likewise.
16556         (finish_handler): Likewise.
16557         (begin_compound_stmt): Likewise.
16558         (finish_compound_stmt): Likewise.
16559         (finish_asm_stmt): Likewise.
16560         (finish_label_stmt): Likewise.
16561         (finish_label_decl): Likewise.
16562         (finish_subobject): Likewise.
16563         (finish_decl_cleanup): Likewise.
16564         (finish_named_return_value): Likewise.
16565         (begin_stmt_expr): Likewise.
16566         (finish_stmt_expr): Likewise.
16568         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
16569         to call genrtl_expr_stmt when appropriate.
16571         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
16572         begin_compound_expr to call genrtl_begin_stmt_expr and
16573         genrtl_begin_compound_expr when appropriate.
16574         (finish_init_stmts): Changed calls to finish_compound_expr and
16575         finish_stmt_expr to call genrtl_finish_compound_expr and
16576         genrtl_finish_stmt_expr when appropriate.
16577         (expand_default_init): Changed call to finish_expr_stmt to call
16578         genrtl_expr_stmt when appropriate.
16579         (build_vec_init): Likewise.
16581         * parse.y (simple_stmt): Removed first argument from call to
16582         finish_for_stmt. Removed first argument from call to
16583         finish_switch_stmt.
16585         * parse.c: Regenerated.
16587         * pt.c (tsubst_expr): Removed first argument from call to
16588         finish_for_stmt. Removed first argument from call to
16589         finish_switch_stmt.
16591 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
16593         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
16594         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
16596         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
16597         (cplus_tree_code_length[]): Likewise.
16598         (cplus_tree_code_name[]): Likewise.
16599         (init_parse): Added call to add_c_tree_codes. Changed
16600         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
16602 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
16604         * cp-tree.h (finish_mem_initializers): Declare.
16605         (count_trees): Likewise.
16606         * parse.y (base_init): Use finish_mem_initializers.
16607         * semantics.c (finish_mem_initializers): New function.
16609         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
16610         the number of trees.
16611         (n_trees): Remove.
16612         (count_trees): Don't use it.
16614 2000-06-15  Jason Merrill  <jason@redhat.com>
16616         * tree.c (count_trees): New debugging function.
16618         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
16619         * init.c (build_member_call): Pull out the name of a DECL.
16621         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
16622         * semantics.c (expand_body): Push to TV_INTEGRATION here.
16623         * optimize.c (optimize_function): Not here.
16624         * pt.c (instantiate_decl): Push to TV_PARSE.
16626 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
16628         * cp-tree.h (struct language_function): Remove x_base_init_list
16629         and x_member_init_list.
16630         (current_base_init_list): Remove.
16631         (current_member_init_list): Likewise.
16632         (setup_vtbl_ptr): Change prototype.
16633         (emit_base_init): Likewise.
16634         (expand_member_init): Likewise.
16635         (reinit_parse_for_function): Remove.
16636         * decl.c (save_function_data): Don't clear x_base_init_list and
16637         x_member_init_list.
16638         (mark_language_function): Don't mark them.
16639         * init.c (perform_member_init): Tweak comment.
16640         (sort_member_init): Take the list of initializers as an argument.
16641         (sort_base_init): Likewise.
16642         (emit_base_init): Likewise.
16643         (expand_member_init): Return the initializer.  Don't use global
16644         variables.
16645         * lex.c (reinit_parse_for_function): Remove.
16646         * method.c (build_template_parm_names): Correct substitution.
16647         (do_build_copy_constructor): Don't use current_member_init_list
16648         and current_base_init_list.
16649         (synthesize_method): Likewise.
16650         * parse.y (base_init): Split mem-initializers into
16651         base-initializers and field-initializers.
16652         (member_init_list): Build up the list here.
16653         (member_init): Return the initializer.
16654         (fn.depfn): Don't use reinit_parse_for_function.
16655         * parse.c: Regenerated.
16656         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
16657         ERROR_MARK.
16658         (tsubst_expr): Don't use current_member_init_list
16659         and current_base_init_list.
16660         (tsubst_expr_values): Rename to ...
16661         (tsubst_initializer_list): ... this.  Use convert_from_reference.
16662         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
16663         and current_base_init_list.
16664         (begin_function_definition): Don't call reinit_parse_for_function.
16666         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
16668         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
16669         correctly.
16671         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
16673 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
16675         * cp-tree.h (IF_COND): Move to c-common.h.
16676         (THEN_CLAUSE): Likewise.
16677         (ELSE_CLAUSE): Likewise.
16678         (WHILE_COND): Likewise.
16679         (WHILE_BODY): Likewise.
16680         (DO_COND): Likewise.
16681         (DO_BODY): Likewise.
16682         (RETURN_EXPR): Likewise.
16683         (EXPR_STMT_EXPR): Likewise.
16684         (FOR_INIT_STMT): Likewise.
16685         (FOR_COND): Likewise.
16686         (FOR_EXPR): Likewise.
16687         (FOR_BODY): Likewise.
16688         (SWITCH_COND): Likewise.
16689         (SWITCH_BODY): Likewise.
16690         (CASE_LOW): Likewise.
16691         (CASE_HIGH): Likewise.
16692         (GOTO_DESTINATION): Likewise.
16693         (COMPOUND_BODY): Likewise.
16694         (ASM_CV_QUAL): Likewise.
16695         (ASM_STRING): Likewise.
16696         (ASM_OUTPUTS): Likewise.
16697         (ASM_INPUTS): Likewise.
16698         (ASM_CLOBBERS): Likewise.
16699         (DECL_STMT_DECL): Likewise.
16700         (STMT_EXPR_STMT): Likewise.
16701         (LABEL_STMT_LABEL): Likewise.
16702         (SCOPE_BEGIN_P): Likewise.
16703         (SCOPE_END_P): Likewise.
16704         (SCOPE_STMT_BLOCK): Likewise.
16705         (SCOPE_NULLIFIED_P): Likewise.
16706         (SCOPE_NO_CLEANUPS_P): Likewise.
16707         (SCOPE_PARTIAL_P): Likewise.
16708         (ASM_VOLATILE_P): Likewise.
16709         (STMT_LINENO): Likewise.
16710         (STMT_LINENO_FOR_FN_P): Likewise.
16712         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
16713         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
16714         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
16715         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
16716         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
16718         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
16720         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
16721         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
16723         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
16724         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
16725         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
16727 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
16729         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
16730         * class.c (dfs_find_final_overrider): Set it appropriately.
16731         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
16732         avoid unneeded secondary vptrs.
16734 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
16736         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
16737         (check_bitfield_decl, check_field_decl): Likewise.
16738         (build_vtbl_or_vbase_field, build_base_field): Likewise.
16739         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
16740         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
16741         (xfer_tag, finish_enum): Likewise.
16742         * decl2.c (finish_builtin_type): Likewise.
16743         * init.c (init_init_processing): Likewise.
16744         * pt.c (instantiate_class_template): Likewise.
16745         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
16746         * cp-tree.h (struct lang_type): Add user_align member.
16747         (CLASSTYPE_USER_ALIGN): Define.
16749 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
16751         * Make-lang.in (c++.install-common): Install g++-cross in
16752         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
16753         $(target_alias)-g++ and $(target_alias)-c++.
16755 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
16757         * class.c (vcall_offset_data_s): Add last_init and fns.
16758         (overrides): Rename to same_signature_p.
16759         (dfs_find_final_overrider): Adjust accordingly.
16760         (mark_overriders): Likewise.
16761         (warn_hidden): Likewise.
16762         (build_vtbl_initializer): Reorganize machinery for building things
16763         at negative offsets.
16764         (build_vcall_and_vbase_vtbl_entries): Likewise.
16765         (build_vbase_offset_vtbl_entries): Likewise.
16766         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
16767         offset entries.  Do not create two entries for functions with the
16768         same signature.
16769         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
16770         (build_rtti_vtbl_entries): Reorganize machinery for building things
16771         at negative offsets.
16773         * optimize.c (expand_call_inline): Don't recurse into the code
16774         used to initialize the parameters more than once.
16776 2000-06-11  Mark Mitchell <mark@codesourcery.com>
16778         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
16779         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
16780         (find_substitution): Only use the `Sa' substitution for
16781         std::allocator, not instantiations of it.
16782         (write_template_prefix): Move comment.  Only use a TREE_LIST to
16783         represent substitutions for a member template.
16784         (write_array_type): Mangle array dimensions correctly.
16785         * optimize.c (maybe_clone_body): Copy more information from the
16786         cloned function.
16787         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
16788         on the regenerated declaration.
16790 2000-06-11  Chip Salzenberg  <chip@valinux.com>
16791             Mark Mitchell <mark@codesourcery.com>
16793         * class.c (build_vtable): Clarify comment.
16794         (build_ctor_vtbl_group): Pass the most derived type to
16795         build_vtable.
16797 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16799         * decl2.c (compare_options): Don't needlessly cast away const-ness.
16801 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
16803         * decl.c (add_binding): Handle duplicate declarations of external
16804         variables.
16806 2000-06-09  Chip Salzenberg  <chip@valinux.com>
16807             Mark Mitchell <mark@codesourcery.com>
16809         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
16810         argument.
16811         (write_signed_number): New macro.
16812         (write_unsigned_number): Likewise.
16813         (write_source_name): Use them.
16814         (write_number): Handle signed and unsigned values.
16815         (write_integer_cst): Use tree_int_cst_sgn, and use
16816         write_unsigned_number or write_signed_number as appropriate.
16817         (write_discriminator): Use write_unsigned_number or
16818         write_signed_number as appropriate.
16819         (write_template_arg_literal): Likewise.
16820         (write_array_type): Use tree_low_cst.
16821         (write_template_parm):  Use write_unsigned_number or
16822         write_signed_number as appropriate.
16823         (write_substitution): Adjust call to write_number.
16824         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
16825         (write_expression): Handle non-type template arguments of
16826         reference type correctly.
16827         (mangle_thunk): Use write_signed_number.
16829 2000-06-09  Chip Salzenberg  <chip@valinux.com>
16831         * mangle.c (find_substition): Don't mangle objects with typename
16832         substitutions (e.g. "cin" as "Si").
16834 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
16836         * call.c (add_candidate): Use ggc_alloc_cleared.
16837         * decl.c (lookup_label): Likewise.
16838         * lex.c (retrofit_lang_decl): Likewise.
16840 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
16842         * semantics.c (expand_body): Push to TV_EXPAND.
16843         * optimize.c (optimize_function): Push to TV_INTEGRATION.
16844         * decl.c (start_function): Always call announce_function.
16846         * tinfo2.cc: Just declare abort.
16848 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
16850         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
16851         whenever @ is a symbolic name.
16853 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
16855         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
16857 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
16859         * decl.c (pushdecl): Look up functions by DECL_NAME, not
16860         DECL_ASSEMBLER_NAME.
16862 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
16864         * decl2.c (c_language): Define.
16866 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
16868         * lex.c (lang_init_options): Tweak.
16870         * decl2.c: Remove #inclusion of diagnostic.h
16871         (lang_decode_option): Move diagnostic formatting options to
16872         toplevel.
16874         * lang-options.h: Remove documentation for diagnostic options.
16876         * Makefile.in (lex.o): Depends upon diagnostic.h
16878 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
16880         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
16881         the same DECL_RESULT, it's not a redefinition.
16882         * pt.c (tsubst_decl): Remove code to handle illegal
16883         specializations.
16885 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
16887         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
16889 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
16891         * search.c (maybe_suppress_debug_info): Don't check
16892         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
16894         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
16895         here if extern_p.
16897         Remember instantiation context in deferred instantiations.
16898         * cp-tree.h (struct tinst_level): Remove.
16899         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
16900         * pt.c (current_tinst_level): Now a tree.
16901         (print_template_context, push_tinst_level, pop_tinst_level,
16902         tinst_for_decl): Adjust.
16903         (reopen_tinst_level): New fn.
16904         (init_pt): Register current_tinst_level as a root.
16905         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
16906         of the pending templates list.
16907         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
16908         * lex.c (extract_interface_info): Adjust.
16909         * decl2.c (warn_if_unknown_interface): Adjust.
16911 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
16913         * class.c (indirect_primary_base_p): New function.
16914         (determine_primary_base): Use it.
16916 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
16918         Update new-abi dynamic cast algorithm.
16919         * tinfo.cc (__class_type_info::__dyncast_result): Add
16920         whole_details. Adjust constructor.
16921         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
16922         Avoid unnecessary searching.
16923         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
16925 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16927         * decl.c (init_decl_processing): Don't call record_component_aliases.
16928         * tree.c (build_cplus_array_type_1): Likewise.
16930 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
16932         * ir.texi: Correct typo.
16933         * mangle.c (write_expression): Handle non-type template arguments
16934         with reference type.
16935         * method.c (build_overload_value): Likewise.
16936         * pt.c (convert_nontype_argument): Explicitly represent conversion
16937         to a reference with an ADDR_EXPR.
16938         (unify): Always unify arguments in left-to-right order.
16940 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
16941             Mark Mitchell  <mark@codesourcery.com>
16943         * Make-lang.in (CXX_SRCS): Add mangle.c.
16944         * Makefile.in (CXX_OBJS): Add mangle.o.
16945         (mangle.o): New rule.
16947         * class.c (local_classes): New variable.
16948         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
16949         (get_vtt_name): Use mangle_vtt_name for new ABI.
16950         (init_class_processing): Initialize local_classes.
16951         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
16952         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
16953         (std_identifier): New macro.
16954         (DECL_VOLATILE_MEMFUNC_P): New macro.
16955         (DECL_NAMESPACE_STD_P): Likewise.
16956         (local_classes): Declare.
16957         (get_mostly_instantiated_function_type): Declare.
16958         (init_mangle): Declare.
16959         (mangle_decl): Likewise.
16960         (mangle_type_string): Likewise.
16961         (mangle_type): Likewise.
16962         (mangle_typeinfo_for_type): Likewise.
16963         (mangle_typeinfo_string_for_type): Likewise.
16964         (mangle_vtbl_for_type): Likewise.
16965         (mangle_vtt_for_type): Likewise.
16966         (mangle_ctor_vtbl_for_type): Likewise.
16967         (mangle_thunk): Likewise.
16968         (mangle_conv_op_name_for_type): Likewise.
16969         (mangle_guard_variable): Likewise.
16970         * decl.c (pushtag): Keep track of local classes.
16971         (initialize_predefined_identifiers): Initialize std_identifier.
16972         (init_decl_processing): Use std_identifier.
16973         (start_decl): Don't treat instantiations as specializations.
16974         (grokdeclarator): Likewise.
16975         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
16976         name for fully-instantiated templates.
16977         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
16978         destructors with the new ABI.
16979         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
16980         (grokfield): Use mangle_type for new ABI.
16981         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
16982         (get_sentry): Use mangle_guard_variable for new ABI.
16983         (start_static_initialization_or_destruction): Likewise.
16984         * expr.c (extract_aggr_init): Remove.
16985         (extract_scalar_init): Likewise.
16986         (extract_init): Remove #if 0'd code.
16987         * mangle.c: New function.
16988         * method.c (build_mangled_name): Assert not flag_new_abi.
16989         (build_static_name): Likewise.
16990         (build_decl_overload_real): Likewise.
16991         (build_typename_overload): Likewise.
16992         (build_overload_with_type): Likewise.
16993         (build_overload_name): Likewise.
16994         (get_ctor_vtbl_name): Likewise.
16995         (start_squangling): Likewise.
16996         (get_id_2): Likewise.
16997         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
16998         (init_method): Call init_mangle for new ABI.
16999         (make_thunk): Call mangle_thunk for new ABI.
17000         * operators.def: Correct new ABI manglings for the `%' operator.
17001         Add `::' operator.
17002         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
17003         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
17004         (lookup_template_class): Call mangle_decl for new ABI.
17005         (get_mostly_instantiated_function_type): New function.
17006         (set_mangled_name_for_template_decl): Use it.
17007         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
17008         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
17009         conversion op names.
17010         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
17011         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
17012         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
17013         mangle_typeinfo_string_for_type.
17015 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
17017         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
17018         (INNERMOST_TEMPLATE_ARGS): New macro.
17019         (innermost_args): Remove.
17020         (get_innermost_template_args): New function.
17021         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
17022         * error.c (dump_function_decl): Be caution when using
17023         most_general_template.
17024         * method.c (build_template_parm_names):  Use
17025         INNERMOST_TEMPLATE_ARGS.
17026         * pt.c (add_to_template_args): Tidy comment
17027         (get_innermost_template_args): New function.
17028         (check_explicit_specialization): Clear DECL_INITIAL for a new
17029         specialization.
17030         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
17031         Tidy.
17032         (push_template_decl): Always register specializations of the most
17033         general template.
17034         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
17035         (coerce_template_parms): Likewise.
17036         (lookup_template_class): Likewise.
17037         (innermost_args): Remove.
17038         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
17039         (tsubst_decl): Handle tricky specializations.  Use
17040         get_innermost_template_args.
17041         (instantiate_template): Simplify handling of partial
17042         instantiations.
17043         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
17044         (most_general_template): Reimplement, in a more straightforward
17045         manner.
17046         (regenerate_decl_from_template): Tweak formatting.  Use
17047         TMPL_ARGS_DEPTH for clarity.
17048         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
17050         * dump.c (dequeue_and_dump): Dump information about thunks.
17052 2000-06-01  Richard Henderson  <rth@cygnus.com>
17054         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
17056 2000-06-01  Richard Henderson  <rth@cygnus.com>
17058         * decl2.c (unsupported_options): Fix typo, make const.
17059         (lang_decode_option): Fix bsearch argument order.
17061 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
17063         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
17064         on FIELD_DECLs.
17066 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17068         * cp-tree.h (c_get_alias_set): Deleted.
17069         * Makefile.in (decl.o): Include ../expr.h.
17070         * decl.c (expr.h): Include.
17071         (init_decl_processing): Call record_component_aliases for arrays.
17072         (grokdeclarator): Likewise.
17073         Set TREE_ADDRESSABLE for fields that aren't bitfields.
17074         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
17076 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
17078         Remove guiding declaration support.
17079         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
17080         (flag_guiding_decls): Remove.
17081         * call.c (build_user_type_conversion_1): Remove support for
17082         guiding decls.
17083         (build_new_function_call): Likewise.
17084         (build_new_op): Likewise.
17085         (build_new_method_call): Likewise.
17086         * decl.c (start_function): Likewise.
17087         * friend.c (is_friend): Likewise.
17088         (do_friend): Likewise.
17089         * decl2.c ((flag_dump_translation_unit): Make it const.
17090         (flag_guiding_decls): Remove.
17091         (unsupported_options): New variable
17092         (compare_options): New function.
17093         (lang_decode_option): Use them.
17095         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
17097         * method.c (mangle_expression): Adjust test for legal expression
17098         operators.
17100         * pt.c (instantiate_decl): Save and restore the local
17101         specializations list.
17103 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
17105         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
17107 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
17109         * call.c (add_template_candidate_real): Handle member template
17110         constructors for classes with virtual bases.
17111         (build_user_type_conversion_1): Use in_charge_arg_for_name.
17112         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
17114         * ir.texi: Update thunk documentation.
17116         * call.c (joust): Fix handling of overloaded builtin operators.
17118 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
17120         * cp-tree.h (DECL_ANTICIPATED): New macro.
17121         Document new use of DECL_LANG_FLAG_7.
17122         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
17123         in the user namespace.
17124         * lex.c (do_identifier): If the identifier's declaration has
17125         DECL_ANTICIPATED on, it has not yet been declared.  But do not
17126         replace it with an ordinary implicit declaration.
17128         * tinfo2.cc: Include stdlib.h.
17130 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
17132         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
17133         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
17134         CLASSTYPE_ALIGN.
17136 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
17138         * decl2.c (lang_decode_option): Use skip_leading_substring instead
17139         of plain strncmp.
17141 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
17143         * operators.def (<?): Duplicated, should have been...
17144         (>?): this.  Fixed.
17146 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
17147             Mark Mitchell  <mark@codesourcery.com>
17149         * cp-tree.h (ansi_opname): Make it a macro.
17150         (ansi_assopname): Likewise.
17151         (struct lang_decl_flags): Add assignment_operator_p.
17152         (struct lang_decl): Add operator_code.
17153         (DECL_VTT_PARM): Adjust.
17154         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
17155         overloaded operator.
17156         (SET_OVERLOADED_OPERATOR_CODE): New macro.
17157         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
17158         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
17159         (opname_tab): Remove.
17160         (assignop_tab): Likewise.
17161         (operator_name_info_t): New type.
17162         (operator_name_info): New variable.
17163         (assignment_operator_name_info): Likewise.
17164         (build_cp_library_fn): Remove declaration.
17165         (push_cp_library_fn): Likewise.
17166         (operator_name_string): Likewise.
17167         (build_decl_overload): Likewise.
17168         * call.c (print_z_candidates): Simplify.
17169         (build_object_call): Adjust usage of ansi_opname.  Use
17170         DECL_OVERLOADED_OPERATOR_P.
17171         (op_error): Adjust operator name lookup.
17172         (build_conditional_expr): Adjust usage of ansi_opname.
17173         (build_new_op): Likewise.
17174         (build_op_delete_call): Likewise.
17175         (build_over_call): Likewise.
17176         (joust): Use DECL_OVERLOADED_OPERATOR_P.
17177         * decl.c (duplicate_decls): Copy operator_code.
17178         (init_decl_processing): Adjust parameters to push_cp_library_fn.
17179         (builtin_function): Adjust parameters to build_library_fn_1.
17180         (build_library_fn_1): Accept an overloaded operator code.
17181         (build_library_fn): Pass ERROR_MARK.
17182         (build_cp_library_fn): Accept an overloaded operator code.
17183         (push_cp_library_fn): Likewise.
17184         (grokfndecl): Tweak.
17185         (grokdeclarator): Simplify code to compute names of overloaded
17186         operators.  Adjust use of ansi_opname.
17187         (ambi_op_p): Work on tree_codes, not identifiers.
17188         (unary_op_p): Likewise.
17189         (grok_op_properties): Likewise.
17190         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
17191         (lang_mark_tree): Don't try to mark the operator_code.
17192         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
17193         * error.c (dump_decl): Remove special handling for operator
17194         names.
17195         (dump_function_name): Likewise.
17196         (dump_expr): Adjust name lookup of operators.
17197         (op_to_string): Simplify.
17198         (assop_to_string): Likewise.
17199         * init.c (build_new_1): Adjust use of ansi_opname.
17200         * lex.c (opname_tab): Remove.
17201         (assignop_tab): Likewise.
17202         (ansi_opname): Likewise.
17203         (ansi_assopname): Likewise.
17204         (operator_name_string): Likewise.
17205         (reinit_lang_specific): Likewise.
17206         (operator_name_info): New variable.
17207         (assignment_operator_name_info): Likewise.
17208         (init_operators): New function.
17209         (init_parse): Use it.
17210         (do_identifier): Adjust use of ansi_opname.
17211         * method.c (mangle_expression): Don't use ansi_opname for
17212         mangling.
17213         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
17214         (build_decl_overload): Remove.
17215         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
17216         (do_build_assign_ref): Adjust use of ansi_opname.
17217         (synthesize_method): Likewise.
17218         (implicitly_declare_fn): Likewise.
17219         * operators.def: New file.
17220         * parse.y (operator): Adjust use of ansi_opname.
17221         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
17222         (set_mangled_name_for_template_decl): Don't play games with
17223         current_namespace.
17224         (special_function_p): Adjust use of ansi_opname.
17225         * typeck.c (check_return_expr): Likewise.
17226         * Make-lang.in (cc1plus): Depend on operators.def.
17227         * Makefile.in (lex.o): Likewise.
17228         (decl.o): Likewise.
17230 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
17232         * Make-lang.in (cplib2.ready): Eradicate.
17234 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17236         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
17237         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
17238         (built_min, cp_tree_equal): Likewise.
17240 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
17242         * class.c (layout_nonempty_base_or_field): Replace
17243         `record_layout_info' with `record_layout_info_s'.
17245 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
17247         Fix goto checking.
17248         * cp-tree.h (struct language_function): x_named_labels is now
17249         a struct named_label_list*.
17250         * decl.c (struct named_label_use_list): Renamed from...
17251         (struct named_label_list): ...this.  New struct.
17252         (push_binding_level): Don't set eh_region.
17253         (note_level_for_eh): New fn.
17254         (pop_label): Take label and old value directly.
17255         (pop_labels): Adjust for new named_labels format.
17256         (lookup_label): Likewise.
17257         (poplevel): Note characteristics of a binding level containing a
17258         named label.  Mess with named label lists earlier.
17259         (mark_named_label_lists): New fn.
17260         (mark_lang_function): Call it.
17261         (use_label): New fn, split out from...
17262         (make_label_decl): ...here.  Don't call it.
17263         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
17264         check_previous_gotos): New fns, split out from...
17265         (define_label): ...here.
17266         (check_switch_goto): New fn.
17267         (define_case_label): Call it.
17268         (check_goto): New fn.
17269         * semantics.c (finish_goto_stmt): Call it and use_label.
17270         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
17271         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
17273 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
17275         * class.c (build_vtable_entry_ref): Correct usage of
17276         get_vtbl_decl_for_binfo.
17278         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
17279         * method.c (implicitly_declare_fn): Not here.
17281 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
17283         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
17284         (CPTI_PTMD_DESC_TYPE): ... here.
17285         (ptmd_desc_type_node): Rename to ...
17286         (ptm_desc_type_node): ... here.
17287         * decl.c: Likewise.
17288         * rtti.c (ptmd_initializer): Rename to ...
17289         (ptm_initializer): ... here.
17290         (sythesize_tinfo_var): Adjust. Deal with pointer to member
17291         function.
17292         (create_tinfo_types): Adjust.
17294 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
17296         Finish implementation of VTTs.
17297         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
17298         CPTI_VTT_PARM_IDENTIFIER.
17299         (vtt_parm_identifier): New macro.
17300         (vtt_parm_type): Likewise.
17301         (BINFO_SUBVTT_INDEX): Likewise.
17302         (BINFO_VPTR_INDEX): Likewise.
17303         (struct lang_decl): Add vtt_parm.
17304         (DECL_VTT_PARM): New macro.
17305         (DECL_USE_VTT_PARM): Likewise.
17306         (DECL_NEEDS_VTT_PARM_P): Likewise.
17307         (get_vtt_name): Declare.
17308         (build_artificial_parm): Likewise.
17309         (fixup_all_virtual_upcast_offsets): Likewise.
17310         (expand_indirect_vtbls_init): Remove.
17311         * call.c (build_new_method_call): Pass the vtt to subobject
17312         constructors and destructors.
17313         * class.c (get_vtt_name): Give it external linkage.
17314         (build_clone): Handle the magic VTT parameters for clones.
17315         (clone_function_decl): Fix typo in comment.
17316         (build_vtt): Keep track of the indices in the VTTs where various
17317         entities are stored.
17318         (build_vtt_inits): Likewise.
17319         (dfs_build_vtt_inits): Likewise.
17320         (build_ctor_vtbl_group): Tweak type of construction vtables.
17321         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
17322         primary bases, when building construction vtables.
17323         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
17324         (initialize_predefined_identifiers): Add vtt_parm_identifier.
17325         (init_decl_processing): Initialize vtt_parm_type.
17326         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
17327         (lang_mark_tree): Make vtt_parm.
17328         * decl2.c (build_artificial_parm): New function.
17329         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
17330         (grokclassfn): Use build_artificial_parm.
17331         * init.c (initialize_vtbl_ptrs): Call
17332         fixup_all_virtual_upcast_offsets directly.
17333         (perform_member_init): Use the complete subobject destructor for
17334         member cleanups.
17335         (build_vtbl_address): New function.
17336         (expand_virtual_init): Handle VTTs.
17337         * optimize (maybe_clone_body): Likewise.
17338         * search.c (fixup_all_virtual_upcast_offsets): Give it external
17339         linkage.
17340         (expand_indirect_vtbls_init): Remove.
17341         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
17342         * tree.c (make_binfo): Make them bigger.
17344 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
17346         * inc/cxxabi.h (__pbase_type_info): Define, based on
17347         __pointer_type_info.
17348         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
17349         (__pointer_to_member_type_info): Likewise.
17350         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
17351         (__pointer_to_member_type_info::__is_pointer_p): Remove.
17352         (__pointer_type_info::__do_catch): Rename to ...
17353         (__pbase_type_info::__do_catch): ... here. Adjust.
17354         (__pbase_type_info::__pointer_catch): Implement.
17355         (__pointer_type_info::__pointer_catch): Adjust.
17356         (__pointer_to_member_type_info::__pointer_catch): Adjust.
17358 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
17360         * tinfo.h (__user_type_info::contained_virtual_p): New
17361         predicate.
17362         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
17363         shaped hierarchy.
17364         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
17365         diamond shaped hierarchy. Add early out for mixed diamond and
17366         duplicate shaped hierarchy.
17368 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
17370         * cp-tree.h (build_delete): Change prototype.
17371         (build_vec_delete): Likewise.
17372         * call.c (build_scoped_method_call): Use special_function_kind
17373         values to indicate the kind of destruction to be done.
17374         (build_method_call): Likewise.
17375         * decl.c (finish_destructor_body): Likewise.
17376         (maybe_build_cleanup_1): Likewise.  Rename to ...
17377         (maybe_build_cleanup): ... this.
17378         * decl2.c (delete_sanity): Use special_function_kind
17379         values to indicate the kind of destruction to be done.
17380         (build_cleanup): Likewise.
17381         * init.c (perform_member_init): Likewise.
17382         (build_vec_delete_1): Likewise.
17383         (build_dtor_call): Simplify.
17384         (build_delete): Use special_function_kind
17385         values to indicate the kind of destruction to be done.
17386         (build_vbase_delete): Likewise.
17387         (build_vec_delete): Likewise.
17389         * init.c (sort_member_init): Fix typo in error message generation
17390         code.
17392 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
17394         * semantics.c (begin_class_definition): make the packed
17395         attribute be sensitive to the "-fpack-struct" command line flag
17397 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
17399         Update new-abi upcast algorithm.
17400         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
17401         prototype and meaning of return value.
17402         (__si_class_type_info::__do_upcast): Likewise.
17403         (__vmi_class_type_info::__do_upcast): Likewise.
17404         * tinfo.cc (__class_type_info::__upcast_result): Replace
17405         whole2dst with part2dst. Adjust ctor.
17406         (__class_type_info::__do_upcast): Adjust call of worker function.
17407         (__class_type_info::__do_upcast): Adjust.
17408         (__si_class_type_info::__do_upcast): Adjust. Use parent's
17409         __do_upcast.
17410         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
17411         virtual base in diamond hierarchy bug.
17413 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
17415         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
17416         and bitfield to tinfo_fn_p.
17417         (DECL_TINFO_FN_P): Adjust.
17418         (SET_DECL_TINFO_FN_P): Likewise.
17419         (DECL_MUTABLE_P): Likewise.
17420         (DECL_C_BIT_FIELD): Likewise.
17421         (SET_DECL_C_BIT_FIELD): Likewise.
17422         (CLEAR_DECL_C_BIT_FIELD): Likewise.
17423         (DECL_UNINLINABLE): Likewise.
17424         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
17425         (handle_using_decl): Remove assertion.
17426         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
17427         to build FIELD_DECLs.
17428         (build_base_field): Likewise.
17429         (layout_class_type): Likewise.
17430         * decl.c (init_decl_processing): Likewise.
17431         (build_ptrmemfunc_type): Likewise.
17432         (grokdeclarator): Likewise.
17433         * decl2.c (grok_x_components): Likewise.
17434         * except.c (call_eh_info): Likewise.
17435         * init.c (init_init_processing): Likewise.
17436         * rtti.c (expand_class_desc): Likewise.
17437         (create_pseudo_type_info): Likewise.
17438         (get_vmi_pseudo_type_info): Likewise.
17439         (create_tinfo_types): Likewise.
17440         * ptree.c (print_lang_decl): Adjust.
17441         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
17442         before checking DECL_MUTABLE_P.
17444         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
17445         parameters for template functions.
17446         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
17447         destructors as well as constructors.
17449 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
17451         * class.c (build_ctor_vtbl_group): Set inits.
17452         * optimize.c (maybe_clone_body): Set DECL_INLINE and
17453         DECL_THIS_INLINE appropriately for clones.
17455         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
17456         (DECL_CONV_FN_P): Simplify.
17457         (DECL_OPERATOR): Remove.
17458         (language_to_string): Declare.
17459         * decl.c (duplicate_decls): Fix typo in comment.
17460         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
17461         (grok_op_properties): Use DECL_CONV_FN_P instead of
17462         IDENTIFIER_TYPENAME_P.
17463         * dump.c (dequeue_and_dump): Dump the language linkage of
17464         declarations.
17465         * error.c (language_to_string): Give it external linkage.
17466         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
17467         (implicitly_declare_fn): Set DECL_LANGUAGE.
17468         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
17469         IDENTIFIER_TYPENAME_P.
17470         (tsubst_decl): Likewise.
17471         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
17472         * semantics.c (finish_member_declaration): Don't mark members of
17473         classes declared in an extern "C" region as extern "C".
17475 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17477         * decl2.c (qualified_lookup_using_namespace): Look through
17478         namespace aliases.
17480         * decl.c (push_using_decl): Return the old decl on namespace level.
17482 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
17484         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
17485         (VTT_NAME_PREFIX): New macro.
17486         (CTOR_VTBL_NAME_PREFIX): Likewise.
17487         (get_ctor_vtbl_name): New function.
17488         * class.c (get_vtable_name): Simplify.
17489         (get_vtt_name): New function.
17490         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
17491         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
17492         when a virtual base becomes primary.
17493         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
17494         VTTs.
17495         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
17496         additional parameters.
17497         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
17498         (initialize_array): New function.
17499         (build_vtt): Likewise.
17500         (build_vtt_inits): Likewise.
17501         (dfs_build_vtt_inits): Likewise.
17502         (dfs_fixup_binfo_vtbls): Likewise.
17503         (build_ctor_vtbl_group): Likewise.
17504         (initialize_vtable): Use initialize_array.
17505         (accumulate_vtbl_inits): Reimplement to handle construction
17506         vtables.
17507         (dfs_accumulate_vtbl_inits): Likewise.
17508         (bulid_vtbl_initializer): Adjust parameter name.
17509         * method.c (build_typename_overload): Remove #if 0'd code.
17510         (get_ctor_vtbl_name): New function.
17511         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
17512         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
17514         * cp-tree.h (struct lang_type): Remove search_slot.
17515         (CLASSTYPE_SEARCH_SLOT): Remove.
17516         (emit_base_init): Change prototype.
17517         (initialize_vtbl_ptrs): Likewise.
17518         (expand_indirect_vtbls_init): Likewise.
17519         (clear_search_slots): Remove.
17520         * decl.c (lang_mark_tree): Don't mark search_slot.
17521         * init.c (initialize_vtbl_ptrs): Simplify.
17522         (emit_base_init): Likewise.
17523         * search.c (struct vbase_info): Document decl_ptr.
17524         (convert_pointer_to_single_level): Remove.
17525         (dfs_find_vbases): Remove.
17526         (dfs_init_base_pointers): Simplify.
17527         (dfs_clear_vbase_slots): Remove.
17528         (dfs_vtable_path_unmark): New function.
17529         (init_vbase_pointers): Simplify.
17530         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
17531         (expand_indirect_vtbls_init): Simplify.  Don't call
17532         mark_all_temps_used.
17533         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
17534         initialize_vtbl_ptrs.
17536 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
17538         * except.c: Add static prototypes.
17540 2000-05-20  H.J. Lu  <hjl@gnu.org>
17542         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
17544 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
17546         Don't create a separate copy of virtual bases for the
17547         CLASSTYPE_VBASECLASSES list.
17548         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
17549         (BINFO_FOR_VBASE): Remove.
17550         (CANONICAL_BINFO): Adjust.
17551         (binfo_for_vbase): New function.
17552         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
17553         instead of BINFO_FOR_VBASE.
17554         (build_vbase_pointer): Likewise.
17555         (build_secondary_vtable): Likewise.
17556         (dfs_mark_primary_bases): Likewise.
17557         (mark_primary_bases): Likewise.
17558         (layout_nonempty_base_or_field): Likewise.
17559         (dfs_set_offset_for_shared_vbases): Likewise.
17560         (dfs_set_offset_for_unshared_vbases): Likewise.
17561         (layout_virtual_bases): Likewise.  Adjust for changes to the
17562         CLASSTYPE_VBASECLASSES list.
17563         (dump_class_hierarchy_r): Use binfo_for_vbase
17564         instead of BINFO_FOR_VBASE.
17565         (dump_class_hierarchy): Likewise.
17566         (finish_vtbls): Likewise.
17567         (build_vtbl_initializer): Adjust for changes to the
17568         CLASSTYPE_VBASECLASSES list.
17569         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
17570         * decl.c (finish_destructor_body): Adjust for changes to the
17571         CLASSTYPE_VBASECLASSES list.
17572         * init.c (sort_base_init): Use binfo_for_vbase.
17573         (construct_virtual_bases): Adjust for changes to the
17574         CLASSTYPE_VBASECLASSES list.
17575         (expand_member_init): Use binfo_for_vbase.
17576         (build_vbase_delete):  Adjust for changes to the
17577         CLASSTYPE_VBASECLASSES list.
17578         * method.c (do_build_copy_constructor): Likewise.
17579         * rtti.c (get_base_offset): Use binfo_for_vbase.
17580         (expand_class_desc): Remove #if 0'd code.
17581         * search.c (struct vbase_info): Remove vbase_types.
17582         (get_base_distance):  Use binfo_for_vbase.
17583         (lookup_field_queue_p): Use CANONICAL_BINFO.
17584         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
17585         (get_pure_virtuals): Adjust for changes to the
17586         CLASSTYPE_VBASECLASSES list.
17587         (dfs_find_vbases): Use binfo_for_vbase.
17588         (dfs_init_vbase_pointers): Likewise.
17589         (init_vbase_pointers): Don't initialize vi.vbase_types.
17590         (virtual_context): Use binfo_for_vbase.
17591         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
17592         CLASSTYPE_VBASECLASSES list.
17593         (expand_indirect_vtbls_init): Simplify.
17594         (dfs_get_vbase_types): Don't replicate virtual bases.
17595         (find_vbase_instance): Use binfo_for_vbase.
17596         (binfo_for_vbase): New function.
17597         * typeck.c (get_delta_difference): Use binfo_for_vbase.
17599 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
17601         * decl2.c (finish_anon_union): Generalize error messages to handle
17602         anonymous structures.
17603         * init.c (perform_member_init): Remove `name' parameter.
17604         (build_field_list): New function.
17605         (sort_member_init): Handle anonymous union initialization order
17606         correctly.  Check for multiple initializations of the same union.
17607         (emit_base_init): Don't look up fields by name here.
17608         (expand_member_init): Record the result of name lookup for future
17609         reference.
17610         * typeck.c (build_component_ref): Fix formatting.
17612 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
17614         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
17615         * typeck.c (build_x_compound_expr): Replace warn_unused with
17616         warn_unused_value.
17618         * decl2.c (lang_decode_option): Update -Wall unused flags by
17619         calling set_Wunused.
17621 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
17623         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
17624         * init.c (dfs_vtable_path_unmark): Remove.
17625         * search.c (marked_new_vtable_p): Likewise.
17626         (unmarked_new_vtable_p): Likewise.
17627         (dfs_search_slot_nonempty_p): Likewise.
17628         (dfs_mark): Likewise.
17629         (dfs_vtable_path_unmark): Likewise.
17630         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
17631         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
17632         (dfs_init_vbase_pointers): Remove special-case new ABI code.
17633         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
17634         (init_vbase_pointers): Simplify.
17635         (expand_indirect_vtbls_init): Likewise.
17637         * class.c (copy_virtuals): New function.
17638         (build_primary_table): Use it.
17639         (build_secondary_vtable): Likewise.
17640         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
17641         indicate that no vcall offset is required.
17642         (add_virtual_function): Likewise.
17643         (modify_all_vtables): Likewise.
17644         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17645         (dfs_accumulate_vtbl_inits): Likewise.
17646         (build_vtbl_initializer): Make changes to handle construction
17647         vtables.
17648         (dfs_build_vcall_offset_vtbl_entries): Likewise.
17649         (build_rtti_vtbl_entries): Likewise.
17650         (build_vtable_entries): Handle a NULL vcall_index.
17652 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
17654         * decl2.c (lang_decode_option): Fix thinko.
17656 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
17658         * except.c (check_handlers): New fn.
17659         * cp-tree.h: Declare it.
17660         * semantics.c (finish_handler_sequence): Call it.
17661         (finish_function_handler_sequence): Likewise.
17662         (finish_handler_parms): Set TREE_TYPE on the handler.
17663         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
17664         * search.c (get_base_distance_recursive): If protect>1, ignore
17665         special access.
17666         (get_base_distance): Don't reduce watch_access.
17668 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
17670         * lex.c: #include diagnostic.h.
17671         (lang_init_options): Set default prefixing rules.
17673         * lang-options.h: Add -fdiagnostics-show-location=.
17675         * decl2.c: #include diagnostic.h.
17676         (lang_decode_option): Handle -fdiagnostics-show-location=.
17678 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
17680         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
17681         * vec.cc: Revert my 2000-05-07 change.
17683 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
17685         * class.c (check_field_decls): Complain about non-static data
17686         members with same name as class in class with constructor.
17688 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
17690         * decl.c (grokdeclarator): Allow non-static data members with
17691         same name as class.
17693 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
17695         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
17696         and pending_inline.filename.  Update prototypes.
17697         * decl.c (define_label): Constify filename parameter.
17698         * decl2.c (warn_if_unknown_interface): Constify local char *.
17699         * input.c Constify input_source.filename. Don't declare
17700         input_filename or lineno.  Constify filename parameter to feed_input.
17701         * lex.c (init_parse): Constify parameter and return value.
17702         (cp_pragma_interface, cp_pragma_implementation): Constify
17703         filename argument.
17704         (reinit_parse_for_method, reinit_parse_for_block,
17705         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
17706         Constify local char *.
17707         * pt.c: Don't declare lineno or input_filename.
17708         (print_template_context, tsubst_friend_function, tsubst_decl,
17709         tsubst, instantiate_decl): Constify local char *.
17710         * semantics.c (expand_body): Constify local char *.
17711         * tree.c (build_srcloc): Constify filename parameter.
17712         * typeck.c (c_expand_asm_operands): Constify filename
17713         parameter.
17715 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
17717         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
17718         offsetof expansion.
17720 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
17722         * inc/cxxabi.h:  Fix typos in comment.
17723         (__base_class_info::__offset): Use a static_cast.
17725 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
17727         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
17728         of std::size_t and std::ptrdiff_t respectively.
17729         * tinfo.cc: Likewise.
17730         * vec.cc: Likewise.
17732 2000-05-06  Richard Henderson  <rth@cygnus.com>
17734         * typeck.c (build_c_cast): Don't warn integer->pointer size
17735         mismatch for constants.
17737 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
17739         * rtti.c (ptmd_initializer): Set non-public, if class is
17740         incomplete.
17742         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
17743         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17744         __cxa_vec_delete): Likewise.
17745         * tinfo.cc (__dynamic_cast): Likewise.
17746         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17747         __cxa_vec_delete): Likewise.
17749 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
17751         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
17752         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
17753         (lang_decl_flags): Add vcall_offset.
17754         (THUNK_VCALL_OFFSET): Use it.
17755         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
17756         * method.c (make_thunk): Create the lang_decl here, not in
17757         emit_thunk.
17758         (emit_thunk): Make generic thunks into ordinary functions once
17759         they have been fed to expand_body.
17760         * semantics.c (expand_body): Set current_function_is_thunk here.
17762 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17764         * class.c (update_vtable_entry_for_fn): Prototype.
17766         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
17767         and `tmpl'.
17769         * search.c (dfs_build_inheritance_graph_order): Prototype.
17771 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
17773         * cp-tree.h (special_function_kind): Add various kinds of
17774         destructors.
17775         (special_function_p): New function.
17776         * class.c (overrides): Don't let one kind of destructor override
17777         another.
17778         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
17779         whether or not to instantiate a template.
17780         * tree.c (special_function_p): Define.
17782 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
17784         * cp-tree.def (THUNK_DECL): Remove.
17785         * cp-tree.h (DECL_THUNK_P): New macro.
17786         (DECL_NON_THUNK_FUNCTION_P): Likewise.
17787         (DECL_EXTERN_C_FUNCTION_P): Likewise.
17788         (SET_DECL_THUNK_P): Likewise.
17789         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
17790         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
17791         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
17792         * decl.c (decls_match): Use DECL_EXTERN_C_P.
17793         (duplicate_decls): Likewise.
17794         (pushdecl): Likewise.  Adjust thunk handling.
17795         (grokfndecl): Use DECL_EXTERN_C_P.
17796         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
17797         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
17798         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
17799         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
17800         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
17801         DECL_NO_STATIC_CHAIN.
17802         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
17803         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
17804         * search.c (covariant_return_p): Remove THUNK_DECL handling.
17805         * ir.texi: Update.
17807 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
17809         * tree.c (walk_tree): Set lineno.
17811 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
17813         * exception.cc: Update license notice.
17814         * new.cc: Likewise.
17815         * new1.cc: Likewise.
17816         * new2.cc: Likewise.
17817         * tinfo.cc: Likewise.
17818         * tinfo2.cc: Likewise.
17819         * vec.cc: Likewise.
17820         * inc/cxxabi.h: Likewise.
17821         * inc/exception: Likewise.
17822         * inc/new: Likewise.
17823         * inc/new.h: Likewise.
17824         * inc/typeinfo: Likewise.
17826 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
17828         * tree.c (build_target_expr_with_type): If we already have a
17829         TARGET_EXPR, just return it.
17831         * optimize.c (initialize_inlined_parameters): Don't generate an
17832         EXPR_STMT if we can just use DECL_INITIAL.
17833         * decl.c (emit_local_var): Only make the initialization a
17834         full-expression if stmts_are_full_exprs_p.
17836 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
17838         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
17839         macro.
17840         * call.c (standard_conversion): Use it.
17841         (direct_reference_binding): Likewise.
17842         (build_over_call): Likewise.
17843         (is_properly_derived_from): Likewise.
17844         (compare_ics): Likewise.
17845         * class.c (resolves_to_fixed_type_p): Likewise.
17846         * optimize.c (declare_return_variable): Likewise.
17847         * pt.c (is_specialization_of): Likewise.
17848         (unify): Likewise.
17849         * typeck.c (comp_target_parms): Likeiwse.
17850         (build_static_cast): Likewise.
17851         (build_reinterpret_cast): Likewise.
17852         (build_const_cast): Likewise.
17853         (comp_ptr_ttypes_real): Likewise.
17854         (comp_ptr_ttypes_const): Likewise.
17855         * typeck2.c (process_init_constructor): Likewise.
17857 2000-04-30  Scott Snyder <snyder@fnal.gov>
17859         * decl.c (finish_destructor_body): Use the base destructor when
17860         destroying virtual bases.
17862 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
17864         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
17865         STMT_EXPRs.
17866         * optimize.c (struct inline_data): Add target_exprs field.
17867         (declare_return_variable): When a function returns an aggregate,
17868         use the variable declared in the TARGET_EXPR as the remapped
17869         DECL_RESULT.
17870         (expand_call_inline): Update the pending target_exprs stack.
17871         (optimize_function): Initialize the stack.
17873         * decl2.c (finish_file): Fix typo in comment.
17875         * method.c (emit_thunk): Don't try to return a `void' value.
17877         * optimize.c (initialize_inlined_parameters): If the parameter is
17878         addressable, we need to make a new VAR_DECL, even if the
17879         initializer is constant.
17881 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
17883         * decl.c (grok_op_properties): Add an extra check of argtypes.
17885 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
17887         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
17888         variables.
17889         (initialize_inlined_parameters): Try to avoid creating new
17890         VAR_DECLs.
17892 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
17894         * lex.c (my_get_run_time): Remove.
17895         (init_filename_times): Use get_run_time instead of my_get_run_time.
17896         (check_newline): Likewise.
17897         (dump_time_statistics): Likewise.
17898         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
17899         of computing elapsed time explicitly.
17901 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
17903         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
17904         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
17905         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
17906         before calling decl_constant_value.
17907         * class.c (check_bitfield_decl): Likewise.
17908         * cvt.c (ocp_convert): Likewise.
17909         (convert): Likewise.
17910         * decl.c (compute_array_index_type): Likewise.
17911         (build_enumerator): Likewise.
17912         * decl2.c (check_cp_case_value): Likewise.
17913         * pt.c (convert_nontype_argument): Likewise.
17914         (tsubst): Likewise.
17915         * typeck.c (decay_conversion): Likewise.
17916         (build_compound_expr): Likewise.
17917         (build_reinterpret_cast): Likewise.
17918         (build_c_cast): Likewise.
17919         (convert_for_assignment): Likewise.
17921 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
17923         * decl.c (finish_function): Don't play games with DECL_INLINE.
17925 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
17927         * ir.texi: Correct typo.
17929 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17931         * decl.c (grokdeclarator): Reject VLAs as members.
17933 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
17935         * call.c (standard_conversion): Accept conversion between
17936         COMPLEX_TYPEs.
17938         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
17940 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
17942         * decl2.c (finish_file): Remove double setup for accounting
17943         compile time.
17945 2000-04-24  Robert Lipe <robertlipe@usa.net>
17947         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
17949 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
17951         * new.cc (set_new_handler): Needs to be in std::.
17953 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
17955         * cp-tree.h (lang_decl): Remove pretty_function_p.
17956         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
17957         language-specific node.
17958         * decl.c (cp_make_fname_decl): Use build_decl, not
17959         build_lang_decl, to build the variables.
17960         (grokvardecl): Don't call build_lang_decl for local variables in
17961         templates.
17962         (grokdeclarator): Don't call build_lang_decl for local type
17963         declarations in templates.
17964         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
17965         zero'd memory, rather than calling memset.
17966         * pt.c: Include hashtab.h.
17967         (local_specializations): New variable.
17968         (retrieve_local_specialization): Use it.
17969         (register_local_specialization): Likewise.
17970         (tsubst_decl): Don't assume local variables have
17971         DECL_LANG_SPECIFIC.
17972         (instantiate_decl): Set up local_specializations.
17973         * Makefile.in (HTAB_H): New variable.
17975 2000-04-23  Richard Henderson  <rth@cygnus.com>
17977         * typeck.c (c_expand_asm_operands): Restore the original
17978         contents of the output list.
17980 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
17982         * ir.texi:  Document complex number representation.
17984 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
17986         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
17987         (target_incomplete_p): New function.
17988         (tinfo_base_init): Create comdat NTBS name variable.
17989         (ptr_initializer): Add non_public parameter. Calculate it.
17990         (ptmd_initializer): Likewise.
17991         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
17992         (create_real_tinfo_var): Add non_public parameter. Use it.
17993         Push proxy into global namespace.
17994         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
17995         New enumeration.
17996         * inc/typeinfo (type_info::before, type_info::operator==):
17997         Compare __name addresses.
17999         * tinfo2.cc: Remove new-abi builtins comment.
18001 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
18003         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
18005         * call.c (joust): Exit early if we get the same function, too.
18007         * decl2.c (key_method): Return NULL_TREE for template classes.
18008         (import_export_class): Don't need to check for template classes.
18010 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
18012         * lex.c: Remove references to cccp.c.
18014 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
18016         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
18017         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
18018         (DECL_DESTRUCTOR_P): Use destructor_attr.
18019         (DECL_CONST_MEMFUNC_P): Reimplement.
18020         (DECL_VOLATILE_MEMFUNC_P): Remove.
18021         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
18022         (overrides): Use DECL_DESTRUCTOR_P.
18023         (check_for_override): Likewise.
18024         * decl.c (start_function): Likewise.
18025         * decl2.c (grokfclassfn): Likewise.
18026         (check_classfn): Likewise.
18027         (grok_function_init): Likewise.
18029 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
18031         * decl2.c (grokfield): Issue error on illegal data member
18032         declaration.
18034 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
18036         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
18038 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
18040         * class.c (build_vtable_entry): Don't build thunks for type-info
18041         functions.
18043 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
18045         * decl.c (decls_match): Allow a redeclaration of a builtin to
18046         specify args while the builtin did not.
18048 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
18050         * cp-tree.def (THUNK_DECL): Add to documentation.
18051         * cp-tree.h (flag_huge_objects): Declare.
18052         * class.c (modify_vtable_entry): Tidy.
18053         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
18054         Calculate delta appropriately for the new ABI.
18055         (dfs_modify_vtables): Use it.
18056         (modify_all_vtables): Fix thinko in code to add overriding copies
18057         of functions to primary vtables.
18058         (build_clone): Fix typo in comment.
18059         (clone_function_decl): Correct order of destructors in vtable.
18060         (build_vbase_offset_vtbl_entries): Adjust comment.
18061         (dfs_vcall_offset_queue_p): Remove.
18062         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
18063         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
18064         (build_vtable_entry): Correct check for pure virtual functions.
18065         Don't declare flag_huge_objects.
18066         * decl.c (flag_huge_objects): Remove declaration.
18067         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
18068         Use int_size_in_bytes.
18069         (emit_thunk): Handle vcall offset thunks.
18071 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18073         * decl2.c (parse_time, varconst_time): Delete declarations.
18074         (finish_file): Delete LINENO declaration.
18075         START_TIME and THIS_TIME now long.
18077 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
18079         * class.c (build_base_field): Reformat comment.
18081         * inc/cxxabi.h (stddef.h): Comment inclusion.
18082         (__base_class_info::__offset): Comment shift.
18084 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
18086         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
18087         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
18088         (cp_push_exception_identifier): New macro.
18089         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
18090         (DECL_BASE_DESTRUCTOR_P): Likewise.
18091         (DECL_DELETING_DESTRUCTOR_P): Likewise.
18092         (get_vtbl_decl_for_binfo): Fix formatting.
18093         (in_charge_arg_for_name): New macro.
18094         (maybe_build_cleanup_and_delete): Remove declaration.
18095         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
18096         (in_charge_arg_for_name): New function.
18097         (build_new_method_call): Use it.  Handle cloned destructors.
18098         (build_clone): Don't make the base constructor virtual.
18099         Automatically defer generated functions.
18100         (clone_function_decl): Handle destructors, too.
18101         (clone_constructors_and_destructors): Likewise.
18102         (create_vtable_ptr): Don't create a vtable entry for a cloned
18103         function.
18104         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
18105         (initialize_predefined_identifiers): Update appropriately.
18106         (finish_destructor_body): Simplify.
18107         (maybe_build_cleanup_and_delete): Remove.
18108         * except.c (expand_throw): Handle new-ABI destructors.
18109         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
18110         (build_dtor_call): New function.
18111         (build_delete): Use it.  Simplify.
18112         * optimize.c (maybe_clone_body): Handle destructors.
18113         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
18115         * exception.cc (cleanup_fn): New typedef.
18116         (CALL_CLEANUP): New macro.
18117         (cp_eh_info): Use them.
18118         (__cp_push_exception): Likewise.
18119         (__cp_pop_exception): Likewise.
18121 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
18123         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
18124         (complete_dtor_identifier): New macro.
18125         (CLASSTYPE_FIRST_CONVERSION): Remove.
18126         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
18127         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
18128         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
18129         (CLASSTYPE_CONSTRUCTORS): Likewise.
18130         (CLASSTYPE_DESTRUCTORS): Likewise.
18131         (lang_decl): Add cloned_function.
18132         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
18133         (DECL_BASE_CONSTRUCTOR_P): Likewise.
18134         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
18135         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
18136         (DECL_CLONED_FUNCTION_P): Likewise.
18137         (DECL_CLONED_FUNCTION): Likewise.
18138         (clone_function_decl): Declare.
18139         (maybe_clone_body): Likewise.
18140         * call.c (build_user_type_conversion_1): Call complete object
18141         constructors in the new ABI.
18142         (build_new_method_call): Don't add in-charge parameters under the
18143         new ABI.
18144         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
18145         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
18146         CLASSTYPE_DESTRUCTOR_SLOT.
18147         (build_clone): New function.
18148         (clone_function_decl): Likewise.
18149         (clone_constructors_and_destructors): Likewise.
18150         (check_bases_and_members): Use it.
18151         * decl.c (iniitialize_predefined_identifiers): Initialize
18152         complete_dtor_identifier.
18153         (finish_function): Don't add extra code to a clone.
18154         (lang_mark_tree): Mark cloned_function.
18155         * decl2.c (mark_used): Don't bother trying to instantiate things
18156         we synthesized.
18157         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
18158         * method.c (set_mangled_name_for_decl): Don't treat clones as
18159         constructors.
18160         (synthesize_method): Sythesize cloned functions, not the clones.
18161         * optimize.c (inline_data): Update comment on ret_label.
18162         (remap_block): Don't assume DECL_INITIAL exists.
18163         (copy_body_r): Allow ret_label to be NULL.
18164         (maybe_clone_body): Define.
18165         * pt.c (tsubst_decl): Handle clones.
18166         (instantiate_clone): New function.
18167         (instantiate_template): Use it.
18168         (set_mangled_name_for_template_decl): Don't treat clones as
18169         constructors.
18170         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
18171         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
18172         * semantics.c (expand_body): Clone function bodies as necessary.
18174         * optimize.c (remap_decl): Avoid sharing structure for arrays
18175         whose size is only known at run-time.
18176         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
18178         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
18179         to has_in_charge_parm_p.
18180         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
18181         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
18182         (DECL_COPY_CONSTRUCTOR_P): New macro.
18183         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
18184         (build_user_type_conversion_1): Likewise.
18185         (convert_like_real): Likewise.
18186         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
18187         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
18188         (copy_args_p): Likewise.
18189         (grok_ctor_properties): Likewise.
18190         (start_function): Likewise.
18191         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
18192         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
18193         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
18194         * method.c (do_build_copy_constructor): Use
18195         DECL_HAS_IN_CHARGE_PARM_P.
18196         (synthesize_method): Likewise.
18197         * pt.c (instantiate_template): Remove goto.
18198         * tree.c (build_cplus_method_type): Remove mention of obstacks in
18199         comment.
18201         * cp-tre.h (finish_function): Change prototype.
18202         * decl.c (end_cleanup_fn): Adjust caller.
18203         (finish_function): Take only one parameter.
18204         * decl2.c (finish_objects): Adjust caller.
18205         (finish_static_storage_duration_function): Likewise.
18206         * method.c (emit_thunk): Likewise.
18207         * parse.y: Likewise.
18208         * parse.c: Regenerated.
18209         * pt.c (instantiate_decl): Likewise.
18210         * rtti.c (synthesize_tinfo_fn): Likewise.
18211         * semantics.c (expand_body): Likewise.
18213         * cp-tree.h (copy_decl): New function.
18214         * class.c (finish_struct_1): Use it.
18215         * lex.c (copy_decl): Define it.
18216         * pt.c (tsubst_decl): Likewise.
18217         * tree.c (copy_template_template_parm): Likewise.
18219         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
18220         has_nonpublic_assign_ref.
18221         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
18222         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
18223         * class.c (finish_struct_methods): Don't set
18224         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
18225         (interface_only): Don't declare.
18226         (interface_unknown): Likewise.
18228 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18230         * tree.h (HAVE_TEMPLATES): Remove definition.
18231         * lang-options.h (-fthis-is-variable): Remove documentation.
18233 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
18235         * class.c (instantiate_type): Handle object-relative template-id.
18237         * semantics.c (finish_expr_stmt): Call convert_to_void here.
18238         * decl.c (cplus_expand_expr_stmt): Not here.
18240         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
18241         Initialize exprtype earlier.
18243         * parse.y (fn.def1): Check for defining types in return types.
18245         * decl.c (check_tag_decl): Notice extra fundamental types.
18246         Diagnose empty decls in classes, too.
18248         * decl.c (grokdeclarator): Don't override an anonymous name if no
18249         declarator was given.
18251         * cvt.c (convert_to_void): Call resolve_offset_ref.
18253         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
18255         * decl2.c (decl_namespace): Handle getting a type.
18257         * typeck.c (build_c_cast): Re-enable warning for cast between
18258         pointer and integer of different size.
18260 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
18262         * inc/cxxabi.h (__pointer_type_info): Add restrict and
18263         incomplete flags.
18264         (__pointer_type_info::__pointer_catch): New virtual function.
18265         (__pointer_to_member_type_info): Derive from
18266         __pointer_type_info. Adjust.
18267         (__pointer_to_member_type_info::__do_catch): Remove.
18268         (__pointer_to_member_type_info::__is_pointer_p): Declare.
18269         (__pointer_to_member_type_info::__pointer_catch): Declare.
18270         * rtti.c (qualifier_flags): Add restrict flag.
18271         (ptmd_initializer): Reorder members.
18272         (create_tinfo_types): Expand comments. Reorder
18273         ptmd_desc_type_node members.
18274         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
18275         Implement.
18276         (__pointer_type_info::__do_catch): Move specific code into
18277         __pointer_catch. Call it.
18278         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
18279         specific catch checking. Fix void conversion check.
18280         (__pointer_to_member_type_info::__do_catch): Remove.
18281         (__pointer_to_member_type_info::__pointer_catch): Implement.
18283 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18285         * lex.c (init_parse): Remove traces of classof and headof.
18286         * decl2.c (flag_operator_names): Default to 1.
18287         (lang_decode_option): Do not set it for -ansi.
18289 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
18291         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
18292         (DECL_MAIN_VARIANT): Remove.
18293         * decl.c (duplicate_decls): Don't set it.
18294         (start_function): Likewise.
18295         (lang_mark_tree): Don't mark it.
18296         * decl2.c (defer_fn): Don't use it.
18297         * lex.c (retrofit_lang_decl): Don't set it.
18298         * pt.c (tsubst_decl): Likewise.
18299         * ptree.c (print_lang_decl): Don't print it.
18300         * typeck.c (mark_addressable): Don't use it.
18302 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
18304         * vec.cc: Include <new> and <exception>.
18305         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
18306         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
18307         terminate.
18308         (__cxa_vec_delete): Catch dtor exceptions.
18310 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
18312         Prepend __ to implementation defined names.
18313         * inc/typeinfo (type_info): Rename _name to __name.
18314         (type_info::type_info): Rename parameter.
18315         (type_info::operator==, type_info::operator!=,
18316         type_info::before): Likewise.
18317         (type_info::is_pointer_p, type_info::is_function_p,
18318         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
18319         parameters.
18320         * inc/cxxabi.h
18321         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
18322         (__pointer_type_info::__pointer_type_info): Likewise.
18323         (__pointer_type_info::is_pointer_p,
18324         __pointer_type_info::do_catch): Prepend __. Rename parameters.
18325         (__array_type_info::__array_type_info): Rename parameters.
18326         (__function_type_info::__function_type_info): Likewise.
18327         (__function_type_info::is_function_p): Prepend __.
18328         (__enum_type_info::__enum_type_info): Rename parameters.
18329         (__pointer_to_member_type_info::__pointer_to_member_type_info):
18330         Likewise.
18331         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
18332         parameters.
18333         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
18334         (__class_type_info::__class_type_info): Rename parameters.
18335         (__class_type_info::sub_kind): Prepend __. Adjust member names.
18336         (__class_type_info::upcast_result,
18337         __class_type_info::dyncast_result): Prepend __. Move definition
18338         into tinfo.cc.
18339         (__class_type_info::do_upcast, __class_type_info::do_catch,
18340         __class_type_info::find_public_src,
18341         __class_type_info::do_dyncast,
18342         __class_type_info::do_find_public_src): Prepend __. Rename
18343         parameters.
18344         (__si_class_type_info::__si_class_type_info): Rename parameters.
18345         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
18346         __si_class_type_info::do_find_public_src): Prepent __. Rename
18347         parameters.
18348         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
18349         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
18350         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
18351         parameters.
18352         (__dynamic_cast): Rename parameters.
18353         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
18354         type_info::do_catch, type_info::do_upcast): Prepend __.
18355         (contained_p, public_p, virtual_p, contained_public_p,
18356         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
18357         (__class_type_info::do_catch,
18358         __class_type_info::do_upcast): Prepend __. Adjust.
18359         (__class_type_info::__upcast_result,
18360         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
18361         Adjust.
18362         (__class_type_info::find_public_src): Prepend __. Adjust.
18363         (__class_type_info::do_find_public_src,
18364         __si_class_type_info::do_find_public_src,
18365         __vmi_class_type_info::do_find_public_src): Likewise.
18366         (__class_type_info::do_dyncast,
18367         __si_class_type_info::do_dyncast,
18368         __vmi_class_type_info::do_dyncast): Likewise.
18369         (__class_type_info::do_upcast,
18370         __si_class_type_info::do_upcast,
18371         __vmi_class_type_info::do_upcast): Likewise.
18372         (__dynamic_cast): Adjust.
18373         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
18374         (__function_type_info::is_function_p): Likewise.
18375         (__pointer_type_info::do_catch): Likewise. Adjust.
18376         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
18377         (__throw_type_match_rtti_2): Adjust.
18378         (__is_pointer): Adjust.
18380 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
18382         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
18383         (complete_ctor_identifier): New macro.
18384         (special_function_kind): Add sfk_copy_constructor and
18385         sfk_assignment_operator.
18386         (LOOKUP_HAS_IN_CHARGE): Remove.
18387         (cons_up_default_function): Rename to ...
18388         (implicitly_declare_fn): ... this.
18389         * call.c (build_new_method_call): Add in-charge parameters for
18390         constructors here.
18391         * class.c (add_implicitly_declared_members): Change parameter name
18392         from cant_have_assignment to cant_have_const_assignment.
18393         Replace calls to cons_up_default_function to implicitly_declare_fn.
18394         * cvt.c (ocp_convert): Use complete_ctor_identifier.
18395         * decl.c (initialize_predefined_identifiers): Initialize it.
18396         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
18397         complex expression.
18398         * init.c (expand_default_init): Don't calculate the in-charge
18399         parameter here.
18400         (build_new_1): Likewise.
18401         * lex.c (cons_up_default_function): Move to method.c.
18402         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
18403         (implicitly_declare_fn): New function.
18404         * typeck.c (build_static_cast): Use complete_ctor_identifier.
18405         (build_modify_expr): Likewise.
18406         * typeck2.c (build_functional_cast): Likewise.
18408         Under the new ABI, constructors don't return `this'.
18409         * cp-tree.h (warn_reorder): Declare.
18410         (special_function_kind): New enum.
18411         (global_base_init_list): Remove declaration.
18412         (emit_base_init): Don't return a value.
18413         (check_base_init): Don't declare.
18414         (is_aggr_typedef): Likewise.
18415         * decl.c (check_special_function_return_type): New function.
18416         (return_types): Remove.
18417         (grokdeclarator): Use check_special_function_return_type.
18418         (start_function): Don't initialize ctor_label under the new ABI.
18419         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
18420         * init.c (begin_init_stmts): Move to top of file.
18421         (finish_init_stmts): Likewise.
18422         (warn_reorder): Don't declare.
18423         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
18424         value.
18425         (check_base_init): Remove.
18426         (is_aggr_typedef): Likewise.
18427         (build_new_1): Don't use the return value of a constructor.
18428         * semantics.c (setup_vtbl_ptr): Don't use the return value
18429         of emit_base_init.
18430         * typeck.c (check_return_expr): Don't magically convert return
18431         statements into `return this' in constructors under the new ABI.
18433         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
18434         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
18435         (base_ctor_identifier): New macro.
18436         (base_dtor_identifier): Likewise.
18437         (deleting_dtor_identifier): Likewise.
18438         * decl.c: Don't include obstack.h.
18439         (obstack_chunk_alloc): Don't define.
18440         (obstack_chunk_free): Likewise.
18441         (struct predefined_identifier): New type.
18442         (initialize_predefined_identifiers): New function.
18443         (init_decl_processing): Use it.
18444         (debug_temp_inits): Remove.
18445         (start_method): Don't call preserve_data.
18446         (hack_incomplete_structures): Update comment.
18447         * init.c (init_init_processing): Don't initialize
18448         nelts_identifier.
18449         (build_offset_rf): Remove dead code.
18450         (build_delete): Use CLASSTYPE_N_BASECLASSES.
18451         * search.c (init_search_processing): Don't initialize
18452         vptr_identifier.
18454 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18456         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
18457         some sign_compare warnings.
18459 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
18461         Rename abi::__vmi_class_type_info members.
18462         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
18463         base_list, detail_masks members to vmi_flags, vmi_base_count,
18464         vmi_bases and vmi_flags_masks respectively.
18465         (__vmi_class_type_info::vmi_flags_masks): Rename
18466         details_unknown_mask to flags_unknown_mask.
18467         * tinfo.cc (__class_type_info::do_upcast): Adjust.
18468         (__vmi_class_type_info::do_find_public_src): Adjust.
18469         (__vmi_class_type_info::do_dyncast): Adjust.
18470         (__vmi_class_type_info::do_upcast): Adjust.
18472 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
18474         * tinfo.cc (convert_to_base): New function.
18475         (get_vbase_offset): Remove. Move into convert_to_base.
18476         (__vmi_class_type_info::do_find_public_src): Adjust.
18477         (__vmi_class_type_info::do_dyncast): Adjust.
18478         (__vmi_class_type_info::do_upcast): Adjust.
18480 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
18482         * tinfo.cc (operator=): Use __builtin_strcmp.
18483         * tinfo2.cc (before): Likewise.
18485 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
18487         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
18488         (DECL_SAVED_INLINE): Rename to ...
18489         (DECL_DEFERRED_FN): ... this.
18490         (in_function_p): Remove declaration.
18491         (mark_inline_for_output): Rename to ...
18492         (defer_fn): ... this.
18493         * decl.c (finish_function): Adjust call to mark_inline_for_output.
18494         (in_function_p): Remove definition.
18495         * decl2.c (saved_inlines): Rename to ...
18496         (deferred_fns): ... this.
18497         (saved_inlines_used): Rename to ...
18498         (deferred_fns_used): ... this.
18499         (mark_inline_for_output): Rename to ...
18500         (defer_fn): ... this.
18501         (finish_file): Adjust accordingly.
18502         (init_decl2): Likewise.
18503         * lex.c (cons_up_default_function): Likewise.
18504         * pt.c (mark_decl_instantiated): Likewise.
18505         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
18506         circumstances.
18507         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
18508         * semantics.c (expand_body): Defer more functions.
18510 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
18512         * vec.cc: New file.
18513         * Make-lang.in (CXX_LIB2FUNCS): Add it.
18514         (vec.o): Build it.
18515         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
18516         __cxa_vec_delete): Declare.
18518 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
18520         * rtti.c (dfs_class_hint_mark): New static function.
18521         (dfs_class_hint_unmark): New static function.
18522         (class_hint_flags): Use them.
18524 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
18526         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
18528 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
18530         * cp-tree.h (instantiate_decl): Change prototype.
18531         * decl2.c (mark_used): Adjust call.
18532         * optimize.c (inlinable_function_p): Adjust handling of templates.
18533         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
18534         (do_type_instantiation): Likewise.
18535         (instantiate_decl): Defer more templates.
18536         (instantiate_pending_templates): Adjust logic to handle inline
18537         friend functions.
18539         * Makefile.in (GGC_H): New variable.  Use it throughout in place
18540         of ggc.h.
18542         * call.c: Don't include obstack.h.  Include ggc.h.
18543         (obstack_chunk_alloc): Don't define.
18544         (obstack_chunk_free): Likewise.
18545         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
18546         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
18547         (pop_switch): Free it.
18549         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
18551         * dump.c (dequeue_and_dump): Don't try to print the bit_position
18552         if we don't have a DECL_FIELD_OFFSET.
18554 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
18556         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
18557         special_function_p.
18559 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18561         * cfns.gperf (hash, libc_name_p): Prototype.
18563         * rtti.c (build_dynamic_cast_1): Constification.
18565         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
18567         * semantics.c (deferred_type_access_control): Prototype.
18569 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
18571         Correct many new ABI issues regarding vbase and vcall offset
18572         layout.
18573         * cp-tree.h (BINFO_VTABLE): Document.
18574         (struct lang_type): Tweak formatting.
18575         (BINFO_PRIMARY_BINFO): Add to documentation.
18576         (CLASSTYPE_VSIZE): Fix typo in comment.
18577         (CLASSTYPE_VBASECLASSES): Update documentation.
18578         (BINFO_VBASE_MARKED): Remove.
18579         (SET_BINFO_VBASE_MARKED): Likewise.
18580         (CLEAR_BINFO_VBASE_MARKED): Likewise.
18581         (BINFO_FIELDS_MARKED): Remove.
18582         (SET_BINFO_FIELDS_MARKED): Likewise.
18583         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
18584         (enum access_kind): New enumeration.
18585         (num_extra_vtbl_entries): Remove declaration.
18586         (size_extra_vtbl_entries): Likewise.
18587         (get_vtbl_decl_for_binfo): New function.
18588         (dfs_vbase_unmark): Remove declaration.
18589         (mark_primary_bases): Likewise.
18590         * class.c (SAME_FN): Remove.
18591         (struct vcall_offset_data_s): Move definition.
18592         (build_vbase_pointer): Use `build', not `build_binary_op', to
18593         access the vbase pointer under the new ABI.
18594         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
18595         (build_primary_vtable): Likewise.
18596         (dfs_mark_primary_bases): Move here from search.c.
18597         (mark_primary_bases): Likewise.
18598         (determine_primary_bases): Under the new ABI, don't make a base
18599         class a primary base just because we don't yet have any virtual
18600         functions.
18601         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
18602         (num_vfun_entries): Remove.
18603         (dfs_count_virtuals): Likewise.
18604         (num_extra_vtbl_entries): Likewise.
18605         (size_extra_vtbl_entries): Likewise.
18606         (layout_virtual_bases): Iterate in inheritance graph order under
18607         the new ABI.
18608         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
18609         indicate that a vfield is present.
18610         (init_class_processing): Initialize access_public_node, etc., from
18611         ak_public, etc.
18612         (get_vtbl_decl_for_binfo): New function.
18613         (dump_class_hierarchy_r): Likewise.
18614         (dump_class_hierarchy): Use it.
18615         (finish_vtbls): Build the vtbls in inheritance graph order.
18616         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
18617         (initialize_vtable): Use get_vtbl_decl_for_binfo.
18618         (accumulate_vtbl_inits): Add comments explaining why a pre-order
18619         walk is required.
18620         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
18621         where the vptr points, even for primary vtables.
18622         (build_vtbl_initializer): Adjust handling of vbase and vcall
18623         offsets.
18624         (build_vcall_and_vbase_vtable_entries): New function.
18625         (dfs_build_vbase_offset_vtbl_entries): Remove.
18626         (build_vbase_offset_vtbl_entries): Reimplement.
18627         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
18628         were already handled in a primary base class vtable.
18629         (build_vcall_offset_vtbl_entries): Adjust.
18630         (build_rtti_vtbl_entries): Adjust.
18631         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
18632         * init.c (expand_virtual_init): Simplify.
18633         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
18634         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
18635         * search.c (BINFO_ACCESS): New macro.
18636         (SET_BINFO_ACCESS): Likewise.
18637         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
18638         (access_in_type): Likewise.
18639         (dfs_accessible_p): Likewise.
18640         (protected_accessible_p): Likewise.
18641         (lookup_fnfields_1): Adjust documentation.
18642         (dfs_mark_primary_bases): Move to class.c
18643         (mark_primary_bases): Likewise.
18644         (dfs_vbase_unmark): Remove.
18645         (virtual_context): Use BINFO_FOR_VBASE.
18646         (dfs_get_vbase_types): Simplify.
18647         (dfs_build_inheritance_graph_order): New function.
18648         (get_vbase_types): Use it.
18649         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
18651         * tinfo.cc (get_vbase_offset): New function.
18652         (__vmi_class_type_info::do_find_public_src): Use it.
18653         (__vmi_class_type_info::do_dyncast): Likewise.
18654         (__vmi_class_type_info::do_upcast): Likewise.
18656 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
18658         * lang-specs.h: Pass -fno-show-column to the preprocessor.
18660 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
18662         * rtti.c (class_hint_flags): Rename flags.
18663         (class_initializer): Remove flags.
18664         (synthesize_tinfo_var): Combine offset and flags. Add flags
18665         for __vmi_class_type_info.
18666         (create_tinfo_types): Remove flags from __class_type_info and
18667         __si_class_type_info. Merge flags and offset from
18668         base_class_type_info.
18669         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
18670         (__base_class_info::is_virtual_p): Adjust.
18671         (__base_class_info::is_public_p): Adjust.
18672         (__base_class_info::offset): New accessor.
18673         (__class_type_info::details): Remove member.
18674         (__class_type_info::__class_type_info): Lose details.
18675         (__class_type_info::detail_masks): Remove.
18676         (__si_class_type_info::__si_class_type_info): Lose details.
18677         (__vmi_class_type_info::details): New member.
18678         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
18679         (__vmi_class_type_info::detail_masks): New member.
18680         * tinfo.cc (__class_type_info::do_upcast): Initialize result
18681         with unknown_details_mask.
18682         (__vmi_class_type_info::do_find_public_src): Adjust
18683         (__vmi_class_type_info::do_dyncast): Adjust.
18684         (__vmi_class_type_info::do_upcast): Set result details, if
18685         needed. Adjust.
18686         (__dynamic_cast): Temporarily #if out optimization.
18688 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
18690         * rtti.c (get_tinfo_decl): Mark used.
18691         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
18692         mark as dealt with, if we output it.
18694 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
18696         * class.c: Reorganize to put virtual function table initialization
18697         machinery at the end of the file.
18699 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
18701         * class.c (finish_struct): Use bitsize_zero_node.
18702         * pt.c (instantiate_class_template): Likewise.
18704 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
18706         Put RTTI entries at negative offsets in new ABI.
18707         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
18708         vbase offset at index -3, not -1.
18709         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
18710         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
18711         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
18712         (build_rtti_vtbl_entries): New function.
18713         (set_rtti_entry): Remove.
18714         (build_primary_vtable): Don't use it.
18715         (build_secondary_vtable): Likewise.
18716         (start_vtable): Remove.
18717         (first_vfun_index): New function.
18718         (set_vindex): Likewise.
18719         (add_virtual_function): Don't call start_vtable.  Do call
18720         set_vindex.
18721         (set_primary_base): Rename parameter.
18722         (determine_primary_base): Likewise.
18723         (num_vfun_entries): Don't use skip_rtti_stuff.
18724         (num_extra_vtbl_entries): Include RTTI information.
18725         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
18726         (skip_rtti_stuff): Remove.
18727         (dfs_modify_vtables): Don't use it.
18728         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
18729         (layout_nonempty_base_or_field): Update size handling.
18730         (create_vtable_ptr): Tweak.
18731         (layout_class_type): Adjust parameter names.
18732         (finish_struct_1): Simplify.
18733         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
18734         (skip_rtti_stuff): Remove.
18735         (first_vfun_index): New function.
18736         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18737         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
18738         (marked_vtable_pathp): Declare.
18739         (unmarked_vtable_pathp): Likewise.
18740         * error.c (dump_expr): Use first_vfun_index to calculate vtable
18741         offsets.
18742         * rtti.c (build_headof): Look for RTTI at negative offsets.
18743         (get_tinfo_decl_dynamic): Likewise.
18744         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
18745         here.
18746         (create_pseudo_type_info): Do it here instead.  Adjust so that
18747         vptr points at first virtual function.
18748         * search.c (marked_vtable_pathp): Make it global.
18749         (unmarked_vtable_pathp): Likewise.
18750         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
18751         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
18752         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
18753         (get_pure_virtuals): Likewise.
18754         (expand_upcast_fixups): Likewise.
18755         * tree.c (debug_binfo): Likewise.
18756         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
18757         negative offset.
18759 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18761         * class.c (check_field_decl): Fix typo.
18762         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
18763         (check_methods): Likewise.
18764         (check_field_decls): Likewise.
18765         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
18766         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
18767         Use DECL_RESULT_FLD, not DECL_RESULT.
18768         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
18769         * lex.c (identifier_type): Likewise.
18770         * pt.c (determine_specialization, lookup_template_class): Likewise.
18771         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
18772         (resolve_overloaded_unification, more_specialized): Likewise.
18773         * semantics.c (finish_member_declaration): Likewise.
18774         * typeck.c (build_x_function_call): Likewise.
18776 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
18778         * class.c (layout_empty_base): Handle empty bases with non-byte
18779         alignment.
18780         (build_base_field): Likewise.
18781         (layout_virtual_bases): Likewise.
18783         * class.c (finish_struct_1): Fix typo in this change:
18785         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18787 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
18789         * decl.c (grokdeclarator): Count partial specializations when
18790         keeping track of how many template classes have been seen.
18792         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
18794 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18796         * class.c (build_vbase_pointer_fields): layout_field now place_field.
18797         (get_vfield_offset): Use byte_position.
18798         (set_rtti_entry): Set OFFSET to ssizetype zero.
18799         (get_binfo_offset_as_int): Deleted.
18800         (dfs_record_base_offsets): Use tree_low_cst.
18801         (dfs_search_base_offsets): Likewise.
18802         (layout_nonempty_base_or_field): Reflect changes in RLI format
18803         and call byte_position.
18804         (layout_empty_base): Convert offset to ssizetype.
18805         (build_base_field): use rli_size_unit_so_far.
18806         (dfs_propagate_binfo_offsets): Do computation in proper type.
18807         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
18808         (layout_class_type): Reflect changes in RLI names and fields.
18809         (finish_struct_1): Set DECL_FIELD_OFFSET.
18810         * dump.c (dequeue_and_dump): Call bit_position.
18811         * expr.c (cplus_expand_constant): Use byte_position.
18812         * rtti.c (expand_class_desc): Use bitsize_one_node.
18813         * typeck.c (build_component_addr): Use byte_position and don't
18814         special case for zero offset.
18816 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
18818         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
18820         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
18821         tinfo object.
18822         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
18823         vtable.
18825 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18827         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
18828         DECL_P macros.
18829         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
18830         make_typename_type, check_initializer, cp_finish_decl,
18831         xref_tag): Likewise.
18832         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
18833         decl_namespace, arg_assoc_template_arg, arg_assoc,
18834         validate_nonmember_using_decl, do_class_using_decl): Likewise.
18835         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
18836         args_to_string): Likewise.
18837         * friend.c (is_friend): Likewise.
18838         * lex.c (note_got_semicolon, note_list_got_semicolon,
18839         is_global): Likewise.
18840         * method.c (build_overload_nested_name, build_overload_value,
18841         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
18842         * parse.y (typename_sub, typename_sub1): Likewise.
18843         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
18844         process_partial_specialization, convert_template_argument,
18845         template_args_equal, add_pending_template, lookup_template_class,
18846         for_each_template_parm_r, maybe_fold_nontype_arg,
18847         tsubst, instantiate_template, type_unification_real, unify,
18848         instantiate_pending_templates, set_mangled_name_for_template_decl):
18849         Likewise.
18850         * repo.c (repo_get_id, repo_template_used): Likewise.
18851         * search.c (lookup_field_1): Likewise.
18852         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
18853         * xref.c (classname): Likewise.
18855 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
18857         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
18858         (CANONICAL_BINFO): New macro.
18859         (BINFO_NEW_VTABLE_MARKED): Use it.
18860         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
18861         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
18862         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
18863         not TREE_TYPE.
18864         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18865         (build_secondary_vtable): Likewise.
18866         (dfs_finish_vtbls): Likewise.
18867         (dfs_accumulate_vtbl_inits): Likewise.
18868         (accumulate_vtbl_inits): New function.
18869         (finish_vtbls): Make sure that virtual bases come after
18870         non-virtual bases in the vtable group.
18871         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
18872         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18873         * search.c (struct vbase_info): Move definition.
18874         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
18875         (unmarked_new_vtable_p): Likewise.
18876         (dfs_mark_vtable_path): Remove.
18877         (dfs_mark_new_vtable): Remove.
18878         (dfs_unmark_new_vtable): Likewise.
18879         (dfs_clear_search_slot): Likewise.
18880         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
18881         (dfs_clear_vbase_slots): Likewise.
18882         (init_vbase_pointers): LIkewise.
18884 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
18886         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
18887         SIZETYPE to a non-SIZETYPE.
18889 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
18891         * class.c (layout_virtual_bases): Adjust names in conditionally
18892         compiled code.
18894         * class.c (record_base_offsets): New function.
18895         (layout_conflict_p): Likewise.
18896         (layout_nonempty_base_or_field): Use it.
18897         (layout_empty_base): New function.
18898         (build_base_field): Use it.
18899         (build_base_fields): Update comment.
18900         (layout_virtual_bases): Fold in a little code form
18901         layout_basetypes.  Use layout_empty_base.
18902         (layout_basetypes): Remove.
18903         (end_of_class): New function.
18904         (layout_class_type): Use it.  Adjust.
18906         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
18907         (fntype_p): Remove.
18908         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
18909         comment.
18910         (dfs_skip_nonprimary_vbases_markedp): Likewise.
18911         * typeck.c (fntype_p): Remove.
18913         * cp-tree.h (TI_SPEC_INFO): Remove.
18914         (CLASSTYPE_TI_SPEC_INFO): Likewise.
18915         * pt.c (process_partial_specialization): Likewise.
18917         * class.c (build_base_field): Fix thinko in computation of binfo
18918         offsets.
18920         * tree.c (mark_local_for_remap_p): Mark variables declared in
18921         TARGET_EXPRs as well.
18923 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
18925         * typeck.c (require_complete_type, complete_type,
18926         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
18927         build_array_ref, convert_arguments, pointer_diff,
18928         build_x_unary_op, build_unary_op, build_c_cast,
18929         build_modify_expr): Use COMPLETE_TYPE_P etc.
18930         * call.c (is_complete, convert_like_real,
18931         build_new_method_call): Likewise.
18932         * class.c (build_vbase_pointer_fields, check_bases,
18933         build_base_field, finish_struct_1, pushclass): Likewise.
18934         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
18935         * decl.c (maybe_process_template_type_declaration, pushtag,
18936         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
18937         layout_var_decl, check_initializer, cp_finish_decl,
18938         grokdeclarator, require_complete_types_for_parms,
18939         grok_op_properties, xref_tag, xref_basetypes,
18940         check_function_type): Likewise.
18941         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
18942         * friend.c (do_friend): Likewise.
18943         * init.c (build_offset_ref): Likewise.
18944         * parse.y (structsp): Likewise.
18945         * pt.c (maybe_process_partial_specialization,
18946         tsubst_friend_function, instantiate_class_template, tsubst,
18947         do_type_instantiation, instantiate_pending_templates): Likewise.
18948         * repo.c (repo_get_id): Likewise.
18949         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
18950         synthesize_tinfo_var, emit_support_tinfos): Likewise.
18951         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
18952         * semantics.c (begin_class_definition): Likewise.
18953         * tree.c (build_cplus_method_type): Likewise.
18954         * typeck2.c (digest_init, build_functional_cast,
18955         add_exception_specifier): Likewise.
18956         * parse.h, parse.c: Regenerated.
18958 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
18960         * inc/cxxabi.h: New header file. Define new-abi entry points.
18961         (__pointer_type_info::target): Rename member to ...
18962         (__pointer_type_info::type): ... here.
18963         (__base_class_info::type): Rename member to ...
18964         (__base_class_info::base): ... here.
18965         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
18966         * cp-tree.h (CPTI_ABI): New global tree enumeration.
18967         (abi_node): New global tree node.
18968         * decl.c (abi_node): Document.
18969         (init_decl_processing): Initialize abi_node.
18970         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
18971         (get_vmi_pseudo_type_info): Likewise.
18972         (create_tinfo_types): Likewise.
18973         (emit_support_tinfos): Likewise.
18974         * tinfo.h (cxxabi.h): Include for new-abi.
18975         Move rtti class definitions to new header file.
18976         * tinfo.cc (abi): Use the namespace.
18977         (std): Move new abi rtti classes from here ...
18978         (__cxxabiv1): ... to here.
18979         * tinfo2.cc (cxxabi.h): Include for new-abi.
18980         Move rtti class definitions to new header file.
18981         (std): Move new abi rtti classes from here ...
18982         (__cxxabiv1): ... to here.
18983         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
18984         namespace.
18986 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
18987             Jason Merrill  <jason@casey.cygnus.com>
18989         * method.c (build_overload_int): Use host_integerp.
18991 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18993         * init.c (build_offset_ref): Handle the case of a templated member
18994         function.
18996 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18998         * except.c (expand_exception_blocks): Clear catch_clauses_last.
19000 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
19002         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
19003         * class.c (check_bitfield_decl): Turn illegal bitfields into
19004         non-bitfields.
19005         (dfs_propagate_binfo_offsets): Adjust for new size_binop
19006         semantics.
19007         (dfs_offset_for_unshared_vbases): Likewise.
19008         * cvt.c (cp_convert_to_pointer): Convert NULL to a
19009         pointer-to-member correctly under the new ABI.
19010         * expr.c (cplus_expand_constant): Don't use cp_convert when
19011         turning an offset into a pointer-to-member.
19012         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
19013         when dereferencing them under the new ABI.
19014         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
19015         of pointers-to-members under the new ABI.
19017         * class.c (check_bitfield_decl): Remove restriction on really long
19018         bitfields.
19019         (layout_class_type): Implement new ABI handling of bitfields
19020         longer than their types.
19022 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19024         * parse.y (extdefs): Call ggc_collect.
19025         * parse.c: Regenerated.
19027 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
19029         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
19030         (note_name_declared_in_class): Use OVL_CURRENT to get at a
19031         potential overload.
19033 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19035         * class.c (build_vbase_path): Use integer_zerop.
19036         (build_vtable_entry): Use tree_low_cst.
19037         (get_vfield_offset): Use bit_position.
19038         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
19039         Use tree_low_cst.
19040         (check_bitfield_decl): Set DECL_SIZE using convert.
19041         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
19042         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
19043         Use tree_low_cst.
19044         (finish_struct_1): Use bit_position.
19045         (dump_class_hierarchy): Use tree_low_cst.
19046         * cp-tree.h (min_precision): Add declaration.
19047         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
19048         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
19049         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
19050         * expr.c (cplus_expand_constant): Use bit_position.
19051         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
19052         * rtti.c (get_base_offset): Use bit_position.
19053         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
19054         host_integerp, and tree_low_cst.
19055         (pointer_int_sum): Use integer_zerop.
19056         (build_component_addr): Use bit_position.
19058 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
19060         * typeck.c (require_complete_type): Don't assume size_zero_node.
19061         (complete_type_or_else): Likewise.
19063 2000-03-16  Steven Grady <grady@digitaldeck.com>
19064             Jason Merrill  <jason@casey.cygnus.com>
19066         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
19068 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
19070         * decl2.c (grokfield): Bail out if type is error_mark_node.
19072 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19074         * tinfo2.cc (__ptr_to_member_data): Rename to ...
19075         (__pointer_to_member_data): ... here. Adjust.
19076         * rtti.c (create_tinfo_types): Adjust.
19078 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19080         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
19081         * decl.c (ref_desc_type_node): Undocument.
19082         * rtti.c (ptr_ref_initializer): Rename to ...
19083         (ptr_initializer): ... here. Adjust comments.
19084         (ptmd_initializer): Fix comment thinko.
19085         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
19086         (create_tinfo_types): Remove ref_desc_type_node init.
19087         * tinfo2.cc (__reference_type_info): Remove.
19089 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
19091         * decl.c (cp_finish_decl): Remove obsolete comment.
19093         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
19095 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
19097         * cp-tree.h: Tweak documentation.
19098         * class.c (build_vbase_pointer_fields): Layout the fields, too.
19099         (avoid_overlap): Remove.
19100         (get_binfo_offset_as_int): New function.
19101         (dfs_serach_base_offsets): Likewise.
19102         (layout_nonempty_base_or_field): Likewise.
19103         (build_base_field): Layout fields here.  Avoid placing two objects
19104         of the same type at the same address, under the new ABI.
19105         (build_base_fields): Adjust accordingly.
19106         (create_vtable_ptr): Return the new field, but don't attach it to
19107         TYPE_FIELDS.
19108         (remove_base_field): Remove.
19109         (remove_base_fields): Remove.
19110         (layout_basetypes): Adjust accordingly.
19111         (layout_class_type): Call layout_field for each field, rather than
19112         just making a wholesale call to layout_type.
19114 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
19116         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
19118 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
19120         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
19122         * except.c (dtor_nothrow): New fn.
19123         (do_pop_exception): Use it.  Take type parm.
19124         (push_eh_cleanup): Take type parm.
19125         (expand_start_catch_block): Pass it.
19126         (build_eh_type_type_ref): Accept null type.
19128 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
19130         * cp-tree.h (revert_static_member_fn): Change prototype.
19131         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
19132         (grok_op_properties): Likewise.
19133         (start_function): Likewise.
19134         (revert_static_member_fn): Simplify.
19135         * pt.c (check_explicit_specialization): Adjust call to
19136         revert_static_member_fn.
19138 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
19140         * cp-tree.h (scope_kind): New type.
19141         (tmpl_spec_kind): Likewise.
19142         (declare_pseudo_global_level): Remove.
19143         (pseudo_global_level_p): Rename to template_parm_scope_p.
19144         (pushlevel): Remove declaration.
19145         (begin_scope): New function.
19146         (finish_scope): Likewise.
19147         (current_tmpl_spec_kind): Likewise.
19148         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
19149         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
19150         Add template_spec_p.
19151         (toplevel_bindings_p): Adjust.
19152         (declare_pseudo_global_level): Remove.
19153         (pseudo_global_level_p): Rename to template_parm_scope_p.
19154         (current_tmpl_spec_kind): New function.
19155         (begin_scope): Likewise.
19156         (finish_scope): Likewise.
19157         (maybe_push_to_top_level): Adjust.
19158         (maybe_process_template_type_declaration): Likewise.
19159         (pushtag): Likewise.
19160         (pushdecl_nonclass_level): Likewise.
19161         (lookup_tag): Likewise.
19162         (grokfndecl): Handle member template specializations.  Share
19163         constructor and non-constructor code.
19164         * decl2.c (check_classfn): Handle member template specializations.
19165         * pt.c (begin_template_parm_list): Use begin_scope.
19166         (begin_specialization): Likewise.
19167         (end_specialization): Likewise.
19168         (check_explicit_specialization): Use current_tmpl_spec_kind.
19169         Handle member template specializations.
19170         (end_template_decl): Use finish_scope.  Remove call to
19171         get_pending_sizes.
19172         (push_template_decl_real): Remove bogus error message.
19173         (tsubst_decl): Fix typo in code contained in comment.
19174         (instantiate_template): Handle member template specializations.
19175         (most_general_template): Likewise.
19177 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
19179         * lex.c (whitespace_cr): Compress consecutive calls to warning().
19180         (do_identifier): Ditto for error().
19182         * pt.c (convert_nontype_argument): Ditto for cp_error().
19183         (convert_template_argument): Ditto for cp_pedwarn().
19185 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
19187         * exception.cc (__check_null_eh_spec): New fn.
19188         * except.c (expand_end_eh_spec): Call it if the spec is throw().
19190 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19192         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
19193         * except.c (expand_end_eh_spec): Add the return type.
19194         * rtti.c (throw_bad_cast): Add the parmtypes.
19195         (throw_bad_typeid): Likewise.
19197         * semantics.c (expand_stmt): Only leave out rtl for unused
19198         artificials, and set DECL_IGNORED_P on them as well.
19199         * decl.c (wrapup_globals_for_namespace): Likewise.
19201 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
19203         * decl.c (maybe_commonize_var): Skip all artificial decls.
19204         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
19206 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
19208         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
19209         * cp-tree.h: Declare flag_enforce_eh_specs.
19210         * decl.c (store_parm_decls, finish_function): Check it.
19212         C library functions don't throw.
19213         * Makefile.in (cfns.h): New target.
19214         (except.o): Depend on it.
19215         * Make-lang.in (cc1plus): Depend on cfns.gperf.
19216         * cfns.gperf: New file.
19217         * cfns.h: Generated.
19218         * except.c: Include it.
19219         (nothrow_libfn_p): New fn.
19220         * decl.c (grokfndecl): Use it.
19221         * cp-tree.h: Declare it.
19223         * decl.c (push_overloaded_decl_1, auto_function,
19224         define_function): Lose.
19225         (build_library_fn_1): New static fn.
19226         (builtin_function): Use it.
19227         (get_atexit_node): Use build_library_fn_ptr.
19228         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
19229         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
19230         push_void_library_fn, push_throw_library_fn): New fns.
19231         * cp-tree.h: Declare them.
19232         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
19233         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
19234         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
19235         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
19236         * rtti.c (build_runtime_decl): Lose.
19237         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
19238         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
19239         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
19241         * call.c (build_call): Remove result_type parm.
19242         Call mark_used on unused artificial fns.
19243         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
19245 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
19247         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
19248         appropriate.
19249         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
19250         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
19251         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
19252         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
19253         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
19254         expand_generic_desc): Likewise.
19256 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19258         * exception.cc (__cp_pop_exception): Cleanup the original object.
19260 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19262         * decl.c (grok_op_properties): Merge conversion to void warning
19263         with other silly op warnings.
19265 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
19267         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
19268         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
19270 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19272         * decl.c (cp_make_fname_decl): New function.
19273         (wrapup_globals_for_namespace): Don't emit unused static vars.
19274         (init_decl_processing): Remove comment about use of
19275         array_domain_type. Set make_fname_decl.
19276         (cp_finish_decl): Remove __FUNCTION__ nadgering.
19277         * semantics.c (begin_compound_stmt): Remove
19278         current_function_name_declared flagging.
19279         (expand_stmt): Don't emit unused local statics.
19280         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
19281         specially.
19283 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
19285         * typeck.c (convert_for_assignment): Don't look at array
19286         initializer.
19287         * call.c (convert_like_real): Likewise.
19289 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
19291         Add initial support for '\uNNNN' specifier.
19292         * lex.c (read_ucs): New fn.
19293         (readescape, skip_white_space): Call it.
19294         (is_extended_char, is_extended_char_1): New fns.
19295         (utf8_extend_token): New fn, #if 0'd out.
19296         (real_yylex): Treat extended chars like letters.
19298         * search.c (note_debug_info_needed): Walk the bases even if we
19299         weren't deferring the type itself.
19301 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19303         * decl2.c (finish_objects): Constify a char*.
19305         * method.c (emit_thunk): Likewise.
19307 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
19309         * typeck.c (dubious_conversion_warnings): Look through
19310         REFERENCE_TYPE.
19312 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19314         * class.c (dfs_modify_vtables): I is now unsigned.
19315         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
19316         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
19317         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
19318         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
19319         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
19320         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
19321         Call integer_all_onesp.
19322         * typeck2.c (process_init_constructor): Use compare_tree_int.
19324         * lang-specs.h (as): Don't call if -syntax-only.
19326 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
19328         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
19329         RTL_EXPR_HAS_NO_SCOPE after all.
19331 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
19333         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
19334         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
19335         RTL_EXPR_HAS_NO_SCOPE.
19337         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
19338         later.
19340         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
19342 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
19344         * call.c (convert_like): Macrofy.
19345         (convert_like_with_context): New macro.
19346         (convert_like_real): Renamed from convert_like.  Add calling
19347         context parameters, for diagnostics. Add recursive flag.  Call
19348         dubious_conversion_warnings for outer conversion.
19349         (build_user_type_conversion): Use convert_like_with_context.
19350         (build_over_call): Likewise. Don't warn about dubious
19351         conversions here. Adjust convert_default_arg calls.
19352         (convert_default_arg): Add context parameters for diagnostics.
19353         Pass through to convert_like_with_context.
19354         * cp-tree.h (convert_default_arg): Add context parameters.
19355         (dubious_conversion_warnings): Prototype new function.
19356         * typeck.c (convert_arguments): Adjust convert_default_arg call.
19357         (dubious_conversion_warnings): New function, broken
19358         out of convert_for_assignment.
19359         (convert_for_assignment): Adjust.
19361 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
19363         * decl2.c (key_method): Break out from...
19364         (import_export_vtable, import_export_class): ...here.
19366         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
19367         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
19369         * search.c (note_debug_info_needed, dfs_debug_mark,
19370         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
19371         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
19373 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
19375         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
19376         typos.
19378 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
19380         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
19381         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
19382         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
19383         (lang_type): Split gets_new into has_new and has_array_new.
19384         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19385         (TYPE_GETS_NEW): Split into ...
19386         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
19387         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
19388         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
19389         (build_op_new_call): Don't declare.
19390         (build_new_1): Likewise.
19391         * call.c (build_op_new_call): Remove.
19392         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19393         instead of TYPE_NEEDS_DESTRUCTOR.
19394         (finish_struct_bits): Likewise.
19395         (add_implicitly_declared_members): Likewise.
19396         (check_field_decl): Likewise.
19397         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
19398         correctly under the new ABI.
19399         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
19400         instead of TYPE_NEEDS_DESTRUCTOR.
19401         (initialize_local_var): Likewise.
19402         (destroy_local_var): Likewise.
19403         (cp_finish_decl): Likewise.
19404         (register_dtor_fn): Likewise.
19405         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
19406         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
19407         TYPE_VEC_DELETE_TAKES_SIZE here.
19408         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
19409         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
19410         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19411         (finish_destructor_body): Likewise.
19412         (maybe_build_cleanup_1): Likewise.
19413         * decl2.c (do_static_destruction): Likewise.
19414         * init.c (build_new_1): Make it static.
19415         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19416         (expand_cleanup_for_base): Likewise.
19417         (get_cookie_size): New function.
19418         (build_new_1): Handle array-new cookies correctly under the new
19419         ABI.
19420         (build_vec_delete_1): Likewise.
19421         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19422         (build_delete): Likewise.
19423         (build_vec_delete): Handle array-new cookies correctly under the new
19424         ABI.
19425         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19426         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
19427         TYPE_HAS_ARRAY_NEW_OPERATOR.
19428         * ptree.c (print_lang_type): Check them.
19429         * search.c (context_for_name_lookup): Fix typo in comment.
19430         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
19431         * tree.c (break_out_cleanups): Likewise.
19432         (build_cplus_array_test_1): Likewise.
19433         (cp_build_qualified_type_real): Likewise.
19434         * typeck.c (complete_type): Likewise.
19436         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
19437         the command-line, not the end.
19439 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
19441         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
19443 2000-03-02  Tom Tromey  <tromey@cygnus.com>
19445         * cp-tree.h (build_java_class_ref): Declare.
19446         * init.c (build_java_class_ref): No longer static.
19447         * except.c (expand_throw): Generate a Java-style `throw' if the
19448         thrown object is a "Java" object.
19449         (initialize_handler_parm): Generate a Java-style lookup of
19450         exception info if the caught object is a "Java" object.
19451         (catch_language, catch_language_init): New globals.
19452         (decl_is_java_type): New function.
19453         (expand_start_catch_block): Don't call push_eh_info() or
19454         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
19455         class reference to build_catch_block.
19457 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19459         * typeck.c (comptypes): Treat sizetype like its language equivalent.
19461 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
19463         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
19464         to merge reference/pointer code and fix incorrect warnings.
19466 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
19468         * search.c (protected_accessible_p): Use context_for_name_lookup.
19470         * init.c (construct_virtual_bases): Fix thinko.
19471         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
19473 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
19475         * decl.c (current_function_decl): Move to toplev.c.
19477 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
19479         * pt.c (fn_type_unification): Unify return type, whenever
19480         provided.
19481         (get_bindings_real): Only pass return type when necessary.
19482         Remove explicit return type check.
19483         * class.c (resolve_address_of_overloaded_function): Pass desired
19484         return type to fn_type_unification.
19486 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19488         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
19489         DECL_FIELD_SIZE.
19490         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
19491         DECL_FIELD_SIZE.
19492         * rtti.c (expand_class_desc): Likewise.
19493         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
19494         (THUNK_VCALL_OFFSET): Likewise.
19495         (THUNK_DELTA): Reflect changes in ../tree.h.
19497 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
19499         * search.c (protected_accessible_p): Also allow the access if
19500         the member is public in DERIVED.  Lose TYPE parm.
19501         (friend_accessible_p): Lose TYPE parm.
19502         (accessible_p): Adjust.
19504 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19506         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
19507         on things that are not sizes; ssize_binop deleted.
19508         Call size_diffop when appropriate.
19509         (dfs_build_vcall_offset_vtbl_entries): Likewise.
19510         (build_primary_vtable, build_secondary_vtable): Likewise.
19511         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
19512         Variable I is HOST_WIDE_INT.
19513         (get_vfield_offset): Pass proper types to size_binop.
19514         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
19515         (finish_struct_1): Likewise.
19516         (skip_rtti_stuff): Arg N is now pointer to signed.
19517         (layout_class_type): Use size_zero_node.
19518         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
19519         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
19520         * decl.c (complete_arry_type): Pass proper types to size_binop.
19521         (xref_basetypes): BINFO_OFFSET is sizetype.
19522         * error.c (dump_expr): Don't use size_binop non-sizes.
19523         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
19524         * init.c (construct_virtual_bases): Fix type error.
19525         (build_vec_delete_1): Pass proper type to size_binop and don't
19526         fold result.
19527         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
19528         * rtti.c (get_base_offset): Pass proper type to size_binop.
19529         * search.c (dfs_find_vbases): Fix type error.
19530         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
19531         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
19532         * tree.c (debug_binfo): Variable N is signed.
19533         Use HOST_WIDE_INT_PRINT_DEC.
19534         * typeck.c (comptypes): sizetype is same as equivalent integer type.
19535         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
19536         size_one_node and size_zero_node.
19537         (c_alignof): Use size_one_node.
19538         (build_component_addr): Pass proper types to size_binop.
19539         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
19541 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
19543         Implement class scope using-declarations for functions.
19544         * class.c (handle_using_decl): Call add_method for used functions.
19545         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
19546         (add_method): Used functions are hidden by local functions.
19547         (check_bases_and_members): Handle using-decls before finalizing
19548         CLASSTYPE_METHOD_VEC.
19549         * call.c (add_function_candidate): Add ctype parm; if nonzero,
19550         override the type of 'this' accordingly.
19551         (add_template_candidate, add_template_candidate_real): Add ctype parm.
19552         (convert_class_to_reference, build_user_type_conversion_1,
19553         build_new_function_call, build_object_call, build_new_op,
19554         build_new_method_call): Pass ctype parm.
19556         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
19557         the baselink.
19558         * call.c (convert_class_to_reference, build_user_type_conversion_1,
19559         build_new_function_call, build_object_call, build_new_op,
19560         build_new_method_call, build_op_delete_call): Don't get basetype_path
19561         from a baselink.
19562         * typeck.c (build_component_ref): Likewise.
19563         * init.c (build_offset_ref): Likewise.
19564         (resolve_offset_ref): Don't call enforce_access.
19565         Call build_scoped_ref.
19566         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
19567         would cause an error or if -pedantic.
19568         * class.c (alter_access): Lose binfo parm.
19570 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
19572         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
19573         types.
19575 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
19577         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
19578         pseudo_type_info creation into the std namespace
19580 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
19582         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
19583         (import_export_class): Remove declaration.
19584         * decl2.c (import_export_class): Make it static.
19585         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
19586         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
19587         EXPR_WITH_FILE_LOCATION.
19588         * lex.c (check_newline): Tweak filename/lineno setting.
19589         * semantics.c (begin_while_stmt): Fix typo in comment.
19591 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19593         * lang-options.h (-fmessage-length=): Add missing option.
19595         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
19597 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
19599         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
19601 2000-02-25  Jim Wilson  <wilson@cygnus.com>
19603         * optimize.c (expand_call_inline): Emit the return label before
19604         evaluating the return value.
19606 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
19608         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
19609         than duplicating functionality here.
19610         * optimize.c: Include input.h.
19611         (expand_call_inline): Use push_srcloc and pop_srcloc.
19612         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
19613         * parse.c: Regenerated.
19614         * Makefile.in (lex.o): Depend on input.h.
19615         (optimize.o): Likewise.
19617 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
19619         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
19620         function type, rather than ICE.
19622 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
19624         * decl.c (grokdeclarator): Call decl_type_access_control.
19625         * parse.y (parse_end_decl): Don't call decl_type_access_control if
19626         decl is null.
19628 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
19630         * decl.c (decls_match): Remove obsolete static member nadgering.
19632 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19634         * decl.c (grokdeclarator): Change ANSI to ISO.
19635         * lex.c (consume_string, readescape, do_identifier): Likewise.
19636         (parse_float, real_yylex): Likewise.
19637         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
19638         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
19639         new_type_id, maybe_label_decls, simple_stmt,
19640         for.init.statement): Likewise.
19641         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
19642         * semantics.c (finish_named_return_value): Likewise.
19643         * parse.c: Regenerate.
19645 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
19647         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
19648         (CPTI_CLASS_STAR_TYPE): Remove.
19649         (vtable_index_type): Likewise.
19650         (class_star_type_node): Remove.
19651         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
19652         (build_binary_op_nodefault): Remove.
19653         * call.c (build_new_op): Use build_binary_op instead of
19654         build_binary_op_nodefault.
19655         * decl.c (init_decl_processing): Remove class_star_type_node
19656         initialization.  Make delta_type_node ptrdiff_type_node under the
19657         new ABI.  Initialize vtable_index_type.
19658         (build_ptrmemfunc_type): Build different structures for the new
19659         ABI.
19660         (build_enumerator): Use build_binary_op instead of
19661         build_binary_op_nodefault.
19662         * method.c (build_overload_value): Mangle pointers-to-members
19663         appropriately under the new ABI.
19664         * typeck.c (build_array_ref): Use build_binary_op instead of
19665         build_binary_op_nodefault.
19666         (get_member_function_from_ptrfunc): Adjust for the new ABI.
19667         (build_binary_op_nodefault): Rename to ...
19668         (build_binary_op): ... this.  Remove old version.  Adjust for
19669         pointer-to-member comparisons under the new ABI.
19670         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
19671         (build_ptrmemfunc): Adjust for the new ABI.
19672         (expand_ptrmemfunc_cst): Likewise.
19673         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
19674         (pfn_from_ptrmemfunc): Adjust for the new ABI.
19676 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
19678         * call.c (build_object_call): Compress consecutive calls to
19679         cp_error.
19680         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
19681         (build_op_delete_call): Adjust message formatting.
19683         * class.c (check_bases): Compress consecutive calls to
19684         cp_pedwarn.
19685         (finish_struct_anon): Say 'ISO C++'.
19687         * decl.c (start_decl): Same here.
19688         (grok_reference_init): Likewise.
19689         (grokfndecl): Correct message formatting.
19690         (grokfndecl): Improve diagnostic.
19691         (check_static_variable_definition): Likewise. Say 'ISO C++'
19692         (compute_array_index_type): Say 'ISO C++'
19693         (create_array_type_for_decl): Compress consecutive calls to
19694         cp_error.
19695         (grokdeclarator): Say 'ISO C++'
19696         (grok_op_properties): Likewise.
19698         * decl2.c (delete_sanity): Clairify diagnostic.
19699         (check_member_template): Same here.
19700         (grok_function_init): Use consistent terminology.
19702         * expr.c (do_case): Say 'ISO C++'
19704         * friend.c (do_friend): Compress consecutive calls to warning.
19706 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
19708         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
19709         * class.c (build_secondary_vtable): Reorganize.  Don't create a
19710         new vtable under the new ABI.
19711         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
19712         computing the size.
19713         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
19714         the initializing elements.
19715         (initialize_vtable): New function.
19716         (dfs_finish_vtbls): Use it.
19717         (dfs_accumulate_vtbl_inits): New function.
19718         (finish_vtbls): Merge primary and secondary vtables under the new
19719         ABI.
19720         (finish_struct_1): Remove redundant call to layout_vtable_decl.
19721         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
19722         aren't VAR_DECLs.
19724         * class.c (build_vtable): New function, split out from ...
19725         (get_vtable_decl): ... here, and ...
19726         (build_secondary_vtable): ... here.
19728         * pt.c (tsubst_decl): Fix formatting.
19730 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
19732         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
19733         (avoid_overlap, build_base_field): Likewise.
19734         (build_base_field, build_base_fields, is_empty_class):
19735         Test DECL_SIZE with integer_zero.
19736         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
19737         * cp-tree.h (struct lang_type): New field size_unit.
19738         (CLASSTYPE_SIZE_UNIT): New macro.
19739         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
19740         (cp_finish_decl): Delete -Wlarger-than processing.
19741         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
19742         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
19743         * tree.c (make_binfo): binfo vector is one entry longer.
19744         (walk_tree): Walk DECL_SIZE_UNIT.
19746 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
19748         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
19749         comment.
19750         (build_vtable_entry): Don't assume all vtable entries are
19751         functions.
19752         (build_vtbl_initializer): Adjust accordingly.
19753         (get_vtable_decl): Fix formatting.
19755 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
19757         * semantics.c (deferred_type_access_control): Walk the entire
19758         type_lookups list.
19759         (save_type_access_control): Rename from
19760         initial_deferred_type_access_control.  Just remember the value.
19761         (decl_type_access_control): New fn.
19762         (begin_function_definition): Use deferred_type_access_control, after
19763         we've started the function.  Set type_lookups to error_mark_node.
19764         * parse.y (frob_specs, fn.def1): Adjust.
19765         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
19766         (parse_end_decl, parse_bitfield0, parse_method): New fns.
19767         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
19768         (after_type_component_declarator0): Likewise.
19769         (after_type_component_declarator): Likewise.
19770         (notype_component_declarator): Likewise.
19771         * cp-tree.h: Adjust.
19773         * decl.c (redeclaration_error_message): Allow redeclaration of
19774         namespace-scope decls.
19776 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
19778         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
19780 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
19782         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
19783         * decl2.c (grokclassfn): Likewise.
19785         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
19787         * decl2.c (lang_decode_option): Don't set default message length
19788         here.
19789         * lex.c (lang_init_options): Set it here.
19791 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
19793         Make DECL_CONTEXT mean the class in which a member function was
19794         declared, even for a virtual function.
19795         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
19796         (DECL_FRIEND_CONTEXT): New macro.
19797         (DECL_REAL_CONTEXT): Remove.
19798         (SET_DECL_FRIEND_CONTEXT): Likewise.
19799         (DECL_VIRTUAL_CONTEXT): Adjust.
19800         (DECL_CLASS_SCOPE_P): Use TYPE_P.
19801         (add_friends): Remove.
19802         (hack_decl_function_context): Likewise.
19803         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
19804         CP_DECL_CONTEXT.
19805         (build_over_call): Fix indentation.  Use DECL_CONTEXT
19806         instead of DECL_CLASS_CONTEXT.
19807         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
19808         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19809         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19810         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
19811         (build_base_field): Likewise.
19812         (finish_struct_1): Likewise.
19813         (build_self_reference): Likewise.
19814         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
19815         DECL_REAL_CONTEXT.
19816         (pushtag): Use decl_function_context, not
19817         hack_decl_function_context.
19818         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19819         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
19820         (pushdecl): Remove bogus code.
19821         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
19822         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19823         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19824         Use decl_function_context, nothack_decl_function_context.
19825         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
19826         (grokdeclarator): Likewise.  Use decl_function_context, not
19827         hack_decl_function_context.
19828         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
19829         (start_function): Use DECL_FRIEND_CONTEXT, not
19830         DECL_CLASS_CONTEXT.  Use decl_function_context, not
19831         hack_decl_function_context.
19832         (finish_function): Use decl_function_context, not
19833         hack_decl_function_context.
19834         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
19835         DECL_CLASS_CONTEXT.
19836         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
19837         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
19838         (grokfield): Likewise.
19839         (finish_builtin_type): Likewise.
19840         (finish_vtable_vardec): Use decl_function_context, not
19841         hack_decl_function_context.
19842         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19843         (start_static_initialization_or_destruction): Likewise.
19844         (finish_static_initialization_or_destruction): Likewise.
19845         (mark_used): Adjust logic for deciding when to synthesize methods.
19846         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
19847         DECL_REAL_CONTEXT.
19848         * error.c (dump_function_decl): Use DECL_CONTEXT, not
19849         DECL_CLASS_CONTEXT.
19850         * friend.c (is_friend): Likewise.
19851         (add_friends): Remove.
19852         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
19853         * lex.c (begin_definition_of_inclass_inline): Use
19854         decl_function_context, not hack_decl_function_context.
19855         (process_next_inline): Likewise.
19856         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
19857         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
19858         DECL_CLASSS_CONTEXT.
19859         (hack_identifier): Likewise.
19860         (synthesize_method):  Use decl_function_context, not
19861         hack_decl_function_context.
19862         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
19863         DECL_REAL_CONTEXT.
19864         (is_member_template): Use decl_function_context, not
19865         hack_decl_function_context.  Use DECL_CONTEXT, not
19866         DECL_CLASS_CONTEXT.
19867         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
19868         DECL_CLASS_CONTEXT.
19869         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
19870         DECL_REAL_CONTEXT.
19871         (push_template_decl_real): Likewise.
19872         (instantiate_class_template): Don't call add_friends.
19873         (tsubst_default_argument): Use DECL_CONTEXT, not
19874         DECL_REAL_CONTEXT.
19875         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
19876         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19877         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
19878         DECL_CLASS_CONTEXT.
19879         * repo.c (repo_inline_used): Likewise.
19880         * search.c (current_scope): Adjust for new _CONTEXT macros.
19881         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
19882         DECL_REAL_CONTEXT.
19883         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
19884         (lookup_fnfields_here):Likewise.
19885         (check_final_overrider): Likewise.
19886         (init_vbase_pointers): Likewise.
19887         (virtual_context): Likewise.
19888         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
19889         (expand_body): Use decl_function_context, not
19890         hack_decl_function_context.
19891         * tree.c (hack_decl_function_context): Remove.
19892         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
19893         DECL_CLASS_CONTEXT.
19894         * typeck2.c (error_not_base_type): Likewise.
19896 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
19898         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
19900 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19902         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
19904 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
19906         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
19908 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
19910         * decl2.c (lang_decode_option): Enable automatic line wrapping.
19912 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
19914         * parse.y (frob_specs): Split out...
19915         (parse_decl): From here.
19916         (fn.def2): Call initial_deferred_type_access_control.
19917         (after_type_component_declarator0): Call frob_specs.
19918         (notype_component_declarator0): Likewise.
19919         * search.c (friend_accessible_p): Nested classes are friends of their
19920         enclosing classes.
19922 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
19924         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
19925         used to create an implicit temporary.
19927         * class.c (dfs_modify_vtables): Tweak calculation of functions to
19928         override.
19930 2000-02-08  Nathan Sidwell  <nathan@acm.org>
19932         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
19933         strip array element qualifiers too.
19935 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
19937         * decl.c (store_parm_decls): Don't build cleanups for parameters
19938         while processing_template_decl.
19940 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
19942         * cp-tree.h (struct saved_scope): Add incomplete field.
19943         (namespace_scope_incomplete): New macro.
19944         * decl.c (pushdecl): Use it.
19945         (hack_incomplete_structures): Use it.  See through artificial
19946         binding levels.
19947         (mark_saved_scope): Mark it.
19949         Implement access control for nested types.
19950         * search.c (type_access_control): New fn.
19951         (accessible_p): Now we do perform access control for types.
19952         * semantics.c (deferred_type_access_control): New fn.
19953         (initial_deferred_type_access_control): New fn.
19954         (begin_function_definition): Call it.  Add lookups parm.
19955         * decl.c (struct binding_level): Add this_class field.
19956         (pushlevel_class): Set it.
19957         (mark_binding_level): Mark it.
19958         (lookup_name_real): Use it.  Call type_access_control.
19959         (mark_saved_scope): Mark lookups field.
19960         * cp-tree.h (flagged_type_tree): Add lookups field.
19961         (struct saved_scope): Add lookups field.
19962         (type_lookups): New macro.
19963         * parse.y (declmods): Now <ftype>.
19964         (parse_decl): Add lookups parm.  Call
19965         initial_deferred_type_access_control.
19966         (lang_extdef): Clear type_lookups.
19967         (typed_declspecs, declmods, typespec): Set lookups field.
19968         (initdcl): Call deferred_type_access_control.
19969         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
19970         component_decl_1, named_parm): Adjust.
19971         * friend.c (is_friend): Nested classes are friends of their
19972         enclosing classes.
19974         * class.c (currently_open_derived_class): New fn.
19975         * method.c (hack_identifier): Use it.
19977         * lex.c (do_identifier): Remove obsolete code.
19979         * parse.y (typed_typespecs): Propagate new_type_flag properly.
19981 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
19983         * tinfo.h: Remove apostrophes from C++ comment (xgettext
19984         thinks this file is plain C).
19986 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19988         * Makefile.in (call.o): Depend on $(EXPR_H).
19990         * call.c: Include "expr.h".
19992         * class.c (dump_class_hierarchy): Add prototype.
19994         * search.c (dfs_get_pure_virtuals): Likewise.
19996 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
19998         * parse.y (simple_stmt): Allow :: token in asm parameter list.
19999         * parse.c: Rebuilt.
20001 2000-01-31  Jim Wilson  <wilson@cygnus.com>
20003         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
20004         Store it in DECL_FCONTEXT.
20005         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
20007 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
20009         * tinfo.h (old abi): #include "tconfig.h".
20010         * tinfo.cc (convert_to_base): Move into old abi section.
20012 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
20014         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
20015         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
20016         (BINFO_PRIMARY_BINFO): New macro.
20017         (BF_DELTA): Rename to ...
20018         (BV_DELTA): ... this.
20019         (BF_VCALL_INDEX): Rename to ...
20020         (BV_VCALL_INDEX): ... this.
20021         (BF_FN): Rename to ...
20022         (BV_FN): ... this.
20023         * class.c (build_vbase_path): Adjust for changes to reverse_path.
20024         (set_rtti_entry): Rename BF_ macros to BV_ variants.
20025         (modify_vtable_entry): Simplify.
20026         (add_virtual_function): Rename BF_ macros to BV_ variants.
20027         (build_vtable_initializer): Likewise.
20028         (get_class_offset_1): Remove.
20029         (dfs_get_class_offset): Likewise.
20030         (get_class_offset): Likewise.
20031         (dfs_find_final_overrider): New function.
20032         (find_final_overrider): Likewise.
20033         (modify_one_vtable): Remove.
20034         (dfs_find_base): New function.
20035         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
20036         find_final_overrider.
20037         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
20038         virtuals.
20039         (dfs_fixup_vtable_deltas): Remove.
20040         (override_one_vtable): Remove.
20041         (merge_overrides): Likewise.
20042         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
20043         unreal chilren of virtual bases.
20044         (finish_struct_1): Don't use merge_overrides.  Don't use
20045         dfs_fixup_vtable_deltas.
20046         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
20047         BINFOs.
20049 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
20050             Jason Merrill  <jason@yorick.cygnus.com>
20052         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
20054 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
20056         * exception.cc (__throw_bad_typeid): Add missing std::.
20058 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20060         * cp-tree.h (make_thunk): PROTO -> PARAMS.
20062 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
20064         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
20066         Runtime support for new-abi rtti.
20067         * inc/typeinfo (type_info::operator!=): Define in class.
20068         (type_info::before, type_info::name, type_info::operator==,
20069         type_info::operator!=): Define new ABI implementations.
20070         (type_info::is_pointer_p, type_info::is_function_p): Declare
20071         new virtual functions.
20072         (type_info::do_catch, type_info::do_upcast): Likewise.
20074         * tinfo.h (__base_class_info): Define new class.
20075         (__class_type_info): Likewise.
20076         (__si_class_type_info): Likewise.
20077         (__vmi_class_type_info): Likewise.
20078         (__dynamic_cast): Prototype.
20080         * tinfo.cc: Conditionalize old and new rtti mechanisms.
20081         (type_info::is_pointer_p): Define new function.
20082         (type_info::is_function_p): Likewise.
20083         (type_info::do_catch): Likewise.
20084         (type_info::do_upcast): Likewise.
20085         (vtable_prefix): New structure for vtable access.
20086         (adjust_pointer): Define new template function.
20087         (contained_p, public_p, virtual_p, contained_public_p,
20088         contained_nonpublic_p, contained_nonvirtual_p): Define new
20089         functions.
20090         (nonvirtual_base_type): New local variable.
20091         (__class_type_info::~__class_type_info): Define.
20092         (__si_class_type_info::~__si_class_type_info): Likewise.
20093         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
20094         (__class_type_info::do_catch): Define new function.
20095         (__class_type_info::do_upcast): Likewise.
20096         (__class_type_info::find_public_src): Likewise.
20097         (__class_type_info::do_find_public_src): Likewise.
20098         (__si_class_type_info::do_find_public_src): Likewise.
20099         (__vmi_class_type_info::do_find_public_src): Likewise.
20100         (__class_type_info::do_dyncast): Likewise.
20101         (__si_class_type_info::do_dyncast): Likewise.
20102         (__vmi_class_type_info::do_dyncast): Likewise.
20103         (__class_type_info::do_upcast): Likewise.
20104         (__si_class_type_info::do_upcast): Likewise.
20105         (__vmi_class_type_info::do_upcast): Likewise.
20106         (__dynamic_cast): Likewise.
20108         * tinfo2.cc (__fundamental_type_info): Define new class.
20109         (__pointer_type_info): Likewise.
20110         (__reference_type_info): Likewise.
20111         (__array_type_info): Likewise.
20112         (__function_type_info): Likewise.
20113         (__enum_type_info): Likewise.
20114         (__ptr_to_member_type_info): Likewise.
20115         (__fundamental_type_info::~__fundamental_type_info): Define.
20116         (__pointer_type_info::~__pointer_type_info): Likewise.
20117         (__reference_type_info::~__reference_type_info): Likewise.
20118         (__array_type_info::~__array_type_info): Likewise.
20119         (__function_type_info::~__function_type_info): Likewise.
20120         (__enum_type_info::~__enum_type_info): Likewise.
20121         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
20122         (__pointer_type_info::do_catch): Define new function.
20123         (__ptr_to_member_type_info::do_catch): Define new function.
20125         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
20126         (__is_pointer): Likewise.
20128         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
20130 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
20132         * cp/class.c (build_vtable): Rename to build_primary_vtable.
20133         (prepare_fresh_vtable): Rename to build_secondary_vtable.
20134         (make_new_vtable): New function.
20135         (modify_vtable_entry): Handle generation of new vtables correctly.
20136         (modify_one_vtable): Remove unused parameter.
20137         (dfs_fixup_vtable_deltas): Likewise.
20138         (override_one_vtable): Use build_secondary_vtable.
20139         (finish_struct_1): Use build_primary_vtable and
20140         build_secondary_vtable.
20142 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
20144         * cp/decl.c: Adjust variable names, comments, help strings.
20146 2000-01-29  Nathan Sidwell  <nathan@acm.org>
20148         * new2.cc (operator delete[]): Use operator delete, don't assume
20149         implementation.
20151 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
20153         * class.c (build_vtbl_initializer): Add argument to
20154         build_vtable_entry call.
20156 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
20158         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
20159         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
20160         (BF_DELTA): New macro.
20161         (BF_VCALL_INDEX): Likewise.
20162         (BF_FN): Likewise.
20163         (THUNK_VCALL_OFFSET): Likewise.
20164         (make_thunk): Change prototype.
20165         * class.c (build_vtable_entry): Integrate
20166         build_vtable_entry_for_fn.  Handle vcall indices.
20167         (build_vtable_entry_for_fn): Remove.
20168         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
20169         BF_VCALL_INDEX, BF_FN.
20170         (modify_vtable_entry): Integrate common code from
20171         modify_one_vtable and dfs_fixup_vtable_deltas.
20172         (add_virtual_function): Set BF_VCALL_INDEX.
20173         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
20174         and BF_FN.
20175         (modify_one_vtable): Simplify.
20176         (dfs_fixup_vtable_deltas): Likewise.
20177         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
20178         * method.c (make_thunk): Handle vcall indices.
20180 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
20182         Compiler side new abi rtti (not enabled).
20183         * cp-tree.h (new_abi_rtti_p): New macro.
20184         (emit_support_tinfos): Prototype new function.
20185         (tinfo_decl_p): Likewise.
20186         (emit_tinfo_decl): Likwise.
20187         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
20188         macros.
20189         (doing_runtime): New local static.
20190         (init_rtti_processing): Add new-abi initializer.
20191         (get_tinfo_decl): Add new-abi logic.
20192         (tinfo_from_decl): Likewise.
20193         (build_dynamic_cast_1): Likewise.
20194         (qualifier_flags): New static function.
20195         (tinfo_base_init): Likewise.
20196         (generic_initializer): Likewise.
20197         (ptr_ref_initializer): Likewise.
20198         (ptmd_initializer): Likewise.
20199         (class_hint_flags): Likewise.
20200         (class_initializer): Likewise.
20201         (synthesize_tinfo_var): Likewise.
20202         (create_real_tinfo_var): Likewise.
20203         (create_pseudo_type_info): Likewise.
20204         (get_vmi_pseudo_type_info): Likewise.
20205         (create_tinfo_types): Likewise.
20206         (emit_support_tinfos): New global function.
20207         (tinfo_decl_p): New global predicate.
20208         (emit_tinfo_decl): New global function.
20209         * class.c (set_rtti_entry): Generalize for old and new rtti.
20210         (build_vtbl_initializer): Likewise.
20211         * decl2.c (finish_file): Likewise.
20213 2000-01-27  Jim Wilson  <wilson@cygnus.com>
20215         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
20216         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
20218 2000-01-27  Mike Stump  <mrs@wrs.com>
20220         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
20221         for scopes.
20223 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
20225         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
20227 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
20229         * optimize.c (calls_setjmp_r): Supply new argument
20230         to special_function_p.
20232 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20234         * call.c: PROTO -> PARAMS.
20235         * class.c: Likewise.
20236         * cp-tree.h: Likewise.
20237         * cvt.c: Likewise.
20238         * decl.c: Likewise.
20239         * decl.h: Likewise.
20240         * decl2.c: Likewise.
20241         * dump.c: Likewise.
20242         * errfn.c: Likewise.
20243         * error.c: Likewise.
20244         * except.c: Likewise.
20245         * expr.c: Likewise.
20246         * init.c: Likewise.
20247         * input.c: Likewise.
20248         * lex.c: Likewise.
20249         * lex.h: Likewise.
20250         * method.c: Likewise.
20251         * optimize.c: Likewise.
20252         * parse.y: Likewise.
20253         * pt.c: Likewise.
20254         * repo.c: Likewise.
20255         * rtti.c: Likewise.
20256         * search.c: Likewise.
20257         * semantics.c: Likewise.
20258         * spew.c: Likewise.
20259         * tree.c: Likewise.
20260         * typeck.c: Likewise.
20261         * typeck2.c: Likewise.
20262         * xref.c: Likewise.
20264 2000-01-25  Richard Henderson  <rth@cygnus.com>
20266         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
20268 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
20270         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
20271         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
20272         (struct vcall_offset_data_s): New type.
20273         (dfs_vcall_offset_queue_p): New function.
20274         (dfs_build_vcall_offset_vtbl_entries): Likewise.
20275         (build_vcall_offset_vtbl_entries): Likewise.
20276         (layout_vtable_decl): Likewise.
20277         (num_vfun_entries): Likewise.
20278         (num_extra_vtbl_entries): Add the entries for vcall offsets.
20279         (build_vtbl_initializer): Likewise.
20280         (dfs_finish_vtabls): Use layout_vtable_decl.
20281         (modify_one_vtables): Always duplicate vtables under the new ABI.
20282         (finish_struct_1): Use layout_vtable_decl.
20284 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20286         * decl.c (member_function_or_else): Change third arg from a format
20287         specifier to an `enum overload_flags'.  Callers changed.
20289 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
20291         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
20292         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
20293         build_const_cast, get_delta_difference, check_return_expr): Avoid
20294         ANSI string concatenation usage.
20296 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
20298         * class.c (layout_class_type): Put the fields required to make a
20299         class non-empty at the end, not the beginning, of the TYPE_FIELDs
20300         list.
20302 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
20304         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
20305         template.
20307         * decl2.c (mark_used): Do instantiate inlines that have been
20308         explicitly instantiated.
20310 2000-01-24  Richard Henderson  <rth@cygnus.com>
20312         * call.c (build_over_call): Use expand_tree_builtin.
20313         * typeck.c (build_function_call_real): Likewise.
20314         (build_binary_op_nodefault): Handle unordered compares.
20316 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20318         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
20319         cp_tree_index values.
20320         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
20321         New global node #defines for them.
20322         * rtti.c (call_void_fn): Replace with ...
20323         (build_runtime_decl): ... new static function.
20324         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
20325         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
20326         (build_dynamic_cast_1): Always produce correctly typed result.
20327         Explicitly produce type_info addresses. Use dynamic_cast_node.
20328         * exception.cc (__throw_bad_cast): Return `void *'.
20329         (__throw_bad_typeid): Return `const type_info &'.
20331 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20333         * cp-tree.h (get_vtable_decl): Prototype new function.
20334         * class.c (get_vtable_decl): New function. Broken out from ...
20335         (build_vtable): ... here. Use it.
20336         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
20337         by get_vtable_decl.
20339 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
20341         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
20342         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
20343         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
20344         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
20345         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
20346         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
20347         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
20348         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
20349         (CPTI_TINFO_VAR_ID): New enumeration.
20350         (__tp_desc_type_node, __access_mode_type_node,
20351         __bltn_desc_type_node, __user_desc_type_node,
20352         __class_desc_type_node, __ptr_desc_type_node,
20353         __attr_desc_type_node, __func_desc_type_node,
20354         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
20355         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
20356         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
20357         enum_desc_type_node, class_desc_type_node,
20358         si_class_desc_type_node, vmi_class_desc_type_node,
20359         ptmd_desc_type_node, base_desc_type_node): New #defines.
20360         (tinfo_fn_id, tinfo_fn_type): Rename to ...
20361         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
20362         (tinfo_var_id): New enumeration.
20363         (DECL_TINFO_FN_P): Augment comment.
20364         * decl.c (cp_global_trees): Adjust documentation.
20365         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
20366         tinfo_decl_type and tinfo_var_id.
20367         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
20368         (build_typeid): Remove unused variable.
20369         (get_tinfo_var): Use tinfo_var_id.
20370         (tinfo_name): New static function.
20371         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
20372         (tinfo_from_decl): Likewise.
20373         (get_base_offset): New static function, broken out of
20374         expand_class_desc.
20375         (expand_si_desc): Use tinfo_name.
20376         (expand_class_desc): Likewise. Lose local static variable.
20377         Use base_desc_type_node. Use get_base_offset.
20378         (expand_ptr_desc): Use tinfo_name.
20379         (expand_attr_desc): Likewise.
20380         (expand_generic_desc): Likewise.
20382         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
20383         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
20385 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
20387         * cp-tree.h (__eprintf): Remove declaration.
20388         * tree.c (__eprintf): Remove definition.
20390 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
20391             Mark Mitchell  <mark@codesourcery.com>
20393         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
20394         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
20396 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
20398         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
20400 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
20402         * cp-tree.h (register_dtor_fn): New function.
20403         * decl.c (destroy_local_static): Rename to ...
20404         (register_dtor_fn): ... this.  Give it external linkage.
20405         (expand_static_init): Use it.
20406         * decl2.c (do_static_initialization): Likewise, if using
20407         __cxa_atexit.
20408         (do_static_destruction): Check that __cxa_atexit is not in use.
20409         (finish_file): Don't call do_static_destruction if using
20410         __cxa_atexit.
20412         * typeck.c (convert_arguments): Restore two-message error
20413         reporting.
20415 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
20417         Remap dynamic cast hint values to be consistent across ABIs.
20418         * search.c (dynamic_cast_base_recurse): Remap generated value.
20419         (get_dynamic_cast_base_type): Adjust documentation.
20420         * tinfo.h (__user_type_info::dyncast): Likewise.
20421         (__user_type_info::find_public_subobj): Remap BOFF meaning.
20422         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
20423         (__class_type_info::do_dyncast): Likewise.
20424         (__class_type_info::do_find_public_subobj): Likewise.
20425         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
20427 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
20429         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
20431         * typeck2.c (incomplete_type_error): Restore previous
20432         cp_error and cp_error_at call sequence.
20434 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
20436         * class.c (dump_class_hierarchy): Make format agree with argument;
20437         cast pointer to unsigned long and print with %lx.
20439 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
20441         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
20443         * typeck.c (composite_pointer_type, common_type,
20444         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
20445         build_function_call_real, convert_arguments,
20446         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
20447         build_unary_op, mark_addressable, build_compound_expr,
20448         build_static_cast, build_reinterpret_cast, build_const_cast,
20449         build_c_cast, build_modify_expr, get_delta_difference,
20450         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
20451         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
20452         into a single one.
20453         * typeck2.c (readonly_error, abstract_virtuals_error,
20454         process_init_constructor, check_for_new_type): Likewise.
20456 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
20458         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
20459         VAR_DECLs.
20461 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
20463         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
20464         (build_x_typeid): Likewise.
20465         (get_tinfo_fn): Likewise.
20466         (get_tinfo_fn_unused): Rename to ...
20467         (get_tinfo_decl): ... here.
20468         * rtti.c (build_headof): Replace logic error with assertion.
20469         (get_tinfo_fn_dynamic): Rename to ...
20470         (get_tinfo_decl_dynamic): ... here. Make static. Use
20471         complete_type_or_else.
20472         (build_x_typeid): Move into ...
20473         (build_typeid): ... here. Adjust call to
20474         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
20475         throw_bad_typeid expression.
20476         (get_tinfo_fn_unused): Rename to ...
20477         (get_tinfo_decl): ... here. Adjust comment.
20478         (get_tinfo_fn): Delete.
20479         (tinfo_from_decl): New static function.
20480         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
20481         (get_typeid): Use complete_type_or_else.
20482         (build_dynamic_cast_1): Adjust calls to
20483         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
20484         * parse.y (primary): Adjust call to build_typeid.
20485         * except.c (build_eh_type_type_ref): Adjust call to
20486         get_tinfo_decl. Mark as used.
20487         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
20488         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
20489         * parse.c: Regenerated.
20491 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
20493         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
20494         calling convention.
20495         (resolves_to_fixed_type_p): Document calling convention.
20496         * rtti.c (build_x_typeid): Initialize NONNULL.
20498         * cp-tree.h (build_shared_int_cst): New function.
20499         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
20500         * class.c (modify_vtable_entry): Likewise.
20501         (add_virtual_function): Split out code to generated shared
20502         INTEGER_CSTs to build_share_int_cst.
20503         (modify_all_vtables): Handle all the overridden functions here.
20504         Add overridden functions from non-primary virtual bases to the
20505         primary vtable.
20506         (finish_struct_1): Adjust call to modify_all_vtables.  Add
20507         overridden functions from non-primary bases to the vtable.
20508         * tree.c (build_shared_int_cst): New function.
20510         * cp-tree.h (scratchalloc): Remove.
20511         (build_scratch_list): Likewise.
20512         * call.c (convert_class_to_reference): Replace build_scratch_list
20513         and build_expr_list with build_tree_list.
20514         (add_candidate): Replace scratchalloc with expralloc.  Note memory
20515         leak.
20516         (build_user_type_conversion_1):  Replace build_scratch_list
20517         and build_expr_list with build_tree_list.
20518         (build_new_op): Likewise.
20519         (build_op_delete_call): Likewise.
20520         (convert_like): Likewise.
20521         * cvt.c (ocp_convert): Likewise.
20522         * decl.c (start_decl): Likewise.
20523         (start_function): Likewise.
20524         (finish_destructor_body): Likewise.
20525         (maybe_build_cleanup_1): Likewise.
20526         * decl2.c (reparse_decl_as_expr): Likewise.
20527         * init.c (perform_member_init): Likewise.
20528         (expand_cleanup_for_base): Likewise.
20529         (build_builtin_delete_call): Likewise.
20530         (build_new_1): Likewise.
20531         (build_delete): Likewise.
20532         * method.c (do_build_assign_ref): Likewise.
20533         * parse.y (already_scoped_stmt): Likewise.
20534         (nontrivial_exprlist): Likewise.
20535         (net_initializer): Likewise.
20536         (initlist): Likewise.
20537         * parse.c: Regenerated.
20538         * rtti.c (build_x_typeid): Likewise.
20539         (build_dynamic_cast_1): Likewise.
20540         * typeck.c (build_x_compound_expr): Likewise.
20541         (build_static_cast): Likewise.
20542         (build_modify_expr): Likewise.
20544         * cp-tree.h (DECL_VINDEX): Add documentation.
20545         * class.c (build_vtable_entry): Likewise.
20546         (start_vtable): Add comment.
20547         (add_virtual_function): Replace pending_hard_virtuals with
20548         overridden_virtuals and pending_virtuals with new_virtuals.
20549         Replace redundant assignments with assertions.
20550         (check_for_override): Add comment.
20551         (check_bases_and_members): Replace pending_hard_virtuals with
20552         overridden_virtuals and pending_virtuals with new_virtuals.
20553         (create_vtbl_ptr): Likewise.
20554         (layout_class_type): Likewise.
20555         (finish_struct_1): Likewise.  Add comments.
20557 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
20559         * class.c (finish_struct_1): Replace redundant code with
20560         assertions.
20562         * cp-tree.h (flag_new_abi): Move.
20563         (flag_use_cxa_atexit): Likewise.
20564         (flag_honor_std): Likewise.
20565         (flag_rtti): Likewise.
20566         (vbase_offsets_in_vtable_p): Define.
20567         (vptrs_present_everywhere_p): Likewise.
20568         (TYPE_CONTAINS_VPTR_P): Likewise.
20569         (dfs_walk_real): Declare.
20570         * class.c (build_vbase_pointer_fields): Check
20571         vbase_offsets_in_vtable_p.
20572         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
20573         BINFO_VPTR_FIELD.
20574         (build_vbase_offset_vtbl_entries): Simplify.
20575         (build_vbase_offset_vtbl_entries): Adjust.
20576         (build_vbase_pointer): Add ability to look up vbase offsets in
20577         vtable.
20578         (start_vtable): New function.
20579         (add_virtual_function): Use it.
20580         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
20581         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
20582         (build_vtbl_initializer): Take the type of the complete object as
20583         input.  Use it to correctly calculate vbase offsets.
20584         (dfs_finish_vtbls): Pass the complete type to
20585         build_vtbl_initializer.
20586         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
20587         (create_vtable_ptr): Create a vtable even if there are no
20588         new virtual functions, under the new ABI.
20589         (finish_struct_1): Likewise.
20590         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
20591         * decl.c (exapnd_static_init): Remove call to
20592         preserve_initializer.
20593         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
20594         vtables.
20595         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
20596         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
20597         (construct_virtual_bases): Don't initialize virtual base pointers
20598         under the new ABI.
20599         (build_aggr_init): Clean up comment.
20600         (expand_aggr_init_1): Likewise.
20601         * rtti.c (expand_class_desc): Store the virtual function table
20602         index where the vbase offset lives in the offset field.
20603         * search.c (dfs_walk_real): Make it global.
20604         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
20605         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
20607         * tinfo.h (USItype): Make it signed under the new ABI.
20608         * tinfo.cc (convert_to_base): New function.  Encapsulate base
20609         conversion logic here.
20610         (__class_type_info::do_upcast): Use it.
20611         (__class_type_info::do_dyncast): Likewise.
20612         (__class_type_info::do_find_public_subobj): Likewise.
20614         * init.c (construct_virtual_bases): Don't look up the addresses of
20615         virtual bases at run-time.
20617         * class.c (build_vbase_pointer): Relocate.
20618         (build_vbase_pointer_fields): Likewise.
20619         (dfs_build_vbase_offset_vtbl_entries): Likewise.
20620         (build_vbase_offset_vtbl_entries): Likewise.
20622         * decl.c (init_decl_processing): Complain if -fnew-abi
20623         -fno-vtable-thunks is used.
20625         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
20626         flag_new_abi.
20628 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
20630         * cp-tree.h (num_extra_vtbl_entries): New function.
20631         (size_extra_vtbl_entries): Likewise.
20632         (dfs_vtable_path_unmark): Likewise.
20633         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
20634         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
20635         * class.c (num_extra_vtbl_entries): New function.
20636         (size_extra_vtbl_entries): Likewise.
20637         (dfs_build_vbase_offset_vtbl_entries): New function.
20638         (build_vbase_offset_vtbl_entries): Likewise.
20639         (build_vtbl_initializer): Use it.
20640         (finish_struct_1): Adjust vtable sizes (using
20641         num_extra_vtbl_entries).
20642         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
20643         THUNK_DECL is non-NULL before expanding it.
20644         * init.c (expand_virtual_init): Adjust the vtable pointer by
20645         size_extra_vtbl_entries before storing it.
20646         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
20647         Handle TREE_LIST parameters here, not in the dfs_* functions.
20648         (dfs_unmarked_real_bases_queue_p): Adjust.
20649         (dfs_marked_real_bases_queue_p): Likewise.
20650         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
20651         (dfs_vtable_path_marked_real_bases_queue_p): New function.
20652         (dfs_vtable_path_unmark): Likewise.
20654 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
20656         * optimize.c (copy_body_r): Clear the operand three of a
20657         TARGET_EXPR when copying it.
20659 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20661         * method.c (build_decl_overload_real): Check whether we are in ::
20662         before returning __builtin_new/delete.
20664 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
20666         * pt.c (tsubst_friend_function): Improve comment.
20667         (instantiate_decl): Avoid crashing when a "nested" function is
20668         instantiated from the top level.
20670         * dump.c (dqeueue_and_dump): Dump
20671         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
20673 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20675         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
20677 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
20679         * g++spec.c (lang_specific_driver): Add -fnew-abi if
20680         ENABLE_NEW_GXX_ABI defined.
20681         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
20682         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
20683         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
20685 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
20687         * decl.c (start_cleanup_fn): Call pushdecl.
20689         * call.c (convert_class_to_reference): Fix typos.
20690         (build_conditional_expr): Handle errors gracefully.
20691         * class.c (push_nested_class): Likewise.
20692         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
20693         (DECL_THIS_EXTERN): Use it.
20694         (DECL_THIS_STATIC): Likewise.
20695         * cvt.c (convert_to_void): Handle errors gracefully.
20696         (build_expr_type_conversion): Likewise.
20697         * decl.c (maybe_push_decl): Likewise.
20698         (start_decl_1): Likewise.
20699         (require_complete_types_for_parms): Likewise.
20700         * parse.y (structsp): Likewise.
20701         (base_class): Likewise.
20702         * parse.c: Regenerated.
20703         * pt.c (finish_member_template_decl): Likewise.
20704         * typeck.c (decay_conversion): Likewise.
20706         * cp-tree.h (dfs_skip_vbases): New function.
20707         (find_vbase_instance): Likewise.
20708         * class.c (determine_primary_base): Allow a nearly empty base to
20709         serve as a primary base class under the new ABI.
20710         (get_class_offset_1): Rename to ...
20711         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
20712         messages here.
20713         (get_class_offset): Use it.  Issue error messages here.
20714         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
20715         find the right copies of virtual bases.
20716         (fixup_vtable_deltas1): Rename to ...
20717         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
20718         bases as primary bases.
20719         (fixup_vtable_deltas): Remove.
20720         (override_one_vtable): Handle virtual bases as primary bases.
20721         (merge_overrides): Likewise.
20722         (finish_struct_1): Likewise.
20723         (dump_class_hierarchy): Dump primary-ness of bases as well.
20724         * search.c (mark_primary_bases): Use a pre-order traversal to
20725         handle primary virtual bases.
20726         (dfs_skip_vbases): New fiunction.
20727         (expand_upcast_fixups): Adjust to handle primary virtual bases.
20728         (fixup_virtual_upcast_offsets): Likewise.
20729         (fixup_all_virtual_upcast_offsets): Likewise.
20730         (dfs_find_vbase_instances): New function.
20731         (find_vbase_instance): Likewise.
20733 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
20735         * lex.c (DIR_SEPARATOR): Delete macro.
20737 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
20739        * decl2.c (lang_decode_option): Handle automatic line wrapping
20740        option.
20742 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
20744         * friend.c (do_friend): Don't resolve scopes when processing
20745         template declarations, even if the qualifying scope doesn't
20746         involve template parameters.
20748 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
20750         * class.c (dfs_modify_vtables_queue_p): Remove.
20751         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
20752         and dfs_marked_real_bases_queue_p instead of
20753         dfs_modify_vtables_queue_p.
20755         * class.c (build_vbase_path): Simplify.
20756         (dfs_propagate_binfo_offsets): New function.
20757         (propagate_binfo_offsets): Use it.
20758         (remove_base_field): Simplify.
20759         (dfs_set_offset_for_vbases): Remove.
20760         (dfs_set_offset_for_shared_vbases): New function.
20761         (dfs_set_offset_for_unshared_vbases): Likewise.
20762         (layout_virtual_bases): Use them.
20763         (layout_basetypes): Don't call propagate_binfo_offsets.
20764         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
20765         for the vbases.
20767         * class.c (build_base_field): New function, split out from ...
20768         (build_base_fields): ... here.  Use it.  Allocate primary bases
20769         first, under the new ABI.
20770         (get_vtable_entry): Remove.
20771         (remove_base_field): New function, split out from ...
20772         (remove_base_fields): ... here.  Adjust since primary bases come
20773         first under the new ABI.
20775         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
20776         (initialize_vtbl_ptrs): New function.
20777         (expand_indirect_vtbls_init): Change prototype.
20778         (convert_pointer_to_vbase): Declare.
20779         * init.c (expand_direct_vtbls_init): Remove.
20780         (dfs_initialize_vtbl_ptrs): New function.
20781         (initialize_vtbl_ptrs): Likewise.
20782         (emit_base_init): Use initialize_vtbl_ptrs.
20783         * search.c (convert_pointer_to_vbase): Make it global.
20784         (expand_indirect_vtbls_init): Remove vtable initialization code.
20785         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
20787         * class.c (dfs_finish_vtbls): New function.
20788         (finish_vtbls): Use it.
20789         (dump_class_hierarchy): New function.
20791         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
20792         (BINFO_VBASE_PRIMARY_P): New macro.
20793         (BINFO_VIRTUALS): Add to documentation.
20794         (SET_BINFO_PRIMARY_MARKED_P): Remove.
20795         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20796         (dfs_mark_primary_bases_queue_p): Likewise.
20797         (dfs_unmarked_real_bases_queue_p): New function.
20798         (dfs_marked_real_bases_queue_p): Likewise.
20799         * search.c (dfs_mark_primary_bases): Adjust.
20800         (mark_primary_bases): Likewise.
20801         (get_shared_vbase_if_not_primary): New function.
20802         (dfs_unmarked_real_bases_queue_p): Likewise.
20803         (dfs_marked_real_bases_queue_p): Likewise.
20804         (dfs_get_pure_virtuals): Simplify.
20805         (get_pure_virtuals): Likewise.
20807 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20809         * lex.c: Include tm_p.h.
20811 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
20813         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
20815 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
20817         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
20818         * pt.c (instantiate_decl): Defer comdat templates that might not be
20819         needed.
20821         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
20822         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
20823         (finish_file): Likewise.
20825         * decl2.c (import_export_class): Undo 12/14 change.
20827         * error.c (dump_decl): operator new, not operatornew.
20829         * class.c (field_decl_cmp): A nontype is "greater" than a type.
20830         * search.c (lookup_field_1): Look for the last field with the
20831         desired name.
20833 2000-01-05  Nathan Sidwell  <nathan@acm.org>
20835         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
20836         FUNCTION_DECL.
20838 2000-01-05  Nathan Sidwell  <nathan@acm.org>
20840         * typeck.c (build_static_cast): Don't strip target qualifiers
20841         when casting from a class.
20843 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
20845         * class.c (warn_hidden): Initialize variable `fndecl'.
20847 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
20849         * decl.c (flag_isoc9x): New variable to be able to use code in
20850         c-common.c.  For now always zero.
20852 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
20854         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
20855         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
20856         or unshare_base_binfos for virtual bases here.
20857         * search.c (dfs_get_vbase_types): Do it here.
20858         (get_vbase_types): Adjust.
20860 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
20862         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
20863         (BINFO_PRIMARY_MARKED_P): Use flag 5.
20864         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20865         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20866         (unmark_primary_bases): Remove declaration.
20867         (unmarkedp): Declare.
20868         (dfs_vbase_unmark): Likewise.
20869         * class.c (determine_primary_base): Return immediately if there
20870         are no base classes.  Call mark_primary_bases here.
20871         (modify_all_direct_vtables): Remove.
20872         (modify_all_indirect_vtables): Remove.
20873         (dfs_modify_vtables_queue_p): New function.
20874         (dfs_modify_vtables): New function.
20875         (modify_all_vtables): Use them.
20876         (build_base_fields): Build FIELD_DECLs for primary virtual base
20877         classes.
20878         (create_vtable_ptr): Don't call determine_primary_base here.
20879         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
20880         (dfs_set_offset_for_vbases): ... this.
20881         (layout_virtual_bases): Use it.
20882         (layout_class_type): Call determine_primary_base here.
20883         * search.c (unmarkedp): Make it global.
20884         (shared_marked_p): Simplify.
20885         (shared_unmarked_p): Likewise.
20886         (dfs_primary_bases_queue_p): Remove.
20887         (dfs_unmark_primary_bases): Likewise.
20888         (unmark_primary_bases): Likewise.
20889         (mark_primary_bases): Simplify.
20890         (get_pure_virtuals): Don't call mark_primary_bases here.
20891         (dfs_vbase_unmark): New function.
20892         (get_vbase_types): Simplify.
20894         * class.c (struct base_info): Remove.
20895         (determine_primary_base): Take has_virtual_p rather than a
20896         base_info as input.  Don't calculate max_has_virtual.
20897         (finish_struct_bits): Remove max_has_virtual argument.
20898         (create_vtable_ptr): Remove max_has_virtual_p argument.
20899         (layout_virtual_bases): Remove max argument.
20900         (layout_basetypes): Likewise.
20901         (layout_class_type): Remove max_has_virtual_p argument.
20902         (finish_struct_1): Remove max_has_virtual.
20904         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
20905         (layout_basetypes): Remove.
20906         * class.c (propagate_binfo_offsets): Moved here from tree.c.
20907         Update to handle primary virtual bases.
20908         (remove_base_fields): New function, split out from
20909         layout_basetypes.
20910         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
20911         (layout_virtual_bases): New function, split out from
20912         layout_basetypes.  Update to handle primary virtual bases.
20913         (layout_basetypes): Moved here from tree.c.  Use
20914         remove_base_fields and layout_virtual_bases.
20915         * search.c (dfs_mark_primary_bases_queue_p): New function.
20916         (mark_primary_bases): Use it.
20917         * tree.c (CEIL): Remove.
20918         (propagate_binfo_offsets): Remove.
20919         (layout_basetypes): Remove.
20921 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
20923         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
20924         (BINFO_PRIMARY_MARKED_P): New macro.
20925         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
20926         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
20927         (mark_primary_bases): New function.
20928         (unmark_primary_bases): Likewise.
20929         * search.c (get_abstract_virtuals_1): Remove.
20930         (dfs_mark_primary_bases): New function.
20931         (mark_primary_bases): Likewise.
20932         (dfs_unmark_primary_bases): Likewise.
20933         (unmark_primary_bases): Likewise.
20934         (dfs_get_pure_virtuals): Likewise.
20936 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
20938         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
20939         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
20940         (modify_one_vtable): Adjust.
20941         (fixup_vtable_deltas1): Likewise.
20942         (override_one_vtable): Likewise.
20943         * search.c (get_abstract_virtuals_1): Likewise.
20944         (get_pure_virtuals): Likewise.
20945         (expand_upcast_fixups): Likewise.
20946         * tree.c (debug_binfo): Likewise.
20948         * class.c (build_vtable): Don't return a value.  Don't rebuild
20949         vtables for bases that have already been handled.
20950         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
20951         already been handled.
20952         (modify_one_vtable): Adjust accordingly.
20953         (fixup_vtable_deltas1): Likewise.
20954         (finish_struct_1): Likewise.
20956 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
20958         * call.c (build_new_method_call): Also check destructors.