PR c++/11645
[official-gcc.git] / gcc / cp / ChangeLog
blob3314b35c1588209b6645bc823dd43e977dbc6c83
1 2003-07-23  Mark Mitchell  <mark@codesourcery.com>
3         PR c++/11645
4         * cp-tree.h (accessible_base_p): Declare.
5         * call.c (build_over_call): Use it.
6         * search.c (accessible_base_p): New function, split out from ...
7         (lookup_base): ... here.
9         PR c++/11517
10         * call.c (build_conditional_expr): Use perform_implicit_conversion
11         and error_operand_p.  Robustify.
12         * typeck.c (build_unary_op): Use perform_implicit_conversion.
14 2003-07-23  Nathan Sidwell  <nathan@codesourcery.com>
16         PR c++/10953
17         * parser.c (cp_parser_nested_name_specifier): Reset scope on
18         failure.
19         (cp_parser_elaborated_type_specifier): Likewise.
21 2003-07-22  Mark Mitchell  <mark@codesourcery.com>
23         Eliminate use of POINTER_TYPE for pointers-to-members.
24         * call.c (standard_conversion): Rework pointer-to-member handling.
25         Add comments.
26         (add_builtin_candidate): Likewise.
27         (resolve_scoped_fn_name): Remove.
28         (build_conditional_expr): Rework pointer-to-member handling.
29         (compare_ics): Likewise.
30         * class.c (check_field_decls): Use TYPE_PTR_P.
31         * cp-lang.c (cp_var_mod_type_p): Rework pointer-to-member
32         handling.
33         * cp-tree.h (SCALAR_TYPE_P): Use TYPE_PTR_TO_MEMBER_P.
34         (TYPE_PTRMEM_P): Add comment.
35         (TYPE_PTR_P): Simplify.
36         (TYPE_PTROB_P): Correct definition.
37         (TYPE_PTR_TO_MEMBER_P): New macro.
38         (TYPE_PTRMEM_CLASS_TYPE): Adjust.
39         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
40         (resolved_scoped_fn_name): Remove declaration.
41         (build_offset_ref): Change prototype.
42         (resolve_offset_ref): Remove.
43         (comp_target_types): Remove.
44         * cvt.c (cp_convert_to_pointer): Rework pointer-to-member
45         handling.
46         (convert_to_reference): Use can_convert.
47         (ocp_convert): Improve error handling.  Rework pointer-to-member
48         handling.
49         (perform_qualification_conversions): Rework pointer-to-member
50         handling.
51         * decl.c (build_ptrmem_type): Handle functions too.
52         (create_array_type_for_decl): Remove OFFSET_TYPE error message.
53         (grokdeclarator): Use OFFSET_TYPE for pointers to data members.
54         (grokparms): Remove OFFSET_TYPE error message.
55         * dump.c (cp_dump_tree): Rework pointer-to-member handling.
56         * error.c (dump_type_prefix): Likewise.
57         * expr.c (cplus_expand_constant): Use build_nop.
58         * init.c (build_offset_ref): Add address_p parameter.  Fold in
59         necessary bits from resolve_offset_ref.
60         (resolve_offset_ref): Remove.
61         * parser.c (cp_parser_postfix_expression): Remove special case
62         code for OFFSET_TYPE.
63         * pt.c (convert_nontype_argument): Rework pointer-to-member
64         handling.
65         (convert_template_argument): Likewise.
66         (unify): Likewise.
67         (invalid_nontype_parm_type_p): Likewise.
68         (dependent_type_p_r): Likewise.
69         * rtti.c (get_tinfo_decl): Remove OFFSET_TYPE special case.
70         (target_incomplete_p_): Rework pointer-to-member
71         handling.
72         (get_pseudo_ti_init): Likewise.
73         (get_pseudo_ti_desc): Likewise.
74         * semantics.c (finish_qualified_id_expr): Adjust call to
75         build_offset_ref.  Remove use of resolve_offset_ref.
76         * tree.c (pod_type_p): Use TYPE_PTR_TO_MEMBER_P.
77         * typeck.c (target_type): Use TYPE_PTRMEM_P.
78         (type_unknown_p): Remove obsolete code about the time before
79         non-dependent expressions were handled correctly.
80         (qualify_type_recursive): Remove.
81         (composite_pointer_type_r): New function.
82         (composite_pointer_type): Use it.
83         (merge_types): Remove dead comments.
84         (comp_cv_target_types): Remove.
85         (comp_target_types): Likewise.
86         (comp_target_parms): Likewise.
87         (cxx_sizeof_or_alignof_type): Remove OFFSET_TYPE error.
88         (build_indirect_ref): Use TYPE_PTR_TO_MEMBER_P.
89         (build_binary_op): Do not use of comp_target_types.
90         (pointer_diff): Remove OFFSET_TYPE case.
91         (build_unary_op): Adjust pointer-to-member handling.
92         (unary_complex_lvalue): Likewise.
93         (check_for_casting_away_constness): Add description parameter.
94         (build_static_cast): Pass it.
95         (build_reinterpret_cast): Use check_for_casting_away_constness.
96         (build_const_cast): Adjust pointer-to-member handling.
97         (build_c_cast): Likewise.
98         (convert_for_assignment): Remove OFFSET_TYPE error message.
99         (comp_ptr_ttypes_real): Adjust pointer-to-member handling.
100         (comp_ptr_ttypes_reinterpret): Remove.
101         (casts_away_constness_r): Adjust pointer-to-member handling.
102         (casts_away_constness): Liekwise.
103         (strip_all_pointer_quals): Remove.
104         * typeck2.c (digest_init): Adjust pointer-to-member handling.
105         (build_m_component_ref): Likewise.
106         
107 2003-07-22  Wolfgang Bangerth  <bangerth@dealii.org>
109         * lex.c (unqualified_fn_lookup_error): Mention that the error
110         message needs to be kept in synch with the manual.
112 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
114         PR c++/11614
115         * decl.c (grokdeclarator): An array member is only a flexible
116         array member if the field itself is the array.
118 2003-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
120         PR c++/10793
121         * decl.c (xref_basetypes): Handle error_mark_node.
123 2003-07-22  Nathan Sidwell  <nathan@codesourcery.com>
125         * cp-tree.h (enum cp_lvalue_kind): Add clk_packed.
126         * tree.c (lvalue_p_1): Set it.
127         * class.c (check_field): Don't allow non-packed non-POD fields to
128         be packed.
129         * call.c (reference_binding): Need a temporary for all bitfield
130         and packed fields.
131         (convert_like_real): Check it is ok to make a temporary here.
133 2003-07-21  Nathan Sidwell  <nathan@codesourcery.com>
135         * cp-tree.h (hack_identifier): Remove.
136         * method.c (hack_identifier): Remove.
137         * semantics.c (finish_id_expression): Expand hack_identifier
138         here. Simplify.
140 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
142         * call.c class.c decl.c decl2.c g++spec.c lex.c parser.c pt.c rtti.c
143         semantics.c typeck.c: Remove unnecessary casts.
145 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
147         * cp-tree.h (hack_identifier): Remove.
148         * method.c (hack_identifier): Remove.
149         * semantics.c (finish_id_expression): Expand hack_identifier
150         here. Simplify.
152 2003-07-18  Nathan Sidwell  <nathan@codesourcery.com>
154         * cp-tree.h (finish_non_static_data_member): Add object param.
155         * method.c (hack_identifier): Adjust.
156         * pt.c (tsubst_copy_and_build) <COMPONENT_REF case>: Don't search
157         again for a FIELD_DECL.
158         * semantics.c (finish_non_static_data_member): Add object
159         parameter. Always save the DECL in the COMPONENT_REF.
160         * call.c (resolve_scoped_fn_name): Adjust.
162 2003-07-17  Zack Weinberg  <zack@codesourcery.com>
164         * pt.c (get_bindings): Make definition consistent with
165         forward declaration.
167 2003-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
169         PR c++/7809
170         * friend.c (add_friend): Check access for member functions
171         and templates.
173 2003-07-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
175         PR c++/10668
176         * typeck.c (build_class_member_access_expr): Improve diagnostic.
178 2003-07-16  Mark Mitchell  <mark@codesourcery.com>
180         PR c++/11547
181         * cp-tree.h (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P): New
182         macro.
183         (DECL_PRETTY_FUNCTION_P): Use VAR_DECL_CHECK.
184         * decl.c (duplicate_decls): Merge
185         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
186         * parser.c (cp_parser_postfix_expression): Adjust call to
187         cp_parser_initializer_list and
188         cp_parser_parenthesized_expression_list.
189         (cp_parser_parenthesized_expression_list): Add non_constant_p.
190         (cp_parser_new_placement): Adjust call to
191         cp_parser_parenthesized_expression_list.
192         (cp_parser_direct_new_declarator): Likewise.
193         (cp_parser_conditional_expression): Remove.
194         (cp_parser_constant_expression): Parse an assignment-expression,
195         not a conditional-expression.
196         (cp_parser_simple_declaration): Resolve expression/declaration
197         ambiguity more quickly.
198         (cp_parser_mem_initializer): Adjust call to
199         cp_parser_parenthesized_expression_list.
200         (cp_parser_init_declarator): Keep track of whether or not the
201         initializer is a constant-expression.
202         (cp_parser_initializer): Add non_constant_p parameter.
203         (cp_parser_initializer_clause): Likewise.
204         (cp_parser_initializer_list): Likewise.
205         (cp_parser_attribute_list): Adjust call to
206         cp_parser_parenthesized_expression_list.
207         (cp_parser_functional_cast): Likewise.
208         * pt.c (tsubst_decl): Copy
209         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
210         (tsubst_expr): Tweak use of DECL_PRETTY_FUNCTION_P.
211         * semantics.c (finish_id_expression): Use
212         DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
214 2003-07-16  Neil Booth  <neil@daikokuya.co.uk>
216         * lang-options.h: Remove.
218 2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
220         PR c/10962
221         * class.c (field_decl_cmp): Remove.
222         (resort_field_decl_cmp): Remove.
223         (resort_sorted_fields): Remove.
224         (add_fields_to_vec): Rename to ...
225         (add_fields_to_record_type): this.
226         (finish_struct_1): Change to be using
227         sorted_fields_type's fields.
228         * cp-tree.h (lang_decl): In lang_decl_u3
229         change sorted_fields to be a pointer to
230         sorted_fields_type.
231         (resort_sorted_fields): Remove prototype.
232         * search.c (lookup_field_1): Change to be using
233         sorted_fields_type's fields.
235 2003-07-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
237         PR c++/5421
238         * decl.c (grokdeclarator): Handle TEMPLATE_ID_EXPR if friend
239         is a member of other class.
240         * friend.c (do_friend): Don't build TEMPLATE_DECL if friend
241         is a specialization of function template.
243 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
245         PR c++/10903
246         * pt.c (convert_nontype_argument): Fix thinko in diagnostic.
247         Improve.
249 2003-07-15  Mark Mitchell  <mark@codesourcery.com>
251         * cp-tree.def (LOOKUP_EXPR): Remove.
252         * cp-tree.h (cp_id_kind): Add CP_ID_KIND_UNQUALIFIED_DEPENDENT.
253         (LOOKUP_EXPR_GLOBAL): Remove.
254         (get_bindings): Remove.
255         (is_aggr_type_2): Remove.
256         * call.c (resolved_scoped_fn_name): Remove support for
257         LOOKUP_EXPR.
258         * decl.c (grokfndecl): Likewise.
259         (grokdeclarator): Likewise.
260         * error.c (dump_decl): Likewise.
261         (dump_expr): Likewise.
262         * friend.c (do_friend): Likewise.
263         * init.c (build_offset_ref): Likewise.
264         * lex.c (unqualified_fn_lookup_error): Use pedwarn.  Do not create
265         LOOKUP_EXPRs
266         * mangle.c (write_expression): Remove support for LOOKUP_EXPR.
267         * parser.c (cp_parser_postfix_expression): Modify Koenig lookup
268         test.
269         * pt.c (get_bindings): Give it internal linkage.
270         (check_explicit_specialization): Remove support for LOOKUP_EXPR.
271         (lookup_template_function): Likewise.
272         (for_each_tempalte_parm_r): Likewise.
273         (tsubst_decl): Likewise.
274         (tsubst_qualified_id): Handle template template parameters.
275         (tsubst_copy): Remove support for LOOKUP_EXPR.
276         (tsubst_copy_and_build): Likewise.
277         (most_general_template): Likewise.
278         (value_dependent_expression_p): Likewise.
279         (type_dependent_expression_p): Note that IDENTIFIER_NODEs are
280         always dependent.
281         * semantics.c (perform_koenig_lookup): Do not create
282         IDENTIFIER_NODEs.
283         (finish_fname): Likewise.
284         (finish_id_expression): Likewise.
285         * tree.c (is_aggr_type_2): Remove.
287 2003-07-16  Gabriel Dos Reis  <gdr@integrable-solutions.net>
289         PR c++/11531
290         * typeck.c (check_return_expr): Fix thinko in diagnostic.
292 2003-07-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
294         PR c++/10108
295         * pt.c (tsubst_decl) <TEMPLATE_DECL>: Add a check for
296         error_mark_node.
298 2003-07-14  Mark Mitchell  <mark@codesourcery.com>
300         PR c++/11509
301         * pt.c (dependent_scope_ref_p): New function.
302         (value_dependent_expression_p): Use it.
303         (type_dependent_expression_p): Likewise.
305         * pt.c (tsubst_friend_function): Use reregister_specialization.
307         PR c++/7019
308         * cp-tree.h (lookup_qualified_name): Adjust prototype.
309         * decl.c (lookup_qualified_name): Add complain parameter.  Adjust
310         call to is_aggr_type.
311         * parser.c (cp_parser_lookup_name): Adjust call to
312         lookup_qualified_name.
313         * pt.c (tsubst_qualified_id): Likewise.
314         (tsubst_copy_and_build): Likewise.
315         * semantics.c (finish_qualified_id_expr): Deal with erroneous
316         expressions.
318 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
320         PR c++/11510
321         * call.c (op_error): Properly format  REALPART_EXPR and
322         IMAGPART_EXPR.
323         * error.c (dump_expr): Likewise.
325 2003-07-14  Gabriel Dos Reis <gdr@integrable-solutions.net>
327         * error.c (dump_expr): Handle EMPTY_CLASS_EXPR.
329 2003-07-14  Gabriel Dos Reis  <gdr@integrable-solutions.net>
331         PR c++/5293
332         * call.c (initialize_reference): Improve diagnostic.
334 2003-07-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
336         PR c++/11154
337         * pt.c (more_specialized_class): Add full_args parameter.
338         (most_specialized_class): Adjust calls to more_specialized_class.
339         * cp-tree.h (more_specialized_class): Adjust declaration.
341 2003-07-14  Dan Nicolaescu  <dann@ics.uci.edu>
343         * lex.c (enum tree_node_kind): Delete.
345 2003-07-13  Mark Mitchell  <mark@codesourcery.com>
347         PR c++/11503
348         * cp-tree.h (DECL_SELF_REFERENCE_P): New macro.
349         (SET_DECL_SELF_REFERENCE_P): Likewise.
350         * class.c (build_self_reference): Use SET_DECL_SELF_REFERENCE_P.
351         * pt.c (tsubst_decl): Copy it.
352         * search.c (lookup_base): Use DECL_SELF_REFERENCE_P.
354         * pt.c (reregister_specialization): Fix thinko in previous change.
356         * cp-tree.h (cp_id_kind): New type.
357         (unqualified_name_lookup_error): Change prototype.
358         (unqualified_fn_lookup_error): New function.
359         (do_identifier): Remove.
360         (do_scoped_id): Likewise.
361         (tsubst_copy_and_build): Change prototype.
362         (reregister_specialization): New function.
363         (perform_koenig_lookup): Likewise.
364         (finish_id_expression): Likewise.
365         * call.c (build_method_call): Adjust call to
366         unqualified_name_lookup_error.
367         * decl.c (duplicate_decls): Use reregister_specialization.
368         * lex.c (is_global): Remove.
369         (unqualified_name_lookup_error): Return a value.
370         (do_identifier): Remove.
371         (do_scoped_id): Likewise.
372         (identifier_typedecl_value): Remove.
373         (unqualified_fn_lookup_error): New function.
374         * parser.c (cp_parser_id_kind): Remove.
375         (cp_parser_non_constant_id_expression): Remove.
376         (cp_parser_primary_expression): Use finish_id_expression.
377         (cp_parser_class_or_namespace_name): Use cp_id_kind, not
378         cp_parser_id_kind.
379         (cp_parser_postfix_expression): Use perform_koenig_lookup.
380         (cp_parser_template_argument): Use cp_id_kind.
381         (cp_parser_fold_non_dependent_expr): Adjust call to
382         tsubst_copy_and_build.
383         * pt.c (unregister_specialization): Rename to ...
384         (reregister_specialization): This.
385         (tsubst_friend_function): Use it.
386         (maybe_fold_nontype_arg): Adjust call to tsubst_copy_and_build.
387         (tsubst_qualified_id): Likewise.
388         (tsubst_expr): Likewise.
389         (tsubst_copy_and_build): Add function_p parameter.  Use
390         finish_id_expression.  Introduce RECUR macro.
391         (tsubst_non_call_postfix_expression): New function.
392         (regenerate_decl_from_template): Use reregister_specialization.
393         * semantics.c (perform_koenig_lookup): New function.
394         (finish_id_expression): Likewise.
396 2003-07-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
398         * pt.c (push_access_scope_real): Remove.
399         (push_access_scope): Move code from push_access_scope_real.
400         (pop_access_scope): Don't check for TEMPLATE_DECL.
401         (instantiate_template): Defer access checking during template
402         substitution.
403         (regenerate_decl_from_template): Tidy.
405 2003-07-11  Nathanael Nerode  <neroden@gcc.gnu.org>
407         PR c++/11437
408         * operators.def: Add definitions for __imag__, __real__.
410 2003-07-11  Nathan Sidwell  <nathan@codesourcery.com>
412         PR c++/11050
413         * parser.c (cp_parser_expression_list): Rename to ...
414         (cp_parser_parenthesized_expression_list): ... here. Add attribute
415         parameter, parse the surounding parentheses.
416         (cp_parser_skip_to_closing_parenthesis): Add recover and or_comma
417         parameters. Return int.
418         (cp_parser_skip_to_closing_parenthesis or comma): Remove.
419         (cp_parser_postfix_expression): Adjust function call parsing.
420         (cp_parser_new_placement): Adjust.
421         (cp_parser_new_initializer): Likewise.
422         (cp_parser_cast_expression): Likewise.
423         (cp_parser_selection_statement): Likewise.
424         (cp_parser_mem_initializer): Likewise.
425         (cp_parser_asm_definition): Likewise.
426         (cp_parser_init_declarator): Likewise.
427         (cp_parser_declarator): Make
428         cdtor_or_conv_p an int ptr.
429         (cp_parser_direct_declarator): Likewise. Check for a parameter
430         list on cdtors & conv functions.
431         (cp_parser_initializer): Adjust.
432         (cp_parser_member_declaration): Adjust.
433         (cp_parser_attribute_list): Move code into
434         cp_parser_parens_expression_list.
435         (cp_parser_functional_cast): Adjust.
436         * pt.c (type_dependent_expression_p): Erroneous expressions are
437         non-dependent.
439 2003-07-11  Geoffrey Keating  <geoffk@apple.com>
441         * decl.c (cp_finish_decl): Handle 'used' attribute.
443         * cp-lang.c (c_reset_state): New dummy routine.
444         * cp-tree.h (finish_file): Move prototype to c-common.h.
445         * parser.c (c_parse_file): Rename from yyparse; don't call finish_file.
447 2003-07-11  Mark Mitchell  <mark@codesourcery.com>
449         PR c++/8327
450         * pt.c (tsubst_qualified_id): Implement suggested resolution for
451         Core Issue 2.
452         (type_dependent_expression_p): Likewise.
454 2003-07-10  Mark Mitchell  <mark@codesourcery.com>
456         * typeck.c (build_binary_op): Do not warn about signed
457         vs. unsigned comparisons in the bodies of templates.
459         PR c++/9411
460         * parser.c (cp_parser_postfix_expression): Check dependency of
461         functions.
463 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
465         PR c++/10032
466         * decl.c (cxx_init_decl_processing): With -pedantic, pedwarns are
467         still errors.
469         PR c++/10527
470         * error.c (decl_to_string): Do not print default argument
471         expressions.
473         * cp-tree.h (break_out_calls): Remove declaration.
474         * tree.c (break_out_calls): Remove.
475         * typeck.c (build_modify_expr): Avoid invalid sharing of trees.
477 2003-07-09  Nathan Sidwell  <nathan@codesourcery.com>
479         PR c++ 9483
480         * class.c (check_field_decls): Pass DECL_NAME to constructor_name_p.
481         * decl2.c (constructor_name_p): Avoid repeated constructor_name
482         calls.
483         * decl.c (grokdeclarator): Refactor ctor/dtor detection.
485 2003-07-09  Mark Mitchell  <mark@codesourcery.com>
487         * typeck.c (build_x_unary_op): Take note of the fact that
488         PREINCREMENT_EXPR and POSTINCREMENT_EXPR are binary operations on
489         trees.
491         * parser.c (cp_parser_primary_expression): Preserve the form of
492         qualified expressions in templates, even if they are not
493         dependent.
494         * pt.c (convert_nontype_argument): Handle non-dependent SCOPE_REFs.
495         (tsubst_qualified_id): Likewise.
496         * search.c (accessible_p): Treat everything in the body of a
497         template as accessible.
499 2003-07-08  Mark Mitchell  <mark@codesourcery.com>
501         * cp-tree.def (NON_DEPENDENT_EXPR): New node.
502         * cp-tree.h (build_call_from_tree): Remove.
503         (build_member_call): Likewise.
504         (dependent_template_arg_p): Remove.
505         (any_dependent_template_arguments_p): New function.
506         (dependent_template_id_p): Likewise.
507         (any_type_dependent_arguments_p): Likewise.
508         (build_non_dependent_expr): Likewise.
509         (build_non_dependent_args): Likewise.
510         (build_x_compound_expr): Adjust prototype.
511         * call.c (build_new_method_call): Handle non-dependent expressions
512         correctly.
513         * decl2.c (grok_array_decl): Likewise.
514         (build_offset_ref_call_from_tree): Likewise.
515         (build_call_from_tree): Remove.
516         * error.c (dump_decl): Handle NON_DEPENDENT_EXPR.
517         (dump_expr): Likewise.
518         * init.c (build_member_call): Remove.
519         * mangle.c (write_expression): Update handling for template-ids.
520         * parser.c (cp_parser_primary_expression): Use
521         any_dependent_template_arguments_p.  Update constant-expression
522         handling.
523         (cp_parser_postfix_expression): Use
524         any_type_dependent_arguments_p.  Simplify call processing.
525         (cp_parser_unary_expression): Simplify.
526         (cp_parser_expression): Adjust for changes to
527         build_x_compound_expr.
528         (cp_parser_template_argument): Implement standard-conforming
529         parsing of non-type template arguments.
530         (cp_parser_direct_declarator): Use
531         cp_parser_fold_non_dependent_expr.
532         (cp_parser_fold_non_dependent_expr): New function.
533         (cp_parser_next_token_ends_template_argument_p): Likewise.
534         * pt.c (convert_template_argument): Do not call
535         maybe_fold_nontype_arg.
536         (tsubst_baselink): Likewise.
537         (tsubst_copy_and_build): Share common code.  Make sizeof/alignof
538         processing work correctly for non-dependent expressions.  Adjust
539         handling of COMPOUND_EXPR.  Simplify call processing.
540         (value_dependent_expression_p): Deal with functional casts and
541         sizeof/alignof correctly.
542         (type_dependent_expression_p): Handle overloaded functions.
543         (any_type_dependent_arguments_p): New function.
544         (any_dependent_template_arguments_p): Likewise.
545         (dependent_template_p): Treat SCOPE_REFs as dependent.
546         (dependent_template_id_p): Simplify.
547         (build_non_dependent_expr): New function.
548         (build_non_dependent_args): Likewise.
549         * semantics.c (finish_stmt_expr): Don't make dependent
550         statement-expresions have void type.
551         (finish_call_expr): Handle non-dependent expressions
552         correctly.
553         * tree.c (lvalue_p_1): Treat NON_DEPENDENT_EXPRs as lvalues.
554         * typeck.c (cxx_sizeof_or_alignof_type): Give the expression
555         type size_t, even in templates.
556         (expr_sizeof): Likewise.
557         (finish_class_member_access_expr): Handle non-dependent expressions
558         correctly.
559         (build_x_indirect_ref): Likewise.
560         (build_x_binary_op): Likewise.
561         (build_x_unary_op): Likewise.
562         (build_x_conditional_expr): Likewise.
563         (build_x_compound_expr): Likewise.
564         * typeck2.c (build_x_arrow): Likewise.
566 Wed Jul  9 02:28:39 CEST 2003  Jan Hubicka  <jh@suse.cz>
568         * cp-lang.c (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): New.
569         * decl.c (duplicate_decls): Use DECL_ESTIMATED_INSNS.
570         (start_function): Use DECL_ESTIMATED_INSNS.
571         * optimize.c (maybe_clone_body): Use DECL_ESTIMATED_INSNS.
573         * decl2.c (maybe_emit_vtables): Fix marking vtables as needed in
574         unit-at-a-time
576 2003-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
578         PR c++/11030
579         * pt.c (instantiate_class_template): Don't call xref_tag to
580         inject name when the friend class is a specialization.
582 2003-07-07  Mark Mitchell  <mark@codesourcery.com>
584         * cp-tree.h (build_scoped_method_call): Remove.
585         (lookup_qualified_name): Remove parameter.
586         (tsubst_copy_and_build): Declare.
587         (finish_qualified_object_call_expr): Remove.
588         (check_accessibility_of_qualified_id): New function.
589         (finish_qualified_id_expr): Likewise.
590         (non_reference): Likewise.
591         (build_expr_from-tree): Remove.
592         * call.c (non_reference): Remove.
593         (build_scoped_method_call): Likewise.
594         (build_method_call): Use error_operand_p.  Assert that we are not
595         processing a template.
596         (standard_conversion): Use non_reference.
597         * class.c (build_vtbl_entry_ref): Likewise.
598         (build_vtbl_ref_1): Likewise.
599         * cvt.c (build_expr_type_conversion): Use non_reference.
600         * decl.c (lookup_qualified_name): Remove flags parameter.
601         (grok_op_properties): Use non_reference.
602         * decl2.c (grok_array_decl): Likewise.
603         (build_expr_from_tree): Remove.
604         (build_offset_ref_call_from_tree): Update comment.
605         * error.c (parm_to_string): Call reinit_global_formatting_buffer.
606         * except.c (prepare_eh_types): Use non_reference.
607         (can_convert_eh): Likewise.
608         * init.c (build_dtor_call): Avoid using build_method_call.
609         * mangle.c (write_template_param): Remove misleading comment.
610         * method.c (locate_copy): Use non_reference.
611         * parser.c (cp_parser_scope_through_which_access_occurs): Remove.
612         (cp_parser_primary_expression): Do not create SCOPE_REFs is
613         non-dependent contexts.
614         (cp_parser_postfix_expression): Use finish_qualified_id_expr.
615         (cp_parser_direct_declarator): Use tsubst_copy_and_build, not
616         build_expr_from_tree.
617         (cp_parser_lookup_name): Adjust call to lookup_qualified_name.
618         Use check_accessibility_of_qualified_id.
619         * pt.c (maybe_fold_nontype_arg): Use tsubst_copy_and_build, not
620         build_expr_from_tree.
621         (tsubst_baselink): New function.
622         (tsubst_qualified_id): Likewise.
623         (tsubst_copy): Use them.  Remove support for METHOD_CALL_EXPR.
624         (tsubst_expr): Adjust call to lookup_qualified_name.
625         (tsubst_copy_and_build): Handle SCOPE_REFs specially.  Adjust
626         handling of CALL_EXPRs.
627         (value_dependent_expression_p): Use INTEGRAL_OR_ENUMERATION_TYPE_P.
628         * rtti.c (get_tinfo_decl_dynamic): Use non_reference.
629         * search.c (check_final_overrider): Likewise.
630         * semantics.c (check_accessibility_of_qualified_id): New function.
631         (finish_qualified_object_call_expr): Remove.
632         * typeck.c (target_type): Use non_reference.
633         (cxx_sizeof_or_alignof_type): Likewise.
634         (dubious_conversion_warnings): Likewise.
635         (convert_for_initialization): Likewise.
636         (non_reference): New function.
638 2003-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
640         * decl.c (print_binding_level, print_other_binding_stack,
641         print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
642         stdio calls.
643         * ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
645 2003-07-07  Andreas Jaeger  <aj@suse.de>
647         * friend.c: Convert to ISO C90 prototypes.
649         * Make-lang.in ($(srcdir)/cp/cfns.h): Use ANSI-C as output
650         language.
651         * cfns.h: Regenerate.
653         * typeck.c: Convert remaining prototypes to ISO C90.
654         * search.c: Likewise.
656         * decl2.c (build_expr_from_tree): Convert prototype to ISO C90.
657         * semantics.c (expand_or_defer_fn): Likewise
658         * mangle.c (discriminator_for_string_literal): Likewise.
659         * g++spec.c (lang_specific_driver): Likewise.
661         * search.c (lookup_base_r): Remove unused variable.
663 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
665         * semantics.c: (genrtl_try_block) Adjust emit_line_note
666         calls.
668 2003-07-07  Andreas Jaeger  <aj@suse.de>
670         * search.c (lookup_base_r): Remove unused variable.
672 2003-07-06  Michael Chastain  <mec@shout.net>
674         PR debug/10055
675         * lex.c (cxx_init): Call push_srcloc and pop_srcloc rather than
676         assigning to input_filename directly.
678 2003-07-06  Kazu Hirata  <kazu@cs.umass.edu>
680         * call.c: Fix comment formatting.
681         * class.c: Likewise.
682         * cp-tree.h: Likewise.
683         * decl.c: Likewise.
684         * decl2.c: Likewise.
685         * error.c: Likewise.
686         * method.c: Likewise.
687         * name-lookup.c: Likewise.
688         * parser.c: Likewise.
689         * pt.c: Likewise.
690         * rtti.c: Likewise.
691         * search.c: Likewise.
692         * typeck.c: Likewise.
694 2003-07-06  Mark Mitchell  <mark@codesourcery.com>
696         PR c++/11345
697         * search.c (lookup_base_r): Remove is_non_public and
698         within_current_scope parameters.  Remove other dead code.
699         (lookup_base): Adjust call to lookup_base_r.
700         (adjust_result_of_qualified_name_lookup): Improve comment.
701         * semantics.c (finish_call_expr): Use maybe_dummy_object.
703 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
705         * cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
706         LANG_HOOKS_MISSING_ARGUMENT): Override.
708 2003-07-05  Mark Mitchell  <mark@codesourcery.com>
710         PR c++/11431
711         * typeck.c (build_static_cast): Check for reference conversions
712         earlier.
714 2003-07-04  Mark Mitchell  <mark@codesourcery.com>
716         * cp-tree.h (perform_integral_promotions): Declare.
717         * call.c (build_addr_func): Use decay_conversion.
718         (convert_arg_to_ellipsis): Likewise.  Remove misleading comment.
719         (convert_for_arg_passing): Use perform_integral_promotions.
720         * cvt.c (build_expr_type_conversion): Use decay_conversion.
721         (type_promotes_to): Do not return a cv-qualified type.
722         * decl.c (grok_reference_init): Fix formatting.
723         (get_atexit_node): Use decay_conversion.
724         (build_enumerator): Use perform_integral_promotions.
725         * init.c (build_vec_init): Use decay_conversion.
726         * semantics.c (finish_expr_stmt): Likewise.
727         (finish_switch_cond): Use perform_integral_promotions.
728         * typeck.c (default_conversion): Likewise.
729         (perform_integral_promotions): New function.
730         (build_indirect_ref): Use decay_conversion.
731         (build_array_ref): Use perform_integral_promotions.
732         (convert_arguments): Use decay_conversion.
733         (build_unary_op): Use perform_integral_promotions.
734         (build_c_cast): Use decay_conversion.
735         (build_modify_expr): Likewise.
736         (convert_for_initialization): Likewise.
737         * typeck2.c (build_x_arrow): Likewise.
739 2003-07-04  Kazu Hirata  <kazu@cs.umass.edu>
741         * call.c: Fix comment typos.
742         * class.c: Likewise.
743         * cp-tree.h: Likewise.
744         * cvt.c: Likewise.
745         * decl2.c: Likewise.
746         * decl.c: Likewise.
747         * init.c: Likewise.
748         * mangle.c: Likewise.
749         * parser.c: Likewise.
750         * pt.c: Likewise.
751         * search.c: Likewise.
752         * semantics.c: Likewise.
753         * tree.c: Likewise.
754         * typeck.c: Likewise.
756 2003-07-04  Zack Weinberg  <zack@codesourcery.com>
758         * parser.c (cp_lexer_read_token): No need to handle string
759         constant concatenation.
761 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
763         * cp-tree.h (GCC_DIAG_STYLE, ATTRIBUTE_GCC_CXXDIAG): Define.
764         (cp_error_at, cp_warning_at, cp_pedwarn_at): Mark with
765         ATTRIBUTE_GCC_CXXDIAG.
767 2003-07-03  Mark Mitchell  <mark@codesourcery.com>
769         * call.c (build_addr_func): Handle bound pointers-to-members.
770         (build_method_call): Do not call resolve_offset_ref.
771         (implicit_conversion): Likewise.
772         (resolve_scoped_fn_name): Use finish_non_static_data_member, not
773         resolve_offset_ref.
774         (resolve_args): Do not call resolve_offset_ref.
775         (build_conditional_expr): Likewise.
776         (build_new_method_call): Likewise.
777         * cp-tree.def (OFFSET_REF): Update documentation.
778         * cvt.c (cp_convert_to_pointer): Update handling of conversions from
779         pointers to members to pointers.
780         (ocp_convert): Do not call resolve_offset_ref.
781         (convert_to_void): Likewise.
782         (build_expr_type_conversion): Likewise.
783         * decl2.c (delete_sanity): Likewise.
784         * init.c (resolve_offset_ref): Simplify greatly.
785         (build_vec_delete): Do not call resolve_offset_ref.
786         * parser.c (cp_parser_postfix_expression): Call resolve_offset_ref
787         if appropriate.
788         (cp_parser_unary_expression): Use
789         cp_parser_simple_cast_expression.
790         (cp_parser_delete_expression): Likewise.
791         (cp_parser_cast_expression): Likewise.
792         (cp_parser_pm_expression): Use cp_parser_binary_op.
793         (cp_parser_simple_cast_expression): New function.
794         * rtti.c (build_dynamic_cast_1): Do not call resolve_offset_ref.
795         * semantics.c (finish_increment_expr): Likewise.
796         (finish_typeof): Likewise.
797         * tree.c (lvalue_p_1): Do not handle OFFSET_REF.
798         * typeck.c (require_complete_type): Do not handle OFFSET_REFs.
799         (decay_conversion): Do not call resolve_offset_ref.
800         (finish_class_member_access_expr): Likewise.
801         (convert_arguments): Likewise.
802         (build_x_binary_op): Handle DOTSTAR_EXPR.
803         (condition_conversion): Do not call resolve_offset_ref.
804         (unary_complex_lvalue): Likewise.
805         (build_static_cast): Likewise.
806         (build_reinterpret_cast): Likewise.
807         (build_const_cast): Likewise.
808         (build_c_cast): Likewise.
809         (build_modify_expr): Likewise.
810         (convert_for_assignment): Likewise.
811         (convert_for_initialization): Likewise.
812         * typeck2.c (build_x_arrow): Likewise.
813         (build_m_component_ref): Simplify.
815         * call.c (build_scoped_method_call): Use convert_to_void.
816         (build_method_call): Likewise.
817         * class.c (check_field_decls): Remove dead code.
818         * cvt.c (convert_from_reference): Remove OFFSET_TYPE handling.
819         * decl2.c (grok_array_decl): Remove dead code.
820         (arg_assoc_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
821         as pointer-to-member representation.
822         * init.c (build_offset_ref): Tidy.
823         (build_vec_delete_1): Use convert_to_void.
824         * mangle.c (write_type): Avoid relying on POINTER_TYPE over OFFSET_TYPE
825         as pointer-to-member representation.
827 2003-07-03  Nathan Sidwell  <nathan@codesourcery.com>
829         PR c++/9162
830         * decl.c (grokdeclarator): Return friend decls, not
831         void_type_node.
832         * decl2.c (grokfield): Alter friend decl check.
833         * parser.c (struct cp_parser): Document default_arg chain on
834         unparsed_functions_queue.
835         (cp_parser_save_default_args): New.
836         (cp_parser_init_declarator, cp_parser_function_definition,
837         cp_parser_member_declaration): Call it.
838         (cp_parser_class_specifier): Remove unused variable. Alter
839         processing of unparsed_functions_queue.
841 2003-07-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
843         * class.c (add_method, check_field_decl): Fix format specifier.
844         * decl.c (duplicate_decls, pushdecl, check_goto,
845         fixup_anonymous_aggr, maybe_commonize_var, grokdeclarator,
846         start_enum): Likewise.
847         * decl2.c (ambiguous_decl): Likewise.
848         * pt.c (redeclare_class_template): Likewise.
850 2003-07-02  Nathan Sidwell  <nathan@codesourcery.com>
852         PR c++/10219
853         * pt.c (type_unification_real): Don't unify exprs of error type.
854         * tree.c (error_type): Don't die on error_type.
856         PR c++/9779
857         * decl2.c (arg_assoc_class): Don't die on NULL type.
858         * typeck.c (type_unknown_p): Don't die on untyped expressions.
860 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
862         PR c++/6949
863         * decl2.c (grokfield): Create TEMPLATE_DECLs for methods in local
864         classes.
866 2003-07-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
868         * error.c (locate_error): %P takes an `int', not a `tree'.
870 Wed Jul  2 00:36:48 CEST 2003  Jan Hubicka  <jh@suse.cz>
872         * decl2.c (defer_fn): Set DECL_DEFER_OUTPUT.
873         (finish-file): Do not process function with DECL_DEFER_OUTPUT clear;
874         clear DECL_DEFER_OUTPUT once function is processed; avoid flags
875         massaging.
877         * cp-tree.h (DECL_NEEDED_P): Support unit-at-a-time
878         (expand_or_defer_fn): Declare.
879         (lower_function): Declare.
880         * decl.c (start_cleanup_fn): Use expand_or_defer_fn.
881         * decl2.c: Include cgraph.h and varpool.h
882         (maybe_emit_vtables):  Make explicit instantations as needed.
883         (mark_member_pointers, lower_function): New functions.
884         (finish_file): Do unit-at-a-time.
885         * method.c (synthesize_method): Use expand_or_defer_fn.
886         * optimize.c (maybe_clone_body): Use expand_or_defer_fn.
887         * parser.c (cp_parser_function_definition_after_decl): Use
888         expand_or_defer_fn.
889         * pt.c (instantiate_decl): Likewise.
890         * semantics.c: Include cgraph.h
891         (expand_or_defer_fn): Break out from ...
892         (expand_body): ... here; deal with unit-at-a-time.
893         * cp-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION,
894         LANG_HOOKS_CALLGRAPH_LOWER_FUNCTION): Define.
896 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
898         * call.c (resolve_scoped_fn_name): Return error_mark_node for
899         erroneous cases.
901 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
903         PR c++/11149
904         * call.c (resolve_scoped_fn_name): Check that the qualifying scope
905         is a class type.
907 2003-07-01  Giovanni Bajo  <giovannibajo@libero.it>
909         PR c++/8046
910         * error.c (dump_decl): Handle BIT_NOT_EXPR as
911         pseudo destructor calls.
913 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
915         * cp-tree.h (define_label): Replace filename and lineno
916         arguments with a location_t.
917         * decl.c (pop_label): Adjust define_label call.
918         (define_label): Replace filename and lineno arguments with a
919         location_t.
920         * semantics.c (finish_label): Adjust define_label call.
922 2003-07-01  Mark Mitchell  <mark@codesourcery.com>
924         PR c++/9559
925         * decl2.c (grokfield): Do not build NOP_EXPRs around the
926         error_mark_node.
928 2003-06-30  Neil Booth  <neil@daikokuya.co.uk>
930         * Make-lang.in: Update.
931         * cp-lang.c (c_language): Define.
932         (LANG_HOOKS_INIT_OPTIONS): Use common hook.
933         * cp-tree.h (cxx_init_options): Remove.
934         * lex.c: Don't include diagnostic.h.
935         (cxx_init_options): Remove.
937 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
939         PR c++/4933
940         * error.c (dump_expr): Support correctly the COMPOUND_EXPR
941         tree generated within a template. Use dump_expr to dump an
942         expression sizeof.
944 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
946         * mangle.c (write_expression): Exit gracefully when trying to
947         mangle a CALL_EXPR.
949 2003-06-30  Giovanni Bajo  <giovannibajo@libero.it>
951         PR c++/10750
952         * parser.c (cp_parser_primary_expression): A VAR_DECL with a
953         (value- or type-) dependent expression as DECL_INITIAL is a
954         valid constant-expression (at parser time).
956 2003-06-30  Giovanni Bajo <giovannibajo@libero.it>
958         PR c++/11106
959         * error.c (dump_decl): Call dump_decl to dump the DECL_NAME for a
960         USING_DECL, instead of print_tree_identifier.
962 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
964         * cp-tree.h (language_to_string): Adjust declaration.
965         * dump.c (cp_dump_tree): Adjust usage.
966         * error.c (dump_char): Use output_formatted_scalar. Tidy.
967         (parm_to_string): Lose unused parameter.  Tidy.
968         (expr_to_string): Likewise.
969         (code_to_string): Likewise.
970         (language_to_string): Likewise.
971         (op_to_string): Likewise.
972         (assop_to_string): Likewise.
973         (digit_buffer): Remove.
974         (dump_type): Format builtin vector type as __vector__.
976 2003-06-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
978         * error.c (print_integer): Remove.
979         (dump_type_suffix): Adjust.
980         (dump_expr): Likewise.
982 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
984         * error.c (print_instantiation_partial_context): Take a
985         location_t.
986         (print_instantiation_full_context): Adjust.
987         (print_instantiation_context): Adjust.
989         * cp-tree.h (cp_line_of, cp_file_of): Remove.
990         * error.c (cp_line_of, cp_file_of): Merge into ...
991         (location_of): ... here. Make static, return a location_t.
992         (cp_error_at, cp_warning_at, cp_pedwarn_at): Adjust.
994 2003-06-28  Nathan Sidwell  <nathan@codesourcery.com>
996         PR c++/10784
997         * call.c (joust): Move warn_conversion check outwards.
999 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
1001         * decl.c (build_typename_type)
1002         * mangle.c (write_template_template_arg)
1003         * parser.c (cp_parser_scope_through_which_access_occurs)
1004         * pt.c (push_access_scope_real, push_access_scope, pop_access_scope)
1005         * repo.c (get_base_filename)
1006         * semantics.c (maybe_convert_cond):
1007         Mark the definition static, matching the forward declaration.
1009 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
1011         PR c++/10468
1012         * pt.c (tsubst): Handle qualified TYPEOF_TYPEs correctly.
1014 2003-06-27  Mark Mitchell  <mark@codesourcery.com>
1016         PR c++/10796
1017         * decl.c (finish_enum): Implement DR377.
1019         * decl.c (cp_finish_decl): Don't make variables with reference
1020         type readonly while they are being initialized.
1022 2003-06-26  Mark Mitchell  <mark@codesourcery.com>
1024         PR c++/11332
1025         * typeck.c (build_static_cast): Avoid returning expressions with
1026         reference type.
1028 2003-06-26  Nathan Sidwell  <nathan@codesourcery.com>
1030         * call.c (build_op_delete_call): Use strip_array_call. Correct
1031         error message to say 'delete' or 'delete[]'.
1033 2003-06-26  Giovanni Bajo  <giovannibajo@libero.it>
1035         PR c++/8266
1036         * pt.c (check_explicit_specialization): When looking up a
1037         template function from an identifier outside class-scope, bind
1038         it to CP_DECL_CONTEXT.
1040 2003-06-25  Mark Mitchell  <mark@codesourcery.com>
1042         PR c++/10990
1043         * search.c (lookup_base_r): Rely on accessible_p, rather than
1044         trying to emulate that logic here.
1046         PR c++/10931
1047         * call.c (convert_like): Pass issue_conversion_warnings.
1048         (convert_like_with_context): Likewise.
1049         (convert_like_real): Add issue_conversion_warnings parameter.
1050         (perform_direct_initialization_if_possible): New function.
1051         * cp-tree.h (perform_direct_initialization_if_possible): Declare it.
1052         * typeck.c (check_for_casting_away_constness): New function.
1053         (build_static_cast): Rewrite.
1055 2003-06-24  Nathan Sidwell  <nathan@codesourcery.com>
1057         * call.c (enforce_access): Assert we get a binfo.
1058         (build_op_delete_call): Pass a binfo to
1059         perform_or_defer_access_check.
1060         * class.c (alter_access): Likewise.
1061         * decl.c (make_typename_type): Likewise.
1062         (make_unbound_class_template): Likewise.
1063         * lex.c (do_identifier): Likewise.
1064         * method.c (hack_identifier): Likewise.
1065         * parser.c (cp_parser_lookup_name): Likewise.
1066         * search.c (lookup_member): Likewise. Move IDENTIFIER_CLASS_VALUE
1067         test.
1068         * semantics.c (finish_non_static_data_member): Likewise.
1069         (perform_or_defer_access_check): Expect a binfo.
1070         * typeck.c (comptypes): Expect types.
1072         * mangle.c (find_substitution): Don't pass a non-type to same_type_p
1073         * friend.c (make_friend_class): Likewise.
1074         * pt.c (check_default_tmpl_args): Likewise.
1075         (lookup_template_class): Likewise.
1077 Tue Jun 24 15:30:05 CEST 2003  Jan Hubicka  <jh@suse.cz>
1079         * method.c (thunk_labelno): Move outside ifdef block to make garbage
1080         collector happy.
1082 Tue Jun 24 13:52:34 CEST 2003  Jan Hubicka  <jh@suse.cz>
1084         * class.c (build_vtable): Make vtables.
1085         * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
1086         * decl2.c (output_vtable_inherit): Rename to ...
1087         (prepare_assemble_variable): ... this one; change interface.
1088         (maybe_emit_vtables): Do not call output_vtable_inherit.
1089         * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
1090         * cp-tree.h (prepare_assemble_variable): New.
1092 2003-06-23  Andrew Pinski <pinskia@physics.uc.edu>
1094         * method.c: add prototype for make_alias_for_thunk.
1095         (thunk_labelno, make_alias_for_thunk): only define
1096         if ASM_OUTPUT_DEF is defined.
1098 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
1100         * method.c (thunk_labelno): New variable.
1101         (make_alias_for_thunk): New function.
1102         (use_thunk): Use it if defined ASM_OUTPUT_DEF.  Put the thunk
1103         into the same section as the function it is calling.
1104         Include gt-cp-method.h.
1105         * Make-lang.in (gt-cp-method.h): Depend on s-gtype.
1106         (cp/method.o): Depend on gt-cp-method.h.
1107         * config-lang.in (gtfiles): Add $(srcdir)/cp/method.c.
1109 Mon Jun 23 19:41:27 CEST 2003  Jan Hubicka  <jh@suse.cz>
1111         * decl.c (register_dtor_fn): Mark cleanup as used.
1112         * decl2.c (mark_vtable_entries): Skip nops.
1113         * rtti.c (get_tinfo_ptr): Mark tinfo as used.
1114         (build_dynamic_cast_1): Likewise.
1115         (tinfo_base_init): Likewise.
1116         (emit_tinfo_decl): Likewise.
1118 2003-06-23  Jakub Jelinek  <jakub@redhat.com>
1120         * mangle.c (hash_type): Val is the TREE_LIST itself, not a pointer
1121         to it.
1123 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
1125         PR c++/10784
1126         * call.c (joust): Warn about choosing conversion sequence only if
1127         -Wconversion.
1129 2003-06-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1131         PR c++/10864
1132         * call.c (op_error): Tidy.
1133         * error.c (dump_expr): Properly format 'T()' when T is an
1134         aggregate type.
1136 2003-06-21  Gabriel Dos Reis <gdr@integrable-solutions.net>
1138         PR c++/10915
1139         * decl.c (grok_op_properties): Warn possible confusing conversion
1140         only if -Wconversion.
1142 2003-06-20  Mark Mitchell  <mark@codesourcery.com>
1144         PR c++/10749
1145         * parser.c (cp_parser_class_head): See through dependent names
1146         when parsing a class-head.
1148         PR c++/10845
1149         * pt.c (try_class_unification): Correct handling of member class
1150         templates.
1152 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1154         * semantics.c (genrtl_finish_function): Adjust
1155         expand_function_end call.
1157 2003-06-19  Mark Mitchell  <mark@codesourcery.com>
1159         PR c++/10939
1160         * pt.c (tsubst_decl): Do not try to substitute into non-dependent
1161         functions.
1162         (value_dependent_expression_p): Correct logic for FUNCTION_DECLs.
1164         PR c++/9649
1165         * cp-tree.h (pushdecl_class_level): Change prototype.
1166         (push_class_level_binding): Likewise.
1167         * decl.c (add_binding): Reject duplicate static data members.
1168         (pushdecl_class_level): Return a value indicating whether or not
1169         the binding was valid.
1170         (push_class_level_binding): Likewise.
1171         * semantics.c (finish_member_declaration): Don't keep invalid
1172         declarations.
1174         PR c++/11041
1175         * call.c (initialize_reference): Do not use cp_finish_decl to emit
1176         temporary variables.
1177         * cp-tree.h (static_aggregates): Declare.
1178         (pushdecl_top_level_and_finish): Likewise.
1179         * decl.c (pushdecl_top_level_1): New function.
1180         (pushdecl_top_level): Use it.
1181         (pushdecl_top_level_and_finish): New function.
1182         (initialize_local_var): Remove redundant code.
1183         (cp_finish_decl): Remove support for RESULT_DECLs.  Don't check
1184         building_stmt_tree.
1185         * decl.h (static_aggregates): Remove.
1186         * decl2.c (get_guard): Use pushdecl_top_level_and_finish.
1187         * rtti.c (get_tinfo_decl): Use pushdecl_top_level_and_finish.
1188         (tinfo_base_init): Likewise.
1190 2003-06-19  Matt Austern  <austern@apple.com>
1192         PR c++/11228
1193         * init.c (build_zero_init): Assert that number of array elements
1194         is an integer constant.
1195         (build_default_init) Don't use build_zero_init for arrays with
1196         variable number of elements.
1198 2003-06-19  Andreas Jaeger  <aj@suse.de>
1200         * cp-tree.h: Remove duplicated declarations.
1202 2003-06-18  Nathanael Nerode  <neroden@gcc.gnu.org>
1204         * pt.c: Convert to ISO C.
1205         * semantics.c: Convert to ISO C.
1207 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
1209         * cp-tree.h (comp_except_specs, compparms, cp_has_mutable_p,
1210         at_least_as_qualified_p, more_qualified_p): Return bool.
1211         * typeck.c: ANSIFY function definitions.
1212         (comp_array_types): Take redeclaration bool parameter.
1213         (comptypes): Rearrange STRICT handling.
1214         (at_least_as_qualified_p, more_qualified_p,
1215         comp_cv_qualification): Cache cv quals.
1216         (compparms): Rearrange loop.
1218 2003-06-18  Nathan Sidwell  <nathan@codesourcery.com>
1220         * cp-tree.h (COMPARE_RELAXED): Rename to ...
1221         (COMPARE_DERIVED): ... here. Adjust comment.
1222         (resolve_typename_type_in_current_instantiation): Remove.
1223         (cp_tree_equal, comptypes): Return a bool.
1224         * cvt.c (convert_to_reference): Adjust comptypes call.
1225         * pt.c (template_args_equal, unify,): Adjust cp_tree_equal call.
1226         (resolve_typename_type_in_current_instantiation): Remove.
1227         * tree.c (cp_tree_equal): Return bool. Cope with TEMPLATE_DECLs and
1228         IDENTIFIER_NODEs. Abort if undeciderable. Adjust recursive
1229         calls. Refactor code.
1230         * typeck.c (comp_array_types): Return bool. Lose callback.
1231         parameter. Adjust cp_tree_equal calls.
1232         (comptypes): Return bool. Adjust strict handling. Remove relaxed
1233         enumeration and java type handling. Deal with typename types here.
1234         Adjust recursive and cp_tree_equals calls. Adjust base and derived
1235         checking.
1236         (comp_target_types): Remove unreachable code. Adjust
1237         same_or_base_type_p calls.
1238         (ptr_reasonably_similar): Adjust base and derived check.
1240         * typeck.c (maybe_warn_about_returning_address_of_local): Remove
1241         unused calculation.
1242         (check_return_expr): Adjust error messages.
1243         * cp-tree.def (SCOPE_REF): Correct comment.
1245 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1247         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1248         string again.
1250 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
1252         * optimize.c (dump_function): Form complete flag name by
1253         prefixing 'fdump-' to string returned by dump_flag_name().
1255 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1257         * mangle.c (mangle_conv_op_name_for_type): Correct sprintf format
1258         string.
1260 2003-06-17  Jason Merrill  <jason@redhat.com>
1262         PR c++/10929
1263         * decl.c (grokfndecl): Don't mark a function inline for
1264         -finline-functions if it isn't defined.
1266 2003-06-17  Mark Mitchell  <mark@codesourcery.com>
1268         PR c++/10712
1269         * class.c (handle_using_decl): Robustify.
1271         PR c++/11105
1272         * cp-tree.h (DECL_CONV_FN_TYPE): New method.
1273         * mangle.c (struct globals): Remove internal_mangling_p.
1274         (write_unqualified_name): Use DECL_CONV_FN_TYPE.
1275         (write_template_parm): Don't write out the level number.
1276         (conv_type_names): New variable.
1277         (hash_type): New function.
1278         (compare_type): Likewise.
1279         (mangle_conv_op_name_for_type): Don't try to mangle conversion
1280         operator names.
1281         * search.c (lookup_conversion_operator): New function.
1282         (lookup_fnfields_1): Use it.
1284 2003-06-17  Andreas Jaeger  <aj@suse.de>
1286         * except.c: Remove duplicate declaration of push_eh_cleanup.
1288         * call.c: Remove extra declaration of inhibit_warnings.
1290 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
1292         2003-06-16  Jens-Michael Hoffmann  <jensmh@gmx.de>
1293         * mangle.c: Convert to ISO C.
1295 2003-06-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1297         * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR
1298         macro.
1300 2003-06-16  Nathanael Nerode  <neroden@gcc.gnu.org>
1302         * tree.c: Convert to ISO C.
1304 2003-06-16  Kazu Hirata  <kazu@cs.umass.edu>
1306         * cp-tree.h: Follow spelling conventions.
1307         * mangle.c: Likewise.
1308         * method.c: Likewise.
1309         * parser.c: Likewise.
1311 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
1313         * decl.c (start_function): Adjust init_function_start call.
1314         * method.c (use_thunk): Likewise.
1315         * semantics.c (genrtl_start_function): Likewise.
1317 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
1319         * Make-lang.in: Remove c-options.o.
1321 2003-06-13  Nathanael Nerode  <neroden@gcc.gnu.org>
1323         * lex.c: Convert to ISO C.
1325         2003-05-19  Jens-Michael Hoffmann  <jensmh@gmx.de>
1326         * init.c: removes use of PARAMS macro.  Use ISO style function
1327         declarations.  (Not copyright-significant change.)
1329         * rtti.c: Remove PARAMS.
1331         * typeck2.c: Convert to ISO C.
1333 2003-06-12  Mark Mitchell  <mark@codesourcery.com>
1335         PR c++/10635
1336         * typeck.c (build_c_cast): Check that the destination type is
1337         complete.
1339 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
1341         PR c++/10432
1342         * cp-tree.h (finish_declarator): Remove.
1343         * decl.c (cp_finish_decl): Make sure to pop_nested_class even for
1344         erroneous declarations.
1345         * semantics.c (finish_declarator): Remove.
1347 2003-06-11  Roger Sayle  <roger@eyesopen.com>
1349         * decl2.c (generate_ctor_or_dtor_function): Avoid expanding a
1350         global static constructor/destructor if it will be empty, i.e.
1351         either doesn't call any ctors/dtors or only calls pure or const
1352         ctors/dtors.
1354 2003-06-11  Mark Mitchell  <mark@codesourcery.com>
1356         * mangle.c (tm_p.h): Include it.
1357         * Make-lang.in (cp/mangle.o): Depend on $(TM_P_H).
1359         PR c++/11131
1360         * tree.c (cp_cannot_inline_fn): Check for "inline" before
1361         instantiation.
1363 2003-06-10  Jason Merrill  <jason@redhat.com>
1365         PR c++/10968
1366         * pt.c (mark_decl_instantiated): Clear DECL_COMDAT.
1368 2003-06-10  Andrew Pinski  <pinskia@physics.uc.edu>
1370         * decl.c (start_cleanup_fn): Move static 'counter' out, mark with GTY.
1371         (start_cleanup_cnt): New.
1373 2003-06-10  Mark Mitchell  <mark@codesourcery.com>
1375         PR c++/11131
1376         * cp-tree.h (template_for_substitution): Declare.
1377         * decl2.c (mark_used): Use it when figuring out whether or not a
1378         function is inline.
1379         * pt.c (template_for_substitution): Give it external linkage.
1380         * tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
1381         possible.
1383 2003-06-09  Zack Weinberg  <zack@codesourcery.com>
1385         PR 8861
1386         * mangle.c (write_real_cst): New function.  Implement
1387         ABI-compliant mangling of floating-point literals when
1388         -fabi-version>=2; provide backward compatibility with 3.3 when
1389         -fabi-version=1 (with warning).  Clarify commentary.
1390         (write_template_arg_literal): Use write_real_cst.
1392 2003-06-07  Andreas Jaeger  <aj@suse.de>
1394         * cp/decl.c (xref_tag): Remove undefined macro NONNESTED_CLASSES.
1396 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
1398         * cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
1399         (LANG_HOOKS_HANDLE_OPTION): Override.
1400         * cp-tree.h (cxx_init_options): Update.
1401         * lex.c (cxx_init_options): Update.
1403 Thu Jun  5 18:33:40 CEST 2003  Jan Hubicka  <jh@suse.cz>
1405         * Make-lang.in:  Add support for stageprofile and stagefeedback
1407 2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>
1409         * decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.
1411 2003-06-04  Andreas Jaeger  <aj@suse.de>
1413         * g++spec.c (lang_specific_driver): Remove ALT_LIBM usage.
1415 2003-06-03  Jason Merrill  <jason@redhat.com>
1417         * cp/cp-tree.h (CP_AGGREGATE_TYPE_P): Accept vectors.
1419         * cp/decl.c (reshape_init): Handle vectors.
1421         * testsuite/g++.dg/init/array10.C: New.
1423 2003-06-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1425         PR c++/10940
1426         * pt.c (check_explicit_specialization): Check for 'static'
1427         earlier.
1429 2003-05-31  Diego Novillo  <dnovillo@redhat.com>
1431         * class.c (dump_array): Call CONSTRUCTOR_ELTS to access
1432         the operand of a CONSTRUCTOR node.
1434 2003-05-31  Gabriel Dos Reis <gdr@integrable-solutions.net>
1436         * decl.c (cp_binding_level::this_entity): Rename from this_class.
1437         (cxx_scope_descriptor): New function.
1438         (cxx_scope_debug): Likewise.
1439         (push_binding_level): Use it.
1440         (pop_binding_level): Likewise.
1441         (suspend_binding_level): Likewise.
1442         (resume_binding_level): Likewise.
1443         (pushlevel_class): Adjust use of this_class.
1444         (pushtag): Likewise.
1445         (lookup_name_real): Likewise.
1446         (global_scope_name): New variable.
1447         (initialize_predefined_identifiers): Initialize it.
1448         (push_namespace): Use it.
1449         (make_cxx_scope): New function.
1450         (pushlevel): Use it.
1451         (pushlevel_class): Likewise.
1452         (push_binding_level): Simplify.  Loose the last two arguments.
1453         (make_binding_level): Remove.
1454         (initial_push__namespace_scope): New function.
1455         (push_namespace): Use it.  Simplify.
1456         (cxx_init_decl_processing): Likewise.
1457         (declare_namespace_level): Remove.
1459 2003-05-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1461         PR c++/10956
1462         * pt.c (instantiate_decl): Don't use full template arguments if
1463         we are dealing with specializations.
1465 2003-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1467         * decl.c (ENABLE_SCOPE_CHECKING): Rename from DEBUG_BINDING_LEVELS.
1468         (binding_depth): Unconditionally define.
1469         (is_class_level): Likewise.
1470         (indent): Likewise.  Take an indenting parameter.
1471         (push_binding_level): Remove conditional definittion.
1472         (pop_binding_level): Likewise.
1473         (suspend_binding_level): Likewise.
1474         (resume_binding_level): Likewise.
1475         (pushlevel): Likewise.
1476         (pushlevel_class): Likewise.
1477         (poplevel_class): Likewise.
1478         (pop_everything): Likewise.
1480 2003-05-27  Gabriel Dos Reis <gdr@integrable-solutions.net>
1482         * name-lookup.h (global_scope_p): New macro.
1483         * decl.c (pop_binding_level): Use it.  Don't refer directly to
1484         global_binding_level.
1485         (suspend_binding_level): Likewise.
1486         (global_bindings_p): Likewise.
1487         (print_other_binding_stack): Likewise.
1488         (print_binding_stack): Likewise.
1489         (maybe_push_to_top_level): Likewise.
1490         (pushdecl_namespace_level): Likewise.
1491         (cxx_init_decl_processing): Likewise.
1492         (start_decl): Likewise.
1493         (cp_finish_decl): Likewise.
1494         (start_function): Likewise.
1495         (global_binding_level): Remove.
1497 2003-05-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1499         * parser.c (cp_parser_explicit_instantiation): Restore old
1500         access before template instantiation.
1502 2003-05-23  Geoffrey Keating  <geoffk@apple.com>
1504         * lang-specs.h: Use -o to specify preprocessor's output file.
1505         Make -no-integrated-cpp work when building PCH files.
1507 2003-05-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1509         PR c++/10682
1510         * pt.c (instantiate_class_template): Use DECL_ARTIFICIAL to
1511         check for implicitly created typedef to an enum.
1513 2003-05-21  Jason Merrill  <jason@redhat.com>
1515         * init.c (build_vec_delete): Copy the address into a temporary
1516         variable before calling build_vec_delete_1.
1517         * decl2.c (delete_sanity): Don't call stabilize_reference.
1519 2003-05-21  Nathan Sidwell  <nathan@codesourcery.com>
1521         * pt.c (register_specialization): Update the decl's location,
1522         if necessary.
1523         (check_explicit_specialization): Likewise.
1525 2003-05-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1527         * error.c (dump_expr): Use HOST_WIDE_INT_PRINT_DOUBLE_HEX.
1529 2003-05-21  Danny Smith  <dannysmith@users.sourceforge.net>
1531         PR c++/9738
1532         * decl.c (duplicate_decls): Re-invoke make_decl_rtl
1533         if the old decl had instantiated DECL_RTL.
1534         (Base on Richard Henderson 2003-05-13 patch to c-decl.c).
1536 2003-05-19  Matt Austern  <austern@apple.com>
1538         * lang-options.h: Document -Wno-invalid-offsetof
1539         * typeck.c (build_class_member_access_expr): Don't complain about
1540         (Foo *)p->x for non-POD Foo if warn_invalid_offset is zero.
1542 2003-05-18 Andrew Pinski <pinskia@physics.uc.edu>
1544         * name-lookup.c (free_binding_entry): fix where the GTY markers are.
1545         (binding_entry_make): Make entry->chain NULL after getting an entry.
1546         fix the spelling of chain in a comment.
1547         (binding_table_free): speed up by having temporary variable.
1548         (binding_table_new): set table->chain to be NULL after allocating
1549         a table.
1550         (cxx_binding_make): use gcc_alloc instead of ggc_alloc_cleared and set
1551         binding->previous to NULL after getting an binding for speed.
1553 2003-05-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1555         * cp-tree.h (struct lang_type_class): Replace data member tags
1556         with hash-table nested_udts.
1557         (CLASSTYPE_NESTED_UTDS): Rename from CLASSTYPE_TAGS.
1558         * class.c (unreverse_member_declarations): Don't touch
1559         CLASSTYPE_TAGS.
1560         (pushclass): Use cxx_remember_type_decls.
1561         * decl.c (struct cp_binding_level): Replace data member tags with
1562         hash-table type_decls.
1563         (pop_binding_level): Handle level->type_decls.
1564         (kept_level_p): Adjust.
1565         (poplevel): Remove unused local variable.
1566         (bt_print_entry): New function.
1567         (print_binding_level): Use it.
1568         (push_namespace): Build current_binding_level->type_decls.
1569         (maybe_process_template_type_declaration): Adjust.
1570         (pushtag): Likewise.
1571         (clear_anon_tags): Use binding_table_remove_anonymous_types.
1572         (gettags): Remove.
1573         (cxx_remember_type_decls):  Rename from storetags.  Adjust.
1574         (lookup_tag): Use binding_table_find_anon_type.  Tidy.
1575         (lookup_tag_reverse): Use binding_table_reverse_maybe_remap.
1576         (cxx_init_decl_processing): Build global_binding_level->type_decls.
1577         (store_parm_decls): Remove pointless code.
1578         * name-lookup.c (free_binding_entry): New variable.
1579         (ENTRY_INDEX): New macro.
1580         (struct binding_table_s): New datatype.
1581         (binding_entry_make): New function.
1582         (binding_entry_free): Likewise.
1583         (binding_table_construct): Likewise.
1584         (binding_table_free): Likewise.
1585         (binding_table_new): Likewise.
1586         (binding_table_expand): Likewise.
1587         (binding_table_insert): Likewise.
1588         (binding_table_find): Likewise.
1589         (binding_table_find_anon_type): Likewise.
1590         (binding_table_reverse_maybe_remap): Likewise.
1591         (binding_table_remove_anonymous_types): Likewise.
1592         (binding_table_foreach): Likewise.
1593         * name-lookup.h (binding_table): New type.
1594         (binding_entry): Likewise.
1595         (bt_foreach_proc): Likewise.
1596         (struct binding_entry_s): New datatype.
1597         (SCOPE_DEFAULT_HT_SIZE): New macro.
1598         (CLASS_SCOPE_HT_SIZE): Likewise.
1599         (NAMESPACE_ORDINARY_HT_SIZE): Likewise.
1600         (NAMESPACE_STD_HT_SIZE): Likewise.
1601         (GLOBAL_SCOPE_HT_SIZE): Likewise.
1602         (binding_table_new): Declare.
1603         (binding_table_free): Likewise.
1604         (binding_table_insert): Likewise.
1605         (binding_table_find_anon_type): Likewise.
1606         (binding_table_reverse_maybe_remap): Likewise.
1607         (binding_table_remove_anonymous_types): Likewise.
1608         (binding_table_foreach): Likewise.
1609         (binding_table_find): Likewise.
1610         (cxx_remember_type_decls): Likewise.
1611         * pt.c (bt_instantiate_type_proc): New function.
1612         (do_type_instantiation): Use it.
1613         * search.c (lookup_field_r): Use binding_table_find.
1615 2003-05-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1617         * semantics.c (perform_deferred_access_checks): Don't discard
1618         checked access.
1620 2003-05-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1622         * error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
1623         libiberty VA_ macros, always use stdarg.
1624         * rtti.c (create_pseudo_type_info): Likewise.
1625         * tree.c (build_min_nt, build_min): Likewise.
1627 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1629         * ptree.c (cxx_print_type, cxx_print_xnode): Use string
1630         concatentation on HOST_WIDE_INT_PRINT_* format specifier to
1631         collapse multiple function calls into one.
1632         * tree.c (debug_binfo): Likewise.
1634 2003-05-15  Jason Merrill  <jason@redhat.com>
1636         PR c++/5388
1637         * call.c (conditional_conversion): Don't consider implicit
1638         conversions if T2 is a base of T1.
1639         * cp-tree.h (DERIVED_FROM_P, UNIQUELY_DERIVED_FROM_P): Make boolean.
1640         (ACCESSIBLY_UNIQUELY_DERIVED_P, PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1642         * parser.c (cp_parser_primary_expression): Convert a static data
1643         member from reference.
1645 2003-05-15  Mark Mitchell  <mark@codesourcery.com>
1647         * call.c (build_op_delete_call): Avoid creating unnecessary types.
1648         * class.c (instantiate_type): Remove tests for tf_no_attributes.
1649         * cp-tree.h (tsubst_flags_t): Remove tf_no_attributes.
1650         (COMPARE_NO_ATTRIBUTES): Remove.
1651         * typeck.c (comptypes): Do not check COMPARE_NO_ATTRIBUTES.
1653         PR c++/8385
1654         * semantics.c (finish_typeof): Refine type-dependency check.
1656 2003-05-13  Jason Merrill  <jason@redhat.com>
1658         * typeck.c (build_modify_expr): Don't always stabilize the lhs and
1659         rhs.  Do stabilize the lhs of a MODIFY_EXPR used on the lhs.
1661 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1663         * method.c (synthesize_method): Call push/pop_deferring_access_checks.
1665 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1667         PR c++/10230, c++/10481
1668         * semantics.c (finish_non_static_data_member): Handle when the
1669         non-static member is not from a base of the current class type.
1671 2003-05-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1673         PR c++/10552
1674         * pt.c (tsubst_copy): Handle TEMPLATE_DECL that is a member class
1675         template and has dependent context.
1677 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1679         * pt.c (instantiate_decl): Call push/pop_deferring_access_checks.
1681 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1683         PR c++/9252
1684         * cp-tree.h (saved_scope): Remove check_access field.
1685         (tsubst_flags_t): Remove tf_parsing.
1686         * decl.c (maybe_push_to_top_level): Don't initialize
1687         scope_chain->check_access.
1688         (make_typename_type, make_unbound_class_template): Don't use
1689         tf_parsing.
1690         (register_dtor_fn): Use push/pop_deferring_access_checks
1691         instead of scope_chain->check_access.
1692         * method.c (use_thunk): Likewise.
1693         * parser.c (cp_parser_explicit_instantiation
1694         (cp_parser_constructor_declarator_p): Don't call
1695         push/pop_deferring_access_checks here.
1696         (cp_parser_template_argument, cp_parser_class_name): Don't use
1697         tf_parsing.
1698         (yyparse): Check flag_access_control.
1699         * pt.c (instantiate_class_template): Call
1700         push/pop_deferring_access_checks.
1701         * semantics.c (push_deferring_access_checks): Propagate
1702         dk_no_check.
1703         (perform_or_defer_access_check): Make sure basetype_path is
1704         a type before comparison.
1705         * call.c (build_op_delete_call, build_over_call): Use
1706         perform_or_defer_access_check.
1707         * class.c (alter_access): Likewise.
1708         * init.c (build_offset_ref): Likewise.
1709         * lex.c (do_identifier): Likewise.
1710         * method.c (hack_identifier): Likewise.
1711         * search.c (lookup_member): Likewise.
1712         * semantics.c (finish_non_static_data_member): Likewise.
1713         (simplify_aggr_init_exprs_r): Use push/pop_deferring_access_checks
1714         instead of flag_access_control.
1716 2003-05-10  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1718         PR c++/9554
1719         * parser.c (cp_parser_class_name): Remove check_access parameter.
1720         All caller adjusted.  Update declaration.
1721         (cp_parser_lookup_name): Likewise.
1722         * semantics.c (push_deferring_access_checks): Change parameter type
1723         to enum deferring_kind.  All caller adjusted.
1724         (resume_deferring_access_checks): Adjust to use new enum.
1725         (stop_deferring_access_checks): Likewise.
1726         (perform_or_defer_access_check): Likewise.
1727         * cp-tree.h (deferring_kind): New enum.
1728         (deferred_access): Adjust field type.
1729         (push_deferring_access_checks): Update declaration.
1731 2003-05-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1733         PR c++/10555, c++/10576
1734         * pt.c (lookup_template_class): Handle class template with
1735         multiple levels of parameters when one of the levels contain
1736         errors.
1738 2003-05-08  Jason Merrill  <jason@redhat.com>
1740         * init.c (build_new_1): Don't reuse a TARGET_EXPR in an
1741         expression.  Undo some of the recent reorg.
1743 2003-05-07  Richard Henderson  <rth@redhat.com>
1745         PR c++/10570
1746         * cfns.gperf: Comment out POSIX thread cancellation points,
1747         plus abort and raise.
1748         * cfns.h: Regenerate.
1750 2003-05-07  Jason Merrill  <jason@redhat.com>
1752         * call.c (build_conditional_expr): Don't assume that the folded
1753         expression has result_type.
1755 2003-05-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1757         * typeck.c (build_unary_op): Deal with const qualifier in
1758         invalid pointer-to-member earlier.
1760 2003-05-05  Jason Merrill  <jason@redhat.com>
1762         PR c++/9537
1763         * call.c (conditional_conversion): Build an RVALUE_CONV if
1764         we're just changing the cv-quals.
1765         (build_conditional_expr): Don't call convert to change
1766         cv-quals.
1768 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1770         PR c++/10496
1771         * typeck.c (build_unary_op): Don't output const qualifier when
1772         output invalid pointer-to-member diagnostics.
1774 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1776         * decl.c: Fix typos.
1778 2003-05-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1780         PR c++/4494
1781         * decl.c (start_function): Use same_type_p to check return type
1782         of main.
1784 2003-05-03  Zack Weinberg  <zack@codesourcery.com>
1786         PR c/10604
1787         * cp/typeck.c (build_x_compound_expr): No need to check
1788         extra_warnings as well as warn_unused_value.
1790 2003-05-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1792         PR c++/9364, c++/10553, c++/10586
1793         * decl.c (make_typename_type): Don't crash on illegal code.
1795 2003-05-03  Nathan Sidwell  <nathan@codesourcery.com>
1797         * class.c (finish_struct): Use location_t and input_location
1798         directly.
1799         * decl.c (make_label_decl): Likewise.
1800         (use_label): Likewise.
1801         * decl2.c (warn_if_unknown_interface): Likewise.
1802         (start_static_initialization_or_destruction): Likewise.
1803         (generate_ctor_or_dtor_function): Likewise.
1804         (finish_file): Likewise.
1805         * error.c (print_instantiation_full_context): Likewise.
1806         * init.c (create_temporary_var): Likewise.
1807         * method.c (synthesize_method): Likewise.
1808         * parser.c (cp_token): Likewise.
1809         (cp_lexer_set_source_position_from_token): Likewise.
1810         (cp_lexer_get_preprocessor_token): Likewise.
1811         (cp_parser_statement): Likewise.
1812         * pt.c (tsubst_friend_function): Likewise.
1813         (instantiate_class_template): Likewise.
1814         (tsubst_decl): Likewise.
1815         (tsubst): Likewise.
1816         (instantiate_decl): Likewise.
1817         * semantics.c (begin_class_definition): Likewise.
1818         (expand_body): Likewise.
1820 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
1822         * class.c (finish_struct): Rename lineno to input_line.
1823         * decl.c (push_binding_level, pop_binding_level,
1824         suspend_binding_level, resume_binding_level, make_label_decl,
1825         use_label, start_function): Likewise.
1826         * decl2.c (warn_if_unknown_interface,
1827         start_static_initialization_or_destruction,
1828         generate_ctor_or_dtor_function, finish_file): Likewise.
1829         * error.c (cp_line_of, print_instantiation_full_context,
1830         print_instantiation_context): Likewise.
1831         * except.c (check_handlers_1, check_handlers): Likewise.
1832         * init.c (create_temporary_var): Likewise.
1833         * method.c (use_thunk, synthesize_method): Likewise.
1834         * parser.c (cp_lexer_set_source_position_from_token,
1835         cp_lexer_get_preprocessor_token): Likewise.
1836         * pt.c (push_tinst_level, pop_tinst_level,
1837         tsubst_friend_function, instantiate_class_template, tsubst_decl,
1838         tsubst, tsubst_expr, instantiate_decl): Likewise.
1839         * semantics.c (genrtl_try_block, finish_label_stmt,
1840         begin_class_definition, expand_body,
1841         genrtl_finish_function): Likewise.
1842         * tree.c (build_min_nt, build_min): Likewise.
1844 2003-05-01  Mark Mitchell  <mark@codesourcery.com>
1846         * decl2.c (comdat_linkage): Don't externalize explicit
1847         instantiations.
1849 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1851         PR c++/10554
1852         * decl2.c (do_class_using_decl): Check if operand 0 of SCOPE_REF
1853         is not NULL.
1855 2003-05-01  Steven Bosscher  <steven@gcc.gnu.org>
1857         * cp-tree.h (struct lang_id2): Remove.  Move fields from here...
1858         (struct lang_identifier): ... to here.
1859         (LANG_ID_FIELD): Remove.
1860         (SET_LANG_ID): Remove.
1861         (IDENTIFIER_LABEL_VALUE): Adjust for new lang_identifier.
1862         (SET_IDENTIFIER_LABEL_VALUE): Likewise.
1863         (IDENTIFIER_IMPLICIT_DECL): Likewise.
1864         (SET_IDENTIFIERL_IMPLICIT_DECL): Likewise.
1865         (IDENTIFIER_ERROR_LOCUS): Likewise.
1866         (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1868 2003-05-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1870         PR c++/8772
1871         * pt.c (convert_template_argument): Correct diagnostic.
1873 2003-04-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1875         PR c++/9432, c++/9528
1876         * decl2.c (validate_nonmember_using_decl): Handle SCOPE_REF.
1878 2003-04-30  Garbiel Dos Reis  <gcc@integrable-solutions.net>
1880         * decl.c (check_previous_goto_1): Adjust prototype.
1881         (check_previous_goto): Adjust use.
1882         (check_switch_goto): Likewise.
1883         (use_label): Adjust.
1884         (check_previous_goto_1): Don't use pedwarn_with_file_and_line.
1885         (struct named_label_use_list): Use location_t datatype.
1887 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
1889         PR c++/10551
1890         * pt.c (mark_decl_instantiated): Defer all explicit instantiations
1891         that have not yet been written out.
1893 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
1895         PR c++/10549
1896         * class.c (layout_class_type): Mark overlong bitfields as having
1897         the maximum size permitted by their type, after layout.
1899         PR c++/10527
1900         * error.c (dump_expr): Correctly handling of NEW_EXPR.4
1902 2003-04-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1904         * call.c (build_operator_new_call): Fix typo.
1905         * lang-options.h: Likewise.
1907 2003-04-29  Mark Mitchell  <mark@codesourcery.com>
1909         PR c++/10515
1910         * cp-tree.h (lookup_field_1): Declare it.
1911         * search.c (lookup_field_1): Make it public.
1912         * decl.c (reshape_init): Handle designated initializers.
1914         * decl.c (maybe_commonize_var): Further tweak support for systems
1915         without weak symbols.
1917 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
1919         * decl.c (maybe_commonize_var): Fix thinko in last patch.
1921 2003-04-27  Mark Mitchell  <mark@codesourcery.com>
1923         PR c++/10506
1924         * method.c (use_thunk): Decrement immediate_size_expand.
1926         PR c++/10503
1927         * cp-tree.h (DECL_VAR_MARKED_P): New macro.
1928         (DECL_MAYBE_TEMPLATE): Remove.
1929         * class.c (fixed_type_or_null): Avoid infinite recursion.
1931         * decl.c (maybe_commonize_var): Make the code match the comments.
1932         * pt.c (instantiate_decl): Move call to import_export_decl.
1934 2003-04-26  Mark Mitchell  <mark@codesourcery.com>
1936         * decl2.c (finish_file): Fix merge botch.
1938 2003-04-25  Mark Mitchell  <mark@codesourcery.com>
1940         * decl2.c (finish_file): Don't call import_export_decl for
1941         functions that are not defined.
1942         (handle_class_head): Robustify.
1943         * pt.c (instantiate_decl): Do not call cp_finish_decl for
1944         variables that are not defined.
1946 2003-04-24  Sylvain Pion  <Sylvain.Pion@mpi-sb.mpg.de>
1948         * call.c (print_z_candidates): Fix off by one error.
1950 2003-04-24  Nathan Sidwell  <nathan@codesourcery.com>
1952         PR c++/10337
1953         * call.c (joust): Don't warn about conversion ops that are exact
1954         or cv-conversions. Rearrange to avoid multiple type comparisons.
1956 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
1958         PR c++/10471
1959         * call.c (build_cxx_call): Robustify.
1961 2003-04-23  Neil Booth  <neil@daikokuya.co.uk>
1963         * Make-lang.in (lex.o): Remove mbchar.h.
1964         * lex.c (MULTIBYTE_CHARS): Lose.
1965         * parser.c (cp_lexer_get_preprocessor_token): CPP_OTHER handled
1966         in c-lex.c.
1968 2003-04-23  Mark Mitchell  <mark@codesourcery.com>
1970         PR c++/9847
1971         * cp-tree.h (duplicate_tag_error): Remove.
1972         * class.c (duplicate_tag_error): Remove.
1973         * semantics.c (begin_class_definition): Return immediately for a
1974         duplicate class definition.
1976         PR c++/10451
1977         * decl.c (grokdeclarator): Correct logic for "mutable" errors.
1979 2003-04-22  Mark Mitchell  <mark@codesourcery.com>
1981         PR c++/10446
1982         * search.c (lookup_fnfields_1): Handle empty slots in the method
1983         vector.
1985         PR c++/10428
1986         * decl.c (check_elaborated_type_specifier): New function, split
1987         out from ...
1988         (xref_tag): ... here.  Use the new function in more places.
1990         * rtti.c (throw_bad_typeid): Use build_cxx_call.
1992 2003-04-21  Mark Mitchell  <mark@codesourcery.com>
1994         * call.c (build_over_call): Use build_cxx_call.
1995         (build_cxx_call): New method, split out of build_over_call.
1996         * cp-tree.h (language_function): Add can_throw.
1997         (build_cxx_call): Declare it.
1998         * decl.c (finish_function): If a function does not contain any
1999         calls to functions that can throw an exception, indicate that
2000         fact.
2001         * decl2.c (mark_used): Do not defer the instantiation of
2002         functions, if the current function does not throw.
2003         * optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
2004         * pt.c (instantiate_decl): Make sure import_export_decl is called
2005         before emitting things.
2006         * rtti.c (throw_bad_cast): Use build_cxx_call.
2007         (build_dynamic_cast_1): Likewise.
2008         * typeck.c (build_function_call): Likewise.
2010 2003-04-21  Nathan Sidwell  <nathan@codesourcery.com>
2012         PR c++/9881
2013         * typeck.c (build_unary_op): Fold all COMPONENT_REF addr
2014         expressions. Reverts my 2002-08-08 patch.
2016         * typeck.c (comp_ptr_ttypes_real): Swap final && operands for
2017         cheaper early exit.
2019 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
2021         * cp/decl2.c (start_static_storage_duration_function): Take count
2022         arg, don't check if it wraps round.
2023         (generate_ctor_or_dtor_function): Add locus arg, use it.
2024         (generate_ctor_and_dtor_functions_for_priority): Data arg is a
2025         locus.
2026         (finish_file): Set line numbers to past EOF for synthesized
2027         functions.
2029 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
2031         PR c++/10405
2032         * search.c (lookup_field_1): Final scan goes backwards for
2033         types, forwards for non-types.
2035 2003-04-17  Roger Sayle  <roger@eyesopen.com>
2037         PR c/10375
2038         * decl.c (duplicate_decls): Preserve "const", "noreturn" and
2039         "nothrow" function attributes.
2041 2003-04-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2043         PR c++/10347
2044         * pt.c (type_dependent_expression_p): Handle array new.
2046 2003-04-15  Mark Mitchell  <mark@codesourcery.com>
2048         PR c++/10381
2049         * parser.c (cp_parser_primary_expression): Reorganize logic for
2050         dealing with name lookup failures.
2052 2003-04-15  Jason Merrill  <jason@redhat.com>
2054         * decl2.c (mark_used): Don't instantiate anything if
2055         skip_evaluation.
2057 2003-04-14  Ziemowit Laski  <zlaski@apple.com>
2059         * tree.c (build_cplus_array_type_1): Do not call
2060         uses_template_parms() on a NULL index_type.
2062 2003-04-13  Roger Sayle  <roger@eyesopen.com>
2064         * decl.c (duplicate_decls): Preserve pure and malloc attributes.
2066 2003-04-12  Mark Mitchell  <mark@codesourcery.com>
2068         PR c++/10300
2069         * init.c (build_new_1): Reorganize.
2071 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
2073         * class.c (initialize_array)
2074         * decl.c (reshape_init)
2075         * decl2.c (build_expr_from_tree)
2076         * init.c (build_zero_init)
2077         * pt.c (tsubst_copy, tsubst_copy_and_build)
2078         * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
2079         (ptm_initializer, class_initializer, get_pseudo_ti_init)
2080         * semantics.c (finish_compound_literal)
2081         * typeck.c (build_ptrmemfunc1)
2082         * typeck2.c (store_init_value, process_init_constructor)
2083         (build_functional_cast): Use build_constructor.
2085 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
2087         * call.c (print_z_candidates): Use gcc_gettext_width, not
2088         strlen, to determine how much padding to use.
2090 2003-04-10  Zack Weinberg  <zack@codesourcery.com>
2092         * decl.c: Update all calls to shadow_warning.
2094 2003-04-10  Mark Mitchell  <mark@codesourcery.com>
2096         * class.c (layout_class_type): Correct handling for overlong
2097         bit-fields whose width is the same as an integer type.
2099 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
2101         * cp-tree.def: Make fourth element for all 'c' and 'x' nodes zero.
2102         * cp-lang.c (cp_tree_size): New function.
2103         (LANG_HOOKS_TREE_SIZE): Override.
2105         * cp-tree.h (SOURCE_LOCUS, SRCLOC_FILE, SRCLOC_LINE, struct
2106         tree_srcloc, TS_CP_COMMON, TS_CP_SRCLOC): Kill.
2107         (union lang_tree_node): Remove common and srcloc members.
2108         (build_srcloc_here): Don't prototype.
2109         * decl.c (cp_tree_node_structure): Kill SRCLOC case.
2110         * pt.c (pending_templates): Correct comment.
2111         * tree.c (build_srcloc, build_srcloc_here): Kill.
2113 2003-04-06  Zack Weinberg   <zack@codesourcery.com>
2115         * call.c: Include intl.h.
2116         (print_z_candidate): Always use inform; get rid of errfn
2117         argument. Reorganize so that all the strings get picked up
2118         by xgettext.  Note obligation of caller to pass first argument
2119         through gettext.
2120         (print_z_candidates): Update to match.  Indent second and
2121         successive candidates by strlen() of translated message.
2122         (joust): Restructure ambiguous-conversion pedwarn so that
2123         translators see a complete sentence.  Update calls to
2124         print_z_candidate.
2126         * Make-lang.in (cp/call.o): Update dependencies.
2128 2003-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2130         * decl.c (set_current_binding_level): Delete, revert last change.
2131         (current_binding_level): Modify to allow it as as lvalue.
2133 2003-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2135         * name-lookup.c (find_binding): Pass appropriate pointer type to
2136         POP_TIMEVAR_AND_RETURN.
2138 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2140         * Make-lang.in (cp-warn): Add $(STRICT_WARN).
2141         * cp-tree.h: Don't insist on having GNUC.
2143 2003-04-03  Jason Merrill  <jason@redhat.com>
2145         * cvt.c (ocp_convert): Only abort if we try to convert an object
2146         of TREE_ADDRESSABLE type.
2148         * class.c (build_vtable): Set DECL_ALIGN here.
2149         (get_vtable_decl): Not here.
2150         (layout_vtable_decl): Or here.
2151         (create_vtable_ptr): Or here.
2152         (layout_class_type): Or here.
2153         (check_bitfield_decl): Don't mess with field alignment.
2155 2003-04-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2157         * operators.def (DEF_SIMPLE_OPERATOR, DEF_ASSN_OPERATOR,
2158         DEF_ASSN_OPERATOR): Delete spurious semi-colon.
2159         * rtti.c (dfs_class_hint_mark): Likewise.
2161         * decl.c (push_local_name, push_class_level_binding,
2162         maybe_inject_for_scope_var): Don't use POP_TIMEVAR_AND_RETURN in
2163         functions returning void.
2164         * decl2.c (add_using_namespace): Likewise.
2166         * decl.c (print_binding_level, print_other_binding_stack,
2167         print_binding_stack): Cast argument of %p specifier to void*.
2168         * ptree.c (cxx_print_decl): Likewise.
2170         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
2171         VAR_FUNCTION_OR_PARM_DECL_CHECK,
2172         VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
2173         BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK, LANG_TYPE_CLASS_CHECK,
2174         LANG_TYPE_PTRMEM_CHECK, LANG_DECL_U2_CHECK): Add __extension__.
2176         * decl.c (set_current_binding_level): New macro.  Use throughout
2177         when setting the current binding level.
2179         * cp-tree.h (cp_lvalue_kind, base_access): Delete trailing comma
2180         in enum.
2181         * method.c (mangling_flags): Likewise.
2183         * cp-tree.h (lang_type_header): Add __extension__ and use
2184         CHAR_BITFIELD for members.
2186 2003-04-02  Geoffrey Keating  <geoffk@apple.com>
2188         PR other/9274
2189         * mangle.c: Include gt-cp-mangle.h.
2190         (subst_identifiers): Mark with GTY.
2191         * config-lang.in (gtfiles): Add cp/mangle.c.
2192         * Make-lang.in: (gt-cp-mangle.h): New rule.
2193         (cp/mangle.o): Depends on gt-cp-mangle.h.
2195 2003-04-01  Andrew Pinski  <pinskia@physics.uc.edu>
2197         * config-lang.in (gtfiles): Add \$(srcdir)/cp/name-lookup.c
2198         after \$(srcdir)/cp/name-lookup.h.
2199         * name-lookup.c: (cxx_binding_make): Use ggc_alloc_clearedinstead
2200         of ggc_alloc.  Include gt-cp-name-lookup.h at the end of the file.
2201         * Make-lang.in: (gt-cp-name-lookup.h): Is generated by gengtype.
2202         (cp/name-lookup.o): Depends on gt-cp-name-lookup.h.
2204 2003-03-31  Jason Merrill  <jason@redhat.com>
2206         PR java/10145
2207         * class.c (check_field_decl): Don't set DECL_ALIGN.
2209 2003-03-30  Mark Mitchell  <mark@codesourcery.com>
2211         PR c++/7647
2212         * decl.c (grokdeclarator): Tidy, slightly.
2213         * search.c (lookup_field_1): Add want_type parameter.
2214         (lookup_field_r): Adjust call to lookup_field_1.
2216 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2218         * Make-lang.in (cp/name-lookup.o): Add more dependencies.
2220 2003-03-30  Gabriel Dos Reis <gdr@integrable-solutions.net>
2222         * cp-tree.h (binding_for_name: Move to name-lookup.h  Adjust
2223         prototype.
2224         (cxx_scope_find_binding_for_name): Likewise.
2225         * decl.c (find_binding: Move to name-lookup.c.
2226         (binding_for_name): Likewise.
2227         (cxx_scope_find_binding_for_name): Likewise.
2228         (BINDING_LEVEL):  Remove.
2229         (push_binding): Tidy.
2230         (push_class_binding): Likewise.
2231         (pop_binding): Likewise.
2232         (poplevel): Likewise.
2233         (poplevel_class): Likewise.
2234         (set_identifier_type_value_with_scope): Likewise.
2235         (push_overloaded_decl): Likewise.
2236         (lookup_tag): Likewise.
2237         (unqualified_namespace_lookup): Likewise.
2238         (lookup_name_current_level): Likewise.
2239         (maybe_inject_for_scope_var): Likewise.
2240         (namespace_binding): Move to name-lookup.c.
2241         (set_namespace_binding): Likewise.
2242         * decl2.c (lookup_using_namespace): Tidy.
2243         (qualified_lookup_using_namespace): Likewise.
2244         (do_toplevel_using_decl): Likewise.
2245         * name-lookup.c: Include "timevar.h"
2246         * name-lookup.h (cxx_scope):  Declare.
2247         (struct cxx_binding): Lose member "has_level".  Adjust "scope"
2248         member declaration.
2249         (BINDING_SCOPE): Adjust definition.
2250         (BINDING_HAS_LEVEL_P): Remove.
2252 2003-03-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2254         * name-lookup.c: New file.
2255         * name-lookup.h: Likewise..
2256         * decl.c (push_binding): Adjust use cxx_binding_make.
2257         (free_bindings): Move to name-lookup.c
2258         (pop_binding): Use cxx_binding_free.
2259         (binding_for_name): Tidy.
2260         * cp-tree.h: Include "name-lookup.h"
2261         (cxx_binding_make): Move to name-lookup.h
2262         (cxx_binding_clear): Likewise.
2263         (struct cxx_binding): Likewise.
2264         (LOCAL_BINDING_P): Likewise.
2265         (INHERITED_VALUE_BINDING_P): Likewise.
2266         (BINDING_SCOPE): Likewise.
2267         (BINDING_HAS_LEVEL_P): Likewise.
2268         (BINDING_VALUE): Likewise.
2269         (BINDING_TYPE): Likewise.
2270         * config-lang.in (gtfiles): Add cp/name-lookup.h
2271         * Make-lang.in (cp/name-lookup.o): New rule.
2272         (CXX_OBJS): Add cp/name-lookup.o
2273         (CXX_TREE_H): Add cp/name-lookup.h
2275 2003-03-28  Jason Merrill  <jason@redhat.com>
2277         PR c++/10245
2278         * cvt.c (force_rvalue): New fn.
2279         * call.c (build_conditional_expr): Use it.
2280         * cp-tree.h: Declare it.
2282 2003-03-28  Mike Stump  <mrs@apple.com>
2284         * error.c (dump_expr): Add 0x to printed hex numbers to make
2285         output match source code better.
2287 2003-03-28  Mark Mitchell  <mark@codesourcery.com>
2289         PR c++/10218
2290         * decl.c (grokfndecl): Return NULL_TREE for bogus out-of-class
2291         definitions.
2293         * decl2.c (generate_ctor_or_dtor_function): Tolerate a
2294         non-existant ssdf_decls array.
2295         (finish_file): Call generator_ctor_or_dtor_function when there are
2296         static constructors or destructors and no other static
2297         initializations.
2299 2003-03-28  Nathan Sidwell  <nathan@codesourcery.com>
2301         PR c++/10047
2302         * decl2.c (finish_file): Don't warn about explicitly instantiated
2303         inline decls.
2305 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
2307         PR c++/10224
2308         * pt.c (lookup_template_class): Only check instantiated args if
2309         they do not contain template parameters.
2311 2003-03-27  Nathan Sidwell  <nathan@codesourcery.com>
2313         PR c++/10158
2314         * parser.c (cp_parser_function_definition): Set
2315         DECL_INITIALIZED_IN_CLASS for members.
2316         * pt.c (instantiate_decl): Only reduce the template args for
2317         friends that are not defined in class.
2319 2003-03-25  Jason Merrill  <jason@redhat.com>
2321         * call.c (print_z_candidate): Change name of first arg to msgid.
2322         (joust): Add comment for translators.
2324 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2326         PR c++/9898, PR c++/383, DR 322
2327         * pt.c (maybe_adjust_types_for_deduction) <DEDUCE_CONV>: Look
2328         through reference types on both PARM and ARG.
2330 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2332         PR c++/10119
2333         * error.c (dump_expr) <BASELINK>: Use dump_expr.
2334         * pt.c (maybe_fold_nontype_args): New function.
2335         (tsubst_copy) <SCOPE_REF>: Subst any template_id args.
2336         <TEMPLATE_ID_EXPR>: Break out folding code, call it.
2337         (tsubst_copy_and_build) <TEMPLATE_ID_EXPR>: Call
2338         maybe_fold_nontype_args.
2340 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
2342         PR c++/10026
2343         * decl2.c (arg_assoc_type) <ERROR_MARK>: Don't die.
2345 2003-03-23  Mark Mitchell  <mark@codesourcery.com>
2347         PR c++/7086
2348         * typeck.c (cxx_mark_addressable):  Adjust call to
2349         gen_mem_addressof or put_var_into_stack.
2351 2003-03-22  Nathan Sidwell  <nathan@codesourcery.com>
2353         PR c++/9978, c++/9708
2354         * cp-tree.h (instantiate_template): Add tsubst_flags parameter.
2355         * call.c (add_template_candidate_real): Adjust
2356         instantiate_template call.
2357         * class.c (resolve_address_of_overloaded_function): Likewise.
2358         * decl.c (build_enumerator): Set TREE_CONSTANT.
2359         * pt.c (check_instantiated_args): New.
2360         (push_inline_template_parms_recursive): Set TREE_CONSTANT,
2361         TREE_READONLY.
2362         (build_template_parm_index): Copy TREE_CONSTANT, TREE_READONLY.
2363         (reduce_template_parm_level): Likewise.
2364         (process_template_parm): Likewise.
2365         (check_explicit_specialization): Adjust instantiate_template call.
2366         (convert_template_argument): Don't check non-type argument here.
2367         (lookup_template_class): Check them here.
2368         (tsubst_friend_function): Adjust instantiate_template call.
2369         (instantiate_template): Add tsubst_flags parameter, use it. Check
2370         instantiated args.
2372 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
2374         * decl.c: Update calls to shadow_warning.
2376 2003-03-21  Nathan Sidwell  <nathan@codesourcery.com>
2378         PR c++/9898
2379         * error.c (dump_decl) [CONST_DECL]: Print '<enumerator>'.
2380         (dump_expr) [CONSTRUCTOR]: Print default ctor as a function call.
2382 2003-03-20  Mark Mitchell  <mark@codesourcery.com>
2384         * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
2385         friends.
2386         * cp/pt.c (instantiate_class_template): Fix formatting.
2388 2003-03-14  Matt Austern  <austern@apple.com>
2390         * cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
2391         (unemitted_tinfo_decl_p): Remove.
2392         (emit_tinfo_decl): Change declaration to remove unused parameter.
2393         * decl2.c (finish_file): Change tinfo emission to loop through
2394         unemitted_tinfo_decls array instead of looping through all decls.
2395         * rtti.c (unemitted_tinfo_decl_p): Declare as static, remove
2396         unused second parameter.
2397         (init_rtti_processing): initialize unemitted_tinfo_decls varray.
2398         (get_tinfo_decls): push new tinfo decl on unemitted_tinfo_decls.
2399         (emit_tinfo_decl): remove unused second parameter, add assertion
2400         that decl hasn't already been emitted.
2402 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
2404         * dump.c (cp_dump_tree), cp-tree.h (cp_dump_tree): Change return
2405         type from 'int' to 'bool'. Replace 0 and 1 with true and false in
2406         return statements.
2408 2003-03-19  Jason Merrill  <jason@redhat.com>
2410         PR c++/8316, c++/9315, c++/10136
2411         * call.c (print_z_candidate): Split out from...
2412         (print_z_candidiates): ...here.
2413         (joust): Use it.
2415 2003-03-17  Roger Sayle  <roger@eyesopen.com>
2417         PR c++/10031
2418         * decl.c (duplicate_decls): Use the new type when prototyping
2419         anticipated decls, even when the types match.  This defines the
2420         exception list for the built-in function.
2422 2003-03-17  Jason Merrill  <jason@redhat.com>
2424         PR c++/10091
2425         * typeck.c (build_class_member_access_expr): Compare
2426         TYPE_MAIN_VARIANTs.
2428 2003-03-17  Mark Mitchell  <mark@codesourcery.com>
2430         PR c++/9639
2431         * parser.c (cp_parser_declarator_id): Clear parser->scope.
2433 2003-03-16  Jason Merrill  <jason@redhat.com>
2435         PR c++/9993
2436         * decl.c (finish_function): Only allow the NRVO to use variables
2437         declared at function scope.
2439 2003-03-17  Andreas Jaeger  <aj@suse.de>
2441         * Make-lang.in (cp/TAGS): Remove.
2443 2003-03-16  Nathan Sidwell  <nathan@codesourcery.com>
2445         PR c++/9629
2446         * cp-tree.h (struct language_function): Add in_base_initializer.
2447         (in_base_initializer): define it.
2448         (expand_member_init): Remove INIT param.
2449         * init.c (expand_member_init): Remove INIT param, return the member.
2450         (emit_mem_initializers): Set in_base_initializer.
2451         * class.c (build_base_path): Check in_base_initializer.
2452         * parser.c (cp_parser_mem_initializer): Set in_base_initializer.
2453         * pt.c (tsubst_initializer_list): Likewise.
2455 2003-03-16   Gabriel Dos Reis <gdr@integrable-solutions.net>
2457         * decl.c (binding_for_name): Fix initialization thinko.
2459 2003-03-15  Gabriel Dos Reis <gdr@integrable-solutions.net>
2461         Compile-time improvement: 2/n.
2462         * cp-tree.h (struct cxx_binding): New datatype;
2463         (struct lang_identifier): Use it.
2464         (LOCAL_BINDING_P): Adjust definition.
2465         (INHERITED_VALUE_BINDING_P): Likewise.
2466         (BINDING_SCOPE): Likewise.
2467         (BINDING_HAS_LEVEL_P): Likewise.
2468         (BINDING_VALUE): Likewise.
2469         (BINDING_TYPE): Likewise.
2470         (IDENTIFIER_VALUE): Likewise.
2471         (struct tree_binding): Remove.
2472         (TS_CP_BINDING): Likewise.
2473         ((union lang_tree_node): Remove field "binding".
2474         (cxx_binding_clear): New macro.
2475         (binding_for_name): Adjust return type.
2476         (qualified_lookup_using_namespace): Adjust prototype.
2477         (lookup_using_namespace): Adjust prototype.
2478         (cxx_scope_find_binding_for_name): Declare.
2479         * cp-tree.def: Remove CPLUS_BINDING definition.
2480         * decl.c (push_binding): Adjust local variable type.
2481         (add_binding): Likewise.
2482         (push_class_binding): Likewise.
2483         (pop_binding): Likewise.
2484         (poplevel): Likewise.
2485         (poplevel_class): Likewise.
2486         (free_bindings):  Adjust type.
2487         (find_binding): Adjust return type, add a third parameter. Remove
2488         non-useful assertion now that we use static typing.
2489         (cxx_scope_find_binding_for_name): New function.
2490         (binding_for_name): Use it.  Adjust local variable type. Simplify.
2491         (namespace_binding):  Simplify.
2492         (set_namespace_binding): Likewise.
2493         (set_identifier_type_value_with_scope): Adjust local variable type.
2494         (lookup_tag): Don't type-abuse of local variable 'old'.
2495         (lookup_namespace_name): Likewise.  Allocate binding on stack.
2496         (select_decl): Adjust prototype.
2497         (unqualified_namespace_lookup):  Allocate binding on stack.
2498         Don't type-abuse of local variable 'val'.
2499         (lookup_name_real): Likewise.
2500         (maybe_inject_for_scope_var): Adjust local variable type.
2501         (cp_tree_node_structure): Remove CPLUS_BINDING case label.
2502         (namespace_binding): Adjust logic, simplify.
2503         (BINDING_LEVEL): Adjust definition.
2504         (push_class_level_binding): Adjust local variable type.
2505         (struct cxx_saved_binding): Adjust field 'binding' type.
2506         * decl2.c (ambiguous_decl): Adjust prototype.
2507         (lookup_using_namespace): Adjust local variable type.
2508         (qualified_lookup_using_namespace): Catch type error and correct
2509         ensueing logic error.
2510         (do_nonmember_using_decl): Adjust local variable type.  Allocate
2511         temporary cxx_binding on stack.
2512         (do_toplevel_using_decl): Adjust local variable type.
2513         * ptree.c (cxx_print_cxx_binding): New function.
2514         (cxx_print_identifier): Use it.
2515         (cxx_print_xnode): Delete CPLUS_BINDING case label.
2517 2003-03-15  Roger Sayle  <roger@eyesopen.com>
2519         * tree.c (count_functions): Fix whitespace.
2521 2003-03-15  Neil Booth  <neil@daikokuya.co.uk>
2523         * Make-lang.in: Update.
2525 2003-03-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2527         PR c++/6440
2528         * pt.c (maybe_process_partial_specialization): Handle
2529         member class template when enclosing class template is
2530         explicit specialized.
2531         (most_general_template): Stop looking when DECL is already
2532         specialized.
2534 2003-03-13  Jason Merrill  <jason@redhat.com>
2536         PR c++/9420
2537         * search.c (lookup_conversions): Call complete_type here.
2538         * call.c (implicit_conversion): Not here.
2540 2003-03-13  Mark Mitchell  <mark@codesourcery.com>
2542         * decl2.c (do_nonmember_using_decl): Correct handling of
2543         simultaneous type/non-type bindings.
2545         * call.c (initialize_reference): Remove bogus assertion.
2546         * decl.c (build_ptrmemfunc_type): Revert change of 2003-03-09.
2548 2003-03-12  Andrew Lewycky  <andrew@mxc.ca>
2550         PR c++/7050
2551         * expr.c (cxx_expand_expr): Return const0_rtx for throw
2552         expressions.
2554 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
2556         PR c++/9474
2557         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2558         to merge old and new declarations.
2560 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
2562         * g++.1: Remove.
2563         * Make-lang.in (c++.generated-manpages): Build cp/g++.1.
2564         (cp/g++.1): Build it from scratch in the build tree.
2565         (c++.install-man): Depend on it.  Install it from the build tree.
2566         (c++.mostlyclean): Clean it.
2568 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
2570         PR c++/9474
2571         * decl2.c (do_nonmember_using_decl): Do not call duplicate decls
2572         to merge old and new declarations.
2574         PR c++/9924
2575         * decl2.c (do_nonmember_using_decl): Ignore anticipated builtins.
2577 2003-03-11  Jason Merrill  <jason@redhat.com>
2579         PR c++/9820
2580         * search.c (lookup_member): Fix handling of functions in a class
2581         being defined.
2583 2003-03-11  Mark Mitchell  <mark@codesourcery.com>
2585         PR c++/8700
2586         * call.c (convert_class_to_reference): Adjust usage of
2587         splice_viable.
2588         (any_viable): Remove.
2589         (splice_viable): Combine with any_viable.
2590         (print_z_candidates): Avoid printing duplicates.
2591         (build_user_type_conversion_1): Adjust usage of splice_viable.
2592         (build_new_function_call): Likewise.
2593         (build_operator_new_call): Likewise.
2594         (build_object_call): Likewise.
2595         (build_conditional_expr): Likewise.
2596         (build_new_op): Likewise.
2597         (build_new_method_call): Likewise.
2598         (joust): Remove spurious comment.
2599         * cp-tree.h (DECL_FRIENDLIST): Correct documentation.
2600         * decl2.c (arg_assoc_class): Simplify.
2601         * friend.c (add_friend): Likewise.
2603 2003-03-11  Jason Merrill  <jason@redhat.com>
2605         PR c++/8660
2606         * decl2.c (check_classfn): A member template only matches a
2607         member template.
2609 2003-03-11  Neil Booth  <neil@daikokuya.co.uk>
2611         * Make-lang.in (CXX_C_OBJS): Update.
2612         * lang-specs.h: Don't define __GNUG__ here.
2614 2003-03-10  Mark Mitchell  <mark@codesourcery.com>
2616         * call.c (perform_overload_resolution): New function.
2617         (build_new_function_call): Use it.
2618         (build_operator_new_call): Likewise.
2619         (add_candidates): Add explicit_targs and template_only parameters.
2620         (build_new_op): Adjust accordingly.
2621         * cp-tree.h (build_operator_new_call): New function.
2622         (build_function_call_real): Remove.
2623         (build_function_call_maybe): Likewise.
2624         * init.c (build_new_1): Use build_operator_new_call.
2625         * typeck.c (build_function_call_real): Rename to ...
2626         (build_function_call): ... this.
2628 2003-03-10  Devang Patel  <dpatel@apple.com>
2630         PR c++/9394
2631         * g++spec.c (lang_specific_driver): Use DEFAULT_WORD_SWTCH_TAKES_ARG.
2633 2003-03-10  Jason Merrill  <jason@redhat.com>
2635         PR c++/9798
2636         * decl.c (push_using_directive): Push before recursing.
2638         PR c++/9868, c++/9524
2639         * call.c (resolve_scoped_fn_name): Handle the case of a function
2640         pointer member.
2642         * decl2.c (build_offset_ref_call_from_tree): Only mess with 'this'
2643         argument in the pointer-to-member case.
2645 2003-03-09  Mark Mitchell  <mark@codesourcery.com>
2647         PR c++/9373
2648         * cp-lang.c (cxx_get_alias_set): Use alias set zero for
2649         pointers to member functions.
2651         PR c++/8534
2652         * decl.c (build_ptrmemfunc_type): Do not allow default arugments
2653         in pointer-to-member-function types.
2655 2003-03-10  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2657         * expr.c (cplus_expand_constant): Use C90 prototype style.
2658         (cxx_expand_expr): Likewise.
2660 2003-03-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2662         PR c++/9970
2663         * decl.c (duplicate_decls): Only copy DECL_THUNKS for virtual
2664         functions.
2666 2003-03-08  Geoffrey Keating  <geoffk@apple.com>
2668         * lang-specs.h (c++-header): Change .pch to .gch.
2670 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
2672         * cp-tree.h (cxx_init): Update prototype.
2673         * lex.c (cxx_init): Similarly.
2675 2003-03-08  Mark Mitchell  <mark@codesourcery.com>
2677         PR c++/9823
2678         * cp-tree.h (begin_mem_initializers): Remove.
2679         * parser.c (cp_parser_mem_initializer_list): Inline it here.
2680         Do not call finish_mem_initializers if not in a constructor.
2681         (cp_parser_class_head): Fix typo in error message.
2682         * semantics.c (begin_mem_initializers): Remove.
2683         * testsuite/g++.dg/parser/constructor1.C: New test.
2685         PR c++/9809
2686         * call.c (add_function_candidate): Skip builtin fuctions that have
2687         not yet been declared.
2689         PR c++/9982
2690         * init.c (build_new_1): Correct logic for determining whether or
2691         not to use an array cookie.
2693         PR c++/9524
2694         * parser.c (cp_parser_postfix_expression): Call
2695         finish_non_static_data_member, even when processing_template_decl.
2697         PR c++/9912
2698         * cp-tree.h (is_ancestor): New function.
2699         (handle_class_head): Change prototype.
2700         * decl2.c (is_namespace_ancestor): Rename to ...
2701         (namespace_anecestor): ... this.
2702         (set_decl_namespace): Adjust accordingly.
2703         (handle_class_head): Remove unncessary parameters.
2704         * parser.c (cp_parser_class_head): Check that
2705         nested-name-specifiers are used appropriately.
2707 2003-03-07  Mark Mitchell  <mark@codesourcery.com>
2709         * call.c (reference_binding): Remove REF_IS_VAR parameter.
2710         (implicit_conversion): Adjust call to reference_binding.
2711         (make_temporary_var_for_ref_to_type): Add TYPE parameter.
2712         (initialize_reference): Adjust handling for references bound to
2713         rvalues.
2714         * cp-tree.h (make_temporary_var_for_ref_to_temp): Change
2715         prototype.
2716         (real_non_cast_lvalue_p): New method.
2717         * cvt.c (build_up_reference): Adjust use of
2718         make_temporary_var_for_ref_to_temp.
2719         * tree.c (real_non_cast_lvalue_p): New method.
2721 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2723         * except.c (init_exception_processing): Use C90 prototype style.
2724         (cp_protect_cleanup_actions): Likewise.
2725         (prepare_eh_type): Likewise.
2726         (build_eh_type_type): Likewise.
2727         (build_exc_ptr): Likewise.
2728         (do_begin_catch): Likewise.
2729         (dtor_nothrow): Likewise.
2730         (do_end_catch): Likewise.
2731         (push_eh_cleanup): Likewise.
2732         (decl_is_java_type): Likewise.
2733         (choose_personality_routine): Likewise.
2734         (initialize_handler_parm): Likewise.
2735         (expand_start_catch_block): Likewise.
2736         (expand_end_catch_block): Likewise.
2737         (begin_eh_spec_block): Likewise.
2738         (finish_eh_spec_block): Likewise.
2739         (do_allocate_exception): Likewise.
2740         (do_free_exception): Likewise.
2741         (wrap_cleanups_r): Likewise.
2742         (stabilize_throw_expr): Likewise.
2743         (build_throw): Likewise.
2744         (complete_ptr_ref_or_void_ptr_p): Likewise.
2745         (is_admissible_throw_operand): Likewise.
2746         (nothrow_libfn_p): Likewise.
2747         (can_convert_eh): Likewise.
2748         (check_handlers_1): Likewise.
2749         (check_handlers): Likewise.
2751 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
2753         * call.c (merge_conversion_sequences): New function.
2754         (build_conv): Set ICS_USER_FLAG for USER_CONVs.
2755         (convert_class_to_reference): Correct handling of second
2756         standard conversion sequence in a user-defined conversion
2757         sequence.
2758         (build_user_type_conversion_1): Use merge_conversion_sequences.
2759         * cp-tree.def: Add comments for CONV nodes.
2760         * rtti.c (get_tinfo_decl): Use build_address/build_nop.
2762 2003-03-07  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2764         * error.c (init_error): Use C90 prototype style.
2765         (dump_scope): Likewise.
2766         (dump_qualifiers): Likewise.
2767         (dump_template_argument): Likewise.
2768         (dump_template_argument_list): Likewise.
2769         (dump_template_parameter): Likewise.
2770         (dump_template_bindings): Likewise.
2771         (dump_type): Likewise.
2772         (dump_typename): Likewise.
2773         (class_key_or_enum): Likewise.
2774         (dump_aggr_type): Likewise.
2775         (dump_type_prefix): Likewise.
2776         (dump_type_suffix): Likewise.
2777         (dump_global_iord): Likewise.
2778         (dump_simple_decl): Likewise.
2779         (dump_decl): Likewise.
2780         (dump_template_decl): Likewise.
2781         (dump_function_decl): Likewise.
2782         (dump_parameters): Likewise.
2783         (dump_exception_spec): Likewise.
2784         (dump_function_name): Likewise.
2785         (dump_template_parms): Likewise.
2786         (dump_char): Likewise.
2787         (dump_expr_list): Likewise.
2788         (dump_expr): Likewise.
2789         (dump_binary_op): Likewise.
2790         (dump_unary_op): Likewise.
2791         (type_as_string): Likewise.
2792         (expr_as_string): Likewise.
2793         (decl_as_string): Likewise.
2794         (context_as_string): Likewise.
2795         (lang_decl_name): Likewise.
2796         (cp_file_of): Likewise.
2797         (cp_line_of): Likewise.
2798         (decl_to_string): Likewise.
2799         (expr_to_string): Likewise.
2800         (fndecl_to_string): Likewise.
2801         (code_to_string): Likewise.
2802         (language_to_string): Likewise.
2803         (parm_to_string): Likewise.
2804         (op_to_string): Likewise.
2805         (type_to_string): Likewise.
2806         (assop_to_string): Likewise.
2807         (args_to_string): Likewise.
2808         (cv_to_string): Likewise.
2809         (cxx_print_error_function): Likewise.
2810         (cp_diagnostic_starter): Likewise.
2811         (cp_diagnostic_finalizer): Likewise.
2812         (cp_print_error_function): Likewise.
2813         (function_category): Likewise.
2814         (print_instantiation_full_context): Likewise.
2815         (print_instantiation_partial_context): Likewise.
2816         (maybe_print_instantiation_context): Likewise.
2817         (print_instantiation_context): Likewise.
2818         (cp_printer): Likewise.
2819         (print_integer): Likewise.
2820         (print_non_consecutive_character): Likewise.
2821         (locate_error): Likewise.
2823 2003-03-06  Mark Mitchell  <mark@codesourcery.com>
2825         PR c++/9965
2826         * call.c (reference_binding): Add ref_is_var parameter.
2827         (implicit_conversion): Adjust call to reference_binding.
2828         (initialize_reference): Likewise.
2830         PR c++/9400
2831         * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
2832         PARM_DECLs.
2834         PR c++/9791
2835         * class.c (get_basefndecls): Use lookup_fnfields_1.
2837 2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2839         PR c++/9188
2840         * parser.c (cp_parser_type_parameter): Remove redundant `expect'
2841         in error message.
2842         (cp_parser_single_declaration): Likewise.
2844 2003-03-05  Jason Merrill  <jason@redhat.com>
2846         PR c++/9440
2847         * call.c (build_conditional_expr): Use convert rather than an
2848         explicit NOP_EXPR.
2850 2003-03-02  Matt Austern  <austern@apple.com>
2852         * decl.c (cp_binding_level): Add static_decls varray member.
2853         (add_decl_to_level): Add static/inline namespace scope
2854         declarations to static_decls array.
2855         (wrapup_global_for_namespace): Pass static_decls only, instead of
2856         all decls, to wrapup_global_declarations/check_global_declarations.
2857         (push_namespace): Initialize static_decls for ordinary namespaces.
2858         (cxx_init_decl_processing): Initialize static_decls for global
2859         namespace.
2861 2003-03-05  Mark Mitchell  <mark@codesourcery.com>
2863         * class.c (end_of_class): Correct thinko.
2865 2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
2867         * config-lang.in: Replace ${libstdcxx_version} by its value.
2869 2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
2871         * cp-tree.h (cxx_saved_binding): Declare.
2872         (struct saved_scope): Adjust type of field 'old_binding'.
2873         * decl.c (cxx_saved_binding_make): New macro.
2874         (struct cxx_saved_binding): Define.
2875         (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
2876         C++ bindings.
2877         (maybe_push_to_top_level): Adjust local variable type.
2878         (pop_from_top_level): Likewise.
2880 2003-03-04  Tom Tromey  <tromey@redhat.com>
2882         * Make-lang.in (c++.tags): New target.
2884 2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
2886         * Make-lang.in: Update.
2888 2003-03-03  Jason Merrill  <jason@redhat.com>
2890         * decl.c (finish_enum): Do set the type in a template. Simplify.
2891         * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
2893 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
2895         PR c++/9878
2896         * call.c (convert_class_to_reference): Correct conversion
2897         sequences.
2898         (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
2899         (implicit_conversion): Adjust call to reference_binding.
2900         (add_candidate): Change type of candidates parameter.
2901         (add_function_candidate): Likewise.
2902         (add_conv_candidate): Likewise.
2903         (build_builtin_candidate): Likewise.
2904         (add_builtin_candidate): Likewise.
2905         (add_builtin_candidates): Likewise.
2906         (add_template_candidate_real): Likewise.
2907         (add_template_candidate): Likewise.
2908         (add_template_conv_candidate): Likewise.
2909         (build_user_type_conversion_1): Adjust accordingly.
2910         (build_object_call): Likewise.
2911         (build_conditional_expr): Likewise.
2912         (add_candidates): Likewise.
2913         (build_new_op): Likewise.
2914         (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
2915         (build_new_method_call): Adjust calls to add_function_candidate.
2916         (make_temporary_var_for_ref_to_temp): New function.
2917         (initialize_reference): Add decl parameter.
2918         * class.c (build_rtti_vtbl_entries): Use build_address and
2919         build_nop.
2920         * cp-tree.h (initialize_reference): Change prototype.
2921         (make_temporary_var_for_ref_to_temp): New function.
2922         (build_type_conversion): Change prototype.
2923         (build_address): New function.
2924         (build_nop): Likewise.
2925         * cvt.c (cp_convert_to_pointer): Adjust call to
2926         build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
2927         Use build_nop.
2928         (convert_to_pointer_force): Use build_nop.
2929         (build_up_reference): Use make_temporary_var_for_ref_to_temp.
2930         (convert_to_reference): Adjust call to build_type_conversion.
2931         (ocp_convert): Likewise.
2932         (build_type_conversion): Remove for_sure parameter.
2933         * decl.c (grok_reference_init): Use initialize_reference.
2934         * typeck.c (build_address): New function.
2935         (build_nop): Likewise.
2936         (build_unary_op): Use them.
2937         (build_ptrmemfunc): Tidy slightly.
2938         (convert_for_initialization): Adjust call to
2939         initialize_reference.
2940         * typeck2.c (store_init_value): Remove #if 0'd code.
2942 2003-03-03  Jason Merrill  <jason@redhat.com>
2944         * decl.c (start_function): Clear DECL_NUM_STMTS.
2946         * class.c (get_vtable_decl): Use vtbl_type_node.
2947         (build_primary_vtable): Check for it.
2949 2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
2951         * decl.c (check_initializer): Check for vector_opaque_p.
2953 2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
2955         * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
2956           invoke an external cpp during compilation.
2958 2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2960         * decl.c (duplicate_decls): Convert use of warning_with_decl() to
2961         that of warning().
2962         (start_decl): Likewise.
2963         (start_function): Likewise.
2965 2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
2967         * Make-lang.in (CXX_C_OBJS): Update.
2969 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
2971         PR c++/9892
2972         * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
2973         instantiating it.
2975 2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
2977         * parser.c (cp_parser_init_declarator): Revert opaque
2978         vector_opaque_p change.
2979         Do not include target.h.
2981 2003-02-28  Mark Mitchell  <mark@codesourcery.com>
2983         PR c++/9879
2984         * cp-tree.h (build_zero_init): Add parameter.
2985         * decl.c (cp_finish_decl): Adjust call.
2986         * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
2987         calls.
2988         (build_default_init): Add nelts parameter.  Adjust calls to
2989         build_zero_init.
2990         (build_new_1): Adjust call to build_default_init.
2991         * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
2993 2003-02-26  Devang Patel  <dpatel@apple.com>
2995         * decl.c (finish_enum): Merge two 'for' loops. Copy value node if
2996         required.  Postpone enum setting for template decls.
2997         (build_enumerator): Delay copying value node until finish_enum
2998         (). Remove #if 0'ed code.
2999         * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
3000         (tsubst_copy): Add check for enum type.
3002 2003-02-25  Mark Mitchell  <mark@codesourcery.com>
3004         PR c++/9683
3005         * decl2.c (prune_vars_needing_no_initialization): Do not throw
3006         away initializations for DECL_EXTERNAL VAR_DECLs.
3007         (finish_file): Adjust accordingly.
3008         * pt.c (instantiate_decl): Do not defer VAR_DECLs.
3010 2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
3012         * decl.c (add_binding): Time TV_NAME_LOOKUP.
3013         (push_class_binding): Likewise.
3014         (set_namespace_binding): Likewise.
3016 2003-02-24  Mark Mitchell  <mark@codesourcery.com>
3018         PR c++/9836
3019         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
3020         specializations back to the main template.
3021         * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
3022         * pt.c (resolve_typename_type): Likewise.
3024 2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
3026         PR c++/9778
3027         * pt.c (tsubst_copy_and_build): For a templated function inside a
3028         scope, process template arguments.
3030 2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3032         PR c++/9602
3033         * typeck2.c (abstract_virtuals_error): Don't check when
3034         TYPE is still template parameter dependent.
3036 2003-02-23  Mark Mitchell  <mark@codesourcery.com>
3038         PR c++/5333
3039         * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
3040         * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
3041         * pt.c (instantiate_class_template): Don't try to instantiate
3042         dependent types.
3043         (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
3045 2003-02-21  Mark Mitchell  <mark@codesourcery.com>
3047         PR c++/9749
3048         * decl.c (grokdeclarator): Do not allow parameters with variably
3049         modified types.
3051 2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
3053         * search.c (grow_bfs_bases): Remove. Fold into ...
3054         (bfs_walk): ... here, fix fencepost error. Fix merge lossage
3055         in previous patch.
3057 2003-02-20  Mark Mitchell  <mark@codesourcery.com>
3059         PR c++/9729
3060         * mangle.c (mangle_conv_op_name_for_type): Issue an error message
3061         when the G++ 3.2 ABI prevents correct compilation.
3063 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
3065         Change base class access representation. Share virtual base
3066         binfos.
3067         * cp/call.c (build_special_member_call): Remove binfo_for_vbase
3068         call.
3069         * cp/class.c (build_base_path): Likewise.
3070         (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
3071         (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
3072         (make_new_vtable): Adjust.
3073         (force_canonical_binfo_r): Delete.
3074         (force_canonical_binfo): Delete.
3075         (mark_primary_virtual_base): Delete.
3076         (dfs_unshared_virtual_bases): Delete.
3077         (mark_primary_bases): Adjust.
3078         (maybe_warn_about_overly_private_class): Adjust.
3079         (dfs_base_derived_from): Delete.
3080         (base_derived_from): Follow the inheritance chain.
3081         (struct find_final_overrider_data): Add vpath member.
3082         (dfs_find_final_overrider): Adjust.
3083         (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
3084         (find_final_overrider): Adjust.
3085         (update_vtable_entry_for_fn): Adjust.
3086         (modify_all_vtables): Adjust.
3087         (walk_subobject_offsets): Adjust.
3088         (layout_nonempty_base_or_field): Adjust.
3089         (layout_empty_base): Remove last parameter. Adjust.
3090         (build_base_field): Adjust.
3091         (build_base_fields): Adjust.
3092         (propagate_binfo_offsets): Remove last parameter. Adjust.
3093         (dfs_set_offset_for_unshared_vbases): Delete.
3094         (layout_virtual_bases): Adjust.
3095         (finish_struct_1): Adjust.
3096         (init_class_processing): Don't init access nodes.
3097         (dfs_get_primary_binfo): Delete.
3098         (get_primary_binfo): Adjust.
3099         (dump_class_hierarchy_r): Remove most derived arg, add IGO
3100         parameter. Adjust.
3101         (dump_class_hierarchy): Adjust.
3102         (finish_vtbls): Adjust.
3103         (get_original_base): Delete.
3104         (build_vtt_inits): Adjust.
3105         (dfs_build_secondary_vptr_vtt_inits): Adjust.
3106         (dfs_ctor_vtable_bases_queue_p): Adjust.
3107         (build_ctor_vtbl_group): Adjust.
3108         (dfs_accumulate_vtbl_inits): Adjust.
3109         (build_vtbl_initializer): Adjust.
3110         (build_vbase_offset_vtbl_entries): Adjust.
3111         (add_vcall_offset_vtbl_entries_1): Adjust.
3112         * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
3113         (access_*_node): Remove.
3114         (CANONICAL_BINFO): Delete.
3115         (BINFO_UNSHARED_MARKED): Remove.
3116         (BINFO_MARKED): Set LANG_FLAG_0 directly.
3117         (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
3118         (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
3119         (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
3120         Delete.
3121         (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
3122         (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
3123         (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
3124         Delete.
3125         (BINFO_DEPENDENT_BASE_P): New.
3126         (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
3127         index.
3128         (markedp, unmarkedp): Adjust.
3129         (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
3130         dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
3131         find_vbase_instance, binfo_for_vbase): Delete.
3132         (copied_binfo, original_binfo): Declare.
3133         (finish_base_specifier): Add virtual_p arg.
3134         (unshare_base_binfos): Delete.
3135         (copy_base_binfos): Declare.
3136         (reverse_path): Delete.
3137         * cp/decl.c (xref_basetypes): Access and virtuality passed
3138         differently. Don't copy direct base binfos here. Call
3139         copy_base_binfos.
3140         * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
3141         (initialize_vtbl_ptrs): Adjust.
3142         (expand_member_init): Adjust.
3143         * cp/parser.c (cp_parser_base_specifier): Adjust.
3144         * cp/pt.c (instantiate_class_template): Adjust.
3145         (get_template_base_recursive): Adjust.
3146         * cp/rtti.c (get_pseudo_ti_init): Adjust.
3147         (get_pseudo_ti_desc): Adjust.
3148         * cp/tree.c (unshare_base_binfos): Rename to ...
3149         (copy_base_binfos): ... here, reimplement.
3150         (make_binfo): Set BINFO_DEPENDENT_BASE_P.
3151         (reverse_path): Remove.
3152         * cp/typeck.c (get_delta_difference): Adjust error messages.
3153         * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
3154         * cp/search.c (lookup_base_r): Adjust.
3155         (dynamic_cast_base_recurse): Adjust.
3156         (canonical_binfo): Remove.
3157         (dfs_canonical_queue): Remove.
3158         (dfs_assert_unmarked_p): Remove.
3159         (assert_canonical_unmarked): Remove.
3160         (shared_marked_p, shared_unmarked_p): Remove.
3161         (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
3162         (dfs_access_in_type): Adjust.
3163         (access_in_type): Adjust.
3164         (dfs_accessible_queue_p): Adjust.
3165         (dfs_accessible_p): Adjust.
3166         (is_subobject_of_p_1, is_subobject_of_p): Remove.
3167         (struct lookup_field_info): Remove from_dep_base_p field.
3168         (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
3169         (lookup_field_r): Remove dependent base code.
3170         (lookup_member): Likewise.
3171         (dfs_walk, dfs_walk_real): Add access arg to queue fn.
3172         (dfs_unmarked_real_bases_queue_p): Remove.
3173         (dfs_marked_real_bases_queue_p): Remove.
3174         (dfs_skip_vbases): Remove.
3175         (dfs_get_pure_virtuals): Adjust.
3176         (markedp, unmarkedp): Adjust.
3177         (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
3178         (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
3179         (dfs_unmark): Adjust.
3180         (dfs_get_vbase_types):Remove.
3181         (dfs_build_inheritance_graph_order): Remove.
3182         (get_vbase_types): Remove
3183         (dfs_find_vbase_instance): Remove.
3184         (find_vbase_instance): Remove.
3185         (dfs_debug_unmarkedp): Adjust.
3186         (dependent_base_p): Remove.
3187         (dfs_push_type_decls): Adjust.
3188         (dfs_push_decls): Adjust.
3189         (dfs_no_overlap_yet): Adjust.
3190         (copied_binfo): New function.
3191         (original_binfo): New function.
3192         (binfo_for_vbase): Remove.
3194 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
3196         * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
3197         (bfs_walk): Rewritten using circular queue of BINFO_BASETYPES
3198         vectors, for speed.
3200 2003-02-18  Mark Mitchell  <mark@codesourcery.com>
3202         PR c++/9704
3203         * class.c (layout_class_type): In the 3.2 ABI, take into account
3204         trailing bit fields when computing CLASSTYPE_SIZE_UNIT.
3206 2003-02-18  Matt Austern <austern@apple.com>
3208         * cp/cp-lang.c: Change lang hooks so that final_write_globals does
3209         nothing for C++.
3210         * cp/decl.c (wrapup_globals_for_namespace): Remove special
3211         handling of global namespace.
3213 2003-02-18  Geoffrey Keating  <geoffk@apple.com>
3215         * cp-tree.h (rid_to_yy): Delete.
3216         (C_RID_YYCODE): Delete.
3217         (finish_file): Delete redundant declaration.
3219 2003-02-18  Jason Merrill  <jason@redhat.com>
3221         PR c++/9623
3222         * decl.c (reshape_init): Don't mess with initializer labels.
3224         PR c++/9485
3225         * parser.c (cp_parser_postfix_expression): Set idk properly for
3226         object->scope::member.
3228 2003-02-18  Ben Elliston  <bje@redhat.com>
3230         PR other/7350
3231         * decl.c (duplicate_decls): Fix typo in comment.
3233 2003-02-17  Michael Elizabeth Chastain <mec@shout.net>
3235         PR debug/9717
3236         * class.c (build_base_field): Mark fields for base classes with
3237         DECL_IGNORED_P.
3239 2003-02-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3241         PR c++/9457
3242         * pt.c (tsubst_copy_and_build) [CONSTRUCTOR]: Substitute
3243         CONSTRUCTOR_ELTS only once.
3245 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3247         PR c++/9459
3248         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
3249         (dump_type_suffix): Likewise.
3251 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
3253         * search.c: ANSIfy function declarations and definitions.
3254         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
3255         * call.c (build_method_call, resolve_scoped_fn_name,
3256         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
3257         calls.
3258         * class.c (handle_using_decl): Likewise.
3259         * decl.c (make_typename_type, make_unmound_class_template,
3260         start_decl, compute_array_index_type): Likewise.
3261         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
3262         * init.c (expand_member_init, build_member_call): Likewise.
3263         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
3264         resolve_typename_type): Likewise.
3265         * typeck.c (lookup_destructor, finish_class_member_access_exprm
3266         build_prememfunc_access_expr): Likewise.
3268 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
3270         * decl2.c: Include "timevar.h".
3271         (namespace_ancestor): Time name lookup.
3272         (add_using_namespace): Likewise.
3273         (lookup_using_namespace): Likewise.
3274         (qualified_lookup_using_namespace): Likewise.
3275         (decl_namespace): Likewise.
3276         (lookup_arg_dependent): Likewise.
3277         * lex.c (do_identifier): Likewise.
3278         (do_scoped_id): Likewise.
3279         * pt.c (lookup_template_class): Likewise.
3281 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
3283         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
3285 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
3287         * decl.c: Include "timevar.h".
3288         (poplevel): Time name lookup.
3289         (find_binding): Likewise.
3290         (push_namespace): Likewise.
3291         (pop_nested_namespace): Likewise.
3292         (store_bindings): Likewise.
3293         (maybe_push_to_top_level): Likewise.
3294         (pop_from_top_level): Likewise.
3295         (push_local_name): Likewise.
3296         (pushtag): Likewise.
3297         (pushdecl): Likewise.
3298         (pushdecl_with_scope): Likewise.
3299         (pushdecl_namespace_level): Likewise.
3300         (pushdecl_top_level): Likewise.
3301         (pushdecl_class_level): Likewise.
3302         (push_class_level_binding): Likewise.
3303         (push_using_decl): Likewise.
3304         (push_using_directive): Likewise.
3305         (push_overloaded_decl): Likewise.
3306         (lookup_label): Likewise.
3307         (define_label): Likewise.
3308         (lookup_tag): Likewise.
3309         (lookup_tag_reverse): Likewise.
3310         (lookup_namespace_name): Likewise.
3311         (select_decl): Likewise.
3312         (unqualified_namespace_lookup): Likewise.
3313         (lookup_name_real): Likewise.
3314         (lookup_name_current_level): Likewise.
3315         (lookup_type_current_level): Likewise.
3316         (maybe_inject_for_scope_var): Likewise.
3317         (xref_tag): Likewise.
3319         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
3321 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
3323         * decl.c (build_enumerator):  Remove unneeded test.
3325 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
3327         * cp-tree.h (struct lang_type_header): Make all fields unsigned
3328         char.
3330 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
3332         PR c++/7129
3333         * call.c (z_candidate): Add args.
3334         (convert_class_to_reference): Set it.
3335         (implicit_conversion): Tidy.
3336         (add_candidate): Add args parameter.
3337         (add_function_candidate): Adjust call to add_candidate.
3338         (add_conv_candidate): Likewise.
3339         (build_builtin_candidate): Likewise.
3340         (build_user_type_conversion_1): Eliminate wasteful tree_cons
3341         usage.
3342         (build_new_function_call): Likewise.
3343         (build_object_call): Likewise.
3344         (add_candidates): New function.
3345         (build_new_op): Use it.
3346         (covert_like_real): Adjust call to build_over_call.
3347         (build_over_call): Remove args parameter.
3348         * operators.def: Add <?= and >?=.
3350 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
3352         * typeck.c (build_indirect_ref): Don't check flag_volatile.
3354 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3356         PR c++/8849
3357         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
3359 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
3361         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
3362         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
3363         (BINFO_LANG_ELTS): New #define.
3364         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
3366 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
3368         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
3370 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
3372         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
3373         for class types.
3374         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
3375         rather than TYPE_LANG_FLAG_0.
3376         (TYPE_BUILT_IN): Remove.
3377         (TYPE_DEPENDENT_P): New macro.
3378         (TYPE_DEPENDENT_P_VALID): Likewise.
3379         (lang_type_class): Add fields_readonly.
3380         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
3381         * pt.c (dependent_type_p_r): New function, split out from ...
3382         (dependent_type_p): ... here.  Memoize results.
3383         * search.c (dependent_base_p): Use dependent_type_p, not
3384         uses_template_parms.
3385         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
3386         for class types.
3388 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
3390         * call.c (build_field_call): Use build_new_op, not build_opfncall.
3391         (prep_operand): New function.
3392         (build_new_op): Use it.  Remove dead code.
3393         * class.c (pushclass): Change "modify" parameter type from int to
3394         bool.
3395         (currently_open_class): Use same_type_p, not pointer equality.
3396         (push_nested_class): Adjust calls to pushclass, remove modify
3397         parameter.
3398         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
3399         (pushclass): Change prototype.
3400         (push_nested_class): Likewise.
3401         (grokoptypename): Remove.
3402         (build_opfncall): Remove.
3403         (value_dependent_expression_p): Declare.
3404         (resolve_typename_type): Likewise.
3405         (resolve_typename_type_in_current_instantiation): Likewise.
3406         (enter_scope_of): Remove.
3407         (tsubst): Remove.
3408         (tsubst_expr): Likewise.
3409         (tsubst_copy): Likewise.
3410         (tsubst_copy_and_build): Likewise.
3411         * decl.c (warn_about_implicit_typename_lookup): Remove.
3412         (finish_case_label): Return error_mark_node for erroneous labels.
3413         (start_decl): Adjust calls to push_nested_class.
3414         (grokfndecl): Call push_scope/pop_scope around call to
3415         duplicate_decls.
3416         (grokdeclarator): Do not call tsubst.
3417         (start_function): Adjust calls to push_nested_class.
3418         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
3419         (check_classfn): Use push_scope/pop_scope around type comparisions.
3420         (grokoptypename): Remove.
3421         (push_sscope): Adjust call to push_nested_class.
3422         * error.c (dump_type): Show cv-qualification of typename types.
3423         * init.c (build_member_call): Use build_new_op, not
3424         build_opfncall.
3425         * method.c (build_opfncall): Remove.
3426         * parser.c (cp_parser): Add allow_non_constant_expression_p and
3427         non_constant_expression_p.
3428         (cp_parser_constant_expression): Adjust prototype.
3429         (cp_parser_resolve_typename_type): Remove.
3430         (cp_parser_non_constant_expression): New function.
3431         (cp_parser_non_constant_id_expression): Likewise.
3432         (cp_parser_new): Set allow_non_constant_expression_p and
3433         non_constant_expression_p.
3434         (cp_parser_primary_expression): Reject `this' and `va_arg' in
3435         constant-expressions.  Note that dependent names aren't really
3436         constant.
3437         (cp_parser_postfix_expression): Reject conversions to non-integral
3438         types in constant-expressions.  Neither are increments or
3439         decrements.
3440         (cp_parser_unary_expression): Reject increments and decrements in
3441         constant-expressions.
3442         (cp_parser_direct_new_declarator): Adjust call to
3443         cp_parser_constant_expression.
3444         (cp_parser_cast_expression): Reject conversions to non-integral
3445         types in constant-expressions.
3446         (cp_parser_assignment_expression): Rejects assignments in
3447         constant-expressions.
3448         (cp_parser_expression): Reject commas in constant-expressions.
3449         (cp_parser_labeled_statement): Adjust call to
3450         cp_parser_constant_expression.
3451         (cp_parser_direct_declarator): Simplify array bounds, even in
3452         templates, when they are non-dependent.  Use
3453         resolve_typename_type, not cp_parser_resolve_typename_type.
3454         (cp_parser_class_head): Use resolve_typename_type, not
3455         cp_parser_resolve_typename_type.
3456         (cp_parser_member_declaration): Adjust call to
3457         cp_parser_constant_expression.
3458         (cp_parser_constant_initializer): Likewise.
3459         (cp_parser_constructor_declarator): Use resolve_typename_type, not
3460         cp_parser_resolve_typename_type.
3461         (cp_parser_late_parsing_default_args): Adjust call to
3462         push_nested_class.
3463         * pt.c (tsubst): Give it internal linkage.
3464         (tsubst_expr): Likewise.
3465         (tsubst_copy): Likewise.
3466         (tsubst_copy_and_build): Likewise.
3467         (push_access_scope_real): Likewise.
3468         (tsubst_friend_class): Likewise.
3469         (instantiate_class_template): Adjust call to pushclass.
3470         (value_dependent_expression_p): Give it external linkage.
3471         Robustify.
3472         (resolve_typename_type): New function.
3473         * semantics.c (finish_call_expr): Use build_new_op, not
3474         build_opfncall.
3475         (begin_constructor_declarator): Remove.
3476         (begin_class_definition): Adjust call to pushclass.
3477         (enter_scope_of): Remove.
3478         * typeck.c (comptypes): Resolve typename types as appropriate.
3479         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
3480         (build_x_compound_expr): Likewise.
3481         (build_modify_expr): Likewise.
3482         (build_x_modify_expr): Likewise.
3483         * typeck2.c (build_x_arrow): Likewise.
3485 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
3487         * pt.c (last_pending_template) Declare GTY().
3489 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3491         PR c++/8591
3492         * parser.c (cp_parser_elaborated_type_specifier): Convert
3493         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
3494         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
3496 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
3498         PR c++/9437
3499         * pt.c (unify): Don't unify '*T' with 'U C::*'.
3501         PR c++/3902
3502         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
3503         inside a declarator.
3505 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
3507         * class.c (update_vtable_entry_for_fn): Add index parameter.
3508         Generate vcall thunk for covariant overriding from a virtual
3509         primary base.
3510         (dfs_modify_vtables): Adjust.
3512 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
3514         PR c++/9403
3515         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
3516         template keyword.
3517         (cp_parser_base_specifier): Look for and consume a
3518         TEMPLATE keyword. Replace switch with array index.
3520         PR c++/795
3521         * semantics.c (finish_non_static_data_member): Remember the
3522         field's type even in a template.
3524         PR c++/9415
3525         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
3526         already scoped.
3528         PR c++/8545
3529         * parser.c (cp_parser_cast_expression): Be more tentative.
3531 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3533         * cp-tree.h (flagged_type_tree_s): Remove.
3534         (check_for_new_type): Likewise.
3535         * typeck2.c (check_for_new_type): Likewise.
3537 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
3539         * dump.c: ANSIfy function declarations and definitions.
3541         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
3543 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
3545         PR c++/9354
3546         * init.c (build_new): Set the type of the new-expression, even
3547         when processing_templte_decl.
3549         PR c++/9216
3550         * parser.c (cp_parser_primary_expression): Improve error message
3551         for templates used in an expression context.
3553         PR c++/8696
3554         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
3555         parse when encountering "typedef".
3557 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
3559         * class.c, parser.c: ANSIfy function definitions and declarations.
3561 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
3563         PR c++/9328
3564         * error.c (dump_decl): For an OVERLOAD, just print the name of the
3565         function; it doesn't make sense to try to print its type.
3566         * semantics.c (finish_typeof): Issue errors about invalid uses.
3568         PR c++/9298
3569         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
3570         function.
3571         (cp_parser_expression_statement): Use it.
3572         (cp_parser_explicit_instantiation): Likewise.
3573         * pt.c (do_decl_instantiation): Improve error handling logic.
3575 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
3577         PR c++/9384
3578         * parser.c (cp_parser_using_declaration): Issue error messages
3579         about name resolution failures here.
3581         PR c++/9388
3582         * class.c (currently_open_derived_class): Use dependent_type_p.
3583         * cp-tree.h (dependent_type_p): New function.
3584         (dependent_template_arg_p): Likewise.
3585         (dependent_template_p): Likewise.
3586         (type_dependent_expression_p): Likewise.
3587         * parser.c (cp_parser_dependent_type_p): Remove.
3588         (cp_parser_value_dependent_type_p): Likewise.
3589         (cp_parser_type_dependent_expression_p): Likewise.
3590         (cp_parser_dependent_template_arg_p): Likewise.
3591         (cp_parser_dependent_template_id_p): Likewise.
3592         (cp_parser_dependent_template_p): Likewise.
3593         (cp_parser_diagnose_invalid_type_name): Replace
3594         cp_parser_dependent_type_p with dependent_type_p, etc.
3595         (cp_parser_primary_expresion): Likewise.
3596         (cp_parser_nested_name_specifier_opt): Likewise.
3597         (cp_parser_postfix_expression): Likewise.
3598         (cp_parser_unary_expression): Likewise.
3599         (cp_parser_template_name): Likewise.
3600         (cp_parser_class_name): Likewise.
3601         (cp_parser_lookup_name): Likewise.
3602         * pt.c (dependent_type_p): New function.
3603         (value_dependent_expression_p): Likewise.
3604         (type_dependent_expression_p): Likewise.
3605         (dependent_template_arg_p): Likewise.
3606         (dependent_template_id_p): Likewise.
3607         (dependent_template_p): Likewise.
3609         PR c++/9285
3610         PR c++/9294
3611         * parser.c (cp_parser_simple_declaration): Return quickly when
3612         encountering errors.
3614 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3616         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
3618 2003-01-17  Jason Merrill  <jason@redhat.com>
3620         PR c++/9167, c++/9358
3621         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
3623 2003-01-17  Jason Merrill  <jason@redhat.com>
3625         PR c++/9342
3626         * call.c (build_conditional_expr): Always do lvalue-rvalue
3627         conversion.
3629 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
3631         PR c++/9294
3632         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
3633         * cp-tree.h (BASELINK_BINFO): Adjust.
3634         (BASELINK_FUNCTIONS): Likewise.
3635         (BASELINK_ACCESS_BINFO): Likewise.
3636         (tree_baselink): New structure.
3637         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
3638         (lang_tree_node): Add baselink.
3639         * decl.c (cp_tree_node_structure): Add BASELINK case.
3640         * search.c (build_baselink): Adjust.
3641         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
3642         test from TREE_LIST case.
3644         PR c++/9272
3645         * parser.c (cp_parser_constructor_declarator_p): Do not assume
3646         that a constructor cannot be declared outside of its own class.
3648         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
3649         be resolved, neither can the qualified name.
3651         * rtti.c (get_pseudo_ti_desc): Fix thinko.
3653 2003-01-16  Jason Merrill  <jason@redhat.com>
3655         PR c++/8564
3656         * init.c (build_vec_init): Re-add maxindex parm.
3657         (perform_member_init, build_aggr_init): Pass it.
3658         (build_new_1): Pass it. Use an incomplete array type for full_type.
3659         * typeck.c (build_modify_expr): Pass it.
3660         * cp-tree.h: Adjust.
3662 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
3664         * cp-tree.h (tsubst_copy_and_build): New declaration.
3665         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
3666         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
3667         (tsubst_copy_and_build): New function.
3669 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
3671         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
3672         (PARTIAL_INSTANTIATION_P): Remove.
3673         (IMPLICIT_TYPENAME_P): Likewise.
3674         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
3675         (build_typename_type): Remove declaration.
3676         (parmlist_is_exprlist): Likewise.
3677         * decl.c (build_typename_type): Make it static, remove third
3678         parameter.
3679         (push_class_binding): Don't do implicit typename stuff.
3680         (make_typename_type): Likewise.
3681         (lookup_name_real): Likewise.
3682         (grokdeclarator): Don't try to convert declarations into
3683         initializations.  Don't do implicit typename stuff.
3684         (parmlist_is_exprlist): Remove.
3685         (xref_basetypes): Simplify.
3686         * decl2.c (grokfield): Don't try to convert declarations into
3687         initializations.
3688         (build_anon_union_vars): Do this while processing templates, too.
3689         (finish_anon_union): Likewise.
3690         * error.c (dump_type): Remove implicit typename handling.
3691         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
3692         (cp_parser_primary_expression): Correct handling of names not
3693         found by unqualified name lookup in templates.
3694         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
3695         of types when possible.
3696         (cp_parser_simple_declaration): Complain intelligently about some
3697         invalid declarations.
3698         (cp_parser_member_declaration): Likewise.
3699         (cp_parser_constructor_declarator_p): Don't check when we're in a
3700         function scope.
3701         * pt.c (instantiate_class_template): Remove
3702         PARTIAL_INSTANTIATION_P gunk.
3703         * search.c (lookup_field_r): Don't build implicit typenames.
3704         (marked_pushdecls_p): Don't enter dependent base types.
3705         (unmarked_pushdecls_p): Likewise.
3706         * semantics.c (begin_class_definition): Remove implicit typename
3707         stuff.
3709 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
3711         PR c++/9212
3712         * parser.c (cp_parser_direct_declarator): If accepting either
3713         abstract or named, the name must be an unqualified-id.
3715 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3717         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
3719 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3721         * decl2.c (check_classfn): Fix uninitialized warning.
3722         (build_anon_union_vars): Likewise.
3723         * pt.c (tsubst_copy): Likewise.
3725 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
3727         Further conform g++'s __vmi_class_type_info to the C++ ABI
3728         specification.
3729         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
3730         the specification.
3731         (class_hint_flags): Likewise.
3733 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3735         * config-lang.in: Add semantics.c to gtfiles.
3736         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
3737         (saved_scope): Likewise.
3738         (type_lookups): Remove.
3739         (deferred_access): New structure.
3740         (type_access_control): Remove.
3741         (save_type_access_control): Likewise.
3742         (reset_type_access_control): Likewise.
3743         (decl_type_access_control): Likewise.
3744         (push_deferring_access_checks): Declare.
3745         (resume_deferring_access_checks): Likewise.
3746         (stop_deferring_access_checks): Likewise.
3747         (pop_deferring_access_checks): Likewise.
3748         (get_deferred_access_checks): Likewise.
3749         (pop_to_parent_deferring_access_checks): Likewise.
3750         (perform_deferred_access_checks): Likewise.
3751         (perform_or_defer_access_check): Likewise.
3752         * decl.c (make_typename_type): Use perform_or_defer_access_check.
3753         (make_unbound_class_template): Likewise.
3754         (grokdeclarator): Don't call decl_type_access_control.
3755         * parser.c (cp_parser_context): Remove deferred_access_checks
3756         and deferring_access_checks_p fields.
3757         (cp_parser_context_new): Adjust.
3758         (cp_parser): Remove access_checks_lists.
3759         (cp_parser_defer_access_check): Remove.
3760         (cp_parser_start_deferring_access_checks): Remove.
3761         (cp_parser_stop_deferring_access_checks): Remove.
3762         (cp_parser_perform_deferred_access_checks): Remove.
3763         (cp_parser_nested_name_specifier_opt): Use new deferred access
3764         functions.
3765         (cp_parser_simple_declaration): Likewise.
3766         (cp_parser_template_id): Likewise.
3767         (cp_parser_function_definition): Likewise.
3768         (cp_parser_class_specifier): Likewise.
3769         (cp_parser_lookup_name): Likewise.
3770         (cp_parser_single_declaration): Likewise.
3771         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
3772         (cp_parser_parse_tentatively): Likewise.
3773         (cp_parser_parse_definitely): Likewise.
3774         (yyparse): Likewise.
3775         (cp_parser_init_declarator): Remove access_checks parameter.
3776         Use new deferred access functions.
3777         (cp_parser_function_definition_from_specifiers_and_declarator):
3778         Likewise.
3779         (cp_parser_class_head): Remove deferring_access_checks_p and
3780         saved_access_checks parameters.  Use new deferred access functions.
3781         (cp_parser_member_specification_opt): Don't call
3782         reset_type_access_control.
3783         * search.c (type_access_control): Remove.
3784         * semantics.c: Include "gt-cp-semantics.h".
3785         (deferred_type_access_control): Remove.
3786         (deferred_access_stack): New variable.
3787         (deferred_access_free_list): Likewise.
3788         (push_deferring_access_checks): New function.
3789         (resume_deferring_access_checks): Likewise.
3790         (stop_deferring_access_checks): Likewise.
3791         (pop_deferring_access_checks): Likewise.
3792         (get_deferred_access_checks): Likewise.
3793         (pop_to_parent_deferring_access_checks): Likewise.
3794         (perform_deferred_access_checks): New function, adapted from
3795         cp_parser_perform_deferred_access_checks.
3796         (perform_or_defer_access_check): New function, adapted from
3797         cp_parser_defer_access_check.
3798         (current_type_lookups): Remove.
3799         (deferred_type_access_control): Likewise.
3800         (decl_type_access_control): Likewise.
3801         (save_type_access_control): Likewise.
3802         (reset_type_access_control): Likewise.
3803         (begin_function_definition): Adjust.
3804         (begin_class_definiton): Likewise.
3806 2003-01-13  Jason Merrill  <jason@redhat.com>
3808         PR c++/8748
3809         * class.c (build_base_path): Take the address before calling save_expr.
3811         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
3812         all the ambiguous conversions are bad.
3814         * class.c (maybe_warn_about_overly_private_class): Don't stop
3815         searching when we find a nonprivate method.
3817         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
3819 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
3821         * cp-tree.h (get_arglist_len_in_bytes): Remove.
3823         PR c++/9264
3824         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
3825         typeame types more robustly.
3827 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
3829         * parser.c:  Fix comment typos.
3831 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
3833         PR c++/9099
3834         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
3835         an object_type which is not a class type.
3837 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
3839         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
3840         (cp_parser_late_parsing_default_args): Likewise.
3842 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
3844         * cfns.gperf: ANSIfy function declarations.
3845         * cfns.h: Regenerate.
3846         * cp-tree.h: ANSIfy function declarations.
3848 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
3850         * cp-tree.h (reparse_absdcl_as_expr): Remove.
3851         (reparse_absdcl_as_casts): Likewise.
3852         (reparse_decl_as_expr): Likewise.
3853         (finish_decl_parsing): Likewise.
3854         * decl2.c (reparse_absdcl_as_expr): Remove.
3855         (reparse_absdcl_as_casts): Likewise.
3856         (repase_decl_as_expr): Likewise.
3857         (finish_decl_parsing): Likewise.
3859         PR c++/9128
3860         PR c++/9153
3861         PR c++/9171
3862         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
3863         function.
3864         (cp_parser_nested_name_specifier_opt): Correct the
3865         check_dependency_p false.
3866         (cp_parser_postfix_expression): Fix formatting.
3867         (cp_parser_decl_specifier_seq): Avoid looking for constructor
3868         declarators when possible.
3869         (cp_parser_template_id): Avoid performing name-lookup when
3870         possible.
3871         (cp_parser_class_head): Do not count specializations when counting
3872         levels of templates.
3873         (cp_parser_constructor_declarator_p): Return immediately if
3874         there's no chance that the tokens form a constructor declarator.
3875         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
3876         expression with reference type.
3877         (get_tinfo_decl_dynamic): Do not return an expression with
3878         reference type.
3879         (build_typeid): Add comment.  Do not return an expression with
3880         reference type.
3881         * typeck.c (build_class_member_access_expr): Improve handling of
3882         conditionals and comma-expressions as objects.
3884 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
3886         * cfns.gperf: ANSIfy function declarations.
3887         * cfns.h: Regenerate.
3888         * cp-tree.h: ANSIfy function declarations.
3889         * parser.c: ANSIfy function declarations & definitions.
3891         * decl.c (bad_specifiers): Fix parameter order error I introduced.
3893 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
3895         Merge from pch-branch:
3897         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
3899         Merge to tag pch-merge-20030102:
3901         * semantics.c (finish_translation_unit): Don't call finish_file.
3902         * parser.c: Don't include ggc.h.
3903         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
3904         read first token here.  Don't allow PCH files after the first
3905         token is read.
3906         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
3907         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
3908         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
3909         (cp_parser_late_parsing_for_member): Don't duplicate call to
3910         cp_lexer_set_source_position_from_token.
3911         (cp_parser_late_parsing_default_args): Likewise.
3912         (yyparse): Call finish_file after clearing the_parser.
3914         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
3916         * Make-lang.in: Remove $(GGC_H) from all dependencies.
3917         (CXX_TREE_H): Add $(GGC_H).
3918         * class.c: Don't include ggc.h.
3919         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
3920         (method_name_cmp): Likewise.
3921         (resort_data): New variable.
3922         (resort_field_decl_cmp): New.
3923         (resort_method_name_cmp): New.
3924         (resort_sorted_fields): New.
3925         (resort_type_method_vec): New.
3926         (finish_struct_methods): Delete cast.
3927         (finish_struct_1): Delete cast.
3928         * cp-tree.h: Include ggc.h.
3929         (struct lang_type_class): Add reorder attribute to field `methods'.
3930         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
3931         (resort_sorted_fields): New prototype.
3932         (resort_type_method_vec): New prototype.
3933         * call.c: Don't include ggc.h.
3934         * decl.c: Likewise.
3935         * decl2.c: Likewise.
3936         * init.c: Likewise.
3937         * lex.c: Likewise.
3938         * method.c: Likewise.
3939         * optimize.c: Likewise.
3940         * parse.y: Likewise.
3941         * pt.c: Likewise.
3942         * repo.c: Likewise.
3943         * search.c: Likewise.
3944         * semantics.c: Likewise.
3945         * spew.c: Likewise.
3946         * tree.c: Likewise.
3948         * lang-specs.h: Remove comment.
3950         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
3952         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
3953         (operator_name_info): Mark to be saved for PCH, specify size.
3954         (assignment_operator_name_info): Likewise.
3956         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
3958         * decl.c (anon_cnt): Mark to be saved for PCH.
3960         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
3962         * lex.c  (init_reswords): Delete now-untrue comment.
3963         Allocate ridpointers using GGC.
3965         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
3967         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
3969         * g++spec.c (lang_specific_driver): Don't include standard
3970         libraries in `added'.
3972         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
3974         * decl2.c (finish_file): Call c_common_write_pch.
3975         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
3977         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
3979         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
3980         files when using g++.
3981         * lang-specs.h: Handle compiling C++ header files.
3983 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
3985         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
3987 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3989         * pt.c (push_access_scope_real): Call push_to_top_level for
3990         function in namespace scope.
3991         (pop_access_scope): Call pop_from_top_level for function in
3992         namespace scope.
3994 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
3996         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
3998 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
4000         * Make-lang.in (c++.install-common, c++.install-man,
4001         c++.uninstall): Prepend $(DESTDIR) to destination paths in
4002         all (un)installation commands.
4003         (c++.install-common): Rewrite $(LN) commands to support
4004         DESTDIR with "ln" as well as with "ln -s".
4006 2003-01-08  Jason Merrill  <jason@redhat.com>
4008         * parser.c (cp_parser_primary_expression): See through explicitly
4009         scoped ALIAS_DECLs, too.
4011 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
4013         * decl.c: Remove some #if 0 code.
4015         * decl.c: ANSIfy function declarations.
4017 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
4019         * parser.c (cp_parser_asm_definition): Correct handling of omitted
4020         operands.
4022 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4024         PR c++/9030
4025         * decl.c (make_typename_type): Check access only when tf_error.
4026         (make_unbound_class_template): Likewise.
4027         * pt.c (saved_access_scope): New variable.
4028         (push_access_scope_real): New function.
4029         (push_access_scope): Likewise.
4030         (pop_access_scope): Likewise.
4031         (tsubst_default_argument): Use them.
4032         (instantiate_template): Likewise.
4033         (regenerate_decl_from_template): Likewise.
4034         (instantiate_decl): Likewise.
4035         (get_mostly_instantiated_function_type): Likewise.
4037 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
4039         * tree.c: Delete bogus #if 0 code.
4041 2003-01-07  Andreas Schwab  <schwab@suse.de>
4043         * class.c (layout_class_type): Don't use
4044         PCC_BITFIELD_TYPE_MATTERS if not defined.
4046 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
4048         PR c++/9165
4049         * decl2.c (build_cleanup): Mark the object as used.
4051         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
4052         (hash_local_specialization): New function.
4053         (register_local_specialization): Revert 2003-01-05 change.
4054         (instantiate_decl): Use hash_local_specialization when creating
4055         the local_specializations table.
4057         * decl2.c (mark_used): Do not synthesize thunks.
4059         * class.c (layout_class_type): Correct handling of unnamed
4060         bitfields wider than their types.
4062         PR c++/9189
4063         * parser.c (cp_parser): Remove default_arg_types.  Update
4064         documentation for unparsed_functions_queues.
4065         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
4066         parameter.
4067         (cp_parser_new): Don't set parser->default_arg_types.
4068         (cp_parser_function_definition): Adjust usage of
4069         unparsed_funtions_queues.
4070         (cp_parser_class_specifier): Don't mess with
4071         parser->default_arg_types.  Handle default argument processing in
4072         a separate phase from function body processing.
4073         (cp_parser_template_declaration_after_export): Adjust usage of
4074         unparsed_functions_queues.
4075         (cp_parser_late_parsing_for_member): Do not handle default
4076         arguments.
4078 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
4080         PR c++/9109
4081         * parser.c (cp_parser_declarator_kind): New enum.
4082         (cp_parser_declarator): Adjust.
4083         (cp_parser_direct_declarator): Adjust. Allow for either named or
4084         abstract declarator. Prefer abstract, if possible. Allow
4085         parenthesized function name.
4086         (cp_parser_condition): Adjust cp_parser_declarator call.
4087         (cp_parser_explicit_instantiation): Likewise.
4088         (cp_parser_init_declarator): Likewise.
4089         (cp_parser_type_id): Likewise.
4090         (cp_parser_function_definition): Likewise.
4091         (cp_parser_member_declaration): Likewise.
4092         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
4093         the tentative parsing.
4094         (cp_parser_exception_declaration): Likewise.
4096 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
4098         * parser.c (cp_parser_template_parameter): Adjust call to
4099         cp_parser_parameter_declaration.
4100         (cp_parser_parameter_declaration_list): Likewise.
4101         (cp_parser_parameter_declaration): Replace
4102         greater_than_is_operator_p with template_parm_p parameter.  Do not
4103         cache tokens for template default arguments.
4105         * pt.c (retrieve_local_specialization): Use htab_find, not
4106         htab_find_with_hash.
4107         (register_local_specialization): Use htab_find_slot, not
4108         htab_find_slot_with_hash.
4109         (instantiate_decl): Pass a hash function to htab_create.
4111 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4113         * parser.c (cp_parser_binary_expression,
4114         cp_parser_multiplicative_expression,
4115         cp_parser_additive_expression, cp_parser_shift_expression,
4116         cp_parser_relational_expression, cp_parser_equality_expression,
4117         cp_parser_and_expression, cp_parser_exclusive_or_expression,
4118         cp_parser_inclusive_or_expression,
4119         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
4120         cp_parser_binary_expression): Const-ify.
4122 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
4124         * method.c (use_thunk): Disable access control while building the
4125         body of the thunk.
4127 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
4129         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C
4130         front end.
4132 2003-01-03  Matt Austern  <austern@apple.com>
4134         * cp-tree.h (struct lang_type_class): add field for key method
4135         (cp_global_trees): rename dynamic_classes to keyed_classes
4136         (key_method): add definition
4137         * class.c (finish_struct_1): compute class's key method, and add
4138         the class to keyed_classes list if there is no key method.
4139         * decl.c (finish_function): add class to keyed_classes list if we
4140         see a definition of the class's key method.
4141         * pt.c (instantiate_class_template): add template specialization
4142         of a dynamic class to keyed_classes list.
4143         * decl2.c (key_method): remove
4144         (finish_file): iterate only through keyed_classes list when
4145         deciding whether to emit vtables, remove class from its list after
4146         we do the emission.
4148 2003-01-02  Jason Merrill  <jason@redhat.com>
4150         * call.c (build_conditional_expr): Stabilize lvalues properly.
4151         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
4152         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
4153         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
4155         * call.c (convert_like_real): Call decl_constant_value for an
4156         IDENTITY_CONV even if there are no more conversions.
4158         * cvt.c (build_up_reference): Don't push unnamed temps.
4160         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
4162         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
4163         for a backend struct.
4165         * except.c (wrap_cleanups_r, build_throw): Make
4166         MUST_NOT_THROW_EXPRs void.
4167         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
4169         * init.c (build_vec_delete_1): Pre-evaluate the base address.
4171         * init.c (get_temp_regvar): Simplify logic.
4173         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
4174         our replacement is a decl.
4176         * decl.c (cp_make_fname_decl): Push the decls inside the
4177         outermost scope.
4179 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
4181         PR c++/45, c++/3784
4182         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
4183         the same too.
4185 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
4187         * parser.c (struct cp_parser): Add access_checks_lists field
4188         (cp_parser_simple_declaration): Use.
4189         (cp_parser_init_declarator): Likewise.
4191 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
4193         * parser.c (cp_parser_declaration): Accept the __extension__
4194         keyword before the declaration.
4196         PR c++/2843
4197         * parser.c (cp_parser_parameter_declaration): Allow attributes to
4198         appear after the declarator.
4200         * call.c (build_new_method_call): Fix typo in message format
4201         string.
4203 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
4205         * parser.c (cp_lexer_next_token_is): Declare it inline.
4206         (cp_lexer_set_source_position_from_token): Likewise.
4207         (cp_lexer_debugging_p): Likewise.
4208         (cp_parser_parsing_tentatively): Likewise.
4209         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
4210         to the cp_lexer_peek_token.
4212         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
4213         expression.
4215 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
4217         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
4218         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
4219         cp/repo.c: Fix copyright years.
4221 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
4223         * lex.c: Remove superfluous include of cpplib.h.
4224         (CONSTRAINT): Define without conditions.
4225         (init_cp_pragma): Use c_register_pragma.
4227 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
4229         * .cvsignore: Remove.
4231 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
4233         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
4234           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
4235           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
4236           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
4237           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
4238           copyright header.
4239         * lex.h: parse.y is dead, so don't mention it.  Also replace the
4240           copyright header with the default GNU copyright header.
4242 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4244         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
4245         (lookup_name_namespace_only): Likewise.
4246         (begin_only_namespace_names): Likewise.
4247         (end_only_namespace_names): Likewise.
4248         * decl.c (only_namespace_names): Remove.
4249         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
4250         (lookup_name_real): Do not check only_namespace_names.
4251         (lookup_name_namespace_only): Remove.
4252         (begin_only_namespace_names): Likewise.
4253         (end_only_namespace_names): Likewise.
4254         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
4255         nested-name-specifiers more gracefully.
4256         (cp_parser_class_or_namespace_name): Avoid looking up namespace
4257         names when they cannot possibly appear.
4258         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
4259         (cp_parser_elaborated_type_specifier): Likewise.
4260         (cp_parser_namespace_name): Only look for namespace names.
4261         (cp_parser_lookup_name): Add is_namespace parameter.
4262         (cp_parser_lookup_name_simple): Adjust call to
4263         cp_parser_lookup_name.
4265         * parser.c (cp_parser_dependent_type_p): Fix thinko.
4267 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
4269         * .cvsignore: Update.
4271 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
4273         * class.c (modify_vtable_entry): Remove unused variable.
4274         (get_vcall_index): Always expect a non-thunk.
4275         (update_vtable_entry_for_fn): Combine covariant adjustments, when
4276         overriding a thunk. Pass get_vcall_index a non-thunk.
4278         * decl2.c (finish_file): Mark undefined inlines as extern.
4280 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4282         * cp-tree.def (RETURN_INIT): Remove.
4283         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
4284         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
4285         (note_level_for_for): Remove.
4286         (note_level_for_try): Likewise.
4287         (note_level_for_catch): Likewise.
4288         (finish_named_return_value): Likewise.
4289         (do_pushlevel): Change prototype.
4290         (pending_lang_change): Remove.
4291         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
4292         sk_for.
4293         (note_level_for_for): Remove.
4294         (note_level_for_try): Likewise.
4295         (note_level_for_catch): Likewise.
4296         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
4297         * parser.c (cp_parser_context_free_list): Make it "deletable".
4298         (cp_parser_template_argument): Remove misleading comment.
4299         * pt.c (tsubst_expr): Remove RETURN_INIT code.
4300         * semantics.c (genrtl_named_return_value): Remove.
4301         (do_pushlevel): Take a scope kind as an argument.
4302         (begin_if_stmt): Adjust.
4303         (begin_while_stmt): Likewise.
4304         (begin_for_stmt): Likewise.
4305         (finish_for_init_stmt): Likewise.
4306         (begin_switch_stmt): Likewise.
4307         (begin_handler): Likewise.
4308         (begin_compound_stmt): Likewise.
4309         (finish_named_return_value): Remove.
4310         (cp_expand_stmt): Remove RETURN_INIT case.
4311         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
4313 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
4315         PR c++/9112
4316         * parser.c (cp_parser_direct_declarator): Handle erroneous
4317         parenthesized declarators correctly.
4319 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4321         * cp-tree.h (pending_lang_change): Declare.
4323 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
4325         * parser.c (cp_parser_context_free_list): New variable.
4326         (cp_parser_context_new): Use it.
4327         (cp_parser_error): Check return code from
4328         cp_parser_simulate_error.
4329         (cp_parser_simulate_error): Return a value.
4330         (cp_parser_id_expression): Optimize common case.
4331         (cp_parser_class_name): Likewise.
4332         (cp_parser_class_specifier): Adjust call to
4333         cp_parser_late_parsing_default_args.
4334         (cp_parser_lookup_name): Optimize common case.
4335         (cp_parser_late_parsing_for_member): Adjust call to
4336         cp_parser_late_parsing_default_args.
4337         (cp_parser_late_parsing_default_args): Add scope parameter.
4338         (cp_parser_require): Avoid creating the error message unless it's
4339         needed.
4340         (cp_parser_parse_definitely): Place free'd contexts on the free
4341         list.
4343         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
4345 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
4347         * parser.c (cp_parser_parameter_declaration_clause): Treat system
4348         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
4350 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
4352         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
4353         GCC, not GNU CC.
4355 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
4357         * parse.y: Remove.
4358         * spew.c: Likewise.
4359         * Make-lang.in (gt-cp-spew.h): Remove.
4360         * cp-tree.h (do_pending_lang_change): Remove.
4361         (do_identifier): Change prototype.
4362         (finish_id_expr): Remove.
4363         * decl.c (lookup_name_real): Remove yylex variable.
4364         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
4365         * lex.c (init_cpp_parse): Remove.
4366         (reduce_cmp): Likewise.
4367         (token_cmp): Likewise.
4368         (yychar): Likewise.
4369         (lastiddecl): Likewise.
4370         (token_count): Likewise.
4371         (reduce_count): Likewise.
4372         (yyhook): Likewise.
4373         (print_parse_statistics): Likewise.
4374         (do_pending_lang_change): Likewise.
4375         (do_identifier): Remove parsing parameter.
4376         * lex.h (lastiddecl): Remove.
4377         (looking_for_typename): Remove.
4378         (looking_for_template): Likewise.
4379         (pending_lang_change): Likewise.
4380         (yylex): Likewise.
4381         * semantics.c (finish_id_expr): Remove.
4383         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
4384         thread" correctly.
4386 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
4388         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
4389         end, not the C front end.
4391 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
4393         * cp-tree.h (THUNK_TARGET): New macro.
4394         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
4395         (finish_thunk): Remove offset parms.
4396         * class.c (find_final_overrider): Look through thunks.
4397         (get_vcall_index): Use THUNK_TARGET.
4398         (update_vtable_entry_for_fn): Look through thunks. Set covariant
4399         fixed offset here. Adjust finish_thunk call.
4400         (build_vtbl_initializer): Adjust finish_thunk calls.
4401         * mangle.c (mangle_call_offset): Remove superfluous if.
4402         (mangle_thunk): Adjust.
4403         * method.c (make_thunk): Adjust.
4404         (finish_thunk): Adjust.
4405         (thunk_adjust): Remove assert.
4406         (use_thunk): Use THUNK_TARGET
4407         * dump1.c (cp_dump_tree): Adjust thunk dumping.
4409         PR c++/9054
4410         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
4411         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
4413 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4415         Remove traditional C constructs 4/n.
4416         * decl2.c (grok_method_quals, warn_if_unknown_interface,
4417         grok_x_components, cp_build_parm_decl, build_artificial_parm,
4418         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
4419         delete_sanity, check_member_template, check_java_method,
4420         check_classfn, finish_static_data_member_decl, grokfield,
4421         grokbitfield, grokoptypename, grok_function_init,
4422         cplus_decl_attributes, constructor_name, defer_fn,
4423         build_anon_union_vars, finish_anon_union, coerce_new_type,
4424         coerce_delete_type, comdat_linkage, maybe_make_one_only,
4425         key_method, import_export_vtable, import_export_class,
4426         output_vtable_inherit, import_export_decl, import_export_tinfo,
4427         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
4428         set_guard, start_objects, finish_objects,
4429         start_static_storage_duration_function,
4430         finish_static_storage_duration_function, get_priority_info,
4431         start_static_initialization_or_destruction,
4432         finish_static_initialization_or_destruction,
4433         do_static_initialization, do_static_destruction,
4434         prune_vars_needing_no_initialization, write_out_vars,
4435         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
4436         add_using_namespace, merge_functions, ambiguous_decl,
4437         lookup_using_namespace, lookup_using_namespace,
4438         qualified_lookup_using_namespace, set_decl_namespace,
4439         decl_namespace, current_decl_namespace, push_decl_namespace,
4440         pop_decl_namespace, push_scope, pop_scope, add_function,
4441         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
4442         lookup_arg_dependent, do_namespace_alias,
4443         validate_nonmember_using_decl, do_nonmember_using_decl,
4444         do_toplevel_using_decl, do_local_using_decl,
4445         do_class_using_decl, do_using_directive, check_default_args,
4446         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
4447         * parser.c (cp_parser_class_head): Use booleanss.
4448         * decl.c (walk_globals, walk_vtables): Likewise.
4449         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
4450         walk_globals): Change return type from 'int' to 'bool'.
4451         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
4452         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
4453         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
4454         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
4455         qualifier_flags, tinfo_base_init, generic_initializer,
4456         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
4457         dfs_class_hint_unmark, class_hint_flags, class_initializer,
4458         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
4459         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
4460         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
4461         * repo.c (repo_compile_flags, repo_template_declared,
4462         repo_template_defined, repo_class_defined, repo_get_id,
4463         repo_template_used, repo_vtable_used, repo_inline_used,
4464         repo_tinfo_used, repo_template_instantiated, extract_string,
4465         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
4466         finish_repo): Likewise.
4467         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
4468         cxx_print_xnode): Likewise..
4469         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
4470         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4471         * cxxfilt.c (demangle_it, print_demangler_list, usage,
4472         standard_symbol_characters, hp_symbol_characters, main, fatal):
4473         Likewise.
4474         (strip_underscore):  Change type from 'int' to 'bool'.
4475         (main): Use boolean constants.
4477 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4479         Remove traditional C constructs 3/n.
4480         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
4481         build_up_reference, warn_ref_binding, convert_to_reference,
4482         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
4483         convert_to_void, convert, convert_force, build_type_conversion,
4484         build_expr_type_conversion, type_promotes_to,
4485         perform_qualification_conversions): Use C90 prototyping style.
4486         * decl2.c (grok_array_decl): Use boolean constant.
4487         (delete_sanity): Likewise.
4488         * typeck.c (build_unary_op): Likewise.
4489         * semantics.c (finish_switch_cond): Likewise.
4490         * parser.c (cp_parser_direct_new_declarator): Likewise.
4491         * init.c (build_new): Likewise.
4493 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
4495         * Make-lang.in (po-generated): Remove parse.c.
4496         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
4497         ($(srcdir)/cp/parse.h): Remove target.
4498         ($(srcdir)/cp/parse.c): Likewise.
4499         (gt-cp-parse.h): Likewise.
4500         (gt-cp-parser.h): New target.
4501         (c++.distclean): Do not remove parse.output.
4502         (c++.maintainer-clean): Do not remove parse.c or parse.h.
4503         (cp/spew.o): Remove target.
4504         (cp/lex.o): Adjust dependencies.
4505         (cp/pt.o): Likewise.
4506         (cp/parse.o): Likewise.
4507         (cp/TAGS): Do not mention parse.c.
4508         (cp/parser.o): New target.
4509         * NEWS: Mention the new parser.
4510         * call.c (build_scoped_method_call): Simplify.
4511         (build_method_call): Likewise.
4512         (build_new_function_call): Adjust calls to add_function_candidate
4513         and add_template_candidate.
4514         (build_new_op): Improve handling of erroroneous operands.
4515         (convert_default_arg): Remove circular argument processing.
4516         (name_as_c_string): New function.
4517         (build_new_method_call): Use it.
4518         (perform_implicit_conversion): Use error_operand_p.
4519         * class.c (finish_struct_anon): Use constructor_name_p.
4520         (check_field_decls): Likewise.
4521         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
4522         (resolve_address_of_overloaded_function): Likewise.
4523         (instantiate_type): Tweak pointer-to-member handling.
4524         (get_primary_binfo): Remove incorrect assertion.
4525         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
4526         * cp-tree.h (DEFARG_TOKENS): New macro.
4527         (default_arg): New structure.
4528         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
4529         (lang_tree_node): Add default_arg.
4530         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
4531         (type_info_ref_type): New macro.
4532         (saved_scope): Make processing_explicit_instantiation a boolean.
4533         (check_access): New field.
4534         (unparsed_text): Remove.
4535         (language_function): Remove unparsed_inlines.
4536         (error_operand_p): New macro.
4537         (lang_decl): Adjust pending_inline_info.
4538         (DEFARG_POINTER): Remove.
4539         (tag_types): Add typenames.
4540         (lookup_ualified_name): Declare.
4541         (lookup_name_real): Likewise.
4542         (shadow_tag): Adjust prototype.
4543         (get_scope_of_declarator): Declare it.
4544         (process_next_inline): Remove it.
4545         (check_for_missing_semicolon): Likewise.
4546         (maybe_get_template_decl_from_type_decl): Declare it.
4547         (finish_label_stmt): Adjust prototype.
4548         (finish_non_static_data_meber): Declare it.
4549         (finish_pseudo_destructor_call_expr): Rename to ...
4550         (finish_pseudo_destructor_expr): ... this.
4551         (finish_compound_literal): Declare it.
4552         (begin_inline_definitions): Remove it.
4553         (init_spew): Remove.
4554         (peekyylex): Likewise.
4555         (arbitrate_lookup): Likewise.
4556         (frob_opname): Likewise.
4557         (maybe_snarf_defarg): Likewise.
4558         (add_defarg_fn): Likewise.
4559         (do_pending_defargs): Likewise.
4560         (done_pending_defargs): Likewise.
4561         (unprocessed_defarg_fn): Likewise.
4562         (replace_defarg): Likewise.
4563         (end_input): Likewise.
4564         (get_overloaded_fn): Likewise.
4565         * cvt.c (convert_to_reference): Improve error handling.
4566         * decl.c (lookup_name_real): Do not declare it static.
4567         (maybe_push_to_top_level): Set check_access.
4568         (identifier_type_value): Adjust call to lookup_name_real.
4569         (lookup_qualified_name): New method.
4570         (lookup_name_real): Remove special-case parsing code.
4571         (lookup_name-nonclass): Adjust call to lookup_name_real.
4572         (lookup_name_namespace_only): Likewise.
4573         (lookup_name): Likewise.
4574         (check_tag_decl): Return the type declared.
4575         (shadow_tag): Likewise.
4576         (register_dtor_fn): Tweak check_access.
4577         (grokfndecl): Use constructor_name_p.
4578         (get_scope_of_declarator): New function.
4579         (grokdeclarator): Obscure tweaks for slightly different declarator
4580         representations.
4581         (start_method): Return error_mark_node to indicate failure.
4582         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
4583         * decl2.c (constructor_name_full): Simplify.
4584         (constructor_name): Use it.
4585         (build_expr_from_tree): Adjust for changes to do new parser.
4586         (push_scope): Improve robustness.
4587         (validate_nonmember_using_decl): Process declarations, not names.
4588         (do_class_using_decl): Likewise.
4589         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
4590         here.
4591         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
4592         * expr.c (cxx_expand_expr): Handle BASELINKs.
4593         * init.c (member_init_ok_or_else): Issue more errors.
4594         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
4595         * lex.c: Do not include parse.h.
4596         (yypring): Do not declare.
4597         (yylval): Likewise.
4598         (make_reference_declarator): Remove error-generating code.
4599         (rid_to_yy): Remove.
4600         (cxx_init): Do not call init_spew.
4601         (yypring): Remove.
4602         (check_for_missing_semicolon): Remove.
4603         * lex.h (got_scope): Remove.
4604         (got_object): Remove.
4605         * method.c (hack_identifier): Use finish_non_static_data_member.
4606         (implicitly_declare_fn): Adjust use of constructor_name.
4607         * parser.c: New file.
4608         * pt.c (parse.h): Do not include it.
4609         (maybe_get_template_decl_from_template): Do not declare it.
4610         (finish_member_template_decl): Tweak.
4611         (begin_explicit_instantiation): Adjust for
4612         processing_explicit_instantiation being boolean.
4613         (end_explicit_instantiation): Likewise.
4614         (maybe_process_partial_specialization): Tighten specialization
4615         test.
4616         (retrieve_local_specialization): Adjust ue of hash table.
4617         (eq_local_specializations): New function.
4618         (register_local_specialization): Likewise.
4619         (push_template_decl_real): Remove unnecessary test.
4620         (maybe_get_template_decl_from_type_decl): Don't make it static.
4621         (for_each_template_parm_r): Handle TYPEOF_TYPE.
4622         (tsubst_copy): Use retrieive_local_specialization to handle
4623         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
4624         Handle COMPONENT_REFs with pseudo-destructor-expressions.
4625         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
4626         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
4627         (unify): Tweak handling of CONST_DECLs.
4628         (regenerate_decl_from_template): Use push_nested_class.
4629         (template_for_substitution): New funciton.
4630         (instantiate_decl): Use it.  Register parameters as local
4631         specializations.
4632         * rtti.c (init_rtti_processing): Set type_info_ref_type.
4633         (build_typeid): Use it.
4634         (get_typeid): Likeise.
4635         * search.c (accessible_p): Use check_access, not
4636         flag_access_control.
4637         (adjust_result_of_qualified_name_lookup): Pay attention to the
4638         context_class.
4639         * semantics.c (finish_asm_stmt): Adjust error handling.
4640         (finish_label_stmt): Return the statement.
4641         (finish_non_static_data_member): New function.
4642         (finish_class_expr): Handle BASELINKs.
4643         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
4644         (finish_object_call_expr): Simplify handling during templates.
4645         (finish_pseudo_destructor_call_expr): Rename to ...
4646         (finish_pseudo_dtor_expr): ... this.
4647         (finish_compound_literal): New function.
4648         (begin_inline_definitions): Remove.
4649         (finish_sizeof): Remove special template handling.
4650         * spew.c: Do not include parse.h.
4651         * tree.c (get_overloaded_fn): Remove.
4652         * typeck.c (build_class_member_access_expr): Handle
4653         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
4654         (lookup_destructor): New function.
4655         (finish_class_member_access_expr): Use it.
4656         (convert_arguments): Simplify.
4657         (build_unary_op): Handle BASELINKs.
4659 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
4661         PR c++/4803
4662         * decl2.c (mark_used): Defer inline functions.
4663         (finish_file): Merge deferred_fns loops. Check all used
4664         inline functions have a definition.
4665         * method.c (make_thunk): Thunks are not inline.
4667         PR c++/5116, c++/764
4668         * call.c (build_new_op): Make sure template class operands are
4669         instantiated.
4671 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
4673         PR C++/7964
4674         * cp-tree.h (resolve_scoped_fn_name): Prototype.
4675         * call.c (resolve_scoped_fn_name): New function. Deal with
4676         more template expansion. Broken out of ...
4677         * parse.y (parse_finish_call_expr): ... here. Call it.
4678         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
4679         resolve_scoped_fn_name and build_call_from_tree.
4681         PR c++/9053
4682         * decl.c (duplicate_decls): Templates may be disambiguated by
4683         return type.
4685         PR c++/8702
4686         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
4687         conversion operators on failure.
4689 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4691         Remove traditional C constructs 2/n.
4692         * call.c (tourney, build_field_call, equal_functions, joust,
4693         compare_ics, build_over_call, build_java_interface_fn_ref,
4694         convert_like_real, op_error, build_object_call, resolve_args,
4695         build_vfield_ref, check_dtor_name, build_scoped_method_call,
4696         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
4697         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
4698         standard_conversion, reference_related_p,
4699         reference_compatible_p, convert_class_to_reference,
4700         direct_reference_binding, reference_binding,
4701         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
4702         add_template_conv_candidate, any_viable, any_strictly_viable,
4703         build_this, splice_viable, print_z_candidates,
4704         build_user_type_conversion, build_new_function_call,
4705         conditional_conversion, build_conditional_expr, build_new_op,
4706         build_op_delete_call, enforce_access, call_builtin_trap,
4707         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
4708         convert_default_arg, type_passed_as, convert_for_arg_passing,
4709         in_charge_arg_for_name, is_properly_derived_from,
4710         maybe_handle_implicit_object, maybe_handle_ref_bind,
4711         source_type, add_warning, can_convert, can_convert_arg,
4712         perform_implicit_conversion, can_convert_arg_bad,
4713         initialize_reference, add_conv_candidate,
4714         add_template_candidate_real, add_template_candidate): Ansify.
4716 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
4718         PR c++/8572
4719         * cp-tree.h (grokoptypename): Add SCOPE parameter.
4720         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
4721         if in a template scope.
4722         * parse.y (unoperator): Return the scope.
4723         (operator_name): Adjust grokoptypename call.
4725 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4727         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
4728         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
4729         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
4731 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
4733         * ChangeLog: Fix a typo.
4734         * class.c: Fix comment typos.
4735         * cp-tree.h: Likewise.
4737 2002-12-18  Jason Merrill  <jason@redhat.com>
4739         Handle anonymous unions at the tree level.
4740         C++ ABI change: Mangle anonymous unions using the name of their
4741         first named field (by depth-first search).  Should not cause
4742         binary compatibility problems, though, as the compiler previously
4743         didn't emit anything for affected unions.
4744         * cp-tree.def (ALIAS_DECL): New tree code.
4745         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
4746         first field, not the largest.
4747         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
4748         push the decl, and write it out at namespace scope.
4749         * decl.c (lookup_name_real): See through an ALIAS_DECL.
4750         (pushdecl): Add namespace bindings for ALIAS_DECLs.
4751         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
4752         of a decl which doesn't have one.
4753         * typeck.c (build_class_member_access_expr): Don't recurse if
4754         we already have the type we want.
4756 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4758         PR c++/8099
4759         * friend.c (make_friend_class): Allow partial specialization
4760         when declaration is not a template friend.
4762 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4764         PR c++/3663
4765         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
4766         TREE_PROTECTED to created decl nodes.
4768 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
4770         * class.c (build_base_field): Do not set DECL_PACKED on the
4771         FIELD_DECL.
4773 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4775         * cp-tree.h (struct tree_srcloc): Use location_t.
4776         (SOURCE_LOCUS): New.
4777         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
4779 2002-12-17  Jason Merrill  <jason@redhat.com>
4781         * decl.c (finish_function): Also complain about no return in
4782         templates.
4783         * semantics.c (finish_return_stmt): Also call check_return_expr in
4784         templates.
4785         * typeck.c (check_return_expr): In a template, just remember that we
4786         saw a return.
4788 2002-12-16  Jason Merrill  <jason@redhat.com>
4790         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
4791         of the CALL_EXPR.
4793         * semantics.c (do_pushlevel): Call pushlevel after adding the
4794         SCOPE_STMT.
4795         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
4796         * parse.y (function_body): Go back to using compstmt.
4797         * decl.c (pushdecl): Skip another level to get to the parms level.
4799         * call.c (build_new_method_call): Use is_dummy_object to determine
4800         whether or not to evaluate the object parameter to a static member
4801         function.
4803 2002-12-14  Jason Merrill  <jason@redhat.com>
4805         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
4806         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
4807         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
4808         don't bother with an AGGR_INIT_EXPR.
4809         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
4810         just generate a new decl normally.  Take return slot parm.
4811         * cp-tree.h: Adjust prototype.
4813 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4815         PR C++/8031
4816         * cvt.c (convert_to_pointer_force): Don't try comparing against
4817         erronous type.
4819 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
4821         * cp-tree.h: Have the multiple-include guards around
4822         the entire file.
4824 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
4826         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
4827         for SPEW_DEBUG.
4828         (snarf_method): Same.
4829         (snarf_defarg): Same.
4831 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
4833         PR c++/8372
4834         * pt.c (tsubst_copy): Handle destructor names more correctly.
4836 2002-12-10  Matt Austern   <austern@apple.com>
4838         * cp-tree.h: get rid of needs_virtual_reinit bit.
4840 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
4842         * NEWS: Document removal of in-class initialization extension for
4843         static data members of non-arithmetic, non-enumeration type.
4844         * decl.c (check_static_variable_definition): Do not allow that
4845         extension.
4846         * decl2.c (grokfield): Do not call digest_init when processing
4847         templates.
4849 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4851         * error.c (dump_expr): Fix format specifier warning.
4853 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
4855         * class.c (finish_struct_1): Correct comment.
4856         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
4858 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
4860         PR C++/8799
4861         * error.c (dump_expr): Don't ever try to dump a non-existent
4862         expression.
4864 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
4866         Implement covariant returns.
4867         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
4868         (struct lang_decl_flags): Add this_thunk_p flag.
4869         Rename vcall_offset to virtual_offset.
4870         (struct lang_decl): Rename delta to fixed_offset.
4871         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
4872         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
4873         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
4874         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
4875         (make_thunk): Add this_adjusting arg.
4876         (finish_thunk): Declare.
4877         (mangle_thunk): Add this_adjusting arg.
4878         * class.c (get_vcall_index): Use base function for lookup.
4879         (update_vtable_entry_for_fn): Generate covariant thunk.
4880         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
4881         (build_vtbl_initializer): Use base function for lookup.
4882         Finish covariant thunk here. Adjust thunk generation.
4883         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
4884         Adjust thunk dumping.
4885         * mangle.c (mangle_call_offset): New function.
4886         (mangle_thunk): Adjust for covariant thunks.
4887         * method.c (make_thunk): Adjust. Do not set name here.
4888         (finish_thunk): New function. Set name here.
4889         (use_thunk): Generate covariant thunks too.
4890         (thunk_adjust): New function.
4891         * search.c (covariant_return_p): Remove. Fold into ...
4892         (check_final_overrider): ... here. Simplify.
4893         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
4895 2002-12-03  Jason Merrill  <jason@redhat.com>
4897         PR c++/8674
4898         * call.c (build_over_call): Check specifically for TARGET_EXPR
4899         when eliding.
4901         PR c++/8461, c++/8625
4902         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
4903         (cp_convert_parm_for_inlining): Remove.
4904         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
4905         Remove.
4906         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
4907         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
4909         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
4910         an ambiguous conversion.
4912 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
4914         PR c++/8688
4915         * decl.c (reshape_init): Handle erroneous initializers.
4917 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
4919         PR c++/8720
4920         * spew.c (remove_last_token): Make sure that last_chunk is set
4921         correctly.
4923         PR c++/8615
4924         * error.c (dump_expr): Handle character constants with
4925         TREE_OVERFLOW set.
4927 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4929         DR 180
4930         * decl.c (grokdeclarator): Require class-key for all friend class.
4931         Output the correct type and context in the error message.
4933 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
4935         PR c++/5919
4936         * pt.c (unify): Use variably_modified_type_p to test validity of
4937         template argument types.
4939         PR c++/8727
4940         * cp-tree.h (lang_type_class): Add typeinfo_var.
4941         (CLASSTYPE_TYPEINFO_VAR): New macro.
4942         * rtti.c (get_tinfo_decl): Use it.
4944         PR c++/8663
4945         * init.c (expand_member_init): Always get the main variant of a
4946         base class.
4948 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
4950         PR c++/8332
4951         PR c++/8493
4952         * decl.c (cxx_init_decl_processing): Use size_type_node, not
4953         c_size_type_node.
4954         * decl2.c (coerce_new_type): Likewise.
4955         * except.c (do_allocate_exception): Likewise.
4957 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
4959         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
4960         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
4961         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
4962         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
4963         typeck2.c: Include coretypes.h and tm.h.
4964         * Make-lang.in: Update dependencies.
4966 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
4968         PR c++/8227
4969         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
4970         (check_initializer): Validate the type of the initialized
4971         variable, even if the initializer is absent.
4972         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
4974         PR c++/8214
4975         * typeck.c (convert_for_assignment): Do not use
4976         decl_constant_value on the operand.
4978         PR c++/8511
4979         * pt.c (instantiate_decl): Handle template friends defined outside
4980         of the class correctly.
4982 2002-11-29  Joe Buck <jbuck@synopsys.com>
4984         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
4985         anonymous structs.
4987 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
4989         * class.c (walk_subobject_offsets): Recur on binfos as well as on
4990         types.
4991         (layout_nonempty_base_or_field): Pass it a binfo when processing a
4992         base class.
4993         (layout_empty_base): Likewise.
4994         (build_base_field): Likewise.
4996 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
4998         * class.c (build_base_field): Make sure we get the canonical base
4999         when descending through primary bases.
5001 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
5003         * decl.c (check_initializer): Don't error on initialisation of
5004         a scalar with a brace-enclosed expression.
5006 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
5008         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
5009         (template_parms_equal): Remove prototype.
5010         * typeck.c (buuld_indirect_ref): Reformat.
5012 2002-11-25  Jason Merrill  <jason@redhat.com>
5014         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
5015         and a DO_STMT.
5017 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
5019         * tree.c (cp_build_qualified_type_real): Correct handling of
5020         array types.
5021         * class.c (walk_subobject_offsets): Fix thinko.
5022         (build_base_field): Record offsets of empty bases in primary
5023         virtual bases.
5024         (layout_class_type): Record offsets of empty bases in fields.
5026         * search.c (is_subobject_of_p_1): Fix thinko.
5027         (lookup_field_queue_p): Likewise.
5029 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
5031         * class.c (layout_class_type): Reuse tail padding when laying out
5032         virtual bases.
5034 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
5036         * rtti.c (qualifier_flags): Fix thinko.
5038 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5040         Remove traditional C constructs 1/n.
5041         * cp-tree.h (init_method, set_mangled_name_for_decl,
5042         build_opfncall, hack_identifier, make_thunk, use_thunk,
5043         synthesize_method, implicitly_declare_fn,
5044         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
5045         maybe_clone_body): Remove use of PARAMS.
5047         * method.c (do_build_assign_ref, do_build_copy_constructor,
5048         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
5049         Likewise.
5050         (synthesize_method): Use 'bool' type and constants instead of
5051         'int'.
5052         (locate_copy): Likewise.
5053         (implicitly_declare_fn): Likewise.
5055         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
5056         Remove old-style declaration.
5057         (maybe_clone_body): Use 'bool' type and constants.
5059 2002-11-21  Glen Nakamura  <glen@imodulo.com>
5061         PR c++/8342
5062         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
5063         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
5064         of the branches of a COND_EXPR.
5066 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
5068         * pt.c (for_each_template_parm): Free allocated memory.
5069         * search.c (is_subobject_of_p_1): New function.
5070         (is_subobject_of_p): Avoid walking virtual bases multiple times.
5072 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
5074         * g++spec.c (lang_specific_spec_functions): New.
5076 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
5078         * ChangeLog: Follow spelling conventions.
5079         * class.c: Likewise.
5080         * decl2.c: Likewise.
5082 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
5084         * search.c (dfs_push_decls): Do not try to reorder elements
5085         3..n of method_vec if method_vec has only two elements.
5086         Reverse order of two tests to avoid accessing unallocated
5087         memory.
5089 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
5091         * class.c (dfs_find_final_overrider): Adjust so that the most
5092         derived object is a binfo, rather than a class type.
5093         (find_final_overrider): Likewise.
5094         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
5095         (add_vcall_offset): Likewise.
5097 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5099         PR c++/8389
5100         * pt.c (instantiate_template): Push class scope for member
5101         functions.
5102         (get_mostly_instantiated_function_type): Likewise.  Don't call
5103         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
5104         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
5105         * mangle.c (write_encoding, write_unqualified_name): Adjust.
5107 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
5109         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
5110         vcall offfsets.  Split out ...
5111         (add_vcall_offset): ... new function.
5113         PR c++/8338
5114         * pt.c (for_each_template_parm): Add htab parameter.
5115         (process_partial_specialization): Adjust call.
5116         (push_template_decl_real): Likewise.
5117         (pair_fn_data): Add visited.
5118         (for_each_template_parm_r): Avoid walking duplicates more than
5119         once.
5120         (uses_template_parms): Adjust call to for_each_template_parm.
5122 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
5124         * class.c (add_implicitly_declared_members): Put implicitly
5125         declared functions at the end of TYPE_METHODs when -fabi-version
5126         is at least 2.
5128 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
5130         * decl2.c (finish_file): Correct spelling.
5132 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
5134         * call.c (build_special_member_call): Do not try to lookup VTTs by
5135         name.
5136         * class.c (vtbl_init_data): Add generate_vcall_entries.
5137         (get_vtable_decl): Do not look up virtual tables by name.
5138         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
5139         (set_primary_base): Do not set CLASSTYPE_RTTI.
5140         (determine_primary_base): Likewise.
5141         (get_matching_virtual): Remove.
5142         (get_vcall_index): New function.
5143         (update_vtable_entry_for_fn): Do not try to use virtual thunks
5144         when they are not required.  Assign vcall indices at this point.
5145         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
5146         Do update dynamic_classes.
5147         (build_vtt): Do not add VTTs to the symbol table.
5148         (build_ctor_vtbl_group): Likewise.
5149         (build_vtbl_initializer): Simplify handling of vcall indices.
5150         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
5151         for the most derived class.
5152         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
5153         the vtable.
5154         * cp-tree.h (dynamic_classes): New macro.
5155         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
5156         (CLASSTYPE_RTTI): Remove.
5157         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
5158         (CLASSTYPE_VCALL_INDICES): New macro.
5159         (CLASSTYPE_VTABLES): Likewise.
5160         (BV_USE_VCALL_INDEX_P): Remove.
5161         (build_vtable_path): Remove.
5162         * decl2.c (finish_vtable_vardecl): Remove.
5163         (key_method): Remove #if 0'd code.
5164         (finish_vtable_vardecl): Rename to ...
5165         (maybe_emit_vtables): ... this.
5166         (finish_file): Use it.
5167         * search.c (look_for_overrides_here): Update comment.
5169 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
5171         PR c/7353 redux
5172         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
5174 2002-10-30  Jason Merrill  <jason@redhat.com>
5176         PR c++/8186
5177         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
5178         * call.c (convert_for_arg_passing): Set it.
5179         * except.c (stabilize_throw_expr): Recurse for such an arg.
5181 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
5183         * cp-tree.h (lang_decl_flags): Remove init_priority.
5184         (lang_decl): Add delta.
5185         (GLOBAL_INIT_PRIORITY): Remove.
5186         (THUNK_DELTA): Revise definition.
5187         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
5188         * dump.c (cp_dump_tree): Don't dump it.
5190 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
5192         PR c++/8160
5193         * typeck2.c (process_init_constructor): Call complete_array_type.
5195         PR c++/8149
5196         * decl.c (make_typename_type): Issue errors about invalid results.
5198 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5200         Core issue 287, PR c++/7639
5201         * cp-tree.h (lang_type_class): Add decl_list field.
5202         (CLASSTYPE_DECL_LIST): New macro.
5203         (maybe_add_class_template_decl_list): Add declaration.
5204         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
5205         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
5206         (maybe_add_class_template_decl_list): New function.
5207         (add_implicitly_declared_members): Use it.
5208         * decl.c (maybe_process_template_type_declaration): Likewise.
5209         (pushtag): Likewise.
5210         * friend.c (add_friend): Likewise.
5211         (make_friend_class): Likewise.
5212         * semantics.c (finish_member_declaration): Likewise.
5213         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
5214         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
5215         to process members and friends in the order of declaration.
5217 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
5219         PR c++/8287
5220         * decl.c (finish_destructor_body): Create the label to jump to
5221         when returning from a destructor here.
5222         (finish_function_body): Rather than here.
5224 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
5226         PR c++/7266
5227         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
5228         SCOPE_REF is not null before dereferencing it.
5230 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
5232         * call.c (build_over_call): Use DECL_CONTEXT, not
5233         DECL_VIRTUAL_CONTEXT.
5234         * class.c (modify_vtable_entry): Don't mess with
5235         DECL_VIRTUAL_CONTEXT.
5236         (set_vindex): Remove.
5237         (set_primary_base): Remove vfuns_p parameter.
5238         (determine_primary_base): Likewise.
5239         (modify_all_vtables): Likewise.
5240         (layout_class_type): Likewise.  Adjust calls to other functions
5241         accordingly.
5242         (finish_struct_1): Adjust calls to modified functions.  Set
5243         DECL_VINDEX here.
5244         * cp-tree.h (lang_type_class): Remove vsize.
5245         (CLASSTYPE_VSIZE): Remove.
5246         (lang_decl): Remove thunks.
5247         (DECL_THUNKS): Adjust.
5248         (DECL_VIRTUAL_CONTEXT): Remove.
5249         (duplicate_decls): Don't copy it.
5250         * pt.c (build_template_decl): Don't set it.
5251         (tsubst_decl): Likewise.
5252         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
5254         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
5255         (build_vtable_entry): Remove.
5256         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
5257         (lang_decl): Add thunks.
5258         (DECL_THUNKS): New macro.
5259         * decl.c (duplicate_decls): Copy it.
5260         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
5261         * semantics.c (emit_associated_thunks): Simplify.
5263 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
5265         PR c++/7228
5266         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
5267         lang_type structure exists before accessing field.
5268         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
5269         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
5270         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
5271         * class.c (check_field_decls): Use new macros.
5272         * typeck2.c (process_init_constructor): Remove redundant check for
5273         existence of lang_type structure.
5275 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
5277         * class.c (end_of_base): New method.
5278         (end_of_class): Use it.  Check indirect virtual bases.
5280         * class.c (check_field_decls): Fix typo.
5282 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
5284         PR c++/8067
5285         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
5286         related variables.
5288         PR c++/7679
5289         * spew.c (next_token): Do not return an endless stream of
5290         END_OF_SAVED_INPUT tokens.
5291         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
5292         the cached token stream.
5293         (snarf_defarg): Likewise.
5295 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
5297         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
5298         variably_modified_type_p.
5299         * cp-tree.h: Remove prototype of variably_modified_type_p.
5300         * tree.c (variably_modified_type_p): Remove; now implemented
5301         in language-independent code.
5303 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
5305         PR c++/6579
5306         * spew.c (snarf_parenthesized_expression): New function.
5307         (snarf_block): Use it.
5309 2002-10-22  Richard Henderson  <rth@redhat.com>
5311         * method.c (use_thunk): Always compute vcall_value; assert that
5312         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
5313         for vcall thunks as well.
5315 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
5317         * class.c (empty_base_at_nonzero_offset_p): New function.
5318         (layout_nonempty_base_or_field): Do not check for conflicts when
5319         laying out a virtual base using the GCC 3.2 ABI.
5320         (build_base_field): Correct checking for presence of empty classes
5321         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
5323         * class.c (include_empty_classes): Use normalize_rli.
5324         (layout_class_type): Likewise.
5326         * decl.c (reshape_init): Tweak handling of character arrays.
5328         PR c++/8218
5329         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
5330         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
5331         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
5332         (check_field_decls): Likewise.
5333         (layout_class_type): Likewise.
5334         (finish_struct_1): Initialize it.
5335         (walk_subobject_offsets): Use it to prune searches.
5337 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
5339         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
5340         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
5341         TARGET_ASM_OUTPUT_MI_THUNK in comments.
5343 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
5345         * decl.c (start_decl): Point users of the old initialized-
5346         typedef extension at __typeof__.
5348 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5350         * Make-lang.in (method.o): Depend on TARGET_H.
5351         * method.c (target.h): Include it.
5352         (use_thunk): Use target hooks.  Use vcall thunks, if available.
5354 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5356         * class.c (base_derived_from): Make sure return value is a bool.
5358 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
5360         * class.c (find_final_overrider_data_s): Remove overriding_fn and
5361         overriding_base.
5362         (dfs_base_derived_from): New function.
5363         (base_derived_from): Likewise.
5364         (dfs_find_final_overrider): Use base_derived_from.
5365         (find_final_overrider): Adjust.
5367 2002-10-18  Jason Merrill  <jason@redhat.com>
5369         PR c++/8080
5370         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
5371         with condition decls in a template.
5373 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
5375         * class.c (add_method): Compare template parms too.
5377 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
5379         PR c++/7584
5380         * class.c (handle_using_decl): Allow the declaration used to be
5381         from an ambiguous base.
5383         * pt.c (convert_template_argument): Revert this change:
5384                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5385                 * pt.c (convert_template_argument): Do not fold non-type
5386                 template rguments when inside a template.
5388         * init.c (expand_default_init): Handle brace-enclosed initializers
5389         correctly.
5391 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5393         * mangle.c (write_expression): Correct handling of enumeration
5394         constants.
5395         (write_template_arg): Likewise.
5396         * pt.c (convert_template_argument): Do not fold non-type template
5397         arguments when inside a template.
5399         PR c++/7478
5400         * cvt.c (convert_to_reference): Allow references as the incoming
5401         type.
5403 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
5405         PR c++/7524
5406         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
5407         build_qualified_type.
5409 2002-10-15  Richard Henderson  <rth@redhat.com>
5411         * error.c (dump_expr): Use real_to_decimal directly, and with
5412         the new arguments.
5414 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
5416         * decl.c (reshape_init): Fix typo.
5418         * cp-tree.h (operator_name_info_t): Add arity.
5419         * lex.c (init_operators): Initialize it.
5420         * mangle.c (write_conversion_operator_name): New function.
5421         (write_unqualified_name): Use it.
5422         (write_template_args): Accept template arguments as a TREE_LIST.
5423         (write_expression): Adjust handling of qualified names to match
5424         specification.
5426 2002-10-15  Jason Merrill  <jason@redhat.com>
5428         * call.c (call_builtin_trap): New fn.
5429         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
5430         (build_call): Don't set current_function_returns_abnormally outside
5431         a function.
5433 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
5435         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
5436         clear CLASSTYPE_EMPTY_P.
5437         (build_base_field): Likewise.
5438         (build_base_fields): Likewise.
5439         (check_bases_and_members): Likewise.
5440         (create_vtbl_ptr): Likewise.
5441         (layout_class_type): Likewise.  Ensure that empty classes have
5442         size zero when used as base classes in the 3.2 ABI.
5443         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
5444         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
5445         parameter.
5446         (is_empty_class): Correct definition when using post-3.2 ABI.
5447         * cp-tree.h (lang_type_class): Add empty_p.
5448         (CLASSTYPE_EMPTY_P): New macro.
5450 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
5452         * init.c (build_delete): Do not apply save_expr for arrays.
5453         (build_vec_delete): Likewise.
5455 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
5457         * decl.c (layout_var_decl): Call layout_decl even for variables
5458         whose type is an array with unspecified bounds.
5460         PR c++/7176
5461         * lex.c (do_identifier): Add another option for the parsing
5462         parameter.
5463         * parse.y (do_id): Use it.
5465 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5467         PRs C++/6803, C++/7721 and C++/7803
5468         * decl.c (grokdeclarator): Gracefully handle template-name as
5469         decl-specifier.
5471 2002-10-11  Jason Molenda  <jmolenda@apple.com>
5473         * init.c (build_field_list): Provide uses_unions_p with a default
5474         value.
5476 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
5478         PR c++/5661
5479         * cp-tree.h (variably_modified_type_p): New function.
5480         (grokdeclarator) Tighten check for variably modified types as
5481         fields.
5482         * pt.c (convert_template_argument): Do not allow variably modified
5483         types as template arguments.
5484         * tree.c (variably_modified_type_p): New function.
5486         * NEWS: Document removal of "new X = ..." extension.
5487         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
5488         brace-enclosed initializers.
5489         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
5490         (initialize_local_var): Remove declaration.
5491         (expand_static_init): Likewise.
5492         * decl.c (next_initializable_field): New function.
5493         (reshape_init): Likewise.
5494         (check_initializer): Use them.  Build dynamic initializer for
5495         aggregates here too.
5496         (initialize_local_var): Simplify, and incorporate cleanup
5497         insertion code as well.
5498         (destroy_local_var): Remove.
5499         (cp_finish_decl): Tidy.
5500         (expand_static_init): Fold checks for whether or not a variable
5501         needs initialization into this function.  Simplify.
5502         * decl2.c (do_static_initialization): Simplify.
5503         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
5504         be done for us automatically.
5505         (expand_default_init): Handle brace-enclosed initializers
5506         correctly.
5507         (expand_aggr_init_1): Remove RTL-generation code.
5508         (build_vec_init): Remove "new X = ..." support.
5509         * parse.y (new_initializer): Likewise.
5510         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
5511         brace-enclosed initializer.
5512         (create_pseudo_type_info): Likewise.
5513         * typeck2.c (store_init_value): Don't try to handle digest_init
5514         being called more than once.
5515         (digest_init): Tidy handling of brace-enclosed initializers.
5517 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5519         * decl.c (typename_hash): Use htab_hash_pointer.
5521 2002-10-10  Jim Wilson  <wilson@redhat.com>
5523         * decl.c (duplicate_decls): Don't call decl_attributes.
5525 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
5527         PR c/7353
5528         * decl.c (start_decl): Unconditionally issue error for
5529         'typedef foo = bar'.
5530         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
5531         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
5533 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5535         * decl2.c (prune_vtable_vardecl): Delete unused function.
5537 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
5539         PR c++/7754
5540         * decl2.c (finish_anon_union): Do not expand anonymous unions when
5541         procesing template functions.
5542         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5543         type. Call layout_decl.
5544         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5546 2002-10-07  Richard Henderson  <rth@redhat.com>
5548         * decl2.c, pt.c: Revert c++/7754 fix.
5550 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5552         PR c++/7804
5553         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
5555 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
5557         PR c++/7931
5558         * pt.c (for_each_template_parm_r): Handle BASELINKs.
5560         PR c++/7754
5561         * decl2.c (finish_anon_union): Do not expand anonymous unions when
5562         procesing template functions.
5563         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
5564         type. Call layout_decl.
5565         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
5567 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
5569         PR c++/8006
5570         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
5571         template parameters.
5572         (globals): Add entity and need_abi_warning.
5573         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
5574         CLASSTYPE_TEMPLATE_INFO.
5575         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
5576         TYPE_TI_TEMPLATE.
5577         (write_prefix): Handle typename types correctly.
5578         (write_template_prefix): Handle template template parameters
5579         correctly.
5580         (start_mangling): Add entity parameter.
5581         (finish_mangling): Warn about names whose mangling will change.
5582         (mangle_decl_string): Adjust.
5583         (mangle_type_string): Likewise.
5584         (mangle_special_for_type): Likewise.
5585         (mangle_ctor_vtbl_for_type): Likewise.
5586         (mangle_thunk): Likewise.
5587         (mangle_guard_variable): Likewise.
5588         (mangle_ref_init_variable): Likewise.
5590 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
5592         PR c++/7188.
5593         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
5594         * cp-tree.h (emit_base_init): Rename to ....
5595         (emit_mem_initializers): ... this.
5596         (expand_member_init): Change prototype.
5597         * init.c (perform_member_init): Compute explicit, rather than
5598         requiring it as a parameter.
5599         (sort_member_init): Rename to ...
5600         (sort_mem_initializers): ... this.  Process bases and data members
5601         together.
5602         (sort_base_init): Remove.
5603         (emit_base_init): Rename to ...
5604         (emit_mem_initializers): ... this.
5605         (expand_aggr_vbase_init_1): Remove.
5606         (construct_virtual_bases): Rename to ...
5607         (construct_virtual_base): ... this.
5608         (expand_member_init): Rework handling of base initializers.
5609         * method.c (do_build_copy_constructor): Use
5610         finish_mem_initializers.
5611         * parse.y (member_init): Adjust calls to expand_member_init.
5612         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
5613         (tsubst_initializer_list): Use expand_member_init.
5614         * semantics.c (finish_mem_intiailizers): Simplify.
5616 2002-10-02  Matt Austern  <austern@apple.com>
5617         * decl.c (walk_vtables_r): Fixed typo that caused result to
5618         never get a nonzero value.
5620 2002-10-02  Roger Sayle  <roger@eyesopen.com>
5622         PR optimization/6627
5623         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
5624         from here, and move it to tree.h.
5625         * decl.c (cxx_init_decl_processing): If storing the vbit
5626         in function pointers, ensure that force_align_functions_log
5627         is atleast one.
5629 2002-10-02  Matt Austern  <austern@apple.com>
5631         * class.c (check_field_decls): Changed warning about const member
5632         variables so that it doesn't get issued for a class aggregate.
5634 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
5636         * decl.c (cp_finish_decl): Make sure array types are laid out,
5637         even if the array bounds are unknown.
5639 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
5641         * class.c (build_vtbl_initializer): Change build_c_cast
5642         to build1.
5644 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
5646         * decl.c (cp_finish_decl): Make sure array types are laid out,
5647         even if the array bounds are unknown.
5649         * decl.c (cp_finish_decl): Correct check for dynamic
5650         initialization of thread-local storage.
5652 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
5654         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
5655         overloaded.
5657 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
5659         * class.c (build_vtbl_initializer): Add cast.
5660         (add_vcall_offset_vtbl_entries_1):
5661         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
5663 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
5665         * class.c (walk_subobject_offsets): Correct the calculation of
5666         offsets for virtual bases.  Correct the counting of array
5667         elements.
5668         (layout_nonempty_base_or_field): Simplify.  Correct the
5669         calculation of offsets to be propagated through the binfo
5670         hierarchy.
5671         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
5672         Add the FIELD_DECL to TYPE_FIELDS.
5673         (build_base_fields): Adjust accordingly.
5674         (layout_virtual_bases): Use build_base_field.
5675         (end_of_class): Return a tree, not an integer.
5676         (warn_about_ambiguous_direct_bases): Rename to ...
5677         (warn_about_ambiguous_bases): ... this.
5678         (include_empty_classes): New function.
5679         (layout_class_type): Create an alternative version of the type to
5680         be used when as a base class type.  Do not call
5681         finish_record_layout until we are done laying out the class.
5682         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
5683         as_base.
5684         (CLASSTYPE_SIZE): Reimplement.
5685         (CLASSTYPE_SIZE_UNIT): Likewise.
5686         (CLASSTYPE_ALIGN): Likweise.
5687         (CLASSTYPE_USER_ALIGN): Likewise.
5688         (CLASSTYPE_AS_BASE): New macro.
5689         (DECL_INITIALIZED_P): Likewise.
5690         (extract_init): Remove prototype.
5691         (build_forced_zero_init): Rename to ...
5692         (build_zero_init): ... this.
5693         (force_store_init_value): Remove.
5694         * decl.c (obscure_complex_init): Remove.
5695         (duplicate_decls): Copy DECL_INITIALIZED_P.
5696         (check_initializer): Do not leave junk in DECL_INITIAL.
5697         (cp_finish_decl): Handle zero-initialization of entities with
5698         static storage duration.
5699         * expr.c (extract_init): Remove.
5700         * init.c (build_forced_zero_init): Remove.
5701         (build_zero_init): New function.
5702         (build_default_init): Use it.
5703         (build_field_list): Skip FIELD_DECLs for base subobjects.
5704         (push_base_cleanups): Likewise.
5705         * method.c (do_build_assign_ref): Likewise.
5706         (synthesize_exception_spec): Likewise.
5707         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
5708         (regenerate_decl_from_template): To not set DECL_INITIAL for a
5709         static data member whose initialization took place in its class.
5710         (instantiate_decl): Do not pass an initializer to cp_finish_decl
5711         in that situation.
5712         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
5713         (dfs_unuse_fields): Likewise.
5714         * tree.c (pod_type_p): Handle error_mark_node.
5715         (zero_init_p): Likewise.
5716         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
5717         subobjects.
5718         * typeck2.c (store_init_value): Remove #if 0'd code.
5719         (force_store_init_value): Remove.
5720         (process_init_constructor): Use build_zero_init.
5722 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
5724         PR c++/7788
5725         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
5727 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
5729         * cp-tree.h: Fix comment typos.
5730         * decl.c: Likewise.
5731         * pt.c: Likewise.
5733 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
5735         * cp/class.c (contains_empty_class_p): New method.
5736         (walk_subobject_offsets): Correct computation of field offset.
5737         (layout_empty_base): Correct placement of emtpy base classes.
5738         (layout_class_type): Warn about ABI changes.
5740 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
5742         * cp/class.c (layout_virtual_bases): Do not round the size of the
5743         type to a multiple of the alignment before laying out virtual bases.
5744         (layout_class_type): Correct handling of bit-fields that are wider
5745         than their type inside unions.  Round the size of the type to a
5746         even number of bytes when computing the size without virtual
5747         bases.
5748         * cp/cp-tree.h (abi_version_at_least): New macro.
5750 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
5752         * ChangeLog: Follow spelling conventions.
5753         * ChangeLog.2: Likewise.
5754         * call.c: Likewise.
5755         * class.c: Likewise.
5756         * cp-tree.h: Likewise.
5757         * cvt.c: Likewise.
5758         * decl.c: Likewise.
5759         * decl2.c: Likewise.
5760         * except.c: Likewise.
5761         * friend.c: Likewise.
5762         * g++spec.c: Likewise.
5763         * init.c: Likewise.
5764         * lex.c: Likewise.
5765         * mangle.c: Likewise.
5766         * method.c: Likewise.
5767         * operators.def: Likewise.
5768         * optimize.c: Likewise.
5769         * pt.c: Likewise.
5770         * rtti.c: Likewise.
5771         * search.c: Likewise.
5772         * semantics.c: Likewise.
5773         * spew.c: Likewise.
5774         * tree.c: Likewise.
5775         * typeck.c: Likewise.
5777 2002-09-18  Devang Patel  <dpatel@apple.com>
5779         * cp/cp-tree.h: New prototype for walk_vtabls().
5780         * cp/decl.c (walk_vtables_r): New function.
5781         (struct cp_binding_level): Add new members, namespaces,
5782         names_size and vtables.
5783         (add_decl_to_level): Add decl in namespaces or vtables
5784         chain, if conditions match.
5785         (walk_vtables): New function.
5786         (walk_namespaces_r): Travers separate namespace chain
5787         for namespace decls.
5788         (wrapup_globals_for_namespace): Use names_size instead
5789         of list_length().
5790         * cp/decl2.c (finish_file): Use walk_vtables() instead of
5791         walk_globals() to walk vtable decls.
5793 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
5795         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
5796         ICE with invalid pointers & references.
5798 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
5800         * Make-lang.in: Remove all references to the demangler.
5801         * cxxfilt.c: Moved to binutils.
5803 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
5805         PR c++/7718
5806         * pt.c (tsubst_decl): Remove assert.
5808         Remove DR 295 implementation.
5809         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
5810         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
5811         about ignoring volatile qualifiers.
5813         * search.c (lookup_member): Correct documentation.
5815 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
5817         * cp-tree.h (union lang_tree_node): Add chain_next option.
5819 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
5821         * parse.y (parse_finish_call_expr): Check lookup_member result.
5823         PR c++/7015
5824         * semantic.c (finish_asm_stmt): Fix operand/output_operands
5825         thinko.
5826         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
5828 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
5830         PR c++/7919
5831         * call.c (build_over_call): Convert this pointer for fns found by
5832         using decls.
5834 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
5836         * ChangeLog: Follow spelling conventions.
5837         * ChangeLog.1: Likewise.
5839 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
5841         PR c++/7768
5842         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
5844 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
5846         * error.c: Fix comment formatting.
5847         * except.c: Likewise.
5848         * expr.c: Likewise.
5849         * friend.c: Likewise.
5850         * g++spec.c: Likewise.
5851         * init.c: Likewise.
5852         * lex.c: Likewise.
5853         * mangle.c: Likewise.
5854         * method.c: Likewise.
5855         * optimize.c: Likewise.
5856         * pt.c: Likewise.
5857         * rtti.c: Likewise.
5858         * search.c: Likewise.
5859         * semantics.c: Likewise.
5860         * spew.c: Likewise.
5861         * tree.c: Likewise.
5862         * typeck.c: Likewise.
5863         * typeck2.c: Likewise.
5865 2002-09-13  Matt Austern  <austern@apple.com>
5867         PR C++/7828
5868         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
5869         * cp/call.c: Change call-by-const-reference mechanism to use
5870         non_cast_lvalue_p when deciding whether the create a temporary.
5871         We need a temporary when passing, e.g. (long) x by const ref.
5873 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
5875         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
5877 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
5879         * decl.c: Fix comment formatting.
5880         * decl2.c: Likewise.
5882 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
5884         * call.c: Fix comment formatting.
5885         * class.c: Likewise.
5886         * cp-lang.c: Likewise.
5887         * cp-tree.h: Likewise.
5888         * cvt.c: Likewise.
5890 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
5892         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
5893         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
5894         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
5895         minor adjustments (use version_string, eliminate yet another
5896         duplicate of xmalloc)
5898 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5900         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
5902 2002-09-05  Jason Merrill  <jason@redhat.com>
5904         * typeck2.c (add_exception_specifier): Only pedwarn for an
5905         incomplete type.
5906         (require_complete_eh_spec_types): New fn.
5907         (cxx_incomplete_type_diagnostic): Also support pedwarning.
5908         * typeck.c (complete_type_or_diagnostic): Likewise.
5909         * call.c (build_call): Call require_complete_eh_spec_types.
5910         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
5911         on an incomplete type.
5913 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
5915         * decl.c (start_cleanup_fn): Clear interface_only before
5916         start_function, restore it afterwards.
5918 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
5920         * cp-tree.h (finish_builtin_type): Remove.
5921         * decl2.c (finish_builtin_type): Move to common code.
5922         * decl.c (build_ptrmemfunc_type): Adjust.
5923         * rtti.c (create_pseudo_type_info): Adjust.
5924         (create_tinfo_types): Adjust.
5926 2002-08-31  Jason Merrill  <jason@redhat.com>
5928         * cp-lang.c (cp_expr_size): Allow initialization from a
5929         CONSTRUCTOR.
5931 2002-08-30  Richard Henderson  <rth@redhat.com>
5933         PR opt/7515
5934         * tree.c: Include target.h.
5935         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
5936         don't bind locally.
5937         * Makefile.in (tree.o): Update.
5939 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
5941         * class.c (layout_virtual_bases): Warn about bugs in G++ that
5942         result in incorrect object layouts.
5943         (layout_class_type): Likewise.
5945 2002-08-24  Matt Austern  <austern@apple.com>
5947         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
5948         are allowable.
5949         (real_lvalue_p): Update caller.
5950         (lvalue_p): Ditto.
5951         (non_cast_lvalue_or_else): New.
5952         * tree.h: Declare it.
5953         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
5955 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
5957         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
5958         and COND_EXPR specially; fix error message output.
5960 2002-08-22  Jason Merrill  <jason@redhat.com>
5962         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
5963         * semantics.c (nullify_returns_r): Likewise.
5965 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
5967         Fix PR/7621
5968         * typeck.c (finish_class_member_access_expr): Diagnose cases where
5969         name lookup finds nothing.
5971 2002-08-15  Jason Merrill  <jason@redhat.com>
5973         * semantics.c (finish_then_clause): Remove redundant assignment.
5974         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
5975         extra binding level outside the if/switch statement.
5976         (finish_while_cond, finish_for_cond): Rewrite complex condition
5977         into the loop body.
5979 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
5981         * parse.y (sizeof, alignof, typeof): New non-terminals to
5982         increment skip_evaluation.  Replace terminals with them and
5983         decrement skip_evaluation at the end of rules using them.
5984         * decl2.c (mark_used): Don't assemble_external if
5985         skipping evaluation.
5987 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
5989         Fix PR/7504
5990         * parse.y (parse_finish_call_expr): Handle incomplete
5991         type used to name a scope.
5993 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
5995         PR c++/7598
5996         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
5997         regression caused by my 2002-08-08 patch.
5999 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
6001         * decl.c (pushdecl_class_level): Honor requests to bind names to
6002         OVERLOADs.
6004 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6006         * decl2.c (build_call_from_tree): Fix uninitialized variable.
6007         * parse.y (parse_finish_call_expr): Likewise.
6008         * repo.c (old_args, old_dir, old_main): Const-ify.
6010 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
6012         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE
6013         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
6014         * optimize.c (maybe_clone_body): Likewise.
6015         * pt.c (tsubst_enum): Likewise.
6016         (lookup_template_class): Likewise.
6017         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
6019 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
6021         * lang-specs.h: Remove -ansi.
6023 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
6025         * tree.c (maybe_dummy_object): Replace // with /* */
6027 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
6029         * call.c (standard_conversion): Use build_ptrmem_type.
6030         * cp-tree.h (build_ptrmem_type): New function.
6031         (adjust_result_of_qualified_name_lookup): Likewise.
6032         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
6033         static data members.
6034         (build_ptrmem_type): New function.
6035         (grokdeclarator): Do not use build_offset_type when encountering a
6036         qualified name.
6037         * parse.y (parse_finish_call_expr): Use
6038         adjust_result_of_qualified_name_lookup.
6039         * search.c (adjust_result_of_qualified_name_lookup): New function.
6040         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
6041         accessing OFFSET_TYPEs directly.
6043 2002-08-08  Mike Stump  <mrs@apple.com>
6045         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
6046         (type_decays_to): Likewise.
6047         * class.c (find_final_overrider): Likewise.
6048         (maybe_note_name_used_in_class): Likewise.
6049         * decl.c (current_tmpl_spec_kind): Likewise.
6050         (add_binding): Likewise.
6051         (push_class_binding): Likewise.
6052         (duplicate_decls): Likewise.
6053         (layout_var_decl): Likewise.
6054         (grokfndecl): Likewise.
6055         (grokdeclarator): Likewise.
6056         (check_default_argument): Likewise.
6057         * decl2.c (handle_class_head): Likewise.
6058         * error.c (dump_template_decl): Likewise.
6059         * init.c (build_offset_ref): Likewise.
6060         * pt.c (check_specialization_scope): Likewise.
6061         (determine_specialization): Likewise.
6062         (check_explicit_specialization): Likewise.
6063         (maybe_check_template_type): Likewise.
6064         (process_partial_specialization): Likewise.
6065         (check_default_tmpl_args): Likewise.
6066         (push_template_decl_real): Likewise.
6067         (convert_template_argument): Likewise.
6068         (try_class_unification): Likewise.
6069         (get_bindings_real): Likewise.
6070         (do_decl_instantiation): Likewise.
6071         * semantics.c (begin_function_definition): Likewise.
6072         (finish_member_declaration): Likewise.
6073         (check_multiple_declarators): Likewise.
6074         * typeck.c (comp_array_types): Likewise.
6075         (comptypes): Likewise.
6076         (expr_sizeof): Likewise.
6077         (build_binary_op): Likewise.
6078         (dubious_conversion_warnings): Likewise.
6079         (check_return_expr): Likewise.
6081 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
6083         * typeck.c (build_class_member_access_expr): Do not return
6084         error_mark_node when no error has occurred.
6086 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6088         * typeck.c (build_component_addr): Remove.
6089         (build_unary_op): Just check it's not a bitfield, and then build
6090         an ADDR_EXPR.
6092 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6094         * class.c (convert_to_base): Correct check for error_mark_node.
6095         (create_vtable_ptr): Remove unused VFUNS_P parm.
6097 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
6099         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
6101 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
6103         Rework build_component_ref.
6104         * call.c (build_vfield_ref): Do not go through build_component_ref.
6105         (build_field_call): Use build_class_member_access_expr.
6106         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
6107         (build_object_call): Likewise.
6108         * class.c (convert_to_base): New function.
6109         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
6110         (instantiate_type): Handle BASELINKs.
6111         * cp-tree.def (BASELINK): New tree code.
6112         * cp-tree.h (BASELINK_P): Reimplement.
6113         (SET_BASELINK_P): Remove.
6114         (BASELINK_BINFO): Reimplement.
6115         (BASELINK_FUNCTIONS): Likewise.
6116         (BASELINK_ACCESS_BINFO): Likewise.
6117         (BASELINK_OPTYPE): Likewise.
6118         (convert_to_base): New function.
6119         (name_p): Likewise.
6120         (build_object_ref): Remove.
6121         (build_component_ref_1): Likewise.
6122         (build_component_ref): Likewise.
6123         (build_x_component_ref): Likewise.
6124         (build_class_member_access_expr): New function.
6125         (finish_class_member_access_expr): Likewise.
6126         (build_ptrmemfunc_access_expr): Likewise.
6127         * decl.c (grokdeclarator): Handle BASELINKs.
6128         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
6129         finish_class_member_access_expr.
6130         (arg_assoc): Handle BASELINKs.
6131         (do_class_using_decl): Likewise.
6132         * error.c (dump_decl): Likewise.
6133         (dump_expr): Use build_ptrmemfunc_access_expr.
6134         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
6135         destructors.
6136         (build_throw): Use BASELINK_FUNCTIONS.
6137         * init.c (perform_member_init): Use
6138         build_class_member_access_expr.
6139         (build_offset_ref): Handle BASELINKs.  Use
6140         build_class_member_access_expr.
6141         * method.c (hack_identifier): Likewise.
6142         * parse.y (do_id): Use BASELINK, not TREE_LIST.
6143         (primary): Remove uses of build_object_ref.
6144         * pt.c (lookup_template_function): Handle BASELINKs.
6145         (resolve_overloaded_unification): Likewise.
6146         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
6147         (lookup_field): Use BASELINK, not TREE_LIST.
6148         (lookup_fnfiels): Likewise.
6149         (setup_class_bindings): Likewise.
6150         * semantics.c (finish_object_call_expr): Do not use
6151         build_method_call when we already know what function is being
6152         called.
6153         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
6154         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
6155         TREE_CHAIN.
6156         (name_p): New function.
6157         * typeck.c (build_object_ref): Remove.
6158         (build_component_ref_1): Likewise.
6159         (build_x_component_ref): Likewise.
6160         (build_class_member_access_expr): New function.
6161         (finish_class_member_access_expr): Likewise.
6162         (build_ptrmemfunc_access_expr): Likewise.
6163         (get_member_function_from_ptrfunc): Use
6164         build_ptrmemfunc_access_expr.
6165         (build_binary_op): Likewise.
6166         (build_unary_op): Likewise.
6167         (build_ptrmemfunc): Likewise.
6168         (pfn_from_ptrmemfunc): Likewise.
6169         * typeck2.c (build_m_component_ref): Adjust comment.
6171 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
6173         * Make-lang.in (CXX_C_OBJS): Update.
6174         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
6175         * cp-tree.h (cxx_decode_option): Remove.
6176         * decl2.c (compare_options, lang_f_options, unsupported_options,
6177         cxx_decode_option): Remove.
6179 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
6181         * typeck.c (build_x_unary_op): Handle pointer-to-member.
6183 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
6185         * class.c: Don't include obstack.h.
6186         (popclass):
6187         * decl2.c: Delete bogus comment.
6188         * error.c: Don't include obstack.h.
6189         * except.c: Likewise.
6190         (dump_type): Correct comment.
6191         * method.c: Don't include obstack.h.
6192         * tree.c: Likewise.
6194 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
6196         Fix PR/2213
6197         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
6198         expressions to pointer-to-data-member of pointer-to-member-functions.
6200 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
6202         * cvt.c (ocp_convert): Delete obsolete code.
6203         * parse.y (permanent_obstack): Delete declaration.
6204         * pt.c (permanent_obstack): Delete declaration.
6205         * repo.c (permanent_obstack): Delete declaration.
6206         (open_repo_file): Use xmalloc instead of permanent_obstack.
6207         (init_repo): Use xstrdup instead of permanent_obstack.
6209 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
6211         * cp-tree.h (VF_DERIVED_VALUE): Remove.
6212         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
6214 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
6216         PR 7470.
6217         C++ ABI change - vfunc ordering.
6218         * class.c (add_virtual_function): Remove.
6219         (dfs_modify_all_vtables): Take list of all declared
6220         virtuals. Assign all that are not in primary base.
6221         (check_for_override): Adjust comments.
6222         (create_vtable_ptr): Take single list of virtuals. Build chain
6223         of declared virtuals here.
6224         (layout_class_type): Take single list of virtuals. Adjust.
6225         (finish_struct_1): Keep virtuals on single list. Adjust.
6227 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
6229         * init.c (build_member_call): Use build_new_method_call, not
6230         build_method_call.
6232 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
6234         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
6236 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
6238         * call.c (build_method_call): Issue a more helpful error message
6239         about ambiguous method names.
6241 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
6243         * tree.c (build_shared_int_cst): Make cache file scope, and
6244         GTY it.
6246 2002-08-02  Jason Merrill  <jason@redhat.com>
6248         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
6249         (cp_expr_size): New fn.
6250         * call.c (build_over_call): Lose empty class hackery.
6251         (convert_arg_to_ellipsis): Promote non-POD warning to error.
6252         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
6254         * semantics.c (expand_body): Do tree optimization in the function
6255         context, too.
6257 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
6259         * cp-tree.h: Move all warning and flag declarations to c-common.h.
6260         * decl.c: Move all warning and flag variables to c-common.c.
6261         * decl2.c: Move all warning and flag variables to c-common.c.
6262         * lex.c (flag_digraphs): Remove.
6263         (warn_traditional): Now in c-common.c.
6265 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
6267         * call.c (build_field_call): Do not look up the field by name.
6268         (build_method_call): Simplify.
6269         (struct z_candidate): Add access_path and conversion_path.  Remove
6270         basetype_path.
6271         (convert_class_to_reference): Adjust use of
6272         add_function_candidate.
6273         (add_candidate): Add conversion_path argument.
6274         (add_function_candidate): Use it.
6275         (add_conv_dndidate): Likewise.
6276         (build_builtin_candidate): Likewise.
6277         (add_template_candidate_real): Add conversion_path argument.
6278         (add_template_conv_candidate): Likewise.
6279         (add_template_candidate): Likewise.
6280         (build_user_type_conversion_1): Use it.
6281         (build_new_function_call): Remove name lookup code.  Adjust use of
6282         add_template_candidate and add_function_candidate.
6283         (build_new_op): Likewise.
6284         (convert_like_real): Use build_special_member_call.
6285         (build_over_call): Use cand->conversion_path.
6286         (build_special_member_call): New method.
6287         (build_new_method_call): Remove name lookup code.
6288         * cp-tree.def (OFFSET_REF): Update documentation.
6289         (TEMPLATE_ID_EXPR): Likewise.
6290         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
6291         (BASELINK_OPTYPE): Likewise.
6292         (build_new_method_call): Adjust prototype.
6293         (build_special_member_call): New method.
6294         (build_baselink): New method.
6295         (build_offset_ref_call_from_tree): Likewise.
6296         (build_call_from_tree): Likewise.
6297         (finish_qualified_call_expr): Remove.
6298         (finish_call_expr): Adjust prototype.
6299         (build_x_function_call): Remove.
6300         * cvt.c (ocp_convert): Use build_special_member_call.
6301         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
6302         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
6303         CALL_EXPR.
6304         (build_offset_ref_call_from_tree): New function.
6305         (build_call_from_tree): Likewise.
6306         * init.c (expand_cleanup): Use build_special_member_call.
6307         (expand_default_init): Likewise.
6308         (build_member_call): Use finish_call_expr.
6309         (build_new_1): Use build_special_member_call.
6310         (push_base_cleanups): Likewise.
6311         * method.c (do_build_assign_ref): Likewise.
6312         * parse.y (template_id): Do not pass a COMPONENT_REF to
6313         lookup_template_function.
6314         (primary): Use parse_finish_call_epxr, not finish_call_expr.
6315         (parse_finish_call_expr): New function.
6316         * pt.c (lookup_template_function): Add assertions.
6317         * search.c (lookup_base): Allow T to be a binfo.
6318         (build_baselink): New function.
6319         (lookup_member): Use it.
6320         * semantics.c (finish_call_expr): Do not do name lookup.
6321         (finish_object_call_expr): Remove #if 0'd code.
6322         (finish_qualified_call_expr): Remove.
6323         * typeck.c (build_x_function_call): Remove.
6324         (build_static_case): Use build_special_member_call.
6325         * typeck2.c (build_functional_cast): Likewise.
6327 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
6329         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
6331 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
6333         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
6335 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
6337         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
6338         documentation.
6340 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
6342         * cp-tree.h: Comment typo fix.
6344 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
6346         * spew.c (space_for_token): Allocate zeroed memory for a new token
6347         chunk.
6349 2002-07-27  Roger Sayle  <roger@eyesopen.com>
6351         * decl.c (builtin_function_1): No need to explicitly mark
6352         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
6354 2002-07-27  Roger Sayle  <roger@eyesopen.com>
6356         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
6358 2002-07-26  Jason Merrill  <jason@redhat.com>
6360         * call.c (build_over_call): Likewise.
6361         (cp_convert_parm_for_inlining): New fn.
6362         (convert_for_arg_passing): New fn.
6363         (convert_default_arg, build_over_call): Use it.
6364         (type_passed_as): New fn.
6365         * pt.c (tsubst_decl): Use it.
6366         * decl2.c (cp_build_parm_decl): New fn.
6367         (build_artificial_parm): Use it.
6368         (start_static_storage_duration_function): Likewise.
6369         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
6370         (grokparms): Don't mess with DECL_ARG_TYPE.
6371         * typeck.c (convert_arguments): Use convert_for_arg_passing.
6372         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
6373         Define.
6374         * cp-tree.h: Declare new fns.
6376 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
6378         * cp-tree.h (flag_operator_names): Remove.
6379         * decl2.c (flag_operator_names): Remove.
6380         (lang_f_options): Remove operator-names.
6381         * lex.c (D_OPNAME): Remove.
6382         (reswords): Remove operator names.
6383         (rid_to_yy): Remove operator names.
6384         (init_reswords): No need to handle D_OPNAME.
6385         * spew.c (read_process_identifier): There are no operator
6386         names.
6388 2002-07-26  Jason Merrill  <jason@redhat.com>
6390         * dump.c (cp_dump_tree): Call c_dump_tree.
6391         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
6393 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
6395         * error.c (print_whitespace): Remove.
6396         * g++spec.c (LIBUNWIND): Move.
6397         * mangle.c (mangled_position, write_signed_number): Remove.
6399 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
6401         * decl2.c (cxx_decode_option): Similarly.
6403 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
6405         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
6406         (cxx_sizeof_or_alignof_type): Take a third argument.
6407         (cxx_sizeof): Adjust definition.
6408         (cxx_alignof): Likewise.
6409         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
6410         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
6411         complaining.
6412         (c_sizeof_nowarn): Remove definition.
6413         (build_unary_op): Use cxx_sizeof_nowarn.
6415 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
6417         * tree.c (cp_build_qualified_type_real): When copying
6418         pointer-to-method types, unshare the record that holds
6419         the cached pointer-to-member-function type.
6421 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
6423         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
6425 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
6427         Fix PR/7363:
6428         * typeck.c (cxx_sizeof_or_alignof_type): New function.
6429         (c_sizeof): Remove definition.
6430         (expr_sizeof): Use cxx_sizeof.
6431         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
6432         * decl.c (finish_destructor_body): Use cxx_sizeof.
6433         * semantics.c (finish_alignof): Likewise.
6434         (finish_alignof): Use cxx_alignof.
6435         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
6436         (cxx_sizeof_or_alignof_type): Declare.
6437         (my_friendly_assert): Move to ../c-common.h.
6439 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
6441         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
6443 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6445         PR c++/7347, c++/7348
6446         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
6447         * decl.c (make_typename_type): Use it.
6448         (make_unbound_class_template): Likewise.
6449         (lookup_name_real): Don't call type_access_control if scope is
6450         template parameter dependent.
6451         * parse.y (template_arg): Call make_unbound_class_template with
6452         tf_parsing set.
6453         (nest_name_specifier): Call make_typename_type with tf_parsing set.
6454         (typename_sub0): Likewise.
6455         (typename_sub1): Likewise.
6456         (instantiate_decl): Push class scope.
6457         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
6458         for both static variable and member function template.
6459         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
6460         and arguments.
6461         * search.c (type_access_control): Do type access for TEMPLATE_DECL
6462         too.
6464 2002-07-20  Roger Sayle  <roger@eyesopen.com>
6466         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
6467         test by using positive_option.  Make whitespace consistent.
6469 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
6471         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
6472         members with 'locus'.  Adjust use throughout.
6473         (struct feed):  Likewise.
6474         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
6475         Adjust use.
6476         (snarf_defarg): Use error(), not error_with_file_and_line().
6478 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
6480         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
6481         cpp_options is included.
6483 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6485         PR c++/2862, c++/2863
6486         * pt.c (determine_specialization): Compare the length of
6487         TYPE_ARG_TYPES.  Tidy.
6489 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6491         PR c++/3797
6492         * decl.c (duplicate_decls): Don't propagate inlining parameters from
6493         olddecl to newdecl when newdecl is a specialization of the
6494         instantiation olddecl.
6496 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6498         PR c++/4802, c++/5387
6499         * decl.c (make_typename_type): Use enforce_access.
6501 2002-07-17  Scott Snyder <snyder@fnal.gov>
6503         PR c++/7320
6504         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
6506 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
6508         * class.c (add_method): Correct handling of conversion operators.
6510 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
6512         PR c++/7224
6513         * class.c (add_method): Simplify.
6515 2002-07-11  Jason Merrill  <jason@redhat.com>
6517         PR c++/7279
6518         * tree.c (cp_copy_res_decl_for_inlining): Also copy
6519         TREE_ADDRESSABLE.
6521 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
6523         * pt.c (template_parm_this_level_p, push_template_decl_real):
6524         Pass depth as int pointer.
6526 2002-07-11  Tim Josling  <tej@melbpc.org.au>
6528         Remove front end hard coding from gengtype.c.
6530         * config-lang.in (gtfiles): Add files needed for this front end.
6532 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
6534         * cp-tree.h (unqualified_name_lookup_error): Declare it.
6535         (begin_function_definition): Adjust prototype.
6536         * lex.c (unqualified_name_lookup_error): New function, split out
6537         from ...
6538         (do_identifier): ... here.
6539         * parse.y (parse_begin_function_definition): New function.
6540         (fn.def1): Use it.
6541         * semantics.c (begin_function_definition): Accept decl-specifiers
6542         and attributes as separate parameters.
6544 2002-07-10  Jason Merrill  <jason@redhat.com>
6546         PR c++/6255
6547         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
6548         modifying the old one.
6550 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
6552         * cp-tree.h (constructor_name_p): Declare it.
6553         (check_template_template_default_arg): Likewise.
6554         * class.c (handle_using_decl): Use constructor_name_p.
6555         * decl.c (grokdeclarator): Likewise.
6556         * decl2.c (constructor_name_p): Define it.
6557         * init.c (build_member_call): Use constructor_name_p.
6558         * parse.y (template_parm): Use check_template_template_default_arg.
6559         * pt.c (check_explicit_specialization): Use constructor_name_p.
6560         * semantics.c (check_template_template_default_arg): New function.
6562 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6564         * pt.c (can_complete_type_without_circularity): Add static to
6565         function definition.
6567 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
6569         * cp-tree.h (have_extern_spec): Declare it
6570         * decl.c (have_extern_spec): Define it.
6571         (start_decl): Eliminate use of used_extern_spec.
6572         (start_function): Likewise.
6573         * parse.y (have_extern_spec): Remove declaration.
6574         (used_extern_spec): Likewise.
6575         (frob_specs): Eliminate use of used_extern_spec.
6576         (.hush_warning): Likewise.
6578 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
6580         * Make-lang.in (cp/parse.o): Depend on decl.h.
6581         * cp-tree.h (do_decl_instantiation): Change prototype.
6582         * parse.y: Include decl.h.
6583         (parse_decl_instantiation): New function.
6584         (explicit_instantiation): Use it.
6585         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
6586         and DECLSPECS.
6588 2002-07-07  Roger Sayle  <roger@eyesopen.com>
6590         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
6591         constructor and destructor tests when passed a TEMPLATE_DECL.
6593 2002-07-05  Jason Merrill  <jason@redhat.com>
6595         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
6596         pointers.
6598         PR optimization/7145
6599         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
6601 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
6603         Repair damage on weak-impared targets caused by my previous patch.
6604         * cp-tree.h (import_export_tinfo): Add parameter.
6605         * decl2.c (import_export_tinfo): Add parameter, post adjust
6606         DECL_COMDAT.
6607         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
6608         import_export_tinfo.
6610 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6612         PR c++/6944
6613         * init.c (build_aggr_init): Remove qualifiers of init before calling
6614         build_vec_init.
6615         (build_vec_init): Flatten multi-dimensional array during cleanup.
6616         (build_vec_delete_1): Abort if the type of each element is array.
6618 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
6620         * pt.c (instantiate_class_template): Fix typo.
6622 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6624         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
6625         by CVS conflict in my last patch.
6627 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6629         PR c++/6716
6630         * pt.c (can_complete_type_without_circularity): New function.
6631         (instantiate_class_template): Use it.
6632         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
6633         message due to incomplete fields.
6635 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
6637         PR c++/7112
6638         * mangle.c (write_expression): Add mangling for sizeof when
6639         applied to a type.
6640         * operators.def: Remove stale comment.
6642 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
6644         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
6645         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
6646         (tinfo_decl_type): Replace with ...
6647         (type_info_ptr_type): ... this.
6648         (import_export_tinfo): Declare.
6649         (tinfo_decl_p): Rename to ...
6650         (unemitted_tinfo_decl_p): ... this.
6651         * decl2.c (import_export_decl): Break out tinfo handling into ...
6652         (import_export_tinfo): ... here. New function.
6653         (finish_file): Adjust.
6654         * rtti.c (TINFO_REAL_NAME): New macro.
6655         (init_rtti_processing): Create the tinfo types.
6656         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
6657         (get_tinfo_decl): Adjust.
6658         (get_tinfo_ptr): New function.
6659         (get_type_id): Use it.
6660         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
6661         (ptr_initializer): Use get_tinfo_ptr.
6662         (ptm_initializer): Likewise.
6663         (synthesize_tinfo_var): Break into ...
6664         (get_pseudo_ti_init): ... this. Just create the initializer.
6665         (get_pseudo_ti_desc): .. and this.
6666         (create_real_tinfo_var): Remove.
6667         (create_pseudo_type_info): Don't create the vtable decl here.
6668         (get_vmi_pseudo_type_info): Remove.
6669         (create_tinfo_types): Adjust.
6670         (tinfo_decl_p): Rename to ...
6671         (unemitted_tinfo_decl_p): ... here. Adjust.
6672         (emit_tinfo_decl): Adjust. Create the initializer.
6674 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
6676         PR c++/6695
6677         * pt.c (tsubst_friend_class): Substitute into the context of the
6678         friend before using it.
6680 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
6682         * cp-tree.h (xref_tag): Change prototype.
6683         (handle_class_head): Likewise.
6684         (build_x_component_ref): Likewise.
6685         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
6686         (xref_tag): Take attributes as a separate parameter.
6687         (xref_tag_from_type): Adjust call to xref_tag.
6688         * decl2.c (build_expr_from_tree): Adjust call to
6689         build_x_component_ref.
6690         (handle_class_head): Take attributes as a separate parameter.
6691         * parse.y (parse_xref_tag): New function.
6692         (parse_handle_class_head): Likewise.
6693         (primary): Use parse_xref_tag.
6694         (class_head_decl): Use parse_handle_class_head.
6695         (class_head_defn): Likewise.
6696         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
6697         (build_dynamic_cast_1): Likewise.
6698         (create_pseudo_type_info): Likewise.
6699         (emit_support_tinfos): Likewise.
6700         * typeck.c (build_object_ref): Adjust call to
6701         build_x_component_ref.
6702         (build_x_component_ref): Remove protect parameter.
6704 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
6706         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
6707         * class.c (handle_using_decl): Likewise.
6708         (instantiate_type): Likewise.
6709         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
6710         (xref_basetypes): Change prototype.
6711         (begin_mem_initializers): New function.
6712         (get_overloaded_fn): Likewise.
6713         * decl.c (xref_basetypes): Simplify.
6714         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
6715         * init.c (build_offset_ref): Likewise.
6716         * parse.y (base_init): Use begin_mem_initializers().
6717         (structsp): Adjust call to xref_basetypes.
6718         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
6719         (instantiate_class_template): Adjust call to xref_basetypes.
6720         * semantics.c (begin_mem_initializers): New function.
6721         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
6722         (really_overlaoded_fn): Likewise.
6723         (get_overloaded_fn): New function.'
6724         (get_first_fn): USe BASELINK_FUNCTIONS.
6726 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
6728         * cp-tree.h (SCALAR_TYPE_P): New macro.
6729         (check_for_out_of_scope_variable): New function.
6730         (at_class_scope_p): Likewise.
6731         (finish_fname): Likewise.
6732         * class.c (finish_struct): Use at_function_scope_p.
6733         * decl.c (check_for_out_of_scope_variable): New function, split
6734         out from do_identifier.
6735         (finish_enum): Use at_function_scope_p.
6736         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
6737         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
6738         (primary): Use at_function_scope_p.
6739         * search.c (at_class_scope_p): New function.
6740         * semantics.c (finish_fname): Likewise.
6741         (check_multiple_declarators): Use at_function_scope_p.
6743 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
6745         * parse.y (parse_scoped_id): New function.
6746         (primary): Use it.
6747         * cp-tree.h (do_scoped_id): Adjust declaration.
6748         * lex.c (do_scoped_id): Remove call to yylex.
6749         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
6750         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
6751         expanding it inline.
6753 2002-06-23  Matt Thomas  <matt@3am-software.com>
6755         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
6756         "#if VMS_TARGET".
6758 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6760         * mangle.c (integer_type_codes): Const-ify.
6762 2002-06-20  Richard Henderson  <rth@redhat.com>
6764         PR c++/6747
6765         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
6766         Call put_var_into_stack.
6768 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6770         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
6771         array size calculation.
6773 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6775         PR c++/6892
6776         * pt.c (tsubst_expr): Handle FILE_STMT.
6778 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6780         PR c++/6723
6781         * pt.c (lookup_template_class): Don't build complete argument of
6782         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
6783         argument.
6785 2002-06-19  Akim Demaille  <akim@epita.fr>
6787         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
6788         decl.h's TYPENAME.
6789         * spew.c, lex.c: Adjust.
6790         * parse.y (explicit_instantiation): Add empty action to override
6791         the default $$ = $1 where it introduces a type clash.
6793 2002-06-14  Jason Merrill  <jason@redhat.com>
6795         * semantics.c (begin_for_stmt): Push the 'for' scope before
6796         adding the FOR_STMT.
6798         C++ ABI changes.
6799         * class.c (build_base_field): Set DECL_PACKED.
6800         (layout_class_type): Don't use tail padding of PODs.
6801         * mangle.c (write_unqualified_name): Fix template conversion op
6802         mangling.
6804 2002-06-16  Richard Henderson  <rth@redhat.com>
6806         PR opt/6793
6807         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
6808         after template instantiation.
6810 2002-06-16  Richard Henderson  <rth@redhat.com>
6812         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
6814 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
6816         * cp-tree.h (compiler_error): Remove declaration.
6817         * lex.c (compiler_error): Remove definition.
6819 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
6821         * g++spec.c (LIBUNWIND): New.
6822         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
6824 2002-06-13  Jessica Han  <jessica@cup.hp.com>
6826         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
6827         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
6828         (build_vbase_offset_vtbl_entries): Likewise.
6829         * rtti.c (build_headof): Likewise.
6830         (get_tinfo_decl_dynamic): Likewise.
6831         (create_pseudo_type_info): Likewise.
6833 2002-06-12  Stan Shebs  <shebs@apple.com>
6835         * mpw-config.in: Remove file, no longer used.
6836         * mpw-make.sed: Ditto.
6838 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
6840         * decl2.c: Update call to cpp_handle_option.
6842 2002-06-07  H.J. Lu  (hjl@gnu.org)
6844         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
6846 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
6848         * error.c (cp_error_at): Fix typo.
6850 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
6852         * error.c (cp_diagnostic_starter): Adjust call.
6853         (maybe_print_instantiation_context): Change prototype to take a
6854         'diagnostic_info *'.
6855         (print_instantiation_full_context): Likewise.
6856         (print_instantiation_partial_context): Likewise.
6857         (cp_diagnostic_starter): Likewise.
6858         (cp_diagnostic_finalizer): Likewise.
6859         (cp_print_error_function): Likewise.
6860         (cp_printer): Take a secondary parameter as a 'text_info *'.
6861         Remove output_state savings.  Adjust calls.
6863 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
6865         * pt.c (inline_parm_levels): Mark for GC.
6867         * mangle.c (start_mangling): Allocate G.substitutions here...
6868         (init_mangle): ... rather than here.
6869         (finish_mangling): Clear the varray pointer when done with it.
6870         * spew.c (yylexstring): Don't use VARRAY_FREE.
6871         * search.c (bfs_walk): Don't use VARRAY_FREE.
6872         * decl2.c (pending_statics): Use gengtype to mark.
6873         (deferred_fns): Likewise.
6874         (ssdf_decls): Likewise.
6875         (init_decl2): Delete.
6876         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
6877         (cxx_init_decl_processing): Don't call init_decl2.
6878         (cxx_pop_function_context): Don't use VARRAY_FREE.
6879         * cp-tree.h (struct saved_scope): No need for special marking
6880         of varrays.
6881         (struct language_function): Likewise.
6882         (local_classes): Use gengtype to mark.
6883         (init_decl2): Delete prototype.
6884         * class.c (init_class_processing): Don't use
6885         ggc_add_tree_varray_root.
6886         (build_vtbl_initializer): Don't use VARRAY_FREE.
6888         * decl.c (typename_compare): Don't use same_type_p.
6890         * decl.c: Include hashtab.h instead of hash.h.
6891         (typename_hash): Update to use htab_h.
6892         (typename_compare): Likewise.
6893         (typename_htab): Use gengtype to mark.
6894         (build_typename_type): Update to use htab_h.
6895         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
6897         * Make-lang.in (gt-cp-tree.h): New rule.
6898         (cp/tree.o): Depend on gt-cp-tree.h.
6899         * config-lang.in (gtfiles): Add cp/tree.c.
6900         * tree.c: Include gt-cp-tree.h.
6901         (list_hash_table): Use gengtype to mark.
6902         (init_tree): Use gengtype to mark trees.
6904         * Make-lang.in (cp/decl.o): Add debug.h dependency.
6905         * call.c (struct z_candidate): Use gengtype.
6906         (USER_CONV_CAND): Use WRAPPER_ZC.
6907         (convert_class_to_reference): Use build_zc_wrapper.
6908         (build_type_conversion_1): Likewise.
6909         (build_over_call): Use WRAPPER_ZC.
6910         (add_warning): Use build_zc_wrapper.
6911         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
6912         * cp-tree.h (struct lang_identifier): Use gengtype.
6913         (struct template_parm_index_s): Likewise.
6914         (struct ptrmem_cst): Likewise.
6915         (struct tree_binding): Likewise.
6916         (struct tree_overload): Likewise.
6917         (struct tree_srcloc): Likewise.
6918         (struct tree_wrapper): Likewise.  Also modify to have a pointer
6919         to struct z_candidate rather than void.
6920         (enum cp_tree_node_structure_enum): New.
6921         (union lang_tree_node): New.
6922         (cxx_mark_tree): Delete prototype.
6923         (cp_tree_node_structure): New prototype.
6924         (build_ptr_wrapper): Delete prototype.
6925         (build_int_wrapper): Delete prototype.
6926         (build_zc_wrapper): New prototype.
6927         * decl.c: Include debug.h
6928         (cxx_mark_tree): Delete.
6929         (cp_tree_node_structure): New.
6930         * tree.c (build_ptr_wrapper): Delete.
6931         (build_int_wrapper): Delete.
6932         (build_zc_wrapper): New.
6934         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
6935         Correct typo.  Patch from k_fukui@highway.ne.jp.
6937         * semantics.c (current_stmt_tree): Update for change to
6938         struct language_function.
6939         (finish_mem_initializers): Likewise.
6940         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
6941         * cp-tree.h (struct language_function): Rename from
6942         cp_language_function.  Change all uses.
6943         (cp_function_chain): Don't need to cast.
6945         * class.c (duplicate_tag_error): Reset discriminator.
6946         (check_bases_and_members): Update for data structure changes.
6947         * cp-tree.h (struct lang_id2): Use gengtype.
6948         (flagged_type_tree): Likewise.
6949         (SET_LANG_ID): Use GGC on struct lang_id2.
6950         (struct cp_language_function): Use gengtype.  Remove field
6951         'x_vcalls_possible_p'.
6952         (current_vcalls_possible_p): Delete.
6953         (struct lang_type_header): New.
6954         (struct lang_type_class): Rename from struct lang_type.  Include
6955         struct lang_type_header.
6956         (struct lang_type_ptrmem): New.
6957         (struct lang_type): New.
6958         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
6959         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
6960         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
6961         (struct lang_decl_flags): Use gengtype.  Add discriminators.
6962         (struct lang_decl): Use gengtype.  Add and use discriminators.
6963         Update the macros that reference moved fields.
6964         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
6965         (SET_DECL_THUNK_P): Set discriminator too.
6966         (clear_inline_text_obstack): Delete prototype.
6967         (finish_inline_definitions): Delete prototype.
6968         (mark_pending_inlines): Delete prototype.
6969         (lang_check_failed): New prototype.
6970         * decl.c (struct named_label_use_list): Use gengtype.
6971         (struct named_label_list): Likewise.
6972         (mark_binding_level): Delete.
6973         (mark_named_label_lists): Delete.
6974         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
6975         (cxx_init_decl_processing): Use generated marker routine.
6976         (begin_destructor_body): Delete dead set to
6977         current_vcalls_possible_p.
6978         (mark_lang_function): Delete.
6979         (mark_cp_function_context): Delete.
6980         (lang_mark_tree): Use generated marker routines.
6981         * decl2.c (start_objects): Set discriminator when setting
6982         GLOBAL_INIT_PRIORITY.
6983         * lex.c (retrofit_lang_decl): Set discriminators.
6984         (copy_lang_type): Update for changes to lang_type structure.
6985         (cp_make_lang_type): Set discriminator.
6986         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
6987         * search.c: Include ggc.h.
6988         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
6989         (finish_inline_definitions): Delete.
6990         * spew.c (struct token): Use gengtype.
6991         (struct token_chunk): New.
6992         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
6993         (struct feed): Use gengtype.
6994         (feed_obstack): Delete.
6995         (feed): Mark as GC root.
6996         (pending_inlines): Mark as GC root.
6997         (pending_inlines_tail): Likewise.
6998         (processing_these_inlines): Likewise.
6999         (token_obstack): Make static.
7000         (first_token): Likewise.
7001         (init_spew): Don't initialize deleted things; use gengtype for roots.
7002         (clear_inline_text_obstack): Delete.
7003         (feed_input): Use GC for struct feed.  Update for changes to
7004         struct unparsed_text.
7005         (mark_pending_inlines): Delete.
7006         (next_token): Rename from add_token.  Change all callers.  Update
7007         for changes to struct unparsed_text.
7008         (space_for_token): New.
7009         (remove_last_token): New.
7010         (alloc_unparsed_text): New.
7011         (snarf_block): Take an unparsed_text.  Update for changes to struct
7012         unparsed_text.
7013         (snarf_method): Update for changes to struct unparsed_text.
7014         (snarf_defarg): Update for changes to struct unparsed_text.
7015         * tree.c (lang_check_failed): New.
7017         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
7018         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
7019         (cp/spew.o): Add dependency on gt-<filename>.h.
7020         (cp/decl2.o): Add dependency on gt-<filename>.h.
7021         (cp/call.o): Add dependency on gt-<filename>.h.
7022         (cp/pt.o): Add dependency on gt-<filename>.h.
7023         (cp/repo.o): Add dependency on gt-<filename>.h.
7024         (cp/parse.o): Add dependency on gt-<filename>.h.
7025         * call.c: Use gengtype for roots.
7026         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
7027         decl2.c parse.y pt.c repo.c spew.c.
7028         * cp-tree.h: Use gengtype for roots.
7029         (struct saved_scope): Use GGC, gengtype.
7030         (cp_parse_init): Delete prototype.
7031         (init_pt): Delete prototype.
7032         * decl.c: Use gengtype for roots.
7033         (mark_saved_scope): Delete.
7034         (cxx_init_decl_processing): Don't call deleted initilisation
7035         routines.
7036         (signed_size_zero_node): Delete, unused.
7037         * decl.h: Use gengtype for roots.
7038         * decl2.c: Use gengtype for roots.
7039         * lex.h: Use gengtype for roots.
7040         * parse.y: Use gengtype for roots.
7041         (cp_parse_init): Delete.
7042         * pt.c: Use gengtype for roots.
7043         (init_pt): Delete.
7044         * repo.c: Use gengtype for roots.
7045         * spew.c: Use gengtype for roots.
7047         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
7048         (cp/decl.o): Add dependency on gtype-cp.h.
7049         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
7050         Include gtype-cp.h.  Allow for filename changes.
7052         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
7053         (cp/decl.o): Add cp/gt-decl.h dependency.
7054         * config-lang.in (gtfiles): New.
7055         * tree.h: Rename struct binding_level to struct cp_binding_level.
7056         * decl.c: Rename struct binding_level to struct cp_binding_level.
7057         Include cp/gt-decl.h.
7058         (struct cp_binding_level): Use gengtype.
7059         (make_binding_level): Use GGC on struct cp_binding_level.
7060         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
7061         (cxx_init_decl_processing): Mark free_binding_level as
7062         deletable.
7064         * decl.c (mark_cp_function_context): Update calling sequence.
7066         * decl.c (start_function): Don't free 'struct
7067         cp_language_function'.
7068         (pop_cp_function_context): Likewise.
7069         (save_function_data): Allocate it using GC.
7070         * semantics.c (genrtl_start_function): Don't free 'struct
7071         cp_language_function'.
7073 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
7075         * lang-specs.h: Use cpp_debug_options.
7077 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
7079         * mangle.c, tree.c: Include real.h.
7080         * Make-lang.in: Update dependency lists.
7082 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7084         * lex.c: Don't include c-lex.h.
7085         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
7087 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
7089         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
7091 2002-05-22  Richard Henderson  <rth@redhat.com>
7093         * decl.c (obscure_complex_init): Check for VAR_DECL
7094         before using DECL_THREAD_LOCAL.
7096 2002-05-22  Richard Henderson  <rth@redhat.com>
7098         * decl.c (check_tag_decl): Handle RID_THREAD.
7099         (obscure_complex_init): Reject run-time init of tls.
7100         (grokvardecl, grokdeclarator): Handle RID_THREAD.
7101         * lex.c (reswords): Add __thread.
7102         (rid_to_yy): Map RID_THREAD to SCSPEC.
7104 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
7106         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
7107         * cp-tree.h (cxx_post_options): Kill.
7108         * cp-lex.c (cxx_post_options): Kill.
7110 2002-05-21  Richard Henderson  <rth@redhat.com>
7112         * lex.c (rid_to_yy): Add RID_THREAD.
7114 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
7116         * init.c (build_vec_init): Test for trivial copy-assignment when
7117         copy-assigning arrays.
7119 2002-05-20  Andreas Jaeger  <aj@suse.de>
7121         * init.c (build_default_init): Remove unused variable.
7123 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
7125         * call.c (any_strictly_viable): New.
7126         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
7128 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7130         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
7132 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7134         PR c++/186, DR 259
7135         * pt.c (do_decl_instantiation): Don't complain explicit
7136         instantiation after explicit specialization.
7137         (do_type_instantiation): Likewise.
7139 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
7141         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
7142         renamed from...
7143         (complete_type_or_else): ... this.  Redefined as macro.
7144         (cxx_incomplete_type_diagnostic): Declare.
7145         (cxx_incomplete_type_error): Define as macro.
7146         * init.c (build_delete): Warn about incomplete types other than
7147         void, and use the built-in operator delete for them.
7148         * typeck.c (complete_type_or_diagnostic): Renamed from
7149         complete_type_or_else.  Added warn_only argument, passed to...
7150         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
7151         warnings or errors depending on new warn_only argument.  Renamed
7152         from...
7153         (cxx_incomplete_type_error): ... this.  New implementation in
7154         terms of cxx_incomplete_type_diagnostic.
7156 2002-05-18  Jason Merrill  <jason@redhat.com>
7158         PR c++/6611
7159         * decl2.c (import_export_decl): If we clear
7160         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
7162 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7164         PR c++/6620
7165         * pt.c (verify_class_unification): Don't check if PARM is template
7166         parameter dependent.  Simplify.
7167         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
7168         parameter dependent expression.
7170 2002-05-14  Jason Merrill  <jason@redhat.com>
7172         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
7173         Do set DECL_COMDAT.
7174         (synthesize_tinfo_var): Take the public decl.
7175         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
7176         (emit_tinfo_decl): Adjust.  Call import_export_decl.
7177         * decl2.c (import_export_decl): Simplify tinfo decl handling.
7179 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
7181         * cp-tree.h (struct lang_type): Added non_zero_init.
7182         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
7183         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
7184         * class.c (check_field_decls): Test non_zero_init.
7185         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
7186         zero-to-NULL conversions.
7187         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
7188         type that needs zero-initialization without zeros.
7189         (check_initializer_decl): Compute zero-initializer for types
7190         that require a non-trivial one.
7191         * init.c (build_forced_zero_init): New function.
7192         (build_default_init): Use it.
7193         * tree.c (zero_init_p): New function.
7194         * typeck2.c (force_store_init_value): New function.
7195         (process_init_constructor): Create non-trivial zero-initializers
7196         for array members and class fields.
7198 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
7200         * lang-specs.h: Remove redundant -lang-c++.
7202 2002-05-13  Jason Merrill  <jason@redhat.com>
7204         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
7205         (fixed_type_or_null): See through reference vars.
7206         (build_base_path): Vtable contents are constant.
7207         * typeck.c (get_member_function_from_ptrfunc): Likewise.
7209 2002-05-12  Jason Merrill  <jason@redhat.com>
7211         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
7212         structs are safe.
7214 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
7216         * cp-tree.h (flag_ansi): Remove.
7217         * decl2.c (flag_ansi): Remove.
7218         (cxx_decode_option): Set flag_iso and flag_undef.
7220 2002-05-09  Jason Merrill  <jason@redhat.com>
7222         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
7223         Use subtraction rather than a bitmask to get the index.
7224         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
7226         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
7228 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
7230         * Make-lang.in (decl2.o): Update.
7231         * cp-tree.h (warn_multichar): Remove.
7232         * decl2.c: Include c-common.h.
7233         (warn_multichar): Remove.
7235 2002-05-03  Jason Merrill  <jason@redhat.com>
7237         * tree.c (build_cplus_array_type): Only const and volatile get
7238         special handling.
7240         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
7242 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
7244         ABI change, returning simple classes from functions.
7245         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
7246         TYPE_HAS_TRIVIAL_INIT_REF is false or
7247         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
7249 2002-04-30  Jason Merrill  <jason@redhat.com>
7251         PR debug/6436
7252         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
7253         anonymous class with a typedef if there are attributes.
7255 2002-04-29  Paul Eggert  <eggert@twinsun.com>
7257         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
7259 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
7261         PR c++/6477
7262         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
7263         non-NULL first.
7265 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
7267         PR c++/6492
7268         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
7269         enter that scope before name lookup.
7271         PR c++/6486
7272         * method.c (do_build_copy_constructor): Avoid building
7273         cv-qualified reference types.
7275 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
7277         PR c++/5719
7278         * decl.c (grok_op_properties): Assignment ops don't have to return
7279         by value. operator% should.
7281 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
7283         PR c/6343
7284         * decl.c (duplicate_decls): Call merge_weak.
7286 2002-04-26  Richard Henderson  <rth@redhat.com>
7288         * parse.y (malloced_yyss, malloced_yyvs): New.
7289         (yyoverflow): Re-add.  Set them.
7290         (free_parser_stacks): New.
7292 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
7294         PR c++/6497
7295         * method.c (do_build_assign_ref): Pass a derivation to
7296         build_method_call when calling base class assignment operators.
7298 2002-04-26  Richard Henderson  <rth@redhat.com>
7300         * parse.y (yyoverflow): Revert.
7302 2002-04-26  Richard Henderson  <rth@redhat.com>
7304         PR c/3581
7305         * parse.y (string): Remove.  Update all uses to use STRING
7306         instead, and not call combine_strings.
7307         * rtti.c (tinfo_name): Use fix_string_type.
7308         * semantics.c (finish_asm_stmt): Don't call combine_strings.
7309         * spew.c (yylexstring): New.
7310         (read_token): Use it.
7312 2002-04-25  Richard Henderson  <rth@redhat.com>
7314         PR c/2161
7315         * parse.y (yyoverflow): New.
7317 2002-04-25  Jason Merrill  <jason@redhat.com>
7319         PR c++/5607
7320         * search.c (check_final_overrider): No longer static.
7321         * class.c (update_vtable_entry_for_fn): Call it.
7322         * cp-tree.h: Adjust.
7324 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7326         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7327         * cp-tree.h (cxx_set_yydebug): Die.
7328         * lex.c (YYDEBUG): Get from c-lex.h.
7329         (cxx_set_yydebug): Remove.
7330         * parse.y: Include c-lex.h.
7331         (YYDEBUG): Get from c-lex.h.
7333 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
7335         PR c++/6438.
7336         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
7337         void.
7339 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
7341         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
7342         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
7343         Redefine.
7344         * cp-tree.h (cp_attribute_table): Rename.
7345         * decl.c (lang_attribute_table): Remove declaration.
7346         (cxx_init_decl_processing): Don't set it.
7347         * tree.c (cp_attribute_table): Rename.
7349 2002-04-24  Jason Merrill  <jason@redhat.com>
7351         PR c++/6331
7352         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
7353         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
7354         The pedwarn for array assignment is now unconditional.
7355         * tree.c (build_cplus_array_type_1): Still process simple array types
7356         normally in templates.
7358         PR c++/6395
7359         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
7360         stuff for comdats.
7362 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
7364         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
7365         node with attributes.
7367 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
7369         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
7370         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
7372 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
7374         PR c++/6256:
7375         * pt.c (tsubst_friend_class): Handle templates with explicit
7376         nested names.
7378         PR c++/6331:
7379         * typeck.c (merge_types): Remember the cv-qualification of pointer
7380         types when merging them.
7382 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7384         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
7385         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
7386         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
7387         cxx_mark_function_context): New.
7388         * decl.c (push_cp_function_context, pop_cp_function_context,
7389         mark_cp_function_context): Rename for consistency.
7390         (cxx_init_decl_processing): Don't set old hooks.
7392 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7394         * call.c (convert_type_from_ellipsis): Rename, update.
7395         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
7396         * cp-tree.h (convert_type_from_ellipsis): Rename.
7397         * decl.c (cxx_init_decl_processing): Don't set hook.
7399 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7401         * call.c (build_new_method_call): Update.
7402         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
7403         * cp-tree.h (cxx_incomplete_type_error): New.
7404         * decl.c (grokdeclarator, grokparms): Update.
7405         * decl2.c (check_classfn): Update.
7406         * pt.c (tsubst): Update.
7407         * typeck.c (complete_type_or_else, expr_sizeof,
7408         decay_conversion): Update.
7409         * typeck2.c (incomplete_type_error): Rename.
7410         (add_exception_specifier): Update.
7412 2002-04-18  Jason Merrill  <jason@redhat.com>
7414         PR c++/5658
7415         * search.c (setup_class_bindings): A class template qualifies as a
7416         type binding.
7418 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
7420         PR c++/6316
7421         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
7422         before expanding.
7424 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
7426         * init.c (begin_init_stmts): Remove commented out code.
7427         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
7428         * semantics.c (begin_gobal_stmt_expr): Adjust call to
7429         expand_start_stmt_expr.
7431 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
7433         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
7434         dso_handle itself, to __cxa_atexit.
7436 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7438         * error.c (cxx_print_error_function): Adjust call to macros.
7440 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
7442         * class.c (layout_virtual_bases): Do all dsize computation on trees.
7444 2002-04-14  Jason Merrill  <jason@redhat.com>
7446         * typeck.c (get_member_function_from_ptrfunc): Don't do
7447         gratuitious division and multiplication on
7448         ptrmemfunc_vbit_in_delta targets.
7450 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
7452         PR c++/5373.
7453         * semantics.c (finish_expr_stmt): Remember the type of the
7454         expression before any conversions are performed.
7456 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
7458         PR c++/5189.
7459         * call.c (add_template_candidate_real): Do not treat member
7460         templates as copy constructors.
7462 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
7464         * decl.c (duplicate_decls): Do not copy the RTL for a variable
7465         declaration if the old variable had an incomplete type and the new
7466         variable does not.
7467         (complete_vars): Do not call layout_decl for completed variables.
7469 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
7471         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
7472         with an explicit one.
7473         (follow_tag_typedef): New.
7474         (lookup_tag): Use it to extract the tag of an explicit typedef.
7475         (xref_tag): Likewise.
7477 2002-04-11  Andrew Haley  <aph@redhat.com>
7479         * typeck.c (type_after_usual_arithmetic_conversions):
7480         If two types have the same variant, return immediately.
7481         When two floating-point operands are the same precision:
7482           convert to float if one of the operands is float;
7483           if neither operand is one of the standard types, return the type
7484           of the first operand.
7486 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
7488         PR c++/5507
7489         * decl.c (make_typename_type): Remove implicit typenameness.
7491 2002-04-09  Jason Merrill  <jason@redhat.com>
7493         PR optimization/6189
7494         * semantics.c (genrtl_start_function): Don't free
7495         DECL_SAVED_FUNCTION_DATA for inline functions.
7497         * init.c (build_member_call): For now, don't convert to
7498         intermediate base if it would cause an error.
7500 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
7502         * parse.y (namespace_qualifier, maybe_identifier,
7503         begin_explicit_instantiation, end_explicit_instantiation,
7504         apparent_template_type, .finish_template_type,
7505         do_id, maybe_init, defarg_again, component_decl_1):
7506         Add ending ';', in accordance with POSIX.
7508 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
7510         PR c++/5571
7511         * class.c (layout_class_type): Remember incomplete static
7512         variables.
7513         (finish_struct_1): Call complete_vars, not
7514         hack_incomplete_structures.
7515         * cp-tree.h (hack_incomplete_structures): Rename to ...
7516         (complete_vars): ... this.
7517         (struct saved_scope): Remove incomplete.
7518         (namespace_scope_incomplete): Remove.
7519         * decl.c (struct binding_level): Remove incomplete.
7520         (incomplete_vars): New variable.
7521         (mark_binding_level): Don't mark incomplete.
7522         (print_binding_level): Don't print it.
7523         (mark_saved_scope): Don't mark incomplete.
7524         (pushdecl): Use maybe_register_incopmlete_var.
7525         (cxx_init_decl_processing): Register incomplete_vars for GC.
7526         (start_decl_1): Clarify error message.
7527         (hack_incomplete_vars): Remove.
7528         (maybe_register_incomplete_var): New function.
7529         (complete_vars): Likewise.
7531 2002-04-06  Jason Merrill  <jason@redhat.com>
7533         PR c++/4934
7534         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
7535         set before checking it.
7537         PR c++/525
7538         * init.c (build_member_call): Use build_scoped_ref.
7539         (resolve_offset_ref): Likewise.
7540         * call.c (build_scoped_method_call): Likewise.
7541         * tree.c (maybe_dummy_object): Kludge around current_class_type being
7542         wrong.
7543         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
7544         * cp-tree.h: Adjust.
7546         * init.c (push_base_cleanups): Just use build_scoped_method_call.
7548         PR c++/6179
7549         * method.c (implicitly_declare_fn): Pass unqualified type to
7550         synthesize_exception_spec.
7552 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7554         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7555         * cvt.c: Update comment.
7556         * init.c (expand_cleanup_for_base): Update.
7557         * semantics.c (finish_parenthesized_expr): Update.
7558         * typeck.c (cp_truthvalue_conversion): Update.
7560 2002-04-04  Jason Merrill  <jason@redhat.com>
7562         * semantics.c (finish_eh_cleanup): New fn.
7563         * cp-tree.h: Add prototype.
7564         * init.c (perform_member_init, expand_cleanup_for_base): Use
7565         finish_eh_cleanup.
7566         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
7567         * cp-tree.h: Remove references.
7568         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
7569         * dump.c (cp_dump_tree): Likewise.
7570         * pt.c (tsubst_expr): Likewise.
7571         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
7572         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
7573         * tree.c (cp_statement_code_p): Likewise.
7575         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
7577         PR c++/5636
7578         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
7579         cleanup for nrv.
7581         PR c++/5104
7582         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
7583         specifiers.
7584         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
7586 2002-04-03  Richard Henderson  <rth@redhat.com>
7588         * cp-lang.c (cxx_warn_unused_global_decl): New.
7589         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
7591 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
7593         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
7594         * tree.c (init_tree): Don't set hook.
7596 2002-04-03  Roger Sayle  <roger@eyesopen.com>
7598         PR c++/5998:
7599         * decl.c (duplicate_decls): Don't mess with assembler names when
7600         redeclaring builtin functions as static.
7602 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7604         * call.c (build_addr_func): Update.
7605         * class.c (resolve_address_of_overloaded_function): Update.
7606         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7607         * cp-tree.h (cxx_mark_addressable): New.
7608         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
7609         * decl2.c (build_cleanup): Update.
7610         * except.c (build_throw): Update.
7611         * init.c (resolve_offset_ref): Update.
7612         * pt.c (convert_nontype_argument): Update.
7613         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
7614         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
7615         unary_complex_lvalue): Update.
7616         (mark_addressable): Rename.
7618 2002-04-01  Roger Sayle  <roger@eyesopen.com>
7620         PR c++/5998:
7621         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
7622         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
7623         but follow the SET_DECL_RTL idiom used elsewhere in the function.
7625 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7627         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
7628         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
7629         * decl.c (grokdeclarator): Update.
7630         * mangle.c (write_integer_cst): Update.
7631         * typeck.c (build_binary_op): Update.
7633 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7635         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
7636         * lex.c (cxx_init): Don't set hook.
7638 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
7640         * Make-lang.in (error.o): Update.
7641         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
7642         * cp-tree.h (struct diagnostic_context): Predeclare.
7643         (cxx_print_error_function): New.
7644         * error.c: Include langhooks-def.h.
7645         (lang_print_error_function): Rename.  Update.
7646         (init_error): Don't set hook.
7648 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7650         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
7651         Redefine.
7652         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
7653         * decl.c (finish_enum): Similarly.
7654         * error.c (dump_type): Similarly.
7655         * lex.c (cxx_init): Similarly.
7656         * mangle.c (write_builtin_type): Similarly.
7657         * typeck.c (comptypes): Similarly.
7659 2002-03-28  Roger Sayle  <roger@eyesopen.com>
7661         PR c++/5998:
7662         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
7663         in the g++ front-end.
7664         (duplicate_decl): Allow redefinition of anticipated built-ins.
7665         Fix inlining problem by over-writing the old DECL_RTL.
7666         (lookup_namespace_name): Fail to find an identifier in the
7667         specified namespace if its still anticipated.
7668         (builtin_function_1): New function split out from builtin_function
7669         to create a builtin in the current namespace with given context.
7670         (builtin_function): Call builtin_function_1 to define the
7671         appropriate builtins in both the std and global namespaces.
7672         (select_decl): Don't test for anticipated decls here.
7673         (unqualified_namespace_lookup): Instead ignore them whilst
7674         searching through scopes and namespaces.
7675         * decl2.c (do_nonmember_using_decl): If a using declaration
7676         specifies an anticipated built-in function, mark it as no longer
7677         anticipated in that scope.
7678         (ambiguous_decl):  Avoid resolving to an anticipated decl.
7679         * lex.c (do_scoped_id): Fail to find an identifier in the global
7680         namespace if its still anticipated.
7682 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
7684         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
7685         * cp-tree.h (cp_make_lang_type): Rename.
7686         * lex.c (cp_make_lang_type): Rename.
7687         (make_aggr_type): Update.
7688         * tree.c (init_tree): Don't set make_lang_type_fn.
7690 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
7692         PR c++/6073
7693         * class.c (finish_struct_1): Update static field's DECL_MODE even
7694         if its type is a variant of t.
7696 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7698         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
7699         * cp-tree.h (cxx_insert_default_attributes): New.
7700         * decl.c (insert_default_attributes): Rename.
7702 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
7704         PR c++/4884
7705         * call.c (build_op_delete_call): Allow for the fact the placement
7706         may be a COMPOUND_EXPR.
7708 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
7710         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
7711         * cp-tree.h (init_cplus_expand): Remove.
7712         (cxx_expand_expr): New.
7713         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
7714         fix prototype.
7715         (init_cplus_expand): Remove.
7716         * lex.c (cxx_init): Don't call init_cplus_expand.
7718 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
7720         PR c++/4884.
7721         * init.c (build_new_1): Allow for the fact the result of
7722         build_function_call may be a COMPOUND_EXPR.
7724 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
7726         PR c++/5682
7727         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
7728         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7729         (dfs_skip_nonprimary_vbases_markedp): Remove.
7730         * search.c (get_shared_vbase_if_not_primary): Remove.
7731         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
7732         (dfs_skip_nonprimary_vbases_markedp): Remove.
7733         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
7734         (dfs_marked_real_bases_queue_p): Likewise.
7736 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
7738         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
7739         * cp-tree.h (cxx_mark_tree): New.
7740         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
7742 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7744         * cp-tree.h (cxx_maybe_build_cleanup): New.
7745         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
7746         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
7747         * tree.c (build_target_expr): Update.
7748         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
7750 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
7752         * decl2.c (cxx_decode_option): Handle -E.
7753         * lang-specs.h (default_compilers): Preprocess with cc1plus.
7754         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
7756 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
7758         PR c++/6037
7759         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
7761 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7763         * error.c (dump_type): Be careful about implicit typenames.
7765 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7767         PR C++/3656
7768         * semantics.c (finish_base_specifier): Handle erronous base
7769         classes.
7771 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
7773         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
7774         REAL_IS_NOT_DOUBLE.
7776 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
7778         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
7779         an index into the vtable_entry array regardless of
7780         TARGET_PTRMEMFUNC_VBIT_LOCATION.
7782 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
7784         * tree.c (cp_cannot_inline_tree_fn): Same.
7786 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
7788         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
7789         insert_block, getdecls, global_bindings_p): New.
7791 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
7793         PR c++/4361
7794         * mangle.c (struct globals) Add internal_mangling_p member.
7795         (write_template_param): Do internal mangling, if needed.
7796         (mangle_conv_op_name_for_type): Request internal mangling.
7798 2002-03-20  Jason Merrill  <jason@redhat.com>
7800         PR c++/2136
7801         * init.c (build_delete): Check access for a member op delete here.
7802         * decl2.c (delete_sanity): Not here.
7804 2002-03-19  Jason Merrill  <jason@redhat.com>
7806         PR c++/5118
7807         * class.c (get_vfield_name): Use the constructor_name.
7809 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7811         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
7812         * cp-tree.h (lang_printable_name): Rename.
7813         * error.c (lang_decl_name): Use new hook.
7814         * lex.c (cxx_init): Remove old hook.
7815         * pt.c (tsubst_decl): Use new hook.
7816         * tree.c (lang_printable_name): Rename.
7818 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
7820         PR c++/3882
7821         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
7822         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
7823         only after recording the declaration.
7825 2002-03-18  Jason Merrill  <jason@redhat.com>
7827         PR c++/2039
7828         * init.c (resolve_offset_ref): Hand off to build_component_ref.
7830         PR c++/4222, c++/5995
7831         * call.c (build_over_call): Fix empty class logic.
7833         PR c++/3870
7834         * cp-tree.h (struct saved_scope): Add last_parms field.
7835         * decl.c (maybe_push_to_top_level): Save last_function_parms.
7836         (pop_from_top_level): Restore it.
7838         PR c++/4377
7839         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
7840         NON_LVALUE_EXPRs.
7842         PR c++/4003
7843         * pt.c (tsubst_friend_function): Use decl_namespace_context.
7845         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
7846         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
7847         type with a nontrivial destructor.
7849 2002-03-17  Jason Merrill  <jason@redhat.com>
7851         PR c++/4460
7852         * class.c (build_base_path): Virtual base layout is fixed in
7853         in-charge [cd]tors.
7855 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
7857         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
7858         * parse.y (yyparse): Remove macro.
7860 2002-03-17  Jason Merrill  <jason@redhat.com>
7862         PR c++/5757
7863         * init.c (build_new_1): Pass the right pointer to op delete.
7865 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
7867         PR c++/4361
7868         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
7869         conversion operators go.
7870         (struct lang_decl_flags): Add template_conv_p and unused
7871         bitfields.
7872         (DECL_TEMPLATE_CONV_FN_P): New macro.
7873         * call.c (build_user_type_conversion_1): Don't check second type
7874         conversion of overload set first.
7875         * class.c (add_method): Make sure templated conversion operators
7876         all end up on slot 2.
7877         * lex.c (do_identifier): A conversion operator token might be
7878         satisfied by a templated conversion operator.
7879         * pt.c (check_explicit_specialization): Use
7880         CLASSTYPE_FIRST_CONVERSION_SLOT.
7881         (template_parm_this_level_p): New function.
7882         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
7883         * search.c (lookup_fnfields_1): Template conversions will be on
7884         the first slot.
7885         * typeck.c (build_component_ref): Preserve the type of an
7886         conversion operator name on the overload type.
7887         (build_x_function_call): Retrieve the conversion operator name.
7889 2002-03-15  Richard Henderson  <rth@redhat.com>
7891         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
7893 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
7895         * cp-tree.h (CLEANUP_DECL): Remove.
7896         (CLEANUP_EXPR): Likewise.
7897         * decl.c (destroy_local_var): Simplify.
7898         (maybe_build_cleanup): Tidy.
7899         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
7900         * semantics.c (cp_expand_stmt): Likewise.
7901         * cp/tree.c (cp_statement_code_p): Likewise.
7903 2002-03-15  Jason Merrill  <jason@redhat.com>
7905         PR c++/5857
7906         * decl.c (duplicate_decls): Use merge_types instead of common_type.
7907         * typeck.c (common_type): Just hand off to
7908         type_after_usual_arithmetic_conversions and
7909         composite_pointer_type.
7910         (merge_types): New fn.
7911         (commonparms): Use it instead of common_type.
7912         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
7913         (composite_pointer_type): Also handle attributes.
7914         * cp-tree.h: Declare merge_types.
7916         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
7917         variables.
7918         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
7920 2002-03-14  Richard Henderson  <rth@redhat.com>
7922         * decl.c: Include c-pragma.h.
7923         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
7924         * Make-lang.in: Update dependencies.
7926 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
7928         PR c++/5908
7929         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
7930         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
7932 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
7934         * mangle.c (write_builtin_type): Handle 128-bit integers even if
7935         they are not a standard integer type.
7937 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
7939         * cp-tree.h (init_init_processing): Remove declaration.
7940         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
7941         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
7943 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7945         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
7946         Define.
7947         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
7948         tree_code_length.
7949         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
7950         cplus_tree_code_name): Delete.
7951         (cxx_init): Don't call add_c_tree_codes, instead set
7952         lang_unsafe_for_reeval.  Don't try to copy into the various
7953         tree_code arrays.
7955 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
7957         PR c++/5659
7958         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
7959         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
7960         definitions.
7962 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
7964         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
7965         DR209 is now not a defect.
7966         * cp-tree.h (skip_type_access_control): Remove.
7967         * decl.c (grokdeclarator): Do type access control for friend
7968         declarations.
7969         * semantics.c (decl_type_access_control): Don't reset
7970         current_type_lookups.
7971         (save_type_access_control): Always save the lookups.
7972         (skip_type_access_control): Remove.
7973         (finish_class_definition): Don't change type_lookups.
7975 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
7977         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
7978         It is incorrect.
7979         * typeck.c (build_static_cast): Compare non-qualified types
7980         with pointer to member conversions.
7982 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
7983             Daniel Berlin  <dan@dberlin.org>
7985         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
7986         (cxx_get_alias_set): Use it.
7988 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7990         * cp-tree.h (stabilize_expr): Prototype.
7992 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
7994         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
7995         conditional return void.
7997 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
7999         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
8000         * cp-tree.h (cxx_unsave): New.
8001         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
8002         (init_tree): Update.
8004 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8006         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
8007         explicit sizeof/sizeof.
8008         * decl2.c (cxx_decode_option): Likewise.
8009         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
8011 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8013         PR c++/775
8014         * decl.c (lookup_tag): Only reject enum/class mismatch, not
8015         class/union mismatch.
8016         * parse.y (check_class_key): New function.
8017         (structsp): Call it.
8019 2002-03-01  Michael Matz  <matz@suse.de>
8021         * typeck.c (cp_pointer_int_sum): Complete inner type which is
8022         used later by size_in_bytes().
8024 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
8026         * cp-tree.h:  Require __GNUC__ to be #defined.
8027         (build_init):  Add missing prototype.
8029 2002-03-01  Jason Merrill  <jason@redhat.com>
8031         * except.c: Don't include decl.h or obstack.h.  Do include
8032         tree-inline.h.
8033         (build_throw): Destroy temporaries from the thrown
8034         expression before calling __cxa_throw.  Construct a thrown
8035         temporary directly into the exception object.
8036         (stabilize_throw_expr): New function.
8037         (wrap_cleanups_r): New function.
8038         * tree.c (stabilize_expr): New function.
8039         * init.c (build_init): New function.
8040         * Make-lang.in (cp/except.o): Adjust .h deps.
8042 2002-02-28  Jason Merrill  <jason@redhat.com>
8044         * search.c (lookup_base_r): Don't clear is_non_public just because
8045         we found a friendly scope.
8047         * decl.c (finish_function): Only warn about missing return
8048         statement with -Wreturn-type.
8050 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
8052         * class.c (build_clone): Update.
8053         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8054         * cp-tree.h (cxx_dup_lang_specific_decl): New.
8055         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
8056         (copy_decl): Update.
8057         * method.c (make_thunk): Update.
8059 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
8061         * decl2.c: Delete traditional-mode-related code copied from
8062         the C front end but not used, or used only to permit the
8063         compiler to link.
8065 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
8067         PR c++/4093
8068         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
8069         to void.
8071 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
8073         PR other/5746
8074         * semantics.c (finish_switch_cond): Don't call get_unwidened
8075         if error_mark_node.
8077 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
8079         PR c++/2645, DR 295
8080         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
8081         tf_keep_type_decl.
8082         (make_typename_type): Use tsubst_flags_t.
8083         * decl.c (make_typename_type): Adjust. Return non-artificial
8084         TYPE_DECLs, if required.
8085         (grokdeclarator): Simplify CVR qualification handling. Allow bad
8086         qualifiers on typedef types.
8087         * decl2.c (handle_class_head): Adjust make_typename_type call.
8088         * parse.y (nested_name_specifier): Likewise.
8089         (typename_sub0): Likewise.
8090         (typename_sub1): Likewise.
8091         * pt.c (convert_template_argument): Adjust make_typename_type
8092         return value.
8093         (tsubst): Adjust cp_build_qualified_type_real calls.
8094         (check_cv_quals_for_unify): Cope with allowing bad qualifications
8095         on template type parms.
8096         (instantiate_decl): Recheck substitutions to give warnings on bad
8097         qualifications.
8098         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
8100 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
8102         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
8104         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
8105         unless DECL_ALWAYS_INLINE.
8107 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
8109         * typeck.c (cp_pointer_int_sum): Renamed from
8110         pointer_int_sum, call pointer_int_sum.
8112 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
8114         * decl.c (duplicate_decls): Return 0 if issued error about
8115         redeclaration.
8117 2002-02-19  Jason Merrill  <jason@redhat.com>
8119         ABI change: Mangle `void (A::*)() const' as
8120         M1AKFvvE, not MK1AFvvE.
8121         * mangle.c (write_function_type): Write cv-quals for member
8122         function type here.
8123         (write_pointer_to_member_type): Not here.
8125 2002-02-18  Jason Merrill  <jason@redhat.com>
8127         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
8128         (do_decl_instantiation): Likewise.
8130 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8132         PR c++/5685
8133         * decl.c (duplicate_decls): Make warning unconditional
8134         if duplicate default argument declarations are present.
8136 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
8138         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
8139         shortening.
8141 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
8143         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
8144         remove incorrect comment. Move #if 0'd code to common path. Use
8145         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
8147 2002-02-13  Jason Merrill  <jason@redhat.com>
8149         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
8150         (finish_function): Don't warn if current_function_returns_null.
8152         * typeck2.c (digest_init): Do handle values of vector type.
8154         * typeck2.c (digest_init, process_init_constructor): Treat vectors
8155         like arrays.
8157 2002-02-11  Jason Merrill  <jason@redhat.com>
8159         * parse.y (reserved_declspecs): Don't handle attributes.
8160         (reserved_typespecquals): Handle them here.
8161         * Make-lang.in (parse.c): Adjust expected conflicts.
8163 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
8165         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
8166         instead of compstmt.
8167         (compstmt_or_stmtexpr): Renamed from compstmt.
8168         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
8170 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
8172         Rename instantiate_type_flags to tsubst_flags_t & expand use.
8173         * cp-tree.h (instantiate_type_flags): Rename to ...
8174         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
8175         add tf_warning flag.
8176         (instantiate_type): Adjust prototype.
8177         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
8178         do_type_instantiation, cp_build_qualified_type_real): Likewise.
8179         cp_build_qualified_type: Adjust.
8180         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
8181         tf_*.
8182         * call.c (standard_conversion): Rename itf_* to tf_*.
8183         (reference_binding): Likewise.
8184         (convert_like_real): Likewise.
8185         * cvt.c (cp_convert_to_pointer): Likewise.
8186         (convert_to_reference): Likewise.
8187         * decl.c (lookup_namespace_name): Use tf_* flags.
8188         (make_typename_type): Likewise.
8189         (grokdeclarator): Likewise.
8190         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
8191         (coerce_template_template_parms, convert_template_argument,
8192         coerce_template_parms, maybe_get_template_decl_from_type_decl,
8193         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
8194         instantiate_class_template, tsubst_template_arg_vector,
8195         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
8196         tsubst_decl, tsubst_arg_types, tsubst_function_type,
8197         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
8198         instantiate_template, fn_type_unification,
8199         resolve_overloaded_unification, verify_class_unification,
8200         unify, get_bindings_real, do_type_instantiation,
8201         regenerate_decl_from_template, instantiate_decl,
8202         tsubst_initializer_list, tsubst_enum,
8203         get_mostly_instantiated_function_type,
8204         invalid_nontype_parm_type_p): Likewise.
8205         * tree.c (cp_build_qualified_type_real): Likewise.
8206         * typeck.c (build_binary_op): Rename itf_* to tf_*.
8207         (build_ptrmemfunc): Likewise.
8208         (convert_for_assignment): Likewise.
8210 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
8212         PR c++/109
8213         * decl.c (grokdeclarator): Allow friend declarations from
8214         dependent types.
8215         * decl2.c (handle_class_head): Don't push into template parm contexts.
8216         * pt.c (push_template_decl_real): Template parm contexts are never
8217         being defined.
8219 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
8221         * class.c: Include target.h.
8222         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
8223         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
8224         bit-field layout.
8225         * Make-lang.in: Adjust deps.
8227 2002-02-05  Jason Merrill  <jason@redhat.com>
8229         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
8231 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
8233         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
8234         (finish_switch_cond): Set SWITCH_TYPE.
8236 2002-02-04  Richard Henderson  <rth@redhat.com>
8238         * method.c (use_thunk): Always initialize the block tree.  Reindent.
8239         * semantics.c (expand_body): Emit thunks after function, not before.
8241 2002-02-04  Jason Merrill  <jason@redhat.com>
8243         * decl.c (start_function): Call cplus_decl_attributes immediately
8244         after grokdeclarator.
8246         * decl.c (start_function): Combine DECL_RESULT handling code.
8248 2002-02-03  Jason Merrill  <jason@redhat.com>
8250         * xref.c: Remove.
8251         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
8252         (cp/xref.o): Remove dependencies.
8253         * class.c (finish_struct_1, check_methods): Don't call xref fns.
8254         (finish_struct_1): Likewise.
8255         * friend.c (make_friend_class): Likewise.
8256         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
8257         * spew.c (read_process_identifier): Likewise.
8259 2002-02-01  Jason Merrill  <jason@redhat.com>
8261         PR c++/4872
8262         * decl.c (finish_function): Warn about a non-void function with
8263         no return statement and no abnormal exit.
8264         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
8265         (current_function_returns_abnormally): New macro.
8266         * call.c (build_call): Set it.
8268         * typeck.c (build_component_ref): Always complain about offsetof
8269         constructs on non-PODs.  Only make it an error for members of
8270         virtual bases.
8272         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
8273         (dump_function_decl): Always dump parms.
8275         * decl2.c (finish_static_data_member_decl): Complain about a local
8276         class with a static data member.
8278         PR c++/4286
8279         * search.c (lookup_field_1): Don't xref a static data member
8280         just because we looked it up.
8282 2002-01-31  Jason Merrill  <jason@redhat.com>
8284         * Make-lang.in (parse.c): Handle .output file.
8286         PR c++/3395
8287         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
8288         not TREE_TYPE.
8289         * semantics.c (finish_class_definition): Adjust.
8291         Allow attributes in parms and casts.
8292         * parse.y (named_parm): Don't strip attrs.
8293         (declmods): Remove 'attributes' production.
8294         (nonempty_cv_qualifiers): Accept attributes.
8295         (ATTRIBUTE): Give precedence.
8296         * decl.c (groktypename): Handle attributes.
8297         (grokparms): Likewise.
8299 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
8301         * decl2.c (cxx_decode_option): Pass 0 as last argument to
8302         cpp_handle_option.
8303         * lang-specs.h: Use cpp_unique_options instead of cpp_options
8304         when used together with cc1_options.
8306 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
8308         PR c++/5132
8309         * typeck2.c (digest_init): Make sure non-array core type is
8310         instantiated.
8311         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
8312         constructor, rather than build a new one.
8313         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
8314         PURPOSE of constructor elts.
8316 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
8318         * Make-lang.in (parse.c): Adjust expected number of
8319         shift-reduce conflicts.
8320         (decl.o): Depend on diagnostic.h.
8321         * decl.c: Include diagnostic.h.
8322         (grokdeclarator): Check for null pointer.
8323         (finish_function): Don't abort when
8324         current_binding_level->parm_flag != 1, if errors have
8325         occurred; throw away the statement tree and extra binding
8326         levels, and continue.
8327         * lex.c (note_list_got_semicolon): Check for null pointer.
8328         * method.c (hack_identifier): Just return error_mark_node if
8329         value is error_mark_node.
8330         * parse.y (primary: TYPEID(type_id)): No need to use
8331         TYPE_MAIN_VARIANT here.
8332         (handler_seq): Accept an empty list of catch clauses and
8333         generate a fake handler block to avoid later crashes.
8334         (ansi_raise_identifier): Accept the error token too.
8335         * semantics.c (begin_class_definition,
8336         finish_class_definition): Check for error_mark_node.
8338 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
8340         * typeck2.c (friendly_abort): Delete definition.
8341         * cp-tree.h (friendly_abort): Don't prototype.
8342         (my_friendly_assert): Use fancy_abort.
8344 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8346         * cp-tree.h (my_friendly_abort): Remove.
8348 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
8350         * spew.c (pending_inlines, pending_inlines_tail,
8351         processing_these_inlines): Make static.
8352         (mark_pending_inlines): Remove static.
8353         (begin_parsing_inclass_inline): If in function, save pi
8354         for GC to cp_function_chain->unparsed_inlines instead.
8355         (process_next_inline): Likewise.
8356         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
8357         (mark_pending_inlines): Add prototype.
8358         * decl.c (spew_debug): Remove unused extern.
8359         (mark_lang_function): Call mark_pending_inlines.
8361 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8363         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
8364         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
8365         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
8366         Change my_fancy_abort() to abort().
8368 2002-01-23  Jason Merrill  <jason@redhat.com>
8370         PR c++/5453
8371         * class.c (fixed_type_or_null): Fix thinko.
8373         PR c++/3331
8374         * init.c (resolve_offset_ref): Use build_indirect_ref.
8376         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
8378 2002-01-22  Jason Merrill  <jason@redhat.com>
8380         * parse.y (function_body): Suppress the block for the outermost
8381         curly braces.
8382         * decl.c (pushdecl): Don't try to skip it.
8383         (begin_function_body): Keep the block we create, not the next one.
8384         * init.c (emit_base_init): Don't mess with keep_next_level.
8386         * class.c (build_base_path): Tweak formatting.
8388 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8390         Fix regression introduced with patch for c++/775
8391         * parse.y (class_head_defn): Check for template specializations
8392         with a different class-key.
8394 2002-01-17  Jason Merrill  <jason@redhat.com>
8396         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
8397         (begin_function_body): Call them and keep_next_level.
8398         * init.c (emit_base_init): Call keep_next_level.
8399         * semantics.c (setup_vtbl_ptr): Lose.
8400         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
8401         (vtbls_set_up_p): Lose.
8402         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
8403         * method.c (do_build_copy_constructor): Likewise.
8404         (synthesize_method): Call finish_mem_initializers.
8405         * parse.y (nodecls): Likewise.
8407         * error.c (dump_type_suffix): Print the exception specs before
8408         recursing.
8409         (dump_function_decl): Here, too.
8411         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
8413 2002-01-10  Ira Ruben   <ira@apple.com>
8415         PR c++/907
8416         * decl.c (start_method): Handle attrlist.
8418 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
8420         * decl2.c (max_tinst_depth): Increase default limit to 500.
8422 2002-01-10  Graham Stott  <grahams@redhat.com>
8424         * spew.c (YYCHAR): Uppercase macro parameter and add
8425         parenthesis.
8426         (YYCODE): Likewise.
8427         (NAME): Uppercase macro parameter.
8429 2002-01-09  Graham Stott  <grahams@redhat.com>
8431         * decl.h (grokdeclarator): Wrap long line.
8433         * semantics.c (FINISH_COND): Uppercase macro paramaters and
8434         add parenthesis.
8436 2002-01-08  Graham Stott  <grahams@redhat.com>
8438         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
8439         (PALLOC): Uppercase macro parameter and whitespace.
8440         (SALLOC): Uppercase macro parameter.
8441         (SFREE): Uppercase macros parameter, add parenthese and
8442         whitespace.
8443         (STREQL): Uppercase macro parameter and whitespace.
8444         (STRNEQ): Likewise.
8445         (STRLSS): Likewise.
8446         (STRLEQ): Likewise.
8447         (STRGTR): Likewise.
8448         (STRGEQ): Likewise.
8450         * call.c (convert_like): Add parenthesis and wrap.
8451         (convert_like_with_context): Likewise.
8452         (ICS_RANK): Whitespace.
8453         (NEED_TEMPORARY_P): Remove parenthesis.
8455         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
8456         whitespace.
8457         (VTT_MARKED_BINFO_P): Likewise.
8459         * decl.c (BINDING_LEVEL): Add parenthesis.
8460         (DEF_OPERATOR): Likewise.
8462         * mangle.c (MANGLE_TRACE): Add parenthesis.
8463         (MANGLE_TRACE_TREE): Likewise.
8464         (write_signed_number): Likewise.
8465         (write_unsigned_number): Likewise.
8467         * pt.c (ccat): Uppercase macro parameter.
8468         (cat): Likewise
8470         * search.c (SET_BINFO_ACCESS): Add parenthesis.
8472 2002-01-07  Jason Merrill  <jason@redhat.com>
8474         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
8475         to pedwarn.
8477         PR c++/3536
8478         * method.c (make_thunk): If !flag_weak, give the thunk the
8479         function's linkage.
8480         (use_thunk): Here, too.
8482 2002-01-07  Graham Stott  <grahams@redhat.com>
8484         * error.c: Update copyright date.
8485         (print_scope_operator): Add parenthesis.
8486         (print_left_paren): Likewise.
8487         (print_right_paren): Likewise.
8488         (print_left_bracket): Likewise.
8489         (print_right_bracket): Likewise.
8490         (print_template_argument_list_start): Likewise.
8491         (print_template_argument_list_end): Likewise.
8492         (print_non_consecutive_character): Likewise.
8493         (print_tree_identifier): Likewise.
8494         (print_identifier): Likewise.
8495         (NEXT_CODE): Uppercase macro parameter.
8496         (ident_fndecl): Delete unused.
8497         (GLOBAL_THING): Likewise.
8499 2002-01-06  Graham Stott  <grahams@redhat.com>
8501         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
8502         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
8503         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
8504         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
8505         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
8506         (C_IS_RESERVED_WORD): Uppercase macro parameter.
8507         (C_RID_YYCODE) Likewise.
8508         (ptrmem_cst): Use rtx.
8509         (LOCAL_BINDING_P): Add whitespace.
8510         (INHERITED_VALUE_BINDING_P): Likewise.
8511         (BINDING_SCOPE): Wrap long line.
8512         (BINDING_HAS_LEVEL_P): Remove parenthesis.
8513         (BINDING_VALUE): Wrap long line.
8514         (BINDING_TYPE): Whitespace.
8515         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
8516         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
8517         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
8518         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
8519         (same_type_p): Uppercase macro parameters.
8520         (same_type_ignoring_top_level_qualifiers_p): Likewise.
8521         (OVL_FUNCTION): Wrap long line.
8522         (OVL_CHAIN): Whitespace.
8523         (OVL_CURRENT): Add parenthesis and whitespace.
8524         (OVL_NEXT): Whitespace.
8525         (OVL_USED): Likewise.
8526         (IDENTIFIER_TYPE_VALUE): Likewise.
8527         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
8528         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
8529         (LANG_ID_FIELD): Whitespace.
8530         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
8531         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
8532         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
8533         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
8534         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
8535         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
8536         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
8537         (IDENTIFIER_VIRTUAL_P): Likewise.
8538         (IDENTIFIER_OPNAME_P): Likewise.
8539         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
8540         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
8541         (C_SET_EXP_ORIGINAL_CODE): Likewise.
8542         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
8543         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
8544         (IS_AGGR_TYPE): Uppercase macro parameter.
8545         (CLASS_TYPE_P): Likewise.
8546         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
8547         (IS_AGGR_TYPE_2): Whitespace.
8548         (TAGGED_TYPE_P): Uppercase macro parameter.
8549         (TYPE_BUILT_IN): Whitespace.
8550         (TYPE_FOR_JAVA): Likewise.
8551         (FUNCTION_ARG_CHAIN): Remove parenthesis.
8552         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
8553         (FUNCTION_FIRST_USER_PARAM): Likewise.
8554         (PROMOTES_TO_AGGR_TYPE): Whitespace.
8555         (DERIVED_FROM_P): Add parenthesis and wrap.
8556         (UNIQUELY_DERIVED_FROM_P): Likewise.
8557         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
8558         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
8559         (CLASSTYPE_USE_TEMPLATE): Whitespace.
8560         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
8561         (TYPE_GETS_DELETE): Add parenthesis.
8562         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
8563         (TYPE_HAS_ASSIGN_REF): Likewise,
8564         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
8565         (TYPE_HAS_INIT_REF): Likewise.
8566         (TYPE_HAS_CONST_INIT_REF): Likewise.
8567         (TYPE_BEING_DEFINED): Likewise.
8568         (TYPE_LANG_SPECIFIC): Likewise.
8569         (CLASSTYPE_RTTI): Likewise.
8570         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
8571         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
8572         (TYPE_OVERLOADS_ARROW): Likewise.
8573         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
8574         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
8575         (CLASSTYPE_METHOD_VEC): Likewise.
8576         (CLASSTYPE_MARKED_N): Likewise.
8577         (CLASSTYPE_MARKED): Likewise.
8578         (CLASSTYPE_MARKED2): Likewise.
8579         (CLASSTYPE_MARKED3): Likewise.
8580         (CLASSTYPE_MARKED4): Likewise.
8581         (CLASSTYPE_MARKED5): Likewise.
8582         (CLASSTYPE_MARKED6): Likewise.
8583         (SET_CLASSTYPE_MARKED): Whitespace.
8584         (CLEAR_CLASSTYPE_MARKED): Likewise.
8585         (SET_CLASSTYPE_MARKED2): Likewise.
8586         (CLEAR_CLASSTYPE_MARKED2): Likewise.
8587         (SET_CLASSTYPE_MARKED3): Likewise.
8588         (CLEAR_CLASSTYPE_MARKED3): Likewise.
8589         (SET_CLASSTYPE_MARKED4): Likewise.
8590         (CLEAR_CLASSTYPE_MARKED4): Likewise.
8591         (SET_CLASSTYPE_MARKED5): Likewise.
8592         (CLEAR_CLASSTYPE_MARKED5): Likewise.
8593         (SET_CLASSTYPE_MARKED6): Likewise.
8594         (CLEAR_CLASSTYPE_MARKED6): Likewise.
8595         (CLASSTYPE_TAGS): Likewise.
8596         (CLASSTYPE_VSIZE): Likewise.
8597         (CLASSTYPE_VBASECLASSES): Likewise.
8598         (CANONICAL_BINFO): Add parenthesis.
8599         (CLASSTYPE_SIZE(NODE): Likewise.
8600         (CLASSTYPE_SIZE_UNIT): Likewise.
8601         (CLASSTYPE_ALIGN(NODE): Likewise.
8602         (CLASSTYPE_USER_ALIGN): Likewise.
8603         (TYPE_JAVA_INTERFACE): Likewise.
8604         (CLASSTYPE_PURE_VIRTUALS): Likewise.
8605         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
8606         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
8607         (CLASSTYPE_HAS_MUTABLE): Likewise.
8608         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
8609         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
8610         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
8611         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
8612         (CLASSTYPE_INTERFACE_ONLY): Likewise.
8613         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8614         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8615         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8616         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8617         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8618         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
8619         (BINFO_UNSHARED_MARKED): Whitespace.
8620         (BINFO_MARKED): Whitespace and wrap.
8621         (SET_BINFO_MARKED): Likewise.
8622         (CLEAR_BINFO_MARKED): Likewise.
8623         (BINFO_VTABLE_PATH_MARKED): Likewise.
8624         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
8625         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
8626         (BINFO_SUBVTT_INDEX): Remove parenthesis.
8627         (BINFO_VPTR_INDEX): Likewise.
8628         (BINFO_PRIMARY_BASE_OF): Likewise,
8629         (CLASSTYPE_VFIELDS): Whitespace.
8630         (VF_DERIVED_VALUE): Wrap long line.
8631         (NAMESPACE_LEVEL): Whitespace.
8632         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
8633         (DEFARG_POINTER): Whitespace.
8634         (DECL_NEEDED_P): Remove parenthesis.
8635         (DECL_LANGUAGE): Whitespace.
8636         (SET_DECL_LANGUAGE): Add parenthesis.
8637         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
8638         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
8639         (DECL_IN_AGGR_P): Whitespace.
8640         (DECL_FRIEND_P): Likewise.
8641         (DECL_BEFRIENDING_CLASSES): Likewise.
8642         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
8643         (DECL_NONCONVERTING_P): Whitespace.
8644         (DECL_PURE_VIRTUAL_P): Likewise.
8645         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
8646         (DECL_PENDING_INLINE_INFO): Whitespace.
8647         (DECL_SORTED_FIELDS): Likewise.
8648         (DECL_DEFERRED_FN): Likewise.
8649         (DECL_TEMPLATE_INFO): Likewise.
8650         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
8651         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
8652         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
8653         (TMPL_ARGS_LEVEL): Likewise.
8654         (SET_TMPL_ARGS_LEVEL): Likewise.
8655         (INNERMOST_TEMPLATE_PARMS): Whitespace.
8656         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
8657         (INTEGRAL_CODE_P(CODE): Add parenthesis.
8658         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
8659         (TYPE_HAS_CONSTRUCTOR): Whitespace.
8660         (TREE_HAS_CONSTRUCTOR): Likewise.
8661         (TYPE_HAS_DESTRUCTOR): Likewise.
8662         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
8663         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
8664         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
8665         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
8666         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
8667         (TYPE_PTRMEMFUNC_P): Likewise.
8668         (TYPE_PTRMEMFUNC_FLAG): Likewise.
8669         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
8670         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
8671         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
8672         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
8673         (DECL_ACCESS): Whitespace.
8674         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
8675         (DECL_GLOBAL_DTOR_P): Likewise.
8676         (GLOBAL_INIT_PRIORITY): Likewise.
8677         (DECL_TEMPLATE_PARMS): Likewise.
8678         (DECL_TEMPLATE_RESULT): Likewise.
8679         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
8680         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
8681         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
8682         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
8683         (PRIMARY_TEMPLATE_P): Add parenthesis.
8684         (DECL_USE_TEMPLATE): Whitespace.
8685         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8686         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
8687         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8688         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
8689         (CALL_DECLARATOR_PARMS): Remove parenthesis.
8690         (CALL_DECLARATOR_QUALS): Likewise.
8691         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
8692         (TEMP_NAME_P): Wrap.
8693         (VFIELD_NAME_P): Likewise.
8694         (B_SET): Uppercase macro parameters and add parenthesis.
8695         (B_CLR): Likewise.
8696         (B_TST): Likewise.
8697         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
8698         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
8699         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
8700         (same_or_base_type_p): Likewise.
8701         (cp_deprecated): Likewise.
8703 2002-01-05  Richard Henderson  <rth@redhat.com>
8705         * semantics.c (expand_body): Revert last change.
8707 2002-01-04  Jason Merrill  <jason@redhat.com>
8709         PR c++/4122
8710         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
8711         lost primary.
8713         * class.c (build_vtbl_initializer): Check for a lost primary
8714         before calculating the vtable entry to throw away.
8716 2002-01-02  Jason Merrill  <jason@redhat.com>
8718         * semantics.c (expand_body): Call outlining_inline_function when
8719         emitting an inline function out of line.
8721 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8723         PR c++/5116, c++/764 reversion
8724         * call.c (build_new_op): Revert the instantiations. They are
8725         incorrect.
8727 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8729         PR c++/5089
8730         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
8732 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8734         PR c++/3716
8735         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
8736         (tsubst, case POINTER_TYPE): Handle pmfs here.
8737         (tsubst, case OFFSET_TYPE): Check it is not an offset to
8738         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
8740 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8742         PR c++/35
8743         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
8744         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
8745         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
8746         PARM_DECL.
8747         (tsubst_template_parms): Break up loop statements.
8748         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
8749         parm PARM_DECLs don't get promoted.
8751 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8753         PR c++/5123
8754         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
8755         (build_x_function_call): Cope with a COMPONENT_REF containing a
8756         TEMPLATE_ID_EXPR.
8758 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8760         PR c++/5213
8761         * pt.c (convert_template_argument): Be more careful determining
8762         when RECORD_TYPE templates are or are not templates.
8764 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8766         PR c++/775
8767         * cp-tree.h (handle_class_head): Adjust prototype.
8768         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
8769         parameters. Use for all class heads.
8770         * parse.y (named_class_head_sans_basetype, named_class_head,
8771         named_complex_class_head_sans_basetype,
8772         named_class_head_sans_basetype_defn,
8773         unnamed_class_head): Remove.
8774         (class_head, class_head_apparent_template): Recognize class heads
8775         (class_head_decl, class_head_defn): New reductions. Process class
8776         heads.
8777         (structsp): Adjust class definition and class declaration
8778         reductions.
8779         (maybe_base_class_list): Give diagnostic on empty list.
8781 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8783         PR c++/4379
8784         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
8785         single non-static member.
8786         (unary_complex_lvalue): If it cannot be a pointer to member, don't
8787         make it so. Check it is not pointer to reference.
8789 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8791         PR c++/5132
8792         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
8793         are processing a template decl.
8795 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
8797         PR c++/5116, c++/764
8798         * call.c (build_new_op): Make sure template class operands are
8799         instantiated. Simplify arglist construction.
8801 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
8803         * call.c (build_user_type_conversion_1): Use my_friendly_assert
8804         rather than if ... abort.
8805         * cvt.c (convert_to_reference): Likewise.
8806         * semantics.c (setup_vtbl_ptr): Likewise.
8807         * pt.c (lookup_template_class): Comment typo.
8809 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
8811         PR c++/5125
8812         * pt.c (push_template_decl_real): Make sure DECL has
8813         DECL_LANG_SPECIFIC.
8815 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
8817         PR c++/335
8818         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
8819         for non-reference fields.
8820         * typeck.c (require_complete_type): Use resolve_offset_ref).
8822 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
8824         PR c++/196
8825         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
8827 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
8829         PR c++/160
8830         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
8831         up. Don't stabilize_references when initializing a reference.
8833 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8835         * decl2.c (lang_f_options): Const-ify.
8837 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
8839         * config-lang.in (diff_excludes): Remove.
8841 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
8843         PR c++/90
8844         * typeck.c (build_function_call_real): Use original function
8845         expression for errors.
8847 2001-12-18  Jason Merrill  <jason@redhat.com>
8849         PR c++/3242
8850         * class.c (add_method): Do compare 'this' quals when trying to match a
8851         used function.  Don't defer to another used function.
8853 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
8855         * pt.c (instantiate_clone): Remove, fold into ...
8856         (instantiate_template): ... here. Simplify by removing mutual
8857         recursion.
8858         * typeck2.c (build_m_component_ref): Don't cv qualify the function
8859         pointed to by a pointer to function.
8860         * class.c (delete_duplicate_fields_1): Typo.
8862 2001-12-18  Jason Merrill  <jason@redhat.com>
8864         C++ ABI change: destroy value arguments in caller.
8865         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
8866         create an extra binding level for the parameters.
8867         * decl.c (store_parm_decls): Don't do parameter cleanups.
8869 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
8871         * call.c (build_new_method_call): Use '%#V'.
8872         * error.c (cv_to_string): Use V parameter to determine padding.
8874 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
8876         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
8877         spellings in messages.
8879 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
8881         * cp-tree.h: Delete #defines for cp_error, cp_warning,
8882         cp_pedwarn, and cp_compiler_error.
8883         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
8884         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
8885         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
8886         typeck2.c: Change calls to the above macros to use their
8887         language-independent equivalents: error, warning, pedwarn, and
8888         internal_error respectively.
8890 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
8892         * decl2.c (finish_file): Remove back_end_hook.
8894 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
8896         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
8897         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
8898         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
8900 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
8902         * lang-options.h: Use American spelling in messages.
8904 2001-12-13  Jason Merrill  <jason@redhat.com>
8906         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
8908         Use cleanups to run base and member destructors.
8909         * init.c (push_base_cleanups): New function, split out from...
8910         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
8911         * decl.c (finish_destructor_body): Move vbase destruction code to
8912         push_base_cleanups.
8913         (begin_function_body, finish_function_body): New fns.
8914         (finish_function): Move [cd]tor handling and call_poplevel to
8915         finish_function_body.
8916         (pushdecl): Skip the new level.
8917         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
8918         (setup_vtbl_ptr): Call push_base_cleanups.
8919         * method.c (synthesize_method): Call {begin,end}_function_body.
8920         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
8921         * cp-tree.h: Declare new fns.
8922         * parse.y (function_body, .begin_function_body): New nonterminals.
8923         (fndef, pending_inline, function_try_block): Use function_body.
8924         (ctor_initializer_opt, function_try_block): No longer has a value.
8925         (base_init): Remove .set_base_init token.
8926         (.set_base_init, compstmt_or_error): Remove.
8927         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
8929         * optimize.c (maybe_clone_body): Fix parameter updating.
8931 2001-12-12  Jason Merrill  <jason@redhat.com>
8933         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
8934         * semantics.c (genrtl_start_function): Don't pass
8935         parms_have_cleanups or push an extra binding level.
8936         (genrtl_finish_function): Lose cleanup_label cruft.
8938         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
8939         (ctor_label): Remove.
8940         * semantics.c (finish_return_stmt): Lose ctor_label support.
8941         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
8942         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
8943         dtor_label.
8945         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
8946         check for [cd]tors.
8947         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
8949         * decl.c (finish_function): Check VMS_TARGET, not VMS.
8951         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
8952         (end_cleanup_fn): And poplevel.
8954         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
8955         if we're in a template.
8957 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
8959         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
8960         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
8961         THIS_NAME_P): Delete.
8962         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
8963         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
8964         with internal naming scheme.
8965         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
8967 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
8969         * decl.c (grokdeclarator): Deprecated implicit typename use.
8971 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
8973         PR g++/51
8974         * parse.y (frob_specs): Indicate it is a language linkage which
8975         contained the extern.
8976         * decl.c (grokdeclarator): Allow extern language linkage with
8977         other specifiers.
8979 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
8981         PR g++/72
8982         * decl.c (add_binding): Don't reject duplicate typedefs involving
8983         template parameters.
8985 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8987         * parse.y, semantics.c: Similarly.
8989 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
8991         PR g++/87
8992         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
8993         (copy_args_p): Rename to ...
8994         (copy_fn_p): ... here.
8995         (grok_special_member_properties): New function.
8996         (grok_op_properties): Lose VIRTUALP parameter.
8997         (copy_assignment_arg_p): Remove.
8998         * call.c (build_over_call): Use copy_fn_p.
8999         * decl.c (grokfndecl): Reformat. Adjust call to
9000         grok_op_properties.
9001         (copy_args_p): Rename to ...
9002         (copy_fn_p): ... here. Reject template functions. Check for pass
9003         by value.
9004         (grok_special_member_properties): Remember special functions.
9005         (grok_ctor_properties): Don't remember them here, just check.
9006         (grok_op_properties): Likewise.
9007         (start_method): Call grok_special_member_properties.
9008         * decl2.c (grokfield): Likewise.
9009         (copy_assignment_arg_p): Remove.
9010         (grok_function_init): Don't remember abstract assignment here.
9011         * pt.c (instantiate_class_template): Call
9012         grok_special_member_properties.
9013         (tsubst_decl): Adjust grok_op_properties call.
9015 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
9017         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
9018         RID_TYPES_COMPATIBLE_P.
9020 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9022         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
9023         call to build_aggr_init.
9024         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
9026 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
9028         * parse.y: Replace uses of the string non-terminal with STRING.
9029         Don't perform string concatentaion here.
9030         (string): Remove non-terminal.
9031         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
9033 2001-12-05  Jason Merrill  <jason@redhat.com>
9035         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
9036         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
9037         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
9038         * pt.c (push_tinst_level): No longer static.
9039         * cp-tree.h: Declare them.
9041         * init.c (resolve_offset_ref): Don't check access for the base
9042         conversion to access a FIELD_DECL.
9044         * cp-tree.h (TYPE_REFFN_P): New macro.
9045         * decl.c (bad_specifiers): Check it, too.
9047         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
9048         on the __*_type_info type if we haven't seen a definition.
9050 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
9052         * decl.c: Include c-common.h.
9053         (shadow_warning): Move to c-common.c.
9055 2001-12-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9057         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
9059 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9061         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
9063 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9065         PR g++/164
9066         * init.c (sort_base_init): Allow binfos to be directly specified.
9067         * method.c (do_build_copy_constructor): Explicitly convert to the
9068         base instance.
9069         (do_build_assign_ref): Likewise.
9071 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
9073         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
9074         declaration and initialization.
9076 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9078         * typeck2.c: Remove leading capital from diagnostic messages, as
9079         per GNU coding standards.
9081 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
9083         PR c++/3394
9084         * decl.c (xref_basetypes): Handle attributes between
9085         'class' and name.
9087 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
9089         PR g++/3381
9090         * parse.y (named_complex_class_head_sans_basetype): Add new
9091         reduction.
9092         * Make-lang.in (parse.c): Adjust expected conflict count.
9094 2001-12-03  Jason Merrill  <jason@redhat.com>
9096         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
9097         immediate binfos for our virtual bases.
9099 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
9101         * call.c (build_java_interface_fn_ref): Similarly.
9102         * except.c (is_admissible_throw_operand): Similarly.
9103         * init.c (build_java_class_ref): Similarly.
9104         * xref.c (open_xref_file): Similarly.
9106 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9108         * class.c (finish_struct): Remove trailing periods from messages.
9109         * decl.c (check_tag_decl): Similarly.
9110         * lex.c (cxx_set_yydebug): Similarly.
9111         * typeck2.c (friendly_abort): Similarly.
9113 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
9115         PR c++/3048
9116         * cp-tree.h (ovl_member): Remove.
9117         * decl2.c (merge_functions): Handle extern "C" functions
9118         specially.
9119         * tree.c (ovl_member): Remove.
9121 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
9123         PR c++/4842
9124         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
9125         FUNCTION_DECL, as input.
9126         (mark_overriders): Remove.
9127         (warn_hidden): Rework for the new ABI.
9129 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
9131         PR c++/3471
9132         * call.c (convert_like_real): Do not build additional temporaries
9133         for rvalues of class type.
9135 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9137         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
9138         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
9139         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
9140         (DERIVED_FROM_P): Likewise.
9141         (enum base_access): Renumber, add ba_quiet bit mask.
9142         (get_binfo): Remove.
9143         (get_base_distance): Remove.
9144         (binfo_value): Remove.
9145         (ACCESSIBLY_DERIVED_FROM_P): Remove.
9146         * call.c (standard_conversion): Use lookup_base.
9147         * class.c (strictly_overrides): Likewise.
9148         (layout_virtual_bases): Likewise.
9149         (warn_about_ambiguous_direct_bases): Likewise.
9150         (is_base_of_enclosing_class): Likewise.
9151         (add_vcall_offset_vtbl_entries_1): Likewise.
9152         * cvt.c (build_up_reference): Adjust comment.
9153         * init.c (build_member_call): Reformat.
9154         * search.c (get_binfo): Remove.
9155         (get_base_distance_recursive): Remove.
9156         (get_base_distance): Remove.
9157         (lookup_base_r): Tweak.
9158         (lookup_base): Add ba_quiet control. Complete the types here.
9159         (covariant_return_p): Use lookup_base.
9160         * tree.c (binfo_value): Remove.
9161         (maybe_dummy_object): Use lookup_base.
9162         * typeck.c (build_static_cast): Use lookup_base.
9163         (get_delta_difference): Likewise.
9164         * typeck2.c (binfo_or_else): Use lookup_base.
9165         (build_scoped_ref): Add back error_mark_check.
9166         (build_m_component_ref): Use lookup_base.
9168 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9170         * Make-lang.in (c++.generated-manpages): New dummy target.
9172 2001-11-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9174         * Make-lang.in (cp-lang.o): Depends on c-common.h.
9175         * cp-lang.c (c-common.h): Include.
9176         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
9177         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
9178         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
9180 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9182         * decl2.c (c_language): Move to c-common.c.
9183         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
9184         functions.
9185         (cxx_init): Update.
9187 2001-11-26  Jason Merrill  <jason@redhat.com>
9189         * call.c (joust): Remove COND_EXPR hack.
9191 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
9193         * search.c (lookup_base_r): Declare bk in variable declaration
9194         space.
9196 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
9198         PR g++/3145
9199         * class.c (build_vbase_pointer): Remove.
9200         (build_vbase_path): Remove.
9201         (build_base_path): New function.
9202         * cp-tree.h (base_access, base_kind): New enumerations.
9203         (build_base_path): Declare.
9204         (convert_pointer_to_real): Remove.
9205         (convert_pointer_to): Remove.
9206         (lookup_base): Declare.
9207         (convert_pointer_to_vbase): Remove.
9208         * call.c (build_scoped_method_call): Use lookup_base &
9209         build_base_path instead of convert_pointer_to_real,
9210         get_base_distance & get_binfo.
9211         (build_over_call): Likewise.
9212         * cvt.c (cp_convert_to_pointer): Likewise.
9213         (convert_to_pointer_force): Likewise.
9214         (build_up_reference): Likewise.
9215         (convert_pointer_to_real): Remove.
9216         (convert_pointer_to): Remove.
9217         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
9218         instead of convert_pointer_to_vbase & build_vbase_path.
9219         (emit_base_init): Use build_base_path instead of
9220         convert_pointer_to_real.
9221         (expand_virtual_init): Lose unrequired conversions.
9222         (resolve_offset_ref): Use lookup_base and build_base_path
9223         instead of convert_pointer_to.
9224         * rtti.c (build_dynamic_cast_1): Use lookup_base &
9225         build_base_path instead of get_base_distance & build_vbase_path.
9226         * search.c (get_vbase_1): Remove.
9227         (get_vbase): Remove.
9228         (convert_pointer_to_vbase): Remove.
9229         (lookup_base_r): New function.
9230         (lookup_base): New function.
9231         * typeck.c (require_complete_type): Use lookup_base &
9232         build_base_path instead of convert_pointer_to.
9233         (build_component_ref): Likewise.
9234         (build_x_function_call): Likewise.
9235         (get_member_function_from_ptrfunc): Likewise.
9236         (build_component_addr): Likewise.
9237         * typeck2.c (build_scoped_ref): Likewise.
9239 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9241         * cp-tree.h (CP_TYPE_QUALS): Removed.
9242         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
9243         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
9244         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
9245         * dump.c (cp_dump_tree): Use void* dump_info argument to match
9246         lang-hooks prototype.
9247         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
9248         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
9249         CP_TYPE_QUALS changed to cp_type_quals.
9250         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
9251         (CXX_C_OBJS): Remove c-dump.o.
9253 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
9255         PR c++/3637
9256         * pt.c (lookup_template_class): Ensure that all specializations
9257         are registered on the list corresponding to the most general
9258         template.
9260 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
9262         * call.c (non_reference): Add documentation.
9263         (convert_class_to_reference): Do not strip reference types
9264         from conversion operators.
9265         (maybe_handle_ref_bind): Simplify.
9266         (compare_ics): Correct handling of references.
9268 2001-11-19  John Wilkinson <johnw@research.att.com>
9270         * dump.c (dump_op): New function.
9271         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
9272         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
9273         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
9275 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
9277         PR4629
9278         * semantics.c (finish_sizeof): Make sure that expression created
9279         while processing a template do not have a type.
9280         (finish_alignof): Likewise.
9281         * typeck.c (c_sizeof): Likewise.
9282         (expr_sizeof): Likewise.
9284 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9286         * lex.c (cxx_finish): Call c_common_finish.
9287         (finish_parse): Remove.
9289 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9291         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
9292         when displaying error message about missing array bounds.
9294 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9296         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
9297         CONST_CAST_EXPR.
9298         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
9300 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
9302         * cp-tree.h (print_class_statistics): Restore.
9304 2001-11-15  Jason Merrill  <jason@redhat.com>
9306         * method.c (use_thunk): Don't emit debugging information for thunks.
9308         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
9309         * decl.c (make_typename_type): Handle getting a class template.
9310         * search.c (lookup_field_r): A class template is good enough for
9311         want_type.
9313         * call.c (convert_like_real): Only use cp_convert for the bad part.
9314         (standard_conversion): Also allow bad int->enum.
9315         * typeck.c (ptr_reasonably_similar): Also allow functions to
9316         interconvert.  Pointers to same-size integers are reasonably
9317         similar.
9319         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
9320         give it void type.
9322 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9324         PR g++/3154
9325         * init.c (sort_base_init): Remove unreachable code.
9326         (expand_member_init): Adjust comment to reflect reality. Simplify
9327         and remove unreachable code.
9329 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
9331         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
9332         (cxx_init): Update prototype.
9333         * decl.c (init_decl_processing): Rename.  Move null node init
9334         to its creation time.
9335         * lex.c (cxx_init_options): Update.
9336         (cxx_init): Combine with old init_parse; also call
9337         cxx_init_decl_processing.
9339 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
9341         * decl.c (check_initializer): Try to complete the type of an
9342         array element before checking whether it's complete.  Don't
9343         complain about arrays with complete element types but an
9344         unknown size.
9345         (cp_finish_decl): Build the hierarchical constructor before
9346         calling maybe_deduce_size_from_array_init.
9348 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
9350         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
9352 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
9354         PR g++/4206
9355         * parse.y (already_scoped_stmt): Remove.
9356         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
9358 2001-11-12  H.J. Lu <hjl@gnu.org>
9360         * cvt.c (ocp_convert): Don't warn the address of a weak
9361         function is always `true'.
9363 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9365         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
9366         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
9367         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
9368         * cp-tree.h (print_class_statistics): Remove.
9369         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
9370         cxx_print_identifier, cxx_set_yydebug): New.
9371         * lex.c (set_yydebug): Rename c_set_yydebug.
9372         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
9373         lang_print_xnode): Rename.
9374         * tree.c (print_lang_statistics): Rename.
9376 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9378         * class.c (dump_array): Fix format specifier warning.
9380 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9382         * cp-lang.c (LANG_HOOKS_NAME): Override.
9383         (struct lang_hooks): Constify.
9384         * lex.c (cxx_init_options): Update.
9385         (lang_identify): Remove.
9386         * parse.y (language_string): Remove.
9388 2001-11-08  Andreas Franck  <afranck@gmx.de>
9390         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
9391         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
9392         suggested by autoconf.
9393         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
9394         (c++.install-common): Use the transformed target alias names.
9396 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9398         * Make-lang.in: Update.
9399         * cp-lang.c: Include langhooks-def.h.
9401 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9403         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
9405 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9407         * lex.c (copy_lang_type): Add static prototype.
9409 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9411         * pt.c (unify): Handle SCOPE_REF.
9413 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
9415         * tree.c (cp_copy_res_decl_for_inlining): Adjust
9416         DECL_ABSTRACT_ORIGIN for the return variable.
9418 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
9420         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9422 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
9424         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
9425         semantics.c, spew.c: Fix spelling errors.
9427 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9429         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
9431 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
9433         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
9434         pop_everything.
9436 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9438         * cp-lang.c (cxx_get_alias_set): New function.
9439         Point LANG_HOOKS_GET_ALIAS_SET to it.
9441 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9443         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
9444         * cp-tree.h (make_unbound_class_template): Prototype new function.
9445         * decl.c (make_unbound_class_template): New function.
9446         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
9447         * error.c (dump_type): Likewise.
9448         * mangle.c (write_type): Likewise.
9449         * parse.y (template_parm): Likewise.
9450         (template_argument): Use make_unbound_class_template.
9451         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
9452         (tsubst): Likewise.
9453         (tsubst_copy): Likewise.
9454         (unify): Likewise.
9455         * tree.c (walk_tree): Likewise.
9456         * typeck.c (comptypes): Likewise.
9458 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9460         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
9461         extra calls into fewer ones.
9463 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
9465         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
9466         Warn when merging inline with attribute noinline.
9467         (start_decl, start_function): Warn if inline and attribute
9468         noinline appear in the same declaration.
9470 2001-10-16  H.J. Lu <hjl@gnu.org>
9472         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
9473         for tree checking disabled.
9475 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
9477         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
9478         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
9480 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
9482         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
9483         (unify): Only handle MINUS_EXPR specially if the above flag is set
9484         and the subtracted constant is 1.  Clear the flag on recursive calls.
9485         Set it when unifying the maximum value in an INTEGER_TYPE's range.
9487 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
9489         * decl.c (bad_specifiers): Don't allow exception specifications
9490         on any typedefs.
9492 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
9494         * cp/lex.c (init_cp_pragma): Similarly.
9496 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9498         * pt.c (lookup_template_class): Build complete template arguments
9499         for BOUND_TEMPLATE_TEMPLATE_PARM.
9501 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9503         * cp-tree.h (TYPE_BINFO): Update comment.
9504         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
9505         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
9506         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
9507         (copy_type): Prototype new function.
9508         * lex.c (copy_lang_decl): Gather tree node statistics.
9509         (copy_lang_type): New function.
9510         (copy_type): Likewise.
9511         (cp_make_lang_type): Create lang_type for
9512         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
9513         and BOUND_TEMPLATE_TEMPLATE_PARM.
9514         * pt.c (tsubst): Use copy_type instead of copy_node.
9515         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
9517 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9519         * pt.c (determine_specialization): Ignore functions without
9520         DECL_TEMPLATE_INFO.
9522 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
9524         PR g++/4476
9525         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
9527 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
9529         * typeck2.c (store_init_value): Don't re-digest a bracketed
9530         initializer.
9532         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
9533         ANON_AGGR_TYPE_P.
9535 2001-10-11  Richard Henderson  <rth@redhat.com>
9537         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
9538         of an asm statement.
9539         (build_vtbl_ref_1): Split out from build_vtbl_ref.
9540         (build_vfn_ref): Use it to handle vtable descriptors before
9541         calling build_vtable_entry_ref.
9542         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
9544 2001-10-10  Richard Henderson  <rth@redhat.com>
9546         * parse.y (asm_operand): Allow named operands.
9547         * semantics.c (finish_asm_stmt): Tweek for changed location
9548         of the operand constraint.
9550 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
9552         * call.c (standard_conversion): Add bad conversion between
9553         integers and pointers.
9554         (convert_like_real): Don't use convert_for_initialization for bad
9555         conversions; complain here and use cp_convert.
9556         (build_over_call): Don't handle bad conversions specially.
9557         (perform_implicit_conversion): Allow bad conversions.
9558         (can_convert_arg_bad): New fn.
9559         * cp-tree.h: Declare it.
9560         * typeck.c (convert_for_assignment): Use it.
9561         (ptr_reasonably_similar): Any target type is similar to void.
9563 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
9565         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
9566         (cp/cp-lang.o): New rule.
9567         * cp-tree.h: Declare hooks.
9568         * tree.c: Make hooks non-static.
9569         (init_tree): Don't initialize hooks here.
9570         * lex.c: Likewise.  Move definition of lang_hooks to...
9571         * cp-lang.c: ... new file.
9573 2001-10-08  Richard Henderson  <rth@redhat.com>
9575         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
9576         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
9578 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9580         * class.c (build_vtable_entry_ref): Const-ify.
9581         * decl.c (predefined_identifier,
9582         initialize_predefined_identifiers): Likewise.
9583         * init.c (build_new_1): Likewise.
9584         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
9585         Likewise.
9587 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
9589         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
9590         (INSNS_PER_STMT): Likewise.
9591         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
9592         (copy_body, initialize_inlined_parameters): Likewise.
9593         (declare_return_variable, inlinable_function_p): Likewise.
9594         (expand_call_inline, expand_calls_inline): Likewise.
9595         (optimize_inline_calls, clone_body): Likewise.
9596         * tree.c (walk_tree): Moved to ../tree-inline.c.
9597         (walk_tree_without_duplicates): Likewise.
9598         (copy_tree_r, remap_save_expr): Likewise.
9600 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
9602         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
9603         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
9604         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
9605         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
9606         (flag_inline_trees): Moved declaration to ../tree-inline.h.
9607         (walk_tree): Moved declaration to ../tree-inline.h.
9608         (walk_tree_without_duplicates, copy_tree_r): Likewise.
9609         (remap_save_expr): Likewise.
9610         * decl.c: Include tree-inline.h.
9611         (lang_mark_tree): Don't mark inlined_fns.
9612         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
9613         * optimize.c: Include tree-inline.h.
9614         (optimize_inline_calls): Move declaration to ../tree.h, as
9615         non-static.
9616         (remap_decl): Use language-independent constructs and hooks.
9617         (remap_block, copy_body_r, declare_return_variable): Likewise.
9618         (inlinable_function_p): Likewise.  Don't test for
9619         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
9620         no longer language-specific.
9621         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
9622         call of dump_function to...
9623         (optimize_function): Here...
9624         (clone_body): New function, extracted from...
9625         (maybe_clone_body): ... here.  Build decl_map locally and pass
9626         it on to clone_body.
9627         * pt.c, semantics.c: Include tree-inline.h.
9628         * tree.c: Likewise.
9629         (cp_walk_subtrees): New language-specific hook for tree inlining.
9630         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
9631         cp_is_overload_p, cp_auto_var_in_fn_p,
9632         cp_copy_res_decl_for_inlining): Likewise.
9633         (walk_tree): Move language-specific constructs into...
9634         (cp_walk_subtrees): this new function.
9635         (copy_tree_r): Use language-independent constructs and hooks.
9636         (init_tree): Initialize tree inlining hooks.
9637         (remap_save_expr): Adjust prototype so that the declaration
9638         does not require the definition of splay_tree.
9640 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9642         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
9643         to build the declaration instead of the declaration itself.
9645 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
9647         * decl2.c (cxx_decode_option): Add 'else'.
9649         * spew.c (end_input): No longer static.
9650         * cp-tree.h: Declare it.
9651         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
9653 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9655         * call.c (build_over_call), typeck.c (build_function_call_real):
9656         Pass type attributes to check_function_format rather than name or
9657         assembler name.  Don't require there to be a name or assembler
9658         name to check formats.
9660 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9662         * decl.c (init_decl_processing): Don't call
9663         init_function_format_info.  Initialize lang_attribute_table
9664         earlier.
9665         (builtin_function): Call decl_attributes.
9666         (insert_default_attributes): New.
9668 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
9670         * decl.c (grokdeclarator): Copy array typedef handling from C
9671         frontend.
9673         * decl.c (grokdeclarator): Copy too-large array handling from C
9674         frontend.
9676 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
9678         * config-lang.in (target_libs): Added target-gperf, so that we
9679         don't try to build it if C++ is disabled.
9681 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
9683         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
9684         (cp/errfn.o): Delete rule.
9685         (cp/error.o): Depend on flags.h.
9686         * errfn.c: Delete file.
9687         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
9688         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
9689         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
9690         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
9691         internal_error respectively.  Make cp_deprecated into a macro.
9692         Don't define cp_printer typedef or declare cp_printers.
9693         * error.c: Include flags.h.
9694         Delete: struct tree_formatting_info, print_function_argument_list,
9695         print_declaration, print_expression, print_function_declaration,
9696         print_function_parameter, print_type_id, print_cv_qualifier_seq,
9697         print_type_specifier_seq, print_simple_type_specifier,
9698         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
9699         print_parameter_declaration_clause, print_exception_specification,
9700         print_nested_name_specifier, and definition of cp_printers.
9701         (locate_error): New function.
9702         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
9703         rewritten in terms of locate_error and diagnostic.c.
9704         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
9705         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
9706         (init_error): Adjust to match.
9708 2001-09-22  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9710         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
9712 2001-09-21  Richard Henderson  <rth@redhat.com>
9714         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
9715         (build_vtbl_initializer): Likewise.
9716         (build_vfn_ref): New.
9717         * cp-tree.h: Declare it.
9718         * call.c (build_over_call): Use it.
9719         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
9720         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
9722 2001-09-21  J"orn Rennecke <amylaar@redhat.com>
9724         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
9726 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
9728         Table-driven attributes.
9729         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
9730         * decl2.c (cplus_decl_attributes): Only take one attributes
9731         parameter.
9732         * cp-tree.c (cplus_decl_attributes): Update prototype.
9733         * class.c (finish_struct), decl.c (start_decl, start_function),
9734         decl2.c (grokfield), friend.c (do_friend), parse.y
9735         (parse_bitfield): Update calls to cplus_decl_attributes.
9736         * decl.c (grokdeclarator): Take a pointer to a single ordinary
9737         attribute list.
9738         * decl.h (grokdeclarator): Update prototype.
9739         * decl2.c (grokfield): Take a single ordinary attribute list.
9740         * friend.c (do_friend): Likewise.
9741         * decl.c (shadow_tag, groktypename, start_decl,
9742         start_handler_parms, grokdeclarator, grokparms, start_function,
9743         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
9744         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
9745         (process_template_parm, do_decl_instantiation): Pass single
9746         ordinary attribute lists around.
9747         * decl.c (grokdeclarator): Correct handling of nested attributes.
9748         Revert the patch
9749         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
9750                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
9751                 not the left.
9752         .
9753         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
9754         (cp_attribute_table): Declare.
9755         * decl.c (valid_lang_attribute): Don't define.
9756         (lang_attribute_table): Define.
9757         (init_decl_processing): Initialize lang_attribute_table instead of
9758         valid_lang_attribute.
9759         * tree.c (cp_valid_lang_attribute): Remove.
9760         (handle_java_interface_attribute, handle_com_interface_attribute,
9761         handle_init_priority_attribute): New functions.
9762         (cp_attribute_table): New array.
9763         * decl2.c (import_export_class): Don't use
9764         targetm.valid_type_attribute.
9766 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9768         * Make-lang.in (cp/error.o): Depend on real.h
9769         * error.c: #include "real.h"
9771 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9773         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
9774         xmalloc/strcpy/strcat.
9776 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9778         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
9779         Const-ification.
9780         * pt.c (tsubst_decl): Likewise.
9782 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9784         * decl2.c (lang_f_options): Const-ification.
9785         * lex.c (cplus_tree_code_name): Likewise.
9786         * spew.c (yyerror): Likewise.
9788 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9790         PR c++/3986
9791         * class.c (force_canonical_binfo_r): Check & move an indirect
9792         primary base first.
9793         (force_canonical_binfo): Check that it's not already
9794         canonical.
9795         (mark_primary_virtual_base): Remove BINFO parameter.
9796         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
9798 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
9800         Remove TYPE_NONCOPIED_PARTS.
9801         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
9802         CLASSTYPE_PURE_VIRTUALS.
9803         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
9804         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
9805         (layout_class_type): Don't call fixup_inline_methods here ...
9806         (finish_struct_1): ... call it here.
9808 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
9810         * decl.c (duplicate_decls): Remove code deadling with
9811         DECL_SAVED_INSNS.
9812         * decl2.c (finish_file): Likewise.
9813         * pt.c (instantiate_decl): Likewise.
9814         * semantics.c (expand_body): Don't defer local functions if
9815         they wouldn't be deferred for some other reason.  Don't
9816         generate RTL for functions that will not be emitted.
9817         (genrtl_start_function): Remove code deadling with
9818         DECL_SAVED_INSNS.
9819         (genrtl_finish_function): Likewise.
9821 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
9823         PR c++/4203
9824         * call.c (build_over_call): Do not optimize any empty base
9825         construction.
9827 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9829         * error.c (dump_template_decl): Output template parameters
9830         together with their specifiers.
9831         Output `class' prefix for template template parameter.
9832         (dump_decl): Fix formatting.
9834 2001-08-30  Kurt Garloff  <garloff@suse.de>
9836         * optimize.c (inlinable_function_p): Allow only smaller single
9837         functions. Halve inline limit after reaching recursive limit.
9839 2001-08-30  Joern Rennecke <amylaar@redhat.com>
9840             Jason Merrill  <jason_merrill@redhat.com>
9842         * class.c (build_vtable_entry_ref): Subtract in char*, not
9843         ptrdiff_t.
9845 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
9847         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
9848         (build_cplus_array_type): Use cp_build_qualified_type, not
9849         TYPE_MAIN_VARIANT, to get an unqualified version.
9851         * decl2.c (grok_alignof): Lose.
9852         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
9853         * typeck.c (c_alignof): Lose.
9854         * semantics.c (finish_sizeof, finish_alignof): New.
9855         * parse.y: Use them.
9856         * cp-tree.h: Declare them.
9858 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
9860         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
9861         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
9862         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
9864 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
9866         * typeck2.c (add_exception_specifier): Only require complete type if
9867         not in processing template declaration.
9869 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9871         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
9872         GNU_xref_start_scope and GNU_xref_end_scope.
9874         * tree.c (TYPE_HASH): Moved to ../tree.h.
9876 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
9878         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
9879         on COMPOUND_EXPRs.
9881 2001-08-14  Richard Henderson  <rth@redhat.com>
9883         * class.c, cp-tree.h (build_vfn_ref): Remove.
9884         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
9886 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
9888         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
9889         empty class assignment as having side-effects to avoid
9890         spurious warnings.
9892 2001-08-13  Zack Weinberg  <zackw@panix.com>
9894         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
9895         * except.c: Include libfuncs.h.
9897 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9899         * decl.c (grokdeclarator): Clarify diagnostic message.
9901 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9903         * decl2.c (do_nonmember_using_decl): Replace using directive
9904         with using declaration in the error message.
9906 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9908         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
9909         criterion to avoid rebuilding expression tree instead of
9910         processing_template_decl.
9912 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
9914         Support named return value optimization for inlines, too.
9915         * decl.c (finish_function): Nullify returns here.
9916         * semantics.c (genrtl_start_function): Not here.
9917         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
9918         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
9919         Also nullify the CLEANUP_STMT for the nrv.
9920         * cp-tree.h: Declare it.
9921         * optimize.c (declare_return_variable): Replace the nrv with the
9922         return variable.
9923         * typeck.c (check_return_expr): Be more flexible on alignment check.
9924         Ignore cv-quals when checking for a matching type.
9926 2001-08-09  Richard Henderson  <rth@redhat.com>
9928         * decl2.c (finish_objects): Use target hooks instead of
9929         assemble_constructor and assemble_destructor.
9931 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9933         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
9935 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
9937         PR c++/3820
9938         Stop using TYPE_NONCOPIED_PARTS.
9939         * call.c (build_over_call): Be careful when copy constructing
9940         or assigning to an empty class.
9941         * class.c (check_bases_and_members): It has a
9942         COMPLEX_ASSIGN_REF if it has a vptr.
9943         (layout_class_type): Don't add empty class padding to
9944         TYPE_NONCOPIED_PARTS.
9945         (finish_struct_1): Don't add the VFIELD either.
9946         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
9947         initialization.
9949 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
9951         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
9953 2001-08-06  Richard Henderson  <rth@redhat.com>
9955         * decl2.c (finish_objects): Pass a symbol_ref and priority to
9956         assemble_{constructor,destructor}.  Remove priority handling.
9958 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
9960         Don't allow template-id in using-declaration.
9961         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
9962         (do_class_using_decl): Likewise.
9964 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9966         * cp/spew.c (read_token): No need to pop buffers.
9968 2001-08-02  Stan Shebs  <shebs@apple.com>
9970         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
9971         (fnaddr_from_vtable_entry): Remove decl.
9972         * method.c (use_thunk): Update comment.
9974 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
9976         * repo.c (get_base_filename): Change return value to const char
9977         pointer.
9979 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
9981         Kill -fhonor-std.
9982         * NEWS: Document.
9983         * cp-tree.h (flag_honor_std): Remove.
9984         (CPTI_FAKE_STD): Remove.
9985         (std_node): Remove comment about it being NULL.
9986         (fake_std_node): Remove.
9987         * decl.c (in_fake_std): Remove.
9988         (walk_namespaces_r): Remove fake_std_node check.
9989         (push_namespace): Remove in_fake_std code.
9990         (pop_namespace): Likewise.
9991         (lookup_name_real): Remove fake_std_node check.
9992         (init_decl_processing): Always create std_node. Always add
9993         std:: things there.
9994         (builtin_function): Always put non '_' fns in std.
9995         * decl2.c (flag_honor_std): Remove.
9996         (lang_f_options): Remove honor-std.
9997         (unsupported_options): Add honor-std.
9998         (set_decl_namespace): Remove fake_std_node check.
9999         (validate_nonmember_using_decl): Likewise.
10000         (do_using_directive): Likewise.
10001         (handle_class_head): Likewise.
10002         * dump.c (cp_dump_tree): Likewise.
10003         * except.c (init_exception_processing): Adjust.
10004         * init.c (build_member_call): Remove fake_std_node check.
10005         (build_offset_ref): Likewise.
10006         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
10007         * rtti.c (init_rtti_processing): Adjust.
10009 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10011         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
10012         operand while calling cp_tree_equal.
10014 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
10016         The 3.0 ABI no longer has vbase pointer fields.
10017         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
10018         FORMAT_VBASE_NAME): Remove.
10019         * method.c (do_build_copy_constructor): Adjust.
10020         (do_build_assign_ref): Adjust.
10021         * search.c (lookup_field_r): Adjust.
10022         * typeck.c (build_component_ref): Adjust.
10024         The 3.0 ABI always has a vtable pointer at the start of every
10025         polymorphic class.
10026         * rtti.c (build_headof_sub): Remove.
10027         (build_headof): Adjust.
10028         (get_tinfo_decl_dynamic): No need to check flag_rtti
10029         here. Adjust.
10030         (create_real_tinfo_var): Explain why we need a hidden name.
10032 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
10034         PR c++/3631
10035         * class.c (update_vtable_entry_for_fn): The fixed adjustment
10036         of a virtual thunk should be from declaring base.
10038 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
10040         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
10041         the shared virtual base, so preserving inheritance graph order.
10043 2001-07-30  Andreas Jaeger  <aj@suse.de>
10045         * decl2.c: Remove unused var global_temp_name_counter.
10047 2001-07-28  Richard Henderson  <rth@redhat.com>
10049         * method.c (pending_inlines): Remove.
10051 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
10053         * class.c (mark_primary_virtual_base): Don't adjust base
10054         offsets here.
10055         (dfs_unshared_virtual_bases): Adjust them here.
10056         (mark_primary_bases): Explain why we adjust at the end.
10058 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
10060         * class.c (finish_struct_1): When copying the primary base's
10061         VFIELD, make sure we find it is at offset zero.
10063 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10065         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
10066         tsubst_expr for default template arguments.
10068 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
10070         PR c++/3621
10071         * spew.c (yylex): Only copy the token's lineno, if it is
10072         nonzero.
10074 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
10076         PR c++/3624
10077         * call.c (resolve_args): Simplify, call
10078         convert_from_reference.
10079         (build_new_op): Resolve and convert from reference ARG1
10080         earlier. Adjust ARG2 & ARG3 resolve and conversion.
10082 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
10084         * decl.c (last_function_parm_tags): Remove.
10085         (current_function_parm_tags): Remove.
10086         (init_decl_processing): Adjust.
10087         (start_function): Adjust.
10088         (store_parm_decls): Adjust.
10090         PR c++/3152
10091         * decl.c (grokdeclarator): Detect when a function typedef is
10092         declaring a function, and create last_function_parms correctly.
10094 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
10096         * call.c (joust): Only prefer a non-builtin candidate to a builtin
10097         one if they have the same signature.
10099         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
10100         it rather than toplevel_bindings_p.  Give it a mangled name if static.
10101         (convert_to_reference): Adjust.
10102         * decl2.c (get_temp_name): Lose.
10103         * mangle.c (mangle_ref_init_variable): New fn.
10104         (mangle_guard_variable): Strip the ref-init header.
10105         * cp-tree.h: Adjust.
10106         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
10107         initializer.
10108         (grok_reference_init): Always use DECL_INITIAL.
10110 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10112         PR c++/3416
10113         * call.c (build_conditional_expr): Recheck args after
10114         conversions.
10115         * cp-tree.h (build_conditional_expr): Move to correct file.
10116         * typeck.c (decay_conversion): Diagnose any unknown types
10117         reaching here.
10118         (build_binary_op): Don't do initial decay or default
10119         conversions on overloaded functions.
10120         (build_static_cast): Don't do a decay conversion here.
10122 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10124         PR c++/3543
10125         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
10126         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
10128 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10130         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
10131         (create_vtbl_ptr): ... here.
10133 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
10135         * class.c (build_vbase_offset_vbtl_entries): Look for
10136         non-primary base of which we are a sub vtable.
10138 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
10140         * semantics.c (finish_this_expr):  Remove unused code.
10142 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
10144         Simplify rtti, now we've only one ABI.
10145         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
10146         CPTI_TINFO_VAR_ID.
10147         (tinfo_decl_id, tinfo_var_id): Remove.
10148         (get_typeid_1): Remove.
10149         * rtti.c
10150         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
10151         (typeid_ok_p): New function.
10152         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
10153         (get_tinfo_decl): Remove old abi documentation.
10154         (tinfo_from_decl): Remove.
10155         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
10156         (get_typeid_1): Remove.
10157         (get_base_offset): Remove.
10158         (synthesize_tinfo_var): Absorb get_base_offset.
10159         (create_real_tinfo_var): Don't use tinfo_decl_id.
10161 2001-07-23  Graham Stott  <grahams@redhat.com>
10163         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
10164         variable has_two_argument_delete_p.
10166 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
10168         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
10169         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
10170         (CPTI_INDEX_IDENTIFIER): Remove.
10171         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
10172         (delta2_identifier): Remove.
10173         (index_identifier): Remove.
10174         (pfn_or_delta2_identifier): Remove.
10175         (flag_vtable_thunks): Remove.
10176         (VTABLE_DELTA2_NAME): Remove.
10177         (VTABLE_INDEX_NAME): Remove.
10178         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
10179         (vfunc_ptr_type_node): Adjust.
10180         (VTABLE_NAME_PREFIX): Adjust.
10181         (build_vfn_ref): Lose first parameter.
10182         (fixup_all_virtual_upcast_offsets): Remove.
10183         * decl.c (initialize_predefined_identifiers): Remove
10184         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
10185         (init_decl_processing): Remove no-vtable-thunk code.
10186         * decl2.c (flag_vtable_thunks): Remove.
10187         (mark_vtable_entries): Remove no-vtable-thunk code.
10188         * error.c (dump_decl): Remove no-vtable-thunk code.
10189         (dump_expr): Adjust ptr to member function code.
10190         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
10191         code.
10192         * rtti.c (build_headof): Remove no-vtable-thunk code.
10193         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
10194         * search.c (get_base_distance): Remove expand_upcast_fixups case.
10195         (virtual_context) Remove.
10196         (expand_upcast_fixups): Remove.
10197         (fixup_virtual_upcast_offsets): Remove.
10198         (fixup_all_virtual_upcast_offsets): Remove.
10199         * typeck.c (get_member_function_from_ptrfunc): Remove
10200         no-vtable-thunk code.
10201         * call.c (build_over_call): Adjust call to build_vfn_ref.
10202         * class.c (build_vfn_ref): Lose first parameter. Remove
10203         no-vtable-thunk code.
10204         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
10205         (build_vtable_entry): Remove no-vtable-thunk code.
10207 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
10209         Remove old-abi remnants. Remove comments about old abi
10210         behavior. Remove references to 'new-abi' in comments.
10211         * cp-tree.h: Adjust comments.
10212         (vbase_offsets_in_vtable_p): Delete.
10213         (vcall_offsets_in_vtable_p): Delete.
10214         (vptrs_present_everywhere_p): Delete.
10215         (all_overridden_vfuns_in_vtables_p): Delete.
10216         (merge_primary_and_secondary_vtables_p): Delete.
10217         (TYPE_CONTAINS_VPTR_P): Adjust.
10218         (VTT_NAME_PREFIX): Remove.
10219         (CTOR_VTBL_NAME_PREFIX): Remove.
10220         (init_vbase_pointers): Remove.
10221         * class.c: Adjust coments.
10222         (build_vbase_pointer_fields): Delete.
10223         (build_vbase_pointer): Remove old-abi code.
10224         (build_secondary_vtable): Likewise.
10225         (modify_all_vtables): Likewise.
10226         (create_vtable_ptr): Likewise.
10227         (layout_class_type): Likewise.
10228         (finish_struct_1): Likewise.
10229         (finish_vtbls): Likewise.
10230         (dfs_finish_vtbls): Delete.
10231         (build_vbase_offset_vtbl_entries): Remove old-abi code.
10232         * cvt.c: Adjust comments.
10233         * decl.c: Adjust comments.
10234         * decl2.c: Adjust comments.
10235         * init.c: Adjust comments.
10236         (construct_virtual_bases): Remove old-abi code.
10237         * lang-specs.h: Remove -fno-new-abi.
10238         * mangle.c: Adjust comments.
10239         * rtti.c: Adjust comments.
10240         (get_base_offset): Remove old-abi-code.
10241         * search.c: Adjust comments.
10242         (dfs_init_vbase_pointers): Remove.
10243         (dfs_vtable_path_unmark): Remove.
10244         (init_vbase_pointers): Remove.
10245         * semantics.c: Adjust comments.
10246         (emit_associated_thunks): Remove old-abi code.
10247         * typeck.c: Adjust comments.
10249 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
10251         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
10252         params.h.
10254 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
10256         * class.c (finish_struct_anon): Forbid nested classes.
10258 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
10260         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
10261         * optimize.c: Include debug.h.
10262         (maybe_clone_body): Use debug hook.
10263         * semantics.c: Include debug.h.
10264         (expand_body): Use debug hook.
10266 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
10268         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
10270 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
10272         * class.c (type_requires_array_cookie): New function.
10273         (check_methods): Don't try to figure out whether the type needs a
10274         cookie here.
10275         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
10276         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
10277         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
10278         * pt.c (instantiate_class_template): Don't set
10279         TYPE_VEC_DELETE_TAKES_SIZE.
10280         * NEWS: Document ABI changes from GCC 3.0.
10282 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
10283             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
10285         * NEWS (Changes in GCC 3.0): Fix typo.
10287 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
10289         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
10290         which attributes are to be attached, and a flags argument.  Update
10291         call to decl_attributes.
10292         (grokfield): Update call to decl_attributes.
10293         * class.c (finish_struct): Update call to cplus_decl_attributes.
10294         * cp-tree.h (cplus_decl_attributes): Update prototype.
10295         * decl.c (start_decl, grokdeclarator, start_function): Update
10296         calls to decl_attributes and cplus_decl_attributes.
10297         * friend.c (do_friend): Update call to cplus_decl_attributes.
10298         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
10300 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
10302         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
10303         for `register' variables with an asm-specification.
10305 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
10307         * semantics.c (finish_asm_stmt): Mark the output operands
10308         to an asm addressable, if necessary.
10310 2001-07-11  Ben Elliston  <bje@redhat.com>
10312         * Revert this change -- there is a subtle bug.
10314         PR c++/80
10315         * decl.c (finish_enum): New "attributes" argument; pass it to
10316         cplus_decl_attributes.  Use a narrower type if the enum is packed.
10317         * cp-tree.h (finish_enum): Adjust prototype.
10318         * parse.y (enum_head): New non-terminal.
10319         (structsp): Use it. Enums now may be preceded or followed by
10320         optional attributes -- pass their chained tree to finish_enum().
10321         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
10323 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
10325         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
10326         variables.
10328 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
10330         * semantics.c (cp_expand_stmt): Fix for null
10331         current_function_return_value.
10333 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
10335         * call.c (build_op_delete_call): Initialize fn.
10336         (convert_like_real): Delete conditional.
10337         (joust): Initialize *w and *l.
10338         * class.c: Add prototype for binfo_ctor_vtable.
10339         (get_primary_binfo): Initialize result.
10340         * init.c (build_java_class_ref): Initialize name.
10342 2001-07-09  Erik Rozendaal  <dlr@acm.org>
10344         * typeck.c (unary_complex_lvalue): Do not duplicate the
10345         argument to modify, pre-, or post-increment when used as an
10346         lvalue and when the argument has side-effects.
10348 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10350         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10351         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
10352         cplus_decl_attributes even if attrs is NULL.
10353         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
10355 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10357         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
10358         calls to decl_attributes.
10360 2001-07-06  Ira Ruben   <ira@apple.com>
10362         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
10363         be DECL_TEMPLATE_RESULT.
10365 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10367         * cp-tree.h (copy_template_template_parm): Rename to ...
10368         (bind_template_template_parm): ... here.
10369         * tree.c (copy_template_template_parm): Rename to ...
10370         (bind_template_template_parm): ... here.  Remove the case when
10371         NEWARGS is NULL_TREE.
10372         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
10373         BOUND_TEMPLATE_TEMPLATE_PARM.
10374         * pt.c (lookup_template_class): Adjust.
10376 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
10378         * cvt.c (convert_lvalue): New fn.
10379         * cp-tree.h: Declare it.
10380         * method.c (do_build_assign_ref): Use it.
10381         (do_build_copy_constructor): Convert parm to base types
10382         before calling base constructors.
10384         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
10385         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
10386         optimize.
10387         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
10389 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
10391         * optimize.c (optimize_inline_calls): New function, broken out
10392         of ...
10393         (optimize_function): ... here. Call it. Don't inline if it is
10394         a thunk.
10395         (dump_function): Print name of dump flag causing this dump.
10396         * semantics.c (expand_body): Move thunk inline check to
10397         optimize_function.
10399 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10401         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
10402         (comptypes): Use target.comp_type_attributes.
10404 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
10406         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
10408 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
10410         * error.c (lang_print_error_function): Add a `diagnostic_context *'
10411         parameter. Tweak.
10413 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10415         * decl2.c (import_export_class): Update.
10417 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10419         * error.c (init_error): Adjust settings.
10421 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10423         * error.c (init_error): Adjust settings.
10425 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
10427         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
10428         return pointers to data members by reference rather than by value.
10430 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
10432         Implement the Named Return Value optimization.
10433         * cp-tree.h (struct cp_language_function): Add x_return_value.
10434         (current_function_return_value): Now a macro.
10435         * decl.c: Don't define it.
10436         (define_label, finish_case_label): Don't clear it.
10437         (init_decl_processing): Don't register it with GC.
10438         * semantics.c (genrtl_finish_function): Don't check it for
10439         no_return_label.  Copy the RTL from the return value to
10440         current_function_return_value and walk, calling...
10441         (nullify_returns_r): ...this new fn.
10442         * typeck.c (check_return_expr): Set current_function_return_value.
10444 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
10446         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
10447         sharing a ctor vtable with.  Merge code for cases 1 and 2.
10448         (binfo_ctor_vtable): New fn.
10449         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
10451 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
10453         * class.c (dfs_find_final_overrider): Fix logic.
10455         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
10456         virtual thunk instead of non-virtual.
10457         (get_matching_virtual): Uncomment.
10459         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
10460         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
10461         PARM, not ARG.
10463 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
10465         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
10466         we've not emerged from the hierarchy of RTTI_BINFO on reaching
10467         a non-virtual base.
10469 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
10471         * NEWS: Update release number.
10473 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
10475         PR c++/3130, c++/3131, c++/3132
10476         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
10477         * class.c (force_canonical_binfo_r): Move
10478         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
10479         virtual bases unless they're primary and what they're primary
10480         too has been moved.
10481         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
10482         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
10483         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
10484         derived binfo.
10485         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
10486         (layout_nonempty_base_or_field): Add most derived type
10487         parameter. Adjust.
10488         (layout_empty_base): Likewise.
10489         (build_base_field): Likewise.
10490         (build_base_fields): Likewise.
10491         (propagate_binfo_offsets): Add most derived type
10492         parameter. Skip non canonical virtual bases too.
10493         (dfs_set_offset_for_unshared_vbases): Don't skip primary
10494         bases. Do skip canonical bases.
10495         (layout_virtual_bases): Adjust.
10496         (layout_class_type): Adjust.
10497         (dfs_get_primary_binfo): Build list of virtual primary base
10498         candidates.
10499         (get_primary_binfo): Check that the shared virtual primary
10500         base candidate was found first.
10501         (accumulate_vtbl_inits): Don't do anything for non-vptr
10502         containing binfos. For case 1 primary virtual bases, keep
10503         checking that we've not emerged from the hierarchy of RTTI_BINFO.
10505 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
10507         PR c++/3089
10508         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
10509         hierarchy looking for primary bases for a ctor
10510         vtable. Recursively call oneself, if we meet our primary via
10511         this route and haven't met it yet via inheritance graph order.
10513 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
10515         * lang-options.h: Emit documentation for -fno-honor-std, not
10516         -fhonor-std.
10518 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
10520         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
10521         Don't clobber delta.
10522         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
10524 2001-06-10  Mark Mitchell <mark@codesourcery.com>
10525             Gabriel Dos Reis  <gdr@codesourcery.com>
10527         * Make-lang.in (cp/call.o): Depend on diagnostic.h
10528         (cp/typeck.o): Depend on diagnostic.h
10529         (cp/typeck2.o): Depend on diagnostic.h
10530         (cp/repo.o): Depend on dignostic.h
10531         * typeck.c: #include diagnostic.h
10532         (convert_for_initialization): Remove extern declaration for
10533         warningcount and errorcount.
10535         * call.c: #include diagnostic.h
10536         (convert_like_real): Remove extern declaration for warnincount and
10537         errorcount.
10539         * repo.c: #include diagnostic.h
10540         * typeck2.c: #include diagnostic.h
10542 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
10544         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
10545         in previous change.
10547 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
10549         PR c++/2929
10550         * friend.c (do_friend): Use push_decl_namespace for classes at
10551         namespace scope.
10553 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
10554             Jason Merrill <jason_merrill@redhat.com>
10556         PR c++/3061
10557         * class.c (build_secondary_vtable): Use assert, rather than an error
10558         message.
10559         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
10560         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
10561         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
10562         Don't set BINFO_VTABLE for a primary virtual base.
10564 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
10566         * decl.c (duplicate_decls): Update source position information
10567         when a template function is defined.
10569 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
10571         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
10573 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
10575         PR c++/2914
10576         * decl.c (pushtag): Don't push into a complete type's scope.
10578 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
10580         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
10581         (struct lang_decl_flags): Lose generate_with_vtable_p.
10582         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
10583         * class.c (copy_virtuals): Adjust.
10584         * decl2.c (mark_vtable_entries): Adjust.
10585         * method.c (make_thunk, build_vtable_entry): Adjust.
10586         * class.c (update_vtable_entry_for_fn): Only look as far as the
10587         first defining class.
10588         (build_vtbl_initializer): Put nothing in the slot for a function only
10589         defined in a lost primary virtual base.
10590         (add_vcall_offset_vtbl_entries_1): Use the same code for
10591         the lost primary case and the normal case.
10592         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
10593         (get_vfield_offset, get_derived_offset): Lose.
10594         (dfs_find_final_overrider): Use look_for_overrides_here.
10595         (get_matching_virtual): New fn.
10596         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
10597         not BV_VCALL_INDEX.
10598         * search.c (look_for_overrides_here): Split out from...
10599         (look_for_overrides_r): Here.
10601         * class.c (find_final_overrider): Return error_mark_node on error.
10603         * decl2.c (key_method): #if 0 accidental change.
10605 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10607         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
10608         (build_over_call): Likewise.
10609         * decl.c (grokparms): Likewise.
10610         * pt.c (tsubst_decl): Likewise.
10611         * typeck.c (convert_arguments): Likewise.
10613 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
10615         * semantics.c (begin_class_definition): Robustify.
10617         * pt.c (instantiate_decl): Tell the repository code about the
10618         clones, not the cloned functions.
10619         * repo.c (repo_template_used): Explicitly instantiate the cloned
10620         function, not the clones.
10622 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10624         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
10625         ICS_BAD_FLAG on created conversion.
10626         (compare_ics): Break out rank.
10628 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10630         * decl.c (xref_tag): Remove extraneous %s on dependent name
10631         lookup warning.
10633 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10635         * class.c (layout_vtable_decl): Fix off by one error on
10636         build_index_type.
10637         (build_vtt): Likewise.
10638         (build_ctor_vtbl_group): Likewise.
10640 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
10642         * class.c (maybe_indent_hierarchy): New function.
10643         (dump_class_hierarchy_r): Add flags. Dump extra binfo
10644         information, if enabled. Use maybe_indent_hierarchy. Adjust
10645         output format.
10646         (dump_class_hierarchy): Adjust prototype. Adjust output format.
10647         (dump_array, dump_vtable, dump_vtt): New functions.
10648         (finish_struct_1): Adjust hierarchy dumping.
10649         (initialize_vtable): Call dump_vtable.
10650         (build_vtt): Call dump_vtt.
10651         (build_ctor_vtbl_group): Call dump_vtable.
10652         * decl2.c (flag_dump_class_layout): Remove.
10653         (cxx_decode_option): Remove dump translation unit
10654         and dump class hierarchy check. Call dump_switch_p.
10655         (finish_file): Adjust dumping.
10656         (dump.c): Only dump base classes if not TDF_SLIM.
10657         Only dump namespace members if not TDF_SLIM.
10658         * optimize.c (dump_function): New function.
10659         (optimize_function): Call dump_function.
10660         * semantics.c (expand_body): Use dump_enabled_p.
10662 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
10664         PR g++/2936
10665         Part missed from first commit
10666         * decl2.c (finish_anon_union): Copy context.
10668 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
10670         PR g++/2936
10671         * optimize.c (remap_decl): Remap anonymous aggregate members too.
10673 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
10675         PR g++/2823
10676         * semantics.c (expand_body): Don't optimize thunks.
10678 2001-05-25  Sam TH  <sam@uchicago.edu>
10680         * cp-tree.h lex.h: Fix header include guards.
10682 2001-05-25  Mark Mitchell <mark@codesourcery.com>
10684         * decl.c (init_decl_processing): Tweak.
10686 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
10688         * decl.c (duplicate_decls): Tidy.
10689         (init_decl_processing): Always set flag_no_builtin.
10691 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
10693         PR c++/2184
10694         * decl2.c (do_local_using_decl): Push the decls, even in a
10695         template.
10697 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
10699         * optimize.c (initialize_inlined_parameters): Don't set
10700         TREE_READONLY for a VAR_DECL taking the place of an inlined
10701         PARM_DECL.
10703 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
10705         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
10706         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
10707         attribute.
10709 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
10711         * parse.y: Refer to compound literals as such, not as
10712         constructor-expressions.
10714 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
10716         * call.c (build_op_delete_call): Ignore exception-specifications
10717         when looking for matching delete operators.
10718         * init.c (build_new_1): Compute whether or not the allocation
10719         function used is a placement allocation function or not, and
10720         communicate this information to build_op_delete_call.
10722 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
10724         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
10725         (build_vtbl_ref): Adjust.
10726         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
10727         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
10728         Re-add vtable-gc.
10729         (unsupported_options): Correspondingly.
10731         * decl2.c (maybe_make_one_only): Check flag_weak, not
10732         supports_one_only().
10734         * cp-tree.def (START_CATCH_STMT): Lose.
10735         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
10736         * tree.c (cp_statement_code_p): Don't case it.
10737         * semantics.c (cp_expand_stmt): Likewise.
10738         * cp-tree.h (START_CATCH_TYPE): Lose.
10739         (HANDLER_TYPE): New.
10740         * except.c (expand_start_catch_block): Don't start any blocks.
10741         Return the type.
10742         (expand_end_catch_block): Don't end any blocks.
10743         * parse.y (handler): Don't pass anything from finish_handler_parms
10744         to finish_handler.
10745         * pt.c (tsubst_expr): Likewise.
10746         * semantics.c (begin_handler): Call note_level_for_catch here.
10747         (finish_handler_parms): Don't return anything.
10748         (genrtl_catch_block, begin_catch_block): Lose.
10749         (genrtl_handler): Call expand_start_catch here.
10751 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
10753         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
10754         (get_vtable_decl, build_vtt): Not here.
10756 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
10758         PR c++/2781
10759         * optimize.c (update_cloned_parm): Copy addressability and other
10760         flags.
10762 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10764         * pt.c (determine_specialization): Ignore artificial functions.
10766 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
10768         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
10769         (C_RID_CODE): Remove.
10770         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
10771         (init_parse): Don't do it here.
10773 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
10775         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
10776         function declaration to avoid stripping the symbol's attributes.
10778 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
10780         * decl.c (pushdecl): Adjust error string.
10781         (xref_tag): Adjust friend class injection warning. Remove the
10782         inherited name from the class shadowed scope.
10784 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
10786         * except.c (cp_protect_cleanup_actions): New function.
10787         (init_exception_processing): Don't set protect_cleanup_actions
10788         here.  Do set lang_protect_cleanup_actions.
10790 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
10792         * spew.c (read_token): Call yyerror on all unexpected tokens.
10794 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
10796         * init.c (member_init_ok_or_else): Take a tree rather than
10797         string for name.
10798         (expand_member_init): Adjust.
10800 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
10802         * decl.c (duplicate_decls): Suppress warning about duplicate
10803         decls if the first decl is a friend.
10805 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
10807         * except.c (choose_personality_routine): Export.  Add
10808         explanatory comment.  Take an enum languages, not a boolean.
10809         (initialize_handler_parm): Adjust to match.
10810         * cp-tree.h: Prototype choose_personality_routine.
10811         * lex.c (handle_pragma_java_exceptions): New function.
10812         (init_cp_pragma): Register #pragma GCC java_exceptions.
10814 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
10816         * method.c (build_mangled_C99_name): Remove unused prototype.
10818 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
10820         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
10821         * typeck.c (get_member_function_from_ptrfunc,
10822         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
10823         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
10825         Reverted Geoff Keating's 2001-05-03's patch.
10827 2001-05-11  Ira Ruben   <ira@apple.com>
10829         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
10831 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
10833         * cp-tree.h (finish_label_expr, lookup_label): Delete.
10834         * parse.y: Update for '&&'; don't issue warning here.
10835         * semantics.c (finish_label_expr): Delete.
10837 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
10839         * splay-tree.h (splay_tree_max): New function.
10840         (splay_tree_min): Likewise.
10842 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
10844         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
10845         (pfn_vflag_identifier): Define.
10846         Update comment about layout of pointer functions.
10847         (build_ptrmemfunc1): Update prototype.
10848         (expand_ptrmemfunc_cst): Update prototype.
10849         * decl.c (initialize_predefined_identifiers): Initialize
10850         pfn_vflag_identifier.
10851         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
10852         an extra field to the type.
10853         * expr.c (cplus_expand_constant): Pass 'flag' between
10854         expand_ptrmemfunc_cst and build_ptrmemfunc1.
10855         * typeck.c (get_member_function_from_ptrfunc): When
10856         FUNCTION_BOUNDARY < 16, look at additional field to determine
10857         if a pointer-to-member is a real pointer or a vtable offset.
10858         (build_ptrmemfunc1): Add new parameter to contain extra field.
10859         (build_ptrmemfunc): Pass the extra field around.
10860         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
10861         (pfn_from_ptrmemfunc): Ignore the extra field.
10863 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
10865         * cp-tree.h (flag_inline_trees): Update documentation.
10866         * decl.c (init_decl_processing): Adjust handling of
10867         flag_inline_functions and flag_inline_trees to support -O3.
10868         (grokfndecl): Set DECL_INLINE on all functions if that's what
10869         the user requested.
10870         (save_function_data): Clear DECL_INLINE in
10871         current_function_cannot_inline is non-NULL.
10872         * decl2.c (flag_inline_trees): Update documentation.
10874 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
10876         * dump.c (cp_dump_tree, USING_STMT case): New case.
10877         * tree.c (cp_statement_code_p): Add USING_STMT.
10878         * decl2.c (do_using_directive): Add the using directive statement.
10880         * tree.c (walk_tree): Reformat an if block.
10882 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
10884         * decl.c (compute_array_index_type): Don't try to do anything with
10885         the indices when processing a template.
10887 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10889         * call.c: NULL_PTR -> NULL.
10890         * class.c: Likewise.
10891         * cvt.c: Likewise.
10892         * decl.c: Likewise.
10893         * decl2.c: Likewise.
10894         * except.c: Likewise.
10895         * init.c: Likewise.
10896         * rtti.c: Likewise.
10897         * search.c: Likewise.
10898         * tree.c: Likewise.
10899         * typeck.c: Likewise.
10900         * typeck2.c: Likewise.
10902 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
10904         * decl2.c (do_using_directive): Revert previous patch.
10906 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
10908         * cp-tree.def (USING_STMT): New statement node.
10909         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
10910         * decl2.c (do_using_directive): Add USING_STMT to statement
10911         tree. Don't emit errors when processing template decl.
10912         * pt.c (tsubst_expr, USING_STMT case): New case.
10913         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
10915 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
10917         * call.c (build_new_op): Convert args from reference here.
10918         (build_conditional_expr): Don't convert here.
10920 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
10922         * spew.c (last_token_id): New static variable.
10923         (read_token): Set it here.
10924         (yyerror): Use it here.
10926 2001-04-30  Richard Henderson  <rth@redhat.com>
10928         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
10929         * decl.c: Likewise.
10931 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
10933         * gxxint.texi: Remove.
10934         * Make-lang.in: Remove all traces of gxxint.texi.
10936 2001-04-30  Mark P Mitchell  <mark@codesourcery.com>
10938         * decl2.c (start_static_initialization_or_destruction): Correct
10939         logic to handle the -fno-use-cxa-atexit case.
10941 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
10943         * optimize.c (update_cloned_parm): New function.
10944         (maybe_clone_body): Use it.  Update the `this' parameter too.
10946 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
10948         * decl2.c (unsupported_options): Add new-abi.
10949         * lang-options.h: Remove no longer supported options.
10951 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
10953         * except.c (can_convert_eh): Don't check template parms,
10954         typename types etc.
10956 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
10958         * optimize.c (maybe_clone_body): Copy parameter names and locations.
10960 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
10962         * cp-tree.h (adjust_clone_args): Prototype new function.
10963         * class.c (adjust_clone_args): New function.
10964         * decl.c (start_function): Call it for in charge ctors.
10966 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
10968         * method.c (use_thunk): Make sure that thunks really are emitted
10969         when requested.
10971 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
10973         * mangle.c (write_chars): New macro.
10974         (hwint_to_ascii): New function
10975         (write_number): Use it.
10976         (write_integer_cst): Deal with really big numbers.
10978 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
10980         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
10981         the clone.
10983 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
10985         * decl.c (grokdeclarator): Set context of namespace scope
10986         TYPE_DECLS.
10988 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
10990         * cp/optimize.c: Include hashtab.h.
10991         (struct inline_data): Add tree_pruner.
10992         (expand_call_inline, expand_calls_inline): Use it when calling
10993         walk_tree.
10994         (optimize_function): Initialize and free tree_pruner.
10996 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
10998         Lazy __FUNCTION__ generation.
10999         * cp-tree.def (FUNCTION_NAME): Remove.
11000         * cp-tree.h (function_name_declared_p): Remove.
11001         (cp_fname_init): Prototype.
11002         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
11003         don't call declare_function_name. Call start_fname_decls.
11004         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
11005         clobber the line number.
11006         (cp_fname_init): New function.
11007         (start_function): Call start_fname_decls.
11008         (finish_function): Call finish_fname_decls.
11009         * lex.c (reswords): Add slots for __FUNCTION__ et al.
11010         (rid_to_yy): Add mappings for __FUNCTION__ et al.
11011         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
11012         * parse.y (VAR_FUNC_NAME): New token.
11013         (primary): Add VAR_FUNC_NAME.
11014         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
11015         generation.
11016         (tsubst, FUNCTION_NAME case): Remove.
11017         (tsubst_copy, FUNCTION_NAME case): Remove.
11018         (tsubst_expr, DECL_STMT case): Be careful with a
11019         DECL_PRETTY_FUNCTION_P.
11020         (instantiate_decl): Remove function_name_declared_p.
11021         * semantics.c (begin_compound_statement): Don't call
11022         declare_function_name here.
11023         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
11024         (finish_translation_unit): Call finish_fname_decls.
11025         (expand_body): Remove function_name_declared_p.
11026         * typeck2.c (digest_init): Allow any ERROR_MARK.
11028 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
11030         * pt.c (tsubst_decl): Use VOID_TYPE_P.
11031         * semantics.c: Fix some typos.
11033 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
11035         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
11037 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11039         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
11041 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
11043         * except.c (build_throw): Wrap the initialization of the exception
11044         object in a MUST_NOT_THROW_EXPR.
11045         (do_free_exception): #if 0.
11047 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
11049         * cp-tree.h (finish_enum): Change prototype.
11050         * decl.c (finish_enum): Reorganize.
11051         * parse.y (structsp): Adjust calls to finish_enum.
11053 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11055         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
11056         't' case.
11058 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
11060         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
11061         (layout_empty_base): Return at end flag.
11062         (build_base_field): Likewise.
11063         (build_base_fields): Likewise.
11064         (layout_virtual_bases): Don't add 1 to eoc value.
11065         (end_of_class): Use full size for empty bases.
11066         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
11067         empty bases. Don't add 1 to eoc value. Only add trailing padding
11068         if we're an empty class with no empty bases.
11069         (dump_class_hierarchy): Dump size and alignment.
11071 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
11073         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
11074         ICS_BAD_FLAG.
11076 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
11078         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
11079         is found, look first if name does not match the structure name.
11081 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
11083         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
11084         set.
11085         (SET_DECL_LANGUAGE): New macro.
11086         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
11087         (pushdecl): Likewise.
11088         (build_library_fn_1): Likewise.
11089         (build_cp_library_fn): Likewise.
11090         (grokfndecl): Likewise.
11091         (grokvardecl): Mark `extern "C"' variables as having C linkage.
11092         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
11093         * lex.c (retrofit_lang_decl): Likewise.
11094         * mangle.c (mangle_decl_string): Don't mangle the names of
11095         variables declared with C language linkage.
11096         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
11098 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
11100         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
11101         flag_access_control from uninitialized storage.
11103 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
11105         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
11106         * mangle.c (write_pointer_to_member_type): Fix mangling of
11107         pointers to cv-qualified member function types.
11109         * init.c (build_delete): Create a SAVE_EXPR for the address if
11110         we're going to use it more than once.
11112 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
11114         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
11115         (expand_ptremfunc_cst): Change prototype.
11116         (delta2_from_ptrmemfunc): Remove.
11117         * expr.c (cplus_expand_constant): Adjust call to
11118         expand_ptrmemfunc_cst.
11119         * typeck.c (build_ptrmemfunc1): Simplify.
11120         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
11121         results in a constant.
11122         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
11123         (delta2_from_ptrmemfunc): Remove.
11124         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
11126 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
11128         * cp-tree.h (decl_namespace_list): New macro.
11129         (struct saved_scope): Add decl_ns_list.
11130         * decl.c (mark_saved_scope): Mark it.
11131         * decl2.c: Lose static decl_namespace_list.
11132         (init_decl2): Don't save it.
11134 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11136         * cp-tree.h (warn_return_type, yylex): Delete redundant
11137         declarations.
11139         * decl.c (current_class_depth, global_namespace): Likewise.
11141         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
11143         * repo.c (flag_use_repository): Likewise.
11145 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11147         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
11148         set_block, pushdecl, getdecls, gettags, init_decl_processing,
11149         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
11150         lvalue_or_else, print_lang_statistics, comp_target_types,
11151         unsigned_type, signed_type, signed_or_unsigned_type,
11152         build_function_call, mark_addressable, incomplete_type_error):
11153         Delete redundant declarations.
11155 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
11157         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
11158         (TYPE_ANONYMOUS_P): New macro.
11159         (TAGGED_TYPE_P): New macro.
11160         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
11161         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
11162         * tree.c (no_linkage_helper): Likewise.
11163         * semantics.c (begin_class_definition): Likewise.
11164         * pt.c (convert_template_argument): Likewise.
11165         * lex.c (check_for_missing_semicolon): Likewise.
11167 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
11169         * class.c (dfs_unshared_virtual_bases): New function.
11170         (mark_primary_bases): Call it.
11171         (check_bases): Ignore virtual bases when determining
11172         nearly-emptiness.
11174 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
11176         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
11178 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
11180         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
11181         cloned function to the clone.
11183 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11185         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
11187         * semantics.c: Include expr.h.
11189 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
11191         * method.c (implicitly_declare_fn): Commonize code for copy ctor
11192         and assignment op. Set TREE_USED for parameter.
11194 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
11196         * class.c (find_final_overrider_data): Add `candidates'.
11197         (dfs_find_final_overrider): Don't issue error messages
11198         prematurely.
11199         (find_final_overrider): Issue error messages here.
11200         (build_base_field): Don't warn about amgibuous direct bases here.
11201         (warn_about_ambiguous_direct_bases): New function.
11202         (layout_class_type): Use it.
11204 2001-04-10  Richard Henderson  <rth@redhat.com>
11206         * typeck.c (build_array_ref): Push the array reference inside
11207         COMPOUND_EXPR and COND_EXPR.
11209 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
11211         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
11212         * decl.c (duplicate_decls): Adjust accordingly.
11213         (maybe_commonize_var): Likewise.
11214         (grokfndecl): Likewise.
11215         (start_function): Likewise.
11216         (start_method): Likewise.
11217         * decl2.c (key_method): Likewise.
11218         (import_export_decl): Likewise.
11219         * method.c (implicitly_declare_fn): Likewise.
11220         * optimize.c (maybe_clone_body): Likewise.
11222 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
11224         * lang-specs.h: Add __DEPRECATED.
11226 2001-04-05  J"orn Rennecke <amylaar@redhat.com>
11228         * search.c (get_dynamic_cast_base_type): When building a new
11229         constant, set its type to ssizetype.
11231 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
11233         * optimize.c (expand_call_inline): Only add newly inlined statements
11234         into inlined_stmts.
11236 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
11238         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
11239         (OPERATOR_FORMAT): Likewise.
11240         (OPERATOR_TYPENAME_FORMAT): Likewise.
11241         * operators.def: Remove old name-mangling information.
11242         * decl.c (grok_op_properties): Adjust accordingly.
11243         * lex.c (init_operators): Likewise.
11244         * rtti.c (get_tinfo_decl): Issue error messages about types that
11245         have variable size.
11247 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
11249         * decl2.c (import_export_decl): Don't call import_export_class
11250         when processing an inline member function.
11251         * semantics.c (expand_body): Call import_export_decl before
11252         emitting inline functions.
11254 2001-03-28  Richard Henderson  <rth@redhat.com>
11256         IA-64 ABI Exception Handling:
11257         * cp-tree.def (EH_SPEC_BLOCK): New.
11258         (MUST_NOT_THROW_EXPR): New.
11259         * cp-tree.h: Update changed function declarations.
11260         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
11261         (CPTI_CALL_UNEXPECTED): New.
11262         (struct cp_language_function): Rename x_eh_spec_try_block
11263         to x_eh_spec_block.
11264         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
11265         * decl.c (current_binding_level): If no current function
11266         bindings, revert to scope_chain.
11267         (initialize_predefined_identifiers): Remove __cp_push_exception.
11268         (store_parm_decls): Use begin_eh_spec_block.
11269         (finish_function): Use finish_eh_spec_block.
11270         (mark_lang_function): Update for name changes.
11271         * decl2.c (finish_file): No mark_all_runtime_matches.
11272         * dump.c (cp_dump_tree): Handle new tree codes.
11273         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
11274         * except.c (catch_language_init, catch_language): Remove.
11275         (init_exception_processing): Don't set language code.
11276         Initialize call_unexpected_node, protect_cleanup_actions,
11277         eh_personality_libfunc, lang_eh_runtime_type.
11278         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
11279         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
11280         (prepare_eh_type): Split out type canonicalizations ...
11281         (build_eh_type_type): ... from here.
11282         (build_eh_type_type_ref): Remove.
11283         (mark_all_runtime_matches): Remove.
11284         (build_exc_ptr): New.
11285         (do_begin_catch, do_end_catch): New.
11286         (do_pop_exception): Remove.
11287         (build_terminate_handler): Remove.
11288         (choose_personality_routine): Split out language choice from ...
11289         (initialize_handler_parm): ... here.
11290         Use MUST_NOT_THROW_EXPR.
11291         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
11292         exception object handling.
11293         (expand_start_eh_spec, expand_end_eh_spec): Remove.
11294         (expand_exception_blocks, alloc_eh_object): Remove.
11295         (begin_eh_spec_block, finish_eh_spec_block): New.
11296         (do_allocate_exception, do_free_exception): New.
11297         (expand_throw): Merge into ...
11298         (build_throw): ... here.  Update for abi.
11299         * expr.c (cplus_expand_expr): No expand_internal_throw.
11300         Handle MUST_NOT_THROW_EXPR.
11301         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
11302         * semantics.c (*) Update for except.h name changes.
11303         (genrtl_try_block): No protect_with_terminate.
11304         (genrtl_eh_spec_block): New.
11305         (genrtl_handler): Don't emit the goto here.
11306         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
11307         (genrtl_finish_function): Don't expand_exception_blocks.
11308         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
11310 2001-03-28  Richard Henderson  <rth@redhat.com>
11312         * decl.c (struct named_label_list): Rename eh_region to
11313         in_try_scope, add in_catch_scope.
11314         (struct binding_level): Rename eh_region to is_try_scope,
11315         add is_catch_scope.
11316         (note_level_for_try): Rename from note_level_for_eh.
11317         (note_level_for_catch): New.
11318         (poplevel): Copy both is_try_scope and is_catch_scope to
11319         the named_label_list struct.
11320         (check_previous_goto_1): Don't check for catch block via
11321         DECL_ARTIFICIAL; use in_try_scope instead.
11322         (check_goto): Likewise.
11323         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
11324         * except.c (expand_start_catch_block): Call note_level_for_catch.
11325         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
11327 2001-03-27  Richard Henderson  <rth@redhat.com>
11329         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
11330         exceptions_via_longjmp.
11332 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
11334         * pt.c (check_default_tmpl_args):  Make error messages clearer.
11336 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
11338         * error.c:  Also undefine 'A' macro used for cp_printers definition.
11340 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11342         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11344 2001-03-26  Mike Yang <yang@research.att.com>
11345             Mark Mitchell  <mark@codesourcery.com>
11347         * dump.c (dump_access): New function.
11348         (cp_dump_tree): Use it.  Dump basetype information for class
11349         types.
11351 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
11353         * Makefile.in (optimize.o): Depend on params.h.
11354         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
11355         (init_decl_processing): Set flag_no_inline when doing
11356         inlining-on-trees.
11357         * optimize.c: Include params.h.
11358         (struct inline_data): Improve documentation of FNS.  Add
11359         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
11360         (INSNS_PER_STMT): New macro.
11361         (remap_block): Use CLONING_P.
11362         (inlinable_function_p): Don't inline big functions.
11363         (expand_call_inline): Keep track of how much inlining we've done.
11364         (optimize_function): Set FIRST_INLINED_FN.
11365         (maybe_clone_body): Set CLONING_P.
11366         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
11367         tree nodes.
11368         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
11369         rest_of_compilation.  Clear DECL_RTL for local variables
11370         afterwards.
11371         (clear_decl_rtl): New function.
11373 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
11375         Implement DR 209
11376         * cp-tree.h (skip_type_access_control,
11377         reset_type_access_control): Prototype.
11378         * decl.c (grokdeclarator): Access of friends is not checked.
11379         * parse.y (component_decl_list): Reset type access control.
11380         * semantics.c (decl_type_access_control): Clear
11381         current_type_lookups.
11382         (save_type_access_control): Don't save if not deferring.
11383         (skip_type_access_control, reset_type_access_control): New
11384         functions.
11385         (begin_class_definition): Do type access control for basetypes.
11386         Start deferred access control.
11387         (finish_class_definition): Resume immediate access control if
11388         this is a local class.
11390 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11392         * class.c (add_method): Use memcpy/memmove, not bcopy.
11394         * decl.c (duplicate_decls): Likewise.
11396 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
11398         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
11399         not `_'.
11401 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
11403         * decl.c (local_names): Define.
11404         (push_local_name): New.
11405         (grok_reference_init): Return init if initializing static reference
11406         variable with non-constant instead of emitting it.
11407         Move expand_static_init call to cp_finish_decl.
11408         (layout_var_decl): Call push_local_name.
11409         (maybe_commonize_var): Allow inlining functions even if they have
11410         static local variables, use comdat_linkage for them if flag_weak.
11411         (check_initializer): Call obscure_complex_init if
11412         grok_reference_init returned nonzero.
11413         (save_function_data): Clear x_local_names.
11414         (pop_cp_function_context): Free x_local_names.
11415         (mark_inlined_fns): Remove.
11416         (mark_lang_function): Mark x_local_names.
11417         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
11418         Mark inlined_fns as tree, remove call to mark_inlined_fns.
11419         * class.c (alter_access): Ensure DECL_ACCESS is never set if
11420         DECL_DISCRIMINATOR_P.
11421         * cp-tree.h (cp_language_function): Add x_local_names.
11422         (lang_decl_flags): Add discriminator into u2.
11423         (lang_decl_inlined_fns): Remove.
11424         (lang_decl): inlined_fns is now a TREE_VEC.
11425         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
11426         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
11427         TREE_VEC, not a custom structure.
11428         (optimize_function): Likewise.
11429         * mangle.c (discriminator_for_local_entity): Discriminate among
11430         VAR_DECL local entities.
11431         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
11432         is not valid.
11434 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
11436         Add support for Java interface method calls.
11437         * cp-tree.h (struct lang_type): Add java_interface flag.
11438         (TYPE_JAVA_INTERFACE): New macro.
11439         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
11440         by setting TYPE_JAVA_INTERFACE.
11441         * call.c (java_iface_lookup_fn): New static.
11442         (build_over_call): If calling a method declared in a
11443         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
11444         expression which resolves the function address.
11445         (build_java_interface_fn_ref): New function.
11447 2001-03-22  Richard Henderson  <rth@redhat.com>
11449         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
11450         * except.c: Don't include it.
11452 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
11453             based on an idea from Joe Buck <jbuck@synopsys.com>
11455         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
11456         New nonterminals.
11457         (data_def, component_decl): Add reductions to bad_decl.
11459 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
11461         * method.c (do_build_assign_ref): Don't use build_modify_expr for
11462         anonymous aggregates, since they don't have assignment operator
11463         method.
11464         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
11465         assignment operators for anonymous structure fields.
11467 2001-03-21  Jason Merrill  <jason@redhat.com>
11469         * pt.c (instantiate_decl): Abort if we see a member constant
11470         instantiation that doesn't already have its initializer.
11471         Downgrade explicit instantiation without definition to pedwarn.
11473         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
11474         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
11475         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
11477         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
11478         (pending_vtables): Remove.
11479         * decl2.c (pending_vtables): Remove.
11480         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
11481         CLASSTYPE_VTABLE_NEEDS_WRITING.
11482         (import_export_class): Likewise.
11483         (init_decl2): Don't mark pending_vtables.
11484         * lex.c (handle_pragma_vtable): Just sorry.
11485         * pt.c (instantiate_class_template): Don't mess with
11486         CLASSTYPE_VTABLE_NEEDS_WRITING.
11487         (mark_class_instantiated): Likewise.
11488         * ptree.c (print_lang_type): Don't print it.
11489         * semantics.c (begin_class_definition): Don't set it.
11491         * pt.c (template_tail): Replace with last_pending_template.
11492         (maybe_templates, maybe_template_tail): Remove.
11493         (add_pending_template): Adjust.
11494         (instantiate_pending_templates): Adjust.
11496         * cp-tree.h (struct saved_scope): Remove lang_stack field.
11497         (current_lang_stack): Remove.
11498         * decl.c (maybe_push_to_top_level): Don't initialize it.
11499         (duplicate_decls): Use current_lang_depth.
11500         (xref_basetypes): Likewise.
11501         * class.c (current_lang_depth): New fn.
11502         (push_lang_context): Use more varray functionality.
11503         (pop_lang_context): Likewise.
11505         * error.c (GLOBAL_THING): Always use '__'.
11507 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
11509         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
11511         * mangle.c (mangle_decl_string): Mangle the names of overloaded
11512         operators, even when they have `extern "C"' linkage.
11514 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
11516         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
11517         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11518         where it's not necessary.
11519         (add_method): Remove optimization involving comparison of
11520         DECL_ASSEMBLER_NAME.
11521         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
11522         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11523         where it's not necessary.
11524         (check_methods): Likewise.
11525         (build_clone): Likewise.
11526         (built_vtt): Likewise.
11527         * cp-tree.h (DECL_NEEDED_P): Likewise.
11528         * decl.c (pushtag): Likewise.
11529         (duplicate_decls): Likewise.
11530         (pushdecl): Likewise.
11531         (builtin_function): Likewise.
11532         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
11533         (build_cp_library_fn): Likewise.
11534         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
11535         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11536         where it's not necessary.
11537         (make_rtl_for_nonlocal_decl): Likewise.
11538         (cp_finish_decl): Likewise.
11539         (grokfndecl): Likewise.
11540         (grokvardecl): Likewise.
11541         (grokdeclarator): Likewise.
11542         (start_function): Likewise.
11543         (cp_missing_return_ok_p): Likewise.
11544         * decl2.c (grokclassfn): Likewise.
11545         (check_classfn): Likewise.
11546         (finish_static_data_member_decl): Likewise.
11547         (grokfield): Likewise.
11548         * error.c (GLOBAL_IORD_P): Remove.
11549         (dump_global_iord): Improve output.
11550         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
11551         * except.c (nothrow_libfn_p): Summarily reject any function not in
11552         namespace-scope.
11553         * init.c (build_java_class_ref): Don't explicitly set
11554         DECL_ASSEMBLER_NAME after calling mangle_decl.
11555         * mangle.c (mangle_decl_string): Handle extern "C" functions.
11556         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
11557         * method.c (set_mangled_name_for_decl): Don't explicitly set
11558         DECL_ASSEMBLER_NAME after calling mangle_decl.
11559         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
11560         IDENTIFIER_GLOBAL_VALUE for the thunk.
11561         * pt.c (set_mangled_name_for_template_decl): Remove.
11562         (check_explicit_specialization): Don't use it.
11563         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
11564         (tsubst_friend_function): Likewise.
11565         (tsubst_decl): Likewise.
11566         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
11567         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
11568         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
11569         where it's not necessary.
11570         (tinfo_base_init): Likewise.
11571         (create_real_tinfo_var): Likewise.
11572         * search.c (looup_field_1): Likewise.
11573         * semantics.c (finish_named_return_value): Likewise.
11574         * tree.c (init_tree): Set lang_set_decl_assembler_name.
11576 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
11578         Correct semantics restrictions checking in throw-expression.
11579         * except.c (is_admissible_throw_operand): New function.
11580         (build_throw): Use it.
11582 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11584         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
11585         and its ilk.
11587 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11589         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11590         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
11591         * decl.c (duplicate_decls): Likewise.
11592         (builtin_function): Likewise.
11593         (build_library_fn): Likewise.
11594         (build_cp_library_fn): Likewise.
11595         (check_initializer): Likewise.
11596         (cp_finish_decl): Likewise.
11597         * decl2.c (grokfield): Likewise.
11598         (grok_function_init): Remove #if 0'd code.
11599         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11600         * friend.c (do_friend): Likewise.
11601         * init.c (get_temp_regvar): Likewise.
11602         * method.c (make_thunk): Likewise.
11603         * pt.c (tsubst_friend_function): Likewise.
11604         (tsubst_decl): Likewise.
11605         (regenerate_decl_from_template): Likewise.
11606         * semantics.c (genrtl_named_return_value): Likewise.
11607         (expand_body): Likewise.
11608         (genrtl_finish_function): Likewise.
11609         * tree.c (cp_tree_equal): Likewise.
11611 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
11613         * call.c (convert_like_real): Add extra semantics to INNER
11614         parameter. Don't convert to temporary if a user conversion
11615         gives us an lvalue that we're about to bind to a reference.
11616         Set INNER to indicate pending reference binding on recursive
11617         calls.
11619 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
11621         * cp/lex.c: Delete duplicate pending_lang_change.
11623 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
11625         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
11626         Similarly.
11627         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
11628         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
11630 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
11632         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
11634 2001-03-08  Stan Shebs  <shebs@apple.com>
11636         * cp-tree.h (set_identifier_local_value): Remove unused decl.
11638 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
11640         * spew.c: Remove references to CPP_OSTRING.
11642 2001-03-06  Andrew Haley  <aph@redhat.com>
11644         * typeck.c (convert_arguments): Check that we have an fndecl.
11646 2001-03-05  Andrew Haley  <aph@redhat.com>
11648         * typeck.c (convert_arguments): Don't do ellipsis conversion for
11649         __built_in_constant_p.
11651 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
11653         * typeck.c (build_static_cast): Allow enum to enum conversions
11654         as per DR 128.
11656 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
11658         * class.c (check_field_decls): Pointers to member do not a
11659         non-pod struct make, as per DR 148.
11661 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
11663         * call.c (joust): cp_pedwarn when using gnu extension concerning
11664         worst conversion sequences.
11666 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11668         * decl.c: Replace all uses of 'boolean' with 'bool'.
11670 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11672         * lang-specs.h: Add zero initializer for cpp_spec field to
11673         all array elements that need one.  Don't put an #ifdef inside
11674         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
11675         use it.
11677 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
11679         Implement using decls inside template functions.
11680         * decl2.c (validate_nonmember_using_decl): Don't special case
11681         fake_std_node in the global namespace. Don't reject early when
11682         processing a template.
11683         (do_local_using_decl): Add to statement tree. Don't do further
11684         processing when building a template.
11685         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
11687 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
11689         * decl2.c (do_nonmember_using_decl): Don't complain if we find
11690         same function. Do complain about ambiguating extern "C"
11691         declarations.
11693 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
11695         Remove floating point and complex type template constant parms.
11696         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
11697         COMPLEX_TYPE extensions.
11698         (invalid_nontype_parm_type_p): Likewise.
11700 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
11702         * except.c (call_eh_info): Revert "match_function"'s type.
11704 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
11706         Fix ctor vtable vcall offsets.
11707         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
11708         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
11709         (get_matching_base): Remove.
11710         (get_original_base): New function.
11711         (build_vtbl_initializer): Initialize vid.rtti_binfo.
11712         Use a virtual thunk for a ctor vtable with an index
11713         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
11714         primary base within a constructor vtable. Only set
11715         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
11716         when primary base has been lost.
11717         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
11719 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
11721         * call.c (joust): Ensure more_specialized()'s argument length
11722         parameter has correct value for constructors.
11724 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
11726         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
11728         * decl.c (mark_inlined_fns): Prototype.
11730 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
11732         * spew.c (yylex): Correct handling of friends.
11734 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
11736         * mangle.c (write_encoding): Pass write_function_type the
11737         FUNCTION_DECL for the function being encoded.
11738         (write_function_type): Pass it along to write_bare_function_type.
11739         (write_bare_function_type): Pass it along to write_method_parms.
11740         (write_method_parms): Don't mangle the compiler-generated
11741         parameters to a constructor or destructor.
11743 2001-02-22  Andreas Jaeger  <aj@suse.de>
11745         * optimize.c: Include toplev.h for
11746         note_deferral_of_defined_inline_function prototype.
11748 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
11750         * cp-tree.h (struct lang_decl_inlined_fns): New.
11751         (struct lang_decls): Add inlined_fns.
11752         (DECL_INLINED_FNS): New macro.
11753         * optimize.c (struct inline_data): Add inlined_fns.
11754         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
11755         (inlinable_function_p): Likewise, fix typo in comment,
11756         function is not inlinable if it already inlined function currently
11757         being optimized.
11758         (expand_call_inline): Add fn to inlined_fns if necessary.
11759         (optimize_function): Initialize inlined_fns.
11760         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
11761         * decl.c (mark_inlined_fns): New function.
11762         (lang_mark_tree): Call it.
11764 2001-02-21  Jason Merrill  <jason@redhat.com>
11766         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
11767         (DECL_UNINLINABLE): Move to middle-end.
11769         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
11770         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
11771         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
11772         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
11773         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
11775         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
11776         second parm of op=.
11778 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
11780         * decl2.c (set_decl_namespace): Allow explicit instantiations in
11781         any namespace.
11783 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
11785         * optimize.c (expand_call_inline): Don't walk subtrees of type
11786         nodes.
11788 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
11790         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
11791         for a destructor.
11793 2001-02-18  Jason Merrill  <jason@redhat.com>
11795         Do put the VTT parameter in DECL_ARGUMENTS.
11796         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
11797         (current_vtt_parm): New macro.
11798         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
11799         (DECL_HAS_VTT_PARM_P): New macro.
11800         (DECL_VTT_PARM): Remove.
11801         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
11802         * decl.c (duplicate_decls): Only copy the operator code if
11803         appropriate.
11804         (start_function): Set current_vtt_parm.
11805         (lang_mark_tree): Don't mark vtt_parm.
11806         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
11807         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
11808         * class.c (build_clone): Maybe remove the VTT parm.
11809         * optimize.c (maybe_clone_body): Set up the VTT parm.
11810         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
11811         * call.c (build_over_call): Just allow the VTT arg.
11812         * method.c (make_thunk): Don't set DECL_VTT_PARM.
11813         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
11814         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
11815         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
11816         * error.c (dump_function_decl): Likewise.
11817         * call.c (build_user_type_conversion_1, convert_like_real): Abort
11818         if we try to call a constructor with in-charge or VTT parms.
11819         * method.c (skip_artificial_parms_for): New fn.
11820         * call.c (add_function_candidate, build_over_call): Call it.
11821         * call.c (build_new_method_call): Use current_vtt_parm.
11822         * init.c (expand_virtual_init): Likewise.
11823         * class.c (same_signature_p): No longer static.
11824         * cp-tree.h: Declare it.
11825         * search.c (look_for_overrides_r): Use it.
11827 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
11829         * cp-tree.h (new_abi_rtti_p): Remove.
11830         (name_mangling_version): Likewise.
11831         (flag_do_squangling): Likewise.
11832         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
11833         * decl.c (grokfndecl): Likewise.
11834         * decl2.c (name_mangling_version): Remove.
11835         (flag_do_squangling): Likewise.
11836         (lang_f_options): Remove `squangle'.
11837         (unsupported_options): Add `squangle'.
11838         (cxx_decode_option): Issue a warning about uses of
11839         -fname-mangling-version.
11840         (finish_file): Remove old ABI support.
11841         * pt.c (check_explicit_specialization): Likewise.
11842         (tsubst_decl): Likewise.
11843         * rtti.c (init_rtti_processing): Likewise.
11844         (build_headof): Likewise.
11845         (get_tinfo_decl_dynamic): Likewise.
11846         (tinfo_from_decl): Likewise.
11847         (build_dynamic_cast_1): Likewise.
11848         (synthesize_tinfo_var): Likewise.
11849         * init.c (build_new): Allow enumeration types for the array-bounds
11850         in a direct-new-declarator.
11852         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
11854         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
11855         TREE_PROTECTED from the template being specialized.
11857 2001-02-17  Jason Merrill  <jason@redhat.com>
11859         * decl2.c (build_artificial_parm): Set TREE_READONLY.
11861         * decl.c (bad_specifiers): Allow throw specs on things with
11862         pointer-to-function or -member-function type.
11863         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
11864         a pmf.
11866 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
11868         * call.c (check_dtor_name): Handle template names correctly.
11870 2001-02-16  Jason Merrill  <jason@redhat.com>
11872         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
11873         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
11874         * optimize.c (maybe_clone_body): Don't substitute it.
11875         * call.c (build_new_method_call): Check in_chrg instead.
11876         * init.c (expand_virtual_init): Likewise.
11878 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
11880         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
11881         class-type introduces at least a type-name.
11883 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
11885         * call.c (convert_like_real): Create a temporary for non-lvalue.
11887 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
11889         * cp-tree.h: Fix typos in comments.
11891 2001-02-16  Jason Merrill  <jason@redhat.com>
11893         * optimize.c (remap_block): If we're compiling a clone, pass the
11894         new block to insert_block.
11896 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
11898         * semantics.c (finish_asm_stmt): Robustify.
11900 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
11902         * pt.c (push_template_decl_real): Don't remangle the name of a
11903         class template.
11905 2001-02-15  Jim Meyering  <meyering@lucent.com>
11907         * Make-lang.in (c++.install-common): Depend on installdirs.
11908         (c++.install-info): Likewise.
11909         (c++.install-man): Likewise.
11911 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
11913         * typeck2.c (build_m_component_ref): Robustify.
11915 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
11917         * friend.c (do_friend): Don't take the nested [template] class
11918         into account when deciding whether to warn about the friend
11919         function not referring to a template function.
11921 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
11923         * typeck.c (build_unary_op): Clarify error message.
11925 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
11927         * parse.y (component_constructor_declarator): allow optional
11928         parentheses around constructor class name.
11930 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11932         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
11933         section.
11934         * init.c (emit_base_init): Remove incorrect comment about
11935         virtual bases.
11936         * method.c (make_thunk): Fix comment alignment.
11938 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11940         Kill remnants of this is variable.
11941         * cp-tree.h (flag_this_is_variable): Remove.
11942         * decl2.c (flag_this_is_variable): Remove.
11943         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
11944         (build_vbase_path): The path is non-static, even in a cdtor.
11945         (resolves_to_fixed_type_p): Add additional return value.
11946         * search.c (init_vbase_pointers): Adjust.
11947         * tree.c (lvalue_p_1): Adjust.
11948         * typeck.c (mark_addressable): Adjust.
11950 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11952         * pt.c (unify): Don't check cv quals of array types.
11954 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
11956         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
11957         check whether we already have the type.
11959 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
11961         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
11962         * call.c (build_op_delete_call): Simplify to remove duplicate
11963         code.
11964         * class.c (clone_function_decl): Don't build the deleting variant
11965         of a non-virtual destructor.
11966         * decl.c (finish_destructor_body): Don't call delete if this is a
11967         non-virtual destructor.
11968         * init.c (build_delete): Explicitly call `operator delete' when
11969         deleting an object with a non-virtual destructor.
11971 2001-02-13  Jason Merrill  <jason@redhat.com>
11973         * lang-specs.h: Add more __EXCEPTIONS.
11975 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
11977         * typeck2.c (process_init_constructor): Check
11978         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
11980 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
11982         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
11983         Remove spurious information in comment. Allow further
11984         adjustments of REFERENCE_TYPE args.
11986 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
11988         * errfn.c (cp_deprecated): Tweak diagnostic text.
11989         * parse.y (new_initializer): Deprecate initializer lists
11990         extension.
11992 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
11994         Remove old ABI support.
11996 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
11998         * decl2.c (flag_vtable_thunks): Always set it to 1.
11999         (flag_new_abi): Likewise.
12000         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
12002         * Makefile.in (g++spec.o): Fix typo.
12004 2001-02-09  Jason Merrill  <jason@redhat.com>
12006         * lang-specs.h: Restore definition of __EXCEPTIONS.
12008 2001-02-08  Jason Merrill  <jason@redhat.com>
12010         * search.c (shared_member_p): New function.
12011         (lookup_field_r): Use it.
12012         * cp-tree.h (SHARED_MEMBER_P): Remove.
12014         * method.c (process_overload_item): Handle template-dependent array
12015         bounds.
12016         * pt.c (type_unification_real): If we end up with undeduced nontype
12017         parms, try again.
12019         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
12020         types.
12022         * typeck2.c (friendly_abort): Don't say anything if we have
12023         earlier errors or sorries.
12025         * decl.c (check_tag_decl): Notice attempts to redefine bool and
12026         wchar_t.  Ignore if in_system_header.
12028         * decl.c (maybe_push_cleanup_level): New fn...
12029         (start_decl_1): ...split out from here.
12030         * cvt.c (build_up_reference): Use it.
12031         * cp-tree.h: Declare it.
12033 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
12035         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
12036         spec.
12038 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
12040         * pt.c (lookup_template_class): Make sure it's a primary
12041         template or template_template_parm when called from the parser.
12042         (instantiate_template_class): Add assertion.
12044 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
12046         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
12047         from error_mark_node.
12049 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
12051         Fix specification and implementation bugs in V3 ABI
12052         construction vtables.
12053         * cp-tree.h (flag_dump_class_layout): New flag.
12054         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
12055         (BINFO_LOST_PRIMARY_P): New flag.
12056         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
12057         (BINFO_PRIMARY_MARKED_P): Rename to ...
12058         (BINFO_PRIMARY_P): ... here.
12059         (binfo_via_virtual): New prototype.
12060         * decl2.c (flag_dump_class_layout): New flag.
12061         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
12062         use `=' as a file name separator.
12063         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
12064         bases.
12065         (build_vtbl_address): If this is a virtual primary base, then
12066         get the vtbl of what it is ultimately primary for.
12067         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
12068         for BINFO_PRIMARY_P.
12069         (dfs_skip_nonprimary_vbases_markedp): Likewise.
12070         (get_shared_vbase_if_not_primary): Likewise.
12071         (dfs_get_pure_virtuals): Likewise.
12072         (expand_upcast_fixups): Likewise.
12073         (fixup_virtual_upcast_offsets): Likewise.
12074         (dfs_find_vbase_instance): Likewise.
12075         (find_vbase_instance): Likewise.
12076         (binfo_from_vbase): Adjust comment to reflect reality.
12077         (binfo_via_virtual): New function.
12078         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
12079         for binfo walking during VTT construction.
12080         (dfs_mark_primary_bases): Remove.
12081         (force_canonical_binfo_r): New function.
12082         (force_canonical_binfo): New function.
12083         (mark_primary_virtual_base): New function.
12084         (mark_primary_bases): Walk in inheritance graph order, use
12085         mark_primary_virtual_base.
12086         (determine_primary_base): Use some more intermediate variables.
12087         (dfs_find_final_overrider): Don't check for overriding along a
12088         virtual path.
12089         (dfs_modify_vtables): Walk into primary virtual bases too.
12090         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
12091         (build_base_fields): Likewise.
12092         (dfs_set_offset_for_unshared_vbases): Likewise.
12093         (layout_virtual_bases): Likewise.
12094         (end_of_class): Likewise.
12095         (finish_struct_1): Call dump_class_hierarchy, if requested.
12096         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
12097         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
12098         (dump_class_hierarchy): Add file parameter. Append to file, if
12099         required.
12100         (finish_vtbls): Adjust accumulate_vtbl_inits call.
12101         Use canonical base for virtual bases.
12102         (build_vtt): Add more comments. Adjust build_vtt_inits call.
12103         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
12104         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
12105         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
12106         virtual VTTs.
12107         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
12108         from DATA.  We want virtual primary bases and all bases via virtual.
12109         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
12110         virtual base when not a construction vtable.
12111         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
12112         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
12113         Use canonical bases when processing virtual bases.
12114         (accumulate_vtbl_inits): We're interested in any base via a
12115         virtual path.
12116         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
12117         within a construction vtable, determine what is being overridden.
12118         (build_vtbl_initializer): Add more comments
12119         (add_vcall_offset_vtbl_entries_1): Adjust comment.
12120         (build_rtti_vtbl_entries): Check if the base has lost its
12121         primary.
12123 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
12125         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
12127 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12129         * decl.c (pushdecl): Call abort instead of fatal.
12130         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
12131         * init.c (build_new_1): Likewise.
12132         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
12133         * decl.c (build_typename_type): hash_table_init now returns void.
12134         decl.c (init_decl_processing): Make an error non-fatal.
12136 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
12138         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
12139         Document.
12140         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
12141         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
12142         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
12143         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
12144         * decl.c (maybe_commonize_var): Use the new name-mangling where
12145         appropriate.
12146         * decl2.c (comdat_linkage): Enhance comments.  Make all
12147         compiler-generated things static, if COMDAT is not available.
12148         (get_tinfo_decl): Do not make typeinfo objects that belong in the
12149         library COMDAT.
12150         (tinfo_base_init): Use the correct mangled name for typeinfo
12151         strings, and push them into the global scope.
12152         (typeinfo_in_lib_p): New function.
12153         (synthesize_tinfo_var): Use it.
12154         (create_real_tinfo_var): Likewise.
12156 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
12158         * decl.c (push_class_binding): Use context_for_name_lookup instead
12159         of CP_DECL_CONTEXT.
12160         * search.c (context_for_name_lookup): Remove static.  Check for NULL
12161         context in the loop.
12162         * cp-tree.h (context_for_name_lookup): Add prototype.
12164 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
12166         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
12167         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
12168         Remove.
12169         * call.c (convert_class_to_reference, build_user_type_conversion_1,
12170         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
12172 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
12174         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
12175         of macros used when compiling g++spec.c.
12176         * g++spec.c (lang_specific_driver): Link with the shared
12177         libgcc by default.
12179 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
12181         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
12182         make_reference_declarator, make_call_declarator), method.c
12183         (implicitly_declare_fn), parse.y (namespace_using_decl,
12184         notype_unqualified_id, expr_or_declarator, new_type_id,
12185         after_type_declarator, direct_after_type_declarator,
12186         notype_declarator, complex_notype_declarator,
12187         complex_direct_notype_declarator, qualified_id,
12188         notype_qualified_id, overqualified_id, direct_new_declarator,
12189         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
12190         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
12191         instead of build_parse_node.
12193 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12195         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
12196         (minus_one_node): Moved to top level gcc directory.  Renamed
12197         to integer_minus_one_node.
12199         * init.c (init_init_processing): Don't set minus_one_node.
12200         (build_vec_init): Use integer_minus_one_node.
12202         * rtti.c (get_tinfo_decl_dynamic): Likewise.
12204 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
12206         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
12207         identical and they would be replaced with constant, remove
12208         MODIFY_EXPR from the tree.
12210 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12212         * Make-lang.in: Remove all dependencies on defaults.h.
12213         * call.c: Don't include defaults.h.
12214         * decl.c: Likewise.
12215         * decl2.c: Likewise.
12216         * except.c: Likewise.
12217         * pt.c: Likewise.
12218         * rtti.c: Likewise.
12219         * tree.c: Likewise.
12220         * typeck.c: Likewise.
12222 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
12224         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
12225         operators even in "C" linkage.
12226         * method.c (set_mangled_name_for_decl): Likewise.
12227         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
12228         overloaded operators in "C" linkage.
12230 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
12232         * pt.c (tsubst_decl): Remove IN_DECL parameter.
12233         (tsubst_arg_types): Check parameter is not void.
12234         (tsubst): Adjust tsubst_decl call.
12236 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
12238         * call.c (add_builtin_candidate): Quote std properly, from
12239         previous change.
12241 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12243         * pt.c (check_explicit_specialization): Clone constructors and
12244         destructors.
12246 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
12248         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
12249         indicates anything special about template depth. Make sure we
12250         only count the user visible template classes.
12252 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
12254         * call.c (build_conv): Typo in comment.
12255         (add_builtin_candidate): Add more explanation.
12256         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
12257         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
12258         when we have enumeral types.
12259         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
12260         candidates for relops and eqops.
12261         (joust): Simplify control flow. Allow a non-template user
12262         function to hide a builtin.
12264 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
12266         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
12267         (more_specialized): Add deduction parameter.
12268         * call.c (joust): Adjust more_specialized call.
12269         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
12270         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
12271         (get_bindings_order): Remove.
12272         (get_bindings_real): Add DEDUCE parameter.
12273         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
12274         REFERENCE_TYPE jig for DEDUCE_ORDER.
12275         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
12276         maybe_adjust_types_for_deduction.
12277         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
12278         directly.
12279         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
12280         (check_cv_quals_for_unify): Use new unify qualifier flags.
12281         (unify): Clear new unify qualifier flags.
12282         (get_bindings_real): Add DEDUCE parameter.
12283         (get_bindings): Adjust call to get_bindings_real.
12284         (get_bindings_overload): Likewise.
12285         (most_specialized_instantiation): Adjust call to
12286         more_specialized.
12288 2001-01-19  Jason Merrill  <jason@redhat.com>
12290         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
12292         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
12293         -fnew-abi.
12295 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
12297         * decl2.c (arg_assoc_class): Fix double iteration logic.
12299 2001-01-19  Jason Merrill  <jason@redhat.com>
12301         * init.c (build_delete): Always call convert_force to strip cv-quals.
12303         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
12304         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
12305         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
12307 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12309         * search.c (get_vbase_1): Count only virtual bases.
12311 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12313         * class.c (duplicate_tag_error): Robustify flag clearing.
12315 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12317         * cp-tree.h (lookup_template_class): Add complain parm.
12318         * decl.c (lookup_namespace_name): Adjust call to
12319         lookup_template_class.
12320         (make_typename_type): Likewise.
12321         * semantics.c (finish_template_type): Likewise.
12322         * pt.c (lookup_template_class): Add complain parm. Adjust.
12323         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
12324         (tsubst): Likewise.
12326 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
12328         * pt.c (copy_default_args_to_explicit_spec): Preserve
12329         object's CV quals. Reorganize.
12331 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12333         * typeck.c (build_modify_expr): Say `initialization' for
12334         INIT_EXPRs.
12335         * init.c (build_default_init): Convert to enumeral type, if
12336         needed.
12338 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
12340         * parse.y (nomods_initdcl0): Properly set things up for
12341         initdcl0_innards.
12343 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12345         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
12346         (type_unification_real): Set it.
12347         (unify): Use it.
12349 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12351         * decl.c (finish_destructor_body): Convert to vbase pointer here.
12353 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12355         * semantics.c (begin_class_definition): Check we're not inside a
12356         template parm list.
12358 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
12360         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
12361         BASELINK_P.
12363 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12365         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
12366         * call.c (build_over_call): Add comment.
12368 2001-01-16 Daniel Berlin <dberlin@redhat.com>
12370         * cvt.c (ocp_convert): Handle vector type conversion
12371         * typeck2.c (digest_init): Handle vector type initializations
12373 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
12375         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
12376           was given.
12378 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
12380         * pt.c (check_nontype_parm): Rename to ...
12381         (invalid_nontype_parm_type_p): ... here.
12382         (process_template_parm): Adjust.
12383         (convert_template_argument): Adjust.
12385 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
12387         * pt.c (check_nontype_parm): New function.
12388         (process_template_parm): Use it.
12389         (convert_template_argument): Use it.
12390         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
12391         member.
12393 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
12395         * tree.c: Add defaults.h
12396         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
12397         * Make-lang.in (cp/tree.o): Add defaults.h.
12399 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12401         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
12403 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12405         * g++.1: Change to be ".so man1/gcc.1".
12407 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12409         * Make-lang.in (c++.info, c++.install-info): Build and install g++
12410         internals info.
12411         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
12412         ($(srcdir)/cp/g++int.info): New target.
12413         * gxxint.texi: Add info directory entry.  Use @@ in email address.
12414         * .cvsignore: Update.
12416 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
12418         * typeck.c (build_c_cast): Do template processing earlier.
12419         Always pedwarn on array casts.
12421 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
12423         * friend.c (make_friend_class): Make sure a templated class is
12424         actually a template.
12426 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12428         * decl2.c (get_guard): Set linkage from guarded decl.
12430 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12432         * call.c (convert_default_arg): Check for unprocessed
12433         DEFAULT_ARG.
12434         * cp-tree.h (replace_defarg): Move to spew.c.
12435         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
12436         spew.c, which is where they really are.
12437         (done_pending_defargs): Declare.
12438         (unprocessed_defarg_fn): Declare.
12439         * decl.c (replace_defarg): Move to spew.c
12440         * parse.y (structsp): Call done_pending_defargs.
12441         * spew.c (defarg_fns): Rearrange list structure.
12442         (defarg_fnsdone): New static variable.
12443         (defarg_depfns): New static variable.
12444         (init_spew): Adjust.
12445         (add_defarg_fn): Store the type in TREE_TYPE.
12446         (do_pending_defargs): Detect and deal with ordering constraints
12447         and circularity.
12448         (done_pending_defargs): New function.
12449         (unprocessed_defarg_fn): New function.
12450         (replace_defarg): Moved from decl.c. Robustify. Don't save
12451         if circularity detected.
12453 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12455         * pt.c (unify): Check array has a domain, before checking
12456         whether it is variable sized.
12458 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12460         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
12461         parameters with pointers to arrays of unknown bound.
12463 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
12465         * parse.y (template_parm_header, template_spec_header): New
12466         reductions. Split out from ...
12467         (template_header): ... here. Use them.
12468         (template_template_parm): Use template_parm_header.
12469         * semantics.c (finish_template_template_parm): Add assert.
12471 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
12473         * mangle.c (write_builtin_type): Fix thinko.
12475         * pt.c (copy_default_args_to_explicit_spec_1): New function.
12476         (copy_default_args_to_explicit_spec): Likewise.
12477         (check_explicit_specialization): Use it.
12479         * class.c (finish_struct_1):  Remove last argument in call to
12480         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
12481         * decl.c (builtin_function): Likewise.
12482         (build_cp_library_fn): Likewise.
12483         (check_initializer): Likewise.
12484         (make_rtl_for_nonlocal_decl): Likewise.
12485         (cp_finish_decl): Likewise.
12486         (start_function): Likewise.
12487         * decl2.c (finish_anon_union): Likewise.
12488         * friend.c (do_friend): Likewise.
12489         * init.c (build_java_class_ref): Likewise.
12490         * method.c (make_thunk): Likewise.
12491         * pt.c (tsubst_friend_function): Likewise.
12492         * semantics.c (expand_body): Likewise.
12494 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
12496         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
12497         looking at DECL_CLONED_FUNCTION for non-functions.
12499 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
12501         * error.c (dump_template_parameter): Use parm to determine how
12502         to print default value.
12504 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
12506         * class.c (duplicate_tag_error): Clear more flags.
12508 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
12510         * call.c (build_new_method_call): Use binfo_for_vbase.
12512 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
12514         * cp-tree.h (flag_cond_mismatch): Don't declare.
12515         * decl2.c (flag_cond_mismatch): Don't define.
12516         (lang_f_options): Remove cond-mismatch.
12517         (unsupported_options): Add cond-mismatch.
12519 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
12521         * class.c (handle_using_decl): Reject using of constructor name
12522         of sourcing class. Allow injecting of a method with same name as
12523         nested class. Fixup error messages.
12525 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
12527         * decl2.c (lang_decode_option): Handle -Wformat=2.
12529 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
12531         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
12532         initialized_in_class.
12533         (DECL_DEFINED_IN_CLASS_P): Rename to ...
12534         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
12535         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
12536         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
12537         * pt.c (check_default_tmpl_args): Adjust for
12538         DECL_INITIALIZED_IN_CLASS_P.
12539         (instantiate_class_template): Likewise.
12540         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
12542         * class.c (finish_struct): Constify saved_filename.
12544 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
12546         * class.c (duplicate_tag_error): Adjust diagnostic.
12547         (finish_struct): Locally set location to start of struct.
12548         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
12550 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
12552         * decl.c (struct binding_level): Adjust class_shadowed comments
12553         to reflect reality.
12554         (push_class_level_binding): Adjust comments to reflect reality.
12555         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
12556         Don't set TREE_VALUE on the class_shadowed list.
12558 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12560         * decl2.c (acceptable_java_type): Allow references too.
12561         * init.c (build_java_class_ref): When using the new ABI, search
12562         `class$' and have it mangled with `mangle_decl.'
12563         * mangle.c (write_java_integer_type_codes): New function.
12564         (write_builtin_type): Detect and mangle Java integer and real
12565         types.
12567 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
12569         * decl2.c (grokfield): Don't accept `asm' specifiers for
12570         non-static data members.
12572 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12574         * expr.c (cplus_expand_expr): Don't reset `target'.
12576 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
12578         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
12580 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
12582         * parse.y (template_datadef): Check for error_mark_node.
12584 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
12586         * cp-tree.def (DEFAULT_ARG): Make `x' class.
12588 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
12590         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
12591         (record_builtin_type): Make non-static.
12592         (flag_short_double): Don't declare.
12593         (init_decl_processing): Remove the creation of many tree nodes now
12594         in c_common_nodes_and_builtins.
12595         (build_void_list_node): New function.
12596         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
12597         * cp-tree.h (flag_short_wchar): Don't declare.
12599 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
12601         * call.c (build_conv): Don't use build1 for USER_CONV.
12602         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
12604 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
12606         * lex.c (lang_init): Call c_common_lang_init.
12608 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
12610         * search.c (lookup_fnfields_here): Remove.
12611         (look_for_overrides_r): Use lookup_fnfields_1.
12612         Ignore functions from using declarations.
12614 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
12616         Implement exceptions specifiers for implicit member functions.
12617         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
12618         * method.c (synthesize_exception_spec): New function.
12619         (locate_dtor, locate_ctor, locate_copy): New functions.
12620         (implicitly_declare_fn): Generate the exception spec too.
12621         * search.c (check_final_overrider): Check artificial functions
12622         too.
12623         * typeck2.c (merge_exception_specifiers): New function.
12625 2001-01-03  Jason Merrill  <jason@redhat.com>
12627         * init.c (build_default_init): New fn.
12628         (perform_member_init): Split out from here.
12629         (build_new_1): Use it.  Simplify initialization logic.
12630         (build_vec_init): Take an array, rather than a pointer and maxindex.
12631         Speed up simple initializations.  Don't clean up if we're assigning.
12632         * cp-tree.h: Adjust.
12633         * decl2.c (do_static_initialization): Remove TREE_VEC case.
12634         * parse.y (new_initializer): Return void_zero_node for ().
12635         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
12636         * typeck2.c (digest_init): Only complain about user-written
12637         CONSTRUCTORs.
12639 2000-12-22  Mike Stump  <mrs@wrs.com>
12641         * decl2.c: (max_tinst_depth): Increase to 50.
12643 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
12645         * class.c (invalidate_class_lookup_cache): Zero the
12646         previous_class_values.
12647         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
12648         TREE_INT_CST_HIGH.
12649         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
12650         * decl.c (free_bindings): New variable.
12651         (push_binding): Don't create a new binding if we have one on the
12652         free list.
12653         (pop_binding): Put old bindings on the free list.
12654         (init_decl_processing): Use size_int, not build_int_2.
12655         Register free_bindings as a GC root.
12656         (cp_make_fname_decl): Use size_int, not build_int_2.
12657         (push_inline_template_parms_recursive): Likewise.
12658         (end_template_parm_list): Likewise.
12659         (for_each_template_parm): Do not use walk_tree_without_duplicates.
12660         (tsubst_template_parms): Use size_int, not build_int_2.
12661         (tsubst): Likewise.
12662         * rtti.c (get_vmi_pseudo_type_info): Likewise.
12664 2001-01-02  Richard Henderson  <rth@redhat.com>
12666         * parse.y (asm): Set ASM_INPUT_P.
12668 2001-01-02  Jason Merrill  <jason@redhat.com>
12670         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
12671         for v3 ABI.
12673         * typeck.c (cp_truthvalue_conversion): New fn.
12674         * cvt.c (ocp_convert): Use it.
12676         * cp-tree.h: Lose c-common.c decls.
12678         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
12679         * cvt.c (convert_to_void): Use type_unknown_p.
12681         * typeck.c (strip_all_pointer_quals): Also strip quals from
12682         pointer-to-member types.
12684         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
12685         parse.y as C.
12687         * call.c (build_new_method_call): Do evaluate the object parameter
12688         when accessing a static member.
12689         * typeck.c (build_component_ref): Likewise.
12691 2001-01-02  Andreas Jaeger  <aj@suse.de>
12693         * decl.c (cp_missing_noreturn_ok_p): New.
12694         (init_decl_processing): Set lang_missing_noreturn_ok_p.
12696 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
12698         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
12700 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
12702         * class.c (pushclass): Remove #if 0'd code.
12703         * cp-tree.h (overload_template_name): Remove.
12704         * decl.c (store_bindings): Simplify.
12705         (pop_from_top_level): Likewise.
12706         * pt.c (overload_template_name): Remove.
12707         (instantiate_decl): Don't call push_to_top_level if it's not
12708         needed.
12710 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
12712         * pt.c (register_local_specialization): Don't return a value.
12713         (lookup_template_class): Use move-to-front heuristic when looking
12714         up template instantiations.
12715         (instantiate_decl): Only push_to_top_level when we're actually
12716         going to instantiate the template.
12718 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
12720         * search.c (binfo_for_vtable): Return least derived class, not
12721         most.  Handle secondary vtables.
12723 2000-12-22  Jason Merrill  <jason@redhat.com>
12725         * pt.c (more_specialized): Don't optimize len==0.
12726         (fn_type_unification): If we're adding the return type, increase len.
12728         * typeck.c (build_binary_op): Fix pmf comparison logic.
12730         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
12731         DECL_STATIC_FUNCTION_P.
12733         * semantics.c (genrtl_finish_function): Don't try to jump to
12734         return_label unless it exists.
12736         In partial ordering for a call, ignore parms for which we don't have
12737         a real argument.
12738         * call.c (joust): Pass len to more_specialized.
12739         (add_template_candidate_real): Strip 'this', pass len.
12740         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
12741         (get_bindings_order): New fn.  Pass len down.
12742         (get_bindings_real): Strip 'this', pass len.
12743         (fn_type_unification): Likewise.
12744         (type_unification_real): Succeed after checking 'len' args.
12745         (most_specialized_instantiation): Lose explicit_args parm.
12746         * class.c (resolve_address_of_overloaded_function): Strip 'this',
12747         pass len.
12749 2000-12-21  Jason Merrill  <jason@redhat.com>
12751         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
12752         DECL_TEMPLATE_RESULT.
12754         * search.c (lookup_field_r): Call lookup_fnfields_1, not
12755         lookup_fnfields_here.
12757         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
12759         * call.c (build_object_call): Also allow conversions that return
12760         reference to pointer to function.
12761         (add_conv_candidate): Handle totype being ref to ptr to fn.
12762         (build_field_call): Also allow members of type reference to function.
12763         Lose support for calling pointer to METHOD_TYPE fields.
12765         * error.c (dump_expr): Handle *_CAST_EXPR.
12767         * typeck2.c (build_scoped_ref): Always convert to the naming class.
12769         * tree.c (break_out_cleanups): Lose.
12770         * cp-tree.h: Remove prototype.
12771         * typeck.c (build_component_ref): Don't break_out_cleanups.
12772         (build_compound_expr): Likewise.
12773         * semantics.c (finish_expr_stmt): Likewise.
12775 2000-12-20  Richard Henderson  <rth@redhat.com>
12777         * cp-tree.h: Update declarations.
12778         * decl.c (finish_case_label): Return the new stmt node.
12779         * semantics.c (finish_goto_stmt): Likewise.
12780         (finish_expr_stmt, finish_return_stmt): Likewise.
12781         (finish_break_stmt, finish_continue_stmt): Likewise.
12782         (finish_asm_stmt): Likewise.
12783         * parse.y (already_scoped_stmt): Set STMT_LINENO.
12784         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
12785         (simple_if, simple_stmt): Return the new stmt node.
12786         (save_lineno): New.
12788 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
12790         * cp-tree.h: Don't declare warn_long_long.
12792 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12794         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
12795         IS_AGGR_TYPE.
12797 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12799         * pt.c (unify): Handle when both ARG and PARM are
12800         BOUND_TEMPLATE_TEMPLATE_PARM.
12802 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12804         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
12805         DECL_TEMPLATE_PARM_P.
12807 2000-12-15  Jason Merrill  <jason@redhat.com>
12809         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
12811         * init.c (build_new_1): Don't strip quals from type.
12813         * decl.c (pushdecl): Don't check for linkage on a non-decl.
12815         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
12817         * call.c (build_new_function_call): Lose space before paren in
12818         error message.
12819         (build_new_method_call): Likewise.
12821         * typeck2.c (build_m_component_ref): Propagate quals from datum.
12823 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12825         * pt.c (check_explicit_specialization): Propagate default
12826         function arguments to explicit specializations.
12828 2000-12-13  DJ Delorie  <dj@redhat.com>
12830         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
12831         and <? operators.
12833 2000-12-08  Jason Merrill  <jason@redhat.com>
12835         * error.c (dump_function_name): Don't let the user see __comp_ctor.
12837         Clean up copy-initialization in overloading code.
12838         * call.c (build_user_type_conversion_1): Die if we are asked to
12839         convert to the same or a base type.
12840         (implicit_conversion): Avoid doing so.  Lose reference binding code.
12841         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
12842         direct-initialization.  Also do direct-init part of copy-init.
12843         (build_user_type_conversion): Don't provide context to convert_like.
12844         * cvt.c (ocp_convert): build_user_type_conversion will now provide
12845         the constructor call for copy-init.
12847         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
12848         instantiation of a member template.
12849         (do_decl_instantiation): Not here.
12851 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
12853         * class.c (check_field_decls): Don't special case anonymous
12854         fields in error messages.
12855         (note_name_declared_in_class): Use %D on diagnostic.
12857         * tree.c (pod_type_p): Use strip_array_types.
12858         (cp_valid_lang_attribute): Likewise.
12859         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
12860         multiple evaluations.
12861         (cp_has_mutable_p): Use strip_array_types.
12863 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
12865         * cp-tree.h (sufficient_parms_p): Declare new function.
12866         * call.c (sufficient_parms_p): New function, broken out of ...
12867         (add_function_candidate): ... here. Use it.
12868         (add_conv_candidate): Use it.
12869         * decl.c (grok_ctor_properties): Use it.
12871 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
12873         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
12875 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12877         * decl2.c (lang_decode_option): Handle -Wformat-security.
12879 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12881         * pt.c (verify_class_unification): New function.
12882         (get_class_bindings): Use it.
12883         (try_class_unification): Tidy.
12884         (unify): Handle when argument of a template-id is not
12885         template parameter dependent.
12886         (template_args_equal): Handle when TREE_CODE's do not match.
12888 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
12890         * lang-specs.h (c++): When invoking the stand-alone preprocessor
12891         for -save-temps, pass all relevant -Defines to it, and then don't
12892         pass them to cc1plus.
12894 2000-12-05  Will Cohen  <wcohen@redhat.com>
12896         * decl.c (finish_case_label): Cleared
12897         more_cleanups_ok in surrounding function scopes.
12898         (define_label): Likewise.
12900 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
12902         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
12903         (get_matching_virtual): Remove.
12904         (look_for_overrides): Declare new function.
12905         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
12906         DECL_VINDEX here.
12907         * class.c (check_for_override): Move base class iteration code
12908         to look_for_overrides.
12909         * search.c (next_baselink): Remove.
12910         (get_virtuals_named_this): Remove.
12911         (get_virtual_destructor): Remove.
12912         (tree_has_any_destructors_p): Remove.
12913         (struct gvnt_info): Remove.
12914         (check_final_overrider): Remove `virtual' from error messages.
12915         (get_matching_virtuals): Remove. Move functionality to ...
12916         (look_for_overrides): ... here, and ...
12917         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
12918         to be overriding.
12920 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
12922         * typeck.c (get_delta_difference): If via a virtual base,
12923         return zero.
12924         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
12925         adjustment.
12927 2000-12-04  Richard Henderson  <rth@redhat.com>
12929         * error.c (dump_tree): Use output_add_string not OB_PUTS.
12931 2000-12-04  Jason Merrill  <jason@redhat.com>
12933         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
12934         (write_builtin_type): Pass intSI_type_node and the like through
12935         type_for_mode.
12936         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
12937         Pass intSI_type_node and the like through type_for_mode.
12938         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
12939         * pt.c (tsubst, unify): Likewise.
12940         * tree.c (walk_tree): Likewise.
12941         * error.c (dump_type): Likewise.
12942         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
12944         * Make-lang.in: Tweak top comment for emacs.
12945         (cp/TAGS): Restore.
12947         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
12949         * class.c (clone_function_decl): Robustify.
12951 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
12953         * decl.c (store_bindings): Only search in the non modified
12954         old_bindings for duplicates.
12956 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
12958         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
12959         TYPE_POLYMORPHIC_P.
12961         * typeck.c (build_static_cast): Remove unused variable.
12963 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
12965         * pt.c: Fix typo in comment.
12967 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
12969         * decl2.c (warn_format): Remove definition.
12970         (lang_decode_option): Handle -Wformat-nonliteral,
12971         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
12973 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
12975         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
12976         (init_decl_processing): Don't create string_type_node,
12977         const_string_type_node, wint_type_node, intmax_type_node,
12978         uintmax_type_node, default_function_type, ptrdiff_type_node and
12979         unsigned_ptrdiff_type_node.  Adjust position of call to
12980         c_common_nodes_and_builtins.
12981         (identifier_global_value): New function.
12983 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
12985         * call.c (standard_conversion): Reject pointer to member
12986         conversions from ambiguous, inaccessible or virtual bases.
12987         * typeck.c (build_static_cast): Don't check pointers to members
12988         specially.
12990 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
12992         * method.c (do_build_copy_constructor): Preserve cv
12993         qualifications when accessing source object members.
12994         (do_build_assign_ref): Likewise. Remove separate diagnostics for
12995         unnamed fields.
12997 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
12999         * method.c (do_build_assign_ref): Construct appropriately
13000         CV-qualified base reference. Don't allow const casts in base
13001         conversion.
13003 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
13005         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
13006         incomplete return type.
13008 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13010         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
13011         * semantics.c (finish_base_specifier): Accept a _TYPE not a
13012         _DECL.
13014 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13016         * spew.c (yyerror): Cope if yylval.ttype is NULL.
13018 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13020         * decl.c (grokdeclarator): Diagnose undefined template contexts.
13022 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
13024         * decl.c (grokdeclarator): Do type access control on friend
13025         class.
13027 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
13029         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
13030         bison parser ickiness.
13031         * pt.c (tsubst_friend_function): Enter namespace scope when
13032         tsubsting the function name.
13033         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
13035 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
13037         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
13038         * cvt.c (cp_convert_to_pointer): Add force parameter.
13039         Allow conversions via virtual base if forced.
13040         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
13041         (ocp_convert): Likewise.
13042         * search.c (binfo_from_vbase): Return the virtual base's binfo.
13043         * typeck.c (get_delta_difference): Adjust handling of virtual
13044         bases.
13046 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
13048         * tree.c (struct list_hash): Remove.
13049         (list_hash_table): Make it be an htab.
13050         (struct list_proxy): New type.
13051         (list_hash_eq): New function.
13052         (list_hash_pieces): Renamed from ...
13053         (list_hash): ... this.
13054         (list_hash_lookup): Remove.
13055         (list_hash_add): Remove.
13056         (hash_tree_cons): Use the generic hashtable.
13057         (mark_list_hash): Remove.
13058         (init_tree): Create the hashtable.
13060 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
13062         * method.c (build_mangled_C9x_name): Rename to
13063         build_mangled_C99_name.  Change C9X references in comments to
13064         refer to C99.
13066 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
13068         * parse.y (unary_expr): Move VA_ARG from here ...
13069         (primary): ... to here.
13071 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
13073         * semantics.c (finish_id_expr): If type is error_mark, return
13074         error_mark.
13076 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
13078         * pt.c (lookup_template_class): Simplify loop exit constructs.
13079         Cope when there is no partial instantiation of a template
13080         template member.
13082 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
13084         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
13086 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
13088         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
13089         prefix.
13091         * pt.c (do_decl_instantiate): Explicitly clone constructors and
13092         destructors that haven't already been cloned.
13094 2000-11-20  Richard Henderson  <rth@redhat.com>
13096         * parse.y (yyparse_1): Rename the parser entry point.
13098 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
13100         * mangle.c (write_name): Use <unscoped-name> for names directly in
13101         function scope.
13102         (write_unscoped_name): Accept names directly in function scope.
13104 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
13106         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
13107         * parse.y (extdef): Add EXPORT reduction.
13108         * spew.c (yylex): Don't skip export here.
13110 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
13112         * decl.c (init_decl_processing): Correct name of pure virtual
13113         function under the new ABI.
13114         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
13115         (throw_bad_typeid): Likewise for bad typeid function.
13117 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
13119         * decl.c (grokparms): Don't even function types of `void' type,
13120         either.
13121         * mangle.c (write_type): Don't crash when confronted with the
13122         error_mark_node.
13124         * decl.c (grokparms): Don't create parameters of `void' type.
13126 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
13128         * lex.c (mark_impl_file_chain): Delete.
13129         (init_parse): Remove call to ggc_add_string_root.  No need to
13130         ggc_strdup a string constant.  Do not add impl_file_chain to GC
13131         roots.
13132         (handle_pragma_implementation): No need to ggc_strdup main_filename.
13134 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13136         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
13138 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13140         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
13141         * decl.c (grokdeclarator): Don't reject void parms here.
13142         (require_complete_types_for_parms): Simplify, use
13143         complete_type_or_else.
13144         (grokparms): Remove bitrot. Remove funcdef parm.
13145         Deal with ellipsis parm lists here.
13146         * semantics.c (finish_parmlist): Don't append void_list_node
13147         here. Set PARMLIST_ELLIPSIS_P.
13149 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13151         * typeck2.c (incomplete_type_error): Reorganize to avoid
13152         excessive diagnostics.
13154 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
13156         * lex.c (struct impl_files, internal_filename): Constify a char *.
13158 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
13160         * mangle.c (write_special_name_constructor): Don't generate
13161         assembler junk when confronted with an old-style constructor.
13162         (write_special_name_destructor): Likewise.
13163         (mangle_decl_string): Do it here instead.
13165 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
13167         * call.c (op_error): Make error messages clearer.
13169 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
13171         * decl.c (wrapup_globals_for_namespace): Don't mark things
13172         TREE_ASM_WRITTEN when they're not.
13174 2000-11-15  Jason Merrill  <jason@redhat.com>
13176         * typeck2.c (friendly_abort): Uncount the error before handing
13177         off to fancy_abort.
13179 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
13181         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
13183 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
13185         * class.c (build_vtbl_initializer): Fix typo in comment.
13186         * typeck.c (expr_sizeof): Don't crash on errors.
13188 2000-11-14  Jim Wilson  <wilson@redhat.com>
13190         * lang-specs.h: Add %2 after %(cc1_options).
13192 2000-11-14  Richard Henderson  <rth@redhat.com>
13194         * typeck.c (c_sizeof): Be strict about casting result value
13195         back to c_size_type_node.
13196         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
13198 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
13200         * typeck.c (build_unary_op): Use boolean_increment from
13201         c-common.c, moving the relevant code there.
13203 2000-11-11  Jason Merrill  <jason@redhat.com>
13205         * typeck.c (mark_addressable): Don't call put_var_into_stack.
13207         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
13208         in inlines.
13210 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13212         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
13213         * lex.c (copy_lang_decl): Likewise.
13215 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
13217         * dump.c (cp_dump_tree): Don't dump function bodies here.
13219         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
13220         (dump.o): Update dependency list.
13221         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
13222         (flag_dump_translation_unit): Likewise.
13223         (CP_TYPE_QUALS): Adjust definition.
13224         (DECL_C_BIT_FIELD): Remove.
13225         (SET_DECL_C_BIT_FIELD): Likewise.
13226         (CLEAR_DECL_C_BIT_FIELD): Likewise.
13227         (add_maybe_template): Likewise.
13228         (strip_array_types): Likewise.
13229         (dump_node_to_file): Likewise.
13230         (cp_dump_tree): New function.
13231         * decl.c (init_decl_processing): Set lang_dump_tree.
13232         * decl2.c (flag_dump_translation_unit): Remove.
13233         * dump.c: Move most of it to ../c-dump.c.
13234         (cp_dump_tree): New function.
13235         * pt.c (add_maybe_template): Remove.
13236         * typeck.c (strip_array_types): Likewise.
13238 2000-11-07  Eric Christopher  <echristo@redhat.com>
13240         * decl.c (init_decl_processing): Change definition of
13241         __wchar_t to wchar_t.  Remove artificial declaration of
13242         wchar_t.
13243         * lex.c: Change instances of __wchar_t to wchar_t.
13245 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
13247         * lex.c (do_identifier): Don't lookup_name for operators.
13248         * parse.y (operator): Save looking_for_typename.
13249         (unoperator): Restore it.
13250         * spew.c (frob_opname): Use nth_token for lookahead.
13252 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
13254         * decl.c (grok_op_properties): Always use coerce_new_type and
13255         coerce_delete_type.
13256         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
13257         exception specification. Tidy up.
13258         (coerce_delete_type): Preserve exception specification. Tidy up.
13260 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
13262         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
13263         (push_binding_level), error.c (cp_tree_printer), pt.c
13264         (process_partial_specialization, tsubst_template_arg_vector),
13265         search.c (lookup_member): Use memset () instead of bzero ().
13267 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
13269         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
13271 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
13273         * Make-lang.in (c++.distdir): Remove.
13275 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
13277         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
13278         declarations from different namespaces to be combined.
13280 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
13282         * decl.c: Include tm_p.h.
13284 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
13286         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
13288 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
13290         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
13291         (build_overload_value), repo.c (open_repo_file), xref.c
13292         (open_xref_file): Use strchr () and strrchr () instead of index ()
13293         and rindex ().
13295 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
13297         * call.c (build_over_call): Call fold on the CALL_EXPR.
13299 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
13301         * error.c (dump_template_decl): Separate template hearders with
13302         space not comma.
13304 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
13306         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
13307         TS_* flags with corresponding TFF_*.  Adjust prototypes of
13308         functions (which used to take a tree_string_flags) to take an int.
13310         * cp-tree.h (enum tree_string_flags): Remove
13311         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
13312         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
13313         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13314         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13315         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
13316         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
13317         (type_as_string, decl_as_string, expr_as_string,
13318         context_as_string): Adjust prototype.
13320         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
13321         instead of TS_PLAIN.
13323         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
13324         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
13325         plain `0'.
13327 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
13329         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
13330         (linkage_kind): New enumeration.
13331         (decl_linkage): New function.
13332         * decl2.c (comdat_linkage): Extend comment.
13333         * error.c (dump_function_decl): Print the arguments used to
13334         instantiate a template, even when not printing the type of the
13335         function.
13336         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
13337         not TREE_PUBLIC, to test for external linkage.
13338         * tree.c (decl_linkage): New function.
13340 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
13342         * pt.c (instantiate_decl): Always instantiate static data members
13343         initialized in-class.
13345 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
13347         * Make-lang.in: Move all build rules here from Makefile.in,
13348         adapt to new context.  Wrap all rules that change the current
13349         directory in parentheses.  Expunge all references to $(P).
13350         When one command depends on another and they're run all at
13351         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
13352         all object-file generation rules.  Delete obsolete variables.
13354         * Makefile.in: Delete.
13355         * config-lang.in: Delete outputs= line.
13357 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
13359         * error.c (dump_function_decl): Print no space between
13360         `ptr-operator' the `type-specifier' of the return type.
13361         (dump_type_prefix): Make sure we put space at the appropriate
13362         place.
13364 2000-10-23  Jason Merrill  <jason@redhat.com>
13366         * call.c (equal_functions): Also call decls_match for extern "C" fns.
13368 2000-10-22  Jason Merrill  <jason@redhat.com>
13370         * call.c (build_conditional_expr): Use ocp_convert to force
13371         rvalue conversion.
13373 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
13375         * call.c (standard_conversion): Use RVALUE_CONVs for all
13376         expressions that satisfy lvalue_p, not just those that satisfy
13377         real_lvalue_p.
13379         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
13381         * typeck.c (c_sizeof): Return an expression of `size_t' type,
13382         not one with TYPE_IS_SIZETYPE set.
13383         (dubious_conversion_warnings): Remove special-case code.
13385 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
13387         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
13388         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
13389         (dump_type_prefix): Print vector-of-int as 'int vector'.
13390         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
13391         * tree.c (walk_tree): Handle VECTOR_TYPE.
13393         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
13395 2000-10-21  Jason Merrill  <jason@redhat.com>
13397         * parse.y (operator): Set got_object from got_scope.
13398         Set looking_for_typename.
13399         * decl.c (lookup_name_real): Clear val after setting from_obj.
13400         Reorganize diagnostic.
13402 2000-10-20  Jason Merrill  <jason@redhat.com>
13404         * tree.c (walk_tree): Don't walk into default args.
13406         * error.c (dump_expr): Use host_integerp.
13408 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
13410         * typeck2.c (abstract_virtuals_error): Use "because" instead of
13411         "since" in error message.
13413 2000-10-20  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13415         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
13417 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
13419         * decl.c (revert_static_member_fn): Fixed typo.
13421 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
13423         * class.c (subobject_offset_fn): New type.
13424         (dfs_record_base_offsets): Remove.
13425         (record_base_offsets): Likewise.
13426         (dfs_search_base_offsets): Likewise.
13427         (record_subobject_offset): New function.
13428         (check_subobject_offset): Likewise.
13429         (walk_subobject_offsets): Likewise.
13430         (record_subobject_offsets): Likewise.
13431         (layout_conflict_p): Reimplement.
13432         (layout_nonempty_base_or_field): Correct handling of type
13433         conflicts during layout.
13434         (layout_empty_base): Likewise.
13435         (build_base_field): Adjust to handle new representation of empty
13436         base offset table.
13437         (build_base_fields): Likewise.
13438         (layout_virtual_bases): Likewise.
13439         (splay_tree_compare_integer_csts): New function.
13440         (layout_class_type): Use a splay_tree, rather than a varray, to
13441         represent the offsets of empty bases.
13443         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
13444         * decl.c (select_decl): Don't return declarations that are
13445         DECL_ANTICIPATED.
13447 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
13449         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
13450         (fake_std_node): New macro.
13451         * decl.c (in_std): Rename to ...
13452         (in_fake_std): ... this.
13453         (flag_no_builtin): Remove.
13454         (flag_no_nonansi_builtin): Likewise.
13455         (walk_namespaces_r): Use fake_std_node.
13456         (push_namespace): Use std_identifier.
13457         (pop_namespace): Use in_fake_std.
13458         (lookup_name_real): Use fake_std_node.
13459         (init_decl_processing): When -fhonor-std, create the `std'
13460         namespace.  Don't create a dummy fake_std_node in that case.
13461         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
13462         (builtin_function): Put builtins whose names don't begin
13463         with `_' in the std namespace.
13464         * decl2.c (flag_no_builtin): Remove.
13465         (flag_no_nonansi_builtin): Likewise.
13466         (set_decl_namespace): Use fake_std_node.
13467         (validate_nonmember_using_decl): Likewise.
13468         (do_using_directive): Likewise.
13469         (handle_class_head): Likewise.
13470         * dump.c (dequeue_and_dump): Likewise.
13471         * except.c (init_exception_processing): Use std_identifier.
13472         * init.c (build_member_call): Use fake_std_node.
13473         * rtti.c (init_rtti_processing): Use std_identifier.
13475 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
13477         * cp-tree.h (back_end_hook): Remove declaration.
13478         * decl2.c (back_end_hook): Remove definition.
13480         * dump.c (dequeue_and_dump): Dump TREE_USED.
13482 2000-10-17  Brad Lucier <lucier@math.purdue.edu>
13484         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
13486 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
13488         * decl.c (WINT_TYPE): Define.
13489         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
13490         c_size_type_node, signed_size_type_node and wint_type_node.
13492 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
13494         * decl2.c (warn_missing_format_attribute): New variable.
13495         (lang_decode_option): Decode -Wmissing-format-attribute.
13497 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
13499         * typeck.c (qualify_type): Remove.
13500         (composite_pointer_type): Fix handling of conversions to `cv void*'.
13502 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13504         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
13506 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13508         * Makefile.in (parse.c, parse.h): Create atomically.
13510 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
13512         * class.c (current_obstack): Remove.
13513         * decl.c (ggc_p): Remove.
13514         (start_decl): Don't use decl_tree_cons.
13515         (grokdeclarator): Don't use build_decl_list.
13516         (start_function): Don't use decl_tree_cons.
13517         (finish_function): Don't mess with obstacks.
13518         * decl2.c (grok_x_components): Don't use build_decl_list.
13519         * lex.c (make_call_declarator): Don't call decl_tree_cons.
13520         (implicitly_declare_fn): Don't call build_decl_list.
13521         * parse.y (frob_specs): Don't call build_decl_list or
13522         decl_tree_cons.
13523         (expr_or_declarator_intern): Don't call decl_tree_cons.
13524         (primary): Don't call build_decl_list.
13525         (fcast_or_absdcl): Likewise.
13526         (typed_declspecs): Don't call decl_tree_cons.
13527         (reserved_declspecs): Don't call build_decl_list.
13528         (declmods): Likewise.
13529         (reserved_typespecquals): Likewise.
13530         (aggr): Likewise.
13531         (new_type_id): Likewise.
13532         (cv_qualifiers): Likewise.
13533         (after_type_declarator_intern): Likewise.
13534         (notype_declarator_intern): Likewise.
13535         (absdcl_intern): Likewise.
13536         (named_parm): Likewise.
13537         * pt.c (most_specialized_class): Likewise.
13538         * repo.c (temporary_obstack): Make it a structure, not a pointer.
13539         (init_repo): Initialize it.
13540         * search.c (current_obstack): Remove.
13541         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
13543 2000-10-09  Richard Henderson  <rth@cygnus.com>
13545         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
13546         (c++ language support bits for libgcc): Remove.
13547         (c++.clean): Remove cplib2.txt cleanup.
13548         * config-lang.in (headers, lib2funcs): Remove.
13550         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
13551         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
13552         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
13553         * inc/new.h, inc/typeinfo: Remove files.
13555 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
13557         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
13558         defined.
13559         (init_decl_processing): Initialize intmax_type_node and
13560         uintmax_type_node.
13562 2000-10-06  Richard Henderson  <rth@cygnus.com>
13564         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
13565         (original_result_rtx): Remove.
13566         * decl.c (save_function_data): Don't clear x_result_rtx.
13567         (mark_lang_function): Don't mark it either.
13568         * expr.c (fixup_result_decl): Remove.
13569         * semantics.c (genrtl_named_return_value): Frob the return decl
13570         before calling emit_local_var.
13571         (genrtl_finish_function): Don't call fixup_result_decl.
13572         Always emit the jump to return_label.
13574 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
13576         * pt.c (lookup_template_class): Set current access for enum.
13577         (tsubst_enum): Set file & line for enum decl.
13579         * spew.c (yylex): Remove unused variable.
13581 2000-10-05  Richard Henderson  <rth@cygnus.com>
13583         * semantics.c (genrtl_finish_function): Don't init or check
13584         can_reach_end; remove noreturn and return value checks.
13586 2000-10-05  Tom Tromey  <tromey@cygnus.com>
13588         * init.c (build_java_class_ref): Use `build_static_name' with a
13589         suffix, not a prefix, to build the class object's name.
13591 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
13593         * cp-tree.h (access_kind): Fix comment typo.
13594         * decl2.c (grokfield): Fix diagnostic typo.
13595         * semantics.c (finish_template_type): Fix comment typo.
13596         (finish_qualified_object_call_expr): Likewise.
13598 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
13600         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
13601         tsubsting fails.
13603 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
13605         * spew.c (frob_id): New static function.
13606         (frob_opname): Use it.
13607         (yylex): Use it.
13609 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
13611         * decl.c (lang_mark_false_label_stack): Remove.
13612         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
13614 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
13616         * gxxint.texi: Use @email for formatting email addresses.
13618 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
13620         * error.c: Remove direct obstack manipulation.  Replace with
13621         output_buffer-based formatting.  Adjust calls to removed macros.
13622         (obstack_chunk_alloc, obstack_chunk_free): Remove.
13623         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
13624         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
13626 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
13628         * ir.texi: Move to ../c-tree.texi.
13630 2000-09-20  Jason Merrill  <jason@redhat.com>
13632         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
13634 2000-09-21  Andreas Jaeger  <aj@suse.de>
13636         * errfn.c: Move declaration of cp_printer and cp_printers to ...
13637         * cp-tree.h: ... here.
13639         * error.c: Remove declaration of cp_printer.
13641 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
13643         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
13645 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
13647         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
13648         users.
13650 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
13652         * decl.c (start_function): Robustify.
13654 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13656         * cp-tree.h (check_function_format): Accept a `status' parameter.
13658         * call.c, typeck.c: Updates calls to `check_function_format'.
13660 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
13662         * decl2.c (handle_class_head): Always push some scope even
13663         in the error case.
13665 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
13667         * cp-tree.h (struct cp_language_function): Remove
13668         x_scope_stmt_stack and name_declared.
13669         (current_scope_stmt_stack): Remove.
13670         (function_name_declared_p): New macro.
13671         (struct lang_decl_flags): Use c_lang_decl as a base class.
13672         (context): Remove.
13673         (struct lang_decl): Replace saved_tree with context.
13674         (DECL_FRIEND_CONTEXT): Adjust accordingly.
13675         (SET_DECL_FRIEND_CONTEXT): Likewise.
13676         (DECL_VIRTUAL_CONTEXT): Likewise.
13677         (DECL_SAVED_TREE): Remove.
13678         (C_DECLARED_LABEL_FLAG): Likewise.
13679         (cplus_expand_expr_stmt): Don't declare.
13680         (add_decl_stmt): Likewise.
13681         (add_scope_stmt): Likewise.
13682         * decl.c (mark_stmt_tree): Remove.
13683         (case_compare): Likewise.
13684         (finish_case_label): Use c_add_case_label.
13685         (init_decl_processing): Set more language-specific hooks.
13686         (build_enumerator): Fix typo in comment.
13687         (cplus_expand_expr_stmt): Remove.
13688         (mark_lang_function): Use mark_c_language_function.
13689         (lang_mark_tree): Use c_mark_lang_decl.
13690         * decl2.c: Change order of inclusion.
13691         * except.c: Likewise.
13692         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
13693         back on c_expand_expr.
13694         * friend.c: Include expr.h.
13695         * init.c: Change order of inclusion.
13696         * Makefile.in: Update dependencies.
13697         * lex.h (free_lang_decl_chain): Remove.
13698         * optimize.c (maybe_clone_body): Use function_name_declared_p.
13699         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
13700         it doesn't exist.
13701         (instantiate_decl): Use function_name_declared_p.
13702         * semantics.c (lang_expand_expr_stmt): Remove.
13703         (set_current_function_name_declared): Likewise.
13704         (current_function_name_declared): Likewise.
13705         (begin_compound_stmt): Use function_name_declared_p.
13706         (add_decl_stmt): Remove.
13707         (setup_vtbl_ptr): Use function_name_declared_p.
13708         (add_scope_stmt): Remove.
13709         (current_scope_stmt_stack): New function.
13710         (cp_expand_stmt): Don't handle SCOPE_STMTs.
13711         (expand_body): Use function_name_declared_p.
13712         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
13713         * typeck.c: Change order of includes.
13714         (convert_sequence): Remove.
13716 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
13718         * lex.c (reswords): Add _Complex.
13720 2000-09-14  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13722         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
13724 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
13726         * init.c (begin_init_stmts): Don't use // comments.
13728 2000-09-12  Jason Merrill  <jason@redhat.com>
13730         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
13731         all non-extern arrays.
13733         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
13734         typenames, too.  Downgrade complaint to pedwarn.
13735         (xref_tag): Warn about surprising behavior of 'friend struct T'.
13736         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
13737         'class This::Inherited'.
13739 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
13741         * decl.c (finish_case_label): Given the LABEL_DECL a
13742         DECL_CONTEXT.
13744 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
13746         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
13747         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
13748         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
13749         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
13750         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
13751         New macros.
13752         (sorry_for_unsupported_tree, print_scope_operator,
13753         print_left_paren, print_right_paren, print_left_bracket,
13754         print_right_bracket, print_whitespace): Likewise.
13755         (aggr_variety): Rename to class_key_or_enum.
13756         (print_type): Rename to print_type_id.
13757         (print_type_specifier_seq, print_simple_type_specifier,
13758         print_elaborated_type_specifier,
13759         print_rest_of_abstract_declarator,
13760         print_parameter_declaration_clause, print_exception_specification,
13761         print_nested_name_specifier, print_template_id,
13762         typedef_original_name,  print_template_argument_list_start,
13763         print_template_argument_list_end): New functions.
13765 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
13767         * ir.texi: Add more documentation.
13769 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
13771         * cp-tree.h (struct saved_scope): Remove x_function_parms.
13772         (current_function_parms): Don't define.
13773         (struct cp_language_function): Remove parms_stored.
13774         (current_function_just_assigned_this): Don't define.
13775         (current_function_parms_stored): Likewise.
13776         (static_ctors): Declare.
13777         (static_dtors): Likewise.
13778         (SF_EXPAND): Don't define.
13779         (expand_start_early_try_stmts): Remove declaration.
13780         (store_parm_decls): Likewise.
13781         * decl.c (static_ctors): Don't declare.
13782         (static_dtors): Likewise.
13783         (struct binding_level): Remove this_block.
13784         (poplevel): Remove dead code.
13785         (set_block): Likewise.
13786         (mark_binding_level): Don't mark this_block.
13787         (mark_saved_scope): Don't mark x_function_parms.
13788         (init_decl_processing): Don't add current_function_parms as a GC
13789         root.
13790         (check_function_type): Change prototype.
13791         (start_function): Remove RTL-generation code.
13792         (expand_start_early_try_stmts): Remove.
13793         (store_parm_decls): Give it internal linkage.  Remove
13794         RTL-generation code.
13795         (finish_function): Remove RTL-generation code.
13796         * decl2.c (static_ctors): Fix formatting.
13797         (static_dtors): Likewise.
13798         * method.c (use_thunk): Don't call store_parm_decls.
13799         (synthesize_method): Likewise.
13800         * optimize.c (maybe_clone_body): Likewise.
13801         * parse.y (fn.def2): Likewise.
13802         (.set_base_init): Likewise.
13803         (nodecls): Likewise.
13804         * pt.c (instantiate_decl): Likewise.
13805         * rtti.c (synthesize_tinfo_fn): Likewise.
13806         * semantics.c (genrtl_try_block): Simplify.
13807         (expand_body): Use genrtl_start_function and
13808         genrtl_finish_function.
13809         (genrtl_start_function): New function.
13810         (genrtl_finish_function): Likewise.
13812 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
13814         * error.c (cp_tree_printer, case 'P'): Append break.
13816 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
13818         * cp-tree.h (frob_opname): Declare.
13819         * parse.y (saved_scopes): New static variable.
13820         (cp_parse_init): Adjust.
13821         (do_id): If lastiddecl is NULL, do do_identifier.
13822         (operator): Save scope information.
13823         (unoperator): New reduction. Restore scope information.
13824         (operator_name): Append unoperator. Call frob_opname.
13825         * spew.c (frob_opname): Define.
13827 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
13829         * decl.c, rtti.c: Include defaults.h if not already included.
13830         Don't define the *_TYPE_SIZE macros.
13832 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
13834         * cp-tree.h (push_switch): Change prototype.
13835         (check_cp_case_value): Remove declaration.
13836         (decl_constant_value): Likewise.
13837         * decl.c (struct cp_switch): Add switch_stmt and cases.
13838         (case_compare): New function.
13839         (push_switch): Set switch_stmt.  Initialize cases.
13840         (pop_switch): Clean up cases.
13841         (define_case_label): Rename to ...
13842         (finish_case_label): ... this.  Do semantic analysis for case
13843         labels here.
13844         (start_function): Correct comment.
13845         * decl2.c (check_cp_case_value): Remove.
13846         * expr.c (do_case): Remove.
13847         * pt.c (tsubst_expr): Adjust call to finish_case_label.
13848         * semantics.c (genrtl_do_poplevel): Remove declaration.
13849         (RECHAIN_STMTS): Remove.
13850         (finish_break_stmt): Use build_break_stmt.
13851         (finish_continue_stmt): Use build_continue_stmt.
13852         (finish_switch_cond): Adjust condition here, rater than in
13853         c_expand_start_case.
13854         (finish_case_label): Remove.
13855         * typeck.c (c_expand_return): Remove.
13856         (c_expand_start_case): Likewise.
13858 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
13860         * ir.texi: Document type nodes.
13862 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
13864         * cp-tree.h (init_cp_semantics): Declare.
13865         (genrtl_try_block): Don't declare.
13866         (genrtl_handler): Likewise.
13867         (genrtl_catch_block): Likewise.
13868         (genrtl_ctor_stmt): Likewise.
13869         (genrtl_subobject): Likewise.
13870         (genrtl_do_poplevel): Likewise.
13871         (genrtl_named_return_value): Likewise.
13872         * lex.c (init_parse): Call init_cp_semantics.
13873         * semantics.c (genrtl_try_block): Give it internal linkage.
13874         (genrtl_handler): Likewise.
13875         (genrtl_catch_block): Likewise.
13876         (genrtl_ctor_stmt): Likewise.
13877         (genrtl_subobject): Likewise.
13878         (genrtl_do_poplevel): Likewise.
13879         (genrtl_named_return_value): Likewise.
13880         (lang_expand_stmt): Rename to ...
13881         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
13882         (init_cp_semantics): Define.
13884         * decl.c (initialize_local_var): Remove RTL-generating code.
13885         * semantics.c (genrtl_try_block): Fix formatting.
13887         Move statement-tree facilities from C++ to C front-end.
13888         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
13889         (void_zero_node): Remove.
13890         (stmt_tree): Likewise.
13891         (scope_chain): Adjust.
13892         (language_function): Rename to cp_language_function.
13893         (cp_function_chain): Adjust.
13894         (current_stmt_tree): Remove.
13895         (last_tree): Likewise.
13896         (last_expr_type): Likewise.
13897         (struct lang_decl): Adjust.
13898         (STMT_IS_FULL_EXPR_P): Remove.
13899         (add_tree): Remove.
13900         (begin_stmt_tree): Likewise.
13901         (finish_stmt_tree): Likewise.
13902         (walk_tree_fn): Likewise.
13903         (walk_stmt_tree): Likewise.
13904         * class.c (finish_struct): Replace use of add_tree with add_stmt.
13905         * decl.c (mark_stmt_tree): Adjust type.
13906         (init_decl_processing): Don't build void_zero_node.
13907         (initialize_local_var): Adjust usage of current_stmt_tree.
13908         (finish_enum): Use add_stmt, not add_tree.
13909         (save_function_data): Adjust use of language_function.
13910         (finish_constructor_body): Use add_stmt, not add_tree.
13911         (finish_destructor_body): Likewise.
13912         (push_cp_function_context): Adjust use of language_function.
13913         (pop_cp_function_context): Likewise.
13914         (mark_lang_function): Likewise.
13915         (mark_cp_function_context): Likewise.
13916         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
13917         (build_vec_init): Likewise.
13918         * semantics.c (SET_LAST_STMT): Remove.
13919         (RECHAIN_STMTS): Don't use it.
13920         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
13921         (current_stmt_tree): Define.
13922         (add_tree): Remove.
13923         (finish_goto_stmt): Use add_stmt, not add_tree.
13924         (finish_expr_stmt): Likewise.
13925         (begin_if_stmt): Likewise.
13926         (finish_then_clause): Likewise.
13927         (begin_while_stmt): Likewise.
13928         (begin_do_stmt): Likewise.
13929         (finish_return_stmt): Likewise.
13930         (begin_for_stmt): Likewise.
13931         (finish_break_stmt): Likewise.
13932         (finish_continue_stmt): Likewise.
13933         (begin_switch_stmt): Likewise.
13934         (finish_case_label): Likewise.
13935         (begin_try_block): Likewise.
13936         (begin_function_try_block): Likewise.
13937         (begin_handler): Likewise.
13938         (begin_catch_block): Likewise.
13939         (begin_compound_stmt): Likewise.
13940         (begin_asm_stmt): Likewise.
13941         (finish_asm_stmt): Likewise.
13942         (finish_label_stmt): Likewise.
13943         (add_decl_stmt): Likewise.
13944         (finish_subobject): Likewise.
13945         (finish_decl_cleanup): Likewise.
13946         (finish_named_return_value): Likewise.
13947         (setup_vtbl_ptr): Likewise.
13948         (add_scope_stmt): Likewise.
13949         (finish_stmt_expr): Likewise.
13950         (prune_unused_decls): Remove.
13951         (begin_stmt_tree): Likewise.
13952         (finish_stmt_tree): Likewise.
13953         (prep_stmt): Adjust use of current_stmt_tree.
13954         (lang_expand_stmt): Likewise.
13955         * tree.c (statement_code_p): Remove.
13956         (cp_statement_code_p): New function.
13957         (walk_stmt_tree): Remove.
13958         (init_tree): Set lang_statement_code_p.
13960 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
13962         Integrated preprocessor.
13964         * Make-lang.in, Makefile.in: Remove all references to input.c,
13965         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
13966         * gxx.gperf, hash.h, input.c: Delete.
13967         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
13968         initialized properly.
13970         * class.c (fixup_pending_inline): Take a tree, not a
13971         struct pending_inline *.  All callers changed.
13972         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
13973         RID_PROTECTED entries in ridpointers[] array here.
13974         * decl.c (duplicate_decls): Do not refer to struct
13975         pending_inline.
13976         (record_builtin_type, init_decl_processing): Use RID_MAX not
13977         CP_RID_MAX.
13978         (grokdeclarator): Use C_IS_RESERVED_WORD.
13979         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
13980         cpplib.
13981         (grok_x_components): Do not inspect pending_inlines chain.
13983         * cp-tree.h (struct lang_identifier): Add rid_code entry.
13984         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
13985         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
13986         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
13987         TIME_IDENTIFIER_FILEINFO): Kill.
13988         Update prototypes.
13989         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
13990         single 32-bit word.
13991         * parse.y: Call do_pending_inlines unconditionally.
13992         reinit_parse_for_method is now snarf_method.  fn.defpen is no
13993         longer necessary.  Remove unnecessary <itype> annotation on
13994         SCOPE.  Do not refer to end_of_file or struct pending_inline.
13995         * semantics.c (begin_inline_definitions): Call
13996         do_pending_inlines unconditionally.
13998         * lex.c: Remove all code now shared with C front end.
13999         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
14000         into the get_identifier table.  Rewrite pragma handling to
14001         work with the registry.  Move code to save tokens for later
14002         processing to spew.c.
14004         * spew.c: Rewrite everything in terms of token streams instead
14005         of text.  Move routines here from lex.c / input.c as
14006         appropriate.  GC-mark trees hanging off the pending inlines
14007         chain.
14009 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
14011         * NEWS: Mention that the named return value extension has been
14012         deprecated.
14013         * cp-tree.h (original_result_rtx): Define.
14014         (TREE_REFERENCE_EXPR): Remove.
14015         (DECL_VPARENT): Likewise.
14016         (pushdecl_nonclass_level): Likewise.
14017         (store_return_init): Likewise.
14018         (reinit_lang_specific): Likewise.
14019         (genrtl_named_return_value): Change prototype.
14020         * decl.c (original_result_rtx): Remove.
14021         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
14022         Do not generate RTL for local variables here.
14023         (store_return_init): Remove.
14024         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
14025         store_return_init.
14026         (finish_named_return_value): Adjust accordingly.  Warn that this
14027         extension is deprecated.
14028         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
14030 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14032         * pt.c (type_unification_real): Replace switch with if.
14033         (unify): Tsubst non-type parms before comparing.
14035 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14037         * error.c (dump_typename): New function, broken out of ...
14038         (dump_type): ... here. Use it.
14039         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
14041 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14043         * init.c (build_offset_ref): Deal with namespace scoped
14044         TEMPLATE_ID_EXPRs.
14046 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
14048         * class.c (resolve_address_of_overloaded_function): Add
14049         explanation message.
14050         * decl.c (define_case_label): Reformat explanation.
14051         * decl2.c (finish_static_data_member_decl): Likewise.
14052         (grokfield): Likewise.
14053         * friend.c (do_friend): Likewise.
14055 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
14057         * tree.c (walk_tree): Expose tail recursion.
14058         (walk_stmt_tree): New function.
14059         * cp-tree.h: Prototype walk_stmt_tree.
14060         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
14061         the BLOCKs directly.  If a BLOCK has no variables after
14062         pruning, discard it.
14063         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
14064         restore the line number.
14066 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
14068         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
14069         (pt.o): Remove dependency on HTAB_H.
14070         * cp-tree.h: Include hashtab.h.
14071         (walk_tree): Change prototype.
14072         (walk_tree_without_duplicates): New function.
14073         * decl.c (check_default_argument): Use it.
14074         * optimize.c (remap_decl): Adjust calls to walk_tree.
14075         (copy_body): Likewise.
14076         (expand_calls_inline): Likewise.
14077         (calls_setjmp_p): Use walk_tree_without_duplicates.
14078         * pt.c: Don't include hashtab.h.
14079         (for_each_template_parm): Use walk_tree_without_duplicates.
14080         * semantics.c (finish-stmt_tree): Likewise.
14081         (expand_body): Likewise.
14082         * tree.c (walk_tree): Add additional parameter.
14083         (walk_tree_without_duplicates): New function.
14084         (count_trees): Use it.
14085         (verify_stmt_tree): Adjust call to walk_tree.
14086         (find_tree): Use walk_tree_without_duplicates.
14087         (no_linkage_check): Likewise.
14088         (break_out_target_exprs): Adjust call to walk_tree.
14089         (cp_unsave): Likewise.
14091 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
14093         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
14094         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
14095         * cp-tree.h (TYPE_BINFO): Adjust comment.
14096         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
14097         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
14098         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14099         (TYPE_TEMPLATE_INFO): Likewise.
14100         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
14101         * class.c (push_nested_class): Likewise.
14102         * decl.c (lookup_name_real): Likewise.
14103         (grokdeclarator): Likewise.
14104         (grok_op_properties): Likewise.
14105         (xref_tag): Likewise.
14106         (xref_basetypes): Likewise.
14107         * decl2.c (constructor_name_full): Likewise.
14108         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
14109         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
14110         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
14111         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14112         (dump_type_suffix): Likewise.
14113         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
14114         instead.
14115         (get_aggr_from_typedef): Likewise.
14116         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
14117         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14118         (write_template_parm): Likewise.
14119         (write_template_template_parm): Check tree code instead of
14120         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14121         * method.c (build_overload_nested_name): Add
14122         BOUND_TEMPLATE_TEMPLATE_PARM.
14123         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
14124         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14125         * pt.c (convert_template_argument): Check tree code instead of
14126         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14127         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
14128         (for_each_template_parm): Adjust comment.
14129         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
14130         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14131         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
14132         template_args_equal to compare template template parameter cases.
14133         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14134         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
14135         instead.
14136         * tree.c (copy_template_template_parm): Decide whether to create
14137         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
14138         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
14139         (copy_tree_r): Likewise.
14140         * typeck.c (comptypes): Likewise.  Check tree code instead of
14141         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
14143 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
14145         * decl.c (finish_function): Move the code for handling functions
14146         marked with the constructor and destructor attributes inside the
14147         expand_p block.
14149 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
14151         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
14153 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
14155         * pt.c (lookup_template_class): Remove abort.
14156         * tree.c (get_type_decl): Allow error_mark_node.
14158 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
14160         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
14161         TEMPLATE_ID_EXPRs.
14163 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
14165         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
14166         new ABI mangling.
14168 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
14170         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
14171         union tag mismatch error reporting.
14173 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
14175         * call.c (build_scoped_method_call): Check it is not a namespace.
14177 2000-08-30  Jason Merrill  <jason@redhat.com>
14179         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
14181         * tree.c (bot_manip): Check TREE_CONSTANT rather than
14182         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
14183         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
14185         * decl.c (start_function): Always call make_function_rtl.
14187 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
14189         * semantics.c (prune_unused_decls): New function.
14190         (finish_stmt_tree): Call it via walk_tree.
14192 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
14194         * class.c (build_secondary_vtable): Constify a char *.
14195         * decl.c (init_decl_processing): Initialize function_id_node,
14196         pretty_function_id_node, and func_id_node.
14197         * input.c (struct input_source): Constify 'str'.
14198         (feed_input): Constify first argument.
14199         * mangle.c (write_identifier): Constify argument.
14200         * pt.c (mangle_class_name_for_template): Constify argument.
14202 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
14204         * typeck.c (mark_addressable): Remove code that pokes around in
14205         RTL.
14207 2000-08-28  Jason Merrill  <jason@redhat.com>
14209         * lex.c (file_name_nondirectory): Move to toplev.c.
14211         * cp-tree.h (LOCAL_CLASS_P): New macro.
14212         * class.c (finish_struct_1): Use it.
14214 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
14216         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
14217         (write_encoding): Pass another argument to write_name.
14218         (write_name): Add ignore_local_scope parameter.  Fix handling of
14219         local names.
14220         (write_nested_name): Use write_unqualified_name.
14221         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
14222         (write_template_prefix): Use write_unqualified_name.
14223         (write_component): Remove.
14224         (write_local_name): Add parameter.  Use direct local entity to
14225         discriminator calculation.
14226         (write_class_enum_type): Pass another argument to write_name.
14227         (write_template_template_arg): Likewise.
14228         (make_guard_variable): Likewise.
14230 2000-08-27  Jason Merrill  <jason@redhat.com>
14232         * decl.c (pushdecl): Matching decls for local externs are found in
14233         the current level.  Propagate linkage information from previous
14234         declarations.
14236 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
14238         * ir.texi (Expressions): Fix typo.
14240 2000-08-25  Greg McGary  <greg@mcgary.org>
14242         * tree.c (init_tree): Use ARRAY_SIZE.
14244 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
14246         * error.c (cp_tree_printer): Rework.
14248 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
14250         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
14251         dyn-string.o.
14252         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
14253         (cp-demangle.o): Remove target.
14254         (dyn-string.o): Likewise.
14256         * decl.c (grokfndecl): Require that `main' return an `int'.
14257         * mangle.c (write_encoding): Don't mangle return types for
14258         conversion functions.
14260 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
14262         * error.c (tree_formatting_info): New data type.
14263         (tree_being_formatted): New macro.
14264         (tree_formatting_flags): Likewise.
14265         (put_whitespace): Likewise.
14266         (print_tree_identifier): Likewise.
14267         (print_identifier): Likewise.
14268         (cp_tree_printer, print_function_argument_list, print_declaration,
14269         print_expression, print_function_declaration,
14270         print_function_parameter, print_type, print_cv_qualifier): New
14271         functions.
14272         (init_error): Initialize lang_printer.
14274 2000-08-24  Jason Merrill  <jason@redhat.com>
14276         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
14277         adjustment necessary.
14279 2000-08-24  Greg McGary  <greg@mcgary.org>
14281         * cp-tree.h (MAIN_NAME_P): Remove macro.
14283 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
14285         * error.c (print_instantiation_context): Don't forget to flush the
14286         buffer.
14288 2000-08-23  Jason Merrill  <jason@redhat.com>
14290         * typeck.c (build_ptrmemfunc): Save the input pmf.
14292         * method.c (process_modifiers): Use same_type_p.
14294 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
14296         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
14297         * mangle.c (write_function_type): Change prototype.
14298         (write_encoding): Don't mangle return types for
14299         constructors or destructors.
14300         (write_type): Adjust call to write_function_type.
14301         * pt.c (instantiate_template): Instantiate alternate entry points
14302         when instantiating the main function.
14304 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
14306         * error.c (cp_print_error_function): Don't use embedded '\n' in
14307         output_printf.
14309 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
14311         * decl.c (init_decl_processing): Remove bogus initialization.
14312         * error.c (lang_print_error_function): Restore here.
14313         (init_error): Initialize print_error_function.
14315 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
14317         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
14319 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
14321         * Makefile.in (error.o): Depends on diagnostic.h
14323         * cp-tree.h (problematic_instantiation_changed,
14324         record_last_problematic_instantiation, current_instantiation,
14325         print_instantiation_context): Declare.
14326         (maybe_print_template_context): Remove.
14328         * decl.c (init_decl_processing): Set print_error_function to NULL.
14329         (lang_print_error_function): Remove, since we're using a new
14330         machinery.
14332         * error.c: #include diagnostic.h
14333         (function_category): New function.
14334         (cp_diagnostic_starter): Likewise.
14335         (cp_diagnostic_finalizer): Likewise.
14336         (cp_print_error_function): Likewise.
14337         (maybe_print_instantiation_context): Likewise.
14338         (print_instantiation_full_context): Likewise.
14339         (print_instantiation_partial_context): Likewise.
14340         (print_instantiation_context): Define.
14341         (init_error): Initialize diagnostic pager and finalizer.
14343         * pt.c (problematic_instantiation_changed): Define.
14344         (record_last_problematic_instantiation): Likewise.
14345         (current_instantiation): Likewise.
14346         (maybe_print_template_context): Remove.
14347         (print_template_context): Likewise.
14348         (current_tinst_level): Make static to reflect Brendan Kehoe's
14349         change of 1995-04-13.
14350         (push_tinst_level): Call print_instantiation_context.
14352 2000-08-21  Nix  <nix@esperi.demon.co.uk>
14354         * lang-specs.h: Do not process -o or run the assembler if
14355         -fsyntax-only.
14357 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
14359         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
14360         variables.
14361         * decl2.c (lang_decode_option): Disable gettext attributes for
14362         -ansi.
14364 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
14366         * lex.c (lang_init_options): Default diagnostic message maximum
14367         length to 80, when line-wrapping.
14369 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
14371         * class.c (build_vtbl_initializer): Clear the entire
14372         vtbl_init_data.  Start keeping track of the functions for which we
14373         have created vcall offsets here.
14374         (dfs_build_vcall_offset_vtbl_entries): Remove.
14375         (build_vcall_offset_vtbl_entries): Reimplement.
14376         (add_vcall_offset_vtbl_entries_r): New function.
14377         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
14378         computing when vcall offsets are necessary.
14380 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14382         * decl.c (member_function_or_else): Use cp_error ... %T.
14383         (grokdeclarator): Likewise.
14384         (start_method): Likewise.
14385         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
14387 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14389         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
14390         TYPE_DECLs.
14392 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14394         * cp-tree.h (PTRMEM_OK_P): New macro.
14395         (itf_ptrmem_ok): New enumeration value.
14396         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
14397         argument. Diagnose implicit pointer to member.
14398         (instantiate_type): Don't diagnose implicit pointer to member
14399         here. Pass itf_ptrmem_ok if ok. Adjust calls to
14400         resolve_address_of_overloaded_function.
14401         * init.c (build_offset_ref): Set PTRMEM_OK_P.
14402         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
14403         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
14404         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
14405         (build_unary_op): Deal with single non-static member in
14406         microsoft-land.
14408 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14410         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
14412 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
14414         * cp-tree.h (enum_name_string): Remove prototype.
14415         (report_case_error): Remove prototype.
14416         * cp/typeck2.c (enum_name_string): Remove.
14417         (report_case_error): Remove.
14418         * error.c (dump_expr): Deal with enum values directly.
14419         Correctly negate integer constant.
14421 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14423         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
14424         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
14425         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
14426         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
14427         (__cxa_vec_new): Use __cxa_vec_new2.
14428         (__cxa_vec_delete): Use __cxa_vec_delete2.
14430 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14432         * vec.cc (__cxa_vec_new): Set "C" linkage.
14433         (__cxa_vec_ctor): Likewise.
14434         (__cxa_vec_cctor): Likewise.
14435         (__cxa_vec_dtor): Likewise.
14436         (__cxa_vec_delete): Likewise.
14437         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
14438         (__cxa_vec_ctor): Likewise.
14439         (__cxa_vec_cctor): Likewise.
14440         (__cxa_vec_dtor): Likewise.
14441         (__cxa_vec_delete): Likewise.
14443 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14445         * class.c (instantiate_type): Reinstate local variable
14446         deleted in previous change.
14448         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
14449         itf_no_attributes.
14451 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14453         * cp-tree.h (instantiate_type_flags): New enumeration.
14454         (instantiate_type): Change parameter.
14455         * class.c (instantiate_type): Adjust prototype. Adjust.
14456         * call.c (standard_conversion): Adjust instantiate_type call.
14457         (reference_binding): Likewise.
14458         (build_op_delete_call): Likewise.
14459         (convert_like_real): Likewise.
14460         * cvt.c (cp_convert_to_pointer): Likewise.
14461         (convert_to_reference): Likewise.
14462         * pt.c (convert_nontype_argument): Likewise.
14463         * typeck.c (build_binary_op): Likewise.
14464         (build_ptrmemfunc): Likewise.
14465         (convert_for_assignment): Likewise.
14467 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
14469         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
14470         (current_aggr): Define.
14471         * decl.c (grokdeclarator): Make sure a friend class is an
14472         elaborated type specifier.
14473         * parse.y (current_aggr): Remove static definition.
14474         (cp_parse_init): Adjust.
14475         (structsp): Clear and restore current_aggr.
14476         (component_decl_list): Clear current_aggr.
14478         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
14479         aggregate tag on the typename's context.
14481         * pt.c (tsubst_friend_class): Return error_mark_node, if
14482         parms becomes NULL.
14483         (instantiate_class_template): Ignore error_mark_node friend types.
14485 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
14487         * cvt.c (warn_ref_binding): New static function, broken out of ...
14488         (convert_to_reference): ... here. Use it.
14490 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
14492         * parse.y (template_arg): Add rule for template qualified with
14493         global scope.
14495 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14497         * decl2.c (add_function): Reorganize.
14498         (arg_assoc): Do not consider function template decls.
14500 2000-08-11  Jason Merrill  <jason@redhat.com>
14502         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
14503         looking inside.
14505 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14507         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
14508         (lookup_nested_tag): Likewise.
14510         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
14511         can be produced.
14513 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14515         * parse.y (named_complex_class_head_sans_basetype): Remove
14516         always true if.
14518 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14520         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
14521         explicit TEMPLATE_ID_EXPR args.
14522         (build_expr_from_tree, case CALL_EXPR): Likewise.
14524 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
14526         * decl.c (check_tag_decl): Diagnose typename's which don't
14527         declare anything.
14529 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
14531         * init.c (build_aggr_init): Reject bogus array initializers
14532         early.
14534 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
14536         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
14537         runtime.
14538         * cp/tinfo.cc (__dynamic_cast): Likewise.
14539         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
14541 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
14543         * cvt.c (convert_to_pointer_force): Fix error message when
14544         attempting to cast from ambiguous base.
14546 2000-08-08  Jason Merrill  <jason@redhat.com>
14548         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
14549         (tsubst_template_arg_vector): Likewise.
14551         * decl2.c (build_anon_union_vars): Choose the largest field; don't
14552         assume that one will be as large as the union.
14554 2000-08-07  Kazu Hirata  <kazu@hxi.com>
14556         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
14557         * decl.c (pop_labels): Likewise.
14559 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
14561         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
14562         specifications.
14563         (__pointer_to_member_type_info): Likewise.
14564         (__base_class_info): Likewise.
14565         (__class_type_info): Likewise.
14566         (__si_class_type_info): Likewise.
14567         (__vmi_class_type_info): Likewise.
14568         * tinfo.cc (__si_class_type_info::__do_find_public_src):
14569         Changed member names to match specifications.
14570         (__vmi_class_type_info::__do_find_public_src): Likewise.
14571         (__si_class_type_info::__do_dyncast): Likewise.
14572         (__vmi_class_type_info::__do_dyncast): Likewise.
14573         (__si_class_type_info::__do_upcast): Likewise.
14574         (__vmi_class_type_info::__do_upcast): Likewise.
14575         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
14576         (__pbase_type_info::__pointer_catch): Likewise.
14577         (__pointer_type_info::__pointer_catch): Likewise.
14578         (__pointer_to_member_type_info::__pointer_catch): Likewise.
14580 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
14582         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
14583         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
14584         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
14586 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
14588         * cp-tree.h (add_method): Change prototype.
14589         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
14590         Don't double the size of the method vector in the error case.
14591         (handle_using_decl): Adjust call to add_method.
14592         (add_implicitly_declared_members): Likewise.
14593         (clone_function_decl): Likewise.
14594         * decl2.c (check_classfn): Likewise.
14595         * semantics.c (finish_member_declaration): Likewise.
14597 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
14599         * decl.c (flag_isoc94): New variable.
14601 2000-08-02  Jason Merrill  <jason@redhat.com>
14603         * pt.c (do_type_instantiation): Add complain parm; don't complain
14604         if called recursively.
14605         * cp-tree.h, parse.y: Adjust.
14607 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
14609         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
14610         -Wno-strict-prototypes.
14612         * g++spec.c: Adjust type of second argument to
14613         lang_specific_driver, and update code as necessary.
14615         * cp-tree.h: Don't prototype min_precision here.
14616         (my_friendly_assert): Cast expression to void.
14617         * semantics.c (do_poplevel): Initialize scope_stmts.
14619 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
14621         * cp-tree.h (DECL_NEEDED_P): Tweak.
14623 2000-07-28  Jason Merrill  <jason@redhat.com>
14625         * lang-specs.h: Use %i in rule for .ii files.
14627 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
14629         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
14631 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
14633         Allow indirect primary bases.
14634         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
14635         primary_base.
14636         (CLASSTYPE_VFIELD_PARENT): Remove.
14637         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
14638         (BINFO_PRIMARY_BINFO): Remove.
14639         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
14640         (BINFO_VBASE_PRIMARY_P): Likewise.
14641         (BINFO_PRIMARY_BASE_OF): New macro.
14642         (BINFO_INDIRECT_PRIMARY_P): Likewise.
14643         (get_primary_binfo): New function.
14644         * decl.c (lang_mark_tree): Make lang_type::primary_base.
14645         * class.c (vcall_offset_data_s): Rename to ...
14646         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
14647         and add ctor_vtbl_p.
14648         (get_derived_offset): Use get_primary_binfo.
14649         (dfs_mark_primary_bases): Adjust handling of virtual primary
14650         bases.
14651         (mark_primary_bases): Likewise.
14652         (set_primary_base): Take a binfo, not an integer, as a
14653         representation of the primary base.
14654         (indirect_primary_base_p): Remove.
14655         (determine_primary_base): Adjust for indirect primary bases.
14656         (dfs_find_final_overrider): Fix typo in coment.
14657         (update_vtable_entry_for_fn): Use get_primary_binfo.
14658         (layout_nonempty_base_or_field): Tweak.
14659         (build_base_fields): Adjust for new primary base semantics.
14660         (dfs_propagate_binfo_offsets): Remove.
14661         (propagate_binfo_offsets): Rewrite.
14662         (dfs_set_offset_for_shared_vbases): Remove.
14663         (layout_virtual_bases): Don't use it.
14664         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
14665         ABI.
14666         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
14667         CLASSTYPE_VFIELD_PARENT.
14668         (dfs_get_primary_binfo): New function.
14669         (get_primary_binfo): Likewise.
14670         (dump_class_hierarchy_r): Tweak printing of primary bases.
14671         (build_vtbl_initializer): Fix typo in comments.  Use
14672         vtbl_init_data.
14673         (build_vcall_and_vbase_vtbl_entries): Likewise.
14674         (build_vbaes_offset_vtbl_entries): Likewise.
14675         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
14676         BV_VCALL_INDEX to handle indirect primary bases.
14677         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
14678         (build_rtti_vtbl_entries): Likewise.
14679         * search.c (get_shared_vbase_if_not_primary): Tweak.
14680         (find_vbase_instance): Likewise.
14681         (binfo_for_vtable): Simplify.
14682         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
14683         (make_binfo): Make it have 11 entries.
14685 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
14687         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
14688         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
14689         ascertaining primaryness.
14690         (G): Remove template_args.
14691         (decl_is_template_id): New function.
14692         (write_encoding): Use decl_is_template_id.
14693         (write_name): Likewise.  Handle type_decls.  Get main variant of
14694         type decls.
14695         (write_nested_name): Likewise.
14696         (write_prefix): Likewise.
14697         (write_template_prefix): Likewise.
14698         (write_special_name_constructor): Remove defunct production from
14699         comment.
14700         (write_bare_function_type): Remove comment about absent parameter.
14701         (write_template_template_arg): Add missing grammar production to
14702         comment.
14704 2000-07-27  Jason Merrill  <jason@redhat.com>
14706         * decl.c (duplicate_decls): If common_type produces a non-typedef
14707         type for a typedef, just use the old type.
14709 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
14711         * cp-tree.h (function_depth): Declare.
14712         (verify_stmt_tree): Likewise.
14713         (find_tree): Likewise.
14714         * decl.c (function_depth): Give it external linkage.
14715         * optimize.c (optimize_function): Increment and decrement it.
14716         * tree.c (verify_stmt_tree_r): New function.
14717         (verify_stmt_tree): Likewise.
14718         (find_tree_r): Likewise.
14719         (find_tree): Likewise.
14721 2000-07-27  Jason Merrill  <jason@redhat.com>
14723         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
14724         TYPE_PTRMEMFUNC_P.
14725         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
14727 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
14729         * decl.c (start_cleanup_fn): Mark the function as `inline'.
14730         * decl2.c (get_guard): Call cp_finish_decl, not
14731         rest_of_decl_compilation, for local guards.
14732         * lex.c (do_identifier): Remove unused variable.
14734 2000-07-26      Marc Espie <espie@cvs.openbsd.org>
14736         * parse.y:  Add missing ';'.
14738 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
14740         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
14741         of `extern "C++"'.
14743 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
14745         Kill strict_prototype. Backwards compatibility only for
14746         non NO_IMPLICIT_EXTERN_C systems.
14747         * cp-tree.h (flag_strict_prototype): Remove.
14748         (strict_prototype): Remove.
14749         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14750         * decl.c (maybe_push_to_top_level): Adjust.
14751         (pop_from_top_level): Adjust.
14752         (decls_match): Only allow sloppy parm matching for ancient
14753         system headers.
14754         (init_decl_processing): Adjust.
14755         (grokdeclarator): Adjust.
14756         * decl2.c (flag_strict_prototype): Remove.
14757         (strict_prototype): Remove.
14758         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
14759         (lang_f_options): Remove "strict-prototype".
14760         (unsupported-options): Add "strict-prototype".
14761         * lex.c (do_identifier): Adjust.
14762         (do_scoped_id): Adjust.
14763         * parse.y (empty_parms): Adjust.
14764         * class.c (push_lang_context): Adjust.
14765         (pop_lang_context): Adjust.
14766         * typeck.c (comp_target_parms): Adjust.
14768 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
14770         * decl.c (poplevel): Deal with anonymous variables at for scope.
14771         (maybe_inject_for_scope_var): Likewise.
14773 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
14775         * decl.c: Remove all signal handling code, now done in toplev.c.
14777 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
14779         * decl.c (make_rtl_for_nonlocal_decl): Rework.
14781         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
14782         correctly.
14784 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
14786         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
14787         Define my_friendly_assert and my_friendly_abort as macros
14788         which may call friendly_abort.  Prototype friendly abort, not
14789         my_friendly_abort or my_friendly_assert.
14790         * decl.c (signal_catch): Report the signal caught in the error
14791         message.  Call fatal directly.
14792         * typeck2.c (ack, my_friendly_assert): Delete.
14793         (my_friendly_abort): Rename to friendly_abort.  Expect file,
14794         line, and function parameters.  Report the abort code, then
14795         call fancy_abort.  Do not mask an abort if errors have
14796         already occurred.
14798 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
14800         * typeck.c (comp_target_parms): Remove obsolete parameter.
14801         (comp_target_types): Adjust.
14803 2000-07-17  Jason Merrill  <jason@redhat.com>
14805         * typeck.c (mark_addressable): Never set TREE_USED.
14806         * call.c (build_call): Don't abort on calls to library functions
14807         that have been declared normally.
14809         * typeck.c (build_binary_op): Fix grammar in warning.
14811         * exception.cc (__eh_free): Fix prototype.
14813         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
14815         * decl.c (pushdecl): Handle seeing an OVERLOAD in
14816         IDENTIFIER_NAMESPACE_VALUE.
14818 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
14820         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
14821         * method.c (use_thunk): Correct handling of vcall offsets.
14823 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
14825         * .cvsignore: parse.h and parse.c have no cp- prefix.
14827 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
14829         * .cvsignore: New file.
14831 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
14833         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
14835 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
14837         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
14838         * parse.c: Remove.
14839         * parse.h: Likewise.
14841 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
14843         * class.c (layout_class_type): Add pointers to virtual bases after
14844         base classes under the old ABI.
14846 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
14848         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
14849         (finish_continue_stmt): Likewise.
14850         (begin_for_stmt): Remove call to note_level_for_for.
14851         (finish_goto_stmt): Change call from build_min_nt
14852         to build_stmt.
14853         (finish_expr_stmt): Likewise.
14854         (begin_if_stmt): Likewise.
14855         (begin_while_stmt): Likewise.
14856         (finish_while_stmt): Likewise.
14857         (finish_return_stmt): Likewise.
14858         (begin_for_stmt): Likewise.
14859         (finish_for_stmt): Likewise.
14860         (finish_break_stmt): Likewise.
14861         (begin_switch_stmt): Likewise.
14862         (finish_case_label): Likewise.
14863         (genrtl_try_block): Likewise.
14864         (begin_try_block): Likewise.
14865         (begin_handler): Likewise.
14866         (begin_compound_stmt): Likewise.
14867         (finish_asm_stmt): Likewise.
14868         (finish_label_stmt): Likewise.
14869         (add_decl_stmt): Likewise.
14870         (finish_subobject): Likewise.
14871         (finish_decl_cleanup): Likewise.
14872         (finish_named_return_value): Likewise.
14873         (setup_vtbl_ptr): Likewise.
14874         (add_scope_stmt): Likewise.
14875         * decl.c (finish_constructor_body): Likewise.
14876         (finish_destructor_body): Likewise.
14877         * optimize.c (copy_body_r): Likewise.
14878         (initialize_inlined_parameters): Likewise.
14879         (declare_return_variable): Likewise.
14880         (expand_call_inline): Likewise.
14882 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
14884         * semantics.c (expand_body): Sync interface information
14885         at the end of function body expansion.
14887 2000-07-09  Jason Merrill  <jason@redhat.com>
14889         * init.c (build_new_1): Bail early if the call to new fails.
14891         * decl.c (compute_array_index_type): Check specifically for
14892         an INTEGER_CST, not just TREE_CONSTANT.
14894         * decl.c (duplicate_decls): Don't call duplicate_decls on
14895         the DECL_TEMPLATE_RESULT.
14896         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
14897         codes.
14899         * error.c (dump_template_bindings): Don't crash if we had an
14900         invalid argument list.
14902         * typeck.c (c_expand_start_case): Do narrowing here.
14903         * semantics.c (finish_switch_cond): Not here.
14905 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
14907         * parse.y (asm_clobbers): Do string concatenation.
14909 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
14911         * decl.c (pushtag): Don't put local classes in template functions
14912         on the local_classes list.
14914 2000-07-04  Scott Snyder  <snyder@fnal.gov>
14916         * decl2.c (get_guard): Add missing return for old ABI local
14917         variable case.
14919 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
14921         * cp-tree.h (char_type_p): New function.
14922         * decl.c (init_decl_processing): Don't initialize
14923         signed_wchar_type_node or unsigned_wchar_type_node.
14924         (complete_array_type): Handle brace-enclosed string-constants.
14925         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
14926         * tree.c (char_type_p): New function.
14927         * typeck2.c (digest_init): Use char_type_p.
14929 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
14931         * pt.c (tsubst): Don't layout type, if it's error_mark.
14933 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
14935         * pt.c (instantiate_pending_templates): Reset template level.
14937 2000-07-05  Jason Merrill  <jason@redhat.com>
14939         * call.c (joust): Don't complain about `operator char *()' beating
14940         `operator const char *() const'.
14942 2000-07-04  scott snyder  <snyder@fnal.gov>
14943             Jason Merrill  <jason@redhat.com>
14945         * repo.c (repo_get_id): Handle the case where a class with virtual
14946         bases has a null TYPE_BINFO_VTABLE.
14948 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
14949             Jason Merrill  <jason@redhat.com>
14951         * parse.y (member_init): Just pass in the type.
14952         * init.c (expand_member_init): Handle getting a type.
14954 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14955             Jason Merrill  <jason@redhat.com>
14957         * decl.c (finish_function): Warn if a function has no return
14958         statement.
14959         Suggested by Andrew Koenig.
14960         * typeck.c (check_return_expr): Do set current_function_returns_value
14961         if we got an error_mark_node.
14963 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
14965         * decl2.c (push_decl_namespace): Push the original namespace.
14967 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
14969         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
14970         * semantics.c (begin_class_definition): Clear it.
14972 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
14974         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
14975         (genrtl_expr_stmt): Likewise.
14976         (genrtl_decl_stmt): Likewise.
14977         (genrtl_if_stmt): Likewise.
14978         (genrtl_while_stmt): Likewise.
14979         (genrtl_do_stmt): Likewise.
14980         (genrtl_return_stmt): Likewise.
14981         (genrtl_for_stmt): Likewise.
14982         (genrtl_break_stmt): Likewise.
14983         (genrtl_continue_stmt): Likewise.
14984         (genrtl_scope_stmt): Likewise.
14985         (genrtl_switch_stmt): Likewise.
14986         (genrtl_case_label): Likewise.
14987         (genrtl_begin_compound_stmt): Likewise.
14988         (genrtl_finish_compound_stmt): Likewise.
14989         (genrtl_compound_stmt): Likewise.
14990         (genrtl_asm_stmt): Likewise.
14992         * init.c (begin_init_stmts): Remove call to
14993         genrtl_begin_compound_stmt.
14994         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
14996         * semantics.c (lang_expand_stmt): Changed call to
14997         genrtl_compound_stmt to ignore return value.
14999 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
15001         * mangle.c (canonicalize_for_substitution): Return the canonical
15002         variant of a type.
15004         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
15005         TYPE_DECL.
15006         * typeck.c (commonparms): Remove obstack manipulations.
15008 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
15010         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
15012         * Makefile.in (OBJS): Added ../c-semantics.o.
15013         (OBJDEPS): Likewise.
15015         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
15016         ../c-common.h.
15017         (struct stmt_tree): Added comment.
15018         (current_function_name_declared): Removed.
15019         (stmts_are_full_exprs_p): Likewise.
15020         (genrtl_do_pushlevel): Likewise.
15021         (genrtl_clear_out_block): Likewise.
15022         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
15023         (DECL_ANON_UNION_ELEMS): Likewise.
15024         (emit_local_var): Likewise.
15025         (make_rtl_for_local_static): Likewise.
15026         (do_case): Likewise.
15027         (expand_stmt): Likewise.
15028         (genrtl_decl_cleanup): Likewise.
15029         (c_expand_asm_operands): Likewise.
15030         (c_expand_return): Likewise.
15031         (c_expand_start_case): Likewise.
15033         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
15034         (emit_local_var): Likewise.
15035         (initialize_local_var): Change reference to
15036         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15037         Change reference to stmts_are_full_exprs_p to
15038         current_stmt_tree->stmts_are_full_exprs_p.
15039         (push_cp_function_context): Likewise.
15041         * expect.c (expand_throw): Change reference to
15042         stmts_are_full_exprs_p.
15044         * init.c (build_aggr_init): Change reference to
15045         stmts_are_full_exprs_p.
15046         (build_vec_init): Likewise.
15048         * optimize.c (maybe_clone_body): Change reference to
15049         current_function_name_declared to
15050         cp_function_chain->name_declared.
15052         * pt.c (instantiate_decl): Change reference to
15053         current_function_name_declared to
15054         cp_function_chain->name_declared.
15056         * semantics.c (expand_cond): Moved declaration to c-common.h.
15057         (genrtl_do_pushlevel): Moved to c-semantics.c.
15058         (genrtl_clear_out_block): Likewise.
15059         (genrtl_goto_stmt): Likewise.
15060         (genrtl_expr_stmt): Likewise.
15061         (genrtl_decl_stmt): Likewise.
15062         (gerntl_if_stmt): Likewise.
15063         (genrtl_while_stmt): Likewise.
15064         (genrtl_do_stmt): Likewise.
15065         (genrtl_return_stmt): Likewise.
15066         (genrtl_for_stmt): Likewise.
15067         (genrtl_break_stmt): Likewise.
15068         (genrtl_continue_stmt): Likewise.
15069         (genrtl_scope_stmt): Likewise.
15070         (genrtl_switch_stmt): Likewise.
15071         (genrtl_case_label): Likewise.
15072         (genrtl_begin_compound_stmt): Likewise.
15073         (genrtl_finish_compound_stmt): Likewise.
15074         (genrtl_compound_stmt): Likewise.
15075         (genrtl_asm_stmt): Likewise.
15076         (genrtl_decl_cleanup): Likewise.
15077         (expand_cond): Likewise.
15078         (expand_stmt): Renamed to ...
15079         (lang_expand_stmt): ... this.
15080         (lang_expand_expr_stmt): Initialize.
15081         (set_current_function_name_declared): Likewise.
15082         (stmts_are_full_exprs_p): Likewise.
15083         (current_function_name_declared): Likewise.
15084         (anon_aggr_type_p): Likewise.
15085         (do_poplevel): Change reference to
15086         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
15087         Change reference to stmts_are_full_exprs_p to
15088         current_stmt_tree->stmts_are_full_exprs_p.
15089         (add_tree): Likewise.
15090         (finish_expr_stmt): Likewise.
15091         (prep_stmt): Likewise.
15092         (lang_expand_stmt): Likewise.
15093         (begin_compound_stmt): Change reference to
15094         current_function_name_declared to
15095         cp_function_chain->name_declared and call to
15096         current_function_name_declared().
15097         (setup_vtbl_ptr): Likewise.
15098         (genrtl_do_poplevel): Removed.
15100 2000-06-30  Jason Merrill  <jason@redhat.com>
15102         * init.c (init_init_processing): Go back to aligning like
15103         double_type_node for old ABI.
15104         (get_cookie_size): Make cookie larger if we get a type that needs
15105         more alignment.
15106         (build_vec_delete): Call it.
15108         * typeck.c (qualify_type_recursive): New fn.
15109         (composite_pointer_type): Use it.
15110         (build_binary_op): Use composite_pointer_type.
15112 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
15113             Jason Merrill  <jason@redhat.com>
15115         * typeck.c (check_return_expr): Don't complain about returning
15116         NULL from operator new if -fcheck-new.
15117         * cp-tree.h: Declare flag_check_new here.
15118         * init.c: Not here.
15120 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
15122         * mangle.c (find_substitution): Use same_type_p.
15123         (write_encoding): Don't check for substitutions.
15125 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
15127         * parse.y (expr_no_comma_rangle): New non-terminal.
15128         (template_parm): Use it for default parameter case.
15129         (template_arg): Use it.
15130         (expr_no_commas): Remove commented out undefined extensions.
15131         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15132         * parse.h, parse.c: Rebuilt.
15134 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
15136         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
15137         (finish_asm_stmt): Do it here, instead.
15139         * cp-tree.h (ridpointers): Don't declare.
15140         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
15141         (record_builtin_java_type): Likewise.
15142         (init_decl_processing): Likewise.
15143         * lex.c: Move inclusion of lex.h.
15144         (ridpointers): Don't define.
15145         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
15146         RID_MAX.
15147         * lex.h (enum rid): Rename to ...
15148         (enum cp_rid): ... this.
15149         (ridpointers): Don't declare.
15150         * parse.y: Move inclusion of lex.h.
15151         * parse.c: Regenerated.
15152         * spew.c: Move inclusion of lex.h.
15154         * cp-tree.h (struct language_function): Remove temp_name_counter.
15155         (temp_name_counter): Remove.
15156         (get_temp_name): Change prototype.
15157         (get_guard): New function.
15158         (get_guard_cond): Likewise.
15159         (set_guard): Likewise.
15160         * cvt.c (build_up_reference): Adjust call to get_temp_name.
15161         * decl.c (expand_static_init): Use get_guard and friends to
15162         implement guard variables.
15163         * decl2.c (get_temp_name): Assume that the variables created are
15164         always static.
15165         (get_sentry): Rename to ...
15166         (get_guard): ... this.  Implement new ABI guard variables.
15167         (get_guard_bits): New function.
15168         (get_guard_cond): Likewise.
15169         (set_guard): Likewise.
15170         (start_static_initialization_or_destruction): Use them.
15171         (do_static_initialization): Replace sentry with guard throughout.
15172         (do_static_destruction): Likewise.
15173         * init.c (create_temporary_var): Add comment.
15175 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
15177         * mangle.c (find_substitution): Use same_type_p.
15178         (write_encoding): Don't check for substitutions.
15180 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
15182         * parse.y (expr_no_comma_rangle): New non-terminal.
15183         (template_parm): Use it for default parameter case.
15184         (template_arg): Use it.
15185         (expr_no_commas): Remove commented out undefined extensions.
15186         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
15187         * parse.h, parse.c: Rebuilt.
15189 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
15191         * cp-tree.h (flag_const_strings): Remove.
15192         (warn_parentheses): Likewise.
15193         (warn_format): Likewise.
15194         (common_type): Likewise.
15195         (default_conversion): Likewise.
15196         (build_binary_op): Likewise.
15197         (cp_build_binary_op): New macro.
15198         * call.c (build_new_op): Use cp_build_binary_op instead of
15199         build_binary_op.
15200         * class.c (build_vtable_entry_ref): Likewise.
15201         * decl.c (expand_static_init): Likewise.
15202         (compute_array_index_type): Likewise.
15203         (build_enumerator): Likewise.
15204         * decl2.c (delete_sanity): Likewise.
15205         (start_static_initialization_or_destruction): Likewise.
15206         * error.c (dump_type_suffix): Likewise.
15207         * init.c (resolve_offset_ref): Likewise.
15208         (build_new): Likewise.
15209         (build_new_1): Likewise.
15210         (build_vec_delete_1): Likewise.
15211         (build_vec_init): Likewise.
15212         (build_delete): Likewise.
15213         * rtti.c (synthesize_tinfo_fn): Likewise.
15214         (synthesize_tinfo_var): Likewise.
15215         * search.c (expand_upcast_fixups): Likewise.
15216         (fixup_all_virtual_upcast_offsets): Likewise.
15217         * typeck.c (build_array_ref): Likewise.
15218         (get_member_function_from_ptrfunc): Likewise.
15219         (build_binary_op): Add parameter.
15220         (pointer_int_sum): Use cp_build_binary_op.
15221         (pointer_diff): Likewise.
15222         (build_modify_expr): Likewise.
15223         (get_delta_difference): Likewise.
15224         (build_ptrmemfunc): Likewise.
15226 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
15228         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
15229         * decl.c (create_implicit_typedef): Adjust.
15230         * decl2.c (build_artificial_parm): Adjust.
15231         * method.c (implicitly_declare_fn): Adjust.
15232         * pt.c (push_inline_template_parms_recursive): Adjust.
15233         (process_template_parm): Adjust.
15234         (overloaded_template_name): Adjust.
15235         * semantics.c (finish_template_template_parm): Adjust.
15237 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
15239         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
15240         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
15241         where to emit thunks.
15242         (build_vtt): Adjust call to build_vtt_inits.
15243         (build_vtt_inits): Add parameter to indicate whether or not
15244         sub-VTTs for virtual bases should be included.  Adjust handling of
15245         construction vtables.
15246         (get_matching_base): New function.
15247         (dfs_build_vtt_inits): Rename to ...
15248         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
15249         construction vtables.
15250         (dfs_fixup_binfo_vtbls): Likewise.
15251         (build_ctor_vtbl_groups): Build construction vtables for virtual
15252         bases, too.
15253         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
15254         to build construction vtbls.
15255         (dfs_accumulate_vtbl_inits): Adjust handling of
15256         construction vtables.
15258         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
15259         types correctly.
15261 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
15263         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
15265 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
15267         * search.c (hides): Remove.
15268         (is_subobject_of_p): Add most_derived parameter. Use
15269         CANONICAL_BINFO.
15270         (lookup_field_queue_p): Adjust.
15271         (lookup_field_r): Adjust.
15273 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
15275         * decl2.c (handle_class_head): Bash typedefs to the type's main
15276         decl.
15278 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
15280         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
15281         (begin_global_stmt_expr): ... this.
15282         (genrtl_finish_stmt_expr): Rename to ...
15283         (finish_global_stmt_expr): ... this.
15284         * init.c (begin_init_stmts): Adjust calls.
15285         (finish_init_stmts): Likewise.
15286         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
15287         (begin_global_stmt_expr): ... this.
15288         (genrtl_finish_stmt_expr): Rename to ...
15289         (finish_global_stmt_expr): ... this.
15291 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
15293         * search.c (lookup_member): Fix typo in comment.
15295 2000-06-24  Jason Merrill  <jason@redhat.com>
15297         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
15298         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
15300 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15302         * parse.y (complex_direct_notype_declarator): Support global_scope.
15303         * Makefile.in: Adjust conflict count.
15305 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15307         * parse.y (template_arg): Convert TEMPLATE_DECL
15308         that is a template template parameter to
15309         TEMPLATE_TEMPLATE_PARM here.
15311         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
15312         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
15313         (copy_template_template_parm): Adjust prototype.
15314         * decl.c (grokdeclarator): Remove dead code.
15315         * pt.c (process_template_parm): Tidy.
15316         (lookup_template_class): Construct nodes in
15317         copy_template_template_parm.
15318         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
15319         lookup_template_class.  Use TYPE_TI_TEMPLATE.
15320         * tree.c (copy_template_template_parm): Add NEWARGS
15321         parameter.
15322         (mapcar): Adjust call to copy_template_template_parm.
15323         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
15324         * method.c (build_template_template_parm_names): Change error
15325         code to avoid compilation warning.
15327         * gxxint.texi: Document template template parameter
15328         name mangling.
15330 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
15332         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
15333         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
15334         (cp-demangle.o): New rule.
15335         (dyn-string.o): Likewise.
15336         * inc/cxxabi.h (__cxa_demangle): New declaration.
15338 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
15340         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
15341         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
15342         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
15343         a tree, not an int.
15344         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
15345         (make_thunk): Change prototype.
15346         (emit_thunk): Rename to use_thunk.
15347         (mangle_thunk): Change prototype.
15348         * class.c (get_derived_offset): Simplify.
15349         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
15350         BV_GENERATE_THUNK_WITH_VTABLE_P.
15351         (build_primary_vtable): Simplify.
15352         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
15353         (dfs_find_base): Remove.
15354         (update_vtable_entry_for_fn): Correct bug in finding the base
15355         where a virtual function was first declared.  Figure out whether
15356         or not to emit a vcall-thunk with the vtables in which it appears.
15357         Correct logic for deciding whether to use an ordinary thunk, or a
15358         vcall thunk.
15359         (finish_struct_1): Remove unnecssary code.
15360         (build_vtbl_initializer): Use ssize_int for the running counter of
15361         negative indices.
15362         (build_vtbl_initializer): Only use vcall thunks where necessary.
15363         Mark thunks as needing to be emitted with their vtables, or not.
15364         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
15365         indices.  Use size_binop.
15366         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
15367         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
15368         size_binop.
15369         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
15370         (build_vtable_entry): Mark thunks as needing to be emitted with
15371         their vtables, or not.
15372         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
15373         * decl2.c (mark_vtable_entries): Use use_thunk instead of
15374         emit_thunk.
15375         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
15376         information.
15377         * error.c (dump_expr): Use BV_FN.
15378         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
15379         not an int.
15380         * method.c (make_thunk): Likewise.
15381         (emit_thunk): Rename to use_thunk.  Allow callers to decide
15382         whether or not to actually emit the thunk.  Adjust for changes in
15383         representation of vcall offsets.
15384         * search.c (dfs_get_pure_virtuals): Use BV_FN.
15385         * semantics.c (emit_associated_thunks): New function.
15386         (expand_body): Use it.
15387         * ir.texi: Adjust decriptions of thunks.
15389 2000-06-22  Jason Merrill  <jason@redhat.com>
15391         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
15392         (tsubst_friend_function): Copy it here.
15394         * decl.c (grok_op_properties): Fix typo.
15396         * decl2.c (delete_sanity): Clarify warning, avoid failure on
15397         deleting void*.
15399         * pt.c (check_explicit_specialization): Clarify error.
15401         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
15402         an old OVERLOAD when we're declaring a non-function.
15403         (pushdecl, destroy_local_var): Check for error_mark_node.
15404         (warn_extern_redeclared_static): Also bail early if
15405         we're a CONST_DECL.
15406         (push_overloaded_decl): Ignore an old error_mark_node.
15408 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
15410         * call.c (build_x_va_arg): Check if in a template decl.
15411         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
15413 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15415         * class.c (push_lang_context): TYPE_NAME gets you to the Java
15416         types DECLs.
15417         * decl.c (check_goto): Computed gotos assumed OK.
15419 2000-06-20  Jason Merrill  <jason@redhat.com>
15421         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
15422         for which we don't need to look for instantiations.
15424 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
15426         * parse.y (program): Always call finish_translation_unit.
15427         * parse.c, parse.h: Rebuilt.
15429 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
15431         * method.c: Don't include hard-reg-set.h.
15433 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
15435         * rtti.c (get_base_offset): Cope when vbase field is in a base.
15437 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
15439         * call.c (build_conditional_expr): Use VOID_TYPE_P.
15440         * cvt.c (cp_convert_to_pointer): Likewise.
15441         (convert_to_void): Likewise.
15442         * error.c (dump_expr): Likewise.
15443         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
15444         * init.c (build_delete): Likewise.
15445         * method.c (emit_thunk): Likewise.
15446         * optmize.c (declare_return_variable): Likewise.
15447         * rtti.c (get_tinfo_decl_dynamic): Likewise.
15448         (get_typeid): Likewise.
15449         (build_dynamic_cast_1): Likewise.
15450         * typeck.c (composite_pointer_type): Likewise.
15451         (common_type): Likewise.
15452         (build_indirect_ref): Likewise.
15453         (build_binary_op): Likewise.
15454         (build_x_compound_expr): Likewise.
15455         (check_return_expr): Likewise.
15456         * typeck2.c (add_exception_specifier): Likewise.
15458         * mangle.c (write_method_parms): Use direct comparison for end
15459         of parmlist.
15461 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
15463         * cp-tree.h (genrtl_try_block): Declare function.
15464         (genrtl_handler): Likewise.
15465         (genrtl_catch_block): Likewise.
15466         (genrtl_ctor_stmt): Likewise.
15467         (genrtl_subobject): Likewise.
15468         (genrtl_decl_cleanup): Likewise.
15469         (genrtl_do_poplevel): Likewise.
15470         (genrtl_do_pushlevel): Likewise.
15471         (genrtl_clear_out_block): Likewise.
15472         (genrtl_goto_stmt): Likewise.
15473         (genrtl_expr_stmt): Likewise.
15474         (genrtl_decl_stmt): Likewise.
15475         (genrtl_if_stmt): Likewise.
15476         (genrtl_while_stmt): Likewise.
15477         (genrtl_do_stmt): Likewise.
15478         (genrtl_return_stmt): Likewise.
15479         (genrtl_for_stmt): Likewise.
15480         (genrtl_break_stmt): Likewise.
15481         (genrtl_continue_stmt): Likewise.
15482         (genrtl_scope_stmt): Likewise.
15483         (genrtl_switch_stmt): Likewise.
15484         (genrtl_case_label): Likewise.
15485         (genrtl_begin_compound_stmt): Likewise.
15486         (genrtl_finish_compound_stmt): Likewise.
15487         (genrtl_compound_stmt): Likewise.
15488         (genrtl_asm_stmt): Likewise.
15489         (genrtl_named_return_value): Likewise.
15490         (genrtl_begin_stmt_expr): Likewise.
15491         (genrtl_finish_stmt_expr): Likewise.
15492         (finish_for_stmt): Removed first argument.
15493         (finish_switch_stmt): Likewise.
15495         * semantics.c (genrtl_try_block): Define function.
15496         (genrtl_handler): Likewise.
15497         (genrtl_catch_block): Likewise.
15498         (genrtl_ctor_stmt): Likewise.
15499         (genrtl_subobject): Likewise.
15500         (genrtl_decl_cleanup): Likewise.
15501         (genrtl_do_poplevel): Likewise.
15502         (genrtl_do_pushlevel): Likewise.
15503         (genrtl_clear_out_block): Likewise.
15504         (genrtl_goto_stmt): Likewise.
15505         (genrtl_expr_stmt): Likewise.
15506         (genrtl_decl_stmt): Likewise.
15507         (genrtl_if_stmt): Likewise.
15508         (genrtl_while_stmt): Likewise.
15509         (genrtl_do_stmt): Likewise.
15510         (genrtl_return_stmt): Likewise.
15511         (genrtl_for_stmt): Likewise.
15512         (genrtl_break_stmt): Likewise.
15513         (genrtl_continue_stmt): Likewise.
15514         (genrtl_scope_stmt): Likewise.
15515         (genrtl_switch_stmt): Likewise.
15516         (genrtl_case_label): Likewise.
15517         (genrtl_begin_compound_stmt): Likewise.
15518         (genrtl_finish_compound_stmt): Likewise.
15519         (genrtl_compound_stmt): Likewise.
15520         (genrtl_asm_stmt): Likewise.
15521         (genrtl_named_return_value): Likewise.
15522         (genrtl_begin_stmt_expr): Likewise.
15523         (genrtl_finish_stmt_expr): Likewise.
15524         (finish_for_stmt): Removed first argument and generate rtl
15525         specific code.
15526         (finish_switch_stmt): Likewise.
15527         (do_poplevel): Removed generate rtl specific code.
15528         (do_pushlevel): Likewise.
15529         (add_tree): Likewise.
15530         (finish_goto_stmt): Likewise.
15531         (finish_expr_stmt): Likewise.
15532         (begin_if_stmt): Likewise.
15533         (finish_if_stmt_cond): Likewise.
15534         (finish_then_clause): Likewise.
15535         (begin_else_clause): Likewise.
15536         (finish_else_clause): Likewise.
15537         (finish_if_stmt): Likewise.
15538         (clear_out_block): Likewise.
15539         (begin_while_stmt): Likewise.
15540         (finish_while_stmt_cond): Likewise.
15541         (finish_while_stmt): Likewise.
15542         (begin_do_stmt): Likewise.
15543         (finish_do_body): Likewise.
15544         (finish_do_stmt): Likewise.
15545         (finish_return_stmt): Likewise.
15546         (begin_for_stmt): Likewise.
15547         (finish_for_init_stmt): Likewise.
15548         (finish_for_cond): Likewise.
15549         (finish_for_expr): Likewise.
15550         (finish_break_stmt): Likewise.
15551         (finish_continue_stmt): Likewise.
15552         (begin_switch_stmt): Likewise.
15553         (finish_switch_cond): Likewise.
15554         (finish_case_label): Likewise.
15555         (begin_try_block): Likewise.
15556         (begin_function_try_block): Likewise.
15557         (finish_try_block): Likewise.
15558         (finish_cleanup_try_block): Likewise.
15559         (finish_cleanup): Likewise.
15560         (finish_function_try_block): Likewise.
15561         (finish_handler_sequence): Likewise.
15562         (finish_function_handler_sequence): Likewise.
15563         (begin_handler): Likewise.
15564         (finish_handler_parms): Likewise.
15565         (begin_catch_block): Likewise.
15566         (finish_handler): Likewise.
15567         (begin_compound_stmt): Likewise.
15568         (finish_compound_stmt): Likewise.
15569         (finish_asm_stmt): Likewise.
15570         (finish_label_stmt): Likewise.
15571         (finish_label_decl): Likewise.
15572         (finish_subobject): Likewise.
15573         (finish_decl_cleanup): Likewise.
15574         (finish_named_return_value): Likewise.
15575         (begin_stmt_expr): Likewise.
15576         (finish_stmt_expr): Likewise.
15578         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
15579         to call genrtl_expr_stmt when appropriate.
15581         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
15582         begin_compound_expr to call genrtl_begin_stmt_expr and
15583         genrtl_begin_compound_expr when appropriate.
15584         (finish_init_stmts): Changed calls to finish_compound_expr and
15585         finish_stmt_expr to call genrtl_finish_compound_expr and
15586         genrtl_finish_stmt_expr when appropriate.
15587         (expand_default_init): Changed call to finish_expr_stmt to call
15588         genrtl_expr_stmt when appropriate.
15589         (build_vec_init): Likewise.
15591         * parse.y (simple_stmt): Removed first argument from call to
15592         finish_for_stmt. Removed first argument from call to
15593         finish_switch_stmt.
15595         * parse.c: Regenerated.
15597         * pt.c (tsubst_expr): Removed first argument from call to
15598         finish_for_stmt. Removed first argument from call to
15599         finish_switch_stmt.
15601 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
15603         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
15604         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
15606         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
15607         (cplus_tree_code_length[]): Likewise.
15608         (cplus_tree_code_name[]): Likewise.
15609         (init_parse): Added call to add_c_tree_codes. Changed
15610         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
15612 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
15614         * cp-tree.h (finish_mem_initializers): Declare.
15615         (count_trees): Likewise.
15616         * parse.y (base_init): Use finish_mem_initializers.
15617         * semantics.c (finish_mem_initializers): New function.
15619         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
15620         the number of trees.
15621         (n_trees): Remove.
15622         (count_trees): Don't use it.
15624 2000-06-15  Jason Merrill  <jason@redhat.com>
15626         * tree.c (count_trees): New debugging function.
15628         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
15629         * init.c (build_member_call): Pull out the name of a DECL.
15631         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
15632         * semantics.c (expand_body): Push to TV_INTEGRATION here.
15633         * optimize.c (optimize_function): Not here.
15634         * pt.c (instantiate_decl): Push to TV_PARSE.
15636 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
15638         * cp-tree.h (struct language_function): Remove x_base_init_list
15639         and x_member_init_list.
15640         (current_base_init_list): Remove.
15641         (current_member_init_list): Likewise.
15642         (setup_vtbl_ptr): Change prototype.
15643         (emit_base_init): Likewise.
15644         (expand_member_init): Likewise.
15645         (reinit_parse_for_function): Remove.
15646         * decl.c (save_function_data): Don't clear x_base_init_list and
15647         x_member_init_list.
15648         (mark_language_function): Don't mark them.
15649         * init.c (perform_member_init): Tweak comment.
15650         (sort_member_init): Take the list of initializers as an argument.
15651         (sort_base_init): Likewise.
15652         (emit_base_init): Likewise.
15653         (expand_member_init): Return the initializer.  Don't use global
15654         variables.
15655         * lex.c (reinit_parse_for_function): Remove.
15656         * method.c (build_template_parm_names): Correct substitution.
15657         (do_build_copy_constructor): Don't use current_member_init_list
15658         and current_base_init_list.
15659         (synthesize_method): Likewise.
15660         * parse.y (base_init): Split mem-initializers into
15661         base-initializers and field-initializers.
15662         (member_init_list): Build up the list here.
15663         (member_init): Return the initializer.
15664         (fn.depfn): Don't use reinit_parse_for_function.
15665         * parse.c: Regenerated.
15666         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
15667         ERROR_MARK.
15668         (tsubst_expr): Don't use current_member_init_list
15669         and current_base_init_list.
15670         (tsubst_expr_values): Rename to ...
15671         (tsubst_initializer_list): ... this.  Use convert_from_reference.
15672         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
15673         and current_base_init_list.
15674         (begin_function_definition): Don't call reinit_parse_for_function.
15676         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
15678         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
15679         correctly.
15681         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
15683 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
15685         * cp-tree.h (IF_COND): Move to c-common.h.
15686         (THEN_CLAUSE): Likewise.
15687         (ELSE_CLAUSE): Likewise.
15688         (WHILE_COND): Likewise.
15689         (WHILE_BODY): Likewise.
15690         (DO_COND): Likewise.
15691         (DO_BODY): Likewise.
15692         (RETURN_EXPR): Likewise.
15693         (EXPR_STMT_EXPR): Likewise.
15694         (FOR_INIT_STMT): Likewise.
15695         (FOR_COND): Likewise.
15696         (FOR_EXPR): Likewise.
15697         (FOR_BODY): Likewise.
15698         (SWITCH_COND): Likewise.
15699         (SWITCH_BODY): Likewise.
15700         (CASE_LOW): Likewise.
15701         (CASE_HIGH): Likewise.
15702         (GOTO_DESTINATION): Likewise.
15703         (COMPOUND_BODY): Likewise.
15704         (ASM_CV_QUAL): Likewise.
15705         (ASM_STRING): Likewise.
15706         (ASM_OUTPUTS): Likewise.
15707         (ASM_INPUTS): Likewise.
15708         (ASM_CLOBBERS): Likewise.
15709         (DECL_STMT_DECL): Likewise.
15710         (STMT_EXPR_STMT): Likewise.
15711         (LABEL_STMT_LABEL): Likewise.
15712         (SCOPE_BEGIN_P): Likewise.
15713         (SCOPE_END_P): Likewise.
15714         (SCOPE_STMT_BLOCK): Likewise.
15715         (SCOPE_NULLIFIED_P): Likewise.
15716         (SCOPE_NO_CLEANUPS_P): Likewise.
15717         (SCOPE_PARTIAL_P): Likewise.
15718         (ASM_VOLATILE_P): Likewise.
15719         (STMT_LINENO): Likewise.
15720         (STMT_LINENO_FOR_FN_P): Likewise.
15722         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
15723         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
15724         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
15725         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
15726         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
15728         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
15730         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
15731         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
15733         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
15734         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
15735         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
15737 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
15739         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
15740         * class.c (dfs_find_final_overrider): Set it appropriately.
15741         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
15742         avoid unneeded secondary vptrs.
15744 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
15746         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
15747         (check_bitfield_decl, check_field_decl): Likewise.
15748         (build_vtbl_or_vbase_field, build_base_field): Likewise.
15749         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
15750         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
15751         (xfer_tag, finish_enum): Likewise.
15752         * decl2.c (finish_builtin_type): Likewise.
15753         * init.c (init_init_processing): Likewise.
15754         * pt.c (instantiate_class_template): Likewise.
15755         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
15756         * cp-tree.h (struct lang_type): Add user_align member.
15757         (CLASSTYPE_USER_ALIGN): Define.
15759 2000-06-13  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
15761         * Make-lang.in (c++.install-common): Install g++-cross in
15762         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
15763         $(target_alias)-g++ and $(target_alias)-c++.
15765 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
15767         * class.c (vcall_offset_data_s): Add last_init and fns.
15768         (overrides): Rename to same_signature_p.
15769         (dfs_find_final_overrider): Adjust accordingly.
15770         (mark_overriders): Likewise.
15771         (warn_hidden): Likewise.
15772         (build_vtbl_initializer): Reorganize machinery for building things
15773         at negative offsets.
15774         (build_vcall_and_vbase_vtbl_entries): Likewise.
15775         (build_vbase_offset_vtbl_entries): Likewise.
15776         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
15777         offset entries.  Do not create two entries for functions with the
15778         same signature.
15779         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
15780         (build_rtti_vtbl_entries): Reorganize machinery for building things
15781         at negative offsets.
15783         * optimize.c (expand_call_inline): Don't recurse into the code
15784         used to initialize the parameters more than once.
15786 2000-06-11  Mark Mitchell <mark@codesourcery.com>
15788         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
15789         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
15790         (find_substitution): Only use the `Sa' substitution for
15791         std::allocator, not instantiations of it.
15792         (write_template_prefix): Move comment.  Only use a TREE_LIST to
15793         represent substitutions for a member template.
15794         (write_array_type): Mangle array dimensions correctly.
15795         * optimize.c (maybe_clone_body): Copy more information from the
15796         cloned function.
15797         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
15798         on the regenerated declaration.
15800 2000-06-11  Chip Salzenberg  <chip@valinux.com>
15801             Mark Mitchell <mark@codesourcery.com>
15803         * class.c (build_vtable): Clarify comment.
15804         (build_ctor_vtbl_group): Pass the most derived type to
15805         build_vtable.
15807 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15809         * decl2.c (compare_options): Don't needlessly cast away const-ness.
15811 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
15813         * decl.c (add_binding): Handle duplicate declarations of external
15814         variables.
15816 2000-06-09  Chip Salzenberg  <chip@valinux.com>
15817             Mark Mitchell <mark@codesourcery.com>
15819         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
15820         argument.
15821         (write_signed_number): New macro.
15822         (write_unsigned_number): Likewise.
15823         (write_source_name): Use them.
15824         (write_number): Handle signed and unsigned values.
15825         (write_integer_cst): Use tree_int_cst_sgn, and use
15826         write_unsigned_number or write_signed_number as appropriate.
15827         (write_discriminator): Use write_unsigned_number or
15828         write_signed_number as appropriate.
15829         (write_template_arg_literal): Likewise.
15830         (write_array_type): Use tree_low_cst.
15831         (write_template_parm):  Use write_unsigned_number or
15832         write_signed_number as appropriate.
15833         (write_substitution): Adjust call to write_number.
15834         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
15835         (write_expression): Handle non-type template arguments of
15836         reference type correctly.
15837         (mangle_thunk): Use write_signed_number.
15839 2000-06-09  Chip Salzenberg  <chip@valinux.com>
15841         * mangle.c (find_substition): Don't mangle objects with typename
15842         substitutions (e.g. "cin" as "Si").
15844 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
15846         * call.c (add_candidate): Use ggc_alloc_cleared.
15847         * decl.c (lookup_label): Likewise.
15848         * lex.c (retrofit_lang_decl): Likewise.
15850 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
15852         * semantics.c (expand_body): Push to TV_EXPAND.
15853         * optimize.c (optimize_function): Push to TV_INTEGRATION.
15854         * decl.c (start_function): Always call announce_function.
15856         * tinfo2.cc: Just declare abort.
15858 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
15860         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
15861         whenever @ is a symbolic name.
15863 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
15865         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
15867 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
15869         * decl.c (pushdecl): Look up functions by DECL_NAME, not
15870         DECL_ASSEMBLER_NAME.
15872 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
15874         * decl2.c (c_language): Define.
15876 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
15878         * lex.c (lang_init_options): Tweak.
15880         * decl2.c: Remove #inclusion of diagnostic.h
15881         (lang_decode_option): Move diagnostic formatting options to
15882         toplevel.
15884         * lang-options.h: Remove documentation for diagnostic options.
15886         * Makefile.in (lex.o): Depends upon diagnostic.h
15888 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
15890         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
15891         the same DECL_RESULT, it's not a redefinition.
15892         * pt.c (tsubst_decl): Remove code to handle illegal
15893         specializations.
15895 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
15897         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
15899 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
15901         * search.c (maybe_suppress_debug_info): Don't check
15902         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
15904         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
15905         here if extern_p.
15907         Remember instantiation context in deferred instantiations.
15908         * cp-tree.h (struct tinst_level): Remove.
15909         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
15910         * pt.c (current_tinst_level): Now a tree.
15911         (print_template_context, push_tinst_level, pop_tinst_level,
15912         tinst_for_decl): Adjust.
15913         (reopen_tinst_level): New fn.
15914         (init_pt): Register current_tinst_level as a root.
15915         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
15916         of the pending templates list.
15917         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
15918         * lex.c (extract_interface_info): Adjust.
15919         * decl2.c (warn_if_unknown_interface): Adjust.
15921 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
15923         * class.c (indirect_primary_base_p): New function.
15924         (determine_primary_base): Use it.
15926 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
15928         Update new-abi dynamic cast algorithm.
15929         * tinfo.cc (__class_type_info::__dyncast_result): Add
15930         whole_details. Adjust constructor.
15931         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
15932         Avoid unnecessary searching.
15933         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
15935 2000-06-05  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15937         * decl.c (init_decl_processing): Don't call record_component_aliases.
15938         * tree.c (build_cplus_array_type_1): Likewise.
15940 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
15942         * ir.texi: Correct typo.
15943         * mangle.c (write_expression): Handle non-type template arguments
15944         with reference type.
15945         * method.c (build_overload_value): Likewise.
15946         * pt.c (convert_nontype_argument): Explicitly represent conversion
15947         to a reference with an ADDR_EXPR.
15948         (unify): Always unify arguments in left-to-right order.
15950 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
15951             Mark Mitchell  <mark@codesourcery.com>
15953         * Make-lang.in (CXX_SRCS): Add mangle.c.
15954         * Makefile.in (CXX_OBJS): Add mangle.o.
15955         (mangle.o): New rule.
15957         * class.c (local_classes): New variable.
15958         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
15959         (get_vtt_name): Use mangle_vtt_name for new ABI.
15960         (init_class_processing): Initialize local_classes.
15961         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
15962         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
15963         (std_identifier): New macro.
15964         (DECL_VOLATILE_MEMFUNC_P): New macro.
15965         (DECL_NAMESPACE_STD_P): Likewise.
15966         (local_classes): Declare.
15967         (get_mostly_instantiated_function_type): Declare.
15968         (init_mangle): Declare.
15969         (mangle_decl): Likewise.
15970         (mangle_type_string): Likewise.
15971         (mangle_type): Likewise.
15972         (mangle_typeinfo_for_type): Likewise.
15973         (mangle_typeinfo_string_for_type): Likewise.
15974         (mangle_vtbl_for_type): Likewise.
15975         (mangle_vtt_for_type): Likewise.
15976         (mangle_ctor_vtbl_for_type): Likewise.
15977         (mangle_thunk): Likewise.
15978         (mangle_conv_op_name_for_type): Likewise.
15979         (mangle_guard_variable): Likewise.
15980         * decl.c (pushtag): Keep track of local classes.
15981         (initialize_predefined_identifiers): Initialize std_identifier.
15982         (init_decl_processing): Use std_identifier.
15983         (start_decl): Don't treat instantiations as specializations.
15984         (grokdeclarator): Likewise.
15985         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
15986         name for fully-instantiated templates.
15987         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
15988         destructors with the new ABI.
15989         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
15990         (grokfield): Use mangle_type for new ABI.
15991         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
15992         (get_sentry): Use mangle_guard_variable for new ABI.
15993         (start_static_initialization_or_destruction): Likewise.
15994         * expr.c (extract_aggr_init): Remove.
15995         (extract_scalar_init): Likewise.
15996         (extract_init): Remove #if 0'd code.
15997         * mangle.c: New function.
15998         * method.c (build_mangled_name): Assert not flag_new_abi.
15999         (build_static_name): Likewise.
16000         (build_decl_overload_real): Likewise.
16001         (build_typename_overload): Likewise.
16002         (build_overload_with_type): Likewise.
16003         (build_overload_name): Likewise.
16004         (get_ctor_vtbl_name): Likewise.
16005         (start_squangling): Likewise.
16006         (get_id_2): Likewise.
16007         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
16008         (init_method): Call init_mangle for new ABI.
16009         (make_thunk): Call mangle_thunk for new ABI.
16010         * operators.def: Correct new ABI manglings for the `%' operator.
16011         Add `::' operator.
16012         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
16013         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
16014         (lookup_template_class): Call mangle_decl for new ABI.
16015         (get_mostly_instantiated_function_type): New function.
16016         (set_mangled_name_for_template_decl): Use it.
16017         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
16018         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
16019         conversion op names.
16020         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
16021         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
16022         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
16023         mangle_typeinfo_string_for_type.
16025 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
16027         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
16028         (INNERMOST_TEMPLATE_ARGS): New macro.
16029         (innermost_args): Remove.
16030         (get_innermost_template_args): New function.
16031         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
16032         * error.c (dump_function_decl): Be caution when using
16033         most_general_template.
16034         * method.c (build_template_parm_names):  Use
16035         INNERMOST_TEMPLATE_ARGS.
16036         * pt.c (add_to_template_args): Tidy comment
16037         (get_innermost_template_args): New function.
16038         (check_explicit_specialization): Clear DECL_INITIAL for a new
16039         specialization.
16040         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
16041         Tidy.
16042         (push_template_decl): Always register specializations of the most
16043         general template.
16044         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
16045         (coerce_template_parms): Likewise.
16046         (lookup_template_class): Likewise.
16047         (innermost_args): Remove.
16048         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
16049         (tsubst_decl): Handle tricky specializations.  Use
16050         get_innermost_template_args.
16051         (instantiate_template): Simplify handling of partial
16052         instantiations.
16053         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
16054         (most_general_template): Reimplement, in a more straightforward
16055         manner.
16056         (regenerate_decl_from_template): Tweak formatting.  Use
16057         TMPL_ARGS_DEPTH for clarity.
16058         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
16060         * dump.c (dequeue_and_dump): Dump information about thunks.
16062 2000-06-01  Richard Henderson  <rth@cygnus.com>
16064         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
16066 2000-06-01  Richard Henderson  <rth@cygnus.com>
16068         * decl2.c (unsupported_options): Fix typo, make const.
16069         (lang_decode_option): Fix bsearch argument order.
16071 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
16073         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
16074         on FIELD_DECLs.
16076 2000-05-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16078         * cp-tree.h (c_get_alias_set): Deleted.
16079         * Makefile.in (decl.o): Include ../expr.h.
16080         * decl.c (expr.h): Include.
16081         (init_decl_processing): Call record_component_aliases for arrays.
16082         (grokdeclarator): Likewise.
16083         Set TREE_ADDRESSABLE for fields that aren't bitfields.
16084         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
16086 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
16088         Remove guiding declaration support.
16089         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
16090         (flag_guiding_decls): Remove.
16091         * call.c (build_user_type_conversion_1): Remove support for
16092         guiding decls.
16093         (build_new_function_call): Likewise.
16094         (build_new_op): Likewise.
16095         (build_new_method_call): Likewise.
16096         * decl.c (start_function): Likewise.
16097         * friend.c (is_friend): Likewise.
16098         (do_friend): Likewise.
16099         * decl2.c ((flag_dump_translation_unit): Make it const.
16100         (flag_guiding_decls): Remove.
16101         (unsupported_options): New variable
16102         (compare_options): New function.
16103         (lang_decode_option): Use them.
16105         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
16107         * method.c (mangle_expression): Adjust test for legal expression
16108         operators.
16110         * pt.c (instantiate_decl): Save and restore the local
16111         specializations list.
16113 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
16115         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
16117 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
16119         * call.c (add_template_candidate_real): Handle member template
16120         constructors for classes with virtual bases.
16121         (build_user_type_conversion_1): Use in_charge_arg_for_name.
16122         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
16124         * ir.texi: Update thunk documentation.
16126         * call.c (joust): Fix handling of overloaded builtin operators.
16128 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
16130         * cp-tree.h (DECL_ANTICIPATED): New macro.
16131         Document new use of DECL_LANG_FLAG_7.
16132         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
16133         in the user namespace.
16134         * lex.c (do_identifier): If the identifier's declaration has
16135         DECL_ANTICIPATED on, it has not yet been declared.  But do not
16136         replace it with an ordinary implicit declaration.
16138         * tinfo2.cc: Include stdlib.h.
16140 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
16142         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
16143         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
16144         CLASSTYPE_ALIGN.
16146 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
16148         * decl2.c (lang_decode_option): Use skip_leading_substring instead
16149         of plain strncmp.
16151 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
16153         * operators.def (<?): Duplicated, should have been...
16154         (>?): this.  Fixed.
16156 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
16157             Mark Mitchell  <mark@codesourcery.com>
16159         * cp-tree.h (ansi_opname): Make it a macro.
16160         (ansi_assopname): Likewise.
16161         (struct lang_decl_flags): Add assignment_operator_p.
16162         (struct lang_decl): Add operator_code.
16163         (DECL_VTT_PARM): Adjust.
16164         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
16165         overloaded operator.
16166         (SET_OVERLOADED_OPERATOR_CODE): New macro.
16167         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
16168         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
16169         (opname_tab): Remove.
16170         (assignop_tab): Likewise.
16171         (operator_name_info_t): New type.
16172         (operator_name_info): New variable.
16173         (assignment_operator_name_info): Likewise.
16174         (build_cp_library_fn): Remove declaration.
16175         (push_cp_library_fn): Likewise.
16176         (operator_name_string): Likewise.
16177         (build_decl_overload): Likewise.
16178         * call.c (print_z_candidates): Simplify.
16179         (build_object_call): Adjust usage of ansi_opname.  Use
16180         DECL_OVERLOADED_OPERATOR_P.
16181         (op_error): Adjust operator name lookup.
16182         (build_conditional_expr): Adjust usage of ansi_opname.
16183         (build_new_op): Likewise.
16184         (build_op_delete_call): Likewise.
16185         (build_over_call): Likewise.
16186         (joust): Use DECL_OVERLOADED_OPERATOR_P.
16187         * decl.c (duplicate_decls): Copy operator_code.
16188         (init_decl_processing): Adjust parameters to push_cp_library_fn.
16189         (builtin_function): Adjust parameters to build_library_fn_1.
16190         (build_library_fn_1): Accept an overloaded operator code.
16191         (build_library_fn): Pass ERROR_MARK.
16192         (build_cp_library_fn): Accept an overloaded operator code.
16193         (push_cp_library_fn): Likewise.
16194         (grokfndecl): Tweak.
16195         (grokdeclarator): Simplify code to compute names of overloaded
16196         operators.  Adjust use of ansi_opname.
16197         (ambi_op_p): Work on tree_codes, not identifiers.
16198         (unary_op_p): Likewise.
16199         (grok_op_properties): Likewise.
16200         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
16201         (lang_mark_tree): Don't try to mark the operator_code.
16202         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
16203         * error.c (dump_decl): Remove special handling for operator
16204         names.
16205         (dump_function_name): Likewise.
16206         (dump_expr): Adjust name lookup of operators.
16207         (op_to_string): Simplify.
16208         (assop_to_string): Likewise.
16209         * init.c (build_new_1): Adjust use of ansi_opname.
16210         * lex.c (opname_tab): Remove.
16211         (assignop_tab): Likewise.
16212         (ansi_opname): Likewise.
16213         (ansi_assopname): Likewise.
16214         (operator_name_string): Likewise.
16215         (reinit_lang_specific): Likewise.
16216         (operator_name_info): New variable.
16217         (assignment_operator_name_info): Likewise.
16218         (init_operators): New function.
16219         (init_parse): Use it.
16220         (do_identifier): Adjust use of ansi_opname.
16221         * method.c (mangle_expression): Don't use ansi_opname for
16222         mangling.
16223         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
16224         (build_decl_overload): Remove.
16225         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
16226         (do_build_assign_ref): Adjust use of ansi_opname.
16227         (synthesize_method): Likewise.
16228         (implicitly_declare_fn): Likewise.
16229         * operators.def: New file.
16230         * parse.y (operator): Adjust use of ansi_opname.
16231         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
16232         (set_mangled_name_for_template_decl): Don't play games with
16233         current_namespace.
16234         (special_function_p): Adjust use of ansi_opname.
16235         * typeck.c (check_return_expr): Likewise.
16236         * Make-lang.in (cc1plus): Depend on operators.def.
16237         * Makefile.in (lex.o): Likewise.
16238         (decl.o): Likewise.
16240 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
16242         * Make-lang.in (cplib2.ready): Eradicate.
16244 2000-05-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
16246         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
16247         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
16248         (built_min, cp_tree_equal): Likewise.
16250 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
16252         * class.c (layout_nonempty_base_or_field): Replace
16253         `record_layout_info' with `record_layout_info_s'.
16255 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
16257         Fix goto checking.
16258         * cp-tree.h (struct language_function): x_named_labels is now
16259         a struct named_label_list*.
16260         * decl.c (struct named_label_use_list): Renamed from...
16261         (struct named_label_list): ...this.  New struct.
16262         (push_binding_level): Don't set eh_region.
16263         (note_level_for_eh): New fn.
16264         (pop_label): Take label and old value directly.
16265         (pop_labels): Adjust for new named_labels format.
16266         (lookup_label): Likewise.
16267         (poplevel): Note characteristics of a binding level containing a
16268         named label.  Mess with named label lists earlier.
16269         (mark_named_label_lists): New fn.
16270         (mark_lang_function): Call it.
16271         (use_label): New fn, split out from...
16272         (make_label_decl): ...here.  Don't call it.
16273         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
16274         check_previous_gotos): New fns, split out from...
16275         (define_label): ...here.
16276         (check_switch_goto): New fn.
16277         (define_case_label): Call it.
16278         (check_goto): New fn.
16279         * semantics.c (finish_goto_stmt): Call it and use_label.
16280         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
16281         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
16283 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
16285         * class.c (build_vtable_entry_ref): Correct usage of
16286         get_vtbl_decl_for_binfo.
16288         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
16289         * method.c (implicitly_declare_fn): Not here.
16291 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
16293         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
16294         (CPTI_PTMD_DESC_TYPE): ... here.
16295         (ptmd_desc_type_node): Rename to ...
16296         (ptm_desc_type_node): ... here.
16297         * decl.c: Likewise.
16298         * rtti.c (ptmd_initializer): Rename to ...
16299         (ptm_initializer): ... here.
16300         (sythesize_tinfo_var): Adjust. Deal with pointer to member
16301         function.
16302         (create_tinfo_types): Adjust.
16304 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
16306         Finish implementation of VTTs.
16307         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
16308         CPTI_VTT_PARM_IDENTIFIER.
16309         (vtt_parm_identifier): New macro.
16310         (vtt_parm_type): Likewise.
16311         (BINFO_SUBVTT_INDEX): Likewise.
16312         (BINFO_VPTR_INDEX): Likewise.
16313         (struct lang_decl): Add vtt_parm.
16314         (DECL_VTT_PARM): New macro.
16315         (DECL_USE_VTT_PARM): Likewise.
16316         (DECL_NEEDS_VTT_PARM_P): Likewise.
16317         (get_vtt_name): Declare.
16318         (build_artificial_parm): Likewise.
16319         (fixup_all_virtual_upcast_offsets): Likewise.
16320         (expand_indirect_vtbls_init): Remove.
16321         * call.c (build_new_method_call): Pass the vtt to subobject
16322         constructors and destructors.
16323         * class.c (get_vtt_name): Give it external linkage.
16324         (build_clone): Handle the magic VTT parameters for clones.
16325         (clone_function_decl): Fix typo in comment.
16326         (build_vtt): Keep track of the indices in the VTTs where various
16327         entities are stored.
16328         (build_vtt_inits): Likewise.
16329         (dfs_build_vtt_inits): Likewise.
16330         (build_ctor_vtbl_group): Tweak type of construction vtables.
16331         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
16332         primary bases, when building construction vtables.
16333         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
16334         (initialize_predefined_identifiers): Add vtt_parm_identifier.
16335         (init_decl_processing): Initialize vtt_parm_type.
16336         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
16337         (lang_mark_tree): Make vtt_parm.
16338         * decl2.c (build_artificial_parm): New function.
16339         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
16340         (grokclassfn): Use build_artificial_parm.
16341         * init.c (initialize_vtbl_ptrs): Call
16342         fixup_all_virtual_upcast_offsets directly.
16343         (perform_member_init): Use the complete subobject destructor for
16344         member cleanups.
16345         (build_vtbl_address): New function.
16346         (expand_virtual_init): Handle VTTs.
16347         * optimize (maybe_clone_body): Likewise.
16348         * search.c (fixup_all_virtual_upcast_offsets): Give it external
16349         linkage.
16350         (expand_indirect_vtbls_init): Remove.
16351         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
16352         * tree.c (make_binfo): Make them bigger.
16354 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
16356         * inc/cxxabi.h (__pbase_type_info): Define, based on
16357         __pointer_type_info.
16358         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
16359         (__pointer_to_member_type_info): Likewise.
16360         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
16361         (__pointer_to_member_type_info::__is_pointer_p): Remove.
16362         (__pointer_type_info::__do_catch): Rename to ...
16363         (__pbase_type_info::__do_catch): ... here. Adjust.
16364         (__pbase_type_info::__pointer_catch): Implement.
16365         (__pointer_type_info::__pointer_catch): Adjust.
16366         (__pointer_to_member_type_info::__pointer_catch): Adjust.
16368 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
16370         * tinfo.h (__user_type_info::contained_virtual_p): New
16371         predicate.
16372         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
16373         shaped hierarchy.
16374         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
16375         diamond shaped hierarchy. Add early out for mixed diamond and
16376         duplicate shaped hierarchy.
16378 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
16380         * cp-tree.h (build_delete): Change prototype.
16381         (build_vec_delete): Likewise.
16382         * call.c (build_scoped_method_call): Use special_function_kind
16383         values to indicate the kind of destruction to be done.
16384         (build_method_call): Likewise.
16385         * decl.c (finish_destructor_body): Likewise.
16386         (maybe_build_cleanup_1): Likewise.  Rename to ...
16387         (maybe_build_cleanup): ... this.
16388         * decl2.c (delete_sanity): Use special_function_kind
16389         values to indicate the kind of destruction to be done.
16390         (build_cleanup): Likewise.
16391         * init.c (perform_member_init): Likewise.
16392         (build_vec_delete_1): Likewise.
16393         (build_dtor_call): Simplify.
16394         (build_delete): Use special_function_kind
16395         values to indicate the kind of destruction to be done.
16396         (build_vbase_delete): Likewise.
16397         (build_vec_delete): Likewise.
16399         * init.c (sort_member_init): Fix typo in error message generation
16400         code.
16402 2000-05-15  Donald Lindsay  <dlindsay@cygnus.com>
16404         * semantics.c (begin_class_definition): make the packed
16405         attribute be sensitive to the "-fpack-struct" command line flag
16407 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
16409         Update new-abi upcast algorithm.
16410         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
16411         prototype and meaning of return value.
16412         (__si_class_type_info::__do_upcast): Likewise.
16413         (__vmi_class_type_info::__do_upcast): Likewise.
16414         * tinfo.cc (__class_type_info::__upcast_result): Replace
16415         whole2dst with part2dst. Adjust ctor.
16416         (__class_type_info::__do_upcast): Adjust call of worker function.
16417         (__class_type_info::__do_upcast): Adjust.
16418         (__si_class_type_info::__do_upcast): Adjust. Use parent's
16419         __do_upcast.
16420         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
16421         virtual base in diamond hierarchy bug.
16423 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
16425         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
16426         and bitfield to tinfo_fn_p.
16427         (DECL_TINFO_FN_P): Adjust.
16428         (SET_DECL_TINFO_FN_P): Likewise.
16429         (DECL_MUTABLE_P): Likewise.
16430         (DECL_C_BIT_FIELD): Likewise.
16431         (SET_DECL_C_BIT_FIELD): Likewise.
16432         (CLEAR_DECL_C_BIT_FIELD): Likewise.
16433         (DECL_UNINLINABLE): Likewise.
16434         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
16435         (handle_using_decl): Remove assertion.
16436         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
16437         to build FIELD_DECLs.
16438         (build_base_field): Likewise.
16439         (layout_class_type): Likewise.
16440         * decl.c (init_decl_processing): Likewise.
16441         (build_ptrmemfunc_type): Likewise.
16442         (grokdeclarator): Likewise.
16443         * decl2.c (grok_x_components): Likewise.
16444         * except.c (call_eh_info): Likewise.
16445         * init.c (init_init_processing): Likewise.
16446         * rtti.c (expand_class_desc): Likewise.
16447         (create_pseudo_type_info): Likewise.
16448         (get_vmi_pseudo_type_info): Likewise.
16449         (create_tinfo_types): Likewise.
16450         * ptree.c (print_lang_decl): Adjust.
16451         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
16452         before checking DECL_MUTABLE_P.
16454         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
16455         parameters for template functions.
16456         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
16457         destructors as well as constructors.
16459 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
16461         * class.c (build_ctor_vtbl_group): Set inits.
16462         * optimize.c (maybe_clone_body): Set DECL_INLINE and
16463         DECL_THIS_INLINE appropriately for clones.
16465         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
16466         (DECL_CONV_FN_P): Simplify.
16467         (DECL_OPERATOR): Remove.
16468         (language_to_string): Declare.
16469         * decl.c (duplicate_decls): Fix typo in comment.
16470         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
16471         (grok_op_properties): Use DECL_CONV_FN_P instead of
16472         IDENTIFIER_TYPENAME_P.
16473         * dump.c (dequeue_and_dump): Dump the language linkage of
16474         declarations.
16475         * error.c (language_to_string): Give it external linkage.
16476         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
16477         (implicitly_declare_fn): Set DECL_LANGUAGE.
16478         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
16479         IDENTIFIER_TYPENAME_P.
16480         (tsubst_decl): Likewise.
16481         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
16482         * semantics.c (finish_member_declaration): Don't mark members of
16483         classes declared in an extern "C" region as extern "C".
16485 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16487         * decl2.c (qualified_lookup_using_namespace): Look through
16488         namespace aliases.
16490         * decl.c (push_using_decl): Return the old decl on namespace level.
16492 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
16494         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
16495         (VTT_NAME_PREFIX): New macro.
16496         (CTOR_VTBL_NAME_PREFIX): Likewise.
16497         (get_ctor_vtbl_name): New function.
16498         * class.c (get_vtable_name): Simplify.
16499         (get_vtt_name): New function.
16500         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
16501         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
16502         when a virtual base becomes primary.
16503         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
16504         VTTs.
16505         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
16506         additional parameters.
16507         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
16508         (initialize_array): New function.
16509         (build_vtt): Likewise.
16510         (build_vtt_inits): Likewise.
16511         (dfs_build_vtt_inits): Likewise.
16512         (dfs_fixup_binfo_vtbls): Likewise.
16513         (build_ctor_vtbl_group): Likewise.
16514         (initialize_vtable): Use initialize_array.
16515         (accumulate_vtbl_inits): Reimplement to handle construction
16516         vtables.
16517         (dfs_accumulate_vtbl_inits): Likewise.
16518         (bulid_vtbl_initializer): Adjust parameter name.
16519         * method.c (build_typename_overload): Remove #if 0'd code.
16520         (get_ctor_vtbl_name): New function.
16521         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
16522         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
16524         * cp-tree.h (struct lang_type): Remove search_slot.
16525         (CLASSTYPE_SEARCH_SLOT): Remove.
16526         (emit_base_init): Change prototype.
16527         (initialize_vtbl_ptrs): Likewise.
16528         (expand_indirect_vtbls_init): Likewise.
16529         (clear_search_slots): Remove.
16530         * decl.c (lang_mark_tree): Don't mark search_slot.
16531         * init.c (initialize_vtbl_ptrs): Simplify.
16532         (emit_base_init): Likewise.
16533         * search.c (struct vbase_info): Document decl_ptr.
16534         (convert_pointer_to_single_level): Remove.
16535         (dfs_find_vbases): Remove.
16536         (dfs_init_base_pointers): Simplify.
16537         (dfs_clear_vbase_slots): Remove.
16538         (dfs_vtable_path_unmark): New function.
16539         (init_vbase_pointers): Simplify.
16540         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
16541         (expand_indirect_vtbls_init): Simplify.  Don't call
16542         mark_all_temps_used.
16543         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
16544         initialize_vtbl_ptrs.
16546 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
16548         * except.c: Add static prototypes.
16550 2000-05-20  H.J. Lu  <hjl@gnu.org>
16552         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
16554 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
16556         Don't create a separate copy of virtual bases for the
16557         CLASSTYPE_VBASECLASSES list.
16558         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
16559         (BINFO_FOR_VBASE): Remove.
16560         (CANONICAL_BINFO): Adjust.
16561         (binfo_for_vbase): New function.
16562         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
16563         instead of BINFO_FOR_VBASE.
16564         (build_vbase_pointer): Likewise.
16565         (build_secondary_vtable): Likewise.
16566         (dfs_mark_primary_bases): Likewise.
16567         (mark_primary_bases): Likewise.
16568         (layout_nonempty_base_or_field): Likewise.
16569         (dfs_set_offset_for_shared_vbases): Likewise.
16570         (dfs_set_offset_for_unshared_vbases): Likewise.
16571         (layout_virtual_bases): Likewise.  Adjust for changes to the
16572         CLASSTYPE_VBASECLASSES list.
16573         (dump_class_hierarchy_r): Use binfo_for_vbase
16574         instead of BINFO_FOR_VBASE.
16575         (dump_class_hierarchy): Likewise.
16576         (finish_vtbls): Likewise.
16577         (build_vtbl_initializer): Adjust for changes to the
16578         CLASSTYPE_VBASECLASSES list.
16579         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
16580         * decl.c (finish_destructor_body): Adjust for changes to the
16581         CLASSTYPE_VBASECLASSES list.
16582         * init.c (sort_base_init): Use binfo_for_vbase.
16583         (construct_virtual_bases): Adjust for changes to the
16584         CLASSTYPE_VBASECLASSES list.
16585         (expand_member_init): Use binfo_for_vbase.
16586         (build_vbase_delete):  Adjust for changes to the
16587         CLASSTYPE_VBASECLASSES list.
16588         * method.c (do_build_copy_constructor): Likewise.
16589         * rtti.c (get_base_offset): Use binfo_for_vbase.
16590         (expand_class_desc): Remove #if 0'd code.
16591         * search.c (struct vbase_info): Remove vbase_types.
16592         (get_base_distance):  Use binfo_for_vbase.
16593         (lookup_field_queue_p): Use CANONICAL_BINFO.
16594         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
16595         (get_pure_virtuals): Adjust for changes to the
16596         CLASSTYPE_VBASECLASSES list.
16597         (dfs_find_vbases): Use binfo_for_vbase.
16598         (dfs_init_vbase_pointers): Likewise.
16599         (init_vbase_pointers): Don't initialize vi.vbase_types.
16600         (virtual_context): Use binfo_for_vbase.
16601         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
16602         CLASSTYPE_VBASECLASSES list.
16603         (expand_indirect_vtbls_init): Simplify.
16604         (dfs_get_vbase_types): Don't replicate virtual bases.
16605         (find_vbase_instance): Use binfo_for_vbase.
16606         (binfo_for_vbase): New function.
16607         * typeck.c (get_delta_difference): Use binfo_for_vbase.
16609 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
16611         * decl2.c (finish_anon_union): Generalize error messages to handle
16612         anonymous structures.
16613         * init.c (perform_member_init): Remove `name' parameter.
16614         (build_field_list): New function.
16615         (sort_member_init): Handle anonymous union initialization order
16616         correctly.  Check for multiple initializations of the same union.
16617         (emit_base_init): Don't look up fields by name here.
16618         (expand_member_init): Record the result of name lookup for future
16619         reference.
16620         * typeck.c (build_component_ref): Fix formatting.
16622 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
16624         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
16625         * typeck.c (build_x_compound_expr): Replace warn_unused with
16626         warn_unused_value.
16628         * decl2.c (lang_decode_option): Update -Wall unused flags by
16629         calling set_Wunused.
16631 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
16633         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
16634         * init.c (dfs_vtable_path_unmark): Remove.
16635         * search.c (marked_new_vtable_p): Likewise.
16636         (unmarked_new_vtable_p): Likewise.
16637         (dfs_search_slot_nonempty_p): Likewise.
16638         (dfs_mark): Likewise.
16639         (dfs_vtable_path_unmark): Likewise.
16640         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
16641         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
16642         (dfs_init_vbase_pointers): Remove special-case new ABI code.
16643         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
16644         (init_vbase_pointers): Simplify.
16645         (expand_indirect_vtbls_init): Likewise.
16647         * class.c (copy_virtuals): New function.
16648         (build_primary_table): Use it.
16649         (build_secondary_vtable): Likewise.
16650         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
16651         indicate that no vcall offset is required.
16652         (add_virtual_function): Likewise.
16653         (modify_all_vtables): Likewise.
16654         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
16655         (dfs_accumulate_vtbl_inits): Likewise.
16656         (build_vtbl_initializer): Make changes to handle construction
16657         vtables.
16658         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16659         (build_rtti_vtbl_entries): Likewise.
16660         (build_vtable_entries): Handle a NULL vcall_index.
16662 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
16664         * decl2.c (lang_decode_option): Fix thinko.
16666 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
16668         * except.c (check_handlers): New fn.
16669         * cp-tree.h: Declare it.
16670         * semantics.c (finish_handler_sequence): Call it.
16671         (finish_function_handler_sequence): Likewise.
16672         (finish_handler_parms): Set TREE_TYPE on the handler.
16673         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
16674         * search.c (get_base_distance_recursive): If protect>1, ignore
16675         special access.
16676         (get_base_distance): Don't reduce watch_access.
16678 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
16680         * lex.c: #include diagnostic.h.
16681         (lang_init_options): Set default prefixing rules.
16683         * lang-options.h: Add -fdiagnostics-show-location=.
16685         * decl2.c: #include diagnostic.h.
16686         (lang_decode_option): Handle -fdiagnostics-show-location=.
16688 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
16690         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
16691         * vec.cc: Revert my 2000-05-07 change.
16693 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
16695         * class.c (check_field_decls): Complain about non-static data
16696         members with same name as class in class with constructor.
16698 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
16700         * decl.c (grokdeclarator): Allow non-static data members with
16701         same name as class.
16703 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
16705         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
16706         and pending_inline.filename.  Update prototypes.
16707         * decl.c (define_label): Constify filename parameter.
16708         * decl2.c (warn_if_unknown_interface): Constify local char *.
16709         * input.c Constify input_source.filename. Don't declare
16710         input_filename or lineno.  Constify filename parameter to feed_input.
16711         * lex.c (init_parse): Constify parameter and return value.
16712         (cp_pragma_interface, cp_pragma_implementation): Constify
16713         filename argument.
16714         (reinit_parse_for_method, reinit_parse_for_block,
16715         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
16716         Constify local char *.
16717         * pt.c: Don't declare lineno or input_filename.
16718         (print_template_context, tsubst_friend_function, tsubst_decl,
16719         tsubst, instantiate_decl): Constify local char *.
16720         * semantics.c (expand_body): Constify local char *.
16721         * tree.c (build_srcloc): Constify filename parameter.
16722         * typeck.c (c_expand_asm_operands): Constify filename
16723         parameter.
16725 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
16727         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
16728         offsetof expansion.
16730 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
16732         * inc/cxxabi.h:  Fix typos in comment.
16733         (__base_class_info::__offset): Use a static_cast.
16735 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
16737         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
16738         of std::size_t and std::ptrdiff_t respectively.
16739         * tinfo.cc: Likewise.
16740         * vec.cc: Likewise.
16742 2000-05-06  Richard Henderson  <rth@cygnus.com>
16744         * typeck.c (build_c_cast): Don't warn integer->pointer size
16745         mismatch for constants.
16747 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
16749         * rtti.c (ptmd_initializer): Set non-public, if class is
16750         incomplete.
16752         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
16753         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16754         __cxa_vec_delete): Likewise.
16755         * tinfo.cc (__dynamic_cast): Likewise.
16756         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
16757         __cxa_vec_delete): Likewise.
16759 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
16761         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
16762         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
16763         (lang_decl_flags): Add vcall_offset.
16764         (THUNK_VCALL_OFFSET): Use it.
16765         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
16766         * method.c (make_thunk): Create the lang_decl here, not in
16767         emit_thunk.
16768         (emit_thunk): Make generic thunks into ordinary functions once
16769         they have been fed to expand_body.
16770         * semantics.c (expand_body): Set current_function_is_thunk here.
16772 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16774         * class.c (update_vtable_entry_for_fn): Prototype.
16776         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
16777         and `tmpl'.
16779         * search.c (dfs_build_inheritance_graph_order): Prototype.
16781 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
16783         * cp-tree.h (special_function_kind): Add various kinds of
16784         destructors.
16785         (special_function_p): New function.
16786         * class.c (overrides): Don't let one kind of destructor override
16787         another.
16788         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
16789         whether or not to instantiate a template.
16790         * tree.c (special_function_p): Define.
16792 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
16794         * cp-tree.def (THUNK_DECL): Remove.
16795         * cp-tree.h (DECL_THUNK_P): New macro.
16796         (DECL_NON_THUNK_FUNCTION_P): Likewise.
16797         (DECL_EXTERN_C_FUNCTION_P): Likewise.
16798         (SET_DECL_THUNK_P): Likewise.
16799         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
16800         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
16801         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
16802         * decl.c (decls_match): Use DECL_EXTERN_C_P.
16803         (duplicate_decls): Likewise.
16804         (pushdecl): Likewise.  Adjust thunk handling.
16805         (grokfndecl): Use DECL_EXTERN_C_P.
16806         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
16807         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
16808         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
16809         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
16810         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
16811         DECL_NO_STATIC_CHAIN.
16812         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
16813         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
16814         * search.c (covariant_return_p): Remove THUNK_DECL handling.
16815         * ir.texi: Update.
16817 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
16819         * tree.c (walk_tree): Set lineno.
16821 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
16823         * exception.cc: Update license notice.
16824         * new.cc: Likewise.
16825         * new1.cc: Likewise.
16826         * new2.cc: Likewise.
16827         * tinfo.cc: Likewise.
16828         * tinfo2.cc: Likewise.
16829         * vec.cc: Likewise.
16830         * inc/cxxabi.h: Likewise.
16831         * inc/exception: Likewise.
16832         * inc/new: Likewise.
16833         * inc/new.h: Likewise.
16834         * inc/typeinfo: Likewise.
16836 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
16838         * tree.c (build_target_expr_with_type): If we already have a
16839         TARGET_EXPR, just return it.
16841         * optimize.c (initialize_inlined_parameters): Don't generate an
16842         EXPR_STMT if we can just use DECL_INITIAL.
16843         * decl.c (emit_local_var): Only make the initialization a
16844         full-expression if stmts_are_full_exprs_p.
16846 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
16848         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
16849         macro.
16850         * call.c (standard_conversion): Use it.
16851         (direct_reference_binding): Likewise.
16852         (build_over_call): Likewise.
16853         (is_properly_derived_from): Likewise.
16854         (compare_ics): Likewise.
16855         * class.c (resolves_to_fixed_type_p): Likewise.
16856         * optimize.c (declare_return_variable): Likewise.
16857         * pt.c (is_specialization_of): Likewise.
16858         (unify): Likewise.
16859         * typeck.c (comp_target_parms): Likeiwse.
16860         (build_static_cast): Likewise.
16861         (build_reinterpret_cast): Likewise.
16862         (build_const_cast): Likewise.
16863         (comp_ptr_ttypes_real): Likewise.
16864         (comp_ptr_ttypes_const): Likewise.
16865         * typeck2.c (process_init_constructor): Likewise.
16867 2000-04-30  Scott Snyder <snyder@fnal.gov>
16869         * decl.c (finish_destructor_body): Use the base destructor when
16870         destroying virtual bases.
16872 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
16874         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
16875         STMT_EXPRs.
16876         * optimize.c (struct inline_data): Add target_exprs field.
16877         (declare_return_variable): When a function returns an aggregate,
16878         use the variable declared in the TARGET_EXPR as the remapped
16879         DECL_RESULT.
16880         (expand_call_inline): Update the pending target_exprs stack.
16881         (optimize_function): Initialize the stack.
16883         * decl2.c (finish_file): Fix typo in comment.
16885         * method.c (emit_thunk): Don't try to return a `void' value.
16887         * optimize.c (initialize_inlined_parameters): If the parameter is
16888         addressable, we need to make a new VAR_DECL, even if the
16889         initializer is constant.
16891 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
16893         * decl.c (grok_op_properties): Add an extra check of argtypes.
16895 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
16897         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
16898         variables.
16899         (initialize_inlined_parameters): Try to avoid creating new
16900         VAR_DECLs.
16902 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
16904         * lex.c (my_get_run_time): Remove.
16905         (init_filename_times): Use get_run_time instead of my_get_run_time.
16906         (check_newline): Likewise.
16907         (dump_time_statistics): Likewise.
16908         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
16909         of computing elapsed time explicitly.
16911 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
16913         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
16914         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
16915         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
16916         before calling decl_constant_value.
16917         * class.c (check_bitfield_decl): Likewise.
16918         * cvt.c (ocp_convert): Likewise.
16919         (convert): Likewise.
16920         * decl.c (compute_array_index_type): Likewise.
16921         (build_enumerator): Likewise.
16922         * decl2.c (check_cp_case_value): Likewise.
16923         * pt.c (convert_nontype_argument): Likewise.
16924         (tsubst): Likewise.
16925         * typeck.c (decay_conversion): Likewise.
16926         (build_compound_expr): Likewise.
16927         (build_reinterpret_cast): Likewise.
16928         (build_c_cast): Likewise.
16929         (convert_for_assignment): Likewise.
16931 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
16933         * decl.c (finish_function): Don't play games with DECL_INLINE.
16935 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
16937         * ir.texi: Correct typo.
16939 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16941         * decl.c (grokdeclarator): Reject VLAs as members.
16943 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
16945         * call.c (standard_conversion): Accept conversion between
16946         COMPLEX_TYPEs.
16948         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
16950 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
16952         * decl2.c (finish_file): Remove double setup for accounting
16953         compile time.
16955 2000-04-24  Robert Lipe <robertlipe@usa.net>
16957         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
16959 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
16961         * new.cc (set_new_handler): Needs to be in std::.
16963 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
16965         * cp-tree.h (lang_decl): Remove pretty_function_p.
16966         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
16967         language-specific node.
16968         * decl.c (cp_make_fname_decl): Use build_decl, not
16969         build_lang_decl, to build the variables.
16970         (grokvardecl): Don't call build_lang_decl for local variables in
16971         templates.
16972         (grokdeclarator): Don't call build_lang_decl for local type
16973         declarations in templates.
16974         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
16975         zero'd memory, rather than calling memset.
16976         * pt.c: Include hashtab.h.
16977         (local_specializations): New variable.
16978         (retrieve_local_specialization): Use it.
16979         (register_local_specialization): Likewise.
16980         (tsubst_decl): Don't assume local variables have
16981         DECL_LANG_SPECIFIC.
16982         (instantiate_decl): Set up local_specializations.
16983         * Makefile.in (HTAB_H): New variable.
16985 2000-04-23  Richard Henderson  <rth@cygnus.com>
16987         * typeck.c (c_expand_asm_operands): Restore the original
16988         contents of the output list.
16990 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
16992         * ir.texi:  Document complex number representation.
16994 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
16996         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
16997         (target_incomplete_p): New function.
16998         (tinfo_base_init): Create comdat NTBS name variable.
16999         (ptr_initializer): Add non_public parameter. Calculate it.
17000         (ptmd_initializer): Likewise.
17001         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
17002         (create_real_tinfo_var): Add non_public parameter. Use it.
17003         Push proxy into global namespace.
17004         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
17005         New enumeration.
17006         * inc/typeinfo (type_info::before, type_info::operator==):
17007         Compare __name addresses.
17009         * tinfo2.cc: Remove new-abi builtins comment.
17011 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
17013         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
17015         * call.c (joust): Exit early if we get the same function, too.
17017         * decl2.c (key_method): Return NULL_TREE for template classes.
17018         (import_export_class): Don't need to check for template classes.
17020 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
17022         * lex.c: Remove references to cccp.c.
17024 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
17026         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
17027         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
17028         (DECL_DESTRUCTOR_P): Use destructor_attr.
17029         (DECL_CONST_MEMFUNC_P): Reimplement.
17030         (DECL_VOLATILE_MEMFUNC_P): Remove.
17031         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
17032         (overrides): Use DECL_DESTRUCTOR_P.
17033         (check_for_override): Likewise.
17034         * decl.c (start_function): Likewise.
17035         * decl2.c (grokfclassfn): Likewise.
17036         (check_classfn): Likewise.
17037         (grok_function_init): Likewise.
17039 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
17041         * decl2.c (grokfield): Issue error on illegal data member
17042         declaration.
17044 2000-04-17  Mark P Mitchell  <mark@codesourcery.com>
17046         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
17048 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
17050         * class.c (build_vtable_entry): Don't build thunks for type-info
17051         functions.
17053 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
17055         * decl.c (decls_match): Allow a redeclaration of a builtin to
17056         specify args while the builtin did not.
17058 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
17060         * cp-tree.def (THUNK_DECL): Add to documentation.
17061         * cp-tree.h (flag_huge_objects): Declare.
17062         * class.c (modify_vtable_entry): Tidy.
17063         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
17064         Calculate delta appropriately for the new ABI.
17065         (dfs_modify_vtables): Use it.
17066         (modify_all_vtables): Fix thinko in code to add overriding copies
17067         of functions to primary vtables.
17068         (build_clone): Fix typo in comment.
17069         (clone_function_decl): Correct order of destructors in vtable.
17070         (build_vbase_offset_vtbl_entries): Adjust comment.
17071         (dfs_vcall_offset_queue_p): Remove.
17072         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
17073         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
17074         (build_vtable_entry): Correct check for pure virtual functions.
17075         Don't declare flag_huge_objects.
17076         * decl.c (flag_huge_objects): Remove declaration.
17077         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
17078         Use int_size_in_bytes.
17079         (emit_thunk): Handle vcall offset thunks.
17081 2000-04-15  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17083         * decl2.c (parse_time, varconst_time): Delete declarations.
17084         (finish_file): Delete LINENO declaration.
17085         START_TIME and THIS_TIME now long.
17087 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
17089         * class.c (build_base_field): Reformat comment.
17091         * inc/cxxabi.h (stddef.h): Comment inclusion.
17092         (__base_class_info::__offset): Comment shift.
17094 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
17096         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
17097         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
17098         (cp_push_exception_identifier): New macro.
17099         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
17100         (DECL_BASE_DESTRUCTOR_P): Likewise.
17101         (DECL_DELETING_DESTRUCTOR_P): Likewise.
17102         (get_vtbl_decl_for_binfo): Fix formatting.
17103         (in_charge_arg_for_name): New macro.
17104         (maybe_build_cleanup_and_delete): Remove declaration.
17105         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
17106         (in_charge_arg_for_name): New function.
17107         (build_new_method_call): Use it.  Handle cloned destructors.
17108         (build_clone): Don't make the base constructor virtual.
17109         Automatically defer generated functions.
17110         (clone_function_decl): Handle destructors, too.
17111         (clone_constructors_and_destructors): Likewise.
17112         (create_vtable_ptr): Don't create a vtable entry for a cloned
17113         function.
17114         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
17115         (initialize_predefined_identifiers): Update appropriately.
17116         (finish_destructor_body): Simplify.
17117         (maybe_build_cleanup_and_delete): Remove.
17118         * except.c (expand_throw): Handle new-ABI destructors.
17119         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
17120         (build_dtor_call): New function.
17121         (build_delete): Use it.  Simplify.
17122         * optimize.c (maybe_clone_body): Handle destructors.
17123         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
17125         * exception.cc (cleanup_fn): New typedef.
17126         (CALL_CLEANUP): New macro.
17127         (cp_eh_info): Use them.
17128         (__cp_push_exception): Likewise.
17129         (__cp_pop_exception): Likewise.
17131 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
17133         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
17134         (complete_dtor_identifier): New macro.
17135         (CLASSTYPE_FIRST_CONVERSION): Remove.
17136         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
17137         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
17138         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
17139         (CLASSTYPE_CONSTRUCTORS): Likewise.
17140         (CLASSTYPE_DESTRUCTORS): Likewise.
17141         (lang_decl): Add cloned_function.
17142         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
17143         (DECL_BASE_CONSTRUCTOR_P): Likewise.
17144         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
17145         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
17146         (DECL_CLONED_FUNCTION_P): Likewise.
17147         (DECL_CLONED_FUNCTION): Likewise.
17148         (clone_function_decl): Declare.
17149         (maybe_clone_body): Likewise.
17150         * call.c (build_user_type_conversion_1): Call complete object
17151         constructors in the new ABI.
17152         (build_new_method_call): Don't add in-charge parameters under the
17153         new ABI.
17154         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
17155         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
17156         CLASSTYPE_DESTRUCTOR_SLOT.
17157         (build_clone): New function.
17158         (clone_function_decl): Likewise.
17159         (clone_constructors_and_destructors): Likewise.
17160         (check_bases_and_members): Use it.
17161         * decl.c (iniitialize_predefined_identifiers): Initialize
17162         complete_dtor_identifier.
17163         (finish_function): Don't add extra code to a clone.
17164         (lang_mark_tree): Mark cloned_function.
17165         * decl2.c (mark_used): Don't bother trying to instantiate things
17166         we synthesized.
17167         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
17168         * method.c (set_mangled_name_for_decl): Don't treat clones as
17169         constructors.
17170         (synthesize_method): Sythesize cloned functions, not the clones.
17171         * optimize.c (inline_data): Update comment on ret_label.
17172         (remap_block): Don't assume DECL_INITIAL exists.
17173         (copy_body_r): Allow ret_label to be NULL.
17174         (maybe_clone_body): Define.
17175         * pt.c (tsubst_decl): Handle clones.
17176         (instantiate_clone): New function.
17177         (instantiate_template): Use it.
17178         (set_mangled_name_for_template_decl): Don't treat clones as
17179         constructors.
17180         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
17181         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
17182         * semantics.c (expand_body): Clone function bodies as necessary.
17184         * optimize.c (remap_decl): Avoid sharing structure for arrays
17185         whose size is only known at run-time.
17186         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
17188         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
17189         to has_in_charge_parm_p.
17190         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
17191         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
17192         (DECL_COPY_CONSTRUCTOR_P): New macro.
17193         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
17194         (build_user_type_conversion_1): Likewise.
17195         (convert_like_real): Likewise.
17196         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
17197         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
17198         (copy_args_p): Likewise.
17199         (grok_ctor_properties): Likewise.
17200         (start_function): Likewise.
17201         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
17202         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
17203         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
17204         * method.c (do_build_copy_constructor): Use
17205         DECL_HAS_IN_CHARGE_PARM_P.
17206         (synthesize_method): Likewise.
17207         * pt.c (instantiate_template): Remove goto.
17208         * tree.c (build_cplus_method_type): Remove mention of obstacks in
17209         comment.
17211         * cp-tre.h (finish_function): Change prototype.
17212         * decl.c (end_cleanup_fn): Adjust caller.
17213         (finish_function): Take only one parameter.
17214         * decl2.c (finish_objects): Adjust caller.
17215         (finish_static_storage_duration_function): Likewise.
17216         * method.c (emit_thunk): Likewise.
17217         * parse.y: Likewise.
17218         * parse.c: Regenerated.
17219         * pt.c (instantiate_decl): Likewise.
17220         * rtti.c (synthesize_tinfo_fn): Likewise.
17221         * semantics.c (expand_body): Likewise.
17223         * cp-tree.h (copy_decl): New function.
17224         * class.c (finish_struct_1): Use it.
17225         * lex.c (copy_decl): Define it.
17226         * pt.c (tsubst_decl): Likewise.
17227         * tree.c (copy_template_template_parm): Likewise.
17229         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
17230         has_nonpublic_assign_ref.
17231         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
17232         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
17233         * class.c (finish_struct_methods): Don't set
17234         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
17235         (interface_only): Don't declare.
17236         (interface_unknown): Likewise.
17238 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17240         * tree.h (HAVE_TEMPLATES): Remove definition.
17241         * lang-options.h (-fthis-is-variable): Remove documentation.
17243 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
17245         * class.c (instantiate_type): Handle object-relative template-id.
17247         * semantics.c (finish_expr_stmt): Call convert_to_void here.
17248         * decl.c (cplus_expand_expr_stmt): Not here.
17250         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
17251         Initialize exprtype earlier.
17253         * parse.y (fn.def1): Check for defining types in return types.
17255         * decl.c (check_tag_decl): Notice extra fundamental types.
17256         Diagnose empty decls in classes, too.
17258         * decl.c (grokdeclarator): Don't override an anonymous name if no
17259         declarator was given.
17261         * cvt.c (convert_to_void): Call resolve_offset_ref.
17263         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
17265         * decl2.c (decl_namespace): Handle getting a type.
17267         * typeck.c (build_c_cast): Re-enable warning for cast between
17268         pointer and integer of different size.
17270 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
17272         * inc/cxxabi.h (__pointer_type_info): Add restrict and
17273         incomplete flags.
17274         (__pointer_type_info::__pointer_catch): New virtual function.
17275         (__pointer_to_member_type_info): Derive from
17276         __pointer_type_info. Adjust.
17277         (__pointer_to_member_type_info::__do_catch): Remove.
17278         (__pointer_to_member_type_info::__is_pointer_p): Declare.
17279         (__pointer_to_member_type_info::__pointer_catch): Declare.
17280         * rtti.c (qualifier_flags): Add restrict flag.
17281         (ptmd_initializer): Reorder members.
17282         (create_tinfo_types): Expand comments. Reorder
17283         ptmd_desc_type_node members.
17284         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
17285         Implement.
17286         (__pointer_type_info::__do_catch): Move specific code into
17287         __pointer_catch. Call it.
17288         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
17289         specific catch checking. Fix void conversion check.
17290         (__pointer_to_member_type_info::__do_catch): Remove.
17291         (__pointer_to_member_type_info::__pointer_catch): Implement.
17293 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
17295         * lex.c (init_parse): Remove traces of classof and headof.
17296         * decl2.c (flag_operator_names): Default to 1.
17297         (lang_decode_option): Do not set it for -ansi.
17299 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
17301         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
17302         (DECL_MAIN_VARIANT): Remove.
17303         * decl.c (duplicate_decls): Don't set it.
17304         (start_function): Likewise.
17305         (lang_mark_tree): Don't mark it.
17306         * decl2.c (defer_fn): Don't use it.
17307         * lex.c (retrofit_lang_decl): Don't set it.
17308         * pt.c (tsubst_decl): Likewise.
17309         * ptree.c (print_lang_decl): Don't print it.
17310         * typeck.c (mark_addressable): Don't use it.
17312 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
17314         * vec.cc: Include <new> and <exception>.
17315         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
17316         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
17317         terminate.
17318         (__cxa_vec_delete): Catch dtor exceptions.
17320 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
17322         Prepend __ to implementation defined names.
17323         * inc/typeinfo (type_info): Rename _name to __name.
17324         (type_info::type_info): Rename parameter.
17325         (type_info::operator==, type_info::operator!=,
17326         type_info::before): Likewise.
17327         (type_info::is_pointer_p, type_info::is_function_p,
17328         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
17329         parameters.
17330         * inc/cxxabi.h
17331         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
17332         (__pointer_type_info::__pointer_type_info): Likewise.
17333         (__pointer_type_info::is_pointer_p,
17334         __pointer_type_info::do_catch): Prepend __. Rename parameters.
17335         (__array_type_info::__array_type_info): Rename parameters.
17336         (__function_type_info::__function_type_info): Likewise.
17337         (__function_type_info::is_function_p): Prepend __.
17338         (__enum_type_info::__enum_type_info): Rename parameters.
17339         (__pointer_to_member_type_info::__pointer_to_member_type_info):
17340         Likewise.
17341         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
17342         parameters.
17343         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
17344         (__class_type_info::__class_type_info): Rename parameters.
17345         (__class_type_info::sub_kind): Prepend __. Adjust member names.
17346         (__class_type_info::upcast_result,
17347         __class_type_info::dyncast_result): Prepend __. Move definition
17348         into tinfo.cc.
17349         (__class_type_info::do_upcast, __class_type_info::do_catch,
17350         __class_type_info::find_public_src,
17351         __class_type_info::do_dyncast,
17352         __class_type_info::do_find_public_src): Prepend __. Rename
17353         parameters.
17354         (__si_class_type_info::__si_class_type_info): Rename parameters.
17355         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
17356         __si_class_type_info::do_find_public_src): Prepent __. Rename
17357         parameters.
17358         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
17359         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
17360         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
17361         parameters.
17362         (__dynamic_cast): Rename parameters.
17363         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
17364         type_info::do_catch, type_info::do_upcast): Prepend __.
17365         (contained_p, public_p, virtual_p, contained_public_p,
17366         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
17367         (__class_type_info::do_catch,
17368         __class_type_info::do_upcast): Prepend __. Adjust.
17369         (__class_type_info::__upcast_result,
17370         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
17371         Adjust.
17372         (__class_type_info::find_public_src): Prepend __. Adjust.
17373         (__class_type_info::do_find_public_src,
17374         __si_class_type_info::do_find_public_src,
17375         __vmi_class_type_info::do_find_public_src): Likewise.
17376         (__class_type_info::do_dyncast,
17377         __si_class_type_info::do_dyncast,
17378         __vmi_class_type_info::do_dyncast): Likewise.
17379         (__class_type_info::do_upcast,
17380         __si_class_type_info::do_upcast,
17381         __vmi_class_type_info::do_upcast): Likewise.
17382         (__dynamic_cast): Adjust.
17383         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
17384         (__function_type_info::is_function_p): Likewise.
17385         (__pointer_type_info::do_catch): Likewise. Adjust.
17386         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
17387         (__throw_type_match_rtti_2): Adjust.
17388         (__is_pointer): Adjust.
17390 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
17392         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
17393         (complete_ctor_identifier): New macro.
17394         (special_function_kind): Add sfk_copy_constructor and
17395         sfk_assignment_operator.
17396         (LOOKUP_HAS_IN_CHARGE): Remove.
17397         (cons_up_default_function): Rename to ...
17398         (implicitly_declare_fn): ... this.
17399         * call.c (build_new_method_call): Add in-charge parameters for
17400         constructors here.
17401         * class.c (add_implicitly_declared_members): Change parameter name
17402         from cant_have_assignment to cant_have_const_assignment.
17403         Replace calls to cons_up_default_function to implicitly_declare_fn.
17404         * cvt.c (ocp_convert): Use complete_ctor_identifier.
17405         * decl.c (initialize_predefined_identifiers): Initialize it.
17406         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
17407         complex expression.
17408         * init.c (expand_default_init): Don't calculate the in-charge
17409         parameter here.
17410         (build_new_1): Likewise.
17411         * lex.c (cons_up_default_function): Move to method.c.
17412         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
17413         (implicitly_declare_fn): New function.
17414         * typeck.c (build_static_cast): Use complete_ctor_identifier.
17415         (build_modify_expr): Likewise.
17416         * typeck2.c (build_functional_cast): Likewise.
17418         Under the new ABI, constructors don't return `this'.
17419         * cp-tree.h (warn_reorder): Declare.
17420         (special_function_kind): New enum.
17421         (global_base_init_list): Remove declaration.
17422         (emit_base_init): Don't return a value.
17423         (check_base_init): Don't declare.
17424         (is_aggr_typedef): Likewise.
17425         * decl.c (check_special_function_return_type): New function.
17426         (return_types): Remove.
17427         (grokdeclarator): Use check_special_function_return_type.
17428         (start_function): Don't initialize ctor_label under the new ABI.
17429         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
17430         * init.c (begin_init_stmts): Move to top of file.
17431         (finish_init_stmts): Likewise.
17432         (warn_reorder): Don't declare.
17433         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
17434         value.
17435         (check_base_init): Remove.
17436         (is_aggr_typedef): Likewise.
17437         (build_new_1): Don't use the return value of a constructor.
17438         * semantics.c (setup_vtbl_ptr): Don't use the return value
17439         of emit_base_init.
17440         * typeck.c (check_return_expr): Don't magically convert return
17441         statements into `return this' in constructors under the new ABI.
17443         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
17444         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
17445         (base_ctor_identifier): New macro.
17446         (base_dtor_identifier): Likewise.
17447         (deleting_dtor_identifier): Likewise.
17448         * decl.c: Don't include obstack.h.
17449         (obstack_chunk_alloc): Don't define.
17450         (obstack_chunk_free): Likewise.
17451         (struct predefined_identifier): New type.
17452         (initialize_predefined_identifiers): New function.
17453         (init_decl_processing): Use it.
17454         (debug_temp_inits): Remove.
17455         (start_method): Don't call preserve_data.
17456         (hack_incomplete_structures): Update comment.
17457         * init.c (init_init_processing): Don't initialize
17458         nelts_identifier.
17459         (build_offset_rf): Remove dead code.
17460         (build_delete): Use CLASSTYPE_N_BASECLASSES.
17461         * search.c (init_search_processing): Don't initialize
17462         vptr_identifier.
17464 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17466         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
17467         some sign_compare warnings.
17469 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
17471         Rename abi::__vmi_class_type_info members.
17472         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
17473         base_list, detail_masks members to vmi_flags, vmi_base_count,
17474         vmi_bases and vmi_flags_masks respectively.
17475         (__vmi_class_type_info::vmi_flags_masks): Rename
17476         details_unknown_mask to flags_unknown_mask.
17477         * tinfo.cc (__class_type_info::do_upcast): Adjust.
17478         (__vmi_class_type_info::do_find_public_src): Adjust.
17479         (__vmi_class_type_info::do_dyncast): Adjust.
17480         (__vmi_class_type_info::do_upcast): Adjust.
17482 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
17484         * tinfo.cc (convert_to_base): New function.
17485         (get_vbase_offset): Remove. Move into convert_to_base.
17486         (__vmi_class_type_info::do_find_public_src): Adjust.
17487         (__vmi_class_type_info::do_dyncast): Adjust.
17488         (__vmi_class_type_info::do_upcast): Adjust.
17490 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
17492         * tinfo.cc (operator=): Use __builtin_strcmp.
17493         * tinfo2.cc (before): Likewise.
17495 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
17497         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
17498         (DECL_SAVED_INLINE): Rename to ...
17499         (DECL_DEFERRED_FN): ... this.
17500         (in_function_p): Remove declaration.
17501         (mark_inline_for_output): Rename to ...
17502         (defer_fn): ... this.
17503         * decl.c (finish_function): Adjust call to mark_inline_for_output.
17504         (in_function_p): Remove definition.
17505         * decl2.c (saved_inlines): Rename to ...
17506         (deferred_fns): ... this.
17507         (saved_inlines_used): Rename to ...
17508         (deferred_fns_used): ... this.
17509         (mark_inline_for_output): Rename to ...
17510         (defer_fn): ... this.
17511         (finish_file): Adjust accordingly.
17512         (init_decl2): Likewise.
17513         * lex.c (cons_up_default_function): Likewise.
17514         * pt.c (mark_decl_instantiated): Likewise.
17515         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
17516         circumstances.
17517         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
17518         * semantics.c (expand_body): Defer more functions.
17520 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
17522         * vec.cc: New file.
17523         * Make-lang.in (CXX_LIB2FUNCS): Add it.
17524         (vec.o): Build it.
17525         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
17526         __cxa_vec_delete): Declare.
17528 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
17530         * rtti.c (dfs_class_hint_mark): New static function.
17531         (dfs_class_hint_unmark): New static function.
17532         (class_hint_flags): Use them.
17534 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
17536         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
17538 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
17540         * cp-tree.h (instantiate_decl): Change prototype.
17541         * decl2.c (mark_used): Adjust call.
17542         * optimize.c (inlinable_function_p): Adjust handling of templates.
17543         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
17544         (do_type_instantiation): Likewise.
17545         (instantiate_decl): Defer more templates.
17546         (instantiate_pending_templates): Adjust logic to handle inline
17547         friend functions.
17549         * Makefile.in (GGC_H): New variable.  Use it throughout in place
17550         of ggc.h.
17552         * call.c: Don't include obstack.h.  Include ggc.h.
17553         (obstack_chunk_alloc): Don't define.
17554         (obstack_chunk_free): Likewise.
17555         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
17556         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
17557         (pop_switch): Free it.
17559         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
17561         * dump.c (dequeue_and_dump): Don't try to print the bit_position
17562         if we don't have a DECL_FIELD_OFFSET.
17564 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
17566         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
17567         special_function_p.
17569 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17571         * cfns.gperf (hash, libc_name_p): Prototype.
17573         * rtti.c (build_dynamic_cast_1): Constification.
17575         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
17577         * semantics.c (deferred_type_access_control): Prototype.
17579 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
17581         Correct many new ABI issues regarding vbase and vcall offset
17582         layout.
17583         * cp-tree.h (BINFO_VTABLE): Document.
17584         (struct lang_type): Tweak formatting.
17585         (BINFO_PRIMARY_BINFO): Add to documentation.
17586         (CLASSTYPE_VSIZE): Fix typo in comment.
17587         (CLASSTYPE_VBASECLASSES): Update documentation.
17588         (BINFO_VBASE_MARKED): Remove.
17589         (SET_BINFO_VBASE_MARKED): Likewise.
17590         (CLEAR_BINFO_VBASE_MARKED): Likewise.
17591         (BINFO_FIELDS_MARKED): Remove.
17592         (SET_BINFO_FIELDS_MARKED): Likewise.
17593         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
17594         (enum access_kind): New enumeration.
17595         (num_extra_vtbl_entries): Remove declaration.
17596         (size_extra_vtbl_entries): Likewise.
17597         (get_vtbl_decl_for_binfo): New function.
17598         (dfs_vbase_unmark): Remove declaration.
17599         (mark_primary_bases): Likewise.
17600         * class.c (SAME_FN): Remove.
17601         (struct vcall_offset_data_s): Move definition.
17602         (build_vbase_pointer): Use `build', not `build_binary_op', to
17603         access the vbase pointer under the new ABI.
17604         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
17605         (build_primary_vtable): Likewise.
17606         (dfs_mark_primary_bases): Move here from search.c.
17607         (mark_primary_bases): Likewise.
17608         (determine_primary_bases): Under the new ABI, don't make a base
17609         class a primary base just because we don't yet have any virtual
17610         functions.
17611         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
17612         (num_vfun_entries): Remove.
17613         (dfs_count_virtuals): Likewise.
17614         (num_extra_vtbl_entries): Likewise.
17615         (size_extra_vtbl_entries): Likewise.
17616         (layout_virtual_bases): Iterate in inheritance graph order under
17617         the new ABI.
17618         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
17619         indicate that a vfield is present.
17620         (init_class_processing): Initialize access_public_node, etc., from
17621         ak_public, etc.
17622         (get_vtbl_decl_for_binfo): New function.
17623         (dump_class_hierarchy_r): Likewise.
17624         (dump_class_hierarchy): Use it.
17625         (finish_vtbls): Build the vtbls in inheritance graph order.
17626         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
17627         (initialize_vtable): Use get_vtbl_decl_for_binfo.
17628         (accumulate_vtbl_inits): Add comments explaining why a pre-order
17629         walk is required.
17630         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
17631         where the vptr points, even for primary vtables.
17632         (build_vtbl_initializer): Adjust handling of vbase and vcall
17633         offsets.
17634         (build_vcall_and_vbase_vtable_entries): New function.
17635         (dfs_build_vbase_offset_vtbl_entries): Remove.
17636         (build_vbase_offset_vtbl_entries): Reimplement.
17637         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
17638         were already handled in a primary base class vtable.
17639         (build_vcall_offset_vtbl_entries): Adjust.
17640         (build_rtti_vtbl_entries): Adjust.
17641         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
17642         * init.c (expand_virtual_init): Simplify.
17643         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
17644         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
17645         * search.c (BINFO_ACCESS): New macro.
17646         (SET_BINFO_ACCESS): Likewise.
17647         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
17648         (access_in_type): Likewise.
17649         (dfs_accessible_p): Likewise.
17650         (protected_accessible_p): Likewise.
17651         (lookup_fnfields_1): Adjust documentation.
17652         (dfs_mark_primary_bases): Move to class.c
17653         (mark_primary_bases): Likewise.
17654         (dfs_vbase_unmark): Remove.
17655         (virtual_context): Use BINFO_FOR_VBASE.
17656         (dfs_get_vbase_types): Simplify.
17657         (dfs_build_inheritance_graph_order): New function.
17658         (get_vbase_types): Use it.
17659         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
17661         * tinfo.cc (get_vbase_offset): New function.
17662         (__vmi_class_type_info::do_find_public_src): Use it.
17663         (__vmi_class_type_info::do_dyncast): Likewise.
17664         (__vmi_class_type_info::do_upcast): Likewise.
17666 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
17668         * lang-specs.h: Pass -fno-show-column to the preprocessor.
17670 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
17672         * rtti.c (class_hint_flags): Rename flags.
17673         (class_initializer): Remove flags.
17674         (synthesize_tinfo_var): Combine offset and flags. Add flags
17675         for __vmi_class_type_info.
17676         (create_tinfo_types): Remove flags from __class_type_info and
17677         __si_class_type_info. Merge flags and offset from
17678         base_class_type_info.
17679         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
17680         (__base_class_info::is_virtual_p): Adjust.
17681         (__base_class_info::is_public_p): Adjust.
17682         (__base_class_info::offset): New accessor.
17683         (__class_type_info::details): Remove member.
17684         (__class_type_info::__class_type_info): Lose details.
17685         (__class_type_info::detail_masks): Remove.
17686         (__si_class_type_info::__si_class_type_info): Lose details.
17687         (__vmi_class_type_info::details): New member.
17688         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
17689         (__vmi_class_type_info::detail_masks): New member.
17690         * tinfo.cc (__class_type_info::do_upcast): Initialize result
17691         with unknown_details_mask.
17692         (__vmi_class_type_info::do_find_public_src): Adjust
17693         (__vmi_class_type_info::do_dyncast): Adjust.
17694         (__vmi_class_type_info::do_upcast): Set result details, if
17695         needed. Adjust.
17696         (__dynamic_cast): Temporarily #if out optimization.
17698 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
17700         * rtti.c (get_tinfo_decl): Mark used.
17701         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
17702         mark as dealt with, if we output it.
17704 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
17706         * class.c: Reorganize to put virtual function table initialization
17707         machinery at the end of the file.
17709 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
17711         * class.c (finish_struct): Use bitsize_zero_node.
17712         * pt.c (instantiate_class_template): Likewise.
17714 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
17716         Put RTTI entries at negative offsets in new ABI.
17717         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
17718         vbase offset at index -3, not -1.
17719         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
17720         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
17721         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
17722         (build_rtti_vtbl_entries): New function.
17723         (set_rtti_entry): Remove.
17724         (build_primary_vtable): Don't use it.
17725         (build_secondary_vtable): Likewise.
17726         (start_vtable): Remove.
17727         (first_vfun_index): New function.
17728         (set_vindex): Likewise.
17729         (add_virtual_function): Don't call start_vtable.  Do call
17730         set_vindex.
17731         (set_primary_base): Rename parameter.
17732         (determine_primary_base): Likewise.
17733         (num_vfun_entries): Don't use skip_rtti_stuff.
17734         (num_extra_vtbl_entries): Include RTTI information.
17735         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
17736         (skip_rtti_stuff): Remove.
17737         (dfs_modify_vtables): Don't use it.
17738         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
17739         (layout_nonempty_base_or_field): Update size handling.
17740         (create_vtable_ptr): Tweak.
17741         (layout_class_type): Adjust parameter names.
17742         (finish_struct_1): Simplify.
17743         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
17744         (skip_rtti_stuff): Remove.
17745         (first_vfun_index): New function.
17746         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
17747         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
17748         (marked_vtable_pathp): Declare.
17749         (unmarked_vtable_pathp): Likewise.
17750         * error.c (dump_expr): Use first_vfun_index to calculate vtable
17751         offsets.
17752         * rtti.c (build_headof): Look for RTTI at negative offsets.
17753         (get_tinfo_decl_dynamic): Likewise.
17754         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
17755         here.
17756         (create_pseudo_type_info): Do it here instead.  Adjust so that
17757         vptr points at first virtual function.
17758         * search.c (marked_vtable_pathp): Make it global.
17759         (unmarked_vtable_pathp): Likewise.
17760         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
17761         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
17762         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
17763         (get_pure_virtuals): Likewise.
17764         (expand_upcast_fixups): Likewise.
17765         * tree.c (debug_binfo): Likewise.
17766         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
17767         negative offset.
17769 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17771         * class.c (check_field_decl): Fix typo.
17772         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
17773         (check_methods): Likewise.
17774         (check_field_decls): Likewise.
17775         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
17776         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
17777         Use DECL_RESULT_FLD, not DECL_RESULT.
17778         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
17779         * lex.c (identifier_type): Likewise.
17780         * pt.c (determine_specialization, lookup_template_class): Likewise.
17781         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
17782         (resolve_overloaded_unification, more_specialized): Likewise.
17783         * semantics.c (finish_member_declaration): Likewise.
17784         * typeck.c (build_x_function_call): Likewise.
17786 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
17788         * class.c (layout_empty_base): Handle empty bases with non-byte
17789         alignment.
17790         (build_base_field): Likewise.
17791         (layout_virtual_bases): Likewise.
17793         * class.c (finish_struct_1): Fix typo in this change:
17795         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17797 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
17799         * decl.c (grokdeclarator): Count partial specializations when
17800         keeping track of how many template classes have been seen.
17802         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
17804 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
17806         * class.c (build_vbase_pointer_fields): layout_field now place_field.
17807         (get_vfield_offset): Use byte_position.
17808         (set_rtti_entry): Set OFFSET to ssizetype zero.
17809         (get_binfo_offset_as_int): Deleted.
17810         (dfs_record_base_offsets): Use tree_low_cst.
17811         (dfs_search_base_offsets): Likewise.
17812         (layout_nonempty_base_or_field): Reflect changes in RLI format
17813         and call byte_position.
17814         (layout_empty_base): Convert offset to ssizetype.
17815         (build_base_field): use rli_size_unit_so_far.
17816         (dfs_propagate_binfo_offsets): Do computation in proper type.
17817         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
17818         (layout_class_type): Reflect changes in RLI names and fields.
17819         (finish_struct_1): Set DECL_FIELD_OFFSET.
17820         * dump.c (dequeue_and_dump): Call bit_position.
17821         * expr.c (cplus_expand_constant): Use byte_position.
17822         * rtti.c (expand_class_desc): Use bitsize_one_node.
17823         * typeck.c (build_component_addr): Use byte_position and don't
17824         special case for zero offset.
17826 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
17828         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
17830         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
17831         tinfo object.
17832         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
17833         vtable.
17835 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
17837         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
17838         DECL_P macros.
17839         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
17840         make_typename_type, check_initializer, cp_finish_decl,
17841         xref_tag): Likewise.
17842         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
17843         decl_namespace, arg_assoc_template_arg, arg_assoc,
17844         validate_nonmember_using_decl, do_class_using_decl): Likewise.
17845         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
17846         args_to_string): Likewise.
17847         * friend.c (is_friend): Likewise.
17848         * lex.c (note_got_semicolon, note_list_got_semicolon,
17849         is_global): Likewise.
17850         * method.c (build_overload_nested_name, build_overload_value,
17851         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
17852         * parse.y (typename_sub, typename_sub1): Likewise.
17853         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
17854         process_partial_specialization, convert_template_argument,
17855         template_args_equal, add_pending_template, lookup_template_class,
17856         for_each_template_parm_r, maybe_fold_nontype_arg,
17857         tsubst, instantiate_template, type_unification_real, unify,
17858         instantiate_pending_templates, set_mangled_name_for_template_decl):
17859         Likewise.
17860         * repo.c (repo_get_id, repo_template_used): Likewise.
17861         * search.c (lookup_field_1): Likewise.
17862         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
17863         * xref.c (classname): Likewise.
17865 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
17867         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
17868         (CANONICAL_BINFO): New macro.
17869         (BINFO_NEW_VTABLE_MARKED): Use it.
17870         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
17871         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
17872         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
17873         not TREE_TYPE.
17874         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
17875         (build_secondary_vtable): Likewise.
17876         (dfs_finish_vtbls): Likewise.
17877         (dfs_accumulate_vtbl_inits): Likewise.
17878         (accumulate_vtbl_inits): New function.
17879         (finish_vtbls): Make sure that virtual bases come after
17880         non-virtual bases in the vtable group.
17881         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
17882         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
17883         * search.c (struct vbase_info): Move definition.
17884         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
17885         (unmarked_new_vtable_p): Likewise.
17886         (dfs_mark_vtable_path): Remove.
17887         (dfs_mark_new_vtable): Remove.
17888         (dfs_unmark_new_vtable): Likewise.
17889         (dfs_clear_search_slot): Likewise.
17890         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
17891         (dfs_clear_vbase_slots): Likewise.
17892         (init_vbase_pointers): LIkewise.
17894 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
17896         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
17897         SIZETYPE to a non-SIZETYPE.
17899 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
17901         * class.c (layout_virtual_bases): Adjust names in conditionally
17902         compiled code.
17904         * class.c (record_base_offsets): New function.
17905         (layout_conflict_p): Likewise.
17906         (layout_nonempty_base_or_field): Use it.
17907         (layout_empty_base): New function.
17908         (build_base_field): Use it.
17909         (build_base_fields): Update comment.
17910         (layout_virtual_bases): Fold in a little code form
17911         layout_basetypes.  Use layout_empty_base.
17912         (layout_basetypes): Remove.
17913         (end_of_class): New function.
17914         (layout_class_type): Use it.  Adjust.
17916         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
17917         (fntype_p): Remove.
17918         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
17919         comment.
17920         (dfs_skip_nonprimary_vbases_markedp): Likewise.
17921         * typeck.c (fntype_p): Remove.
17923         * cp-tree.h (TI_SPEC_INFO): Remove.
17924         (CLASSTYPE_TI_SPEC_INFO): Likewise.
17925         * pt.c (process_partial_specialization): Likewise.
17927         * class.c (build_base_field): Fix thinko in computation of binfo
17928         offsets.
17930         * tree.c (mark_local_for_remap_p): Mark variables declared in
17931         TARGET_EXPRs as well.
17933 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
17935         * typeck.c (require_complete_type, complete_type,
17936         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
17937         build_array_ref, convert_arguments, pointer_diff,
17938         build_x_unary_op, build_unary_op, build_c_cast,
17939         build_modify_expr): Use COMPLETE_TYPE_P etc.
17940         * call.c (is_complete, convert_like_real,
17941         build_new_method_call): Likewise.
17942         * class.c (build_vbase_pointer_fields, check_bases,
17943         build_base_field, finish_struct_1, pushclass): Likewise.
17944         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
17945         * decl.c (maybe_process_template_type_declaration, pushtag,
17946         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
17947         layout_var_decl, check_initializer, cp_finish_decl,
17948         grokdeclarator, require_complete_types_for_parms,
17949         grok_op_properties, xref_tag, xref_basetypes,
17950         check_function_type): Likewise.
17951         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
17952         * friend.c (do_friend): Likewise.
17953         * init.c (build_offset_ref): Likewise.
17954         * parse.y (structsp): Likewise.
17955         * pt.c (maybe_process_partial_specialization,
17956         tsubst_friend_function, instantiate_class_template, tsubst,
17957         do_type_instantiation, instantiate_pending_templates): Likewise.
17958         * repo.c (repo_get_id): Likewise.
17959         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
17960         synthesize_tinfo_var, emit_support_tinfos): Likewise.
17961         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
17962         * semantics.c (begin_class_definition): Likewise.
17963         * tree.c (build_cplus_method_type): Likewise.
17964         * typeck2.c (digest_init, build_functional_cast,
17965         add_exception_specifier): Likewise.
17966         * parse.h, parse.c: Regenerated.
17968 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
17970         * inc/cxxabi.h: New header file. Define new-abi entry points.
17971         (__pointer_type_info::target): Rename member to ...
17972         (__pointer_type_info::type): ... here.
17973         (__base_class_info::type): Rename member to ...
17974         (__base_class_info::base): ... here.
17975         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
17976         * cp-tree.h (CPTI_ABI): New global tree enumeration.
17977         (abi_node): New global tree node.
17978         * decl.c (abi_node): Document.
17979         (init_decl_processing): Initialize abi_node.
17980         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
17981         (get_vmi_pseudo_type_info): Likewise.
17982         (create_tinfo_types): Likewise.
17983         (emit_support_tinfos): Likewise.
17984         * tinfo.h (cxxabi.h): Include for new-abi.
17985         Move rtti class definitions to new header file.
17986         * tinfo.cc (abi): Use the namespace.
17987         (std): Move new abi rtti classes from here ...
17988         (__cxxabiv1): ... to here.
17989         * tinfo2.cc (cxxabi.h): Include for new-abi.
17990         Move rtti class definitions to new header file.
17991         (std): Move new abi rtti classes from here ...
17992         (__cxxabiv1): ... to here.
17993         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
17994         namespace.
17996 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
17997             Jason Merrill  <jason@casey.cygnus.com>
17999         * method.c (build_overload_int): Use host_integerp.
18001 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
18003         * init.c (build_offset_ref): Handle the case of a templated member
18004         function.
18006 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18008         * except.c (expand_exception_blocks): Clear catch_clauses_last.
18010 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
18012         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
18013         * class.c (check_bitfield_decl): Turn illegal bitfields into
18014         non-bitfields.
18015         (dfs_propagate_binfo_offsets): Adjust for new size_binop
18016         semantics.
18017         (dfs_offset_for_unshared_vbases): Likewise.
18018         * cvt.c (cp_convert_to_pointer): Convert NULL to a
18019         pointer-to-member correctly under the new ABI.
18020         * expr.c (cplus_expand_constant): Don't use cp_convert when
18021         turning an offset into a pointer-to-member.
18022         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
18023         when dereferencing them under the new ABI.
18024         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
18025         of pointers-to-members under the new ABI.
18027         * class.c (check_bitfield_decl): Remove restriction on really long
18028         bitfields.
18029         (layout_class_type): Implement new ABI handling of bitfields
18030         longer than their types.
18032 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18034         * parse.y (extdefs): Call ggc_collect.
18035         * parse.c: Regenerated.
18037 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
18039         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
18040         (note_name_declared_in_class): Use OVL_CURRENT to get at a
18041         potential overload.
18043 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18045         * class.c (build_vbase_path): Use integer_zerop.
18046         (build_vtable_entry): Use tree_low_cst.
18047         (get_vfield_offset): Use bit_position.
18048         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
18049         Use tree_low_cst.
18050         (check_bitfield_decl): Set DECL_SIZE using convert.
18051         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
18052         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
18053         Use tree_low_cst.
18054         (finish_struct_1): Use bit_position.
18055         (dump_class_hierarchy): Use tree_low_cst.
18056         * cp-tree.h (min_precision): Add declaration.
18057         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
18058         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
18059         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
18060         * expr.c (cplus_expand_constant): Use bit_position.
18061         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
18062         * rtti.c (get_base_offset): Use bit_position.
18063         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
18064         host_integerp, and tree_low_cst.
18065         (pointer_int_sum): Use integer_zerop.
18066         (build_component_addr): Use bit_position.
18068 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
18070         * typeck.c (require_complete_type): Don't assume size_zero_node.
18071         (complete_type_or_else): Likewise.
18073 2000-03-16  Steven Grady <grady@digitaldeck.com>
18074             Jason Merrill  <jason@casey.cygnus.com>
18076         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
18078 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
18080         * decl2.c (grokfield): Bail out if type is error_mark_node.
18082 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
18084         * tinfo2.cc (__ptr_to_member_data): Rename to ...
18085         (__pointer_to_member_data): ... here. Adjust.
18086         * rtti.c (create_tinfo_types): Adjust.
18088 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
18090         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
18091         * decl.c (ref_desc_type_node): Undocument.
18092         * rtti.c (ptr_ref_initializer): Rename to ...
18093         (ptr_initializer): ... here. Adjust comments.
18094         (ptmd_initializer): Fix comment thinko.
18095         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
18096         (create_tinfo_types): Remove ref_desc_type_node init.
18097         * tinfo2.cc (__reference_type_info): Remove.
18099 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
18101         * decl.c (cp_finish_decl): Remove obsolete comment.
18103         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
18105 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
18107         * cp-tree.h: Tweak documentation.
18108         * class.c (build_vbase_pointer_fields): Layout the fields, too.
18109         (avoid_overlap): Remove.
18110         (get_binfo_offset_as_int): New function.
18111         (dfs_serach_base_offsets): Likewise.
18112         (layout_nonempty_base_or_field): Likewise.
18113         (build_base_field): Layout fields here.  Avoid placing two objects
18114         of the same type at the same address, under the new ABI.
18115         (build_base_fields): Adjust accordingly.
18116         (create_vtable_ptr): Return the new field, but don't attach it to
18117         TYPE_FIELDS.
18118         (remove_base_field): Remove.
18119         (remove_base_fields): Remove.
18120         (layout_basetypes): Adjust accordingly.
18121         (layout_class_type): Call layout_field for each field, rather than
18122         just making a wholesale call to layout_type.
18124 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
18126         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
18128 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
18130         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
18132         * except.c (dtor_nothrow): New fn.
18133         (do_pop_exception): Use it.  Take type parm.
18134         (push_eh_cleanup): Take type parm.
18135         (expand_start_catch_block): Pass it.
18136         (build_eh_type_type_ref): Accept null type.
18138 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
18140         * cp-tree.h (revert_static_member_fn): Change prototype.
18141         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
18142         (grok_op_properties): Likewise.
18143         (start_function): Likewise.
18144         (revert_static_member_fn): Simplify.
18145         * pt.c (check_explicit_specialization): Adjust call to
18146         revert_static_member_fn.
18148 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
18150         * cp-tree.h (scope_kind): New type.
18151         (tmpl_spec_kind): Likewise.
18152         (declare_pseudo_global_level): Remove.
18153         (pseudo_global_level_p): Rename to template_parm_scope_p.
18154         (pushlevel): Remove declaration.
18155         (begin_scope): New function.
18156         (finish_scope): Likewise.
18157         (current_tmpl_spec_kind): Likewise.
18158         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
18159         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
18160         Add template_spec_p.
18161         (toplevel_bindings_p): Adjust.
18162         (declare_pseudo_global_level): Remove.
18163         (pseudo_global_level_p): Rename to template_parm_scope_p.
18164         (current_tmpl_spec_kind): New function.
18165         (begin_scope): Likewise.
18166         (finish_scope): Likewise.
18167         (maybe_push_to_top_level): Adjust.
18168         (maybe_process_template_type_declaration): Likewise.
18169         (pushtag): Likewise.
18170         (pushdecl_nonclass_level): Likewise.
18171         (lookup_tag): Likewise.
18172         (grokfndecl): Handle member template specializations.  Share
18173         constructor and non-constructor code.
18174         * decl2.c (check_classfn): Handle member template specializations.
18175         * pt.c (begin_template_parm_list): Use begin_scope.
18176         (begin_specialization): Likewise.
18177         (end_specialization): Likewise.
18178         (check_explicit_specialization): Use current_tmpl_spec_kind.
18179         Handle member template specializations.
18180         (end_template_decl): Use finish_scope.  Remove call to
18181         get_pending_sizes.
18182         (push_template_decl_real): Remove bogus error message.
18183         (tsubst_decl): Fix typo in code contained in comment.
18184         (instantiate_template): Handle member template specializations.
18185         (most_general_template): Likewise.
18187 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
18189         * lex.c (whitespace_cr): Compress consecutive calls to warning().
18190         (do_identifier): Ditto for error().
18192         * pt.c (convert_nontype_argument): Ditto for cp_error().
18193         (convert_template_argument): Ditto for cp_pedwarn().
18195 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
18197         * exception.cc (__check_null_eh_spec): New fn.
18198         * except.c (expand_end_eh_spec): Call it if the spec is throw().
18200 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
18202         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
18203         * except.c (expand_end_eh_spec): Add the return type.
18204         * rtti.c (throw_bad_cast): Add the parmtypes.
18205         (throw_bad_typeid): Likewise.
18207         * semantics.c (expand_stmt): Only leave out rtl for unused
18208         artificials, and set DECL_IGNORED_P on them as well.
18209         * decl.c (wrapup_globals_for_namespace): Likewise.
18211 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
18213         * decl.c (maybe_commonize_var): Skip all artificial decls.
18214         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
18216 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
18218         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
18219         * cp-tree.h: Declare flag_enforce_eh_specs.
18220         * decl.c (store_parm_decls, finish_function): Check it.
18222         C library functions don't throw.
18223         * Makefile.in (cfns.h): New target.
18224         (except.o): Depend on it.
18225         * Make-lang.in (cc1plus): Depend on cfns.gperf.
18226         * cfns.gperf: New file.
18227         * cfns.h: Generated.
18228         * except.c: Include it.
18229         (nothrow_libfn_p): New fn.
18230         * decl.c (grokfndecl): Use it.
18231         * cp-tree.h: Declare it.
18233         * decl.c (push_overloaded_decl_1, auto_function,
18234         define_function): Lose.
18235         (build_library_fn_1): New static fn.
18236         (builtin_function): Use it.
18237         (get_atexit_node): Use build_library_fn_ptr.
18238         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
18239         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
18240         push_void_library_fn, push_throw_library_fn): New fns.
18241         * cp-tree.h: Declare them.
18242         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
18243         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
18244         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
18245         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
18246         * rtti.c (build_runtime_decl): Lose.
18247         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
18248         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
18249         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
18251         * call.c (build_call): Remove result_type parm.
18252         Call mark_used on unused artificial fns.
18253         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
18255 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
18257         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
18258         appropriate.
18259         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
18260         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
18261         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
18262         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
18263         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
18264         expand_generic_desc): Likewise.
18266 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18268         * exception.cc (__cp_pop_exception): Cleanup the original object.
18270 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18272         * decl.c (grok_op_properties): Merge conversion to void warning
18273         with other silly op warnings.
18275 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
18277         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
18278         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
18280 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18282         * decl.c (cp_make_fname_decl): New function.
18283         (wrapup_globals_for_namespace): Don't emit unused static vars.
18284         (init_decl_processing): Remove comment about use of
18285         array_domain_type. Set make_fname_decl.
18286         (cp_finish_decl): Remove __FUNCTION__ nadgering.
18287         * semantics.c (begin_compound_stmt): Remove
18288         current_function_name_declared flagging.
18289         (expand_stmt): Don't emit unused local statics.
18290         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
18291         specially.
18293 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
18295         * typeck.c (convert_for_assignment): Don't look at array
18296         initializer.
18297         * call.c (convert_like_real): Likewise.
18299 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
18301         Add initial support for '\uNNNN' specifier.
18302         * lex.c (read_ucs): New fn.
18303         (readescape, skip_white_space): Call it.
18304         (is_extended_char, is_extended_char_1): New fns.
18305         (utf8_extend_token): New fn, #if 0'd out.
18306         (real_yylex): Treat extended chars like letters.
18308         * search.c (note_debug_info_needed): Walk the bases even if we
18309         weren't deferring the type itself.
18311 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18313         * decl2.c (finish_objects): Constify a char*.
18315         * method.c (emit_thunk): Likewise.
18317 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
18319         * typeck.c (dubious_conversion_warnings): Look through
18320         REFERENCE_TYPE.
18322 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18324         * class.c (dfs_modify_vtables): I is now unsigned.
18325         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
18326         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
18327         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
18328         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
18329         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
18330         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
18331         Call integer_all_onesp.
18332         * typeck2.c (process_init_constructor): Use compare_tree_int.
18334         * lang-specs.h (as): Don't call if -syntax-only.
18336 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
18338         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
18339         RTL_EXPR_HAS_NO_SCOPE after all.
18341 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
18343         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
18344         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
18345         RTL_EXPR_HAS_NO_SCOPE.
18347         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
18348         later.
18350         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
18352 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
18354         * call.c (convert_like): Macrofy.
18355         (convert_like_with_context): New macro.
18356         (convert_like_real): Renamed from convert_like.  Add calling
18357         context parameters, for diagnostics. Add recursive flag.  Call
18358         dubious_conversion_warnings for outer conversion.
18359         (build_user_type_conversion): Use convert_like_with_context.
18360         (build_over_call): Likewise. Don't warn about dubious
18361         conversions here. Adjust convert_default_arg calls.
18362         (convert_default_arg): Add context parameters for diagnostics.
18363         Pass through to convert_like_with_context.
18364         * cp-tree.h (convert_default_arg): Add context parameters.
18365         (dubious_conversion_warnings): Prototype new function.
18366         * typeck.c (convert_arguments): Adjust convert_default_arg call.
18367         (dubious_conversion_warnings): New function, broken
18368         out of convert_for_assignment.
18369         (convert_for_assignment): Adjust.
18371 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
18373         * decl2.c (key_method): Break out from...
18374         (import_export_vtable, import_export_class): ...here.
18376         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
18377         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
18379         * search.c (note_debug_info_needed, dfs_debug_mark,
18380         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
18381         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
18383 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
18385         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
18386         typos.
18388 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
18390         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
18391         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
18392         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
18393         (lang_type): Split gets_new into has_new and has_array_new.
18394         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18395         (TYPE_GETS_NEW): Split into ...
18396         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
18397         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
18398         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
18399         (build_op_new_call): Don't declare.
18400         (build_new_1): Likewise.
18401         * call.c (build_op_new_call): Remove.
18402         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18403         instead of TYPE_NEEDS_DESTRUCTOR.
18404         (finish_struct_bits): Likewise.
18405         (add_implicitly_declared_members): Likewise.
18406         (check_field_decl): Likewise.
18407         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
18408         correctly under the new ABI.
18409         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
18410         instead of TYPE_NEEDS_DESTRUCTOR.
18411         (initialize_local_var): Likewise.
18412         (destroy_local_var): Likewise.
18413         (cp_finish_decl): Likewise.
18414         (register_dtor_fn): Likewise.
18415         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
18416         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
18417         TYPE_VEC_DELETE_TAKES_SIZE here.
18418         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
18419         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
18420         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18421         (finish_destructor_body): Likewise.
18422         (maybe_build_cleanup_1): Likewise.
18423         * decl2.c (do_static_destruction): Likewise.
18424         * init.c (build_new_1): Make it static.
18425         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18426         (expand_cleanup_for_base): Likewise.
18427         (get_cookie_size): New function.
18428         (build_new_1): Handle array-new cookies correctly under the new
18429         ABI.
18430         (build_vec_delete_1): Likewise.
18431         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18432         (build_delete): Likewise.
18433         (build_vec_delete): Handle array-new cookies correctly under the new
18434         ABI.
18435         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18436         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
18437         TYPE_HAS_ARRAY_NEW_OPERATOR.
18438         * ptree.c (print_lang_type): Check them.
18439         * search.c (context_for_name_lookup): Fix typo in comment.
18440         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
18441         * tree.c (break_out_cleanups): Likewise.
18442         (build_cplus_array_test_1): Likewise.
18443         (cp_build_qualified_type_real): Likewise.
18444         * typeck.c (complete_type): Likewise.
18446         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
18447         the command-line, not the end.
18449 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
18451         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
18453 2000-03-02  Tom Tromey  <tromey@cygnus.com>
18455         * cp-tree.h (build_java_class_ref): Declare.
18456         * init.c (build_java_class_ref): No longer static.
18457         * except.c (expand_throw): Generate a Java-style `throw' if the
18458         thrown object is a "Java" object.
18459         (initialize_handler_parm): Generate a Java-style lookup of
18460         exception info if the caught object is a "Java" object.
18461         (catch_language, catch_language_init): New globals.
18462         (decl_is_java_type): New function.
18463         (expand_start_catch_block): Don't call push_eh_info() or
18464         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
18465         class reference to build_catch_block.
18467 2000-03-02  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18469         * typeck.c (comptypes): Treat sizetype like its language equivalent.
18471 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
18473         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
18474         to merge reference/pointer code and fix incorrect warnings.
18476 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
18478         * search.c (protected_accessible_p): Use context_for_name_lookup.
18480         * init.c (construct_virtual_bases): Fix thinko.
18481         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
18483 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
18485         * decl.c (current_function_decl): Move to toplev.c.
18487 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
18489         * pt.c (fn_type_unification): Unify return type, whenever
18490         provided.
18491         (get_bindings_real): Only pass return type when necessary.
18492         Remove explicit return type check.
18493         * class.c (resolve_address_of_overloaded_function): Pass desired
18494         return type to fn_type_unification.
18496 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18498         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
18499         DECL_FIELD_SIZE.
18500         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
18501         DECL_FIELD_SIZE.
18502         * rtti.c (expand_class_desc): Likewise.
18503         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
18504         (THUNK_VCALL_OFFSET): Likewise.
18505         (THUNK_DELTA): Reflect changes in ../tree.h.
18507 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
18509         * search.c (protected_accessible_p): Also allow the access if
18510         the member is public in DERIVED.  Lose TYPE parm.
18511         (friend_accessible_p): Lose TYPE parm.
18512         (accessible_p): Adjust.
18514 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18516         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
18517         on things that are not sizes; ssize_binop deleted.
18518         Call size_diffop when appropriate.
18519         (dfs_build_vcall_offset_vtbl_entries): Likewise.
18520         (build_primary_vtable, build_secondary_vtable): Likewise.
18521         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
18522         Variable I is HOST_WIDE_INT.
18523         (get_vfield_offset): Pass proper types to size_binop.
18524         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
18525         (finish_struct_1): Likewise.
18526         (skip_rtti_stuff): Arg N is now pointer to signed.
18527         (layout_class_type): Use size_zero_node.
18528         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
18529         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
18530         * decl.c (complete_arry_type): Pass proper types to size_binop.
18531         (xref_basetypes): BINFO_OFFSET is sizetype.
18532         * error.c (dump_expr): Don't use size_binop non-sizes.
18533         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
18534         * init.c (construct_virtual_bases): Fix type error.
18535         (build_vec_delete_1): Pass proper type to size_binop and don't
18536         fold result.
18537         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
18538         * rtti.c (get_base_offset): Pass proper type to size_binop.
18539         * search.c (dfs_find_vbases): Fix type error.
18540         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
18541         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
18542         * tree.c (debug_binfo): Variable N is signed.
18543         Use HOST_WIDE_INT_PRINT_DEC.
18544         * typeck.c (comptypes): sizetype is same as equivalent integer type.
18545         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
18546         size_one_node and size_zero_node.
18547         (c_alignof): Use size_one_node.
18548         (build_component_addr): Pass proper types to size_binop.
18549         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
18551 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
18553         Implement class scope using-declarations for functions.
18554         * class.c (handle_using_decl): Call add_method for used functions.
18555         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
18556         (add_method): Used functions are hidden by local functions.
18557         (check_bases_and_members): Handle using-decls before finalizing
18558         CLASSTYPE_METHOD_VEC.
18559         * call.c (add_function_candidate): Add ctype parm; if nonzero,
18560         override the type of 'this' accordingly.
18561         (add_template_candidate, add_template_candidate_real): Add ctype parm.
18562         (convert_class_to_reference, build_user_type_conversion_1,
18563         build_new_function_call, build_object_call, build_new_op,
18564         build_new_method_call): Pass ctype parm.
18566         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
18567         the baselink.
18568         * call.c (convert_class_to_reference, build_user_type_conversion_1,
18569         build_new_function_call, build_object_call, build_new_op,
18570         build_new_method_call, build_op_delete_call): Don't get basetype_path
18571         from a baselink.
18572         * typeck.c (build_component_ref): Likewise.
18573         * init.c (build_offset_ref): Likewise.
18574         (resolve_offset_ref): Don't call enforce_access.
18575         Call build_scoped_ref.
18576         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
18577         would cause an error or if -pedantic.
18578         * class.c (alter_access): Lose binfo parm.
18580 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
18582         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
18583         types.
18585 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
18587         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
18588         pseudo_type_info creation into the std namespace
18590 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
18592         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
18593         (import_export_class): Remove declaration.
18594         * decl2.c (import_export_class): Make it static.
18595         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
18596         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
18597         EXPR_WITH_FILE_LOCATION.
18598         * lex.c (check_newline): Tweak filename/lineno setting.
18599         * semantics.c (begin_while_stmt): Fix typo in comment.
18601 2000-02-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18603         * lang-options.h (-fmessage-length=): Add missing option.
18605         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
18607 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
18609         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
18611 2000-02-25  Jim Wilson  <wilson@cygnus.com>
18613         * optimize.c (expand_call_inline): Emit the return label before
18614         evaluating the return value.
18616 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
18618         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
18619         than duplicating functionality here.
18620         * optimize.c: Include input.h.
18621         (expand_call_inline): Use push_srcloc and pop_srcloc.
18622         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
18623         * parse.c: Regenerated.
18624         * Makefile.in (lex.o): Depend on input.h.
18625         (optimize.o): Likewise.
18627 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
18629         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
18630         function type, rather than ICE.
18632 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
18634         * decl.c (grokdeclarator): Call decl_type_access_control.
18635         * parse.y (parse_end_decl): Don't call decl_type_access_control if
18636         decl is null.
18638 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
18640         * decl.c (decls_match): Remove obsolete static member nadgering.
18642 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
18644         * decl.c (grokdeclarator): Change ANSI to ISO.
18645         * lex.c (consume_string, readescape, do_identifier): Likewise.
18646         (parse_float, real_yylex): Likewise.
18647         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
18648         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
18649         new_type_id, maybe_label_decls, simple_stmt,
18650         for.init.statement): Likewise.
18651         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
18652         * semantics.c (finish_named_return_value): Likewise.
18653         * parse.c: Regenerate.
18655 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
18657         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
18658         (CPTI_CLASS_STAR_TYPE): Remove.
18659         (vtable_index_type): Likewise.
18660         (class_star_type_node): Remove.
18661         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
18662         (build_binary_op_nodefault): Remove.
18663         * call.c (build_new_op): Use build_binary_op instead of
18664         build_binary_op_nodefault.
18665         * decl.c (init_decl_processing): Remove class_star_type_node
18666         initialization.  Make delta_type_node ptrdiff_type_node under the
18667         new ABI.  Initialize vtable_index_type.
18668         (build_ptrmemfunc_type): Build different structures for the new
18669         ABI.
18670         (build_enumerator): Use build_binary_op instead of
18671         build_binary_op_nodefault.
18672         * method.c (build_overload_value): Mangle pointers-to-members
18673         appropriately under the new ABI.
18674         * typeck.c (build_array_ref): Use build_binary_op instead of
18675         build_binary_op_nodefault.
18676         (get_member_function_from_ptrfunc): Adjust for the new ABI.
18677         (build_binary_op_nodefault): Rename to ...
18678         (build_binary_op): ... this.  Remove old version.  Adjust for
18679         pointer-to-member comparisons under the new ABI.
18680         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
18681         (build_ptrmemfunc): Adjust for the new ABI.
18682         (expand_ptrmemfunc_cst): Likewise.
18683         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
18684         (pfn_from_ptrmemfunc): Adjust for the new ABI.
18686 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
18688         * call.c (build_object_call): Compress consecutive calls to
18689         cp_error.
18690         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
18691         (build_op_delete_call): Adjust message formatting.
18693         * class.c (check_bases): Compress consecutive calls to
18694         cp_pedwarn.
18695         (finish_struct_anon): Say 'ISO C++'.
18697         * decl.c (start_decl): Same here.
18698         (grok_reference_init): Likewise.
18699         (grokfndecl): Correct message formatting.
18700         (grokfndecl): Improve diagnostic.
18701         (check_static_variable_definition): Likewise. Say 'ISO C++'
18702         (compute_array_index_type): Say 'ISO C++'
18703         (create_array_type_for_decl): Compress consecutive calls to
18704         cp_error.
18705         (grokdeclarator): Say 'ISO C++'
18706         (grok_op_properties): Likewise.
18708         * decl2.c (delete_sanity): Clairify diagnostic.
18709         (check_member_template): Same here.
18710         (grok_function_init): Use consistent terminology.
18712         * expr.c (do_case): Say 'ISO C++'
18714         * friend.c (do_friend): Compress consecutive calls to warning.
18716 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
18718         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
18719         * class.c (build_secondary_vtable): Reorganize.  Don't create a
18720         new vtable under the new ABI.
18721         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
18722         computing the size.
18723         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
18724         the initializing elements.
18725         (initialize_vtable): New function.
18726         (dfs_finish_vtbls): Use it.
18727         (dfs_accumulate_vtbl_inits): New function.
18728         (finish_vtbls): Merge primary and secondary vtables under the new
18729         ABI.
18730         (finish_struct_1): Remove redundant call to layout_vtable_decl.
18731         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
18732         aren't VAR_DECLs.
18734         * class.c (build_vtable): New function, split out from ...
18735         (get_vtable_decl): ... here, and ...
18736         (build_secondary_vtable): ... here.
18738         * pt.c (tsubst_decl): Fix formatting.
18740 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
18742         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
18743         (avoid_overlap, build_base_field): Likewise.
18744         (build_base_field, build_base_fields, is_empty_class):
18745         Test DECL_SIZE with integer_zero.
18746         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
18747         * cp-tree.h (struct lang_type): New field size_unit.
18748         (CLASSTYPE_SIZE_UNIT): New macro.
18749         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
18750         (cp_finish_decl): Delete -Wlarger-than processing.
18751         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
18752         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
18753         * tree.c (make_binfo): binfo vector is one entry longer.
18754         (walk_tree): Walk DECL_SIZE_UNIT.
18756 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
18758         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
18759         comment.
18760         (build_vtable_entry): Don't assume all vtable entries are
18761         functions.
18762         (build_vtbl_initializer): Adjust accordingly.
18763         (get_vtable_decl): Fix formatting.
18765 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
18767         * semantics.c (deferred_type_access_control): Walk the entire
18768         type_lookups list.
18769         (save_type_access_control): Rename from
18770         initial_deferred_type_access_control.  Just remember the value.
18771         (decl_type_access_control): New fn.
18772         (begin_function_definition): Use deferred_type_access_control, after
18773         we've started the function.  Set type_lookups to error_mark_node.
18774         * parse.y (frob_specs, fn.def1): Adjust.
18775         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
18776         (parse_end_decl, parse_bitfield0, parse_method): New fns.
18777         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
18778         (after_type_component_declarator0): Likewise.
18779         (after_type_component_declarator): Likewise.
18780         (notype_component_declarator): Likewise.
18781         * cp-tree.h: Adjust.
18783         * decl.c (redeclaration_error_message): Allow redeclaration of
18784         namespace-scope decls.
18786 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
18788         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
18790 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
18792         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
18793         * decl2.c (grokclassfn): Likewise.
18795         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
18797         * decl2.c (lang_decode_option): Don't set default message length
18798         here.
18799         * lex.c (lang_init_options): Set it here.
18801 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
18803         Make DECL_CONTEXT mean the class in which a member function was
18804         declared, even for a virtual function.
18805         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
18806         (DECL_FRIEND_CONTEXT): New macro.
18807         (DECL_REAL_CONTEXT): Remove.
18808         (SET_DECL_FRIEND_CONTEXT): Likewise.
18809         (DECL_VIRTUAL_CONTEXT): Adjust.
18810         (DECL_CLASS_SCOPE_P): Use TYPE_P.
18811         (add_friends): Remove.
18812         (hack_decl_function_context): Likewise.
18813         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
18814         CP_DECL_CONTEXT.
18815         (build_over_call): Fix indentation.  Use DECL_CONTEXT
18816         instead of DECL_CLASS_CONTEXT.
18817         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
18818         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
18819         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18820         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
18821         (build_base_field): Likewise.
18822         (finish_struct_1): Likewise.
18823         (build_self_reference): Likewise.
18824         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
18825         DECL_REAL_CONTEXT.
18826         (pushtag): Use decl_function_context, not
18827         hack_decl_function_context.
18828         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18829         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
18830         (pushdecl): Remove bogus code.
18831         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
18832         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18833         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18834         Use decl_function_context, nothack_decl_function_context.
18835         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
18836         (grokdeclarator): Likewise.  Use decl_function_context, not
18837         hack_decl_function_context.
18838         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
18839         (start_function): Use DECL_FRIEND_CONTEXT, not
18840         DECL_CLASS_CONTEXT.  Use decl_function_context, not
18841         hack_decl_function_context.
18842         (finish_function): Use decl_function_context, not
18843         hack_decl_function_context.
18844         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
18845         DECL_CLASS_CONTEXT.
18846         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
18847         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
18848         (grokfield): Likewise.
18849         (finish_builtin_type): Likewise.
18850         (finish_vtable_vardec): Use decl_function_context, not
18851         hack_decl_function_context.
18852         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18853         (start_static_initialization_or_destruction): Likewise.
18854         (finish_static_initialization_or_destruction): Likewise.
18855         (mark_used): Adjust logic for deciding when to synthesize methods.
18856         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
18857         DECL_REAL_CONTEXT.
18858         * error.c (dump_function_decl): Use DECL_CONTEXT, not
18859         DECL_CLASS_CONTEXT.
18860         * friend.c (is_friend): Likewise.
18861         (add_friends): Remove.
18862         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
18863         * lex.c (begin_definition_of_inclass_inline): Use
18864         decl_function_context, not hack_decl_function_context.
18865         (process_next_inline): Likewise.
18866         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
18867         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
18868         DECL_CLASSS_CONTEXT.
18869         (hack_identifier): Likewise.
18870         (synthesize_method):  Use decl_function_context, not
18871         hack_decl_function_context.
18872         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
18873         DECL_REAL_CONTEXT.
18874         (is_member_template): Use decl_function_context, not
18875         hack_decl_function_context.  Use DECL_CONTEXT, not
18876         DECL_CLASS_CONTEXT.
18877         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
18878         DECL_CLASS_CONTEXT.
18879         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
18880         DECL_REAL_CONTEXT.
18881         (push_template_decl_real): Likewise.
18882         (instantiate_class_template): Don't call add_friends.
18883         (tsubst_default_argument): Use DECL_CONTEXT, not
18884         DECL_REAL_CONTEXT.
18885         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
18886         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18887         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
18888         DECL_CLASS_CONTEXT.
18889         * repo.c (repo_inline_used): Likewise.
18890         * search.c (current_scope): Adjust for new _CONTEXT macros.
18891         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
18892         DECL_REAL_CONTEXT.
18893         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
18894         (lookup_fnfields_here):Likewise.
18895         (check_final_overrider): Likewise.
18896         (init_vbase_pointers): Likewise.
18897         (virtual_context): Likewise.
18898         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
18899         (expand_body): Use decl_function_context, not
18900         hack_decl_function_context.
18901         * tree.c (hack_decl_function_context): Remove.
18902         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
18903         DECL_CLASS_CONTEXT.
18904         * typeck2.c (error_not_base_type): Likewise.
18906 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
18908         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
18910 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18912         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
18914 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
18916         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
18918 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
18920         * decl2.c (lang_decode_option): Enable automatic line wrapping.
18922 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
18924         * parse.y (frob_specs): Split out...
18925         (parse_decl): From here.
18926         (fn.def2): Call initial_deferred_type_access_control.
18927         (after_type_component_declarator0): Call frob_specs.
18928         (notype_component_declarator0): Likewise.
18929         * search.c (friend_accessible_p): Nested classes are friends of their
18930         enclosing classes.
18932 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
18934         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
18935         used to create an implicit temporary.
18937         * class.c (dfs_modify_vtables): Tweak calculation of functions to
18938         override.
18940 2000-02-08  Nathan Sidwell  <nathan@acm.org>
18942         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
18943         strip array element qualifiers too.
18945 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
18947         * decl.c (store_parm_decls): Don't build cleanups for parameters
18948         while processing_template_decl.
18950 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
18952         * cp-tree.h (struct saved_scope): Add incomplete field.
18953         (namespace_scope_incomplete): New macro.
18954         * decl.c (pushdecl): Use it.
18955         (hack_incomplete_structures): Use it.  See through artificial
18956         binding levels.
18957         (mark_saved_scope): Mark it.
18959         Implement access control for nested types.
18960         * search.c (type_access_control): New fn.
18961         (accessible_p): Now we do perform access control for types.
18962         * semantics.c (deferred_type_access_control): New fn.
18963         (initial_deferred_type_access_control): New fn.
18964         (begin_function_definition): Call it.  Add lookups parm.
18965         * decl.c (struct binding_level): Add this_class field.
18966         (pushlevel_class): Set it.
18967         (mark_binding_level): Mark it.
18968         (lookup_name_real): Use it.  Call type_access_control.
18969         (mark_saved_scope): Mark lookups field.
18970         * cp-tree.h (flagged_type_tree): Add lookups field.
18971         (struct saved_scope): Add lookups field.
18972         (type_lookups): New macro.
18973         * parse.y (declmods): Now <ftype>.
18974         (parse_decl): Add lookups parm.  Call
18975         initial_deferred_type_access_control.
18976         (lang_extdef): Clear type_lookups.
18977         (typed_declspecs, declmods, typespec): Set lookups field.
18978         (initdcl): Call deferred_type_access_control.
18979         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
18980         component_decl_1, named_parm): Adjust.
18981         * friend.c (is_friend): Nested classes are friends of their
18982         enclosing classes.
18984         * class.c (currently_open_derived_class): New fn.
18985         * method.c (hack_identifier): Use it.
18987         * lex.c (do_identifier): Remove obsolete code.
18989         * parse.y (typed_typespecs): Propagate new_type_flag properly.
18991 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
18993         * tinfo.h: Remove apostrophes from C++ comment (xgettext
18994         thinks this file is plain C).
18996 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18998         * Makefile.in (call.o): Depend on $(EXPR_H).
19000         * call.c: Include "expr.h".
19002         * class.c (dump_class_hierarchy): Add prototype.
19004         * search.c (dfs_get_pure_virtuals): Likewise.
19006 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
19008         * parse.y (simple_stmt): Allow :: token in asm parameter list.
19009         * parse.c: Rebuilt.
19011 2000-01-31  Jim Wilson  <wilson@cygnus.com>
19013         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
19014         Store it in DECL_FCONTEXT.
19015         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
19017 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
19019         * tinfo.h (old abi): #include "tconfig.h".
19020         * tinfo.cc (convert_to_base): Move into old abi section.
19022 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
19024         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
19025         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
19026         (BINFO_PRIMARY_BINFO): New macro.
19027         (BF_DELTA): Rename to ...
19028         (BV_DELTA): ... this.
19029         (BF_VCALL_INDEX): Rename to ...
19030         (BV_VCALL_INDEX): ... this.
19031         (BF_FN): Rename to ...
19032         (BV_FN): ... this.
19033         * class.c (build_vbase_path): Adjust for changes to reverse_path.
19034         (set_rtti_entry): Rename BF_ macros to BV_ variants.
19035         (modify_vtable_entry): Simplify.
19036         (add_virtual_function): Rename BF_ macros to BV_ variants.
19037         (build_vtable_initializer): Likewise.
19038         (get_class_offset_1): Remove.
19039         (dfs_get_class_offset): Likewise.
19040         (get_class_offset): Likewise.
19041         (dfs_find_final_overrider): New function.
19042         (find_final_overrider): Likewise.
19043         (modify_one_vtable): Remove.
19044         (dfs_find_base): New function.
19045         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
19046         find_final_overrider.
19047         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
19048         virtuals.
19049         (dfs_fixup_vtable_deltas): Remove.
19050         (override_one_vtable): Remove.
19051         (merge_overrides): Likewise.
19052         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
19053         unreal chilren of virtual bases.
19054         (finish_struct_1): Don't use merge_overrides.  Don't use
19055         dfs_fixup_vtable_deltas.
19056         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
19057         BINFOs.
19059 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
19060             Jason Merrill  <jason@yorick.cygnus.com>
19062         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
19064 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
19066         * exception.cc (__throw_bad_typeid): Add missing std::.
19068 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19070         * cp-tree.h (make_thunk): PROTO -> PARAMS.
19072 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
19074         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
19076         Runtime support for new-abi rtti.
19077         * inc/typeinfo (type_info::operator!=): Define in class.
19078         (type_info::before, type_info::name, type_info::operator==,
19079         type_info::operator!=): Define new ABI implementations.
19080         (type_info::is_pointer_p, type_info::is_function_p): Declare
19081         new virtual functions.
19082         (type_info::do_catch, type_info::do_upcast): Likewise.
19084         * tinfo.h (__base_class_info): Define new class.
19085         (__class_type_info): Likewise.
19086         (__si_class_type_info): Likewise.
19087         (__vmi_class_type_info): Likewise.
19088         (__dynamic_cast): Prototype.
19090         * tinfo.cc: Conditionalize old and new rtti mechanisms.
19091         (type_info::is_pointer_p): Define new function.
19092         (type_info::is_function_p): Likewise.
19093         (type_info::do_catch): Likewise.
19094         (type_info::do_upcast): Likewise.
19095         (vtable_prefix): New structure for vtable access.
19096         (adjust_pointer): Define new template function.
19097         (contained_p, public_p, virtual_p, contained_public_p,
19098         contained_nonpublic_p, contained_nonvirtual_p): Define new
19099         functions.
19100         (nonvirtual_base_type): New local variable.
19101         (__class_type_info::~__class_type_info): Define.
19102         (__si_class_type_info::~__si_class_type_info): Likewise.
19103         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
19104         (__class_type_info::do_catch): Define new function.
19105         (__class_type_info::do_upcast): Likewise.
19106         (__class_type_info::find_public_src): Likewise.
19107         (__class_type_info::do_find_public_src): Likewise.
19108         (__si_class_type_info::do_find_public_src): Likewise.
19109         (__vmi_class_type_info::do_find_public_src): Likewise.
19110         (__class_type_info::do_dyncast): Likewise.
19111         (__si_class_type_info::do_dyncast): Likewise.
19112         (__vmi_class_type_info::do_dyncast): Likewise.
19113         (__class_type_info::do_upcast): Likewise.
19114         (__si_class_type_info::do_upcast): Likewise.
19115         (__vmi_class_type_info::do_upcast): Likewise.
19116         (__dynamic_cast): Likewise.
19118         * tinfo2.cc (__fundamental_type_info): Define new class.
19119         (__pointer_type_info): Likewise.
19120         (__reference_type_info): Likewise.
19121         (__array_type_info): Likewise.
19122         (__function_type_info): Likewise.
19123         (__enum_type_info): Likewise.
19124         (__ptr_to_member_type_info): Likewise.
19125         (__fundamental_type_info::~__fundamental_type_info): Define.
19126         (__pointer_type_info::~__pointer_type_info): Likewise.
19127         (__reference_type_info::~__reference_type_info): Likewise.
19128         (__array_type_info::~__array_type_info): Likewise.
19129         (__function_type_info::~__function_type_info): Likewise.
19130         (__enum_type_info::~__enum_type_info): Likewise.
19131         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
19132         (__pointer_type_info::do_catch): Define new function.
19133         (__ptr_to_member_type_info::do_catch): Define new function.
19135         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
19136         (__is_pointer): Likewise.
19138         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
19140 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
19142         * cp/class.c (build_vtable): Rename to build_primary_vtable.
19143         (prepare_fresh_vtable): Rename to build_secondary_vtable.
19144         (make_new_vtable): New function.
19145         (modify_vtable_entry): Handle generation of new vtables correctly.
19146         (modify_one_vtable): Remove unused parameter.
19147         (dfs_fixup_vtable_deltas): Likewise.
19148         (override_one_vtable): Use build_secondary_vtable.
19149         (finish_struct_1): Use build_primary_vtable and
19150         build_secondary_vtable.
19152 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
19154         * cp/decl.c: Adjust variable names, comments, help strings.
19156 2000-01-29  Nathan Sidwell  <nathan@acm.org>
19158         * new2.cc (operator delete[]): Use operator delete, don't assume
19159         implementation.
19161 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
19163         * class.c (build_vtbl_initializer): Add argument to
19164         build_vtable_entry call.
19166 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
19168         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
19169         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
19170         (BF_DELTA): New macro.
19171         (BF_VCALL_INDEX): Likewise.
19172         (BF_FN): Likewise.
19173         (THUNK_VCALL_OFFSET): Likewise.
19174         (make_thunk): Change prototype.
19175         * class.c (build_vtable_entry): Integrate
19176         build_vtable_entry_for_fn.  Handle vcall indices.
19177         (build_vtable_entry_for_fn): Remove.
19178         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
19179         BF_VCALL_INDEX, BF_FN.
19180         (modify_vtable_entry): Integrate common code from
19181         modify_one_vtable and dfs_fixup_vtable_deltas.
19182         (add_virtual_function): Set BF_VCALL_INDEX.
19183         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
19184         and BF_FN.
19185         (modify_one_vtable): Simplify.
19186         (dfs_fixup_vtable_deltas): Likewise.
19187         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
19188         * method.c (make_thunk): Handle vcall indices.
19190 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
19192         Compiler side new abi rtti (not enabled).
19193         * cp-tree.h (new_abi_rtti_p): New macro.
19194         (emit_support_tinfos): Prototype new function.
19195         (tinfo_decl_p): Likewise.
19196         (emit_tinfo_decl): Likwise.
19197         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
19198         macros.
19199         (doing_runtime): New local static.
19200         (init_rtti_processing): Add new-abi initializer.
19201         (get_tinfo_decl): Add new-abi logic.
19202         (tinfo_from_decl): Likewise.
19203         (build_dynamic_cast_1): Likewise.
19204         (qualifier_flags): New static function.
19205         (tinfo_base_init): Likewise.
19206         (generic_initializer): Likewise.
19207         (ptr_ref_initializer): Likewise.
19208         (ptmd_initializer): Likewise.
19209         (class_hint_flags): Likewise.
19210         (class_initializer): Likewise.
19211         (synthesize_tinfo_var): Likewise.
19212         (create_real_tinfo_var): Likewise.
19213         (create_pseudo_type_info): Likewise.
19214         (get_vmi_pseudo_type_info): Likewise.
19215         (create_tinfo_types): Likewise.
19216         (emit_support_tinfos): New global function.
19217         (tinfo_decl_p): New global predicate.
19218         (emit_tinfo_decl): New global function.
19219         * class.c (set_rtti_entry): Generalize for old and new rtti.
19220         (build_vtbl_initializer): Likewise.
19221         * decl2.c (finish_file): Likewise.
19223 2000-01-27  Jim Wilson  <wilson@cygnus.com>
19225         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
19226         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
19228 2000-01-27  Mike Stump  <mrs@wrs.com>
19230         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
19231         for scopes.
19233 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
19235         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
19237 2000-01-26  J"orn Rennecke <amylaar@cygnus.co.uk>
19239         * optimize.c (calls_setjmp_r): Supply new argument
19240         to special_function_p.
19242 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19244         * call.c: PROTO -> PARAMS.
19245         * class.c: Likewise.
19246         * cp-tree.h: Likewise.
19247         * cvt.c: Likewise.
19248         * decl.c: Likewise.
19249         * decl.h: Likewise.
19250         * decl2.c: Likewise.
19251         * dump.c: Likewise.
19252         * errfn.c: Likewise.
19253         * error.c: Likewise.
19254         * except.c: Likewise.
19255         * expr.c: Likewise.
19256         * init.c: Likewise.
19257         * input.c: Likewise.
19258         * lex.c: Likewise.
19259         * lex.h: Likewise.
19260         * method.c: Likewise.
19261         * optimize.c: Likewise.
19262         * parse.y: Likewise.
19263         * pt.c: Likewise.
19264         * repo.c: Likewise.
19265         * rtti.c: Likewise.
19266         * search.c: Likewise.
19267         * semantics.c: Likewise.
19268         * spew.c: Likewise.
19269         * tree.c: Likewise.
19270         * typeck.c: Likewise.
19271         * typeck2.c: Likewise.
19272         * xref.c: Likewise.
19274 2000-01-25  Richard Henderson  <rth@cygnus.com>
19276         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
19278 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
19280         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
19281         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
19282         (struct vcall_offset_data_s): New type.
19283         (dfs_vcall_offset_queue_p): New function.
19284         (dfs_build_vcall_offset_vtbl_entries): Likewise.
19285         (build_vcall_offset_vtbl_entries): Likewise.
19286         (layout_vtable_decl): Likewise.
19287         (num_vfun_entries): Likewise.
19288         (num_extra_vtbl_entries): Add the entries for vcall offsets.
19289         (build_vtbl_initializer): Likewise.
19290         (dfs_finish_vtabls): Use layout_vtable_decl.
19291         (modify_one_vtables): Always duplicate vtables under the new ABI.
19292         (finish_struct_1): Use layout_vtable_decl.
19294 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19296         * decl.c (member_function_or_else): Change third arg from a format
19297         specifier to an `enum overload_flags'.  Callers changed.
19299 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
19301         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
19302         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
19303         build_const_cast, get_delta_difference, check_return_expr): Avoid
19304         ANSI string concatenation usage.
19306 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
19308         * class.c (layout_class_type): Put the fields required to make a
19309         class non-empty at the end, not the beginning, of the TYPE_FIELDs
19310         list.
19312 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
19314         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
19315         template.
19317         * decl2.c (mark_used): Do instantiate inlines that have been
19318         explicitly instantiated.
19320 2000-01-24  Richard Henderson  <rth@cygnus.com>
19322         * call.c (build_over_call): Use expand_tree_builtin.
19323         * typeck.c (build_function_call_real): Likewise.
19324         (build_binary_op_nodefault): Handle unordered compares.
19326 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19328         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
19329         cp_tree_index values.
19330         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
19331         New global node #defines for them.
19332         * rtti.c (call_void_fn): Replace with ...
19333         (build_runtime_decl): ... new static function.
19334         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
19335         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
19336         (build_dynamic_cast_1): Always produce correctly typed result.
19337         Explicitly produce type_info addresses. Use dynamic_cast_node.
19338         * exception.cc (__throw_bad_cast): Return `void *'.
19339         (__throw_bad_typeid): Return `const type_info &'.
19341 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19343         * cp-tree.h (get_vtable_decl): Prototype new function.
19344         * class.c (get_vtable_decl): New function. Broken out from ...
19345         (build_vtable): ... here. Use it.
19346         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
19347         by get_vtable_decl.
19349 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
19351         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
19352         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
19353         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
19354         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
19355         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
19356         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
19357         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
19358         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
19359         (CPTI_TINFO_VAR_ID): New enumeration.
19360         (__tp_desc_type_node, __access_mode_type_node,
19361         __bltn_desc_type_node, __user_desc_type_node,
19362         __class_desc_type_node, __ptr_desc_type_node,
19363         __attr_desc_type_node, __func_desc_type_node,
19364         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
19365         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
19366         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
19367         enum_desc_type_node, class_desc_type_node,
19368         si_class_desc_type_node, vmi_class_desc_type_node,
19369         ptmd_desc_type_node, base_desc_type_node): New #defines.
19370         (tinfo_fn_id, tinfo_fn_type): Rename to ...
19371         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
19372         (tinfo_var_id): New enumeration.
19373         (DECL_TINFO_FN_P): Augment comment.
19374         * decl.c (cp_global_trees): Adjust documentation.
19375         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
19376         tinfo_decl_type and tinfo_var_id.
19377         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
19378         (build_typeid): Remove unused variable.
19379         (get_tinfo_var): Use tinfo_var_id.
19380         (tinfo_name): New static function.
19381         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
19382         (tinfo_from_decl): Likewise.
19383         (get_base_offset): New static function, broken out of
19384         expand_class_desc.
19385         (expand_si_desc): Use tinfo_name.
19386         (expand_class_desc): Likewise. Lose local static variable.
19387         Use base_desc_type_node. Use get_base_offset.
19388         (expand_ptr_desc): Use tinfo_name.
19389         (expand_attr_desc): Likewise.
19390         (expand_generic_desc): Likewise.
19392         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
19393         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
19395 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
19397         * cp-tree.h (__eprintf): Remove declaration.
19398         * tree.c (__eprintf): Remove definition.
19400 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
19401             Mark Mitchell  <mark@codesourcery.com>
19403         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
19404         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
19406 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
19408         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
19410 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
19412         * cp-tree.h (register_dtor_fn): New function.
19413         * decl.c (destroy_local_static): Rename to ...
19414         (register_dtor_fn): ... this.  Give it external linkage.
19415         (expand_static_init): Use it.
19416         * decl2.c (do_static_initialization): Likewise, if using
19417         __cxa_atexit.
19418         (do_static_destruction): Check that __cxa_atexit is not in use.
19419         (finish_file): Don't call do_static_destruction if using
19420         __cxa_atexit.
19422         * typeck.c (convert_arguments): Restore two-message error
19423         reporting.
19425 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
19427         Remap dynamic cast hint values to be consistent across ABIs.
19428         * search.c (dynamic_cast_base_recurse): Remap generated value.
19429         (get_dynamic_cast_base_type): Adjust documentation.
19430         * tinfo.h (__user_type_info::dyncast): Likewise.
19431         (__user_type_info::find_public_subobj): Remap BOFF meaning.
19432         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
19433         (__class_type_info::do_dyncast): Likewise.
19434         (__class_type_info::do_find_public_subobj): Likewise.
19435         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
19437 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
19439         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
19441         * typeck2.c (incomplete_type_error): Restore previous
19442         cp_error and cp_error_at call sequence.
19444 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
19446         * class.c (dump_class_hierarchy): Make format agree with argument;
19447         cast pointer to unsigned long and print with %lx.
19449 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
19451         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
19453         * typeck.c (composite_pointer_type, common_type,
19454         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
19455         build_function_call_real, convert_arguments,
19456         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
19457         build_unary_op, mark_addressable, build_compound_expr,
19458         build_static_cast, build_reinterpret_cast, build_const_cast,
19459         build_c_cast, build_modify_expr, get_delta_difference,
19460         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
19461         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
19462         into a single one.
19463         * typeck2.c (readonly_error, abstract_virtuals_error,
19464         process_init_constructor, check_for_new_type): Likewise.
19466 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
19468         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
19469         VAR_DECLs.
19471 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
19473         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
19474         (build_x_typeid): Likewise.
19475         (get_tinfo_fn): Likewise.
19476         (get_tinfo_fn_unused): Rename to ...
19477         (get_tinfo_decl): ... here.
19478         * rtti.c (build_headof): Replace logic error with assertion.
19479         (get_tinfo_fn_dynamic): Rename to ...
19480         (get_tinfo_decl_dynamic): ... here. Make static. Use
19481         complete_type_or_else.
19482         (build_x_typeid): Move into ...
19483         (build_typeid): ... here. Adjust call to
19484         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
19485         throw_bad_typeid expression.
19486         (get_tinfo_fn_unused): Rename to ...
19487         (get_tinfo_decl): ... here. Adjust comment.
19488         (get_tinfo_fn): Delete.
19489         (tinfo_from_decl): New static function.
19490         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
19491         (get_typeid): Use complete_type_or_else.
19492         (build_dynamic_cast_1): Adjust calls to
19493         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
19494         * parse.y (primary): Adjust call to build_typeid.
19495         * except.c (build_eh_type_type_ref): Adjust call to
19496         get_tinfo_decl. Mark as used.
19497         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
19498         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
19499         * parse.c: Regenerated.
19501 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
19503         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
19504         calling convention.
19505         (resolves_to_fixed_type_p): Document calling convention.
19506         * rtti.c (build_x_typeid): Initialize NONNULL.
19508         * cp-tree.h (build_shared_int_cst): New function.
19509         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
19510         * class.c (modify_vtable_entry): Likewise.
19511         (add_virtual_function): Split out code to generated shared
19512         INTEGER_CSTs to build_share_int_cst.
19513         (modify_all_vtables): Handle all the overridden functions here.
19514         Add overridden functions from non-primary virtual bases to the
19515         primary vtable.
19516         (finish_struct_1): Adjust call to modify_all_vtables.  Add
19517         overridden functions from non-primary bases to the vtable.
19518         * tree.c (build_shared_int_cst): New function.
19520         * cp-tree.h (scratchalloc): Remove.
19521         (build_scratch_list): Likewise.
19522         * call.c (convert_class_to_reference): Replace build_scratch_list
19523         and build_expr_list with build_tree_list.
19524         (add_candidate): Replace scratchalloc with expralloc.  Note memory
19525         leak.
19526         (build_user_type_conversion_1):  Replace build_scratch_list
19527         and build_expr_list with build_tree_list.
19528         (build_new_op): Likewise.
19529         (build_op_delete_call): Likewise.
19530         (convert_like): Likewise.
19531         * cvt.c (ocp_convert): Likewise.
19532         * decl.c (start_decl): Likewise.
19533         (start_function): Likewise.
19534         (finish_destructor_body): Likewise.
19535         (maybe_build_cleanup_1): Likewise.
19536         * decl2.c (reparse_decl_as_expr): Likewise.
19537         * init.c (perform_member_init): Likewise.
19538         (expand_cleanup_for_base): Likewise.
19539         (build_builtin_delete_call): Likewise.
19540         (build_new_1): Likewise.
19541         (build_delete): Likewise.
19542         * method.c (do_build_assign_ref): Likewise.
19543         * parse.y (already_scoped_stmt): Likewise.
19544         (nontrivial_exprlist): Likewise.
19545         (net_initializer): Likewise.
19546         (initlist): Likewise.
19547         * parse.c: Regenerated.
19548         * rtti.c (build_x_typeid): Likewise.
19549         (build_dynamic_cast_1): Likewise.
19550         * typeck.c (build_x_compound_expr): Likewise.
19551         (build_static_cast): Likewise.
19552         (build_modify_expr): Likewise.
19554         * cp-tree.h (DECL_VINDEX): Add documentation.
19555         * class.c (build_vtable_entry): Likewise.
19556         (start_vtable): Add comment.
19557         (add_virtual_function): Replace pending_hard_virtuals with
19558         overridden_virtuals and pending_virtuals with new_virtuals.
19559         Replace redundant assignments with assertions.
19560         (check_for_override): Add comment.
19561         (check_bases_and_members): Replace pending_hard_virtuals with
19562         overridden_virtuals and pending_virtuals with new_virtuals.
19563         (create_vtbl_ptr): Likewise.
19564         (layout_class_type): Likewise.
19565         (finish_struct_1): Likewise.  Add comments.
19567 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
19569         * class.c (finish_struct_1): Replace redundant code with
19570         assertions.
19572         * cp-tree.h (flag_new_abi): Move.
19573         (flag_use_cxa_atexit): Likewise.
19574         (flag_honor_std): Likewise.
19575         (flag_rtti): Likewise.
19576         (vbase_offsets_in_vtable_p): Define.
19577         (vptrs_present_everywhere_p): Likewise.
19578         (TYPE_CONTAINS_VPTR_P): Likewise.
19579         (dfs_walk_real): Declare.
19580         * class.c (build_vbase_pointer_fields): Check
19581         vbase_offsets_in_vtable_p.
19582         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
19583         BINFO_VPTR_FIELD.
19584         (build_vbase_offset_vtbl_entries): Simplify.
19585         (build_vbase_offset_vtbl_entries): Adjust.
19586         (build_vbase_pointer): Add ability to look up vbase offsets in
19587         vtable.
19588         (start_vtable): New function.
19589         (add_virtual_function): Use it.
19590         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
19591         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
19592         (build_vtbl_initializer): Take the type of the complete object as
19593         input.  Use it to correctly calculate vbase offsets.
19594         (dfs_finish_vtbls): Pass the complete type to
19595         build_vtbl_initializer.
19596         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
19597         (create_vtable_ptr): Create a vtable even if there are no
19598         new virtual functions, under the new ABI.
19599         (finish_struct_1): Likewise.
19600         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
19601         * decl.c (exapnd_static_init): Remove call to
19602         preserve_initializer.
19603         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
19604         vtables.
19605         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
19606         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
19607         (construct_virtual_bases): Don't initialize virtual base pointers
19608         under the new ABI.
19609         (build_aggr_init): Clean up comment.
19610         (expand_aggr_init_1): Likewise.
19611         * rtti.c (expand_class_desc): Store the virtual function table
19612         index where the vbase offset lives in the offset field.
19613         * search.c (dfs_walk_real): Make it global.
19614         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
19615         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
19617         * tinfo.h (USItype): Make it signed under the new ABI.
19618         * tinfo.cc (convert_to_base): New function.  Encapsulate base
19619         conversion logic here.
19620         (__class_type_info::do_upcast): Use it.
19621         (__class_type_info::do_dyncast): Likewise.
19622         (__class_type_info::do_find_public_subobj): Likewise.
19624         * init.c (construct_virtual_bases): Don't look up the addresses of
19625         virtual bases at run-time.
19627         * class.c (build_vbase_pointer): Relocate.
19628         (build_vbase_pointer_fields): Likewise.
19629         (dfs_build_vbase_offset_vtbl_entries): Likewise.
19630         (build_vbase_offset_vtbl_entries): Likewise.
19632         * decl.c (init_decl_processing): Complain if -fnew-abi
19633         -fno-vtable-thunks is used.
19635         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
19636         flag_new_abi.
19638 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
19640         * cp-tree.h (num_extra_vtbl_entries): New function.
19641         (size_extra_vtbl_entries): Likewise.
19642         (dfs_vtable_path_unmark): Likewise.
19643         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
19644         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
19645         * class.c (num_extra_vtbl_entries): New function.
19646         (size_extra_vtbl_entries): Likewise.
19647         (dfs_build_vbase_offset_vtbl_entries): New function.
19648         (build_vbase_offset_vtbl_entries): Likewise.
19649         (build_vtbl_initializer): Use it.
19650         (finish_struct_1): Adjust vtable sizes (using
19651         num_extra_vtbl_entries).
19652         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
19653         THUNK_DECL is non-NULL before expanding it.
19654         * init.c (expand_virtual_init): Adjust the vtable pointer by
19655         size_extra_vtbl_entries before storing it.
19656         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
19657         Handle TREE_LIST parameters here, not in the dfs_* functions.
19658         (dfs_unmarked_real_bases_queue_p): Adjust.
19659         (dfs_marked_real_bases_queue_p): Likewise.
19660         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
19661         (dfs_vtable_path_marked_real_bases_queue_p): New function.
19662         (dfs_vtable_path_unmark): Likewise.
19664 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
19666         * optimize.c (copy_body_r): Clear the operand three of a
19667         TARGET_EXPR when copying it.
19669 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19671         * method.c (build_decl_overload_real): Check whether we are in ::
19672         before returning __builtin_new/delete.
19674 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
19676         * pt.c (tsubst_friend_function): Improve comment.
19677         (instantiate_decl): Avoid crashing when a "nested" function is
19678         instantiated from the top level.
19680         * dump.c (dqeueue_and_dump): Dump
19681         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
19683 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19685         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
19687 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
19689         * g++spec.c (lang_specific_driver): Add -fnew-abi if
19690         ENABLE_NEW_GXX_ABI defined.
19691         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
19692         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
19693         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
19695 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
19697         * decl.c (start_cleanup_fn): Call pushdecl.
19699         * call.c (convert_class_to_reference): Fix typos.
19700         (build_conditional_expr): Handle errors gracefully.
19701         * class.c (push_nested_class): Likewise.
19702         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
19703         (DECL_THIS_EXTERN): Use it.
19704         (DECL_THIS_STATIC): Likewise.
19705         * cvt.c (convert_to_void): Handle errors gracefully.
19706         (build_expr_type_conversion): Likewise.
19707         * decl.c (maybe_push_decl): Likewise.
19708         (start_decl_1): Likewise.
19709         (require_complete_types_for_parms): Likewise.
19710         * parse.y (structsp): Likewise.
19711         (base_class): Likewise.
19712         * parse.c: Regenerated.
19713         * pt.c (finish_member_template_decl): Likewise.
19714         * typeck.c (decay_conversion): Likewise.
19716         * cp-tree.h (dfs_skip_vbases): New function.
19717         (find_vbase_instance): Likewise.
19718         * class.c (determine_primary_base): Allow a nearly empty base to
19719         serve as a primary base class under the new ABI.
19720         (get_class_offset_1): Rename to ...
19721         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
19722         messages here.
19723         (get_class_offset): Use it.  Issue error messages here.
19724         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
19725         find the right copies of virtual bases.
19726         (fixup_vtable_deltas1): Rename to ...
19727         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
19728         bases as primary bases.
19729         (fixup_vtable_deltas): Remove.
19730         (override_one_vtable): Handle virtual bases as primary bases.
19731         (merge_overrides): Likewise.
19732         (finish_struct_1): Likewise.
19733         (dump_class_hierarchy): Dump primary-ness of bases as well.
19734         * search.c (mark_primary_bases): Use a pre-order traversal to
19735         handle primary virtual bases.
19736         (dfs_skip_vbases): New fiunction.
19737         (expand_upcast_fixups): Adjust to handle primary virtual bases.
19738         (fixup_virtual_upcast_offsets): Likewise.
19739         (fixup_all_virtual_upcast_offsets): Likewise.
19740         (dfs_find_vbase_instances): New function.
19741         (find_vbase_instance): Likewise.
19743 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
19745         * lex.c (DIR_SEPARATOR): Delete macro.
19747 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
19749        * decl2.c (lang_decode_option): Handle automatic line wrapping
19750        option.
19752 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
19754         * friend.c (do_friend): Don't resolve scopes when processing
19755         template declarations, even if the qualifying scope doesn't
19756         involve template parameters.
19758 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
19760         * class.c (dfs_modify_vtables_queue_p): Remove.
19761         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
19762         and dfs_marked_real_bases_queue_p instead of
19763         dfs_modify_vtables_queue_p.
19765         * class.c (build_vbase_path): Simplify.
19766         (dfs_propagate_binfo_offsets): New function.
19767         (propagate_binfo_offsets): Use it.
19768         (remove_base_field): Simplify.
19769         (dfs_set_offset_for_vbases): Remove.
19770         (dfs_set_offset_for_shared_vbases): New function.
19771         (dfs_set_offset_for_unshared_vbases): Likewise.
19772         (layout_virtual_bases): Use them.
19773         (layout_basetypes): Don't call propagate_binfo_offsets.
19774         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
19775         for the vbases.
19777         * class.c (build_base_field): New function, split out from ...
19778         (build_base_fields): ... here.  Use it.  Allocate primary bases
19779         first, under the new ABI.
19780         (get_vtable_entry): Remove.
19781         (remove_base_field): New function, split out from ...
19782         (remove_base_fields): ... here.  Adjust since primary bases come
19783         first under the new ABI.
19785         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
19786         (initialize_vtbl_ptrs): New function.
19787         (expand_indirect_vtbls_init): Change prototype.
19788         (convert_pointer_to_vbase): Declare.
19789         * init.c (expand_direct_vtbls_init): Remove.
19790         (dfs_initialize_vtbl_ptrs): New function.
19791         (initialize_vtbl_ptrs): Likewise.
19792         (emit_base_init): Use initialize_vtbl_ptrs.
19793         * search.c (convert_pointer_to_vbase): Make it global.
19794         (expand_indirect_vtbls_init): Remove vtable initialization code.
19795         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
19797         * class.c (dfs_finish_vtbls): New function.
19798         (finish_vtbls): Use it.
19799         (dump_class_hierarchy): New function.
19801         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
19802         (BINFO_VBASE_PRIMARY_P): New macro.
19803         (BINFO_VIRTUALS): Add to documentation.
19804         (SET_BINFO_PRIMARY_MARKED_P): Remove.
19805         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
19806         (dfs_mark_primary_bases_queue_p): Likewise.
19807         (dfs_unmarked_real_bases_queue_p): New function.
19808         (dfs_marked_real_bases_queue_p): Likewise.
19809         * search.c (dfs_mark_primary_bases): Adjust.
19810         (mark_primary_bases): Likewise.
19811         (get_shared_vbase_if_not_primary): New function.
19812         (dfs_unmarked_real_bases_queue_p): Likewise.
19813         (dfs_marked_real_bases_queue_p): Likewise.
19814         (dfs_get_pure_virtuals): Simplify.
19815         (get_pure_virtuals): Likewise.
19817 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19819         * lex.c: Include tm_p.h.
19821 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
19823         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
19825 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
19827         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
19828         * pt.c (instantiate_decl): Defer comdat templates that might not be
19829         needed.
19831         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
19832         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
19833         (finish_file): Likewise.
19835         * decl2.c (import_export_class): Undo 12/14 change.
19837         * error.c (dump_decl): operator new, not operatornew.
19839         * class.c (field_decl_cmp): A nontype is "greater" than a type.
19840         * search.c (lookup_field_1): Look for the last field with the
19841         desired name.
19843 2000-01-05  Nathan Sidwell  <nathan@acm.org>
19845         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
19846         FUNCTION_DECL.
19848 2000-01-05  Nathan Sidwell  <nathan@acm.org>
19850         * typeck.c (build_static_cast): Don't strip target qualifiers
19851         when casting from a class.
19853 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19855         * class.c (warn_hidden): Initialize variable `fndecl'.
19857 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
19859         * decl.c (flag_isoc9x): New variable to be able to use code in
19860         c-common.c.  For now always zero.
19862 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
19864         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
19865         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
19866         or unshare_base_binfos for virtual bases here.
19867         * search.c (dfs_get_vbase_types): Do it here.
19868         (get_vbase_types): Adjust.
19870 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
19872         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
19873         (BINFO_PRIMARY_MARKED_P): Use flag 5.
19874         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
19875         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
19876         (unmark_primary_bases): Remove declaration.
19877         (unmarkedp): Declare.
19878         (dfs_vbase_unmark): Likewise.
19879         * class.c (determine_primary_base): Return immediately if there
19880         are no base classes.  Call mark_primary_bases here.
19881         (modify_all_direct_vtables): Remove.
19882         (modify_all_indirect_vtables): Remove.
19883         (dfs_modify_vtables_queue_p): New function.
19884         (dfs_modify_vtables): New function.
19885         (modify_all_vtables): Use them.
19886         (build_base_fields): Build FIELD_DECLs for primary virtual base
19887         classes.
19888         (create_vtable_ptr): Don't call determine_primary_base here.
19889         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
19890         (dfs_set_offset_for_vbases): ... this.
19891         (layout_virtual_bases): Use it.
19892         (layout_class_type): Call determine_primary_base here.
19893         * search.c (unmarkedp): Make it global.
19894         (shared_marked_p): Simplify.
19895         (shared_unmarked_p): Likewise.
19896         (dfs_primary_bases_queue_p): Remove.
19897         (dfs_unmark_primary_bases): Likewise.
19898         (unmark_primary_bases): Likewise.
19899         (mark_primary_bases): Simplify.
19900         (get_pure_virtuals): Don't call mark_primary_bases here.
19901         (dfs_vbase_unmark): New function.
19902         (get_vbase_types): Simplify.
19904         * class.c (struct base_info): Remove.
19905         (determine_primary_base): Take has_virtual_p rather than a
19906         base_info as input.  Don't calculate max_has_virtual.
19907         (finish_struct_bits): Remove max_has_virtual argument.
19908         (create_vtable_ptr): Remove max_has_virtual_p argument.
19909         (layout_virtual_bases): Remove max argument.
19910         (layout_basetypes): Likewise.
19911         (layout_class_type): Remove max_has_virtual_p argument.
19912         (finish_struct_1): Remove max_has_virtual.
19914         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
19915         (layout_basetypes): Remove.
19916         * class.c (propagate_binfo_offsets): Moved here from tree.c.
19917         Update to handle primary virtual bases.
19918         (remove_base_fields): New function, split out from
19919         layout_basetypes.
19920         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
19921         (layout_virtual_bases): New function, split out from
19922         layout_basetypes.  Update to handle primary virtual bases.
19923         (layout_basetypes): Moved here from tree.c.  Use
19924         remove_base_fields and layout_virtual_bases.
19925         * search.c (dfs_mark_primary_bases_queue_p): New function.
19926         (mark_primary_bases): Use it.
19927         * tree.c (CEIL): Remove.
19928         (propagate_binfo_offsets): Remove.
19929         (layout_basetypes): Remove.
19931 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
19933         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
19934         (BINFO_PRIMARY_MARKED_P): New macro.
19935         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
19936         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
19937         (mark_primary_bases): New function.
19938         (unmark_primary_bases): Likewise.
19939         * search.c (get_abstract_virtuals_1): Remove.
19940         (dfs_mark_primary_bases): New function.
19941         (mark_primary_bases): Likewise.
19942         (dfs_unmark_primary_bases): Likewise.
19943         (unmark_primary_bases): Likewise.
19944         (dfs_get_pure_virtuals): Likewise.
19946 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
19948         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
19949         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
19950         (modify_one_vtable): Adjust.
19951         (fixup_vtable_deltas1): Likewise.
19952         (override_one_vtable): Likewise.
19953         * search.c (get_abstract_virtuals_1): Likewise.
19954         (get_pure_virtuals): Likewise.
19955         (expand_upcast_fixups): Likewise.
19956         * tree.c (debug_binfo): Likewise.
19958         * class.c (build_vtable): Don't return a value.  Don't rebuild
19959         vtables for bases that have already been handled.
19960         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
19961         already been handled.
19962         (modify_one_vtable): Adjust accordingly.
19963         (fixup_vtable_deltas1): Likewise.
19964         (finish_struct_1): Likewise.
19966 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
19968         * call.c (build_new_method_call): Also check destructors.