decl.c (build_enumerator): Remove unneeded test.
[official-gcc.git] / gcc / cp / ChangeLog
blob9f739eecd39c51a7cb92d6b4e7cd9d4eda6e03a2
1 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
3         * decl.c (build_enumerator):  Remove unneeded test.
5 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
7         * cp-tree.h (struct lang_type_header): Make all fields unsigned
8         char.
10 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
12         PR c++/7129
13         * call.c (z_candidate): Add args.
14         (convert_class_to_reference): Set it.
15         (implicit_conversion): Tidy.
16         (add_candidate): Add args parameter.
17         (add_function_candidate): Adjust call to add_candidate.
18         (add_conv_candidate): Likewise.
19         (build_builtin_candidate): Likewise.
20         (build_user_type_conversion_1): Eliminate wasteful tree_cons
21         usage.
22         (build_new_function_call): Likewise.
23         (build_object_call): Likewise.
24         (add_candidates): New function.
25         (build_new_op): Use it.
26         (covert_like_real): Adjust call to build_over_call.
27         (build_over_call): Remove args parameter.
28         * operators.def: Add <?= and >?=.
30 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
32         * typeck.c (build_indirect_ref): Don't check flag_volatile.
34 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
36         PR c++/8849
37         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
39 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
41         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
42         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
43         (BINFO_LANG_ELTS): New #define.
44         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
46 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
48         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
50 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
52         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
53         for class types.
54         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
55         rather than TYPE_LANG_FLAG_0.
56         (TYPE_BUILT_IN): Remove.
57         (TYPE_DEPENDENT_P): New macro.
58         (TYPE_DEPENDENT_P_VALID): Likewise.
59         (lang_type_class): Add fields_readonly.
60         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
61         * pt.c (dependent_type_p_r): New function, split out from ...
62         (dependent_type_p): ... here.  Memoize results.
63         * search.c (dependent_base_p): Use dependent_type_p, not
64         uses_template_parms.
65         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
66         for class types.
68 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
70         * call.c (build_field_call): Use build_new_op, not build_opfncall.
71         (prep_operand): New function.
72         (build_new_op): Use it.  Remove dead code.
73         * class.c (pushclass): Change "modify" parameter type from int to
74         bool.
75         (currently_open_class): Use same_type_p, not pointer equality.
76         (push_nested_class): Adjust calls to pushclass, remove modify
77         parameter.
78         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
79         (pushclass): Change prototype.
80         (push_nested_class): Likewise.
81         (grokoptypename): Remove.
82         (build_opfncall): Remove.
83         (value_dependent_expression_p): Declare.
84         (resolve_typename_type): Likewise.
85         (resolve_typename_type_in_current_instantiation): Likewise.
86         (enter_scope_of): Remove.
87         (tsubst): Remove.
88         (tsubst_expr): Likewise.
89         (tsubst_copy): Likewise.
90         (tsubst_copy_and_build): Likewise.
91         * decl.c (warn_about_implicit_typename_lookup): Remove.
92         (finish_case_label): Return error_mark_node for erroneous labels.
93         (start_decl): Adjust calls to push_nested_class.
94         (grokfndecl): Call push_scope/pop_scope around call to
95         duplicate_decls.
96         (grokdeclarator): Do not call tsubst.
97         (start_function): Adjust calls to push_nested_class.
98         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
99         (check_classfn): Use push_scope/pop_scope around type comparisions.
100         (grokoptypename): Remove.
101         (push_sscope): Adjust call to push_nested_class.
102         * error.c (dump_type): Show cv-qualification of typename types.
103         * init.c (build_member_call): Use build_new_op, not
104         build_opfncall.
105         * method.c (build_opfncall): Remove.
106         * parser.c (cp_parser): Add allow_non_constant_expression_p and
107         non_constant_expression_p.
108         (cp_parser_constant_expression): Adjust prototype.
109         (cp_parser_resolve_typename_type): Remove.
110         (cp_parser_non_constant_expression): New function.
111         (cp_parser_non_constant_id_expression): Likewise.
112         (cp_parser_new): Set allow_non_constant_expression_p and
113         non_constant_expression_p.
114         (cp_parser_primary_expression): Reject `this' and `va_arg' in
115         constant-expressions.  Note that dependent names aren't really
116         constant.
117         (cp_parser_postfix_expression): Reject conversions to non-integral
118         types in constant-expressions.  Neither are increments or
119         decrements.
120         (cp_parser_unary_expression): Reject increments and decrements in
121         constant-expressions.
122         (cp_parser_direct_new_declarator): Adjust call to
123         cp_parser_constant_expression.
124         (cp_parser_cast_expression): Reject conversions to non-integral
125         types in constant-expressions.
126         (cp_parser_assignment_expression): Rejects assignments in
127         constant-expressions.
128         (cp_parser_expression): Reject commas in constant-expressions.
129         (cp_parser_labeled_statement): Adjust call to
130         cp_parser_constant_expression.
131         (cp_parser_direct_declarator): Simplify array bounds, even in
132         templates, when they are non-dependent.  Use
133         resolve_typename_type, not cp_parser_resolve_typename_type.
134         (cp_parser_class_head): Use resolve_typename_type, not
135         cp_parser_resolve_typename_type.
136         (cp_parser_member_declaration): Adjust call to
137         cp_parser_constant_expression.
138         (cp_parser_constant_initializer): Likewise.
139         (cp_parser_constructor_declarator): Use resolve_typename_type, not
140         cp_parser_resolve_typename_type.
141         (cp_parser_late_parsing_default_args): Adjust call to
142         push_nested_class.
143         * pt.c (tsubst): Give it internal linkage.
144         (tsubst_expr): Likewise.
145         (tsubst_copy): Likewise.
146         (tsubst_copy_and_build): Likewise.
147         (push_access_scope_real): Likewise.
148         (tsubst_friend_class): Likewise.
149         (instantiate_class_template): Adjust call to pushclass.
150         (value_dependent_expression_p): Give it external linkage.
151         Robustify.
152         (resolve_typename_type): New function.
153         * semantics.c (finish_call_expr): Use build_new_op, not
154         build_opfncall.
155         (begin_constructor_declarator): Remove.
156         (begin_class_definition): Adjust call to pushclass.
157         (enter_scope_of): Remove.
158         * typeck.c (comptypes): Resolve typename types as appropriate.
159         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
160         (build_x_compound_expr): Likewise.
161         (build_modify_expr): Likewise.
162         (build_x_modify_expr): Likewise.
163         * typeck2.c (build_x_arrow): Likewise.
164         
165 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
167         * pt.c (last_pending_template) Declare GTY().
169 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
171         PR c++/8591
172         * parser.c (cp_parser_elaborated_type_specifier): Convert
173         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
174         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
176 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
178         PR c++/9437
179         * pt.c (unify): Don't unify '*T' with 'U C::*'.
181         PR c++/3902
182         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
183         inside a declarator.
185 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
187         * class.c (update_vtable_entry_for_fn): Add index parameter.
188         Generate vcall thunk for covariant overriding from a virtual
189         primary base.
190         (dfs_modify_vtables): Adjust.
192 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
194         PR c++/9403
195         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
196         template keyword.
197         (cp_parser_base_specifier): Look for and consume a
198         TEMPLATE keyword. Replace switch with array index.
200         PR c++/795
201         * semantics.c (finish_non_static_data_member): Remember the
202         field's type even in a template.
204         PR c++/9415
205         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
206         already scoped.
207         
208         PR c++/8545
209         * parser.c (cp_parser_cast_expression): Be more tentative.
211 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
213         * cp-tree.h (flagged_type_tree_s): Remove.
214         (check_for_new_type): Likewise.
215         * typeck2.c (check_for_new_type): Likewise.
217 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
219         * dump.c: ANSIfy function declarations and definitions.
221         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
223 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
225         PR c++/9354
226         * init.c (build_new): Set the type of the new-expression, even
227         when processing_templte_decl.
229         PR c++/9216
230         * parser.c (cp_parser_primary_expression): Improve error message
231         for templates used in an expression context.
233         PR c++/8696
234         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
235         parse when encountering "typedef".
237 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
239         * class.c, parser.c: ANSIfy function definitions and declarations.
241 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
243         PR c++/9328
244         * error.c (dump_decl): For an OVERLOAD, just print the name of the
245         function; it doesn't make sense to try to print its type.
246         * semantics.c (finish_typeof): Issue errors about invalid uses.
248         PR c++/9298
249         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
250         function.
251         (cp_parser_expression_statement): Use it.
252         (cp_parser_explicit_instantiation): Likewise.
253         * pt.c (do_decl_instantiation): Improve error handling logic.
254         
255 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
257         PR c++/9384
258         * parser.c (cp_parser_using_declaration): Issue error messages
259         about name resolution failures here.
261         PR c++/9388
262         * class.c (currently_open_derived_class): Use dependent_type_p.
263         * cp-tree.h (dependent_type_p): New function.
264         (dependent_template_arg_p): Likewise.
265         (dependent_template_p): Likewise.
266         (type_dependent_expression_p): Likewise.
267         * parser.c (cp_parser_dependent_type_p): Remove.
268         (cp_parser_value_dependent_type_p): Likewise.
269         (cp_parser_type_dependent_expression_p): Likewise.
270         (cp_parser_dependent_template_arg_p): Likewise.
271         (cp_parser_dependent_template_id_p): Likewise.
272         (cp_parser_dependent_template_p): Likewise.
273         (cp_parser_diagnose_invalid_type_name): Replace
274         cp_parser_dependent_type_p with dependent_type_p, etc.
275         (cp_parser_primary_expresion): Likewise.
276         (cp_parser_nested_name_specifier_opt): Likewise.
277         (cp_parser_postfix_expression): Likewise.
278         (cp_parser_unary_expression): Likewise.
279         (cp_parser_template_name): Likewise.
280         (cp_parser_class_name): Likewise.
281         (cp_parser_lookup_name): Likewise.
282         * pt.c (dependent_type_p): New function.
283         (value_dependent_expression_p): Likewise.
284         (type_dependent_expression_p): Likewise.
285         (dependent_template_arg_p): Likewise.
286         (dependent_template_id_p): Likewise.
287         (dependent_template_p): Likewise.
288         
289         PR c++/9285
290         PR c++/9294
291         * parser.c (cp_parser_simple_declaration): Return quickly when
292         encountering errors.
294 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
296         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
298 2003-01-17  Jason Merrill  <jason@redhat.com>
300         PR c++/9167, c++/9358
301         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
303 2003-01-17  Jason Merrill  <jason@redhat.com>
305         PR c++/9342
306         * call.c (build_conditional_expr): Always do lvalue-rvalue
307         conversion.
309 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
311         PR c++/9294
312         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
313         * cp-tree.h (BASELINK_BINFO): Adjust.
314         (BASELINK_FUNCTIONS): Likewise.
315         (BASELINK_ACCESS_BINFO): Likewise.
316         (tree_baselink): New structure.
317         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
318         (lang_tree_node): Add baselink.
319         * decl.c (cp_tree_node_structure): Add BASELINK case.
320         * search.c (build_baselink): Adjust.
321         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
322         test from TREE_LIST case.
324         PR c++/9272
325         * parser.c (cp_parser_constructor_declarator_p): Do not assume
326         that a constructor cannot be declared outside of its own class.
327         
328         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
329         be resolved, neither can the qualified name.
331         * rtti.c (get_pseudo_ti_desc): Fix thinko.
333 2003-01-16  Jason Merrill  <jason@redhat.com>
335         PR c++/8564
336         * init.c (build_vec_init): Re-add maxindex parm.
337         (perform_member_init, build_aggr_init): Pass it.
338         (build_new_1): Pass it. Use an incomplete array type for full_type.
339         * typeck.c (build_modify_expr): Pass it.
340         * cp-tree.h: Adjust.
342 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
344         * cp-tree.h (tsubst_copy_and_build): New declaration.
345         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
346         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
347         (tsubst_copy_and_build): New function.
349 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
351         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
352         (PARTIAL_INSTANTIATION_P): Remove.
353         (IMPLICIT_TYPENAME_P): Likewise.
354         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
355         (build_typename_type): Remove declaration.
356         (parmlist_is_exprlist): Likewise.
357         * decl.c (build_typename_type): Make it static, remove third
358         parameter.
359         (push_class_binding): Don't do implicit typename stuff.
360         (make_typename_type): Likewise.
361         (lookup_name_real): Likewise.
362         (grokdeclarator): Don't try to convert declarations into
363         initializations.  Don't do implicit typename stuff.
364         (parmlist_is_exprlist): Remove.
365         (xref_basetypes): Simplify.
366         * decl2.c (grokfield): Don't try to convert declarations into
367         initializations.
368         (build_anon_union_vars): Do this while processing templates, too.
369         (finish_anon_union): Likewise.
370         * error.c (dump_type): Remove implicit typename handling.
371         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
372         (cp_parser_primary_expression): Correct handling of names not
373         found by unqualified name lookup in templates.
374         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
375         of types when possible.
376         (cp_parser_simple_declaration): Complain intelligently about some
377         invalid declarations.
378         (cp_parser_member_declaration): Likewise.
379         (cp_parser_constructor_declarator_p): Don't check when we're in a
380         function scope.
381         * pt.c (instantiate_class_template): Remove
382         PARTIAL_INSTANTIATION_P gunk.
383         * search.c (lookup_field_r): Don't build implicit typenames.
384         (marked_pushdecls_p): Don't enter dependent base types.
385         (unmarked_pushdecls_p): Likewise.
386         * semantics.c (begin_class_definition): Remove implicit typename
387         stuff.
389 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
391         PR c++/9212
392         * parser.c (cp_parser_direct_declarator): If accepting either
393         abstract or named, the name must be an unqualified-id.
395 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
397         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
399 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
401         * decl2.c (check_classfn): Fix uninitialized warning.
402         (build_anon_union_vars): Likewise.
403         * pt.c (tsubst_copy): Likewise.
405 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
407         Further conform g++'s __vmi_class_type_info to the C++ ABI
408         specification.
409         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
410         the specification.
411         (class_hint_flags): Likewise.
413 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
415         * config-lang.in: Add semantics.c to gtfiles.
416         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
417         (saved_scope): Likewise.
418         (type_lookups): Remove.
419         (deferred_access): New structure.
420         (type_access_control): Remove.
421         (save_type_access_control): Likewise.
422         (reset_type_access_control): Likewise.
423         (decl_type_access_control): Likewise.
424         (push_deferring_access_checks): Declare.
425         (resume_deferring_access_checks): Likewise.
426         (stop_deferring_access_checks): Likewise.
427         (pop_deferring_access_checks): Likewise.
428         (get_deferred_access_checks): Likewise.
429         (pop_to_parent_deferring_access_checks): Likewise.
430         (perform_deferred_access_checks): Likewise.
431         (perform_or_defer_access_check): Likewise.
432         * decl.c (make_typename_type): Use perform_or_defer_access_check.
433         (make_unbound_class_template): Likewise.
434         (grokdeclarator): Don't call decl_type_access_control.
435         * parser.c (cp_parser_context): Remove deferred_access_checks
436         and deferring_access_checks_p fields.
437         (cp_parser_context_new): Adjust.
438         (cp_parser): Remove access_checks_lists.
439         (cp_parser_defer_access_check): Remove.
440         (cp_parser_start_deferring_access_checks): Remove.
441         (cp_parser_stop_deferring_access_checks): Remove.
442         (cp_parser_perform_deferred_access_checks): Remove.
443         (cp_parser_nested_name_specifier_opt): Use new deferred access
444         functions.
445         (cp_parser_simple_declaration): Likewise.
446         (cp_parser_template_id): Likewise.
447         (cp_parser_function_definition): Likewise.
448         (cp_parser_class_specifier): Likewise.
449         (cp_parser_lookup_name): Likewise.
450         (cp_parser_single_declaration): Likewise.
451         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
452         (cp_parser_parse_tentatively): Likewise.
453         (cp_parser_parse_definitely): Likewise.
454         (yyparse): Likewise.
455         (cp_parser_init_declarator): Remove access_checks parameter.
456         Use new deferred access functions.
457         (cp_parser_function_definition_from_specifiers_and_declarator):
458         Likewise.
459         (cp_parser_class_head): Remove deferring_access_checks_p and
460         saved_access_checks parameters.  Use new deferred access functions.
461         (cp_parser_member_specification_opt): Don't call
462         reset_type_access_control.
463         * search.c (type_access_control): Remove.
464         * semantics.c: Include "gt-cp-semantics.h".
465         (deferred_type_access_control): Remove.
466         (deferred_access_stack): New variable.
467         (deferred_access_free_list): Likewise.
468         (push_deferring_access_checks): New function.
469         (resume_deferring_access_checks): Likewise.
470         (stop_deferring_access_checks): Likewise.
471         (pop_deferring_access_checks): Likewise.
472         (get_deferred_access_checks): Likewise.
473         (pop_to_parent_deferring_access_checks): Likewise.
474         (perform_deferred_access_checks): New function, adapted from
475         cp_parser_perform_deferred_access_checks.
476         (perform_or_defer_access_check): New function, adapted from
477         cp_parser_defer_access_check.
478         (current_type_lookups): Remove.
479         (deferred_type_access_control): Likewise.
480         (decl_type_access_control): Likewise.
481         (save_type_access_control): Likewise.
482         (reset_type_access_control): Likewise.
483         (begin_function_definition): Adjust.
484         (begin_class_definiton): Likewise.
486 2003-01-13  Jason Merrill  <jason@redhat.com>
488         PR c++/8748
489         * class.c (build_base_path): Take the address before calling save_expr.
491         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
492         all the ambiguous conversions are bad.
494         * class.c (maybe_warn_about_overly_private_class): Don't stop
495         searching when we find a nonprivate method.
497         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
499 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
501         * cp-tree.h (get_arglist_len_in_bytes): Remove.
503         PR c++/9264
504         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
505         typeame types more robustly.
507 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
509         * parser.c:  Fix comment typos.
511 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
513         PR c++/9099
514         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
515         an object_type which is not a class type.
517 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
519         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
520         (cp_parser_late_parsing_default_args): Likewise.
522 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
524         * cfns.gperf: ANSIfy function declarations.
525         * cfns.h: Regenerate.
526         * cp-tree.h: ANSIfy function declarations.
528 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
530         * cp-tree.h (reparse_absdcl_as_expr): Remove.
531         (reparse_absdcl_as_casts): Likewise.
532         (reparse_decl_as_expr): Likewise.
533         (finish_decl_parsing): Likewise.
534         * decl2.c (reparse_absdcl_as_expr): Remove.
535         (reparse_absdcl_as_casts): Likewise.
536         (repase_decl_as_expr): Likewise.
537         (finish_decl_parsing): Likewise.
539         PR c++/9128
540         PR c++/9153
541         PR c++/9171
542         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
543         function.
544         (cp_parser_nested_name_specifier_opt): Correct the
545         check_dependency_p false.
546         (cp_parser_postfix_expression): Fix formatting.
547         (cp_parser_decl_specifier_seq): Avoid looking for constructor
548         declarators when possible.
549         (cp_parser_template_id): Avoid performing name-lookup when
550         possible.
551         (cp_parser_class_head): Do not count specializations when counting
552         levels of templates.
553         (cp_parser_constructor_declarator_p): Return immediately if
554         there's no chance that the tokens form a constructor declarator.
555         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
556         expression with reference type.
557         (get_tinfo_decl_dynamic): Do not return an expression with
558         reference type.
559         (build_typeid): Add comment.  Do not return an expression with
560         reference type.
561         * typeck.c (build_class_member_access_expr): Improve handling of
562         conditionals and comma-expressions as objects.
564 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
566         * cfns.gperf: ANSIfy function declarations.
567         * cfns.h: Regenerate.
568         * cp-tree.h: ANSIfy function declarations.
569         * parser.c: ANSIfy function declarations & definitions.
571         * decl.c (bad_specifiers): Fix parameter order error I introduced.
573 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
575         Merge from pch-branch:
577         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
579         Merge to tag pch-merge-20030102:
580         
581         * semantics.c (finish_translation_unit): Don't call finish_file.
582         * parser.c: Don't include ggc.h.
583         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
584         read first token here.  Don't allow PCH files after the first
585         token is read.
586         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
587         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
588         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
589         (cp_parser_late_parsing_for_member): Don't duplicate call to
590         cp_lexer_set_source_position_from_token.
591         (cp_parser_late_parsing_default_args): Likewise.
592         (yyparse): Call finish_file after clearing the_parser.
594         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
596         * Make-lang.in: Remove $(GGC_H) from all dependencies.
597         (CXX_TREE_H): Add $(GGC_H).
598         * class.c: Don't include ggc.h. 
599         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
600         (method_name_cmp): Likewise.
601         (resort_data): New variable.
602         (resort_field_decl_cmp): New.
603         (resort_method_name_cmp): New.
604         (resort_sorted_fields): New.
605         (resort_type_method_vec): New.
606         (finish_struct_methods): Delete cast.
607         (finish_struct_1): Delete cast.
608         * cp-tree.h: Include ggc.h.
609         (struct lang_type_class): Add reorder attribute to field `methods'.
610         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
611         (resort_sorted_fields): New prototype.
612         (resort_type_method_vec): New prototype.
613         * call.c: Don't include ggc.h.
614         * decl.c: Likewise.
615         * decl2.c: Likewise.
616         * init.c: Likewise.
617         * lex.c: Likewise.
618         * method.c: Likewise.
619         * optimize.c: Likewise.
620         * parse.y: Likewise.
621         * pt.c: Likewise.
622         * repo.c: Likewise.
623         * search.c: Likewise.
624         * semantics.c: Likewise.
625         * spew.c: Likewise.
626         * tree.c: Likewise.
628         * lang-specs.h: Remove comment.
630         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
632         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
633         (operator_name_info): Mark to be saved for PCH, specify size.
634         (assignment_operator_name_info): Likewise.
636         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
638         * decl.c (anon_cnt): Mark to be saved for PCH.
640         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
642         * lex.c  (init_reswords): Delete now-untrue comment.
643         Allocate ridpointers using GGC.
645         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
647         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
649         * g++spec.c (lang_specific_driver): Don't include standard
650         libraries in `added'.
652         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
654         * decl2.c (finish_file): Call c_common_write_pch.
655         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
657         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
659         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
660         files when using g++.
661         * lang-specs.h: Handle compiling C++ header files.
663 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
665         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
667 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
669         * pt.c (push_access_scope_real): Call push_to_top_level for
670         function in namespace scope.
671         (pop_access_scope): Call pop_from_top_level for function in
672         namespace scope.
674 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
676         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
678 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
680         * Make-lang.in (c++.install-common, c++.install-man,
681         c++.uninstall): Prepend $(DESTDIR) to destination paths in
682         all (un)installation commands.
683         (c++.install-common): Rewrite $(LN) commands to support
684         DESTDIR with "ln" as well as with "ln -s".
686 2003-01-08  Jason Merrill  <jason@redhat.com>
688         * parser.c (cp_parser_primary_expression): See through explicitly
689         scoped ALIAS_DECLs, too.
691 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
693         * decl.c: Remove some #if 0 code.
695         * decl.c: ANSIfy function declarations.
697 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
699         * parser.c (cp_parser_asm_definition): Correct handling of omitted
700         operands.
702 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
704         PR c++/9030
705         * decl.c (make_typename_type): Check access only when tf_error.
706         (make_unbound_class_template): Likewise.
707         * pt.c (saved_access_scope): New variable.
708         (push_access_scope_real): New function.
709         (push_access_scope): Likewise.
710         (pop_access_scope): Likewise.
711         (tsubst_default_argument): Use them.
712         (instantiate_template): Likewise.
713         (regenerate_decl_from_template): Likewise.
714         (instantiate_decl): Likewise.
715         (get_mostly_instantiated_function_type): Likewise.
717 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
719         * tree.c: Delete bogus #if 0 code.
721 2003-01-07  Andreas Schwab  <schwab@suse.de>
723         * class.c (layout_class_type): Don't use
724         PCC_BITFIELD_TYPE_MATTERS if not defined.
726 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
728         PR c++/9165
729         * decl2.c (build_cleanup): Mark the object as used.
731         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
732         (hash_local_specialization): New function.
733         (register_local_specialization): Revert 2003-01-05 change.
734         (instantiate_decl): Use hash_local_specialization when creating
735         the local_specializations table.
736         
737         * decl2.c (mark_used): Do not synthesize thunks.
739         * class.c (layout_class_type): Correct handling of unnamed
740         bitfields wider than their types.
742         PR c++/9189
743         * parser.c (cp_parser): Remove default_arg_types.  Update
744         documentation for unparsed_functions_queues.
745         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
746         parameter.
747         (cp_parser_new): Don't set parser->default_arg_types.
748         (cp_parser_function_definition): Adjust usage of
749         unparsed_funtions_queues.
750         (cp_parser_class_specifier): Don't mess with
751         parser->default_arg_types.  Handle default argument processing in
752         a separate phase from function body processing.
753         (cp_parser_template_declaration_after_export): Adjust usage of
754         unparsed_functions_queues.
755         (cp_parser_late_parsing_for_member): Do not handle default
756         arguments.
758 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
760         PR c++/9109
761         * parser.c (cp_parser_declarator_kind): New enum.
762         (cp_parser_declarator): Adjust.
763         (cp_parser_direct_declarator): Adjust. Allow for either named or
764         abstract declarator. Prefer abstract, if possible. Allow
765         parenthesized function name.
766         (cp_parser_condition): Adjust cp_parser_declarator call.
767         (cp_parser_explicit_instantiation): Likewise.
768         (cp_parser_init_declarator): Likewise.
769         (cp_parser_type_id): Likewise.
770         (cp_parser_function_definition): Likewise.
771         (cp_parser_member_declaration): Likewise.
772         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
773         the tentative parsing.
774         (cp_parser_exception_declaration): Likewise.
776 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
778         * parser.c (cp_parser_template_parameter): Adjust call to
779         cp_parser_parameter_declaration.
780         (cp_parser_parameter_declaration_list): Likewise.
781         (cp_parser_parameter_declaration): Replace
782         greater_than_is_operator_p with template_parm_p parameter.  Do not
783         cache tokens for template default arguments.
785         * pt.c (retrieve_local_specialization): Use htab_find, not
786         htab_find_with_hash.
787         (register_local_specialization): Use htab_find_slot, not
788         htab_find_slot_with_hash.
789         (instantiate_decl): Pass a hash function to htab_create.
790         
791 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
793         * parser.c (cp_parser_binary_expression,
794         cp_parser_multiplicative_expression,
795         cp_parser_additive_expression, cp_parser_shift_expression,
796         cp_parser_relational_expression, cp_parser_equality_expression,
797         cp_parser_and_expression, cp_parser_exclusive_or_expression,
798         cp_parser_inclusive_or_expression,
799         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
800         cp_parser_binary_expression): Const-ify.
802 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
804         * method.c (use_thunk): Disable access control while building the
805         body of the thunk.
807 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
809         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
810         front end.
812 2003-01-03  Matt Austern  <austern@apple.com>
814         * cp-tree.h (struct lang_type_class): add field for key method
815         (cp_global_trees): rename dynamic_classes to keyed_classes
816         (key_method): add definition
817         * class.c (finish_struct_1): compute class's key method, and add
818         the class to keyed_classes list if there is no key method.
819         * decl.c (finish_function): add class to keyed_classes list if we
820         see a definition of the class's key method.
821         * pt.c (instantiate_class_template): add template specialization
822         of a dynamic class to keyed_classes list.
823         * decl2.c (key_method): remove
824         (finish_file): iterate only through keyed_classes list when
825         deciding whether to emit vtables, remove class from its list after
826         we do the emission.
827         
828 2003-01-02  Jason Merrill  <jason@redhat.com>
830         * call.c (build_conditional_expr): Stabilize lvalues properly.
831         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
832         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
833         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
835         * call.c (convert_like_real): Call decl_constant_value for an
836         IDENTITY_CONV even if there are no more conversions.
838         * cvt.c (build_up_reference): Don't push unnamed temps.
840         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
842         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
843         for a backend struct.
845         * except.c (wrap_cleanups_r, build_throw): Make
846         MUST_NOT_THROW_EXPRs void.
847         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
849         * init.c (build_vec_delete_1): Pre-evaluate the base address.
851         * init.c (get_temp_regvar): Simplify logic.
853         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
854         our replacement is a decl.
856         * decl.c (cp_make_fname_decl): Push the decls inside the
857         outermost scope.
859 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
861         PR c++/45, c++/3784
862         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
863         the same too.
865 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
867         * parser.c (struct cp_parser): Add access_checks_lists field
868         (cp_parser_simple_declaration): Use.
869         (cp_parser_init_declarator): Likewise. 
871 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
873         * parser.c (cp_parser_declaration): Accept the __extension__
874         keyword before the declaration.
876         PR c++/2843
877         * parser.c (cp_parser_parameter_declaration): Allow attributes to
878         appear after the declarator.
880         * call.c (build_new_method_call): Fix typo in message format
881         string.
883 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
885         * parser.c (cp_lexer_next_token_is): Declare it inline.
886         (cp_lexer_set_source_position_from_token): Likewise.
887         (cp_lexer_debugging_p): Likewise.
888         (cp_parser_parsing_tentatively): Likewise.
889         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
890         to the cp_lexer_peek_token.
892         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
893         expression.
895 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
897         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
898         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
899         cp/repo.c: Fix copyright years.
901 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
903         * lex.c: Remove superfluous include of cpplib.h.
904         (CONSTRAINT): Define without conditions.
905         (init_cp_pragma): Use c_register_pragma.
907 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
909         * .cvsignore: Remove.
911 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
913         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
914           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
915           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
916           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
917           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
918           copyright header.
919         * lex.h: parse.y is dead, so don't mention it.  Also replace the
920           copyright header with the default GNU copyright header.
922 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
924         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
925         (lookup_name_namespace_only): Likewise.
926         (begin_only_namespace_names): Likewise.
927         (end_only_namespace_names): Likewise.
928         * decl.c (only_namespace_names): Remove.
929         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
930         (lookup_name_real): Do not check only_namespace_names.
931         (lookup_name_namespace_only): Remove.
932         (begin_only_namespace_names): Likewise.
933         (end_only_namespace_names): Likewise.
934         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
935         nested-name-specifiers more gracefully.
936         (cp_parser_class_or_namespace_name): Avoid looking up namespace
937         names when they cannot possibly appear.
938         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
939         (cp_parser_elaborated_type_specifier): Likewise.
940         (cp_parser_namespace_name): Only look for namespace names.
941         (cp_parser_lookup_name): Add is_namespace parameter.
942         (cp_parser_lookup_name_simple): Adjust call to
943         cp_parser_lookup_name.
945         * parser.c (cp_parser_dependent_type_p): Fix thinko.
947 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
949         * .cvsignore: Update.
951 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
953         * class.c (modify_vtable_entry): Remove unused variable.
954         (get_vcall_index): Always expect a non-thunk.
955         (update_vtable_entry_for_fn): Combine covariant adjustments, when
956         overriding a thunk. Pass get_vcall_index a non-thunk.
958         * decl2.c (finish_file): Mark undefined inlines as extern.
960 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
962         * cp-tree.def (RETURN_INIT): Remove.
963         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
964         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
965         (note_level_for_for): Remove.
966         (note_level_for_try): Likewise.
967         (note_level_for_catch): Likewise.
968         (finish_named_return_value): Likewise.
969         (do_pushlevel): Change prototype.
970         (pending_lang_change): Remove.
971         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
972         sk_for.
973         (note_level_for_for): Remove.
974         (note_level_for_try): Likewise.
975         (note_level_for_catch): Likewise.
976         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
977         * parser.c (cp_parser_context_free_list): Make it "deletable".
978         (cp_parser_template_argument): Remove misleading comment.
979         * pt.c (tsubst_expr): Remove RETURN_INIT code.
980         * semantics.c (genrtl_named_return_value): Remove.
981         (do_pushlevel): Take a scope kind as an argument.
982         (begin_if_stmt): Adjust.
983         (begin_while_stmt): Likewise.
984         (begin_for_stmt): Likewise.
985         (finish_for_init_stmt): Likewise.
986         (begin_switch_stmt): Likewise.
987         (begin_handler): Likewise.
988         (begin_compound_stmt): Likewise.
989         (finish_named_return_value): Remove.
990         (cp_expand_stmt): Remove RETURN_INIT case.
991         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
993 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
995         PR c++/9112
996         * parser.c (cp_parser_direct_declarator): Handle erroneous
997         parenthesized declarators correctly.
999 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1001         * cp-tree.h (pending_lang_change): Declare.
1003 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1005         * parser.c (cp_parser_context_free_list): New variable.
1006         (cp_parser_context_new): Use it.
1007         (cp_parser_error): Check return code from
1008         cp_parser_simulate_error.
1009         (cp_parser_simulate_error): Return a value.
1010         (cp_parser_id_expression): Optimize common case.
1011         (cp_parser_class_name): Likewise.
1012         (cp_parser_class_specifier): Adjust call to
1013         cp_parser_late_parsing_default_args.
1014         (cp_parser_lookup_name): Optimize common case.
1015         (cp_parser_late_parsing_for_member): Adjust call to
1016         cp_parser_late_parsing_default_args.
1017         (cp_parser_late_parsing_default_args): Add scope parameter.
1018         (cp_parser_require): Avoid creating the error message unless it's
1019         needed.
1020         (cp_parser_parse_definitely): Place free'd contexts on the free
1021         list.
1023         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
1025 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
1027         * parser.c (cp_parser_parameter_declaration_clause): Treat system
1028         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
1030 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1032         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
1033         GCC, not GNU CC.
1035 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1037         * parse.y: Remove.
1038         * spew.c: Likewise.
1039         * Make-lang.in (gt-cp-spew.h): Remove.
1040         * cp-tree.h (do_pending_lang_change): Remove.
1041         (do_identifier): Change prototype.
1042         (finish_id_expr): Remove.
1043         * decl.c (lookup_name_real): Remove yylex variable.
1044         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
1045         * lex.c (init_cpp_parse): Remove.
1046         (reduce_cmp): Likewise.
1047         (token_cmp): Likewise.
1048         (yychar): Likewise.
1049         (lastiddecl): Likewise.
1050         (token_count): Likewise.
1051         (reduce_count): Likewise.
1052         (yyhook): Likewise.
1053         (print_parse_statistics): Likewise.
1054         (do_pending_lang_change): Likewise.
1055         (do_identifier): Remove parsing parameter.
1056         * lex.h (lastiddecl): Remove.
1057         (looking_for_typename): Remove.
1058         (looking_for_template): Likewise.
1059         (pending_lang_change): Likewise.
1060         (yylex): Likewise.
1061         * semantics.c (finish_id_expr): Remove.
1063         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
1064         thread" correctly.
1066 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1068         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
1069         end, not the C front end.
1071 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
1073         * cp-tree.h (THUNK_TARGET): New macro.
1074         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
1075         (finish_thunk): Remove offset parms.
1076         * class.c (find_final_overrider): Look through thunks.
1077         (get_vcall_index): Use THUNK_TARGET.
1078         (update_vtable_entry_for_fn): Look through thunks. Set covariant
1079         fixed offset here. Adjust finish_thunk call.
1080         (build_vtbl_initializer): Adjust finish_thunk calls.
1081         * mangle.c (mangle_call_offset): Remove superfluous if.
1082         (mangle_thunk): Adjust.
1083         * method.c (make_thunk): Adjust.
1084         (finish_thunk): Adjust.
1085         (thunk_adjust): Remove assert.
1086         (use_thunk): Use THUNK_TARGET
1087         * dump1.c (cp_dump_tree): Adjust thunk dumping.
1089         PR c++/9054
1090         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
1091         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
1093 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1095         Remove traditional C constructs 4/n.
1096         * decl2.c (grok_method_quals, warn_if_unknown_interface,
1097         grok_x_components, cp_build_parm_decl, build_artificial_parm,
1098         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
1099         delete_sanity, check_member_template, check_java_method,
1100         check_classfn, finish_static_data_member_decl, grokfield,
1101         grokbitfield, grokoptypename, grok_function_init,
1102         cplus_decl_attributes, constructor_name, defer_fn,
1103         build_anon_union_vars, finish_anon_union, coerce_new_type,
1104         coerce_delete_type, comdat_linkage, maybe_make_one_only,
1105         key_method, import_export_vtable, import_export_class,
1106         output_vtable_inherit, import_export_decl, import_export_tinfo,
1107         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
1108         set_guard, start_objects, finish_objects,
1109         start_static_storage_duration_function,
1110         finish_static_storage_duration_function, get_priority_info,
1111         start_static_initialization_or_destruction,
1112         finish_static_initialization_or_destruction,
1113         do_static_initialization, do_static_destruction,
1114         prune_vars_needing_no_initialization, write_out_vars,
1115         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
1116         add_using_namespace, merge_functions, ambiguous_decl,
1117         lookup_using_namespace, lookup_using_namespace,
1118         qualified_lookup_using_namespace, set_decl_namespace,
1119         decl_namespace, current_decl_namespace, push_decl_namespace,
1120         pop_decl_namespace, push_scope, pop_scope, add_function,
1121         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
1122         lookup_arg_dependent, do_namespace_alias,
1123         validate_nonmember_using_decl, do_nonmember_using_decl,
1124         do_toplevel_using_decl, do_local_using_decl,
1125         do_class_using_decl, do_using_directive, check_default_args,
1126         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
1127         * parser.c (cp_parser_class_head): Use booleanss.
1128         * decl.c (walk_globals, walk_vtables): Likewise.
1129         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
1130         walk_globals): Change return type from 'int' to 'bool'.
1131         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
1132         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
1133         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
1134         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
1135         qualifier_flags, tinfo_base_init, generic_initializer,
1136         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
1137         dfs_class_hint_unmark, class_hint_flags, class_initializer,
1138         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
1139         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
1140         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
1141         * repo.c (repo_compile_flags, repo_template_declared,
1142         repo_template_defined, repo_class_defined, repo_get_id,
1143         repo_template_used, repo_vtable_used, repo_inline_used,
1144         repo_tinfo_used, repo_template_instantiated, extract_string,
1145         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
1146         finish_repo): Likewise.
1147         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
1148         cxx_print_xnode): Likewise..
1149         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
1150         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1151         * cxxfilt.c (demangle_it, print_demangler_list, usage,
1152         standard_symbol_characters, hp_symbol_characters, main, fatal):
1153         Likewise.
1154         (strip_underscore):  Change type from 'int' to 'bool'.
1155         (main): Use boolean constants.
1157 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1159         Remove traditional C constructs 3/n.
1160         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1161         build_up_reference, warn_ref_binding, convert_to_reference,
1162         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
1163         convert_to_void, convert, convert_force, build_type_conversion,
1164         build_expr_type_conversion, type_promotes_to,
1165         perform_qualification_conversions): Use C90 prototyping style.
1166         * decl2.c (grok_array_decl): Use boolean constant.
1167         (delete_sanity): Likewise.
1168         * typeck.c (build_unary_op): Likewise.
1169         * semantics.c (finish_switch_cond): Likewise.
1170         * parser.c (cp_parser_direct_new_declarator): Likewise.
1171         * init.c (build_new): Likewise.
1173 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
1175         * Make-lang.in (po-generated): Remove parse.c.
1176         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
1177         ($(srcdir)/cp/parse.h): Remove target.
1178         ($(srcdir)/cp/parse.c): Likewise.
1179         (gt-cp-parse.h): Likewise.
1180         (gt-cp-parser.h): New target.
1181         (c++.distclean): Do not remove parse.output.
1182         (c++.maintainer-clean): Do not remove parse.c or parse.h.
1183         (cp/spew.o): Remove target.
1184         (cp/lex.o): Adjust dependencies.
1185         (cp/pt.o): Likewise.
1186         (cp/parse.o): Likewise.
1187         (cp/TAGS): Do not mention parse.c.
1188         (cp/parser.o): New target.
1189         * NEWS: Mention the new parser.
1190         * call.c (build_scoped_method_call): Simplify.
1191         (build_method_call): Likewise.
1192         (build_new_function_call): Adjust calls to add_function_candidate
1193         and add_template_candidate.
1194         (build_new_op): Improve handling of erroroneous operands.
1195         (convert_default_arg): Remove circular argument processing.
1196         (name_as_c_string): New function.
1197         (build_new_method_call): Use it.
1198         (perform_implicit_conversion): Use error_operand_p.
1199         * class.c (finish_struct_anon): Use constructor_name_p.
1200         (check_field_decls): Likewise.
1201         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
1202         (resolve_address_of_overloaded_function): Likewise.
1203         (instantiate_type): Tweak pointer-to-member handling.
1204         (get_primary_binfo): Remove incorrect assertion.
1205         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
1206         * cp-tree.h (DEFARG_TOKENS): New macro.
1207         (default_arg): New structure.
1208         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
1209         (lang_tree_node): Add default_arg.
1210         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
1211         (type_info_ref_type): New macro.
1212         (saved_scope): Make processing_explicit_instantiation a boolean.
1213         (check_access): New field.
1214         (unparsed_text): Remove.
1215         (language_function): Remove unparsed_inlines.
1216         (error_operand_p): New macro.
1217         (lang_decl): Adjust pending_inline_info.
1218         (DEFARG_POINTER): Remove.
1219         (tag_types): Add typenames.
1220         (lookup_ualified_name): Declare.
1221         (lookup_name_real): Likewise.
1222         (shadow_tag): Adjust prototype.
1223         (get_scope_of_declarator): Declare it.
1224         (process_next_inline): Remove it.
1225         (check_for_missing_semicolon): Likewise.
1226         (maybe_get_template_decl_from_type_decl): Declare it.
1227         (finish_label_stmt): Adjust prototype.
1228         (finish_non_static_data_meber): Declare it.
1229         (finish_pseudo_destructor_call_expr): Rename to ...
1230         (finish_pseudo_destructor_expr): ... this.
1231         (finish_compound_literal): Declare it.
1232         (begin_inline_definitions): Remove it.
1233         (init_spew): Remove.
1234         (peekyylex): Likewise.
1235         (arbitrate_lookup): Likewise.
1236         (frob_opname): Likewise.
1237         (maybe_snarf_defarg): Likewise.
1238         (add_defarg_fn): Likewise.
1239         (do_pending_defargs): Likewise.
1240         (done_pending_defargs): Likewise.
1241         (unprocessed_defarg_fn): Likewise.
1242         (replace_defarg): Likewise.
1243         (end_input): Likewise.
1244         (get_overloaded_fn): Likewise.
1245         * cvt.c (convert_to_reference): Improve error handling.
1246         * decl.c (lookup_name_real): Do not declare it static.
1247         (maybe_push_to_top_level): Set check_access.
1248         (identifier_type_value): Adjust call to lookup_name_real.
1249         (lookup_qualified_name): New method.
1250         (lookup_name_real): Remove special-case parsing code.
1251         (lookup_name-nonclass): Adjust call to lookup_name_real.
1252         (lookup_name_namespace_only): Likewise.
1253         (lookup_name): Likewise.
1254         (check_tag_decl): Return the type declared.
1255         (shadow_tag): Likewise.
1256         (register_dtor_fn): Tweak check_access.
1257         (grokfndecl): Use constructor_name_p.
1258         (get_scope_of_declarator): New function.
1259         (grokdeclarator): Obscure tweaks for slightly different declarator
1260         representations.
1261         (start_method): Return error_mark_node to indicate failure.
1262         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
1263         * decl2.c (constructor_name_full): Simplify.
1264         (constructor_name): Use it.
1265         (build_expr_from_tree): Adjust for changes to do new parser.
1266         (push_scope): Improve robustness.
1267         (validate_nonmember_using_decl): Process declarations, not names.
1268         (do_class_using_decl): Likewise.
1269         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
1270         here.
1271         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
1272         * expr.c (cxx_expand_expr): Handle BASELINKs.
1273         * init.c (member_init_ok_or_else): Issue more errors.
1274         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
1275         * lex.c: Do not include parse.h.
1276         (yypring): Do not declare.
1277         (yylval): Likewise.
1278         (make_reference_declarator): Remove error-generating code.
1279         (rid_to_yy): Remove.
1280         (cxx_init): Do not call init_spew.
1281         (yypring): Remove.
1282         (check_for_missing_semicolon): Remove.
1283         * lex.h (got_scope): Remove.
1284         (got_object): Remove.
1285         * method.c (hack_identifier): Use finish_non_static_data_member.
1286         (implicitly_declare_fn): Adjust use of constructor_name.
1287         * parser.c: New file.
1288         * pt.c (parse.h): Do not include it.
1289         (maybe_get_template_decl_from_template): Do not declare it.
1290         (finish_member_template_decl): Tweak.
1291         (begin_explicit_instantiation): Adjust for
1292         processing_explicit_instantiation being boolean.
1293         (end_explicit_instantiation): Likewise.
1294         (maybe_process_partial_specialization): Tighten specialization
1295         test.
1296         (retrieve_local_specialization): Adjust ue of hash table.
1297         (eq_local_specializations): New function.
1298         (register_local_specialization): Likewise.
1299         (push_template_decl_real): Remove unnecessary test.
1300         (maybe_get_template_decl_from_type_decl): Don't make it static.
1301         (for_each_template_parm_r): Handle TYPEOF_TYPE.
1302         (tsubst_copy): Use retrieive_local_specialization to handle
1303         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
1304         Handle COMPONENT_REFs with pseudo-destructor-expressions.
1305         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
1306         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
1307         (unify): Tweak handling of CONST_DECLs.
1308         (regenerate_decl_from_template): Use push_nested_class.
1309         (template_for_substitution): New funciton.
1310         (instantiate_decl): Use it.  Register parameters as local
1311         specializations.
1312         * rtti.c (init_rtti_processing): Set type_info_ref_type.
1313         (build_typeid): Use it.
1314         (get_typeid): Likeise.
1315         * search.c (accessible_p): Use check_access, not
1316         flag_access_control.
1317         (adjust_result_of_qualified_name_lookup): Pay attention to the
1318         context_class.
1319         * semantics.c (finish_asm_stmt): Adjust error handling.
1320         (finish_label_stmt): Return the statement.
1321         (finish_non_static_data_member): New function.
1322         (finish_class_expr): Handle BASELINKs.
1323         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
1324         (finish_object_call_expr): Simplify handling during templates.
1325         (finish_pseudo_destructor_call_expr): Rename to ...
1326         (finish_pseudo_dtor_expr): ... this.
1327         (finish_compound_literal): New function.
1328         (begin_inline_definitions): Remove.
1329         (finish_sizeof): Remove special template handling.
1330         * spew.c: Do not include parse.h.
1331         * tree.c (get_overloaded_fn): Remove.
1332         * typeck.c (build_class_member_access_expr): Handle
1333         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
1334         (lookup_destructor): New function.
1335         (finish_class_member_access_expr): Use it.
1336         (convert_arguments): Simplify.
1337         (build_unary_op): Handle BASELINKs.
1339 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
1341         PR c++/4803
1342         * decl2.c (mark_used): Defer inline functions.
1343         (finish_file): Merge deferred_fns loops. Check all used
1344         inline functions have a definition.
1345         * method.c (make_thunk): Thunks are not inline.
1347         PR c++/5116, c++/764
1348         * call.c (build_new_op): Make sure template class operands are
1349         instantiated.
1351 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
1353         PR C++/7964
1354         * cp-tree.h (resolve_scoped_fn_name): Prototype.
1355         * call.c (resolve_scoped_fn_name): New function. Deal with
1356         more template expansion. Broken out of ...
1357         * parse.y (parse_finish_call_expr): ... here. Call it.
1358         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
1359         resolve_scoped_fn_name and build_call_from_tree.
1361         PR c++/9053
1362         * decl.c (duplicate_decls): Templates may be disambiguated by
1363         return type.
1365         PR c++/8702
1366         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
1367         conversion operators on failure.
1369 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1371         Remove traditional C constructs 2/n.
1372         * call.c (tourney, build_field_call, equal_functions, joust,
1373         compare_ics, build_over_call, build_java_interface_fn_ref,
1374         convert_like_real, op_error, build_object_call, resolve_args,
1375         build_vfield_ref, check_dtor_name, build_scoped_method_call,
1376         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
1377         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
1378         standard_conversion, reference_related_p,
1379         reference_compatible_p, convert_class_to_reference,
1380         direct_reference_binding, reference_binding,
1381         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
1382         add_template_conv_candidate, any_viable, any_strictly_viable,
1383         build_this, splice_viable, print_z_candidates,
1384         build_user_type_conversion, build_new_function_call,
1385         conditional_conversion, build_conditional_expr, build_new_op,
1386         build_op_delete_call, enforce_access, call_builtin_trap,
1387         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
1388         convert_default_arg, type_passed_as, convert_for_arg_passing,
1389         in_charge_arg_for_name, is_properly_derived_from,
1390         maybe_handle_implicit_object, maybe_handle_ref_bind,
1391         source_type, add_warning, can_convert, can_convert_arg,
1392         perform_implicit_conversion, can_convert_arg_bad,
1393         initialize_reference, add_conv_candidate,
1394         add_template_candidate_real, add_template_candidate): Ansify.
1396 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
1398         PR c++/8572
1399         * cp-tree.h (grokoptypename): Add SCOPE parameter.
1400         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
1401         if in a template scope.
1402         * parse.y (unoperator): Return the scope.
1403         (operator_name): Adjust grokoptypename call.
1405 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1407         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
1408         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
1409         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
1411 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
1413         * ChangeLog: Fix a typo.
1414         * class.c: Fix comment typos.
1415         * cp-tree.h: Likewise.
1417 2002-12-18  Jason Merrill  <jason@redhat.com>
1419         Handle anonymous unions at the tree level.
1420         C++ ABI change: Mangle anonymous unions using the name of their
1421         first named field (by depth-first search).  Should not cause
1422         binary compatibility problems, though, as the compiler previously
1423         didn't emit anything for affected unions.
1424         * cp-tree.def (ALIAS_DECL): New tree code.
1425         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
1426         first field, not the largest.
1427         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
1428         push the decl, and write it out at namespace scope.
1429         * decl.c (lookup_name_real): See through an ALIAS_DECL.
1430         (pushdecl): Add namespace bindings for ALIAS_DECLs.
1431         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
1432         of a decl which doesn't have one.
1433         * typeck.c (build_class_member_access_expr): Don't recurse if
1434         we already have the type we want.
1436 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1438         PR c++/8099
1439         * friend.c (make_friend_class): Allow partial specialization
1440         when declaration is not a template friend.
1442 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1444         PR c++/3663
1445         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
1446         TREE_PROTECTED to created decl nodes.
1448 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
1450         * class.c (build_base_field): Do not set DECL_PACKED on the
1451         FIELD_DECL.
1453 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1455         * cp-tree.h (struct tree_srcloc): Use location_t.
1456         (SOURCE_LOCUS): New.
1457         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
1459 2002-12-17  Jason Merrill  <jason@redhat.com>
1461         * decl.c (finish_function): Also complain about no return in
1462         templates.
1463         * semantics.c (finish_return_stmt): Also call check_return_expr in
1464         templates.
1465         * typeck.c (check_return_expr): In a template, just remember that we
1466         saw a return.
1468 2002-12-16  Jason Merrill  <jason@redhat.com>
1470         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
1471         of the CALL_EXPR.
1473         * semantics.c (do_pushlevel): Call pushlevel after adding the
1474         SCOPE_STMT.
1475         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
1476         * parse.y (function_body): Go back to using compstmt.
1477         * decl.c (pushdecl): Skip another level to get to the parms level.
1479         * call.c (build_new_method_call): Use is_dummy_object to determine
1480         whether or not to evaluate the object parameter to a static member
1481         function.
1483 2002-12-14  Jason Merrill  <jason@redhat.com>
1485         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
1486         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
1487         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
1488         don't bother with an AGGR_INIT_EXPR.
1489         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
1490         just generate a new decl normally.  Take return slot parm.
1491         * cp-tree.h: Adjust prototype.
1493 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1495         PR C++/8031
1496         * cvt.c (convert_to_pointer_force): Don't try comparing against
1497         erronous type.
1499 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
1501         * cp-tree.h: Have the multiple-include guards around
1502         the entire file.
1504 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
1506         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
1507         for SPEW_DEBUG.
1508         (snarf_method): Same.
1509         (snarf_defarg): Same.
1511 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
1513         PR c++/8372
1514         * pt.c (tsubst_copy): Handle destructor names more correctly.
1516 2002-12-10  Matt Austern   <austern@apple.com>
1518         * cp-tree.h: get rid of needs_virtual_reinit bit.
1520 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
1522         * NEWS: Document removal of in-class initialization extension for
1523         static data members of non-arithmetic, non-enumeration type.
1524         * decl.c (check_static_variable_definition): Do not allow that
1525         extension.
1526         * decl2.c (grokfield): Do not call digest_init when processing
1527         templates.
1529 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1531         * error.c (dump_expr): Fix format specifier warning.
1533 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
1535         * class.c (finish_struct_1): Correct comment.
1536         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
1538 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1540         PR C++/8799
1541         * error.c (dump_expr): Don't ever try to dump a non-existent
1542         expression.
1544 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1546         Implement covariant returns.
1547         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
1548         (struct lang_decl_flags): Add this_thunk_p flag.
1549         Rename vcall_offset to virtual_offset.
1550         (struct lang_decl): Rename delta to fixed_offset.
1551         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
1552         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
1553         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
1554         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
1555         (make_thunk): Add this_adjusting arg.
1556         (finish_thunk): Declare.
1557         (mangle_thunk): Add this_adjusting arg.
1558         * class.c (get_vcall_index): Use base function for lookup.
1559         (update_vtable_entry_for_fn): Generate covariant thunk.
1560         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
1561         (build_vtbl_initializer): Use base function for lookup.
1562         Finish covariant thunk here. Adjust thunk generation.
1563         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
1564         Adjust thunk dumping.
1565         * mangle.c (mangle_call_offset): New function.
1566         (mangle_thunk): Adjust for covariant thunks.
1567         * method.c (make_thunk): Adjust. Do not set name here.
1568         (finish_thunk): New function. Set name here.
1569         (use_thunk): Generate covariant thunks too.
1570         (thunk_adjust): New function.
1571         * search.c (covariant_return_p): Remove. Fold into ...
1572         (check_final_overrider): ... here. Simplify.
1573         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
1575 2002-12-03  Jason Merrill  <jason@redhat.com>
1577         PR c++/8674
1578         * call.c (build_over_call): Check specifically for TARGET_EXPR
1579         when eliding.
1581         PR c++/8461, c++/8625
1582         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
1583         (cp_convert_parm_for_inlining): Remove.
1584         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
1585         Remove.
1586         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
1587         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
1589         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
1590         an ambiguous conversion.
1592 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
1594         PR c++/8688
1595         * decl.c (reshape_init): Handle erroneous initializers.
1597 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
1599         PR c++/8720
1600         * spew.c (remove_last_token): Make sure that last_chunk is set
1601         correctly.
1603         PR c++/8615
1604         * error.c (dump_expr): Handle character constants with
1605         TREE_OVERFLOW set.
1607 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1609         DR 180
1610         * decl.c (grokdeclarator): Require class-key for all friend class.
1611         Output the correct type and context in the error message.
1613 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1615         PR c++/5919
1616         * pt.c (unify): Use variably_modified_type_p to test validity of
1617         template argument types.
1619         PR c++/8727
1620         * cp-tree.h (lang_type_class): Add typeinfo_var.
1621         (CLASSTYPE_TYPEINFO_VAR): New macro.
1622         * rtti.c (get_tinfo_decl): Use it.
1624         PR c++/8663
1625         * init.c (expand_member_init): Always get the main variant of a
1626         base class.
1628 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1630         PR c++/8332
1631         PR c++/8493
1632         * decl.c (cxx_init_decl_processing): Use size_type_node, not
1633         c_size_type_node.
1634         * decl2.c (coerce_new_type): Likewise.
1635         * except.c (do_allocate_exception): Likewise.
1637 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
1639         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
1640         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
1641         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
1642         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1643         typeck2.c: Include coretypes.h and tm.h.
1644         * Make-lang.in: Update dependencies.
1646 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
1648         PR c++/8227
1649         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
1650         (check_initializer): Validate the type of the initialized
1651         variable, even if the initializer is absent.
1652         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
1654         PR c++/8214
1655         * typeck.c (convert_for_assignment): Do not use
1656         decl_constant_value on the operand.
1658         PR c++/8511
1659         * pt.c (instantiate_decl): Handle template friends defined outside
1660         of the class correctly.
1662 2002-11-29  Joe Buck <jbuck@synopsys.com>
1664         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
1665         anonymous structs.
1667 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
1669         * class.c (walk_subobject_offsets): Recur on binfos as well as on
1670         types.
1671         (layout_nonempty_base_or_field): Pass it a binfo when processing a
1672         base class.
1673         (layout_empty_base): Likewise.
1674         (build_base_field): Likewise.
1676 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
1678         * class.c (build_base_field): Make sure we get the canonical base
1679         when descending through primary bases.
1681 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
1683         * decl.c (check_initializer): Don't error on initialisation of
1684         a scalar with a brace-enclosed expression.
1686 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
1688         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
1689         (template_parms_equal): Remove prototype.
1690         * typeck.c (buuld_indirect_ref): Reformat.
1692 2002-11-25  Jason Merrill  <jason@redhat.com>
1694         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
1695         and a DO_STMT.
1697 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
1699         * tree.c (cp_build_qualified_type_real): Correct handling of
1700         array types.
1701         * class.c (walk_subobject_offsets): Fix thinko.
1702         (build_base_field): Record offsets of empty bases in primary
1703         virtual bases.
1704         (layout_class_type): Record offsets of empty bases in fields.
1706         * search.c (is_subobject_of_p_1): Fix thinko.
1707         (lookup_field_queue_p): Likewise.
1709 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
1711         * class.c (layout_class_type): Reuse tail padding when laying out
1712         virtual bases.
1714 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
1716         * rtti.c (qualifier_flags): Fix thinko.
1718 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1720         Remove traditional C constructs 1/n.
1721         * cp-tree.h (init_method, set_mangled_name_for_decl,
1722         build_opfncall, hack_identifier, make_thunk, use_thunk,
1723         synthesize_method, implicitly_declare_fn,
1724         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
1725         maybe_clone_body): Remove use of PARAMS.
1727         * method.c (do_build_assign_ref, do_build_copy_constructor,
1728         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
1729         Likewise.
1730         (synthesize_method): Use 'bool' type and constants instead of
1731         'int'.
1732         (locate_copy): Likewise.
1733         (implicitly_declare_fn): Likewise.
1735         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
1736         Remove old-style declaration.
1737         (maybe_clone_body): Use 'bool' type and constants.
1739 2002-11-21  Glen Nakamura  <glen@imodulo.com>
1741         PR c++/8342
1742         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
1743         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
1744         of the branches of a COND_EXPR.
1746 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
1748         * pt.c (for_each_template_parm): Free allocated memory.
1749         * search.c (is_subobject_of_p_1): New function.
1750         (is_subobject_of_p): Avoid walking virtual bases multiple times.
1752 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
1754         * g++spec.c (lang_specific_spec_functions): New.
1756 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
1758         * ChangeLog: Follow spelling conventions.
1759         * class.c: Likewise.
1760         * decl2.c: Likewise.
1762 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
1764         * search.c (dfs_push_decls): Do not try to reorder elements
1765         3..n of method_vec if method_vec has only two elements.
1766         Reverse order of two tests to avoid accessing unallocated
1767         memory.
1769 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
1771         * class.c (dfs_find_final_overrider): Adjust so that the most
1772         derived object is a binfo, rather than a class type.
1773         (find_final_overrider): Likewise.
1774         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
1775         (add_vcall_offset): Likewise.
1777 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1779         PR c++/8389
1780         * pt.c (instantiate_template): Push class scope for member
1781         functions.
1782         (get_mostly_instantiated_function_type): Likewise.  Don't call
1783         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
1784         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
1785         * mangle.c (write_encoding, write_unqualified_name): Adjust.
1787 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1789         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
1790         vcall offfsets.  Split out ...
1791         (add_vcall_offset): ... new function.
1793         PR c++/8338
1794         * pt.c (for_each_template_parm): Add htab parameter.
1795         (process_partial_specialization): Adjust call.
1796         (push_template_decl_real): Likewise.
1797         (pair_fn_data): Add visited.
1798         (for_each_template_parm_r): Avoid walking duplicates more than
1799         once.
1800         (uses_template_parms): Adjust call to for_each_template_parm.
1802 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1804         * class.c (add_implicitly_declared_members): Put implicitly
1805         declared functions at the end of TYPE_METHODs when -fabi-version
1806         is at least 2.
1808 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
1810         * decl2.c (finish_file): Correct spelling.
1812 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
1814         * call.c (build_special_member_call): Do not try to lookup VTTs by
1815         name.
1816         * class.c (vtbl_init_data): Add generate_vcall_entries.
1817         (get_vtable_decl): Do not look up virtual tables by name.
1818         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
1819         (set_primary_base): Do not set CLASSTYPE_RTTI.
1820         (determine_primary_base): Likewise.
1821         (get_matching_virtual): Remove.
1822         (get_vcall_index): New function.
1823         (update_vtable_entry_for_fn): Do not try to use virtual thunks
1824         when they are not required.  Assign vcall indices at this point.
1825         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
1826         Do update dynamic_classes.
1827         (build_vtt): Do not add VTTs to the symbol table.
1828         (build_ctor_vtbl_group): Likewise.
1829         (build_vtbl_initializer): Simplify handling of vcall indices.
1830         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
1831         for the most derived class.
1832         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
1833         the vtable.
1834         * cp-tree.h (dynamic_classes): New macro.
1835         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
1836         (CLASSTYPE_RTTI): Remove.
1837         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
1838         (CLASSTYPE_VCALL_INDICES): New macro.
1839         (CLASSTYPE_VTABLES): Likewise.
1840         (BV_USE_VCALL_INDEX_P): Remove.
1841         (build_vtable_path): Remove.
1842         * decl2.c (finish_vtable_vardecl): Remove.
1843         (key_method): Remove #if 0'd code.
1844         (finish_vtable_vardecl): Rename to ...
1845         (maybe_emit_vtables): ... this.
1846         (finish_file): Use it.
1847         * search.c (look_for_overrides_here): Update comment.
1849 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
1851         PR c/7353 redux
1852         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
1854 2002-10-30  Jason Merrill  <jason@redhat.com>
1856         PR c++/8186
1857         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
1858         * call.c (convert_for_arg_passing): Set it.
1859         * except.c (stabilize_throw_expr): Recurse for such an arg.
1861 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
1863         * cp-tree.h (lang_decl_flags): Remove init_priority.
1864         (lang_decl): Add delta.
1865         (GLOBAL_INIT_PRIORITY): Remove.
1866         (THUNK_DELTA): Revise definition.
1867         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
1868         * dump.c (cp_dump_tree): Don't dump it.
1870 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
1872         PR c++/8160
1873         * typeck2.c (process_init_constructor): Call complete_array_type.
1875         PR c++/8149
1876         * decl.c (make_typename_type): Issue errors about invalid results.
1878 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1880         Core issue 287, PR c++/7639
1881         * cp-tree.h (lang_type_class): Add decl_list field.
1882         (CLASSTYPE_DECL_LIST): New macro.
1883         (maybe_add_class_template_decl_list): Add declaration.
1884         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
1885         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
1886         (maybe_add_class_template_decl_list): New function.
1887         (add_implicitly_declared_members): Use it.
1888         * decl.c (maybe_process_template_type_declaration): Likewise.
1889         (pushtag): Likewise.
1890         * friend.c (add_friend): Likewise.
1891         (make_friend_class): Likewise.
1892         * semantics.c (finish_member_declaration): Likewise.
1893         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
1894         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
1895         to process members and friends in the order of declaration.
1897 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
1899         PR c++/8287
1900         * decl.c (finish_destructor_body): Create the label to jump to
1901         when returning from a destructor here.
1902         (finish_function_body): Rather than here.
1904 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
1906         PR c++/7266
1907         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
1908         SCOPE_REF is not null before dereferencing it.
1910 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
1912         * call.c (build_over_call): Use DECL_CONTEXT, not
1913         DECL_VIRTUAL_CONTEXT.
1914         * class.c (modify_vtable_entry): Don't mess with
1915         DECL_VIRTUAL_CONTEXT.
1916         (set_vindex): Remove.
1917         (set_primary_base): Remove vfuns_p parameter.
1918         (determine_primary_base): Likewise.
1919         (modify_all_vtables): Likewise.
1920         (layout_class_type): Likewise.  Adjust calls to other functions
1921         accordingly.
1922         (finish_struct_1): Adjust calls to modified functions.  Set
1923         DECL_VINDEX here.
1924         * cp-tree.h (lang_type_class): Remove vsize.
1925         (CLASSTYPE_VSIZE): Remove.
1926         (lang_decl): Remove thunks.
1927         (DECL_THUNKS): Adjust.
1928         (DECL_VIRTUAL_CONTEXT): Remove.
1929         (duplicate_decls): Don't copy it.
1930         * pt.c (build_template_decl): Don't set it.
1931         (tsubst_decl): Likewise.
1932         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
1934         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
1935         (build_vtable_entry): Remove.
1936         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
1937         (lang_decl): Add thunks.
1938         (DECL_THUNKS): New macro.
1939         * decl.c (duplicate_decls): Copy it.
1940         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
1941         * semantics.c (emit_associated_thunks): Simplify.
1943 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
1945         PR c++/7228
1946         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
1947         lang_type structure exists before accessing field.
1948         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
1949         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
1950         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
1951         * class.c (check_field_decls): Use new macros.
1952         * typeck2.c (process_init_constructor): Remove redundant check for
1953         existence of lang_type structure.
1955 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
1957         * class.c (end_of_base): New method.
1958         (end_of_class): Use it.  Check indirect virtual bases.
1960         * class.c (check_field_decls): Fix typo.
1962 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
1964         PR c++/8067
1965         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
1966         related variables.
1968         PR c++/7679
1969         * spew.c (next_token): Do not return an endless stream of
1970         END_OF_SAVED_INPUT tokens.
1971         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
1972         the cached token stream.
1973         (snarf_defarg): Likewise.
1975 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
1977         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
1978         variably_modified_type_p.
1979         * cp-tree.h: Remove prototype of variably_modified_type_p.
1980         * tree.c (variably_modified_type_p): Remove; now implemented
1981         in language-independent code.
1983 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
1985         PR c++/6579
1986         * spew.c (snarf_parenthesized_expression): New function.
1987         (snarf_block): Use it.
1989 2002-10-22  Richard Henderson  <rth@redhat.com>
1991         * method.c (use_thunk): Always compute vcall_value; assert that
1992         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
1993         for vcall thunks as well.
1995 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
1997         * class.c (empty_base_at_nonzero_offset_p): New function.
1998         (layout_nonempty_base_or_field): Do not check for conflicts when
1999         laying out a virtual base using the GCC 3.2 ABI.
2000         (build_base_field): Correct checking for presence of empty classes
2001         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
2003         * class.c (include_empty_classes): Use normalize_rli.
2004         (layout_class_type): Likewise.
2006         * decl.c (reshape_init): Tweak handling of character arrays.
2008         PR c++/8218
2009         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
2010         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
2011         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
2012         (check_field_decls): Likewise.
2013         (layout_class_type): Likewise.
2014         (finish_struct_1): Initialize it.
2015         (walk_subobject_offsets): Use it to prune searches.
2017 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
2019         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
2020         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
2021         TARGET_ASM_OUTPUT_MI_THUNK in comments.
2023 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
2025         * decl.c (start_decl): Point users of the old initialized-
2026         typedef extension at __typeof__.
2028 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2030         * Make-lang.in (method.o): Depend on TARGET_H.
2031         * method.c (target.h): Include it.
2032         (use_thunk): Use target hooks.  Use vcall thunks, if available.
2034 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2036         * class.c (base_derived_from): Make sure return value is a bool.
2038 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2040         * class.c (find_final_overrider_data_s): Remove overriding_fn and
2041         overriding_base.
2042         (dfs_base_derived_from): New function.
2043         (base_derived_from): Likewise.
2044         (dfs_find_final_overrider): Use base_derived_from.
2045         (find_final_overrider): Adjust.
2047 2002-10-18  Jason Merrill  <jason@redhat.com>
2049         PR c++/8080
2050         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
2051         with condition decls in a template.
2053 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
2055         * class.c (add_method): Compare template parms too.
2057 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
2059         PR c++/7584
2060         * class.c (handle_using_decl): Allow the declaration used to be
2061         from an ambiguous base.
2063         * pt.c (convert_template_argument): Revert this change:
2064                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2065                 * pt.c (convert_template_argument): Do not fold non-type
2066                 template rguments when inside a template.
2068         * init.c (expand_default_init): Handle brace-enclosed initializers
2069         correctly.
2071 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2073         * mangle.c (write_expression): Correct handling of enumeration
2074         constants.
2075         (write_template_arg): Likewise.
2076         * pt.c (convert_template_argument): Do not fold non-type template
2077         arguments when inside a template.
2079         PR c++/7478
2080         * cvt.c (convert_to_reference): Allow references as the incoming
2081         type.
2083 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2085         PR c++/7524
2086         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
2087         build_qualified_type.
2089 2002-10-15  Richard Henderson  <rth@redhat.com>
2091         * error.c (dump_expr): Use real_to_decimal directly, and with
2092         the new arguments.
2094 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
2096         * decl.c (reshape_init): Fix typo.
2098         * cp-tree.h (operator_name_info_t): Add arity.
2099         * lex.c (init_operators): Initialize it.
2100         * mangle.c (write_conversion_operator_name): New function.
2101         (write_unqualified_name): Use it.
2102         (write_template_args): Accept template arguments as a TREE_LIST.
2103         (write_expression): Adjust handling of qualified names to match
2104         specification.
2106 2002-10-15  Jason Merrill  <jason@redhat.com>
2108         * call.c (call_builtin_trap): New fn.
2109         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
2110         (build_call): Don't set current_function_returns_abnormally outside
2111         a function.
2113 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2115         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
2116         clear CLASSTYPE_EMPTY_P.
2117         (build_base_field): Likewise.
2118         (build_base_fields): Likewise.
2119         (check_bases_and_members): Likewise.
2120         (create_vtbl_ptr): Likewise.
2121         (layout_class_type): Likewise.  Ensure that empty classes have
2122         size zero when used as base classes in the 3.2 ABI.
2123         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
2124         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
2125         parameter.
2126         (is_empty_class): Correct definition when using post-3.2 ABI.
2127         * cp-tree.h (lang_type_class): Add empty_p.
2128         (CLASSTYPE_EMPTY_P): New macro.
2130 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2132         * init.c (build_delete): Do not apply save_expr for arrays.
2133         (build_vec_delete): Likewise.
2135 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2137         * decl.c (layout_var_decl): Call layout_decl even for variables
2138         whose type is an array with unspecified bounds.
2140         PR c++/7176
2141         * lex.c (do_identifier): Add another option for the parsing
2142         parameter.
2143         * parse.y (do_id): Use it.
2145 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2147         PRs C++/6803, C++/7721 and C++/7803
2148         * decl.c (grokdeclarator): Gracefully handle template-name as
2149         decl-specifier.
2151 2002-10-11  Jason Molenda  <jmolenda@apple.com>
2153         * init.c (build_field_list): Provide uses_unions_p with a default
2154         value.
2156 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
2158         PR c++/5661
2159         * cp-tree.h (variably_modified_type_p): New function.
2160         (grokdeclarator) Tighten check for variably modified types as
2161         fields.
2162         * pt.c (convert_template_argument): Do not allow variably modified
2163         types as template arguments.
2164         * tree.c (variably_modified_type_p): New function.
2166         * NEWS: Document removal of "new X = ..." extension.
2167         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
2168         brace-enclosed initializers.
2169         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
2170         (initialize_local_var): Remove declaration.
2171         (expand_static_init): Likewise.
2172         * decl.c (next_initializable_field): New function.
2173         (reshape_init): Likewise.
2174         (check_initializer): Use them.  Build dynamic initializer for
2175         aggregates here too.
2176         (initialize_local_var): Simplify, and incorporate cleanup
2177         insertion code as well.
2178         (destroy_local_var): Remove.
2179         (cp_finish_decl): Tidy.
2180         (expand_static_init): Fold checks for whether or not a variable
2181         needs initialization into this function.  Simplify.
2182         * decl2.c (do_static_initialization): Simplify.
2183         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
2184         be done for us automatically.
2185         (expand_default_init): Handle brace-enclosed initializers
2186         correctly.
2187         (expand_aggr_init_1): Remove RTL-generation code.
2188         (build_vec_init): Remove "new X = ..." support.
2189         * parse.y (new_initializer): Likewise.
2190         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
2191         brace-enclosed initializer.
2192         (create_pseudo_type_info): Likewise.
2193         * typeck2.c (store_init_value): Don't try to handle digest_init
2194         being called more than once.
2195         (digest_init): Tidy handling of brace-enclosed initializers.
2197 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2199         * decl.c (typename_hash): Use htab_hash_pointer.
2201 2002-10-10  Jim Wilson  <wilson@redhat.com>
2203         * decl.c (duplicate_decls): Don't call decl_attributes.
2205 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
2207         PR c/7353
2208         * decl.c (start_decl): Unconditionally issue error for
2209         'typedef foo = bar'.
2210         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
2211         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
2213 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2215         * decl2.c (prune_vtable_vardecl): Delete unused function.
2217 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2219         PR c++/7754
2220         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2221         procesing template functions.
2222         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2223         type. Call layout_decl.
2224         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2226 2002-10-07  Richard Henderson  <rth@redhat.com>
2228         * decl2.c, pt.c: Revert c++/7754 fix.
2230 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2232         PR c++/7804
2233         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
2235 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2237         PR c++/7931
2238         * pt.c (for_each_template_parm_r): Handle BASELINKs.
2240         PR c++/7754
2241         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2242         procesing template functions.
2243         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2244         type. Call layout_decl.
2245         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2247 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2249         PR c++/8006
2250         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
2251         template parameters.
2252         (globals): Add entity and need_abi_warning.
2253         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
2254         CLASSTYPE_TEMPLATE_INFO.
2255         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
2256         TYPE_TI_TEMPLATE.
2257         (write_prefix): Handle typename types correctly.
2258         (write_template_prefix): Handle template template parameters
2259         correctly.
2260         (start_mangling): Add entity parameter.
2261         (finish_mangling): Warn about names whose mangling will change.
2262         (mangle_decl_string): Adjust.
2263         (mangle_type_string): Likewise.
2264         (mangle_special_for_type): Likewise.
2265         (mangle_ctor_vtbl_for_type): Likewise.
2266         (mangle_thunk): Likewise.
2267         (mangle_guard_variable): Likewise.
2268         (mangle_ref_init_variable): Likewise.
2270 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
2272         PR c++/7188.
2273         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
2274         * cp-tree.h (emit_base_init): Rename to ....
2275         (emit_mem_initializers): ... this.
2276         (expand_member_init): Change prototype.
2277         * init.c (perform_member_init): Compute explicit, rather than
2278         requiring it as a parameter.
2279         (sort_member_init): Rename to ...
2280         (sort_mem_initializers): ... this.  Process bases and data members
2281         together.
2282         (sort_base_init): Remove.
2283         (emit_base_init): Rename to ...
2284         (emit_mem_initializers): ... this.
2285         (expand_aggr_vbase_init_1): Remove.
2286         (construct_virtual_bases): Rename to ...
2287         (construct_virtual_base): ... this.
2288         (expand_member_init): Rework handling of base initializers.
2289         * method.c (do_build_copy_constructor): Use
2290         finish_mem_initializers.
2291         * parse.y (member_init): Adjust calls to expand_member_init.
2292         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
2293         (tsubst_initializer_list): Use expand_member_init.
2294         * semantics.c (finish_mem_intiailizers): Simplify.
2296 2002-10-02  Matt Austern  <austern@apple.com>
2297         * decl.c (walk_vtables_r): Fixed typo that caused result to
2298         never get a nonzero value.
2300 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2302         PR optimization/6627
2303         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
2304         from here, and move it to tree.h.
2305         * decl.c (cxx_init_decl_processing): If storing the vbit
2306         in function pointers, ensure that force_align_functions_log
2307         is atleast one.
2309 2002-10-02  Matt Austern  <austern@apple.com>
2311         * class.c (check_field_decls): Changed warning about const member
2312         variables so that it doesn't get issued for a class aggregate.
2314 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2316         * decl.c (cp_finish_decl): Make sure array types are laid out,
2317         even if the array bounds are unknown.
2319 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
2321         * class.c (build_vtbl_initializer): Change build_c_cast
2322         to build1.
2324 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2326         * decl.c (cp_finish_decl): Make sure array types are laid out,
2327         even if the array bounds are unknown.
2329         * decl.c (cp_finish_decl): Correct check for dynamic
2330         initialization of thread-local storage.
2332 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
2334         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
2335         overloaded.
2337 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
2339         * class.c (build_vtbl_initializer): Add cast.
2340         (add_vcall_offset_vtbl_entries_1):
2341         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
2343 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
2345         * class.c (walk_subobject_offsets): Correct the calculation of
2346         offsets for virtual bases.  Correct the counting of array
2347         elements.
2348         (layout_nonempty_base_or_field): Simplify.  Correct the
2349         calculation of offsets to be propagated through the binfo
2350         hierarchy.
2351         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
2352         Add the FIELD_DECL to TYPE_FIELDS.
2353         (build_base_fields): Adjust accordingly.
2354         (layout_virtual_bases): Use build_base_field.
2355         (end_of_class): Return a tree, not an integer.
2356         (warn_about_ambiguous_direct_bases): Rename to ...
2357         (warn_about_ambiguous_bases): ... this.
2358         (include_empty_classes): New function.
2359         (layout_class_type): Create an alternative version of the type to
2360         be used when as a base class type.  Do not call
2361         finish_record_layout until we are done laying out the class.
2362         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
2363         as_base.
2364         (CLASSTYPE_SIZE): Reimplement.
2365         (CLASSTYPE_SIZE_UNIT): Likewise.
2366         (CLASSTYPE_ALIGN): Likweise.
2367         (CLASSTYPE_USER_ALIGN): Likewise.
2368         (CLASSTYPE_AS_BASE): New macro.
2369         (DECL_INITIALIZED_P): Likewise.
2370         (extract_init): Remove prototype.
2371         (build_forced_zero_init): Rename to ...
2372         (build_zero_init): ... this.
2373         (force_store_init_value): Remove.
2374         * decl.c (obscure_complex_init): Remove.
2375         (duplicate_decls): Copy DECL_INITIALIZED_P.
2376         (check_initializer): Do not leave junk in DECL_INITIAL.
2377         (cp_finish_decl): Handle zero-initialization of entities with
2378         static storage duration.
2379         * expr.c (extract_init): Remove.
2380         * init.c (build_forced_zero_init): Remove.
2381         (build_zero_init): New function.
2382         (build_default_init): Use it.
2383         (build_field_list): Skip FIELD_DECLs for base subobjects.
2384         (push_base_cleanups): Likewise.
2385         * method.c (do_build_assign_ref): Likewise.
2386         (synthesize_exception_spec): Likewise.
2387         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
2388         (regenerate_decl_from_template): To not set DECL_INITIAL for a
2389         static data member whose initialization took place in its class.
2390         (instantiate_decl): Do not pass an initializer to cp_finish_decl
2391         in that situation.
2392         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
2393         (dfs_unuse_fields): Likewise.
2394         * tree.c (pod_type_p): Handle error_mark_node.
2395         (zero_init_p): Likewise.
2396         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
2397         subobjects.
2398         * typeck2.c (store_init_value): Remove #if 0'd code.
2399         (force_store_init_value): Remove.
2400         (process_init_constructor): Use build_zero_init.
2402 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
2404         PR c++/7788
2405         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
2407 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
2409         * cp-tree.h: Fix comment typos.
2410         * decl.c: Likewise.
2411         * pt.c: Likewise.
2413 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
2415         * cp/class.c (contains_empty_class_p): New method.
2416         (walk_subobject_offsets): Correct computation of field offset.
2417         (layout_empty_base): Correct placement of emtpy base classes.
2418         (layout_class_type): Warn about ABI changes.
2420 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
2422         * cp/class.c (layout_virtual_bases): Do not round the size of the
2423         type to a multiple of the alignment before laying out virtual bases.
2424         (layout_class_type): Correct handling of bit-fields that are wider
2425         than their type inside unions.  Round the size of the type to a
2426         even number of bytes when computing the size without virtual
2427         bases.
2428         * cp/cp-tree.h (abi_version_at_least): New macro.
2430 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
2432         * ChangeLog: Follow spelling conventions.
2433         * ChangeLog.2: Likewise.
2434         * call.c: Likewise.
2435         * class.c: Likewise.
2436         * cp-tree.h: Likewise.
2437         * cvt.c: Likewise.
2438         * decl.c: Likewise.
2439         * decl2.c: Likewise.
2440         * except.c: Likewise.
2441         * friend.c: Likewise.
2442         * g++spec.c: Likewise.
2443         * init.c: Likewise.
2444         * lex.c: Likewise.
2445         * mangle.c: Likewise.
2446         * method.c: Likewise.
2447         * operators.def: Likewise.
2448         * optimize.c: Likewise.
2449         * pt.c: Likewise.
2450         * rtti.c: Likewise.
2451         * search.c: Likewise.
2452         * semantics.c: Likewise.
2453         * spew.c: Likewise.
2454         * tree.c: Likewise.
2455         * typeck.c: Likewise.
2457 2002-09-18  Devang Patel  <dpatel@apple.com>
2459         * cp/cp-tree.h: New prototype for walk_vtabls().
2460         * cp/decl.c (walk_vtables_r): New function.
2461         (struct cp_binding_level): Add new members, namespaces,
2462         names_size and vtables.
2463         (add_decl_to_level): Add decl in namespaces or vtables
2464         chain, if conditions match.
2465         (walk_vtables): New function.
2466         (walk_namespaces_r): Travers separate namespace chain
2467         for namespace decls.
2468         (wrapup_globals_for_namespace): Use names_size instead
2469         of list_length().
2470         * cp/decl2.c (finish_file): Use walk_vtables() instead of
2471         walk_globals() to walk vtable decls.
2473 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
2475         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
2476         ICE with invalid pointers & references.
2478 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
2480         * Make-lang.in: Remove all references to the demangler.
2481         * cxxfilt.c: Moved to binutils.
2483 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2485         PR c++/7718
2486         * pt.c (tsubst_decl): Remove assert.
2488         Remove DR 295 implementation.
2489         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
2490         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
2491         about ignoring volatile qualifiers.
2493         * search.c (lookup_member): Correct documentation.
2495 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2497         * cp-tree.h (union lang_tree_node): Add chain_next option.
2499 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2501         * parse.y (parse_finish_call_expr): Check lookup_member result.
2503         PR c++/7015
2504         * semantic.c (finish_asm_stmt): Fix operand/output_operands
2505         thinko.
2506         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
2508 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
2510         PR c++/7919
2511         * call.c (build_over_call): Convert this pointer for fns found by
2512         using decls.
2514 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2516         * ChangeLog: Follow spelling conventions.
2517         * ChangeLog.1: Likewise.
2519 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
2521         PR c++/7768
2522         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
2524 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
2526         * error.c: Fix comment formatting.
2527         * except.c: Likewise.
2528         * expr.c: Likewise.
2529         * friend.c: Likewise.
2530         * g++spec.c: Likewise.
2531         * init.c: Likewise.
2532         * lex.c: Likewise.
2533         * mangle.c: Likewise.
2534         * method.c: Likewise.
2535         * optimize.c: Likewise.
2536         * pt.c: Likewise.
2537         * rtti.c: Likewise.
2538         * search.c: Likewise.
2539         * semantics.c: Likewise.
2540         * spew.c: Likewise.
2541         * tree.c: Likewise.
2542         * typeck.c: Likewise.
2543         * typeck2.c: Likewise.
2545 2002-09-13  Matt Austern  <austern@apple.com>
2547         PR C++/7828
2548         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
2549         * cp/call.c: Change call-by-const-reference mechanism to use
2550         non_cast_lvalue_p when deciding whether the create a temporary.
2551         We need a temporary when passing, e.g. (long) x by const ref.
2553 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
2555         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
2557 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
2559         * decl.c: Fix comment formatting.
2560         * decl2.c: Likewise.
2562 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
2564         * call.c: Fix comment formatting.
2565         * class.c: Likewise.
2566         * cp-lang.c: Likewise.
2567         * cp-tree.h: Likewise.
2568         * cvt.c: Likewise.
2570 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
2572         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
2573         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
2574         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
2575         minor adjustments (use version_string, eliminate yet another
2576         duplicate of xmalloc)
2578 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2580         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
2582 2002-09-05  Jason Merrill  <jason@redhat.com>
2584         * typeck2.c (add_exception_specifier): Only pedwarn for an
2585         incomplete type.
2586         (require_complete_eh_spec_types): New fn.
2587         (cxx_incomplete_type_diagnostic): Also support pedwarning.
2588         * typeck.c (complete_type_or_diagnostic): Likewise.
2589         * call.c (build_call): Call require_complete_eh_spec_types.
2590         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
2591         on an incomplete type.
2593 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
2595         * decl.c (start_cleanup_fn): Clear interface_only before
2596         start_function, restore it afterwards.
2598 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
2600         * cp-tree.h (finish_builtin_type): Remove.
2601         * decl2.c (finish_builtin_type): Move to common code.
2602         * decl.c (build_ptrmemfunc_type): Adjust.
2603         * rtti.c (create_pseudo_type_info): Adjust.
2604         (create_tinfo_types): Adjust.
2606 2002-08-31  Jason Merrill  <jason@redhat.com>
2608         * cp-lang.c (cp_expr_size): Allow initialization from a
2609         CONSTRUCTOR.
2611 2002-08-30  Richard Henderson  <rth@redhat.com>
2613         PR opt/7515
2614         * tree.c: Include target.h.
2615         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
2616         don't bind locally.
2617         * Makefile.in (tree.o): Update.
2619 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
2621         * class.c (layout_virtual_bases): Warn about bugs in G++ that
2622         result in incorrect object layouts.
2623         (layout_class_type): Likewise.
2625 2002-08-24  Matt Austern  <austern@apple.com>
2627         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
2628         are allowable.
2629         (real_lvalue_p): Update caller.
2630         (lvalue_p): Ditto.
2631         (non_cast_lvalue_or_else): New.
2632         * tree.h: Declare it.
2633         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
2635 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
2637         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
2638         and COND_EXPR specially; fix error message output.
2640 2002-08-22  Jason Merrill  <jason@redhat.com>
2642         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
2643         * semantics.c (nullify_returns_r): Likewise.
2645 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2647         Fix PR/7621
2648         * typeck.c (finish_class_member_access_expr): Diagnose cases where
2649         name lookup finds nothing.
2651 2002-08-15  Jason Merrill  <jason@redhat.com>
2653         * semantics.c (finish_then_clause): Remove redundant assignment.
2654         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
2655         extra binding level outside the if/switch statement.
2656         (finish_while_cond, finish_for_cond): Rewrite complex condition
2657         into the loop body.
2659 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
2661         * parse.y (sizeof, alignof, typeof): New non-terminals to
2662         increment skip_evaluation.  Replace terminals with them and
2663         decrement skip_evaluation at the end of rules using them.
2664         * decl2.c (mark_used): Don't assemble_external if
2665         skipping evaluation.
2667 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
2669         Fix PR/7504
2670         * parse.y (parse_finish_call_expr): Handle incomplete
2671         type used to name a scope.
2673 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2675         PR c++/7598
2676         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
2677         regression caused by my 2002-08-08 patch.
2679 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
2681         * decl.c (pushdecl_class_level): Honor requests to bind names to
2682         OVERLOADs.
2684 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2686         * decl2.c (build_call_from_tree): Fix uninitialized variable.
2687         * parse.y (parse_finish_call_expr): Likewise.
2688         * repo.c (old_args, old_dir, old_main): Const-ify.
2690 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
2692         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
2693         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
2694         * optimize.c (maybe_clone_body): Likewise.
2695         * pt.c (tsubst_enum): Likewise.
2696         (lookup_template_class): Likewise.
2697         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
2699 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
2701         * lang-specs.h: Remove -ansi.
2703 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
2705         * tree.c (maybe_dummy_object): Replace // with /* */
2707 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
2709         * call.c (standard_conversion): Use build_ptrmem_type.
2710         * cp-tree.h (build_ptrmem_type): New function.
2711         (adjust_result_of_qualified_name_lookup): Likewise.
2712         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
2713         static data members.
2714         (build_ptrmem_type): New function.
2715         (grokdeclarator): Do not use build_offset_type when encountering a
2716         qualified name.
2717         * parse.y (parse_finish_call_expr): Use
2718         adjust_result_of_qualified_name_lookup.
2719         * search.c (adjust_result_of_qualified_name_lookup): New function.
2720         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
2721         accessing OFFSET_TYPEs directly.
2723 2002-08-08  Mike Stump  <mrs@apple.com>
2725         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
2726         (type_decays_to): Likewise.
2727         * class.c (find_final_overrider): Likewise.
2728         (maybe_note_name_used_in_class): Likewise.
2729         * decl.c (current_tmpl_spec_kind): Likewise.
2730         (add_binding): Likewise.
2731         (push_class_binding): Likewise.
2732         (duplicate_decls): Likewise.
2733         (layout_var_decl): Likewise.
2734         (grokfndecl): Likewise.
2735         (grokdeclarator): Likewise.
2736         (check_default_argument): Likewise.
2737         * decl2.c (handle_class_head): Likewise.
2738         * error.c (dump_template_decl): Likewise.
2739         * init.c (build_offset_ref): Likewise.
2740         * pt.c (check_specialization_scope): Likewise.
2741         (determine_specialization): Likewise.
2742         (check_explicit_specialization): Likewise.
2743         (maybe_check_template_type): Likewise.
2744         (process_partial_specialization): Likewise.
2745         (check_default_tmpl_args): Likewise.
2746         (push_template_decl_real): Likewise.
2747         (convert_template_argument): Likewise.
2748         (try_class_unification): Likewise.
2749         (get_bindings_real): Likewise.
2750         (do_decl_instantiation): Likewise.
2751         * semantics.c (begin_function_definition): Likewise.
2752         (finish_member_declaration): Likewise.
2753         (check_multiple_declarators): Likewise.
2754         * typeck.c (comp_array_types): Likewise.
2755         (comptypes): Likewise.
2756         (expr_sizeof): Likewise.
2757         (build_binary_op): Likewise.
2758         (dubious_conversion_warnings): Likewise.
2759         (check_return_expr): Likewise.
2761 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
2763         * typeck.c (build_class_member_access_expr): Do not return
2764         error_mark_node when no error has occurred.
2766 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2768         * typeck.c (build_component_addr): Remove.
2769         (build_unary_op): Just check it's not a bitfield, and then build
2770         an ADDR_EXPR.
2772 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2774         * class.c (convert_to_base): Correct check for error_mark_node.
2775         (create_vtable_ptr): Remove unused VFUNS_P parm.
2777 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2779         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
2781 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
2783         Rework build_component_ref.
2784         * call.c (build_vfield_ref): Do not go through build_component_ref.
2785         (build_field_call): Use build_class_member_access_expr.
2786         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
2787         (build_object_call): Likewise.
2788         * class.c (convert_to_base): New function.
2789         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
2790         (instantiate_type): Handle BASELINKs.
2791         * cp-tree.def (BASELINK): New tree code.
2792         * cp-tree.h (BASELINK_P): Reimplement.
2793         (SET_BASELINK_P): Remove.
2794         (BASELINK_BINFO): Reimplement.
2795         (BASELINK_FUNCTIONS): Likewise.
2796         (BASELINK_ACCESS_BINFO): Likewise.
2797         (BASELINK_OPTYPE): Likewise.
2798         (convert_to_base): New function.
2799         (name_p): Likewise.
2800         (build_object_ref): Remove.
2801         (build_component_ref_1): Likewise.
2802         (build_component_ref): Likewise.
2803         (build_x_component_ref): Likewise.
2804         (build_class_member_access_expr): New function.
2805         (finish_class_member_access_expr): Likewise.
2806         (build_ptrmemfunc_access_expr): Likewise.
2807         * decl.c (grokdeclarator): Handle BASELINKs.
2808         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
2809         finish_class_member_access_expr.
2810         (arg_assoc): Handle BASELINKs.
2811         (do_class_using_decl): Likewise.
2812         * error.c (dump_decl): Likewise.
2813         (dump_expr): Use build_ptrmemfunc_access_expr.
2814         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
2815         destructors.
2816         (build_throw): Use BASELINK_FUNCTIONS.
2817         * init.c (perform_member_init): Use
2818         build_class_member_access_expr.
2819         (build_offset_ref): Handle BASELINKs.  Use
2820         build_class_member_access_expr.
2821         * method.c (hack_identifier): Likewise.
2822         * parse.y (do_id): Use BASELINK, not TREE_LIST.
2823         (primary): Remove uses of build_object_ref.
2824         * pt.c (lookup_template_function): Handle BASELINKs.
2825         (resolve_overloaded_unification): Likewise.
2826         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
2827         (lookup_field): Use BASELINK, not TREE_LIST.
2828         (lookup_fnfiels): Likewise.
2829         (setup_class_bindings): Likewise.
2830         * semantics.c (finish_object_call_expr): Do not use
2831         build_method_call when we already know what function is being
2832         called.
2833         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
2834         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
2835         TREE_CHAIN.
2836         (name_p): New function.
2837         * typeck.c (build_object_ref): Remove.
2838         (build_component_ref_1): Likewise.
2839         (build_x_component_ref): Likewise.
2840         (build_class_member_access_expr): New function.
2841         (finish_class_member_access_expr): Likewise.
2842         (build_ptrmemfunc_access_expr): Likewise.
2843         (get_member_function_from_ptrfunc): Use
2844         build_ptrmemfunc_access_expr.
2845         (build_binary_op): Likewise.
2846         (build_unary_op): Likewise.
2847         (build_ptrmemfunc): Likewise.
2848         (pfn_from_ptrmemfunc): Likewise.
2849         * typeck2.c (build_m_component_ref): Adjust comment.
2851 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
2853         * Make-lang.in (CXX_C_OBJS): Update.
2854         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
2855         * cp-tree.h (cxx_decode_option): Remove.
2856         * decl2.c (compare_options, lang_f_options, unsupported_options,
2857         cxx_decode_option): Remove.
2859 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
2861         * typeck.c (build_x_unary_op): Handle pointer-to-member.
2863 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2865         * class.c: Don't include obstack.h.
2866         (popclass):
2867         * decl2.c: Delete bogus comment.
2868         * error.c: Don't include obstack.h.
2869         * except.c: Likewise.
2870         (dump_type): Correct comment.
2871         * method.c: Don't include obstack.h.
2872         * tree.c: Likewise.
2874 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
2876         Fix PR/2213
2877         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
2878         expressions to pointer-to-data-member of pointer-to-member-functions.
2880 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2882         * cvt.c (ocp_convert): Delete obsolete code.
2883         * parse.y (permanent_obstack): Delete declaration.
2884         * pt.c (permanent_obstack): Delete declaration.
2885         * repo.c (permanent_obstack): Delete declaration.
2886         (open_repo_file): Use xmalloc instead of permanent_obstack.
2887         (init_repo): Use xstrdup instead of permanent_obstack.
2889 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
2891         * cp-tree.h (VF_DERIVED_VALUE): Remove.
2892         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
2894 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
2896         PR 7470.
2897         C++ ABI change - vfunc ordering.
2898         * class.c (add_virtual_function): Remove.
2899         (dfs_modify_all_vtables): Take list of all declared
2900         virtuals. Assign all that are not in primary base.
2901         (check_for_override): Adjust comments.
2902         (create_vtable_ptr): Take single list of virtuals. Build chain
2903         of declared virtuals here.
2904         (layout_class_type): Take single list of virtuals. Adjust.
2905         (finish_struct_1): Keep virtuals on single list. Adjust.
2907 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2909         * init.c (build_member_call): Use build_new_method_call, not
2910         build_method_call.
2912 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
2914         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
2916 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2918         * call.c (build_method_call): Issue a more helpful error message
2919         about ambiguous method names.
2921 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2923         * tree.c (build_shared_int_cst): Make cache file scope, and
2924         GTY it.
2926 2002-08-02  Jason Merrill  <jason@redhat.com>
2928         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
2929         (cp_expr_size): New fn.
2930         * call.c (build_over_call): Lose empty class hackery.
2931         (convert_arg_to_ellipsis): Promote non-POD warning to error.
2932         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
2934         * semantics.c (expand_body): Do tree optimization in the function
2935         context, too.
2937 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
2939         * cp-tree.h: Move all warning and flag declarations to c-common.h.
2940         * decl.c: Move all warning and flag variables to c-common.c.
2941         * decl2.c: Move all warning and flag variables to c-common.c.
2942         * lex.c (flag_digraphs): Remove.
2943         (warn_traditional): Now in c-common.c.
2945 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
2947         * call.c (build_field_call): Do not look up the field by name.
2948         (build_method_call): Simplify.
2949         (struct z_candidate): Add access_path and conversion_path.  Remove
2950         basetype_path.
2951         (convert_class_to_reference): Adjust use of
2952         add_function_candidate.
2953         (add_candidate): Add conversion_path argument.
2954         (add_function_candidate): Use it.
2955         (add_conv_dndidate): Likewise.
2956         (build_builtin_candidate): Likewise.
2957         (add_template_candidate_real): Add conversion_path argument.
2958         (add_template_conv_candidate): Likewise.
2959         (add_template_candidate): Likewise.
2960         (build_user_type_conversion_1): Use it.
2961         (build_new_function_call): Remove name lookup code.  Adjust use of
2962         add_template_candidate and add_function_candidate.
2963         (build_new_op): Likewise.
2964         (convert_like_real): Use build_special_member_call.
2965         (build_over_call): Use cand->conversion_path.
2966         (build_special_member_call): New method.
2967         (build_new_method_call): Remove name lookup code.
2968         * cp-tree.def (OFFSET_REF): Update documentation.
2969         (TEMPLATE_ID_EXPR): Likewise.
2970         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
2971         (BASELINK_OPTYPE): Likewise.
2972         (build_new_method_call): Adjust prototype.
2973         (build_special_member_call): New method.
2974         (build_baselink): New method.
2975         (build_offset_ref_call_from_tree): Likewise.
2976         (build_call_from_tree): Likewise.
2977         (finish_qualified_call_expr): Remove.
2978         (finish_call_expr): Adjust prototype.
2979         (build_x_function_call): Remove.
2980         * cvt.c (ocp_convert): Use build_special_member_call.
2981         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
2982         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
2983         CALL_EXPR.
2984         (build_offset_ref_call_from_tree): New function.
2985         (build_call_from_tree): Likewise.
2986         * init.c (expand_cleanup): Use build_special_member_call.
2987         (expand_default_init): Likewise.
2988         (build_member_call): Use finish_call_expr.
2989         (build_new_1): Use build_special_member_call.
2990         (push_base_cleanups): Likewise.
2991         * method.c (do_build_assign_ref): Likewise.
2992         * parse.y (template_id): Do not pass a COMPONENT_REF to
2993         lookup_template_function.
2994         (primary): Use parse_finish_call_epxr, not finish_call_expr.
2995         (parse_finish_call_expr): New function.
2996         * pt.c (lookup_template_function): Add assertions.
2997         * search.c (lookup_base): Allow T to be a binfo.
2998         (build_baselink): New function.
2999         (lookup_member): Use it.
3000         * semantics.c (finish_call_expr): Do not do name lookup.
3001         (finish_object_call_expr): Remove #if 0'd code.
3002         (finish_qualified_call_expr): Remove.
3003         * typeck.c (build_x_function_call): Remove.
3004         (build_static_case): Use build_special_member_call.
3005         * typeck2.c (build_functional_cast): Likewise.
3007 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3009         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
3011 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
3013         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
3015 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
3017         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
3018         documentation.
3020 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
3022         * cp-tree.h: Comment typo fix.
3024 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
3026         * spew.c (space_for_token): Allocate zeroed memory for a new token
3027         chunk.
3029 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3031         * decl.c (builtin_function_1): No need to explicitly mark
3032         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
3034 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3036         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
3038 2002-07-26  Jason Merrill  <jason@redhat.com>
3040         * call.c (build_over_call): Likewise.
3041         (cp_convert_parm_for_inlining): New fn.
3042         (convert_for_arg_passing): New fn.
3043         (convert_default_arg, build_over_call): Use it.
3044         (type_passed_as): New fn.
3045         * pt.c (tsubst_decl): Use it.
3046         * decl2.c (cp_build_parm_decl): New fn.
3047         (build_artificial_parm): Use it.
3048         (start_static_storage_duration_function): Likewise.
3049         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
3050         (grokparms): Don't mess with DECL_ARG_TYPE.
3051         * typeck.c (convert_arguments): Use convert_for_arg_passing.
3052         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3053         Define.
3054         * cp-tree.h: Declare new fns.
3056 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
3058         * cp-tree.h (flag_operator_names): Remove.
3059         * decl2.c (flag_operator_names): Remove.
3060         (lang_f_options): Remove operator-names.
3061         * lex.c (D_OPNAME): Remove.
3062         (reswords): Remove operator names.
3063         (rid_to_yy): Remove operator names.
3064         (init_reswords): No need to handle D_OPNAME.
3065         * spew.c (read_process_identifier): There are no operator
3066         names.
3068 2002-07-26  Jason Merrill  <jason@redhat.com>
3070         * dump.c (cp_dump_tree): Call c_dump_tree.
3071         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3073 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3075         * error.c (print_whitespace): Remove.
3076         * g++spec.c (LIBUNWIND): Move.
3077         * mangle.c (mangled_position, write_signed_number): Remove.
3079 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3081         * decl2.c (cxx_decode_option): Similarly.
3083 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
3085         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
3086         (cxx_sizeof_or_alignof_type): Take a third argument.
3087         (cxx_sizeof): Adjust definition.
3088         (cxx_alignof): Likewise.
3089         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
3090         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
3091         complaining.
3092         (c_sizeof_nowarn): Remove definition.
3093         (build_unary_op): Use cxx_sizeof_nowarn.
3095 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
3097         * tree.c (cp_build_qualified_type_real): When copying
3098         pointer-to-method types, unshare the record that holds
3099         the cached pointer-to-member-function type.
3101 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3103         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
3105 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
3107         Fix PR/7363:
3108         * typeck.c (cxx_sizeof_or_alignof_type): New function.
3109         (c_sizeof): Remove definition.
3110         (expr_sizeof): Use cxx_sizeof.
3111         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
3112         * decl.c (finish_destructor_body): Use cxx_sizeof.
3113         * semantics.c (finish_alignof): Likewise.
3114         (finish_alignof): Use cxx_alignof.
3115         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
3116         (cxx_sizeof_or_alignof_type): Declare.
3117         (my_friendly_assert): Move to ../c-common.h.
3119 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3121         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
3123 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3125         PR c++/7347, c++/7348
3126         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
3127         * decl.c (make_typename_type): Use it.
3128         (make_unbound_class_template): Likewise.
3129         (lookup_name_real): Don't call type_access_control if scope is
3130         template parameter dependent.
3131         * parse.y (template_arg): Call make_unbound_class_template with
3132         tf_parsing set.
3133         (nest_name_specifier): Call make_typename_type with tf_parsing set.
3134         (typename_sub0): Likewise.
3135         (typename_sub1): Likewise.
3136         (instantiate_decl): Push class scope.
3137         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
3138         for both static variable and member function template.
3139         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
3140         and arguments.
3141         * search.c (type_access_control): Do type access for TEMPLATE_DECL
3142         too.
3144 2002-07-20  Roger Sayle  <roger@eyesopen.com>
3146         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
3147         test by using positive_option.  Make whitespace consistent.
3149 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
3151         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
3152         members with 'locus'.  Adjust use throughout.
3153         (struct feed):  Likewise.
3154         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
3155         Adjust use.
3156         (snarf_defarg): Use error(), not error_with_file_and_line().
3158 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
3160         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
3161         cpp_options is included.
3163 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3165         PR c++/2862, c++/2863
3166         * pt.c (determine_specialization): Compare the length of
3167         TYPE_ARG_TYPES.  Tidy.
3169 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3171         PR c++/3797
3172         * decl.c (duplicate_decls): Don't propagate inlining parameters from
3173         olddecl to newdecl when newdecl is a specialization of the
3174         instantiation olddecl.
3176 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3178         PR c++/4802, c++/5387
3179         * decl.c (make_typename_type): Use enforce_access.
3181 2002-07-17  Scott Snyder <snyder@fnal.gov>
3183         PR c++/7320
3184         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
3186 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
3188         * class.c (add_method): Correct handling of conversion operators.
3190 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
3192         PR c++/7224
3193         * class.c (add_method): Simplify.
3195 2002-07-11  Jason Merrill  <jason@redhat.com>
3197         PR c++/7279
3198         * tree.c (cp_copy_res_decl_for_inlining): Also copy
3199         TREE_ADDRESSABLE.
3201 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
3203         * pt.c (template_parm_this_level_p, push_template_decl_real):
3204         Pass depth as int pointer.
3206 2002-07-11  Tim Josling  <tej@melbpc.org.au>
3208         Remove front end hard coding from gengtype.c.
3210         * config-lang.in (gtfiles): Add files needed for this front end.
3212 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
3214         * cp-tree.h (unqualified_name_lookup_error): Declare it.
3215         (begin_function_definition): Adjust prototype.
3216         * lex.c (unqualified_name_lookup_error): New function, split out
3217         from ...
3218         (do_identifier): ... here.
3219         * parse.y (parse_begin_function_definition): New function.
3220         (fn.def1): Use it.
3221         * semantics.c (begin_function_definition): Accept decl-specifiers
3222         and attributes as separate parameters.
3224 2002-07-10  Jason Merrill  <jason@redhat.com>
3226         PR c++/6255
3227         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
3228         modifying the old one.
3230 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
3232         * cp-tree.h (constructor_name_p): Declare it.
3233         (check_template_template_default_arg): Likewise.
3234         * class.c (handle_using_decl): Use constructor_name_p.
3235         * decl.c (grokdeclarator): Likewise.
3236         * decl2.c (constructor_name_p): Define it.
3237         * init.c (build_member_call): Use constructor_name_p.
3238         * parse.y (template_parm): Use check_template_template_default_arg.
3239         * pt.c (check_explicit_specialization): Use constructor_name_p.
3240         * semantics.c (check_template_template_default_arg): New function.
3242 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3244         * pt.c (can_complete_type_without_circularity): Add static to
3245         function definition.
3247 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
3249         * cp-tree.h (have_extern_spec): Declare it
3250         * decl.c (have_extern_spec): Define it.
3251         (start_decl): Eliminate use of used_extern_spec.
3252         (start_function): Likewise.
3253         * parse.y (have_extern_spec): Remove declaration.
3254         (used_extern_spec): Likewise.
3255         (frob_specs): Eliminate use of used_extern_spec.
3256         (.hush_warning): Likewise.
3258 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
3260         * Make-lang.in (cp/parse.o): Depend on decl.h.
3261         * cp-tree.h (do_decl_instantiation): Change prototype.
3262         * parse.y: Include decl.h.
3263         (parse_decl_instantiation): New function.
3264         (explicit_instantiation): Use it.
3265         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
3266         and DECLSPECS.
3268 2002-07-07  Roger Sayle  <roger@eyesopen.com>
3270         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
3271         constructor and destructor tests when passed a TEMPLATE_DECL.
3273 2002-07-05  Jason Merrill  <jason@redhat.com>
3275         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
3276         pointers.
3278         PR optimization/7145
3279         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
3281 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
3283         Repair damage on weak-impared targets caused by my previous patch.
3284         * cp-tree.h (import_export_tinfo): Add parameter.
3285         * decl2.c (import_export_tinfo): Add parameter, post adjust
3286         DECL_COMDAT.
3287         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
3288         import_export_tinfo.
3290 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3292         PR c++/6944
3293         * init.c (build_aggr_init): Remove qualifiers of init before calling
3294         build_vec_init.
3295         (build_vec_init): Flatten multi-dimensional array during cleanup.
3296         (build_vec_delete_1): Abort if the type of each element is array.
3298 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
3300         * pt.c (instantiate_class_template): Fix typo.
3302 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3304         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
3305         by CVS conflict in my last patch.
3307 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3309         PR c++/6716
3310         * pt.c (can_complete_type_without_circularity): New function.
3311         (instantiate_class_template): Use it.
3312         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
3313         message due to incomplete fields.
3315 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
3317         PR c++/7112
3318         * mangle.c (write_expression): Add mangling for sizeof when
3319         applied to a type.
3320         * operators.def: Remove stale comment.
3322 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
3324         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
3325         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
3326         (tinfo_decl_type): Replace with ...
3327         (type_info_ptr_type): ... this.
3328         (import_export_tinfo): Declare.
3329         (tinfo_decl_p): Rename to ...
3330         (unemitted_tinfo_decl_p): ... this.
3331         * decl2.c (import_export_decl): Break out tinfo handling into ...
3332         (import_export_tinfo): ... here. New function.
3333         (finish_file): Adjust.
3334         * rtti.c (TINFO_REAL_NAME): New macro.
3335         (init_rtti_processing): Create the tinfo types.
3336         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
3337         (get_tinfo_decl): Adjust.
3338         (get_tinfo_ptr): New function.
3339         (get_type_id): Use it.
3340         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
3341         (ptr_initializer): Use get_tinfo_ptr.
3342         (ptm_initializer): Likewise.
3343         (synthesize_tinfo_var): Break into ...
3344         (get_pseudo_ti_init): ... this. Just create the initializer.
3345         (get_pseudo_ti_desc): .. and this.
3346         (create_real_tinfo_var): Remove.
3347         (create_pseudo_type_info): Don't create the vtable decl here.
3348         (get_vmi_pseudo_type_info): Remove.
3349         (create_tinfo_types): Adjust.
3350         (tinfo_decl_p): Rename to ...
3351         (unemitted_tinfo_decl_p): ... here. Adjust.
3352         (emit_tinfo_decl): Adjust. Create the initializer.
3354 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
3356         PR c++/6695
3357         * pt.c (tsubst_friend_class): Substitute into the context of the
3358         friend before using it.
3360 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
3362         * cp-tree.h (xref_tag): Change prototype.
3363         (handle_class_head): Likewise.
3364         (build_x_component_ref): Likewise.
3365         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
3366         (xref_tag): Take attributes as a separate parameter.
3367         (xref_tag_from_type): Adjust call to xref_tag.
3368         * decl2.c (build_expr_from_tree): Adjust call to
3369         build_x_component_ref.
3370         (handle_class_head): Take attributes as a separate parameter.
3371         * parse.y (parse_xref_tag): New function.
3372         (parse_handle_class_head): Likewise.
3373         (primary): Use parse_xref_tag.
3374         (class_head_decl): Use parse_handle_class_head.
3375         (class_head_defn): Likewise.
3376         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
3377         (build_dynamic_cast_1): Likewise.
3378         (create_pseudo_type_info): Likewise.
3379         (emit_support_tinfos): Likewise.
3380         * typeck.c (build_object_ref): Adjust call to
3381         build_x_component_ref.
3382         (build_x_component_ref): Remove protect parameter.
3384 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
3386         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
3387         * class.c (handle_using_decl): Likewise.
3388         (instantiate_type): Likewise.
3389         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
3390         (xref_basetypes): Change prototype.
3391         (begin_mem_initializers): New function.
3392         (get_overloaded_fn): Likewise.
3393         * decl.c (xref_basetypes): Simplify.
3394         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
3395         * init.c (build_offset_ref): Likewise.
3396         * parse.y (base_init): Use begin_mem_initializers().
3397         (structsp): Adjust call to xref_basetypes.
3398         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
3399         (instantiate_class_template): Adjust call to xref_basetypes.
3400         * semantics.c (begin_mem_initializers): New function.
3401         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
3402         (really_overlaoded_fn): Likewise.
3403         (get_overloaded_fn): New function.'
3404         (get_first_fn): USe BASELINK_FUNCTIONS.
3406 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
3408         * cp-tree.h (SCALAR_TYPE_P): New macro.
3409         (check_for_out_of_scope_variable): New function.
3410         (at_class_scope_p): Likewise.
3411         (finish_fname): Likewise.
3412         * class.c (finish_struct): Use at_function_scope_p.
3413         * decl.c (check_for_out_of_scope_variable): New function, split
3414         out from do_identifier.
3415         (finish_enum): Use at_function_scope_p.
3416         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
3417         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
3418         (primary): Use at_function_scope_p.
3419         * search.c (at_class_scope_p): New function.
3420         * semantics.c (finish_fname): Likewise.
3421         (check_multiple_declarators): Use at_function_scope_p.
3423 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
3425         * parse.y (parse_scoped_id): New function.
3426         (primary): Use it.
3427         * cp-tree.h (do_scoped_id): Adjust declaration.
3428         * lex.c (do_scoped_id): Remove call to yylex.
3429         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
3430         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
3431         expanding it inline.
3433 2002-06-23  Matt Thomas  <matt@3am-software.com>
3435         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
3436         "#if VMS_TARGET".
3438 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3440         * mangle.c (integer_type_codes): Const-ify.
3442 2002-06-20  Richard Henderson  <rth@redhat.com>
3444         PR c++/6747
3445         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
3446         Call put_var_into_stack.
3448 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3450         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
3451         array size calculation.
3453 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3455         PR c++/6892
3456         * pt.c (tsubst_expr): Handle FILE_STMT.
3458 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3460         PR c++/6723
3461         * pt.c (lookup_template_class): Don't build complete argument of
3462         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
3463         argument.
3465 2002-06-19  Akim Demaille  <akim@epita.fr>
3467         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
3468         decl.h's TYPENAME.
3469         * spew.c, lex.c: Adjust.
3470         * parse.y (explicit_instantiation): Add empty action to override
3471         the default $$ = $1 where it introduces a type clash.
3473 2002-06-14  Jason Merrill  <jason@redhat.com>
3475         * semantics.c (begin_for_stmt): Push the 'for' scope before
3476         adding the FOR_STMT.
3478         C++ ABI changes.
3479         * class.c (build_base_field): Set DECL_PACKED.
3480         (layout_class_type): Don't use tail padding of PODs.
3481         * mangle.c (write_unqualified_name): Fix template conversion op
3482         mangling.
3484 2002-06-16  Richard Henderson  <rth@redhat.com>
3486         PR opt/6793
3487         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
3488         after template instantiation.
3490 2002-06-16  Richard Henderson  <rth@redhat.com>
3492         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
3494 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
3496         * cp-tree.h (compiler_error): Remove declaration.
3497         * lex.c (compiler_error): Remove definition.
3499 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
3501         * g++spec.c (LIBUNWIND): New.
3502         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
3504 2002-06-13  Jessica Han  <jessica@cup.hp.com>
3506         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
3507         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
3508         (build_vbase_offset_vtbl_entries): Likewise.
3509         * rtti.c (build_headof): Likewise.
3510         (get_tinfo_decl_dynamic): Likewise.
3511         (create_pseudo_type_info): Likewise.
3513 2002-06-12  Stan Shebs  <shebs@apple.com>
3515         * mpw-config.in: Remove file, no longer used.
3516         * mpw-make.sed: Ditto.
3518 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
3520         * decl2.c: Update call to cpp_handle_option.
3522 2002-06-07  H.J. Lu  (hjl@gnu.org)
3524         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
3526 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
3528         * error.c (cp_error_at): Fix typo.
3530 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
3532         * error.c (cp_diagnostic_starter): Adjust call.
3533         (maybe_print_instantiation_context): Change prototype to take a
3534         'diagnostic_info *'.
3535         (print_instantiation_full_context): Likewise.
3536         (print_instantiation_partial_context): Likewise.
3537         (cp_diagnostic_starter): Likewise.
3538         (cp_diagnostic_finalizer): Likewise.
3539         (cp_print_error_function): Likewise.
3540         (cp_printer): Take a secondary parameter as a 'text_info *'.
3541         Remove output_state savings.  Adjust calls.
3543 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
3545         * pt.c (inline_parm_levels): Mark for GC.
3547         * mangle.c (start_mangling): Allocate G.substitutions here...
3548         (init_mangle): ... rather than here.
3549         (finish_mangling): Clear the varray pointer when done with it.
3550         * spew.c (yylexstring): Don't use VARRAY_FREE.
3551         * search.c (bfs_walk): Don't use VARRAY_FREE.
3552         * decl2.c (pending_statics): Use gengtype to mark.
3553         (deferred_fns): Likewise.
3554         (ssdf_decls): Likewise.
3555         (init_decl2): Delete.
3556         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
3557         (cxx_init_decl_processing): Don't call init_decl2.
3558         (cxx_pop_function_context): Don't use VARRAY_FREE.
3559         * cp-tree.h (struct saved_scope): No need for special marking
3560         of varrays.
3561         (struct language_function): Likewise.
3562         (local_classes): Use gengtype to mark.
3563         (init_decl2): Delete prototype.
3564         * class.c (init_class_processing): Don't use
3565         ggc_add_tree_varray_root.
3566         (build_vtbl_initializer): Don't use VARRAY_FREE.
3568         * decl.c (typename_compare): Don't use same_type_p.
3570         * decl.c: Include hashtab.h instead of hash.h.
3571         (typename_hash): Update to use htab_h.
3572         (typename_compare): Likewise.
3573         (typename_htab): Use gengtype to mark.
3574         (build_typename_type): Update to use htab_h.
3575         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
3577         * Make-lang.in (gt-cp-tree.h): New rule.
3578         (cp/tree.o): Depend on gt-cp-tree.h.
3579         * config-lang.in (gtfiles): Add cp/tree.c.
3580         * tree.c: Include gt-cp-tree.h.
3581         (list_hash_table): Use gengtype to mark.
3582         (init_tree): Use gengtype to mark trees.
3584         * Make-lang.in (cp/decl.o): Add debug.h dependency.
3585         * call.c (struct z_candidate): Use gengtype.
3586         (USER_CONV_CAND): Use WRAPPER_ZC.
3587         (convert_class_to_reference): Use build_zc_wrapper.
3588         (build_type_conversion_1): Likewise.
3589         (build_over_call): Use WRAPPER_ZC.
3590         (add_warning): Use build_zc_wrapper.
3591         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
3592         * cp-tree.h (struct lang_identifier): Use gengtype.
3593         (struct template_parm_index_s): Likewise.
3594         (struct ptrmem_cst): Likewise.
3595         (struct tree_binding): Likewise.
3596         (struct tree_overload): Likewise.
3597         (struct tree_srcloc): Likewise.
3598         (struct tree_wrapper): Likewise.  Also modify to have a pointer
3599         to struct z_candidate rather than void.
3600         (enum cp_tree_node_structure_enum): New.
3601         (union lang_tree_node): New.
3602         (cxx_mark_tree): Delete prototype.
3603         (cp_tree_node_structure): New prototype.
3604         (build_ptr_wrapper): Delete prototype.
3605         (build_int_wrapper): Delete prototype.
3606         (build_zc_wrapper): New prototype.
3607         * decl.c: Include debug.h
3608         (cxx_mark_tree): Delete.
3609         (cp_tree_node_structure): New.
3610         * tree.c (build_ptr_wrapper): Delete.
3611         (build_int_wrapper): Delete.
3612         (build_zc_wrapper): New.
3614         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
3615         Correct typo.  Patch from k_fukui@highway.ne.jp.
3617         * semantics.c (current_stmt_tree): Update for change to
3618         struct language_function.
3619         (finish_mem_initializers): Likewise.
3620         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
3621         * cp-tree.h (struct language_function): Rename from
3622         cp_language_function.  Change all uses.
3623         (cp_function_chain): Don't need to cast.
3625         * class.c (duplicate_tag_error): Reset discriminator.
3626         (check_bases_and_members): Update for data structure changes.
3627         * cp-tree.h (struct lang_id2): Use gengtype.
3628         (flagged_type_tree): Likewise.
3629         (SET_LANG_ID): Use GGC on struct lang_id2.
3630         (struct cp_language_function): Use gengtype.  Remove field
3631         'x_vcalls_possible_p'.
3632         (current_vcalls_possible_p): Delete.
3633         (struct lang_type_header): New.
3634         (struct lang_type_class): Rename from struct lang_type.  Include
3635         struct lang_type_header.
3636         (struct lang_type_ptrmem): New.
3637         (struct lang_type): New.
3638         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
3639         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
3640         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
3641         (struct lang_decl_flags): Use gengtype.  Add discriminators.
3642         (struct lang_decl): Use gengtype.  Add and use discriminators.
3643         Update the macros that reference moved fields.
3644         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
3645         (SET_DECL_THUNK_P): Set discriminator too.
3646         (clear_inline_text_obstack): Delete prototype.
3647         (finish_inline_definitions): Delete prototype.
3648         (mark_pending_inlines): Delete prototype.
3649         (lang_check_failed): New prototype.
3650         * decl.c (struct named_label_use_list): Use gengtype.
3651         (struct named_label_list): Likewise.
3652         (mark_binding_level): Delete.
3653         (mark_named_label_lists): Delete.
3654         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
3655         (cxx_init_decl_processing): Use generated marker routine.
3656         (begin_destructor_body): Delete dead set to
3657         current_vcalls_possible_p.
3658         (mark_lang_function): Delete.
3659         (mark_cp_function_context): Delete.
3660         (lang_mark_tree): Use generated marker routines.
3661         * decl2.c (start_objects): Set discriminator when setting
3662         GLOBAL_INIT_PRIORITY.
3663         * lex.c (retrofit_lang_decl): Set discriminators.
3664         (copy_lang_type): Update for changes to lang_type structure.
3665         (cp_make_lang_type): Set discriminator.
3666         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
3667         * search.c: Include ggc.h.
3668         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
3669         (finish_inline_definitions): Delete.
3670         * spew.c (struct token): Use gengtype.
3671         (struct token_chunk): New.
3672         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
3673         (struct feed): Use gengtype.
3674         (feed_obstack): Delete.
3675         (feed): Mark as GC root.
3676         (pending_inlines): Mark as GC root.
3677         (pending_inlines_tail): Likewise.
3678         (processing_these_inlines): Likewise.
3679         (token_obstack): Make static.
3680         (first_token): Likewise.
3681         (init_spew): Don't initialize deleted things; use gengtype for roots.
3682         (clear_inline_text_obstack): Delete.
3683         (feed_input): Use GC for struct feed.  Update for changes to
3684         struct unparsed_text.
3685         (mark_pending_inlines): Delete.
3686         (next_token): Rename from add_token.  Change all callers.  Update
3687         for changes to struct unparsed_text.
3688         (space_for_token): New.
3689         (remove_last_token): New.
3690         (alloc_unparsed_text): New.
3691         (snarf_block): Take an unparsed_text.  Update for changes to struct
3692         unparsed_text.
3693         (snarf_method): Update for changes to struct unparsed_text.
3694         (snarf_defarg): Update for changes to struct unparsed_text.
3695         * tree.c (lang_check_failed): New.
3697         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
3698         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
3699         (cp/spew.o): Add dependency on gt-<filename>.h.
3700         (cp/decl2.o): Add dependency on gt-<filename>.h.
3701         (cp/call.o): Add dependency on gt-<filename>.h.
3702         (cp/pt.o): Add dependency on gt-<filename>.h.
3703         (cp/repo.o): Add dependency on gt-<filename>.h.
3704         (cp/parse.o): Add dependency on gt-<filename>.h.
3705         * call.c: Use gengtype for roots.
3706         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
3707         decl2.c parse.y pt.c repo.c spew.c.
3708         * cp-tree.h: Use gengtype for roots.
3709         (struct saved_scope): Use GGC, gengtype.
3710         (cp_parse_init): Delete prototype.
3711         (init_pt): Delete prototype.
3712         * decl.c: Use gengtype for roots.
3713         (mark_saved_scope): Delete.
3714         (cxx_init_decl_processing): Don't call deleted initilisation
3715         routines.
3716         (signed_size_zero_node): Delete, unused.
3717         * decl.h: Use gengtype for roots.
3718         * decl2.c: Use gengtype for roots.
3719         * lex.h: Use gengtype for roots.
3720         * parse.y: Use gengtype for roots.
3721         (cp_parse_init): Delete.
3722         * pt.c: Use gengtype for roots.
3723         (init_pt): Delete.
3724         * repo.c: Use gengtype for roots.
3725         * spew.c: Use gengtype for roots.
3727         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
3728         (cp/decl.o): Add dependency on gtype-cp.h.
3729         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
3730         Include gtype-cp.h.  Allow for filename changes.
3732         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
3733         (cp/decl.o): Add cp/gt-decl.h dependency.
3734         * config-lang.in (gtfiles): New.
3735         * tree.h: Rename struct binding_level to struct cp_binding_level.
3736         * decl.c: Rename struct binding_level to struct cp_binding_level.
3737         Include cp/gt-decl.h.
3738         (struct cp_binding_level): Use gengtype.
3739         (make_binding_level): Use GGC on struct cp_binding_level.
3740         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
3741         (cxx_init_decl_processing): Mark free_binding_level as
3742         deletable.
3744         * decl.c (mark_cp_function_context): Update calling sequence.
3746         * decl.c (start_function): Don't free 'struct
3747         cp_language_function'.
3748         (pop_cp_function_context): Likewise.
3749         (save_function_data): Allocate it using GC.
3750         * semantics.c (genrtl_start_function): Don't free 'struct
3751         cp_language_function'.
3753 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
3755         * lang-specs.h: Use cpp_debug_options.
3757 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
3759         * mangle.c, tree.c: Include real.h.
3760         * Make-lang.in: Update dependency lists.
3762 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3764         * lex.c: Don't include c-lex.h.
3765         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
3767 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
3769         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
3771 2002-05-22  Richard Henderson  <rth@redhat.com>
3773         * decl.c (obscure_complex_init): Check for VAR_DECL
3774         before using DECL_THREAD_LOCAL.
3776 2002-05-22  Richard Henderson  <rth@redhat.com>
3778         * decl.c (check_tag_decl): Handle RID_THREAD.
3779         (obscure_complex_init): Reject run-time init of tls.
3780         (grokvardecl, grokdeclarator): Handle RID_THREAD.
3781         * lex.c (reswords): Add __thread.
3782         (rid_to_yy): Map RID_THREAD to SCSPEC.
3784 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
3786         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
3787         * cp-tree.h (cxx_post_options): Kill.
3788         * cp-lex.c (cxx_post_options): Kill.
3790 2002-05-21  Richard Henderson  <rth@redhat.com>
3792         * lex.c (rid_to_yy): Add RID_THREAD.
3794 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
3796         * init.c (build_vec_init): Test for trivial copy-assignment when
3797         copy-assigning arrays.
3799 2002-05-20  Andreas Jaeger  <aj@suse.de>
3801         * init.c (build_default_init): Remove unused variable.
3803 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
3805         * call.c (any_strictly_viable): New.
3806         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
3808 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3810         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
3812 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3814         PR c++/186, DR 259
3815         * pt.c (do_decl_instantiation): Don't complain explicit
3816         instantiation after explicit specialization.
3817         (do_type_instantiation): Likewise.
3819 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
3821         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
3822         renamed from...
3823         (complete_type_or_else): ... this.  Redefined as macro.
3824         (cxx_incomplete_type_diagnostic): Declare.
3825         (cxx_incomplete_type_error): Define as macro.
3826         * init.c (build_delete): Warn about incomplete types other than
3827         void, and use the built-in operator delete for them.
3828         * typeck.c (complete_type_or_diagnostic): Renamed from
3829         complete_type_or_else.  Added warn_only argument, passed to...
3830         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
3831         warnings or errors depending on new warn_only argument.  Renamed
3832         from...
3833         (cxx_incomplete_type_error): ... this.  New implementation in
3834         terms of cxx_incomplete_type_diagnostic.
3836 2002-05-18  Jason Merrill  <jason@redhat.com>
3838         PR c++/6611
3839         * decl2.c (import_export_decl): If we clear
3840         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
3842 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3844         PR c++/6620
3845         * pt.c (verify_class_unification): Don't check if PARM is template
3846         parameter dependent.  Simplify.
3847         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
3848         parameter dependent expression.
3850 2002-05-14  Jason Merrill  <jason@redhat.com>
3852         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
3853         Do set DECL_COMDAT.
3854         (synthesize_tinfo_var): Take the public decl.
3855         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
3856         (emit_tinfo_decl): Adjust.  Call import_export_decl.
3857         * decl2.c (import_export_decl): Simplify tinfo decl handling.
3859 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
3861         * cp-tree.h (struct lang_type): Added non_zero_init.
3862         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
3863         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
3864         * class.c (check_field_decls): Test non_zero_init.
3865         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
3866         zero-to-NULL conversions.
3867         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
3868         type that needs zero-initialization without zeros.
3869         (check_initializer_decl): Compute zero-initializer for types
3870         that require a non-trivial one.
3871         * init.c (build_forced_zero_init): New function.
3872         (build_default_init): Use it.
3873         * tree.c (zero_init_p): New function.
3874         * typeck2.c (force_store_init_value): New function.
3875         (process_init_constructor): Create non-trivial zero-initializers
3876         for array members and class fields.
3878 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
3880         * lang-specs.h: Remove redundant -lang-c++.
3882 2002-05-13  Jason Merrill  <jason@redhat.com>
3884         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
3885         (fixed_type_or_null): See through reference vars.
3886         (build_base_path): Vtable contents are constant.
3887         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3889 2002-05-12  Jason Merrill  <jason@redhat.com>
3891         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
3892         structs are safe.
3894 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3896         * cp-tree.h (flag_ansi): Remove.
3897         * decl2.c (flag_ansi): Remove.
3898         (cxx_decode_option): Set flag_iso and flag_undef.
3900 2002-05-09  Jason Merrill  <jason@redhat.com>
3902         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
3903         Use subtraction rather than a bitmask to get the index.
3904         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
3906         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
3908 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
3910         * Make-lang.in (decl2.o): Update.
3911         * cp-tree.h (warn_multichar): Remove.
3912         * decl2.c: Include c-common.h.
3913         (warn_multichar): Remove.
3915 2002-05-03  Jason Merrill  <jason@redhat.com>
3917         * tree.c (build_cplus_array_type): Only const and volatile get
3918         special handling.
3920         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
3922 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
3924         ABI change, returning simple classes from functions.
3925         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
3926         TYPE_HAS_TRIVIAL_INIT_REF is false or
3927         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
3929 2002-04-30  Jason Merrill  <jason@redhat.com>
3931         PR debug/6436
3932         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
3933         anonymous class with a typedef if there are attributes.
3935 2002-04-29  Paul Eggert  <eggert@twinsun.com>
3937         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
3939 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
3941         PR c++/6477
3942         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
3943         non-NULL first.
3945 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
3947         PR c++/6492
3948         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
3949         enter that scope before name lookup.
3951         PR c++/6486
3952         * method.c (do_build_copy_constructor): Avoid building
3953         cv-qualified reference types.
3955 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
3957         PR c++/5719
3958         * decl.c (grok_op_properties): Assignment ops don't have to return
3959         by value. operator% should.
3961 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3963         PR c/6343
3964         * decl.c (duplicate_decls): Call merge_weak.
3966 2002-04-26  Richard Henderson  <rth@redhat.com>
3968         * parse.y (malloced_yyss, malloced_yyvs): New.
3969         (yyoverflow): Re-add.  Set them.
3970         (free_parser_stacks): New.
3972 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
3974         PR c++/6497
3975         * method.c (do_build_assign_ref): Pass a derivation to
3976         build_method_call when calling base class assignment operators.
3978 2002-04-26  Richard Henderson  <rth@redhat.com>
3980         * parse.y (yyoverflow): Revert.
3982 2002-04-26  Richard Henderson  <rth@redhat.com>
3984         PR c/3581
3985         * parse.y (string): Remove.  Update all uses to use STRING
3986         instead, and not call combine_strings.
3987         * rtti.c (tinfo_name): Use fix_string_type.
3988         * semantics.c (finish_asm_stmt): Don't call combine_strings.
3989         * spew.c (yylexstring): New.
3990         (read_token): Use it.
3992 2002-04-25  Richard Henderson  <rth@redhat.com>
3994         PR c/2161
3995         * parse.y (yyoverflow): New.
3997 2002-04-25  Jason Merrill  <jason@redhat.com>
3999         PR c++/5607
4000         * search.c (check_final_overrider): No longer static.
4001         * class.c (update_vtable_entry_for_fn): Call it.
4002         * cp-tree.h: Adjust.
4004 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4006         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4007         * cp-tree.h (cxx_set_yydebug): Die.
4008         * lex.c (YYDEBUG): Get from c-lex.h.
4009         (cxx_set_yydebug): Remove.
4010         * parse.y: Include c-lex.h.
4011         (YYDEBUG): Get from c-lex.h.
4013 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
4015         PR c++/6438.
4016         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
4017         void.
4019 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4021         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
4022         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
4023         Redefine.
4024         * cp-tree.h (cp_attribute_table): Rename.
4025         * decl.c (lang_attribute_table): Remove declaration.
4026         (cxx_init_decl_processing): Don't set it.
4027         * tree.c (cp_attribute_table): Rename.
4029 2002-04-24  Jason Merrill  <jason@redhat.com>
4031         PR c++/6331
4032         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
4033         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
4034         The pedwarn for array assignment is now unconditional.
4035         * tree.c (build_cplus_array_type_1): Still process simple array types
4036         normally in templates.
4038         PR c++/6395
4039         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
4040         stuff for comdats.
4042 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
4044         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
4045         node with attributes.
4047 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
4049         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
4050         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
4052 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
4054         PR c++/6256:
4055         * pt.c (tsubst_friend_class): Handle templates with explicit
4056         nested names.
4058         PR c++/6331:
4059         * typeck.c (merge_types): Remember the cv-qualification of pointer
4060         types when merging them.
4062 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4064         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
4065         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
4066         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
4067         cxx_mark_function_context): New.
4068         * decl.c (push_cp_function_context, pop_cp_function_context,
4069         mark_cp_function_context): Rename for consistency.
4070         (cxx_init_decl_processing): Don't set old hooks.
4072 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
4074         * call.c (convert_type_from_ellipsis): Rename, update.
4075         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
4076         * cp-tree.h (convert_type_from_ellipsis): Rename.
4077         * decl.c (cxx_init_decl_processing): Don't set hook.
4079 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4081         * call.c (build_new_method_call): Update.
4082         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
4083         * cp-tree.h (cxx_incomplete_type_error): New.
4084         * decl.c (grokdeclarator, grokparms): Update.
4085         * decl2.c (check_classfn): Update.
4086         * pt.c (tsubst): Update.
4087         * typeck.c (complete_type_or_else, expr_sizeof,
4088         decay_conversion): Update.
4089         * typeck2.c (incomplete_type_error): Rename.
4090         (add_exception_specifier): Update.
4092 2002-04-18  Jason Merrill  <jason@redhat.com>
4094         PR c++/5658
4095         * search.c (setup_class_bindings): A class template qualifies as a
4096         type binding.
4098 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
4100         PR c++/6316
4101         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
4102         before expanding.
4104 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
4106         * init.c (begin_init_stmts): Remove commented out code.
4107         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
4108         * semantics.c (begin_gobal_stmt_expr): Adjust call to
4109         expand_start_stmt_expr.
4111 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
4113         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
4114         dso_handle itself, to __cxa_atexit.
4116 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4118         * error.c (cxx_print_error_function): Adjust call to macros.
4120 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
4122         * class.c (layout_virtual_bases): Do all dsize computation on trees.
4124 2002-04-14  Jason Merrill  <jason@redhat.com>
4126         * typeck.c (get_member_function_from_ptrfunc): Don't do
4127         gratuitious division and multiplication on
4128         ptrmemfunc_vbit_in_delta targets.
4130 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4132         PR c++/5373.
4133         * semantics.c (finish_expr_stmt): Remember the type of the
4134         expression before any conversions are performed.
4136 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4138         PR c++/5189.
4139         * call.c (add_template_candidate_real): Do not treat member
4140         templates as copy constructors.
4142 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4144         * decl.c (duplicate_decls): Do not copy the RTL for a variable
4145         declaration if the old variable had an incomplete type and the new
4146         variable does not.
4147         (complete_vars): Do not call layout_decl for completed variables.
4149 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
4151         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
4152         with an explicit one.
4153         (follow_tag_typedef): New.
4154         (lookup_tag): Use it to extract the tag of an explicit typedef.
4155         (xref_tag): Likewise.
4157 2002-04-11  Andrew Haley  <aph@redhat.com>
4159         * typeck.c (type_after_usual_arithmetic_conversions):
4160         If two types have the same variant, return immediately.
4161         When two floating-point operands are the same precision:
4162           convert to float if one of the operands is float;
4163           if neither operand is one of the standard types, return the type
4164           of the first operand.
4166 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
4168         PR c++/5507
4169         * decl.c (make_typename_type): Remove implicit typenameness.
4171 2002-04-09  Jason Merrill  <jason@redhat.com>
4173         PR optimization/6189
4174         * semantics.c (genrtl_start_function): Don't free
4175         DECL_SAVED_FUNCTION_DATA for inline functions.
4177         * init.c (build_member_call): For now, don't convert to
4178         intermediate base if it would cause an error.
4180 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
4182         * parse.y (namespace_qualifier, maybe_identifier,
4183         begin_explicit_instantiation, end_explicit_instantiation,
4184         apparent_template_type, .finish_template_type,
4185         do_id, maybe_init, defarg_again, component_decl_1):
4186         Add ending ';', in accordance with POSIX.
4188 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
4190         PR c++/5571
4191         * class.c (layout_class_type): Remember incomplete static
4192         variables.
4193         (finish_struct_1): Call complete_vars, not
4194         hack_incomplete_structures.
4195         * cp-tree.h (hack_incomplete_structures): Rename to ...
4196         (complete_vars): ... this.
4197         (struct saved_scope): Remove incomplete.
4198         (namespace_scope_incomplete): Remove.
4199         * decl.c (struct binding_level): Remove incomplete.
4200         (incomplete_vars): New variable.
4201         (mark_binding_level): Don't mark incomplete.
4202         (print_binding_level): Don't print it.
4203         (mark_saved_scope): Don't mark incomplete.
4204         (pushdecl): Use maybe_register_incopmlete_var.
4205         (cxx_init_decl_processing): Register incomplete_vars for GC.
4206         (start_decl_1): Clarify error message.
4207         (hack_incomplete_vars): Remove.
4208         (maybe_register_incomplete_var): New function.
4209         (complete_vars): Likewise.
4211 2002-04-06  Jason Merrill  <jason@redhat.com>
4213         PR c++/4934
4214         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
4215         set before checking it.
4217         PR c++/525
4218         * init.c (build_member_call): Use build_scoped_ref.
4219         (resolve_offset_ref): Likewise.
4220         * call.c (build_scoped_method_call): Likewise.
4221         * tree.c (maybe_dummy_object): Kludge around current_class_type being
4222         wrong.
4223         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
4224         * cp-tree.h: Adjust.
4226         * init.c (push_base_cleanups): Just use build_scoped_method_call.
4228         PR c++/6179
4229         * method.c (implicitly_declare_fn): Pass unqualified type to
4230         synthesize_exception_spec.
4232 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
4234         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4235         * cvt.c: Update comment.
4236         * init.c (expand_cleanup_for_base): Update.
4237         * semantics.c (finish_parenthesized_expr): Update.
4238         * typeck.c (cp_truthvalue_conversion): Update.
4240 2002-04-04  Jason Merrill  <jason@redhat.com>
4242         * semantics.c (finish_eh_cleanup): New fn.
4243         * cp-tree.h: Add prototype.
4244         * init.c (perform_member_init, expand_cleanup_for_base): Use
4245         finish_eh_cleanup.
4246         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
4247         * cp-tree.h: Remove references.
4248         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
4249         * dump.c (cp_dump_tree): Likewise.
4250         * pt.c (tsubst_expr): Likewise.
4251         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
4252         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
4253         * tree.c (cp_statement_code_p): Likewise.
4255         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
4257         PR c++/5636
4258         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
4259         cleanup for nrv.
4261         PR c++/5104
4262         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
4263         specifiers.
4264         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
4266 2002-04-03  Richard Henderson  <rth@redhat.com>
4268         * cp-lang.c (cxx_warn_unused_global_decl): New.
4269         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
4271 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4273         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
4274         * tree.c (init_tree): Don't set hook.
4276 2002-04-03  Roger Sayle  <roger@eyesopen.com>
4278         PR c++/5998:
4279         * decl.c (duplicate_decls): Don't mess with assembler names when
4280         redeclaring builtin functions as static.
4282 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4284         * call.c (build_addr_func): Update.
4285         * class.c (resolve_address_of_overloaded_function): Update.
4286         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4287         * cp-tree.h (cxx_mark_addressable): New.
4288         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
4289         * decl2.c (build_cleanup): Update.
4290         * except.c (build_throw): Update.
4291         * init.c (resolve_offset_ref): Update.
4292         * pt.c (convert_nontype_argument): Update.
4293         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
4294         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
4295         unary_complex_lvalue): Update.
4296         (mark_addressable): Rename.
4298 2002-04-01  Roger Sayle  <roger@eyesopen.com>
4300         PR c++/5998:
4301         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
4302         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
4303         but follow the SET_DECL_RTL idiom used elsewhere in the function.
4305 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4307         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4308         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4309         * decl.c (grokdeclarator): Update.
4310         * mangle.c (write_integer_cst): Update.
4311         * typeck.c (build_binary_op): Update.
4313 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4315         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
4316         * lex.c (cxx_init): Don't set hook.
4318 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4320         * Make-lang.in (error.o): Update.
4321         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
4322         * cp-tree.h (struct diagnostic_context): Predeclare.
4323         (cxx_print_error_function): New.
4324         * error.c: Include langhooks-def.h.
4325         (lang_print_error_function): Rename.  Update.
4326         (init_error): Don't set hook.
4328 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4330         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
4331         Redefine.
4332         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
4333         * decl.c (finish_enum): Similarly.
4334         * error.c (dump_type): Similarly.
4335         * lex.c (cxx_init): Similarly.
4336         * mangle.c (write_builtin_type): Similarly.
4337         * typeck.c (comptypes): Similarly.
4339 2002-03-28  Roger Sayle  <roger@eyesopen.com>
4341         PR c++/5998:
4342         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
4343         in the g++ front-end.
4344         (duplicate_decl): Allow redefinition of anticipated built-ins.
4345         Fix inlining problem by over-writing the old DECL_RTL.
4346         (lookup_namespace_name): Fail to find an identifier in the
4347         specified namespace if its still anticipated.
4348         (builtin_function_1): New function split out from builtin_function
4349         to create a builtin in the current namespace with given context.
4350         (builtin_function): Call builtin_function_1 to define the
4351         appropriate builtins in both the std and global namespaces.
4352         (select_decl): Don't test for anticipated decls here.
4353         (unqualified_namespace_lookup): Instead ignore them whilst
4354         searching through scopes and namespaces.
4355         * decl2.c (do_nonmember_using_decl): If a using declaration
4356         specifies an anticipated built-in function, mark it as no longer
4357         anticipated in that scope.
4358         (ambiguous_decl):  Avoid resolving to an anticipated decl.
4359         * lex.c (do_scoped_id): Fail to find an identifier in the global
4360         namespace if its still anticipated.
4362 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4364         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
4365         * cp-tree.h (cp_make_lang_type): Rename.
4366         * lex.c (cp_make_lang_type): Rename.
4367         (make_aggr_type): Update.
4368         * tree.c (init_tree): Don't set make_lang_type_fn.
4370 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
4372         PR c++/6073
4373         * class.c (finish_struct_1): Update static field's DECL_MODE even
4374         if its type is a variant of t.
4376 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4378         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
4379         * cp-tree.h (cxx_insert_default_attributes): New.
4380         * decl.c (insert_default_attributes): Rename.
4382 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
4384         PR c++/4884
4385         * call.c (build_op_delete_call): Allow for the fact the placement
4386         may be a COMPOUND_EXPR.
4388 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4390         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4391         * cp-tree.h (init_cplus_expand): Remove.
4392         (cxx_expand_expr): New.
4393         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
4394         fix prototype.
4395         (init_cplus_expand): Remove.
4396         * lex.c (cxx_init): Don't call init_cplus_expand.
4398 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
4400         PR c++/4884.
4401         * init.c (build_new_1): Allow for the fact the result of
4402         build_function_call may be a COMPOUND_EXPR.
4404 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
4406         PR c++/5682
4407         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
4408         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4409         (dfs_skip_nonprimary_vbases_markedp): Remove.
4410         * search.c (get_shared_vbase_if_not_primary): Remove.
4411         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4412         (dfs_skip_nonprimary_vbases_markedp): Remove.
4413         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
4414         (dfs_marked_real_bases_queue_p): Likewise.
4416 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
4418         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4419         * cp-tree.h (cxx_mark_tree): New.
4420         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
4422 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4424         * cp-tree.h (cxx_maybe_build_cleanup): New.
4425         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
4426         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
4427         * tree.c (build_target_expr): Update.
4428         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
4430 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4432         * decl2.c (cxx_decode_option): Handle -E.
4433         * lang-specs.h (default_compilers): Preprocess with cc1plus.
4434         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
4436 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
4438         PR c++/6037
4439         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
4441 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4443         * error.c (dump_type): Be careful about implicit typenames.
4445 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4447         PR C++/3656
4448         * semantics.c (finish_base_specifier): Handle erronous base
4449         classes.
4451 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
4453         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
4454         REAL_IS_NOT_DOUBLE.
4456 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
4458         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
4459         an index into the vtable_entry array regardless of
4460         TARGET_PTRMEMFUNC_VBIT_LOCATION.
4462 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
4464         * tree.c (cp_cannot_inline_tree_fn): Same.
4466 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
4468         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4469         insert_block, getdecls, global_bindings_p): New.
4471 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
4473         PR c++/4361
4474         * mangle.c (struct globals) Add internal_mangling_p member.
4475         (write_template_param): Do internal mangling, if needed.
4476         (mangle_conv_op_name_for_type): Request internal mangling.
4478 2002-03-20  Jason Merrill  <jason@redhat.com>
4480         PR c++/2136
4481         * init.c (build_delete): Check access for a member op delete here.
4482         * decl2.c (delete_sanity): Not here.
4484 2002-03-19  Jason Merrill  <jason@redhat.com>
4486         PR c++/5118
4487         * class.c (get_vfield_name): Use the constructor_name.
4489 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4491         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
4492         * cp-tree.h (lang_printable_name): Rename.
4493         * error.c (lang_decl_name): Use new hook.
4494         * lex.c (cxx_init): Remove old hook.
4495         * pt.c (tsubst_decl): Use new hook.
4496         * tree.c (lang_printable_name): Rename.
4498 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
4500         PR c++/3882
4501         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
4502         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
4503         only after recording the declaration.
4505 2002-03-18  Jason Merrill  <jason@redhat.com>
4507         PR c++/2039
4508         * init.c (resolve_offset_ref): Hand off to build_component_ref.
4510         PR c++/4222, c++/5995
4511         * call.c (build_over_call): Fix empty class logic.
4513         PR c++/3870
4514         * cp-tree.h (struct saved_scope): Add last_parms field.
4515         * decl.c (maybe_push_to_top_level): Save last_function_parms.
4516         (pop_from_top_level): Restore it.
4518         PR c++/4377
4519         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
4520         NON_LVALUE_EXPRs.
4522         PR c++/4003
4523         * pt.c (tsubst_friend_function): Use decl_namespace_context.
4525         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
4526         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
4527         type with a nontrivial destructor.
4529 2002-03-17  Jason Merrill  <jason@redhat.com>
4531         PR c++/4460
4532         * class.c (build_base_path): Virtual base layout is fixed in
4533         in-charge [cd]tors.
4535 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
4537         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
4538         * parse.y (yyparse): Remove macro.
4540 2002-03-17  Jason Merrill  <jason@redhat.com>
4542         PR c++/5757
4543         * init.c (build_new_1): Pass the right pointer to op delete.
4545 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4547         PR c++/4361
4548         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
4549         conversion operators go.
4550         (struct lang_decl_flags): Add template_conv_p and unused
4551         bitfields.
4552         (DECL_TEMPLATE_CONV_FN_P): New macro.
4553         * call.c (build_user_type_conversion_1): Don't check second type
4554         conversion of overload set first.
4555         * class.c (add_method): Make sure templated conversion operators
4556         all end up on slot 2.
4557         * lex.c (do_identifier): A conversion operator token might be
4558         satisfied by a templated conversion operator.
4559         * pt.c (check_explicit_specialization): Use
4560         CLASSTYPE_FIRST_CONVERSION_SLOT.
4561         (template_parm_this_level_p): New function.
4562         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
4563         * search.c (lookup_fnfields_1): Template conversions will be on
4564         the first slot.
4565         * typeck.c (build_component_ref): Preserve the type of an
4566         conversion operator name on the overload type.
4567         (build_x_function_call): Retrieve the conversion operator name.
4569 2002-03-15  Richard Henderson  <rth@redhat.com>
4571         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
4573 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
4575         * cp-tree.h (CLEANUP_DECL): Remove.
4576         (CLEANUP_EXPR): Likewise.
4577         * decl.c (destroy_local_var): Simplify.
4578         (maybe_build_cleanup): Tidy.
4579         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
4580         * semantics.c (cp_expand_stmt): Likewise.
4581         * cp/tree.c (cp_statement_code_p): Likewise.
4583 2002-03-15  Jason Merrill  <jason@redhat.com>
4585         PR c++/5857
4586         * decl.c (duplicate_decls): Use merge_types instead of common_type.
4587         * typeck.c (common_type): Just hand off to
4588         type_after_usual_arithmetic_conversions and
4589         composite_pointer_type.
4590         (merge_types): New fn.
4591         (commonparms): Use it instead of common_type.
4592         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
4593         (composite_pointer_type): Also handle attributes.
4594         * cp-tree.h: Declare merge_types.
4596         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
4597         variables.
4598         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
4600 2002-03-14  Richard Henderson  <rth@redhat.com>
4602         * decl.c: Include c-pragma.h.
4603         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
4604         * Make-lang.in: Update dependencies.
4606 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
4608         PR c++/5908
4609         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
4610         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
4612 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4614         * mangle.c (write_builtin_type): Handle 128-bit integers even if
4615         they are not a standard integer type.
4617 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4619         * cp-tree.h (init_init_processing): Remove declaration.
4620         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
4621         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
4623 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4625         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
4626         Define.
4627         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
4628         tree_code_length.
4629         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
4630         cplus_tree_code_name): Delete.
4631         (cxx_init): Don't call add_c_tree_codes, instead set
4632         lang_unsafe_for_reeval.  Don't try to copy into the various
4633         tree_code arrays.
4635 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
4637         PR c++/5659
4638         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
4639         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
4640         definitions.
4642 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4644         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
4645         DR209 is now not a defect.
4646         * cp-tree.h (skip_type_access_control): Remove.
4647         * decl.c (grokdeclarator): Do type access control for friend
4648         declarations.
4649         * semantics.c (decl_type_access_control): Don't reset
4650         current_type_lookups.
4651         (save_type_access_control): Always save the lookups.
4652         (skip_type_access_control): Remove.
4653         (finish_class_definition): Don't change type_lookups.
4655 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4657         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
4658         It is incorrect.
4659         * typeck.c (build_static_cast): Compare non-qualified types
4660         with pointer to member conversions.
4662 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
4663             Daniel Berlin  <dan@dberlin.org>
4665         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
4666         (cxx_get_alias_set): Use it.
4668 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4670         * cp-tree.h (stabilize_expr): Prototype.
4672 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4674         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
4675         conditional return void.
4677 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
4679         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
4680         * cp-tree.h (cxx_unsave): New.
4681         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
4682         (init_tree): Update.
4684 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4686         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
4687         explicit sizeof/sizeof.
4688         * decl2.c (cxx_decode_option): Likewise.
4689         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
4691 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4693         PR c++/775
4694         * decl.c (lookup_tag): Only reject enum/class mismatch, not
4695         class/union mismatch.
4696         * parse.y (check_class_key): New function.
4697         (structsp): Call it.
4699 2002-03-01  Michael Matz  <matz@suse.de>
4701         * typeck.c (cp_pointer_int_sum): Complete inner type which is
4702         used later by size_in_bytes().
4704 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
4706         * cp-tree.h:  Require __GNUC__ to be #defined.
4707         (build_init):  Add missing prototype.
4709 2002-03-01  Jason Merrill  <jason@redhat.com>
4711         * except.c: Don't include decl.h or obstack.h.  Do include
4712         tree-inline.h.
4713         (build_throw): Destroy temporaries from the thrown
4714         expression before calling __cxa_throw.  Construct a thrown
4715         temporary directly into the exception object.
4716         (stabilize_throw_expr): New function.
4717         (wrap_cleanups_r): New function.
4718         * tree.c (stabilize_expr): New function.
4719         * init.c (build_init): New function.
4720         * Make-lang.in (cp/except.o): Adjust .h deps.
4722 2002-02-28  Jason Merrill  <jason@redhat.com>
4724         * search.c (lookup_base_r): Don't clear is_non_public just because
4725         we found a friendly scope.
4727         * decl.c (finish_function): Only warn about missing return
4728         statement with -Wreturn-type.
4730 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
4732         * class.c (build_clone): Update.
4733         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4734         * cp-tree.h (cxx_dup_lang_specific_decl): New.
4735         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
4736         (copy_decl): Update.
4737         * method.c (make_thunk): Update.
4739 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
4741         * decl2.c: Delete traditional-mode-related code copied from
4742         the C front end but not used, or used only to permit the
4743         compiler to link.
4745 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
4747         PR c++/4093
4748         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
4749         to void.
4751 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
4753         PR other/5746
4754         * semantics.c (finish_switch_cond): Don't call get_unwidened
4755         if error_mark_node.
4757 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
4759         PR c++/2645, DR 295
4760         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
4761         tf_keep_type_decl.
4762         (make_typename_type): Use tsubst_flags_t.
4763         * decl.c (make_typename_type): Adjust. Return non-artificial
4764         TYPE_DECLs, if required.
4765         (grokdeclarator): Simplify CVR qualification handling. Allow bad
4766         qualifiers on typedef types.
4767         * decl2.c (handle_class_head): Adjust make_typename_type call.
4768         * parse.y (nested_name_specifier): Likewise.
4769         (typename_sub0): Likewise.
4770         (typename_sub1): Likewise.
4771         * pt.c (convert_template_argument): Adjust make_typename_type
4772         return value.
4773         (tsubst): Adjust cp_build_qualified_type_real calls.
4774         (check_cv_quals_for_unify): Cope with allowing bad qualifications
4775         on template type parms.
4776         (instantiate_decl): Recheck substitutions to give warnings on bad
4777         qualifications.
4778         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
4780 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
4782         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
4784         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
4785         unless DECL_ALWAYS_INLINE.
4787 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4789         * typeck.c (cp_pointer_int_sum): Renamed from
4790         pointer_int_sum, call pointer_int_sum.
4792 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4794         * decl.c (duplicate_decls): Return 0 if issued error about
4795         redeclaration.
4797 2002-02-19  Jason Merrill  <jason@redhat.com>
4799         ABI change: Mangle `void (A::*)() const' as
4800         M1AKFvvE, not MK1AFvvE.
4801         * mangle.c (write_function_type): Write cv-quals for member
4802         function type here.
4803         (write_pointer_to_member_type): Not here.
4805 2002-02-18  Jason Merrill  <jason@redhat.com>
4807         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
4808         (do_decl_instantiation): Likewise.
4810 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4812         PR c++/5685
4813         * decl.c (duplicate_decls): Make warning unconditional
4814         if duplicate default argument declarations are present.
4816 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
4818         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
4819         shortening.
4821 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
4823         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
4824         remove incorrect comment. Move #if 0'd code to common path. Use
4825         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
4827 2002-02-13  Jason Merrill  <jason@redhat.com>
4829         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
4830         (finish_function): Don't warn if current_function_returns_null.
4832         * typeck2.c (digest_init): Do handle values of vector type.
4834         * typeck2.c (digest_init, process_init_constructor): Treat vectors
4835         like arrays.
4837 2002-02-11  Jason Merrill  <jason@redhat.com>
4839         * parse.y (reserved_declspecs): Don't handle attributes.
4840         (reserved_typespecquals): Handle them here.
4841         * Make-lang.in (parse.c): Adjust expected conflicts.
4843 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
4845         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
4846         instead of compstmt.
4847         (compstmt_or_stmtexpr): Renamed from compstmt.
4848         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
4850 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4852         Rename instantiate_type_flags to tsubst_flags_t & expand use.
4853         * cp-tree.h (instantiate_type_flags): Rename to ...
4854         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
4855         add tf_warning flag.
4856         (instantiate_type): Adjust prototype.
4857         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
4858         do_type_instantiation, cp_build_qualified_type_real): Likewise.
4859         cp_build_qualified_type: Adjust.
4860         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
4861         tf_*.
4862         * call.c (standard_conversion): Rename itf_* to tf_*.
4863         (reference_binding): Likewise.
4864         (convert_like_real): Likewise.
4865         * cvt.c (cp_convert_to_pointer): Likewise.
4866         (convert_to_reference): Likewise.
4867         * decl.c (lookup_namespace_name): Use tf_* flags.
4868         (make_typename_type): Likewise.
4869         (grokdeclarator): Likewise.
4870         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
4871         (coerce_template_template_parms, convert_template_argument,
4872         coerce_template_parms, maybe_get_template_decl_from_type_decl,
4873         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
4874         instantiate_class_template, tsubst_template_arg_vector,
4875         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
4876         tsubst_decl, tsubst_arg_types, tsubst_function_type,
4877         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
4878         instantiate_template, fn_type_unification,
4879         resolve_overloaded_unification, verify_class_unification,
4880         unify, get_bindings_real, do_type_instantiation,
4881         regenerate_decl_from_template, instantiate_decl,
4882         tsubst_initializer_list, tsubst_enum,
4883         get_mostly_instantiated_function_type,
4884         invalid_nontype_parm_type_p): Likewise.
4885         * tree.c (cp_build_qualified_type_real): Likewise.
4886         * typeck.c (build_binary_op): Rename itf_* to tf_*.
4887         (build_ptrmemfunc): Likewise.
4888         (convert_for_assignment): Likewise.
4890 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4892         PR c++/109
4893         * decl.c (grokdeclarator): Allow friend declarations from
4894         dependent types.
4895         * decl2.c (handle_class_head): Don't push into template parm contexts.
4896         * pt.c (push_template_decl_real): Template parm contexts are never
4897         being defined.
4899 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
4901         * class.c: Include target.h.
4902         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
4903         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
4904         bit-field layout.
4905         * Make-lang.in: Adjust deps.
4907 2002-02-05  Jason Merrill  <jason@redhat.com>
4909         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
4911 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
4913         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
4914         (finish_switch_cond): Set SWITCH_TYPE.
4916 2002-02-04  Richard Henderson  <rth@redhat.com>
4918         * method.c (use_thunk): Always initialize the block tree.  Reindent.
4919         * semantics.c (expand_body): Emit thunks after function, not before.
4921 2002-02-04  Jason Merrill  <jason@redhat.com>
4923         * decl.c (start_function): Call cplus_decl_attributes immediately
4924         after grokdeclarator.
4926         * decl.c (start_function): Combine DECL_RESULT handling code.
4928 2002-02-03  Jason Merrill  <jason@redhat.com>
4930         * xref.c: Remove.
4931         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
4932         (cp/xref.o): Remove dependencies.
4933         * class.c (finish_struct_1, check_methods): Don't call xref fns.
4934         (finish_struct_1): Likewise.
4935         * friend.c (make_friend_class): Likewise.
4936         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
4937         * spew.c (read_process_identifier): Likewise.
4939 2002-02-01  Jason Merrill  <jason@redhat.com>
4941         PR c++/4872
4942         * decl.c (finish_function): Warn about a non-void function with
4943         no return statement and no abnormal exit.
4944         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
4945         (current_function_returns_abnormally): New macro.
4946         * call.c (build_call): Set it.
4948         * typeck.c (build_component_ref): Always complain about offsetof
4949         constructs on non-PODs.  Only make it an error for members of
4950         virtual bases.
4952         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
4953         (dump_function_decl): Always dump parms.
4955         * decl2.c (finish_static_data_member_decl): Complain about a local
4956         class with a static data member.
4958         PR c++/4286
4959         * search.c (lookup_field_1): Don't xref a static data member
4960         just because we looked it up.
4962 2002-01-31  Jason Merrill  <jason@redhat.com>
4964         * Make-lang.in (parse.c): Handle .output file.
4966         PR c++/3395
4967         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
4968         not TREE_TYPE.
4969         * semantics.c (finish_class_definition): Adjust.
4971         Allow attributes in parms and casts.
4972         * parse.y (named_parm): Don't strip attrs.
4973         (declmods): Remove 'attributes' production.
4974         (nonempty_cv_qualifiers): Accept attributes.
4975         (ATTRIBUTE): Give precedence.
4976         * decl.c (groktypename): Handle attributes.
4977         (grokparms): Likewise.
4979 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
4981         * decl2.c (cxx_decode_option): Pass 0 as last argument to
4982         cpp_handle_option.
4983         * lang-specs.h: Use cpp_unique_options instead of cpp_options
4984         when used together with cc1_options.
4986 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
4988         PR c++/5132
4989         * typeck2.c (digest_init): Make sure non-array core type is
4990         instantiated.
4991         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
4992         constructor, rather than build a new one.
4993         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
4994         PURPOSE of constructor elts.
4996 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
4998         * Make-lang.in (parse.c): Adjust expected number of
4999         shift-reduce conflicts.
5000         (decl.o): Depend on diagnostic.h.
5001         * decl.c: Include diagnostic.h.
5002         (grokdeclarator): Check for null pointer.
5003         (finish_function): Don't abort when
5004         current_binding_level->parm_flag != 1, if errors have
5005         occurred; throw away the statement tree and extra binding
5006         levels, and continue.
5007         * lex.c (note_list_got_semicolon): Check for null pointer.
5008         * method.c (hack_identifier): Just return error_mark_node if
5009         value is error_mark_node.
5010         * parse.y (primary: TYPEID(type_id)): No need to use
5011         TYPE_MAIN_VARIANT here.
5012         (handler_seq): Accept an empty list of catch clauses and
5013         generate a fake handler block to avoid later crashes.
5014         (ansi_raise_identifier): Accept the error token too.
5015         * semantics.c (begin_class_definition,
5016         finish_class_definition): Check for error_mark_node.
5018 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5020         * typeck2.c (friendly_abort): Delete definition.
5021         * cp-tree.h (friendly_abort): Don't prototype.
5022         (my_friendly_assert): Use fancy_abort.
5024 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5026         * cp-tree.h (my_friendly_abort): Remove.
5028 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
5030         * spew.c (pending_inlines, pending_inlines_tail,
5031         processing_these_inlines): Make static.
5032         (mark_pending_inlines): Remove static.
5033         (begin_parsing_inclass_inline): If in function, save pi
5034         for GC to cp_function_chain->unparsed_inlines instead.
5035         (process_next_inline): Likewise.
5036         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
5037         (mark_pending_inlines): Add prototype.
5038         * decl.c (spew_debug): Remove unused extern.
5039         (mark_lang_function): Call mark_pending_inlines.
5041 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5043         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
5044         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
5045         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
5046         Change my_fancy_abort() to abort().
5048 2002-01-23  Jason Merrill  <jason@redhat.com>
5050         PR c++/5453
5051         * class.c (fixed_type_or_null): Fix thinko.
5053         PR c++/3331
5054         * init.c (resolve_offset_ref): Use build_indirect_ref.
5056         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
5058 2002-01-22  Jason Merrill  <jason@redhat.com>
5060         * parse.y (function_body): Suppress the block for the outermost
5061         curly braces.
5062         * decl.c (pushdecl): Don't try to skip it.
5063         (begin_function_body): Keep the block we create, not the next one.
5064         * init.c (emit_base_init): Don't mess with keep_next_level.
5066         * class.c (build_base_path): Tweak formatting.
5068 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5070         Fix regression introduced with patch for c++/775
5071         * parse.y (class_head_defn): Check for template specializations
5072         with a different class-key.
5074 2002-01-17  Jason Merrill  <jason@redhat.com>
5076         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
5077         (begin_function_body): Call them and keep_next_level.
5078         * init.c (emit_base_init): Call keep_next_level.
5079         * semantics.c (setup_vtbl_ptr): Lose.
5080         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
5081         (vtbls_set_up_p): Lose.
5082         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
5083         * method.c (do_build_copy_constructor): Likewise.
5084         (synthesize_method): Call finish_mem_initializers.
5085         * parse.y (nodecls): Likewise.
5087         * error.c (dump_type_suffix): Print the exception specs before
5088         recursing.
5089         (dump_function_decl): Here, too.
5091         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
5093 2002-01-10  Ira Ruben   <ira@apple.com>
5095         PR c++/907
5096         * decl.c (start_method): Handle attrlist.
5098 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
5100         * decl2.c (max_tinst_depth): Increase default limit to 500.
5102 2002-01-10  Graham Stott  <grahams@redhat.com>
5104         * spew.c (YYCHAR): Uppercase macro parameter and add
5105         parenthesis.
5106         (YYCODE): Likewise.
5107         (NAME): Uppercase macro parameter.
5109 2002-01-09  Graham Stott  <grahams@redhat.com>
5111         * decl.h (grokdeclarator): Wrap long line.
5113         * semantics.c (FINISH_COND): Uppercase macro paramaters and
5114         add parenthesis.
5116 2002-01-08  Graham Stott  <grahams@redhat.com>
5118         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
5119         (PALLOC): Uppercase macro parameter and whitespace.
5120         (SALLOC): Uppercase macro parameter.
5121         (SFREE): Uppercase macros parameter, add parenthese and
5122         whitespace.
5123         (STREQL): Uppercase macro parameter and whitespace.
5124         (STRNEQ): Likewise.
5125         (STRLSS): Likewise.
5126         (STRLEQ): Likewise.
5127         (STRGTR): Likewise.
5128         (STRGEQ): Likewise.
5130         * call.c (convert_like): Add parenthesis and wrap.
5131         (convert_like_with_context): Likewise.
5132         (ICS_RANK): Whitespace.
5133         (NEED_TEMPORARY_P): Remove parenthesis.
5135         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
5136         whitespace.
5137         (VTT_MARKED_BINFO_P): Likewise.
5139         * decl.c (BINDING_LEVEL): Add parenthesis.
5140         (DEF_OPERATOR): Likewise.
5142         * mangle.c (MANGLE_TRACE): Add parenthesis.
5143         (MANGLE_TRACE_TREE): Likewise.
5144         (write_signed_number): Likewise.
5145         (write_unsigned_number): Likewise.
5147         * pt.c (ccat): Uppercase macro parameter.
5148         (cat): Likewise
5150         * search.c (SET_BINFO_ACCESS): Add parenthesis.
5152 2002-01-07  Jason Merrill  <jason@redhat.com>
5154         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
5155         to pedwarn.
5157         PR c++/3536
5158         * method.c (make_thunk): If !flag_weak, give the thunk the
5159         function's linkage.
5160         (use_thunk): Here, too.
5162 2002-01-07  Graham Stott  <grahams@redhat.com>
5164         * error.c: Update copyright date.
5165         (print_scope_operator): Add parenthesis.
5166         (print_left_paren): Likewise.
5167         (print_right_paren): Likewise.
5168         (print_left_bracket): Likewise.
5169         (print_right_bracket): Likewise.
5170         (print_template_argument_list_start): Likewise.
5171         (print_template_argument_list_end): Likewise.
5172         (print_non_consecutive_character): Likewise.
5173         (print_tree_identifier): Likewise.
5174         (print_identifier): Likewise.
5175         (NEXT_CODE): Uppercase macro parameter.
5176         (ident_fndecl): Delete unused.
5177         (GLOBAL_THING): Likewise.
5179 2002-01-06  Graham Stott  <grahams@redhat.com>
5181         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
5182         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
5183         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
5184         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
5185         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
5186         (C_IS_RESERVED_WORD): Uppercase macro parameter.
5187         (C_RID_YYCODE) Likewise.
5188         (ptrmem_cst): Use rtx.
5189         (LOCAL_BINDING_P): Add whitespace.
5190         (INHERITED_VALUE_BINDING_P): Likewise.
5191         (BINDING_SCOPE): Wrap long line.
5192         (BINDING_HAS_LEVEL_P): Remove parenthesis.
5193         (BINDING_VALUE): Wrap long line.
5194         (BINDING_TYPE): Whitespace.
5195         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
5196         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
5197         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
5198         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
5199         (same_type_p): Uppercase macro parameters.
5200         (same_type_ignoring_top_level_qualifiers_p): Likewise.
5201         (OVL_FUNCTION): Wrap long line.
5202         (OVL_CHAIN): Whitespace.
5203         (OVL_CURRENT): Add parenthesis and whitespace.
5204         (OVL_NEXT): Whitespace.
5205         (OVL_USED): Likewise.
5206         (IDENTIFIER_TYPE_VALUE): Likewise.
5207         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
5208         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
5209         (LANG_ID_FIELD): Whitespace.
5210         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
5211         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
5212         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
5213         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
5214         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
5215         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
5216         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
5217         (IDENTIFIER_VIRTUAL_P): Likewise.
5218         (IDENTIFIER_OPNAME_P): Likewise.
5219         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
5220         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
5221         (C_SET_EXP_ORIGINAL_CODE): Likewise.
5222         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
5223         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5224         (IS_AGGR_TYPE): Uppercase macro parameter.
5225         (CLASS_TYPE_P): Likewise.
5226         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
5227         (IS_AGGR_TYPE_2): Whitespace.
5228         (TAGGED_TYPE_P): Uppercase macro parameter.
5229         (TYPE_BUILT_IN): Whitespace.
5230         (TYPE_FOR_JAVA): Likewise.
5231         (FUNCTION_ARG_CHAIN): Remove parenthesis.
5232         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
5233         (FUNCTION_FIRST_USER_PARAM): Likewise.
5234         (PROMOTES_TO_AGGR_TYPE): Whitespace.
5235         (DERIVED_FROM_P): Add parenthesis and wrap.
5236         (UNIQUELY_DERIVED_FROM_P): Likewise.
5237         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
5238         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
5239         (CLASSTYPE_USE_TEMPLATE): Whitespace.
5240         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
5241         (TYPE_GETS_DELETE): Add parenthesis.
5242         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
5243         (TYPE_HAS_ASSIGN_REF): Likewise,
5244         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
5245         (TYPE_HAS_INIT_REF): Likewise.
5246         (TYPE_HAS_CONST_INIT_REF): Likewise.
5247         (TYPE_BEING_DEFINED): Likewise.
5248         (TYPE_LANG_SPECIFIC): Likewise.
5249         (CLASSTYPE_RTTI): Likewise.
5250         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
5251         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
5252         (TYPE_OVERLOADS_ARROW): Likewise.
5253         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
5254         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
5255         (CLASSTYPE_METHOD_VEC): Likewise.
5256         (CLASSTYPE_MARKED_N): Likewise.
5257         (CLASSTYPE_MARKED): Likewise.
5258         (CLASSTYPE_MARKED2): Likewise.
5259         (CLASSTYPE_MARKED3): Likewise.
5260         (CLASSTYPE_MARKED4): Likewise.
5261         (CLASSTYPE_MARKED5): Likewise.
5262         (CLASSTYPE_MARKED6): Likewise.
5263         (SET_CLASSTYPE_MARKED): Whitespace.
5264         (CLEAR_CLASSTYPE_MARKED): Likewise.
5265         (SET_CLASSTYPE_MARKED2): Likewise.
5266         (CLEAR_CLASSTYPE_MARKED2): Likewise.
5267         (SET_CLASSTYPE_MARKED3): Likewise.
5268         (CLEAR_CLASSTYPE_MARKED3): Likewise.
5269         (SET_CLASSTYPE_MARKED4): Likewise.
5270         (CLEAR_CLASSTYPE_MARKED4): Likewise.
5271         (SET_CLASSTYPE_MARKED5): Likewise.
5272         (CLEAR_CLASSTYPE_MARKED5): Likewise.
5273         (SET_CLASSTYPE_MARKED6): Likewise.
5274         (CLEAR_CLASSTYPE_MARKED6): Likewise.
5275         (CLASSTYPE_TAGS): Likewise.
5276         (CLASSTYPE_VSIZE): Likewise.
5277         (CLASSTYPE_VBASECLASSES): Likewise.
5278         (CANONICAL_BINFO): Add parenthesis.
5279         (CLASSTYPE_SIZE(NODE): Likewise.
5280         (CLASSTYPE_SIZE_UNIT): Likewise.
5281         (CLASSTYPE_ALIGN(NODE): Likewise.
5282         (CLASSTYPE_USER_ALIGN): Likewise.
5283         (TYPE_JAVA_INTERFACE): Likewise.
5284         (CLASSTYPE_PURE_VIRTUALS): Likewise.
5285         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
5286         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
5287         (CLASSTYPE_HAS_MUTABLE): Likewise.
5288         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
5289         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
5290         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
5291         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
5292         (CLASSTYPE_INTERFACE_ONLY): Likewise.
5293         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
5294         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5295         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
5296         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5297         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
5298         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
5299         (BINFO_UNSHARED_MARKED): Whitespace.
5300         (BINFO_MARKED): Whitespace and wrap.
5301         (SET_BINFO_MARKED): Likewise.
5302         (CLEAR_BINFO_MARKED): Likewise.
5303         (BINFO_VTABLE_PATH_MARKED): Likewise.
5304         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
5305         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
5306         (BINFO_SUBVTT_INDEX): Remove parenthesis.
5307         (BINFO_VPTR_INDEX): Likewise.
5308         (BINFO_PRIMARY_BASE_OF): Likewise,
5309         (CLASSTYPE_VFIELDS): Whitespace.
5310         (VF_DERIVED_VALUE): Wrap long line.
5311         (NAMESPACE_LEVEL): Whitespace.
5312         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
5313         (DEFARG_POINTER): Whitespace.
5314         (DECL_NEEDED_P): Remove parenthesis.
5315         (DECL_LANGUAGE): Whitespace.
5316         (SET_DECL_LANGUAGE): Add parenthesis.
5317         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
5318         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
5319         (DECL_IN_AGGR_P): Whitespace.
5320         (DECL_FRIEND_P): Likewise.
5321         (DECL_BEFRIENDING_CLASSES): Likewise.
5322         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
5323         (DECL_NONCONVERTING_P): Whitespace.
5324         (DECL_PURE_VIRTUAL_P): Likewise.
5325         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
5326         (DECL_PENDING_INLINE_INFO): Whitespace.
5327         (DECL_SORTED_FIELDS): Likewise.
5328         (DECL_DEFERRED_FN): Likewise.
5329         (DECL_TEMPLATE_INFO): Likewise.
5330         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
5331         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
5332         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
5333         (TMPL_ARGS_LEVEL): Likewise.
5334         (SET_TMPL_ARGS_LEVEL): Likewise.
5335         (INNERMOST_TEMPLATE_PARMS): Whitespace.
5336         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
5337         (INTEGRAL_CODE_P(CODE): Add parenthesis.
5338         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
5339         (TYPE_HAS_CONSTRUCTOR): Whitespace.
5340         (TREE_HAS_CONSTRUCTOR): Likewise.
5341         (TYPE_HAS_DESTRUCTOR): Likewise.
5342         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
5343         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
5344         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5345         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
5346         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
5347         (TYPE_PTRMEMFUNC_P): Likewise.
5348         (TYPE_PTRMEMFUNC_FLAG): Likewise.
5349         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
5350         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
5351         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
5352         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5353         (DECL_ACCESS): Whitespace.
5354         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
5355         (DECL_GLOBAL_DTOR_P): Likewise.
5356         (GLOBAL_INIT_PRIORITY): Likewise.
5357         (DECL_TEMPLATE_PARMS): Likewise.
5358         (DECL_TEMPLATE_RESULT): Likewise.
5359         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
5360         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
5361         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
5362         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5363         (PRIMARY_TEMPLATE_P): Add parenthesis.
5364         (DECL_USE_TEMPLATE): Whitespace.
5365         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5366         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5367         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5368         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5369         (CALL_DECLARATOR_PARMS): Remove parenthesis.
5370         (CALL_DECLARATOR_QUALS): Likewise.
5371         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5372         (TEMP_NAME_P): Wrap.
5373         (VFIELD_NAME_P): Likewise.
5374         (B_SET): Uppercase macro parameters and add parenthesis.
5375         (B_CLR): Likewise.
5376         (B_TST): Likewise.
5377         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
5378         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
5379         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
5380         (same_or_base_type_p): Likewise.
5381         (cp_deprecated): Likewise.
5383 2002-01-05  Richard Henderson  <rth@redhat.com>
5385         * semantics.c (expand_body): Revert last change.
5387 2002-01-04  Jason Merrill  <jason@redhat.com>
5389         PR c++/4122
5390         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
5391         lost primary.
5393         * class.c (build_vtbl_initializer): Check for a lost primary
5394         before calculating the vtable entry to throw away.
5396 2002-01-02  Jason Merrill  <jason@redhat.com>
5398         * semantics.c (expand_body): Call outlining_inline_function when
5399         emitting an inline function out of line.
5401 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5403         PR c++/5116, c++/764 reversion
5404         * call.c (build_new_op): Revert the instantiations. They are
5405         incorrect.
5407 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5409         PR c++/5089
5410         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
5412 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5414         PR c++/3716
5415         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
5416         (tsubst, case POINTER_TYPE): Handle pmfs here.
5417         (tsubst, case OFFSET_TYPE): Check it is not an offset to
5418         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
5420 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5422         PR c++/35
5423         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
5424         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
5425         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
5426         PARM_DECL.
5427         (tsubst_template_parms): Break up loop statements.
5428         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
5429         parm PARM_DECLs don't get promoted.
5431 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5433         PR c++/5123
5434         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
5435         (build_x_function_call): Cope with a COMPONENT_REF containing a
5436         TEMPLATE_ID_EXPR.
5438 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5440         PR c++/5213
5441         * pt.c (convert_template_argument): Be more careful determining
5442         when RECORD_TYPE templates are or are not templates.
5444 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5446         PR c++/775
5447         * cp-tree.h (handle_class_head): Adjust prototype.
5448         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
5449         parameters. Use for all class heads.
5450         * parse.y (named_class_head_sans_basetype, named_class_head,
5451         named_complex_class_head_sans_basetype,
5452         named_class_head_sans_basetype_defn,
5453         unnamed_class_head): Remove.
5454         (class_head, class_head_apparent_template): Recognize class heads
5455         (class_head_decl, class_head_defn): New reductions. Process class
5456         heads.
5457         (structsp): Adjust class definition and class declaration
5458         reductions.
5459         (maybe_base_class_list): Give diagnostic on empty list.
5461 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5463         PR c++/4379
5464         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
5465         single non-static member.
5466         (unary_complex_lvalue): If it cannot be a pointer to member, don't
5467         make it so. Check it is not pointer to reference.
5469 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5471         PR c++/5132
5472         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
5473         are processing a template decl.
5475 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5477         PR c++/5116, c++/764
5478         * call.c (build_new_op): Make sure template class operands are
5479         instantiated. Simplify arglist construction.
5481 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5483         * call.c (build_user_type_conversion_1): Use my_friendly_assert
5484         rather than if ... abort.
5485         * cvt.c (convert_to_reference): Likewise.
5486         * semantics.c (setup_vtbl_ptr): Likewise.
5487         * pt.c (lookup_template_class): Comment typo.
5489 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5491         PR c++/5125
5492         * pt.c (push_template_decl_real): Make sure DECL has
5493         DECL_LANG_SPECIFIC.
5495 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5497         PR c++/335
5498         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
5499         for non-reference fields.
5500         * typeck.c (require_complete_type): Use resolve_offset_ref).
5502 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
5504         PR c++/196
5505         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
5507 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
5509         PR c++/160
5510         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
5511         up. Don't stabilize_references when initializing a reference.
5513 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5515         * decl2.c (lang_f_options): Const-ify.
5517 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
5519         * config-lang.in (diff_excludes): Remove.
5521 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
5523         PR c++/90
5524         * typeck.c (build_function_call_real): Use original function
5525         expression for errors.
5527 2001-12-18  Jason Merrill  <jason@redhat.com>
5529         PR c++/3242
5530         * class.c (add_method): Do compare 'this' quals when trying to match a
5531         used function.  Don't defer to another used function.
5533 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5535         * pt.c (instantiate_clone): Remove, fold into ...
5536         (instantiate_template): ... here. Simplify by removing mutual
5537         recursion.
5538         * typeck2.c (build_m_component_ref): Don't cv qualify the function
5539         pointed to by a pointer to function.
5540         * class.c (delete_duplicate_fields_1): Typo.
5542 2001-12-18  Jason Merrill  <jason@redhat.com>
5544         C++ ABI change: destroy value arguments in caller.
5545         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
5546         create an extra binding level for the parameters.
5547         * decl.c (store_parm_decls): Don't do parameter cleanups.
5549 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5551         * call.c (build_new_method_call): Use '%#V'.
5552         * error.c (cv_to_string): Use V parameter to determine padding.
5554 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
5556         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
5557         spellings in messages.
5559 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
5561         * cp-tree.h: Delete #defines for cp_error, cp_warning,
5562         cp_pedwarn, and cp_compiler_error.
5563         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
5564         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
5565         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5566         typeck2.c: Change calls to the above macros to use their
5567         language-independent equivalents: error, warning, pedwarn, and
5568         internal_error respectively.
5570 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5572         * decl2.c (finish_file): Remove back_end_hook.
5574 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
5576         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
5577         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
5578         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
5580 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
5582         * lang-options.h: Use American spelling in messages.
5584 2001-12-13  Jason Merrill  <jason@redhat.com>
5586         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
5588         Use cleanups to run base and member destructors.
5589         * init.c (push_base_cleanups): New function, split out from...
5590         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
5591         * decl.c (finish_destructor_body): Move vbase destruction code to
5592         push_base_cleanups.
5593         (begin_function_body, finish_function_body): New fns.
5594         (finish_function): Move [cd]tor handling and call_poplevel to
5595         finish_function_body.
5596         (pushdecl): Skip the new level.
5597         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
5598         (setup_vtbl_ptr): Call push_base_cleanups.
5599         * method.c (synthesize_method): Call {begin,end}_function_body.
5600         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
5601         * cp-tree.h: Declare new fns.
5602         * parse.y (function_body, .begin_function_body): New nonterminals.
5603         (fndef, pending_inline, function_try_block): Use function_body.
5604         (ctor_initializer_opt, function_try_block): No longer has a value.
5605         (base_init): Remove .set_base_init token.
5606         (.set_base_init, compstmt_or_error): Remove.
5607         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
5609         * optimize.c (maybe_clone_body): Fix parameter updating.
5611 2001-12-12  Jason Merrill  <jason@redhat.com>
5613         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
5614         * semantics.c (genrtl_start_function): Don't pass
5615         parms_have_cleanups or push an extra binding level.
5616         (genrtl_finish_function): Lose cleanup_label cruft.
5618         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
5619         (ctor_label): Remove.
5620         * semantics.c (finish_return_stmt): Lose ctor_label support.
5621         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
5622         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
5623         dtor_label.
5625         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
5626         check for [cd]tors.
5627         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
5629         * decl.c (finish_function): Check VMS_TARGET, not VMS.
5631         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
5632         (end_cleanup_fn): And poplevel.
5634         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
5635         if we're in a template.
5637 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
5639         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
5640         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
5641         THIS_NAME_P): Delete.
5642         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
5643         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
5644         with internal naming scheme.
5645         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
5647 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
5649         * decl.c (grokdeclarator): Deprecated implicit typename use.
5651 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
5653         PR g++/51
5654         * parse.y (frob_specs): Indicate it is a language linkage which
5655         contained the extern.
5656         * decl.c (grokdeclarator): Allow extern language linkage with
5657         other specifiers.
5659 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
5661         PR g++/72
5662         * decl.c (add_binding): Don't reject duplicate typedefs involving
5663         template parameters.
5665 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
5667         * parse.y, semantics.c: Similarly.
5669 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
5671         PR g++/87
5672         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
5673         (copy_args_p): Rename to ...
5674         (copy_fn_p): ... here.
5675         (grok_special_member_properties): New function.
5676         (grok_op_properties): Lose VIRTUALP parameter.
5677         (copy_assignment_arg_p): Remove.
5678         * call.c (build_over_call): Use copy_fn_p.
5679         * decl.c (grokfndecl): Reformat. Adjust call to
5680         grok_op_properties.
5681         (copy_args_p): Rename to ...
5682         (copy_fn_p): ... here. Reject template functions. Check for pass
5683         by value.
5684         (grok_special_member_properties): Remember special functions.
5685         (grok_ctor_properties): Don't remember them here, just check.
5686         (grok_op_properties): Likewise.
5687         (start_method): Call grok_special_member_properties.
5688         * decl2.c (grokfield): Likewise.
5689         (copy_assignment_arg_p): Remove.
5690         (grok_function_init): Don't remember abstract assignment here.
5691         * pt.c (instantiate_class_template): Call
5692         grok_special_member_properties.
5693         (tsubst_decl): Adjust grok_op_properties call.
5695 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
5697         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
5698         RID_TYPES_COMPATIBLE_P.
5700 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5702         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
5703         call to build_aggr_init.
5704         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
5706 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5708         * parse.y: Replace uses of the string non-terminal with STRING.
5709         Don't perform string concatentaion here.
5710         (string): Remove non-terminal.
5711         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
5713 2001-12-05  Jason Merrill  <jason@redhat.com>
5715         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
5716         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
5717         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
5718         * pt.c (push_tinst_level): No longer static.
5719         * cp-tree.h: Declare them.
5721         * init.c (resolve_offset_ref): Don't check access for the base
5722         conversion to access a FIELD_DECL.
5724         * cp-tree.h (TYPE_REFFN_P): New macro.
5725         * decl.c (bad_specifiers): Check it, too.
5727         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
5728         on the __*_type_info type if we haven't seen a definition.
5730 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
5732         * decl.c: Include c-common.h.
5733         (shadow_warning): Move to c-common.c.
5735 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5737         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
5739 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5741         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
5743 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5745         PR g++/164
5746         * init.c (sort_base_init): Allow binfos to be directly specified.
5747         * method.c (do_build_copy_constructor): Explicitly convert to the
5748         base instance.
5749         (do_build_assign_ref): Likewise.
5751 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
5753         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
5754         declaration and initialization.
5756 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5758         * typeck2.c: Remove leading capital from diagnostic messages, as
5759         per GNU coding standards.
5761 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
5763         PR c++/3394
5764         * decl.c (xref_basetypes): Handle attributes between
5765         'class' and name.
5767 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
5769         PR g++/3381
5770         * parse.y (named_complex_class_head_sans_basetype): Add new
5771         reduction.
5772         * Make-lang.in (parse.c): Adjust expected conflict count.
5774 2001-12-03  Jason Merrill  <jason@redhat.com>
5776         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
5777         immediate binfos for our virtual bases.
5779 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
5781         * call.c (build_java_interface_fn_ref): Similarly.
5782         * except.c (is_admissible_throw_operand): Similarly.
5783         * init.c (build_java_class_ref): Similarly.
5784         * xref.c (open_xref_file): Similarly.
5786 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5788         * class.c (finish_struct): Remove trailing periods from messages.
5789         * decl.c (check_tag_decl): Similarly.
5790         * lex.c (cxx_set_yydebug): Similarly.
5791         * typeck2.c (friendly_abort): Similarly.
5793 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5795         PR c++/3048
5796         * cp-tree.h (ovl_member): Remove.
5797         * decl2.c (merge_functions): Handle extern "C" functions
5798         specially.
5799         * tree.c (ovl_member): Remove.
5801 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5803         PR c++/4842
5804         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
5805         FUNCTION_DECL, as input.
5806         (mark_overriders): Remove.
5807         (warn_hidden): Rework for the new ABI.
5809 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5811         PR c++/3471
5812         * call.c (convert_like_real): Do not build additional temporaries
5813         for rvalues of class type.
5815 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5817         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
5818         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
5819         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
5820         (DERIVED_FROM_P): Likewise.
5821         (enum base_access): Renumber, add ba_quiet bit mask.
5822         (get_binfo): Remove.
5823         (get_base_distance): Remove.
5824         (binfo_value): Remove.
5825         (ACCESSIBLY_DERIVED_FROM_P): Remove.
5826         * call.c (standard_conversion): Use lookup_base.
5827         * class.c (strictly_overrides): Likewise.
5828         (layout_virtual_bases): Likewise.
5829         (warn_about_ambiguous_direct_bases): Likewise.
5830         (is_base_of_enclosing_class): Likewise.
5831         (add_vcall_offset_vtbl_entries_1): Likewise.
5832         * cvt.c (build_up_reference): Adjust comment.
5833         * init.c (build_member_call): Reformat.
5834         * search.c (get_binfo): Remove.
5835         (get_base_distance_recursive): Remove.
5836         (get_base_distance): Remove.
5837         (lookup_base_r): Tweak.
5838         (lookup_base): Add ba_quiet control. Complete the types here.
5839         (covariant_return_p): Use lookup_base.
5840         * tree.c (binfo_value): Remove.
5841         (maybe_dummy_object): Use lookup_base.
5842         * typeck.c (build_static_cast): Use lookup_base.
5843         (get_delta_difference): Likewise.
5844         * typeck2.c (binfo_or_else): Use lookup_base.
5845         (build_scoped_ref): Add back error_mark_check.
5846         (build_m_component_ref): Use lookup_base.
5848 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5850         * Make-lang.in (c++.generated-manpages): New dummy target.
5852 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5854         * Make-lang.in (cp-lang.o): Depends on c-common.h.
5855         * cp-lang.c (c-common.h): Include.
5856         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
5857         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
5858         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
5860 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5862         * decl2.c (c_language): Move to c-common.c.
5863         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
5864         functions.
5865         (cxx_init): Update.
5867 2001-11-26  Jason Merrill  <jason@redhat.com>
5869         * call.c (joust): Remove COND_EXPR hack.
5871 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
5873         * search.c (lookup_base_r): Declare bk in variable declaration
5874         space.
5876 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
5878         PR g++/3145
5879         * class.c (build_vbase_pointer): Remove.
5880         (build_vbase_path): Remove.
5881         (build_base_path): New function.
5882         * cp-tree.h (base_access, base_kind): New enumerations.
5883         (build_base_path): Declare.
5884         (convert_pointer_to_real): Remove.
5885         (convert_pointer_to): Remove.
5886         (lookup_base): Declare.
5887         (convert_pointer_to_vbase): Remove.
5888         * call.c (build_scoped_method_call): Use lookup_base &
5889         build_base_path instead of convert_pointer_to_real,
5890         get_base_distance & get_binfo.
5891         (build_over_call): Likewise.
5892         * cvt.c (cp_convert_to_pointer): Likewise.
5893         (convert_to_pointer_force): Likewise.
5894         (build_up_reference): Likewise.
5895         (convert_pointer_to_real): Remove.
5896         (convert_pointer_to): Remove.
5897         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
5898         instead of convert_pointer_to_vbase & build_vbase_path.
5899         (emit_base_init): Use build_base_path instead of
5900         convert_pointer_to_real.
5901         (expand_virtual_init): Lose unrequired conversions.
5902         (resolve_offset_ref): Use lookup_base and build_base_path
5903         instead of convert_pointer_to.
5904         * rtti.c (build_dynamic_cast_1): Use lookup_base &
5905         build_base_path instead of get_base_distance & build_vbase_path.
5906         * search.c (get_vbase_1): Remove.
5907         (get_vbase): Remove.
5908         (convert_pointer_to_vbase): Remove.
5909         (lookup_base_r): New function.
5910         (lookup_base): New function.
5911         * typeck.c (require_complete_type): Use lookup_base &
5912         build_base_path instead of convert_pointer_to.
5913         (build_component_ref): Likewise.
5914         (build_x_function_call): Likewise.
5915         (get_member_function_from_ptrfunc): Likewise.
5916         (build_component_addr): Likewise.
5917         * typeck2.c (build_scoped_ref): Likewise.
5919 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5921         * cp-tree.h (CP_TYPE_QUALS): Removed.
5922         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
5923         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
5924         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
5925         * dump.c (cp_dump_tree): Use void* dump_info argument to match
5926         lang-hooks prototype.
5927         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
5928         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
5929         CP_TYPE_QUALS changed to cp_type_quals.
5930         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
5931         (CXX_C_OBJS): Remove c-dump.o.
5933 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
5935         PR c++/3637
5936         * pt.c (lookup_template_class): Ensure that all specializations
5937         are registered on the list corresponding to the most general
5938         template.
5940 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
5942         * call.c (non_reference): Add documentation.
5943         (convert_class_to_reference): Do not strip reference types
5944         from conversion operators.
5945         (maybe_handle_ref_bind): Simplify.
5946         (compare_ics): Correct handling of references.
5948 2001-11-19  John Wilkinson <johnw@research.att.com>
5950         * dump.c (dump_op): New function.
5951         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
5952         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
5953         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
5955 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
5957         PR4629
5958         * semantics.c (finish_sizeof): Make sure that expression created
5959         while processing a template do not have a type.
5960         (finish_alignof): Likewise.
5961         * typeck.c (c_sizeof): Likewise.
5962         (expr_sizeof): Likewise.
5964 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
5966         * lex.c (cxx_finish): Call c_common_finish.
5967         (finish_parse): Remove.
5969 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5971         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
5972         when displaying error message about missing array bounds.
5974 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5976         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
5977         CONST_CAST_EXPR.
5978         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
5980 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5982         * cp-tree.h (print_class_statistics): Restore.
5984 2001-11-15  Jason Merrill  <jason@redhat.com>
5986         * method.c (use_thunk): Don't emit debugging information for thunks.
5988         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
5989         * decl.c (make_typename_type): Handle getting a class template.
5990         * search.c (lookup_field_r): A class template is good enough for
5991         want_type.
5993         * call.c (convert_like_real): Only use cp_convert for the bad part.
5994         (standard_conversion): Also allow bad int->enum.
5995         * typeck.c (ptr_reasonably_similar): Also allow functions to
5996         interconvert.  Pointers to same-size integers are reasonably
5997         similar.
5999         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
6000         give it void type.
6002 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
6004         PR g++/3154
6005         * init.c (sort_base_init): Remove unreachable code.
6006         (expand_member_init): Adjust comment to reflect reality. Simplify
6007         and remove unreachable code.
6009 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
6011         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
6012         (cxx_init): Update prototype.
6013         * decl.c (init_decl_processing): Rename.  Move null node init
6014         to its creation time.
6015         * lex.c (cxx_init_options): Update.
6016         (cxx_init): Combine with old init_parse; also call
6017         cxx_init_decl_processing.
6019 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
6021         * decl.c (check_initializer): Try to complete the type of an
6022         array element before checking whether it's complete.  Don't
6023         complain about arrays with complete element types but an
6024         unknown size.
6025         (cp_finish_decl): Build the hierarchical constructor before
6026         calling maybe_deduce_size_from_array_init.
6028 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6030         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
6032 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
6034         PR g++/4206
6035         * parse.y (already_scoped_stmt): Remove.
6036         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
6038 2001-11-12  H.J. Lu <hjl@gnu.org>
6040         * cvt.c (ocp_convert): Don't warn the address of a weak
6041         function is always `true'.
6043 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6045         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
6046         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
6047         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
6048         * cp-tree.h (print_class_statistics): Remove.
6049         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
6050         cxx_print_identifier, cxx_set_yydebug): New.
6051         * lex.c (set_yydebug): Rename c_set_yydebug.
6052         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
6053         lang_print_xnode): Rename.
6054         * tree.c (print_lang_statistics): Rename.
6056 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6058         * class.c (dump_array): Fix format specifier warning.
6060 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6062         * cp-lang.c (LANG_HOOKS_NAME): Override.
6063         (struct lang_hooks): Constify.
6064         * lex.c (cxx_init_options): Update.
6065         (lang_identify): Remove.
6066         * parse.y (language_string): Remove.
6068 2001-11-08  Andreas Franck  <afranck@gmx.de>
6070         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
6071         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
6072         suggested by autoconf.
6073         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
6074         (c++.install-common): Use the transformed target alias names.
6076 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6078         * Make-lang.in: Update.
6079         * cp-lang.c: Include langhooks-def.h.
6081 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6083         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
6085 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6087         * lex.c (copy_lang_type): Add static prototype.
6089 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6091         * pt.c (unify): Handle SCOPE_REF.
6093 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
6095         * tree.c (cp_copy_res_decl_for_inlining): Adjust
6096         DECL_ABSTRACT_ORIGIN for the return variable.
6098 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
6100         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6102 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
6104         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
6105         semantics.c, spew.c: Fix spelling errors.
6107 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6109         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
6111 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
6113         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
6114         pop_everything.
6116 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6118         * cp-lang.c (cxx_get_alias_set): New function.
6119         Point LANG_HOOKS_GET_ALIAS_SET to it.
6121 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6123         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
6124         * cp-tree.h (make_unbound_class_template): Prototype new function.
6125         * decl.c (make_unbound_class_template): New function.
6126         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
6127         * error.c (dump_type): Likewise.
6128         * mangle.c (write_type): Likewise.
6129         * parse.y (template_parm): Likewise.
6130         (template_argument): Use make_unbound_class_template.
6131         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
6132         (tsubst): Likewise.
6133         (tsubst_copy): Likewise.
6134         (unify): Likewise.
6135         * tree.c (walk_tree): Likewise.
6136         * typeck.c (comptypes): Likewise.
6138 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6140         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
6141         extra calls into fewer ones.
6143 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
6145         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
6146         Warn when merging inline with attribute noinline.
6147         (start_decl, start_function): Warn if inline and attribute
6148         noinline appear in the same declaration.
6150 2001-10-16  H.J. Lu <hjl@gnu.org>
6152         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
6153         for tree checking disabled.
6155 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
6157         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
6158         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
6160 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6162         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
6163         (unify): Only handle MINUS_EXPR specially if the above flag is set
6164         and the subtracted constant is 1.  Clear the flag on recursive calls.
6165         Set it when unifying the maximum value in an INTEGER_TYPE's range.
6167 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6169         * decl.c (bad_specifiers): Don't allow exception specifications
6170         on any typedefs.
6172 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
6174         * cp/lex.c (init_cp_pragma): Similarly.
6176 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6178         * pt.c (lookup_template_class): Build complete template arguments
6179         for BOUND_TEMPLATE_TEMPLATE_PARM.
6181 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6183         * cp-tree.h (TYPE_BINFO): Update comment.
6184         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
6185         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
6186         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
6187         (copy_type): Prototype new function.
6188         * lex.c (copy_lang_decl): Gather tree node statistics.
6189         (copy_lang_type): New function.
6190         (copy_type): Likewise.
6191         (cp_make_lang_type): Create lang_type for
6192         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
6193         and BOUND_TEMPLATE_TEMPLATE_PARM.
6194         * pt.c (tsubst): Use copy_type instead of copy_node.
6195         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
6197 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6199         * pt.c (determine_specialization): Ignore functions without
6200         DECL_TEMPLATE_INFO.
6202 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
6204         PR g++/4476
6205         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
6207 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
6209         * typeck2.c (store_init_value): Don't re-digest a bracketed
6210         initializer.
6212         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
6213         ANON_AGGR_TYPE_P.
6215 2001-10-11  Richard Henderson  <rth@redhat.com>
6217         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
6218         of an asm statement.
6219         (build_vtbl_ref_1): Split out from build_vtbl_ref.
6220         (build_vfn_ref): Use it to handle vtable descriptors before
6221         calling build_vtable_entry_ref.
6222         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
6224 2001-10-10  Richard Henderson  <rth@redhat.com>
6226         * parse.y (asm_operand): Allow named operands.
6227         * semantics.c (finish_asm_stmt): Tweek for changed location
6228         of the operand constraint.
6230 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
6232         * call.c (standard_conversion): Add bad conversion between
6233         integers and pointers.
6234         (convert_like_real): Don't use convert_for_initialization for bad
6235         conversions; complain here and use cp_convert.
6236         (build_over_call): Don't handle bad conversions specially.
6237         (perform_implicit_conversion): Allow bad conversions.
6238         (can_convert_arg_bad): New fn.
6239         * cp-tree.h: Declare it.
6240         * typeck.c (convert_for_assignment): Use it.
6241         (ptr_reasonably_similar): Any target type is similar to void.
6243 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
6245         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
6246         (cp/cp-lang.o): New rule.
6247         * cp-tree.h: Declare hooks.
6248         * tree.c: Make hooks non-static.
6249         (init_tree): Don't initialize hooks here.
6250         * lex.c: Likewise.  Move definition of lang_hooks to...
6251         * cp-lang.c: ... new file.
6253 2001-10-08  Richard Henderson  <rth@redhat.com>
6255         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
6256         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
6258 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6260         * class.c (build_vtable_entry_ref): Const-ify.
6261         * decl.c (predefined_identifier,
6262         initialize_predefined_identifiers): Likewise.
6263         * init.c (build_new_1): Likewise.
6264         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
6265         Likewise.
6267 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
6269         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
6270         (INSNS_PER_STMT): Likewise.
6271         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
6272         (copy_body, initialize_inlined_parameters): Likewise.
6273         (declare_return_variable, inlinable_function_p): Likewise.
6274         (expand_call_inline, expand_calls_inline): Likewise.
6275         (optimize_inline_calls, clone_body): Likewise.
6276         * tree.c (walk_tree): Moved to ../tree-inline.c.
6277         (walk_tree_without_duplicates): Likewise.
6278         (copy_tree_r, remap_save_expr): Likewise.
6280 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
6282         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
6283         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
6284         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
6285         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
6286         (flag_inline_trees): Moved declaration to ../tree-inline.h.
6287         (walk_tree): Moved declaration to ../tree-inline.h.
6288         (walk_tree_without_duplicates, copy_tree_r): Likewise.
6289         (remap_save_expr): Likewise.
6290         * decl.c: Include tree-inline.h.
6291         (lang_mark_tree): Don't mark inlined_fns.
6292         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
6293         * optimize.c: Include tree-inline.h.
6294         (optimize_inline_calls): Move declaration to ../tree.h, as
6295         non-static.
6296         (remap_decl): Use language-independent constructs and hooks.
6297         (remap_block, copy_body_r, declare_return_variable): Likewise.
6298         (inlinable_function_p): Likewise.  Don't test for
6299         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
6300         no longer language-specific.
6301         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
6302         call of dump_function to...
6303         (optimize_function): Here...
6304         (clone_body): New function, extracted from...
6305         (maybe_clone_body): ... here.  Build decl_map locally and pass
6306         it on to clone_body.
6307         * pt.c, semantics.c: Include tree-inline.h.
6308         * tree.c: Likewise.
6309         (cp_walk_subtrees): New language-specific hook for tree inlining.
6310         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
6311         cp_is_overload_p, cp_auto_var_in_fn_p,
6312         cp_copy_res_decl_for_inlining): Likewise.
6313         (walk_tree): Move language-specific constructs into...
6314         (cp_walk_subtrees): this new function.
6315         (copy_tree_r): Use language-independent constructs and hooks.
6316         (init_tree): Initialize tree inlining hooks.
6317         (remap_save_expr): Adjust prototype so that the declaration
6318         does not require the definition of splay_tree.
6320 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6322         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
6323         to build the declaration instead of the declaration itself.
6325 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
6327         * decl2.c (cxx_decode_option): Add 'else'.
6329         * spew.c (end_input): No longer static.
6330         * cp-tree.h: Declare it.
6331         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
6333 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6335         * call.c (build_over_call), typeck.c (build_function_call_real):
6336         Pass type attributes to check_function_format rather than name or
6337         assembler name.  Don't require there to be a name or assembler
6338         name to check formats.
6340 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6342         * decl.c (init_decl_processing): Don't call
6343         init_function_format_info.  Initialize lang_attribute_table
6344         earlier.
6345         (builtin_function): Call decl_attributes.
6346         (insert_default_attributes): New.
6348 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
6350         * decl.c (grokdeclarator): Copy array typedef handling from C
6351         frontend.
6353         * decl.c (grokdeclarator): Copy too-large array handling from C
6354         frontend.
6356 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
6358         * config-lang.in (target_libs): Added target-gperf, so that we
6359         don't try to build it if C++ is disabled.
6361 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
6363         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
6364         (cp/errfn.o): Delete rule.
6365         (cp/error.o): Depend on flags.h.
6366         * errfn.c: Delete file.
6367         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
6368         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
6369         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
6370         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
6371         internal_error respectively.  Make cp_deprecated into a macro.
6372         Don't define cp_printer typedef or declare cp_printers.
6373         * error.c: Include flags.h.
6374         Delete: struct tree_formatting_info, print_function_argument_list,
6375         print_declaration, print_expression, print_function_declaration,
6376         print_function_parameter, print_type_id, print_cv_qualifier_seq,
6377         print_type_specifier_seq, print_simple_type_specifier,
6378         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
6379         print_parameter_declaration_clause, print_exception_specification,
6380         print_nested_name_specifier, and definition of cp_printers.
6381         (locate_error): New function.
6382         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
6383         rewritten in terms of locate_error and diagnostic.c.
6384         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
6385         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
6386         (init_error): Adjust to match.
6388 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6390         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
6392 2001-09-21  Richard Henderson  <rth@redhat.com>
6394         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
6395         (build_vtbl_initializer): Likewise.
6396         (build_vfn_ref): New.
6397         * cp-tree.h: Declare it.
6398         * call.c (build_over_call): Use it.
6399         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
6400         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
6402 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
6404         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
6406 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
6408         Table-driven attributes.
6409         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
6410         * decl2.c (cplus_decl_attributes): Only take one attributes
6411         parameter.
6412         * cp-tree.c (cplus_decl_attributes): Update prototype.
6413         * class.c (finish_struct), decl.c (start_decl, start_function),
6414         decl2.c (grokfield), friend.c (do_friend), parse.y
6415         (parse_bitfield): Update calls to cplus_decl_attributes.
6416         * decl.c (grokdeclarator): Take a pointer to a single ordinary
6417         attribute list.
6418         * decl.h (grokdeclarator): Update prototype.
6419         * decl2.c (grokfield): Take a single ordinary attribute list.
6420         * friend.c (do_friend): Likewise.
6421         * decl.c (shadow_tag, groktypename, start_decl,
6422         start_handler_parms, grokdeclarator, grokparms, start_function,
6423         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
6424         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
6425         (process_template_parm, do_decl_instantiation): Pass single
6426         ordinary attribute lists around.
6427         * decl.c (grokdeclarator): Correct handling of nested attributes.
6428         Revert the patch
6429         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6430                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
6431                 not the left.
6432         .
6433         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
6434         (cp_attribute_table): Declare.
6435         * decl.c (valid_lang_attribute): Don't define.
6436         (lang_attribute_table): Define.
6437         (init_decl_processing): Initialize lang_attribute_table instead of
6438         valid_lang_attribute.
6439         * tree.c (cp_valid_lang_attribute): Remove.
6440         (handle_java_interface_attribute, handle_com_interface_attribute,
6441         handle_init_priority_attribute): New functions.
6442         (cp_attribute_table): New array.
6443         * decl2.c (import_export_class): Don't use
6444         targetm.valid_type_attribute.
6446 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6448         * Make-lang.in (cp/error.o): Depend on real.h
6449         * error.c: #include "real.h"
6451 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6453         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
6454         xmalloc/strcpy/strcat.
6456 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6458         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
6459         Const-ification.
6460         * pt.c (tsubst_decl): Likewise.
6462 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6464         * decl2.c (lang_f_options): Const-ification.
6465         * lex.c (cplus_tree_code_name): Likewise.
6466         * spew.c (yyerror): Likewise.
6468 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6470         PR c++/3986
6471         * class.c (force_canonical_binfo_r): Check & move an indirect
6472         primary base first.
6473         (force_canonical_binfo): Check that it's not already
6474         canonical.
6475         (mark_primary_virtual_base): Remove BINFO parameter.
6476         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
6478 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6480         Remove TYPE_NONCOPIED_PARTS.
6481         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
6482         CLASSTYPE_PURE_VIRTUALS.
6483         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
6484         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
6485         (layout_class_type): Don't call fixup_inline_methods here ...
6486         (finish_struct_1): ... call it here.
6488 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
6490         * decl.c (duplicate_decls): Remove code deadling with
6491         DECL_SAVED_INSNS.
6492         * decl2.c (finish_file): Likewise.
6493         * pt.c (instantiate_decl): Likewise.
6494         * semantics.c (expand_body): Don't defer local functions if
6495         they wouldn't be deferred for some other reason.  Don't
6496         generate RTL for functions that will not be emitted.
6497         (genrtl_start_function): Remove code deadling with
6498         DECL_SAVED_INSNS.
6499         (genrtl_finish_function): Likewise.
6501 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6503         PR c++/4203
6504         * call.c (build_over_call): Do not optimize any empty base
6505         construction.
6507 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6509         * error.c (dump_template_decl): Output template parameters
6510         together with their specifiers.
6511         Output `class' prefix for template template parameter.
6512         (dump_decl): Fix formatting.
6514 2001-08-30  Kurt Garloff  <garloff@suse.de>
6516         * optimize.c (inlinable_function_p): Allow only smaller single
6517         functions. Halve inline limit after reaching recursive limit.
6519 2001-08-30  Joern Rennecke <amylaar@redhat.com>
6520             Jason Merrill  <jason_merrill@redhat.com>
6522         * class.c (build_vtable_entry_ref): Subtract in char*, not
6523         ptrdiff_t.
6525 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
6527         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
6528         (build_cplus_array_type): Use cp_build_qualified_type, not
6529         TYPE_MAIN_VARIANT, to get an unqualified version.
6531         * decl2.c (grok_alignof): Lose.
6532         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
6533         * typeck.c (c_alignof): Lose.
6534         * semantics.c (finish_sizeof, finish_alignof): New.
6535         * parse.y: Use them.
6536         * cp-tree.h: Declare them.
6538 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
6540         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
6541         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
6542         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
6544 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
6546         * typeck2.c (add_exception_specifier): Only require complete type if
6547         not in processing template declaration.
6549 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6551         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
6552         GNU_xref_start_scope and GNU_xref_end_scope.
6554         * tree.c (TYPE_HASH): Moved to ../tree.h.
6556 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
6558         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
6559         on COMPOUND_EXPRs.
6561 2001-08-14  Richard Henderson  <rth@redhat.com>
6563         * class.c, cp-tree.h (build_vfn_ref): Remove.
6564         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
6566 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
6568         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
6569         empty class assignment as having side-effects to avoid
6570         spurious warnings.
6572 2001-08-13  Zack Weinberg  <zackw@panix.com>
6574         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
6575         * except.c: Include libfuncs.h.
6577 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6579         * decl.c (grokdeclarator): Clarify diagnostic message.
6581 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6583         * decl2.c (do_nonmember_using_decl): Replace using directive
6584         with using declaration in the error message.
6586 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6588         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
6589         criterion to avoid rebuilding expression tree instead of
6590         processing_template_decl.
6592 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6594         Support named return value optimization for inlines, too.
6595         * decl.c (finish_function): Nullify returns here.
6596         * semantics.c (genrtl_start_function): Not here.
6597         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
6598         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
6599         Also nullify the CLEANUP_STMT for the nrv.
6600         * cp-tree.h: Declare it.
6601         * optimize.c (declare_return_variable): Replace the nrv with the
6602         return variable.
6603         * typeck.c (check_return_expr): Be more flexible on alignment check.
6604         Ignore cv-quals when checking for a matching type.
6606 2001-08-09  Richard Henderson  <rth@redhat.com>
6608         * decl2.c (finish_objects): Use target hooks instead of
6609         assemble_constructor and assemble_destructor.
6611 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6613         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
6615 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
6617         PR c++/3820
6618         Stop using TYPE_NONCOPIED_PARTS.
6619         * call.c (build_over_call): Be careful when copy constructing
6620         or assigning to an empty class.
6621         * class.c (check_bases_and_members): It has a
6622         COMPLEX_ASSIGN_REF if it has a vptr.
6623         (layout_class_type): Don't add empty class padding to
6624         TYPE_NONCOPIED_PARTS.
6625         (finish_struct_1): Don't add the VFIELD either.
6626         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
6627         initialization.
6629 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6631         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
6633 2001-08-06  Richard Henderson  <rth@redhat.com>
6635         * decl2.c (finish_objects): Pass a symbol_ref and priority to
6636         assemble_{constructor,destructor}.  Remove priority handling.
6638 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6640         Don't allow template-id in using-declaration.
6641         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
6642         (do_class_using_decl): Likewise.
6644 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6646         * cp/spew.c (read_token): No need to pop buffers.
6648 2001-08-02  Stan Shebs  <shebs@apple.com>
6650         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
6651         (fnaddr_from_vtable_entry): Remove decl.
6652         * method.c (use_thunk): Update comment.
6654 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
6656         * repo.c (get_base_filename): Change return value to const char
6657         pointer.
6659 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
6661         Kill -fhonor-std.
6662         * NEWS: Document.
6663         * cp-tree.h (flag_honor_std): Remove.
6664         (CPTI_FAKE_STD): Remove.
6665         (std_node): Remove comment about it being NULL.
6666         (fake_std_node): Remove.
6667         * decl.c (in_fake_std): Remove.
6668         (walk_namespaces_r): Remove fake_std_node check.
6669         (push_namespace): Remove in_fake_std code.
6670         (pop_namespace): Likewise.
6671         (lookup_name_real): Remove fake_std_node check.
6672         (init_decl_processing): Always create std_node. Always add
6673         std:: things there.
6674         (builtin_function): Always put non '_' fns in std.
6675         * decl2.c (flag_honor_std): Remove.
6676         (lang_f_options): Remove honor-std.
6677         (unsupported_options): Add honor-std.
6678         (set_decl_namespace): Remove fake_std_node check.
6679         (validate_nonmember_using_decl): Likewise.
6680         (do_using_directive): Likewise.
6681         (handle_class_head): Likewise.
6682         * dump.c (cp_dump_tree): Likewise.
6683         * except.c (init_exception_processing): Adjust.
6684         * init.c (build_member_call): Remove fake_std_node check.
6685         (build_offset_ref): Likewise.
6686         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
6687         * rtti.c (init_rtti_processing): Adjust.
6689 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
6691         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
6692         operand while calling cp_tree_equal.
6694 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6696         The 3.0 ABI no longer has vbase pointer fields.
6697         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
6698         FORMAT_VBASE_NAME): Remove.
6699         * method.c (do_build_copy_constructor): Adjust.
6700         (do_build_assign_ref): Adjust.
6701         * search.c (lookup_field_r): Adjust.
6702         * typeck.c (build_component_ref): Adjust.
6704         The 3.0 ABI always has a vtable pointer at the start of every
6705         polymorphic class.
6706         * rtti.c (build_headof_sub): Remove.
6707         (build_headof): Adjust.
6708         (get_tinfo_decl_dynamic): No need to check flag_rtti
6709         here. Adjust.
6710         (create_real_tinfo_var): Explain why we need a hidden name.
6712 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6714         PR c++/3631
6715         * class.c (update_vtable_entry_for_fn): The fixed adjustment
6716         of a virtual thunk should be from declaring base.
6718 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6720         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
6721         the shared virtual base, so preserving inheritance graph order.
6723 2001-07-30  Andreas Jaeger  <aj@suse.de>
6725         * decl2.c: Remove unused var global_temp_name_counter.
6727 2001-07-28  Richard Henderson  <rth@redhat.com>
6729         * method.c (pending_inlines): Remove.
6731 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6733         * class.c (mark_primary_virtual_base): Don't adjust base
6734         offsets here.
6735         (dfs_unshared_virtual_bases): Adjust them here.
6736         (mark_primary_bases): Explain why we adjust at the end.
6738 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6740         * class.c (finish_struct_1): When copying the primary base's
6741         VFIELD, make sure we find it is at offset zero.
6743 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6745         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
6746         tsubst_expr for default template arguments.
6748 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6750         PR c++/3621
6751         * spew.c (yylex): Only copy the token's lineno, if it is
6752         nonzero.
6754 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6756         PR c++/3624
6757         * call.c (resolve_args): Simplify, call
6758         convert_from_reference.
6759         (build_new_op): Resolve and convert from reference ARG1
6760         earlier. Adjust ARG2 & ARG3 resolve and conversion.
6762 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6764         * decl.c (last_function_parm_tags): Remove.
6765         (current_function_parm_tags): Remove.
6766         (init_decl_processing): Adjust.
6767         (start_function): Adjust.
6768         (store_parm_decls): Adjust.
6770         PR c++/3152
6771         * decl.c (grokdeclarator): Detect when a function typedef is
6772         declaring a function, and create last_function_parms correctly.
6774 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
6776         * call.c (joust): Only prefer a non-builtin candidate to a builtin
6777         one if they have the same signature.
6779         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
6780         it rather than toplevel_bindings_p.  Give it a mangled name if static.
6781         (convert_to_reference): Adjust.
6782         * decl2.c (get_temp_name): Lose.
6783         * mangle.c (mangle_ref_init_variable): New fn.
6784         (mangle_guard_variable): Strip the ref-init header.
6785         * cp-tree.h: Adjust.
6786         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
6787         initializer.
6788         (grok_reference_init): Always use DECL_INITIAL.
6790 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6792         PR c++/3416
6793         * call.c (build_conditional_expr): Recheck args after
6794         conversions.
6795         * cp-tree.h (build_conditional_expr): Move to correct file.
6796         * typeck.c (decay_conversion): Diagnose any unknown types
6797         reaching here.
6798         (build_binary_op): Don't do initial decay or default
6799         conversions on overloaded functions.
6800         (build_static_cast): Don't do a decay conversion here.
6802 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6804         PR c++/3543
6805         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
6806         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
6808 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6810         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
6811         (create_vtbl_ptr): ... here.
6813 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6815         * class.c (build_vbase_offset_vbtl_entries): Look for
6816         non-primary base of which we are a sub vtable.
6818 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
6820         * semantics.c (finish_this_expr):  Remove unused code.
6822 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
6824         Simplify rtti, now we've only one ABI.
6825         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
6826         CPTI_TINFO_VAR_ID.
6827         (tinfo_decl_id, tinfo_var_id): Remove.
6828         (get_typeid_1): Remove.
6829         * rtti.c
6830         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
6831         (typeid_ok_p): New function.
6832         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
6833         (get_tinfo_decl): Remove old abi documentation.
6834         (tinfo_from_decl): Remove.
6835         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
6836         (get_typeid_1): Remove.
6837         (get_base_offset): Remove.
6838         (synthesize_tinfo_var): Absorb get_base_offset.
6839         (create_real_tinfo_var): Don't use tinfo_decl_id.
6841 2001-07-23  Graham Stott  <grahams@redhat.com>
6843         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
6844         variable has_two_argument_delete_p.
6846 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
6848         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
6849         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
6850         (CPTI_INDEX_IDENTIFIER): Remove.
6851         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
6852         (delta2_identifier): Remove.
6853         (index_identifier): Remove.
6854         (pfn_or_delta2_identifier): Remove.
6855         (flag_vtable_thunks): Remove.
6856         (VTABLE_DELTA2_NAME): Remove.
6857         (VTABLE_INDEX_NAME): Remove.
6858         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
6859         (vfunc_ptr_type_node): Adjust.
6860         (VTABLE_NAME_PREFIX): Adjust.
6861         (build_vfn_ref): Lose first parameter.
6862         (fixup_all_virtual_upcast_offsets): Remove.
6863         * decl.c (initialize_predefined_identifiers): Remove
6864         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
6865         (init_decl_processing): Remove no-vtable-thunk code.
6866         * decl2.c (flag_vtable_thunks): Remove.
6867         (mark_vtable_entries): Remove no-vtable-thunk code.
6868         * error.c (dump_decl): Remove no-vtable-thunk code.
6869         (dump_expr): Adjust ptr to member function code.
6870         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
6871         code.
6872         * rtti.c (build_headof): Remove no-vtable-thunk code.
6873         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
6874         * search.c (get_base_distance): Remove expand_upcast_fixups case.
6875         (virtual_context) Remove.
6876         (expand_upcast_fixups): Remove.
6877         (fixup_virtual_upcast_offsets): Remove.
6878         (fixup_all_virtual_upcast_offsets): Remove.
6879         * typeck.c (get_member_function_from_ptrfunc): Remove
6880         no-vtable-thunk code.
6881         * call.c (build_over_call): Adjust call to build_vfn_ref.
6882         * class.c (build_vfn_ref): Lose first parameter. Remove
6883         no-vtable-thunk code.
6884         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
6885         (build_vtable_entry): Remove no-vtable-thunk code.
6887 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
6889         Remove old-abi remnants. Remove comments about old abi
6890         behavior. Remove references to 'new-abi' in comments.
6891         * cp-tree.h: Adjust comments.
6892         (vbase_offsets_in_vtable_p): Delete.
6893         (vcall_offsets_in_vtable_p): Delete.
6894         (vptrs_present_everywhere_p): Delete.
6895         (all_overridden_vfuns_in_vtables_p): Delete.
6896         (merge_primary_and_secondary_vtables_p): Delete.
6897         (TYPE_CONTAINS_VPTR_P): Adjust.
6898         (VTT_NAME_PREFIX): Remove.
6899         (CTOR_VTBL_NAME_PREFIX): Remove.
6900         (init_vbase_pointers): Remove.
6901         * class.c: Adjust coments.
6902         (build_vbase_pointer_fields): Delete.
6903         (build_vbase_pointer): Remove old-abi code.
6904         (build_secondary_vtable): Likewise.
6905         (modify_all_vtables): Likewise.
6906         (create_vtable_ptr): Likewise.
6907         (layout_class_type): Likewise.
6908         (finish_struct_1): Likewise.
6909         (finish_vtbls): Likewise.
6910         (dfs_finish_vtbls): Delete.
6911         (build_vbase_offset_vtbl_entries): Remove old-abi code.
6912         * cvt.c: Adjust comments.
6913         * decl.c: Adjust comments.
6914         * decl2.c: Adjust comments.
6915         * init.c: Adjust comments.
6916         (construct_virtual_bases): Remove old-abi code.
6917         * lang-specs.h: Remove -fno-new-abi.
6918         * mangle.c: Adjust comments.
6919         * rtti.c: Adjust comments.
6920         (get_base_offset): Remove old-abi-code.
6921         * search.c: Adjust comments.
6922         (dfs_init_vbase_pointers): Remove.
6923         (dfs_vtable_path_unmark): Remove.
6924         (init_vbase_pointers): Remove.
6925         * semantics.c: Adjust comments.
6926         (emit_associated_thunks): Remove old-abi code.
6927         * typeck.c: Adjust comments.
6929 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
6931         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
6932         params.h.
6934 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
6936         * class.c (finish_struct_anon): Forbid nested classes.
6938 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6940         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
6941         * optimize.c: Include debug.h.
6942         (maybe_clone_body): Use debug hook.
6943         * semantics.c: Include debug.h.
6944         (expand_body): Use debug hook.
6946 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
6948         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
6950 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
6952         * class.c (type_requires_array_cookie): New function.
6953         (check_methods): Don't try to figure out whether the type needs a
6954         cookie here.
6955         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
6956         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
6957         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
6958         * pt.c (instantiate_class_template): Don't set
6959         TYPE_VEC_DELETE_TAKES_SIZE.
6960         * NEWS: Document ABI changes from GCC 3.0.
6962 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
6963             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
6965         * NEWS (Changes in GCC 3.0): Fix typo.
6967 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6969         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
6970         which attributes are to be attached, and a flags argument.  Update
6971         call to decl_attributes.
6972         (grokfield): Update call to decl_attributes.
6973         * class.c (finish_struct): Update call to cplus_decl_attributes.
6974         * cp-tree.h (cplus_decl_attributes): Update prototype.
6975         * decl.c (start_decl, grokdeclarator, start_function): Update
6976         calls to decl_attributes and cplus_decl_attributes.
6977         * friend.c (do_friend): Update call to cplus_decl_attributes.
6978         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
6980 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
6982         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
6983         for `register' variables with an asm-specification.
6985 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
6987         * semantics.c (finish_asm_stmt): Mark the output operands
6988         to an asm addressable, if necessary.
6990 2001-07-11  Ben Elliston  <bje@redhat.com>
6992         * Revert this change -- there is a subtle bug.
6994         PR c++/80
6995         * decl.c (finish_enum): New "attributes" argument; pass it to
6996         cplus_decl_attributes.  Use a narrower type if the enum is packed.
6997         * cp-tree.h (finish_enum): Adjust prototype.
6998         * parse.y (enum_head): New non-terminal.
6999         (structsp): Use it. Enums now may be preceded or followed by
7000         optional attributes -- pass their chained tree to finish_enum().
7001         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
7003 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
7005         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
7006         variables.
7008 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
7010         * semantics.c (cp_expand_stmt): Fix for null
7011         current_function_return_value.
7013 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
7015         * call.c (build_op_delete_call): Initialize fn.
7016         (convert_like_real): Delete conditional.
7017         (joust): Initialize *w and *l.
7018         * class.c: Add prototype for binfo_ctor_vtable.
7019         (get_primary_binfo): Initialize result.
7020         * init.c (build_java_class_ref): Initialize name.
7022 2001-07-09  Erik Rozendaal  <dlr@acm.org>
7024         * typeck.c (unary_complex_lvalue): Do not duplicate the
7025         argument to modify, pre-, or post-increment when used as an
7026         lvalue and when the argument has side-effects.
7028 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7030         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7031         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
7032         cplus_decl_attributes even if attrs is NULL.
7033         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7035 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7037         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
7038         calls to decl_attributes.
7040 2001-07-06  Ira Ruben   <ira@apple.com>
7042         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
7043         be DECL_TEMPLATE_RESULT.
7045 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7047         * cp-tree.h (copy_template_template_parm): Rename to ...
7048         (bind_template_template_parm): ... here.
7049         * tree.c (copy_template_template_parm): Rename to ...
7050         (bind_template_template_parm): ... here.  Remove the case when
7051         NEWARGS is NULL_TREE.
7052         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
7053         BOUND_TEMPLATE_TEMPLATE_PARM.
7054         * pt.c (lookup_template_class): Adjust.
7056 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
7058         * cvt.c (convert_lvalue): New fn.
7059         * cp-tree.h: Declare it.
7060         * method.c (do_build_assign_ref): Use it.
7061         (do_build_copy_constructor): Convert parm to base types
7062         before calling base constructors.
7064         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
7065         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
7066         optimize.
7067         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
7069 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
7071         * optimize.c (optimize_inline_calls): New function, broken out
7072         of ...
7073         (optimize_function): ... here. Call it. Don't inline if it is
7074         a thunk.
7075         (dump_function): Print name of dump flag causing this dump.
7076         * semantics.c (expand_body): Move thunk inline check to
7077         optimize_function.
7079 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7081         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
7082         (comptypes): Use target.comp_type_attributes.
7084 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
7086         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
7088 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7090         * error.c (lang_print_error_function): Add a `diagnostic_context *'
7091         parameter. Tweak.
7093 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7095         * decl2.c (import_export_class): Update.
7097 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7099         * error.c (init_error): Adjust settings.
7101 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7103         * error.c (init_error): Adjust settings.
7105 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
7107         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
7108         return pointers to data members by reference rather than by value.
7110 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
7112         Implement the Named Return Value optimization.
7113         * cp-tree.h (struct cp_language_function): Add x_return_value.
7114         (current_function_return_value): Now a macro.
7115         * decl.c: Don't define it.
7116         (define_label, finish_case_label): Don't clear it.
7117         (init_decl_processing): Don't register it with GC.
7118         * semantics.c (genrtl_finish_function): Don't check it for
7119         no_return_label.  Copy the RTL from the return value to
7120         current_function_return_value and walk, calling...
7121         (nullify_returns_r): ...this new fn.
7122         * typeck.c (check_return_expr): Set current_function_return_value.
7124 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
7126         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
7127         sharing a ctor vtable with.  Merge code for cases 1 and 2.
7128         (binfo_ctor_vtable): New fn.
7129         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
7131 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
7133         * class.c (dfs_find_final_overrider): Fix logic.
7135         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
7136         virtual thunk instead of non-virtual.
7137         (get_matching_virtual): Uncomment.
7139         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
7140         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
7141         PARM, not ARG.
7143 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7145         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
7146         we've not emerged from the hierarchy of RTTI_BINFO on reaching
7147         a non-virtual base.
7149 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
7151         * NEWS: Update release number.
7153 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7155         PR c++/3130, c++/3131, c++/3132
7156         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
7157         * class.c (force_canonical_binfo_r): Move
7158         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
7159         virtual bases unless they're primary and what they're primary
7160         too has been moved.
7161         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
7162         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
7163         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
7164         derived binfo.
7165         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
7166         (layout_nonempty_base_or_field): Add most derived type
7167         parameter. Adjust.
7168         (layout_empty_base): Likewise.
7169         (build_base_field): Likewise.
7170         (build_base_fields): Likewise.
7171         (propagate_binfo_offsets): Add most derived type
7172         parameter. Skip non canonical virtual bases too.
7173         (dfs_set_offset_for_unshared_vbases): Don't skip primary
7174         bases. Do skip canonical bases.
7175         (layout_virtual_bases): Adjust.
7176         (layout_class_type): Adjust.
7177         (dfs_get_primary_binfo): Build list of virtual primary base
7178         candidates.
7179         (get_primary_binfo): Check that the shared virtual primary
7180         base candidate was found first.
7181         (accumulate_vtbl_inits): Don't do anything for non-vptr
7182         containing binfos. For case 1 primary virtual bases, keep
7183         checking that we've not emerged from the hierarchy of RTTI_BINFO.
7185 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7187         PR c++/3089
7188         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
7189         hierarchy looking for primary bases for a ctor
7190         vtable. Recursively call oneself, if we meet our primary via
7191         this route and haven't met it yet via inheritance graph order.
7193 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
7195         * lang-options.h: Emit documentation for -fno-honor-std, not
7196         -fhonor-std.
7198 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
7200         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
7201         Don't clobber delta.
7202         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
7204 2001-06-10  Mark Mitchell <mark@codesourcery.com>
7205             Gabriel Dos Reis  <gdr@codesourcery.com>
7207         * Make-lang.in (cp/call.o): Depend on diagnostic.h
7208         (cp/typeck.o): Depend on diagnostic.h
7209         (cp/typeck2.o): Depend on diagnostic.h
7210         (cp/repo.o): Depend on dignostic.h
7211         * typeck.c: #include diagnostic.h
7212         (convert_for_initialization): Remove extern declaration for
7213         warningcount and errorcount.
7215         * call.c: #include diagnostic.h
7216         (convert_like_real): Remove extern declaration for warnincount and
7217         errorcount.
7219         * repo.c: #include diagnostic.h
7220         * typeck2.c: #include diagnostic.h
7222 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7224         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
7225         in previous change.
7227 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7229         PR c++/2929
7230         * friend.c (do_friend): Use push_decl_namespace for classes at
7231         namespace scope.
7233 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7234             Jason Merrill <jason_merrill@redhat.com>
7236         PR c++/3061
7237         * class.c (build_secondary_vtable): Use assert, rather than an error
7238         message.
7239         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
7240         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
7241         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
7242         Don't set BINFO_VTABLE for a primary virtual base.
7244 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
7246         * decl.c (duplicate_decls): Update source position information
7247         when a template function is defined.
7249 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
7251         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
7253 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
7255         PR c++/2914
7256         * decl.c (pushtag): Don't push into a complete type's scope.
7258 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
7260         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
7261         (struct lang_decl_flags): Lose generate_with_vtable_p.
7262         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
7263         * class.c (copy_virtuals): Adjust.
7264         * decl2.c (mark_vtable_entries): Adjust.
7265         * method.c (make_thunk, build_vtable_entry): Adjust.
7266         * class.c (update_vtable_entry_for_fn): Only look as far as the
7267         first defining class.
7268         (build_vtbl_initializer): Put nothing in the slot for a function only
7269         defined in a lost primary virtual base.
7270         (add_vcall_offset_vtbl_entries_1): Use the same code for
7271         the lost primary case and the normal case.
7272         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
7273         (get_vfield_offset, get_derived_offset): Lose.
7274         (dfs_find_final_overrider): Use look_for_overrides_here.
7275         (get_matching_virtual): New fn.
7276         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
7277         not BV_VCALL_INDEX.
7278         * search.c (look_for_overrides_here): Split out from...
7279         (look_for_overrides_r): Here.
7281         * class.c (find_final_overrider): Return error_mark_node on error.
7283         * decl2.c (key_method): #if 0 accidental change.
7285 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7287         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
7288         (build_over_call): Likewise.
7289         * decl.c (grokparms): Likewise.
7290         * pt.c (tsubst_decl): Likewise.
7291         * typeck.c (convert_arguments): Likewise.
7293 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
7295         * semantics.c (begin_class_definition): Robustify.
7297         * pt.c (instantiate_decl): Tell the repository code about the
7298         clones, not the cloned functions.
7299         * repo.c (repo_template_used): Explicitly instantiate the cloned
7300         function, not the clones.
7302 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7304         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
7305         ICS_BAD_FLAG on created conversion.
7306         (compare_ics): Break out rank.
7308 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7310         * decl.c (xref_tag): Remove extraneous %s on dependent name
7311         lookup warning.
7313 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7315         * class.c (layout_vtable_decl): Fix off by one error on
7316         build_index_type.
7317         (build_vtt): Likewise.
7318         (build_ctor_vtbl_group): Likewise.
7320 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7322         * class.c (maybe_indent_hierarchy): New function.
7323         (dump_class_hierarchy_r): Add flags. Dump extra binfo
7324         information, if enabled. Use maybe_indent_hierarchy. Adjust
7325         output format.
7326         (dump_class_hierarchy): Adjust prototype. Adjust output format.
7327         (dump_array, dump_vtable, dump_vtt): New functions.
7328         (finish_struct_1): Adjust hierarchy dumping.
7329         (initialize_vtable): Call dump_vtable.
7330         (build_vtt): Call dump_vtt.
7331         (build_ctor_vtbl_group): Call dump_vtable.
7332         * decl2.c (flag_dump_class_layout): Remove.
7333         (cxx_decode_option): Remove dump translation unit
7334         and dump class hierarchy check. Call dump_switch_p.
7335         (finish_file): Adjust dumping.
7336         (dump.c): Only dump base classes if not TDF_SLIM.
7337         Only dump namespace members if not TDF_SLIM.
7338         * optimize.c (dump_function): New function.
7339         (optimize_function): Call dump_function.
7340         * semantics.c (expand_body): Use dump_enabled_p.
7342 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
7344         PR g++/2936
7345         Part missed from first commit
7346         * decl2.c (finish_anon_union): Copy context.
7348 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
7350         PR g++/2936
7351         * optimize.c (remap_decl): Remap anonymous aggregate members too.
7353 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
7355         PR g++/2823
7356         * semantics.c (expand_body): Don't optimize thunks.
7358 2001-05-25  Sam TH  <sam@uchicago.edu>
7360         * cp-tree.h lex.h: Fix header include guards.
7362 2001-05-25  Mark Mitchell <mark@codesourcery.com>
7364         * decl.c (init_decl_processing): Tweak.
7366 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
7368         * decl.c (duplicate_decls): Tidy.
7369         (init_decl_processing): Always set flag_no_builtin.
7371 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
7373         PR c++/2184
7374         * decl2.c (do_local_using_decl): Push the decls, even in a
7375         template.
7377 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
7379         * optimize.c (initialize_inlined_parameters): Don't set
7380         TREE_READONLY for a VAR_DECL taking the place of an inlined
7381         PARM_DECL.
7383 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
7385         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
7386         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
7387         attribute.
7389 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
7391         * parse.y: Refer to compound literals as such, not as
7392         constructor-expressions.
7394 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
7396         * call.c (build_op_delete_call): Ignore exception-specifications
7397         when looking for matching delete operators.
7398         * init.c (build_new_1): Compute whether or not the allocation
7399         function used is a placement allocation function or not, and
7400         communicate this information to build_op_delete_call.
7402 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
7404         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
7405         (build_vtbl_ref): Adjust.
7406         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
7407         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
7408         Re-add vtable-gc.
7409         (unsupported_options): Correspondingly.
7411         * decl2.c (maybe_make_one_only): Check flag_weak, not
7412         supports_one_only().
7414         * cp-tree.def (START_CATCH_STMT): Lose.
7415         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
7416         * tree.c (cp_statement_code_p): Don't case it.
7417         * semantics.c (cp_expand_stmt): Likewise.
7418         * cp-tree.h (START_CATCH_TYPE): Lose.
7419         (HANDLER_TYPE): New.
7420         * except.c (expand_start_catch_block): Don't start any blocks.
7421         Return the type.
7422         (expand_end_catch_block): Don't end any blocks.
7423         * parse.y (handler): Don't pass anything from finish_handler_parms
7424         to finish_handler.
7425         * pt.c (tsubst_expr): Likewise.
7426         * semantics.c (begin_handler): Call note_level_for_catch here.
7427         (finish_handler_parms): Don't return anything.
7428         (genrtl_catch_block, begin_catch_block): Lose.
7429         (genrtl_handler): Call expand_start_catch here.
7431 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
7433         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
7434         (get_vtable_decl, build_vtt): Not here.
7436 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
7438         PR c++/2781
7439         * optimize.c (update_cloned_parm): Copy addressability and other
7440         flags.
7442 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7444         * pt.c (determine_specialization): Ignore artificial functions.
7446 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7448         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
7449         (C_RID_CODE): Remove.
7450         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
7451         (init_parse): Don't do it here.
7453 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
7455         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
7456         function declaration to avoid stripping the symbol's attributes.
7458 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
7460         * decl.c (pushdecl): Adjust error string.
7461         (xref_tag): Adjust friend class injection warning. Remove the
7462         inherited name from the class shadowed scope.
7464 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
7466         * except.c (cp_protect_cleanup_actions): New function.
7467         (init_exception_processing): Don't set protect_cleanup_actions
7468         here.  Do set lang_protect_cleanup_actions.
7470 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7472         * spew.c (read_token): Call yyerror on all unexpected tokens.
7474 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7476         * init.c (member_init_ok_or_else): Take a tree rather than
7477         string for name.
7478         (expand_member_init): Adjust.
7480 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
7482         * decl.c (duplicate_decls): Suppress warning about duplicate
7483         decls if the first decl is a friend.
7485 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
7487         * except.c (choose_personality_routine): Export.  Add
7488         explanatory comment.  Take an enum languages, not a boolean.
7489         (initialize_handler_parm): Adjust to match.
7490         * cp-tree.h: Prototype choose_personality_routine.
7491         * lex.c (handle_pragma_java_exceptions): New function.
7492         (init_cp_pragma): Register #pragma GCC java_exceptions.
7494 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7496         * method.c (build_mangled_C99_name): Remove unused prototype.
7498 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
7500         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
7501         * typeck.c (get_member_function_from_ptrfunc,
7502         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
7503         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
7505         Reverted Geoff Keating's 2001-05-03's patch.
7507 2001-05-11  Ira Ruben   <ira@apple.com>
7509         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
7511 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
7513         * cp-tree.h (finish_label_expr, lookup_label): Delete.
7514         * parse.y: Update for '&&'; don't issue warning here.
7515         * semantics.c (finish_label_expr): Delete.
7517 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
7519         * splay-tree.h (splay_tree_max): New function.
7520         (splay_tree_min): Likewise.
7522 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
7524         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
7525         (pfn_vflag_identifier): Define.
7526         Update comment about layout of pointer functions.
7527         (build_ptrmemfunc1): Update prototype.
7528         (expand_ptrmemfunc_cst): Update prototype.
7529         * decl.c (initialize_predefined_identifiers): Initialize
7530         pfn_vflag_identifier.
7531         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
7532         an extra field to the type.
7533         * expr.c (cplus_expand_constant): Pass 'flag' between
7534         expand_ptrmemfunc_cst and build_ptrmemfunc1.
7535         * typeck.c (get_member_function_from_ptrfunc): When
7536         FUNCTION_BOUNDARY < 16, look at additional field to determine
7537         if a pointer-to-member is a real pointer or a vtable offset.
7538         (build_ptrmemfunc1): Add new parameter to contain extra field.
7539         (build_ptrmemfunc): Pass the extra field around.
7540         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
7541         (pfn_from_ptrmemfunc): Ignore the extra field.
7543 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
7545         * cp-tree.h (flag_inline_trees): Update documentation.
7546         * decl.c (init_decl_processing): Adjust handling of
7547         flag_inline_functions and flag_inline_trees to support -O3.
7548         (grokfndecl): Set DECL_INLINE on all functions if that's what
7549         the user requested.
7550         (save_function_data): Clear DECL_INLINE in
7551         current_function_cannot_inline is non-NULL.
7552         * decl2.c (flag_inline_trees): Update documentation.
7554 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
7556         * dump.c (cp_dump_tree, USING_STMT case): New case.
7557         * tree.c (cp_statement_code_p): Add USING_STMT.
7558         * decl2.c (do_using_directive): Add the using directive statement.
7560         * tree.c (walk_tree): Reformat an if block.
7562 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7564         * decl.c (compute_array_index_type): Don't try to do anything with
7565         the indices when processing a template.
7567 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7569         * call.c: NULL_PTR -> NULL.
7570         * class.c: Likewise.
7571         * cvt.c: Likewise.
7572         * decl.c: Likewise.
7573         * decl2.c: Likewise.
7574         * except.c: Likewise.
7575         * init.c: Likewise.
7576         * rtti.c: Likewise.
7577         * search.c: Likewise.
7578         * tree.c: Likewise.
7579         * typeck.c: Likewise.
7580         * typeck2.c: Likewise.
7582 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7584         * decl2.c (do_using_directive): Revert previous patch.
7586 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7588         * cp-tree.def (USING_STMT): New statement node.
7589         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
7590         * decl2.c (do_using_directive): Add USING_STMT to statement
7591         tree. Don't emit errors when processing template decl.
7592         * pt.c (tsubst_expr, USING_STMT case): New case.
7593         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
7595 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7597         * call.c (build_new_op): Convert args from reference here.
7598         (build_conditional_expr): Don't convert here.
7600 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7602         * spew.c (last_token_id): New static variable.
7603         (read_token): Set it here.
7604         (yyerror): Use it here.
7606 2001-04-30  Richard Henderson  <rth@redhat.com>
7608         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
7609         * decl.c: Likewise.
7611 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7613         * gxxint.texi: Remove.
7614         * Make-lang.in: Remove all traces of gxxint.texi.
7616 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
7618         * decl2.c (start_static_initialization_or_destruction): Correct
7619         logic to handle the -fno-use-cxa-atexit case.
7621 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7623         * optimize.c (update_cloned_parm): New function.
7624         (maybe_clone_body): Use it.  Update the `this' parameter too.
7626 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7628         * decl2.c (unsupported_options): Add new-abi.
7629         * lang-options.h: Remove no longer supported options.
7631 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7633         * except.c (can_convert_eh): Don't check template parms,
7634         typename types etc.
7636 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7638         * optimize.c (maybe_clone_body): Copy parameter names and locations.
7640 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7642         * cp-tree.h (adjust_clone_args): Prototype new function.
7643         * class.c (adjust_clone_args): New function.
7644         * decl.c (start_function): Call it for in charge ctors.
7646 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
7648         * method.c (use_thunk): Make sure that thunks really are emitted
7649         when requested.
7651 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
7653         * mangle.c (write_chars): New macro.
7654         (hwint_to_ascii): New function
7655         (write_number): Use it.
7656         (write_integer_cst): Deal with really big numbers.
7658 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
7660         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
7661         the clone.
7663 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
7665         * decl.c (grokdeclarator): Set context of namespace scope
7666         TYPE_DECLS.
7668 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
7670         * cp/optimize.c: Include hashtab.h.
7671         (struct inline_data): Add tree_pruner.
7672         (expand_call_inline, expand_calls_inline): Use it when calling
7673         walk_tree.
7674         (optimize_function): Initialize and free tree_pruner.
7676 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
7678         Lazy __FUNCTION__ generation.
7679         * cp-tree.def (FUNCTION_NAME): Remove.
7680         * cp-tree.h (function_name_declared_p): Remove.
7681         (cp_fname_init): Prototype.
7682         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
7683         don't call declare_function_name. Call start_fname_decls.
7684         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
7685         clobber the line number.
7686         (cp_fname_init): New function.
7687         (start_function): Call start_fname_decls.
7688         (finish_function): Call finish_fname_decls.
7689         * lex.c (reswords): Add slots for __FUNCTION__ et al.
7690         (rid_to_yy): Add mappings for __FUNCTION__ et al.
7691         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
7692         * parse.y (VAR_FUNC_NAME): New token.
7693         (primary): Add VAR_FUNC_NAME.
7694         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
7695         generation.
7696         (tsubst, FUNCTION_NAME case): Remove.
7697         (tsubst_copy, FUNCTION_NAME case): Remove.
7698         (tsubst_expr, DECL_STMT case): Be careful with a
7699         DECL_PRETTY_FUNCTION_P.
7700         (instantiate_decl): Remove function_name_declared_p.
7701         * semantics.c (begin_compound_statement): Don't call
7702         declare_function_name here.
7703         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
7704         (finish_translation_unit): Call finish_fname_decls.
7705         (expand_body): Remove function_name_declared_p.
7706         * typeck2.c (digest_init): Allow any ERROR_MARK.
7708 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
7710         * pt.c (tsubst_decl): Use VOID_TYPE_P.
7711         * semantics.c: Fix some typos.
7713 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
7715         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
7717 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7719         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
7721 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
7723         * except.c (build_throw): Wrap the initialization of the exception
7724         object in a MUST_NOT_THROW_EXPR.
7725         (do_free_exception): #if 0.
7727 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
7729         * cp-tree.h (finish_enum): Change prototype.
7730         * decl.c (finish_enum): Reorganize.
7731         * parse.y (structsp): Adjust calls to finish_enum.
7733 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7735         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
7736         't' case.
7738 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7740         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
7741         (layout_empty_base): Return at end flag.
7742         (build_base_field): Likewise.
7743         (build_base_fields): Likewise.
7744         (layout_virtual_bases): Don't add 1 to eoc value.
7745         (end_of_class): Use full size for empty bases.
7746         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
7747         empty bases. Don't add 1 to eoc value. Only add trailing padding
7748         if we're an empty class with no empty bases.
7749         (dump_class_hierarchy): Dump size and alignment.
7751 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7753         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
7754         ICS_BAD_FLAG.
7756 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7758         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
7759         is found, look first if name does not match the structure name.
7761 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
7763         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
7764         set.
7765         (SET_DECL_LANGUAGE): New macro.
7766         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
7767         (pushdecl): Likewise.
7768         (build_library_fn_1): Likewise.
7769         (build_cp_library_fn): Likewise.
7770         (grokfndecl): Likewise.
7771         (grokvardecl): Mark `extern "C"' variables as having C linkage.
7772         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
7773         * lex.c (retrofit_lang_decl): Likewise.
7774         * mangle.c (mangle_decl_string): Don't mangle the names of
7775         variables declared with C language linkage.
7776         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
7778 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7780         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
7781         flag_access_control from uninitialized storage.
7783 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
7785         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
7786         * mangle.c (write_pointer_to_member_type): Fix mangling of
7787         pointers to cv-qualified member function types.
7789         * init.c (build_delete): Create a SAVE_EXPR for the address if
7790         we're going to use it more than once.
7792 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
7794         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
7795         (expand_ptremfunc_cst): Change prototype.
7796         (delta2_from_ptrmemfunc): Remove.
7797         * expr.c (cplus_expand_constant): Adjust call to
7798         expand_ptrmemfunc_cst.
7799         * typeck.c (build_ptrmemfunc1): Simplify.
7800         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
7801         results in a constant.
7802         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
7803         (delta2_from_ptrmemfunc): Remove.
7804         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
7806 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
7808         * cp-tree.h (decl_namespace_list): New macro.
7809         (struct saved_scope): Add decl_ns_list.
7810         * decl.c (mark_saved_scope): Mark it.
7811         * decl2.c: Lose static decl_namespace_list.
7812         (init_decl2): Don't save it.
7814 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7816         * cp-tree.h (warn_return_type, yylex): Delete redundant
7817         declarations.
7819         * decl.c (current_class_depth, global_namespace): Likewise.
7821         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
7823         * repo.c (flag_use_repository): Likewise.
7825 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7827         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
7828         set_block, pushdecl, getdecls, gettags, init_decl_processing,
7829         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
7830         lvalue_or_else, print_lang_statistics, comp_target_types,
7831         unsigned_type, signed_type, signed_or_unsigned_type,
7832         build_function_call, mark_addressable, incomplete_type_error):
7833         Delete redundant declarations.
7835 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
7837         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
7838         (TYPE_ANONYMOUS_P): New macro.
7839         (TAGGED_TYPE_P): New macro.
7840         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
7841         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
7842         * tree.c (no_linkage_helper): Likewise.
7843         * semantics.c (begin_class_definition): Likewise.
7844         * pt.c (convert_template_argument): Likewise.
7845         * lex.c (check_for_missing_semicolon): Likewise.
7847 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7849         * class.c (dfs_unshared_virtual_bases): New function.
7850         (mark_primary_bases): Call it.
7851         (check_bases): Ignore virtual bases when determining
7852         nearly-emptiness.
7854 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7856         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
7858 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
7860         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
7861         cloned function to the clone.
7863 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7865         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
7867         * semantics.c: Include expr.h.
7869 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
7871         * method.c (implicitly_declare_fn): Commonize code for copy ctor
7872         and assignment op. Set TREE_USED for parameter.
7874 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
7876         * class.c (find_final_overrider_data): Add `candidates'.
7877         (dfs_find_final_overrider): Don't issue error messages
7878         prematurely.
7879         (find_final_overrider): Issue error messages here.
7880         (build_base_field): Don't warn about amgibuous direct bases here.
7881         (warn_about_ambiguous_direct_bases): New function.
7882         (layout_class_type): Use it.
7884 2001-04-10  Richard Henderson  <rth@redhat.com>
7886         * typeck.c (build_array_ref): Push the array reference inside
7887         COMPOUND_EXPR and COND_EXPR.
7889 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
7891         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
7892         * decl.c (duplicate_decls): Adjust accordingly.
7893         (maybe_commonize_var): Likewise.
7894         (grokfndecl): Likewise.
7895         (start_function): Likewise.
7896         (start_method): Likewise.
7897         * decl2.c (key_method): Likewise.
7898         (import_export_decl): Likewise.
7899         * method.c (implicitly_declare_fn): Likewise.
7900         * optimize.c (maybe_clone_body): Likewise.
7902 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
7904         * lang-specs.h: Add __DEPRECATED.
7906 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
7908         * search.c (get_dynamic_cast_base_type): When building a new
7909         constant, set its type to ssizetype.
7911 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
7913         * optimize.c (expand_call_inline): Only add newly inlined statements
7914         into inlined_stmts.
7916 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7918         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
7919         (OPERATOR_FORMAT): Likewise.
7920         (OPERATOR_TYPENAME_FORMAT): Likewise.
7921         * operators.def: Remove old name-mangling information.
7922         * decl.c (grok_op_properties): Adjust accordingly.
7923         * lex.c (init_operators): Likewise.
7924         * rtti.c (get_tinfo_decl): Issue error messages about types that
7925         have variable size.
7927 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7929         * decl2.c (import_export_decl): Don't call import_export_class
7930         when processing an inline member function.
7931         * semantics.c (expand_body): Call import_export_decl before
7932         emitting inline functions.
7934 2001-03-28  Richard Henderson  <rth@redhat.com>
7936         IA-64 ABI Exception Handling:
7937         * cp-tree.def (EH_SPEC_BLOCK): New.
7938         (MUST_NOT_THROW_EXPR): New.
7939         * cp-tree.h: Update changed function declarations.
7940         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
7941         (CPTI_CALL_UNEXPECTED): New.
7942         (struct cp_language_function): Rename x_eh_spec_try_block
7943         to x_eh_spec_block.
7944         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
7945         * decl.c (current_binding_level): If no current function
7946         bindings, revert to scope_chain.
7947         (initialize_predefined_identifiers): Remove __cp_push_exception.
7948         (store_parm_decls): Use begin_eh_spec_block.
7949         (finish_function): Use finish_eh_spec_block.
7950         (mark_lang_function): Update for name changes.
7951         * decl2.c (finish_file): No mark_all_runtime_matches.
7952         * dump.c (cp_dump_tree): Handle new tree codes.
7953         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
7954         * except.c (catch_language_init, catch_language): Remove.
7955         (init_exception_processing): Don't set language code.
7956         Initialize call_unexpected_node, protect_cleanup_actions,
7957         eh_personality_libfunc, lang_eh_runtime_type.
7958         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
7959         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
7960         (prepare_eh_type): Split out type canonicalizations ...
7961         (build_eh_type_type): ... from here.
7962         (build_eh_type_type_ref): Remove.
7963         (mark_all_runtime_matches): Remove.
7964         (build_exc_ptr): New.
7965         (do_begin_catch, do_end_catch): New.
7966         (do_pop_exception): Remove.
7967         (build_terminate_handler): Remove.
7968         (choose_personality_routine): Split out language choice from ...
7969         (initialize_handler_parm): ... here.
7970         Use MUST_NOT_THROW_EXPR.
7971         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
7972         exception object handling.
7973         (expand_start_eh_spec, expand_end_eh_spec): Remove.
7974         (expand_exception_blocks, alloc_eh_object): Remove.
7975         (begin_eh_spec_block, finish_eh_spec_block): New.
7976         (do_allocate_exception, do_free_exception): New.
7977         (expand_throw): Merge into ...
7978         (build_throw): ... here.  Update for abi.
7979         * expr.c (cplus_expand_expr): No expand_internal_throw.
7980         Handle MUST_NOT_THROW_EXPR.
7981         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
7982         * semantics.c (*) Update for except.h name changes.
7983         (genrtl_try_block): No protect_with_terminate.
7984         (genrtl_eh_spec_block): New.
7985         (genrtl_handler): Don't emit the goto here.
7986         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
7987         (genrtl_finish_function): Don't expand_exception_blocks.
7988         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
7990 2001-03-28  Richard Henderson  <rth@redhat.com>
7992         * decl.c (struct named_label_list): Rename eh_region to
7993         in_try_scope, add in_catch_scope.
7994         (struct binding_level): Rename eh_region to is_try_scope,
7995         add is_catch_scope.
7996         (note_level_for_try): Rename from note_level_for_eh.
7997         (note_level_for_catch): New.
7998         (poplevel): Copy both is_try_scope and is_catch_scope to
7999         the named_label_list struct.
8000         (check_previous_goto_1): Don't check for catch block via
8001         DECL_ARTIFICIAL; use in_try_scope instead.
8002         (check_goto): Likewise.
8003         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
8004         * except.c (expand_start_catch_block): Call note_level_for_catch.
8005         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
8007 2001-03-27  Richard Henderson  <rth@redhat.com>
8009         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
8010         exceptions_via_longjmp.
8012 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
8014         * pt.c (check_default_tmpl_args):  Make error messages clearer.
8016 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
8018         * error.c:  Also undefine 'A' macro used for cp_printers definition.
8020 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8022         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8024 2001-03-26  Mike Yang <yang@research.att.com>
8025             Mark Mitchell  <mark@codesourcery.com>
8027         * dump.c (dump_access): New function.
8028         (cp_dump_tree): Use it.  Dump basetype information for class
8029         types.
8031 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
8033         * Makefile.in (optimize.o): Depend on params.h.
8034         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
8035         (init_decl_processing): Set flag_no_inline when doing
8036         inlining-on-trees.
8037         * optimize.c: Include params.h.
8038         (struct inline_data): Improve documentation of FNS.  Add
8039         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
8040         (INSNS_PER_STMT): New macro.
8041         (remap_block): Use CLONING_P.
8042         (inlinable_function_p): Don't inline big functions.
8043         (expand_call_inline): Keep track of how much inlining we've done.
8044         (optimize_function): Set FIRST_INLINED_FN.
8045         (maybe_clone_body): Set CLONING_P.
8046         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
8047         tree nodes.
8048         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
8049         rest_of_compilation.  Clear DECL_RTL for local variables
8050         afterwards.
8051         (clear_decl_rtl): New function.
8053 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8055         Implement DR 209
8056         * cp-tree.h (skip_type_access_control,
8057         reset_type_access_control): Prototype.
8058         * decl.c (grokdeclarator): Access of friends is not checked.
8059         * parse.y (component_decl_list): Reset type access control.
8060         * semantics.c (decl_type_access_control): Clear
8061         current_type_lookups.
8062         (save_type_access_control): Don't save if not deferring.
8063         (skip_type_access_control, reset_type_access_control): New
8064         functions.
8065         (begin_class_definition): Do type access control for basetypes.
8066         Start deferred access control.
8067         (finish_class_definition): Resume immediate access control if
8068         this is a local class.
8070 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8072         * class.c (add_method): Use memcpy/memmove, not bcopy.
8074         * decl.c (duplicate_decls): Likewise.
8076 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8078         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
8079         not `_'.
8081 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8083         * decl.c (local_names): Define.
8084         (push_local_name): New.
8085         (grok_reference_init): Return init if initializing static reference
8086         variable with non-constant instead of emitting it.
8087         Move expand_static_init call to cp_finish_decl.
8088         (layout_var_decl): Call push_local_name.
8089         (maybe_commonize_var): Allow inlining functions even if they have
8090         static local variables, use comdat_linkage for them if flag_weak.
8091         (check_initializer): Call obscure_complex_init if
8092         grok_reference_init returned nonzero.
8093         (save_function_data): Clear x_local_names.
8094         (pop_cp_function_context): Free x_local_names.
8095         (mark_inlined_fns): Remove.
8096         (mark_lang_function): Mark x_local_names.
8097         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
8098         Mark inlined_fns as tree, remove call to mark_inlined_fns.
8099         * class.c (alter_access): Ensure DECL_ACCESS is never set if
8100         DECL_DISCRIMINATOR_P.
8101         * cp-tree.h (cp_language_function): Add x_local_names.
8102         (lang_decl_flags): Add discriminator into u2.
8103         (lang_decl_inlined_fns): Remove.
8104         (lang_decl): inlined_fns is now a TREE_VEC.
8105         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
8106         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
8107         TREE_VEC, not a custom structure.
8108         (optimize_function): Likewise.
8109         * mangle.c (discriminator_for_local_entity): Discriminate among
8110         VAR_DECL local entities.
8111         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
8112         is not valid.
8114 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
8116         Add support for Java interface method calls.
8117         * cp-tree.h (struct lang_type): Add java_interface flag.
8118         (TYPE_JAVA_INTERFACE): New macro.
8119         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
8120         by setting TYPE_JAVA_INTERFACE.
8121         * call.c (java_iface_lookup_fn): New static.
8122         (build_over_call): If calling a method declared in a
8123         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
8124         expression which resolves the function address.
8125         (build_java_interface_fn_ref): New function.
8127 2001-03-22  Richard Henderson  <rth@redhat.com>
8129         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
8130         * except.c: Don't include it.
8132 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8133             based on an idea from Joe Buck <jbuck@synopsys.com>
8135         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
8136         New nonterminals.
8137         (data_def, component_decl): Add reductions to bad_decl.
8139 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
8141         * method.c (do_build_assign_ref): Don't use build_modify_expr for
8142         anonymous aggregates, since they don't have assignment operator
8143         method.
8144         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
8145         assignment operators for anonymous structure fields.
8147 2001-03-21  Jason Merrill  <jason@redhat.com>
8149         * pt.c (instantiate_decl): Abort if we see a member constant
8150         instantiation that doesn't already have its initializer.
8151         Downgrade explicit instantiation without definition to pedwarn.
8153         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
8154         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
8155         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
8157         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
8158         (pending_vtables): Remove.
8159         * decl2.c (pending_vtables): Remove.
8160         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
8161         CLASSTYPE_VTABLE_NEEDS_WRITING.
8162         (import_export_class): Likewise.
8163         (init_decl2): Don't mark pending_vtables.
8164         * lex.c (handle_pragma_vtable): Just sorry.
8165         * pt.c (instantiate_class_template): Don't mess with
8166         CLASSTYPE_VTABLE_NEEDS_WRITING.
8167         (mark_class_instantiated): Likewise.
8168         * ptree.c (print_lang_type): Don't print it.
8169         * semantics.c (begin_class_definition): Don't set it.
8171         * pt.c (template_tail): Replace with last_pending_template.
8172         (maybe_templates, maybe_template_tail): Remove.
8173         (add_pending_template): Adjust.
8174         (instantiate_pending_templates): Adjust.
8176         * cp-tree.h (struct saved_scope): Remove lang_stack field.
8177         (current_lang_stack): Remove.
8178         * decl.c (maybe_push_to_top_level): Don't initialize it.
8179         (duplicate_decls): Use current_lang_depth.
8180         (xref_basetypes): Likewise.
8181         * class.c (current_lang_depth): New fn.
8182         (push_lang_context): Use more varray functionality.
8183         (pop_lang_context): Likewise.
8185         * error.c (GLOBAL_THING): Always use '__'.
8187 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
8189         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
8191         * mangle.c (mangle_decl_string): Mangle the names of overloaded
8192         operators, even when they have `extern "C"' linkage.
8194 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
8196         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
8197         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8198         where it's not necessary.
8199         (add_method): Remove optimization involving comparison of
8200         DECL_ASSEMBLER_NAME.
8201         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
8202         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8203         where it's not necessary.
8204         (check_methods): Likewise.
8205         (build_clone): Likewise.
8206         (built_vtt): Likewise.
8207         * cp-tree.h (DECL_NEEDED_P): Likewise.
8208         * decl.c (pushtag): Likewise.
8209         (duplicate_decls): Likewise.
8210         (pushdecl): Likewise.
8211         (builtin_function): Likewise.
8212         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
8213         (build_cp_library_fn): Likewise.
8214         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
8215         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8216         where it's not necessary.
8217         (make_rtl_for_nonlocal_decl): Likewise.
8218         (cp_finish_decl): Likewise.
8219         (grokfndecl): Likewise.
8220         (grokvardecl): Likewise.
8221         (grokdeclarator): Likewise.
8222         (start_function): Likewise.
8223         (cp_missing_return_ok_p): Likewise.
8224         * decl2.c (grokclassfn): Likewise.
8225         (check_classfn): Likewise.
8226         (finish_static_data_member_decl): Likewise.
8227         (grokfield): Likewise.
8228         * error.c (GLOBAL_IORD_P): Remove.
8229         (dump_global_iord): Improve output.
8230         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
8231         * except.c (nothrow_libfn_p): Summarily reject any function not in
8232         namespace-scope.
8233         * init.c (build_java_class_ref): Don't explicitly set
8234         DECL_ASSEMBLER_NAME after calling mangle_decl.
8235         * mangle.c (mangle_decl_string): Handle extern "C" functions.
8236         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
8237         * method.c (set_mangled_name_for_decl): Don't explicitly set
8238         DECL_ASSEMBLER_NAME after calling mangle_decl.
8239         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
8240         IDENTIFIER_GLOBAL_VALUE for the thunk.
8241         * pt.c (set_mangled_name_for_template_decl): Remove.
8242         (check_explicit_specialization): Don't use it.
8243         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
8244         (tsubst_friend_function): Likewise.
8245         (tsubst_decl): Likewise.
8246         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
8247         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
8248         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8249         where it's not necessary.
8250         (tinfo_base_init): Likewise.
8251         (create_real_tinfo_var): Likewise.
8252         * search.c (looup_field_1): Likewise.
8253         * semantics.c (finish_named_return_value): Likewise.
8254         * tree.c (init_tree): Set lang_set_decl_assembler_name.
8256 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8258         Correct semantics restrictions checking in throw-expression.
8259         * except.c (is_admissible_throw_operand): New function.
8260         (build_throw): Use it.
8262 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8264         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
8265         and its ilk.
8267 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8269         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8270         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
8271         * decl.c (duplicate_decls): Likewise.
8272         (builtin_function): Likewise.
8273         (build_library_fn): Likewise.
8274         (build_cp_library_fn): Likewise.
8275         (check_initializer): Likewise.
8276         (cp_finish_decl): Likewise.
8277         * decl2.c (grokfield): Likewise.
8278         (grok_function_init): Remove #if 0'd code.
8279         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8280         * friend.c (do_friend): Likewise.
8281         * init.c (get_temp_regvar): Likewise.
8282         * method.c (make_thunk): Likewise.
8283         * pt.c (tsubst_friend_function): Likewise.
8284         (tsubst_decl): Likewise.
8285         (regenerate_decl_from_template): Likewise.
8286         * semantics.c (genrtl_named_return_value): Likewise.
8287         (expand_body): Likewise.
8288         (genrtl_finish_function): Likewise.
8289         * tree.c (cp_tree_equal): Likewise.
8291 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
8293         * call.c (convert_like_real): Add extra semantics to INNER
8294         parameter. Don't convert to temporary if a user conversion
8295         gives us an lvalue that we're about to bind to a reference.
8296         Set INNER to indicate pending reference binding on recursive
8297         calls.
8299 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8301         * cp/lex.c: Delete duplicate pending_lang_change.
8303 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8305         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
8306         Similarly.
8307         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
8308         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
8310 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
8312         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
8314 2001-03-08  Stan Shebs  <shebs@apple.com>
8316         * cp-tree.h (set_identifier_local_value): Remove unused decl.
8318 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
8320         * spew.c: Remove references to CPP_OSTRING.
8322 2001-03-06  Andrew Haley  <aph@redhat.com>
8324         * typeck.c (convert_arguments): Check that we have an fndecl.
8326 2001-03-05  Andrew Haley  <aph@redhat.com>
8328         * typeck.c (convert_arguments): Don't do ellipsis conversion for
8329         __built_in_constant_p.
8331 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8333         * typeck.c (build_static_cast): Allow enum to enum conversions
8334         as per DR 128.
8336 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8338         * class.c (check_field_decls): Pointers to member do not a
8339         non-pod struct make, as per DR 148.
8341 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8343         * call.c (joust): cp_pedwarn when using gnu extension concerning
8344         worst conversion sequences.
8346 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8348         * decl.c: Replace all uses of 'boolean' with 'bool'.
8350 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8352         * lang-specs.h: Add zero initializer for cpp_spec field to
8353         all array elements that need one.  Don't put an #ifdef inside
8354         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
8355         use it.
8357 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8359         Implement using decls inside template functions.
8360         * decl2.c (validate_nonmember_using_decl): Don't special case
8361         fake_std_node in the global namespace. Don't reject early when
8362         processing a template.
8363         (do_local_using_decl): Add to statement tree. Don't do further
8364         processing when building a template.
8365         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
8367 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8369         * decl2.c (do_nonmember_using_decl): Don't complain if we find
8370         same function. Do complain about ambiguating extern "C"
8371         declarations.
8373 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
8375         Remove floating point and complex type template constant parms.
8376         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
8377         COMPLEX_TYPE extensions.
8378         (invalid_nontype_parm_type_p): Likewise.
8380 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
8382         * except.c (call_eh_info): Revert "match_function"'s type.
8384 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
8386         Fix ctor vtable vcall offsets.
8387         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
8388         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
8389         (get_matching_base): Remove.
8390         (get_original_base): New function.
8391         (build_vtbl_initializer): Initialize vid.rtti_binfo.
8392         Use a virtual thunk for a ctor vtable with an index
8393         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
8394         primary base within a constructor vtable. Only set
8395         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
8396         when primary base has been lost.
8397         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
8399 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
8401         * call.c (joust): Ensure more_specialized()'s argument length
8402         parameter has correct value for constructors.
8404 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
8406         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
8408         * decl.c (mark_inlined_fns): Prototype.
8410 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8412         * spew.c (yylex): Correct handling of friends.
8414 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8416         * mangle.c (write_encoding): Pass write_function_type the
8417         FUNCTION_DECL for the function being encoded.
8418         (write_function_type): Pass it along to write_bare_function_type.
8419         (write_bare_function_type): Pass it along to write_method_parms.
8420         (write_method_parms): Don't mangle the compiler-generated
8421         parameters to a constructor or destructor.
8423 2001-02-22  Andreas Jaeger  <aj@suse.de>
8425         * optimize.c: Include toplev.h for
8426         note_deferral_of_defined_inline_function prototype.
8428 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
8430         * cp-tree.h (struct lang_decl_inlined_fns): New.
8431         (struct lang_decls): Add inlined_fns.
8432         (DECL_INLINED_FNS): New macro.
8433         * optimize.c (struct inline_data): Add inlined_fns.
8434         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
8435         (inlinable_function_p): Likewise, fix typo in comment,
8436         function is not inlinable if it already inlined function currently
8437         being optimized.
8438         (expand_call_inline): Add fn to inlined_fns if necessary.
8439         (optimize_function): Initialize inlined_fns.
8440         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
8441         * decl.c (mark_inlined_fns): New function.
8442         (lang_mark_tree): Call it.
8444 2001-02-21  Jason Merrill  <jason@redhat.com>
8446         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
8447         (DECL_UNINLINABLE): Move to middle-end.
8449         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
8450         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
8451         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
8452         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
8453         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
8455         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
8456         second parm of op=.
8458 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
8460         * decl2.c (set_decl_namespace): Allow explicit instantiations in
8461         any namespace.
8463 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8465         * optimize.c (expand_call_inline): Don't walk subtrees of type
8466         nodes.
8468 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
8470         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
8471         for a destructor.
8473 2001-02-18  Jason Merrill  <jason@redhat.com>
8475         Do put the VTT parameter in DECL_ARGUMENTS.
8476         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
8477         (current_vtt_parm): New macro.
8478         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
8479         (DECL_HAS_VTT_PARM_P): New macro.
8480         (DECL_VTT_PARM): Remove.
8481         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
8482         * decl.c (duplicate_decls): Only copy the operator code if
8483         appropriate.
8484         (start_function): Set current_vtt_parm.
8485         (lang_mark_tree): Don't mark vtt_parm.
8486         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
8487         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
8488         * class.c (build_clone): Maybe remove the VTT parm.
8489         * optimize.c (maybe_clone_body): Set up the VTT parm.
8490         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
8491         * call.c (build_over_call): Just allow the VTT arg.
8492         * method.c (make_thunk): Don't set DECL_VTT_PARM.
8493         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
8494         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
8495         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
8496         * error.c (dump_function_decl): Likewise.
8497         * call.c (build_user_type_conversion_1, convert_like_real): Abort
8498         if we try to call a constructor with in-charge or VTT parms.
8499         * method.c (skip_artificial_parms_for): New fn.
8500         * call.c (add_function_candidate, build_over_call): Call it.
8501         * call.c (build_new_method_call): Use current_vtt_parm.
8502         * init.c (expand_virtual_init): Likewise.
8503         * class.c (same_signature_p): No longer static.
8504         * cp-tree.h: Declare it.
8505         * search.c (look_for_overrides_r): Use it.
8507 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8509         * cp-tree.h (new_abi_rtti_p): Remove.
8510         (name_mangling_version): Likewise.
8511         (flag_do_squangling): Likewise.
8512         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
8513         * decl.c (grokfndecl): Likewise.
8514         * decl2.c (name_mangling_version): Remove.
8515         (flag_do_squangling): Likewise.
8516         (lang_f_options): Remove `squangle'.
8517         (unsupported_options): Add `squangle'.
8518         (cxx_decode_option): Issue a warning about uses of
8519         -fname-mangling-version.
8520         (finish_file): Remove old ABI support.
8521         * pt.c (check_explicit_specialization): Likewise.
8522         (tsubst_decl): Likewise.
8523         * rtti.c (init_rtti_processing): Likewise.
8524         (build_headof): Likewise.
8525         (get_tinfo_decl_dynamic): Likewise.
8526         (tinfo_from_decl): Likewise.
8527         (build_dynamic_cast_1): Likewise.
8528         (synthesize_tinfo_var): Likewise.
8529         * init.c (build_new): Allow enumeration types for the array-bounds
8530         in a direct-new-declarator.
8532         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
8534         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
8535         TREE_PROTECTED from the template being specialized.
8537 2001-02-17  Jason Merrill  <jason@redhat.com>
8539         * decl2.c (build_artificial_parm): Set TREE_READONLY.
8541         * decl.c (bad_specifiers): Allow throw specs on things with
8542         pointer-to-function or -member-function type.
8543         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
8544         a pmf.
8546 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8548         * call.c (check_dtor_name): Handle template names correctly.
8550 2001-02-16  Jason Merrill  <jason@redhat.com>
8552         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
8553         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
8554         * optimize.c (maybe_clone_body): Don't substitute it.
8555         * call.c (build_new_method_call): Check in_chrg instead.
8556         * init.c (expand_virtual_init): Likewise.
8558 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
8560         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
8561         class-type introduces at least a type-name.
8563 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
8565         * call.c (convert_like_real): Create a temporary for non-lvalue.
8567 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
8569         * cp-tree.h: Fix typos in comments.
8571 2001-02-16  Jason Merrill  <jason@redhat.com>
8573         * optimize.c (remap_block): If we're compiling a clone, pass the
8574         new block to insert_block.
8576 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
8578         * semantics.c (finish_asm_stmt): Robustify.
8580 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8582         * pt.c (push_template_decl_real): Don't remangle the name of a
8583         class template.
8585 2001-02-15  Jim Meyering  <meyering@lucent.com>
8587         * Make-lang.in (c++.install-common): Depend on installdirs.
8588         (c++.install-info): Likewise.
8589         (c++.install-man): Likewise.
8591 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8593         * typeck2.c (build_m_component_ref): Robustify.
8595 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
8597         * friend.c (do_friend): Don't take the nested [template] class
8598         into account when deciding whether to warn about the friend
8599         function not referring to a template function.
8601 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
8603         * typeck.c (build_unary_op): Clarify error message.
8605 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
8607         * parse.y (component_constructor_declarator): allow optional
8608         parentheses around constructor class name.
8610 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8612         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
8613         section.
8614         * init.c (emit_base_init): Remove incorrect comment about
8615         virtual bases.
8616         * method.c (make_thunk): Fix comment alignment.
8618 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8620         Kill remnants of this is variable.
8621         * cp-tree.h (flag_this_is_variable): Remove.
8622         * decl2.c (flag_this_is_variable): Remove.
8623         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
8624         (build_vbase_path): The path is non-static, even in a cdtor.
8625         (resolves_to_fixed_type_p): Add additional return value.
8626         * search.c (init_vbase_pointers): Adjust.
8627         * tree.c (lvalue_p_1): Adjust.
8628         * typeck.c (mark_addressable): Adjust.
8630 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8632         * pt.c (unify): Don't check cv quals of array types.
8634 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8636         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
8637         check whether we already have the type.
8639 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
8641         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
8642         * call.c (build_op_delete_call): Simplify to remove duplicate
8643         code.
8644         * class.c (clone_function_decl): Don't build the deleting variant
8645         of a non-virtual destructor.
8646         * decl.c (finish_destructor_body): Don't call delete if this is a
8647         non-virtual destructor.
8648         * init.c (build_delete): Explicitly call `operator delete' when
8649         deleting an object with a non-virtual destructor.
8651 2001-02-13  Jason Merrill  <jason@redhat.com>
8653         * lang-specs.h: Add more __EXCEPTIONS.
8655 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8657         * typeck2.c (process_init_constructor): Check
8658         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
8660 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8662         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
8663         Remove spurious information in comment. Allow further
8664         adjustments of REFERENCE_TYPE args.
8666 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8668         * errfn.c (cp_deprecated): Tweak diagnostic text.
8669         * parse.y (new_initializer): Deprecate initializer lists
8670         extension.
8672 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
8674         Remove old ABI support.
8676 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
8678         * decl2.c (flag_vtable_thunks): Always set it to 1.
8679         (flag_new_abi): Likewise.
8680         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
8682         * Makefile.in (g++spec.o): Fix typo.
8684 2001-02-09  Jason Merrill  <jason@redhat.com>
8686         * lang-specs.h: Restore definition of __EXCEPTIONS.
8688 2001-02-08  Jason Merrill  <jason@redhat.com>
8690         * search.c (shared_member_p): New function.
8691         (lookup_field_r): Use it.
8692         * cp-tree.h (SHARED_MEMBER_P): Remove.
8694         * method.c (process_overload_item): Handle template-dependent array
8695         bounds.
8696         * pt.c (type_unification_real): If we end up with undeduced nontype
8697         parms, try again.
8699         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
8700         types.
8702         * typeck2.c (friendly_abort): Don't say anything if we have
8703         earlier errors or sorries.
8705         * decl.c (check_tag_decl): Notice attempts to redefine bool and
8706         wchar_t.  Ignore if in_system_header.
8708         * decl.c (maybe_push_cleanup_level): New fn...
8709         (start_decl_1): ...split out from here.
8710         * cvt.c (build_up_reference): Use it.
8711         * cp-tree.h: Declare it.
8713 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
8715         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
8716         spec.
8718 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
8720         * pt.c (lookup_template_class): Make sure it's a primary
8721         template or template_template_parm when called from the parser.
8722         (instantiate_template_class): Add assertion.
8724 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
8726         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
8727         from error_mark_node.
8729 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
8731         Fix specification and implementation bugs in V3 ABI
8732         construction vtables.
8733         * cp-tree.h (flag_dump_class_layout): New flag.
8734         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
8735         (BINFO_LOST_PRIMARY_P): New flag.
8736         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
8737         (BINFO_PRIMARY_MARKED_P): Rename to ...
8738         (BINFO_PRIMARY_P): ... here.
8739         (binfo_via_virtual): New prototype.
8740         * decl2.c (flag_dump_class_layout): New flag.
8741         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
8742         use `=' as a file name separator.
8743         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
8744         bases.
8745         (build_vtbl_address): If this is a virtual primary base, then
8746         get the vtbl of what it is ultimately primary for.
8747         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
8748         for BINFO_PRIMARY_P.
8749         (dfs_skip_nonprimary_vbases_markedp): Likewise.
8750         (get_shared_vbase_if_not_primary): Likewise.
8751         (dfs_get_pure_virtuals): Likewise.
8752         (expand_upcast_fixups): Likewise.
8753         (fixup_virtual_upcast_offsets): Likewise.
8754         (dfs_find_vbase_instance): Likewise.
8755         (find_vbase_instance): Likewise.
8756         (binfo_from_vbase): Adjust comment to reflect reality.
8757         (binfo_via_virtual): New function.
8758         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
8759         for binfo walking during VTT construction.
8760         (dfs_mark_primary_bases): Remove.
8761         (force_canonical_binfo_r): New function.
8762         (force_canonical_binfo): New function.
8763         (mark_primary_virtual_base): New function.
8764         (mark_primary_bases): Walk in inheritance graph order, use
8765         mark_primary_virtual_base.
8766         (determine_primary_base): Use some more intermediate variables.
8767         (dfs_find_final_overrider): Don't check for overriding along a
8768         virtual path.
8769         (dfs_modify_vtables): Walk into primary virtual bases too.
8770         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
8771         (build_base_fields): Likewise.
8772         (dfs_set_offset_for_unshared_vbases): Likewise.
8773         (layout_virtual_bases): Likewise.
8774         (end_of_class): Likewise.
8775         (finish_struct_1): Call dump_class_hierarchy, if requested.
8776         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
8777         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
8778         (dump_class_hierarchy): Add file parameter. Append to file, if
8779         required.
8780         (finish_vtbls): Adjust accumulate_vtbl_inits call.
8781         Use canonical base for virtual bases.
8782         (build_vtt): Add more comments. Adjust build_vtt_inits call.
8783         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
8784         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
8785         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
8786         virtual VTTs.
8787         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
8788         from DATA.  We want virtual primary bases and all bases via virtual.
8789         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
8790         virtual base when not a construction vtable.
8791         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
8792         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
8793         Use canonical bases when processing virtual bases.
8794         (accumulate_vtbl_inits): We're interested in any base via a
8795         virtual path.
8796         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
8797         within a construction vtable, determine what is being overridden.
8798         (build_vtbl_initializer): Add more comments
8799         (add_vcall_offset_vtbl_entries_1): Adjust comment.
8800         (build_rtti_vtbl_entries): Check if the base has lost its
8801         primary.
8803 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
8805         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
8807 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8809         * decl.c (pushdecl): Call abort instead of fatal.
8810         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
8811         * init.c (build_new_1): Likewise.
8812         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
8813         * decl.c (build_typename_type): hash_table_init now returns void.
8814         decl.c (init_decl_processing): Make an error non-fatal.
8816 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
8818         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
8819         Document.
8820         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8821         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8822         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8823         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8824         * decl.c (maybe_commonize_var): Use the new name-mangling where
8825         appropriate.
8826         * decl2.c (comdat_linkage): Enhance comments.  Make all
8827         compiler-generated things static, if COMDAT is not available.
8828         (get_tinfo_decl): Do not make typeinfo objects that belong in the
8829         library COMDAT.
8830         (tinfo_base_init): Use the correct mangled name for typeinfo
8831         strings, and push them into the global scope.
8832         (typeinfo_in_lib_p): New function.
8833         (synthesize_tinfo_var): Use it.
8834         (create_real_tinfo_var): Likewise.
8836 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
8838         * decl.c (push_class_binding): Use context_for_name_lookup instead
8839         of CP_DECL_CONTEXT.
8840         * search.c (context_for_name_lookup): Remove static.  Check for NULL
8841         context in the loop.
8842         * cp-tree.h (context_for_name_lookup): Add prototype.
8844 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
8846         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
8847         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
8848         Remove.
8849         * call.c (convert_class_to_reference, build_user_type_conversion_1,
8850         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
8852 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
8854         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
8855         of macros used when compiling g++spec.c.
8856         * g++spec.c (lang_specific_driver): Link with the shared
8857         libgcc by default.
8859 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8861         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
8862         make_reference_declarator, make_call_declarator), method.c
8863         (implicitly_declare_fn), parse.y (namespace_using_decl,
8864         notype_unqualified_id, expr_or_declarator, new_type_id,
8865         after_type_declarator, direct_after_type_declarator,
8866         notype_declarator, complex_notype_declarator,
8867         complex_direct_notype_declarator, qualified_id,
8868         notype_qualified_id, overqualified_id, direct_new_declarator,
8869         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
8870         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
8871         instead of build_parse_node.
8873 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8875         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
8876         (minus_one_node): Moved to top level gcc directory.  Renamed
8877         to integer_minus_one_node.
8879         * init.c (init_init_processing): Don't set minus_one_node.
8880         (build_vec_init): Use integer_minus_one_node.
8882         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8884 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
8886         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
8887         identical and they would be replaced with constant, remove
8888         MODIFY_EXPR from the tree.
8890 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8892         * Make-lang.in: Remove all dependencies on defaults.h.
8893         * call.c: Don't include defaults.h.
8894         * decl.c: Likewise.
8895         * decl2.c: Likewise.
8896         * except.c: Likewise.
8897         * pt.c: Likewise.
8898         * rtti.c: Likewise.
8899         * tree.c: Likewise.
8900         * typeck.c: Likewise.
8902 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
8904         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
8905         operators even in "C" linkage.
8906         * method.c (set_mangled_name_for_decl): Likewise.
8907         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
8908         overloaded operators in "C" linkage.
8910 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8912         * pt.c (tsubst_decl): Remove IN_DECL parameter.
8913         (tsubst_arg_types): Check parameter is not void.
8914         (tsubst): Adjust tsubst_decl call.
8916 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8918         * call.c (add_builtin_candidate): Quote std properly, from
8919         previous change.
8921 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8923         * pt.c (check_explicit_specialization): Clone constructors and
8924         destructors.
8926 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8928         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
8929         indicates anything special about template depth. Make sure we
8930         only count the user visible template classes.
8932 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
8934         * call.c (build_conv): Typo in comment.
8935         (add_builtin_candidate): Add more explanation.
8936         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
8937         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
8938         when we have enumeral types.
8939         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
8940         candidates for relops and eqops.
8941         (joust): Simplify control flow. Allow a non-template user
8942         function to hide a builtin.
8944 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
8946         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
8947         (more_specialized): Add deduction parameter.
8948         * call.c (joust): Adjust more_specialized call.
8949         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
8950         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
8951         (get_bindings_order): Remove.
8952         (get_bindings_real): Add DEDUCE parameter.
8953         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
8954         REFERENCE_TYPE jig for DEDUCE_ORDER.
8955         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
8956         maybe_adjust_types_for_deduction.
8957         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
8958         directly.
8959         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
8960         (check_cv_quals_for_unify): Use new unify qualifier flags.
8961         (unify): Clear new unify qualifier flags.
8962         (get_bindings_real): Add DEDUCE parameter.
8963         (get_bindings): Adjust call to get_bindings_real.
8964         (get_bindings_overload): Likewise.
8965         (most_specialized_instantiation): Adjust call to
8966         more_specialized.
8968 2001-01-19  Jason Merrill  <jason@redhat.com>
8970         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
8972         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
8973         -fnew-abi.
8975 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
8977         * decl2.c (arg_assoc_class): Fix double iteration logic.
8979 2001-01-19  Jason Merrill  <jason@redhat.com>
8981         * init.c (build_delete): Always call convert_force to strip cv-quals.
8983         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
8984         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
8985         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
8987 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8989         * search.c (get_vbase_1): Count only virtual bases.
8991 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8993         * class.c (duplicate_tag_error): Robustify flag clearing.
8995 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
8997         * cp-tree.h (lookup_template_class): Add complain parm.
8998         * decl.c (lookup_namespace_name): Adjust call to
8999         lookup_template_class.
9000         (make_typename_type): Likewise.
9001         * semantics.c (finish_template_type): Likewise.
9002         * pt.c (lookup_template_class): Add complain parm. Adjust.
9003         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
9004         (tsubst): Likewise.
9006 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9008         * pt.c (copy_default_args_to_explicit_spec): Preserve
9009         object's CV quals. Reorganize.
9011 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9013         * typeck.c (build_modify_expr): Say `initialization' for
9014         INIT_EXPRs.
9015         * init.c (build_default_init): Convert to enumeral type, if
9016         needed.
9018 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
9020         * parse.y (nomods_initdcl0): Properly set things up for
9021         initdcl0_innards.
9023 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9025         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
9026         (type_unification_real): Set it.
9027         (unify): Use it.
9029 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9031         * decl.c (finish_destructor_body): Convert to vbase pointer here.
9033 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9035         * semantics.c (begin_class_definition): Check we're not inside a
9036         template parm list.
9038 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9040         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
9041         BASELINK_P.
9043 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9045         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
9046         * call.c (build_over_call): Add comment.
9048 2001-01-16 Daniel Berlin <dberlin@redhat.com>
9050         * cvt.c (ocp_convert): Handle vector type conversion
9051         * typeck2.c (digest_init): Handle vector type initializations
9053 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
9055         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
9056           was given.
9058 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9060         * pt.c (check_nontype_parm): Rename to ...
9061         (invalid_nontype_parm_type_p): ... here.
9062         (process_template_parm): Adjust.
9063         (convert_template_argument): Adjust.
9065 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9067         * pt.c (check_nontype_parm): New function.
9068         (process_template_parm): Use it.
9069         (convert_template_argument): Use it.
9070         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
9071         member.
9073 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
9075         * tree.c: Add defaults.h
9076         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
9077         * Make-lang.in (cp/tree.o): Add defaults.h.
9079 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9081         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
9083 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9085         * g++.1: Change to be ".so man1/gcc.1".
9087 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9089         * Make-lang.in (c++.info, c++.install-info): Build and install g++
9090         internals info.
9091         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
9092         ($(srcdir)/cp/g++int.info): New target.
9093         * gxxint.texi: Add info directory entry.  Use @@ in email address.
9094         * .cvsignore: Update.
9096 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9098         * typeck.c (build_c_cast): Do template processing earlier.
9099         Always pedwarn on array casts.
9101 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9103         * friend.c (make_friend_class): Make sure a templated class is
9104         actually a template.
9106 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9108         * decl2.c (get_guard): Set linkage from guarded decl.
9110 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9112         * call.c (convert_default_arg): Check for unprocessed
9113         DEFAULT_ARG.
9114         * cp-tree.h (replace_defarg): Move to spew.c.
9115         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
9116         spew.c, which is where they really are.
9117         (done_pending_defargs): Declare.
9118         (unprocessed_defarg_fn): Declare.
9119         * decl.c (replace_defarg): Move to spew.c
9120         * parse.y (structsp): Call done_pending_defargs.
9121         * spew.c (defarg_fns): Rearrange list structure.
9122         (defarg_fnsdone): New static variable.
9123         (defarg_depfns): New static variable.
9124         (init_spew): Adjust.
9125         (add_defarg_fn): Store the type in TREE_TYPE.
9126         (do_pending_defargs): Detect and deal with ordering constraints
9127         and circularity.
9128         (done_pending_defargs): New function.
9129         (unprocessed_defarg_fn): New function.
9130         (replace_defarg): Moved from decl.c. Robustify. Don't save
9131         if circularity detected.
9133 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9135         * pt.c (unify): Check array has a domain, before checking
9136         whether it is variable sized.
9138 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9140         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
9141         parameters with pointers to arrays of unknown bound.
9143 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9145         * parse.y (template_parm_header, template_spec_header): New
9146         reductions. Split out from ...
9147         (template_header): ... here. Use them.
9148         (template_template_parm): Use template_parm_header.
9149         * semantics.c (finish_template_template_parm): Add assert.
9151 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9153         * mangle.c (write_builtin_type): Fix thinko.
9155         * pt.c (copy_default_args_to_explicit_spec_1): New function.
9156         (copy_default_args_to_explicit_spec): Likewise.
9157         (check_explicit_specialization): Use it.
9159         * class.c (finish_struct_1):  Remove last argument in call to
9160         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
9161         * decl.c (builtin_function): Likewise.
9162         (build_cp_library_fn): Likewise.
9163         (check_initializer): Likewise.
9164         (make_rtl_for_nonlocal_decl): Likewise.
9165         (cp_finish_decl): Likewise.
9166         (start_function): Likewise.
9167         * decl2.c (finish_anon_union): Likewise.
9168         * friend.c (do_friend): Likewise.
9169         * init.c (build_java_class_ref): Likewise.
9170         * method.c (make_thunk): Likewise.
9171         * pt.c (tsubst_friend_function): Likewise.
9172         * semantics.c (expand_body): Likewise.
9174 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9176         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
9177         looking at DECL_CLONED_FUNCTION for non-functions.
9179 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9181         * error.c (dump_template_parameter): Use parm to determine how
9182         to print default value.
9184 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9186         * class.c (duplicate_tag_error): Clear more flags.
9188 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9190         * call.c (build_new_method_call): Use binfo_for_vbase.
9192 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
9194         * cp-tree.h (flag_cond_mismatch): Don't declare.
9195         * decl2.c (flag_cond_mismatch): Don't define.
9196         (lang_f_options): Remove cond-mismatch.
9197         (unsupported_options): Add cond-mismatch.
9199 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
9201         * class.c (handle_using_decl): Reject using of constructor name
9202         of sourcing class. Allow injecting of a method with same name as
9203         nested class. Fixup error messages.
9205 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
9207         * decl2.c (lang_decode_option): Handle -Wformat=2.
9209 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9211         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
9212         initialized_in_class.
9213         (DECL_DEFINED_IN_CLASS_P): Rename to ...
9214         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
9215         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
9216         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
9217         * pt.c (check_default_tmpl_args): Adjust for
9218         DECL_INITIALIZED_IN_CLASS_P.
9219         (instantiate_class_template): Likewise.
9220         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9222         * class.c (finish_struct): Constify saved_filename.
9224 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9226         * class.c (duplicate_tag_error): Adjust diagnostic.
9227         (finish_struct): Locally set location to start of struct.
9228         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
9230 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9232         * decl.c (struct binding_level): Adjust class_shadowed comments
9233         to reflect reality.
9234         (push_class_level_binding): Adjust comments to reflect reality.
9235         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
9236         Don't set TREE_VALUE on the class_shadowed list.
9238 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9240         * decl2.c (acceptable_java_type): Allow references too.
9241         * init.c (build_java_class_ref): When using the new ABI, search
9242         `class$' and have it mangled with `mangle_decl.'
9243         * mangle.c (write_java_integer_type_codes): New function.
9244         (write_builtin_type): Detect and mangle Java integer and real
9245         types.
9247 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
9249         * decl2.c (grokfield): Don't accept `asm' specifiers for
9250         non-static data members.
9252 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9254         * expr.c (cplus_expand_expr): Don't reset `target'.
9256 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9258         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
9260 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9262         * parse.y (template_datadef): Check for error_mark_node.
9264 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9266         * cp-tree.def (DEFAULT_ARG): Make `x' class.
9268 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9270         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
9271         (record_builtin_type): Make non-static.
9272         (flag_short_double): Don't declare.
9273         (init_decl_processing): Remove the creation of many tree nodes now
9274         in c_common_nodes_and_builtins.
9275         (build_void_list_node): New function.
9276         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
9277         * cp-tree.h (flag_short_wchar): Don't declare.
9279 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
9281         * call.c (build_conv): Don't use build1 for USER_CONV.
9282         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
9284 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9286         * lex.c (lang_init): Call c_common_lang_init.
9288 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9290         * search.c (lookup_fnfields_here): Remove.
9291         (look_for_overrides_r): Use lookup_fnfields_1.
9292         Ignore functions from using declarations.
9294 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9296         Implement exceptions specifiers for implicit member functions.
9297         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
9298         * method.c (synthesize_exception_spec): New function.
9299         (locate_dtor, locate_ctor, locate_copy): New functions.
9300         (implicitly_declare_fn): Generate the exception spec too.
9301         * search.c (check_final_overrider): Check artificial functions
9302         too.
9303         * typeck2.c (merge_exception_specifiers): New function.
9305 2001-01-03  Jason Merrill  <jason@redhat.com>
9307         * init.c (build_default_init): New fn.
9308         (perform_member_init): Split out from here.
9309         (build_new_1): Use it.  Simplify initialization logic.
9310         (build_vec_init): Take an array, rather than a pointer and maxindex.
9311         Speed up simple initializations.  Don't clean up if we're assigning.
9312         * cp-tree.h: Adjust.
9313         * decl2.c (do_static_initialization): Remove TREE_VEC case.
9314         * parse.y (new_initializer): Return void_zero_node for ().
9315         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
9316         * typeck2.c (digest_init): Only complain about user-written
9317         CONSTRUCTORs.
9319 2000-12-22  Mike Stump  <mrs@wrs.com>
9321         * decl2.c: (max_tinst_depth): Increase to 50.
9323 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
9325         * class.c (invalidate_class_lookup_cache): Zero the
9326         previous_class_values.
9327         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
9328         TREE_INT_CST_HIGH.
9329         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
9330         * decl.c (free_bindings): New variable.
9331         (push_binding): Don't create a new binding if we have one on the
9332         free list.
9333         (pop_binding): Put old bindings on the free list.
9334         (init_decl_processing): Use size_int, not build_int_2.
9335         Register free_bindings as a GC root.
9336         (cp_make_fname_decl): Use size_int, not build_int_2.
9337         (push_inline_template_parms_recursive): Likewise.
9338         (end_template_parm_list): Likewise.
9339         (for_each_template_parm): Do not use walk_tree_without_duplicates.
9340         (tsubst_template_parms): Use size_int, not build_int_2.
9341         (tsubst): Likewise.
9342         * rtti.c (get_vmi_pseudo_type_info): Likewise.
9344 2001-01-02  Richard Henderson  <rth@redhat.com>
9346         * parse.y (asm): Set ASM_INPUT_P.
9348 2001-01-02  Jason Merrill  <jason@redhat.com>
9350         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
9351         for v3 ABI.
9353         * typeck.c (cp_truthvalue_conversion): New fn.
9354         * cvt.c (ocp_convert): Use it.
9356         * cp-tree.h: Lose c-common.c decls.
9358         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
9359         * cvt.c (convert_to_void): Use type_unknown_p.
9361         * typeck.c (strip_all_pointer_quals): Also strip quals from
9362         pointer-to-member types.
9364         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
9365         parse.y as C.
9367         * call.c (build_new_method_call): Do evaluate the object parameter
9368         when accessing a static member.
9369         * typeck.c (build_component_ref): Likewise.
9371 2001-01-02  Andreas Jaeger  <aj@suse.de>
9373         * decl.c (cp_missing_noreturn_ok_p): New.
9374         (init_decl_processing): Set lang_missing_noreturn_ok_p.
9376 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
9378         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
9380 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
9382         * class.c (pushclass): Remove #if 0'd code.
9383         * cp-tree.h (overload_template_name): Remove.
9384         * decl.c (store_bindings): Simplify.
9385         (pop_from_top_level): Likewise.
9386         * pt.c (overload_template_name): Remove.
9387         (instantiate_decl): Don't call push_to_top_level if it's not
9388         needed.
9390 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
9392         * pt.c (register_local_specialization): Don't return a value.
9393         (lookup_template_class): Use move-to-front heuristic when looking
9394         up template instantiations.
9395         (instantiate_decl): Only push_to_top_level when we're actually
9396         going to instantiate the template.
9398 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
9400         * search.c (binfo_for_vtable): Return least derived class, not
9401         most.  Handle secondary vtables.
9403 2000-12-22  Jason Merrill  <jason@redhat.com>
9405         * pt.c (more_specialized): Don't optimize len==0.
9406         (fn_type_unification): If we're adding the return type, increase len.
9408         * typeck.c (build_binary_op): Fix pmf comparison logic.
9410         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
9411         DECL_STATIC_FUNCTION_P.
9413         * semantics.c (genrtl_finish_function): Don't try to jump to
9414         return_label unless it exists.
9416         In partial ordering for a call, ignore parms for which we don't have
9417         a real argument.
9418         * call.c (joust): Pass len to more_specialized.
9419         (add_template_candidate_real): Strip 'this', pass len.
9420         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
9421         (get_bindings_order): New fn.  Pass len down.
9422         (get_bindings_real): Strip 'this', pass len.
9423         (fn_type_unification): Likewise.
9424         (type_unification_real): Succeed after checking 'len' args.
9425         (most_specialized_instantiation): Lose explicit_args parm.
9426         * class.c (resolve_address_of_overloaded_function): Strip 'this',
9427         pass len.
9429 2000-12-21  Jason Merrill  <jason@redhat.com>
9431         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
9432         DECL_TEMPLATE_RESULT.
9434         * search.c (lookup_field_r): Call lookup_fnfields_1, not
9435         lookup_fnfields_here.
9437         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
9439         * call.c (build_object_call): Also allow conversions that return
9440         reference to pointer to function.
9441         (add_conv_candidate): Handle totype being ref to ptr to fn.
9442         (build_field_call): Also allow members of type reference to function.
9443         Lose support for calling pointer to METHOD_TYPE fields.
9445         * error.c (dump_expr): Handle *_CAST_EXPR.
9447         * typeck2.c (build_scoped_ref): Always convert to the naming class.
9449         * tree.c (break_out_cleanups): Lose.
9450         * cp-tree.h: Remove prototype.
9451         * typeck.c (build_component_ref): Don't break_out_cleanups.
9452         (build_compound_expr): Likewise.
9453         * semantics.c (finish_expr_stmt): Likewise.
9455 2000-12-20  Richard Henderson  <rth@redhat.com>
9457         * cp-tree.h: Update declarations.
9458         * decl.c (finish_case_label): Return the new stmt node.
9459         * semantics.c (finish_goto_stmt): Likewise.
9460         (finish_expr_stmt, finish_return_stmt): Likewise.
9461         (finish_break_stmt, finish_continue_stmt): Likewise.
9462         (finish_asm_stmt): Likewise.
9463         * parse.y (already_scoped_stmt): Set STMT_LINENO.
9464         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
9465         (simple_if, simple_stmt): Return the new stmt node.
9466         (save_lineno): New.
9468 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
9470         * cp-tree.h: Don't declare warn_long_long.
9472 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9474         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
9475         IS_AGGR_TYPE.
9477 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9479         * pt.c (unify): Handle when both ARG and PARM are
9480         BOUND_TEMPLATE_TEMPLATE_PARM.
9482 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9484         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
9485         DECL_TEMPLATE_PARM_P.
9487 2000-12-15  Jason Merrill  <jason@redhat.com>
9489         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
9491         * init.c (build_new_1): Don't strip quals from type.
9493         * decl.c (pushdecl): Don't check for linkage on a non-decl.
9495         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
9497         * call.c (build_new_function_call): Lose space before paren in
9498         error message.
9499         (build_new_method_call): Likewise.
9501         * typeck2.c (build_m_component_ref): Propagate quals from datum.
9503 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9505         * pt.c (check_explicit_specialization): Propagate default
9506         function arguments to explicit specializations.
9508 2000-12-13  DJ Delorie  <dj@redhat.com>
9510         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
9511         and <? operators.
9513 2000-12-08  Jason Merrill  <jason@redhat.com>
9515         * error.c (dump_function_name): Don't let the user see __comp_ctor.
9517         Clean up copy-initialization in overloading code.
9518         * call.c (build_user_type_conversion_1): Die if we are asked to
9519         convert to the same or a base type.
9520         (implicit_conversion): Avoid doing so.  Lose reference binding code.
9521         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
9522         direct-initialization.  Also do direct-init part of copy-init.
9523         (build_user_type_conversion): Don't provide context to convert_like.
9524         * cvt.c (ocp_convert): build_user_type_conversion will now provide
9525         the constructor call for copy-init.
9527         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
9528         instantiation of a member template.
9529         (do_decl_instantiation): Not here.
9531 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9533         * class.c (check_field_decls): Don't special case anonymous
9534         fields in error messages.
9535         (note_name_declared_in_class): Use %D on diagnostic.
9537         * tree.c (pod_type_p): Use strip_array_types.
9538         (cp_valid_lang_attribute): Likewise.
9539         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
9540         multiple evaluations.
9541         (cp_has_mutable_p): Use strip_array_types.
9543 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9545         * cp-tree.h (sufficient_parms_p): Declare new function.
9546         * call.c (sufficient_parms_p): New function, broken out of ...
9547         (add_function_candidate): ... here. Use it.
9548         (add_conv_candidate): Use it.
9549         * decl.c (grok_ctor_properties): Use it.
9551 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
9553         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
9555 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9557         * decl2.c (lang_decode_option): Handle -Wformat-security.
9559 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9561         * pt.c (verify_class_unification): New function.
9562         (get_class_bindings): Use it.
9563         (try_class_unification): Tidy.
9564         (unify): Handle when argument of a template-id is not
9565         template parameter dependent.
9566         (template_args_equal): Handle when TREE_CODE's do not match.
9568 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
9570         * lang-specs.h (c++): When invoking the stand-alone preprocessor
9571         for -save-temps, pass all relevant -Defines to it, and then don't
9572         pass them to cc1plus.
9574 2000-12-05  Will Cohen  <wcohen@redhat.com>
9576         * decl.c (finish_case_label): Cleared
9577         more_cleanups_ok in surrounding function scopes.
9578         (define_label): Likewise.
9580 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9582         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
9583         (get_matching_virtual): Remove.
9584         (look_for_overrides): Declare new function.
9585         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
9586         DECL_VINDEX here.
9587         * class.c (check_for_override): Move base class iteration code
9588         to look_for_overrides.
9589         * search.c (next_baselink): Remove.
9590         (get_virtuals_named_this): Remove.
9591         (get_virtual_destructor): Remove.
9592         (tree_has_any_destructors_p): Remove.
9593         (struct gvnt_info): Remove.
9594         (check_final_overrider): Remove `virtual' from error messages.
9595         (get_matching_virtuals): Remove. Move functionality to ...
9596         (look_for_overrides): ... here, and ...
9597         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
9598         to be overriding.
9600 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9602         * typeck.c (get_delta_difference): If via a virtual base,
9603         return zero.
9604         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
9605         adjustment.
9607 2000-12-04  Richard Henderson  <rth@redhat.com>
9609         * error.c (dump_tree): Use output_add_string not OB_PUTS.
9611 2000-12-04  Jason Merrill  <jason@redhat.com>
9613         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
9614         (write_builtin_type): Pass intSI_type_node and the like through
9615         type_for_mode.
9616         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
9617         Pass intSI_type_node and the like through type_for_mode.
9618         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
9619         * pt.c (tsubst, unify): Likewise.
9620         * tree.c (walk_tree): Likewise.
9621         * error.c (dump_type): Likewise.
9622         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
9624         * Make-lang.in: Tweak top comment for emacs.
9625         (cp/TAGS): Restore.
9627         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
9629         * class.c (clone_function_decl): Robustify.
9631 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
9633         * decl.c (store_bindings): Only search in the non modified
9634         old_bindings for duplicates.
9636 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9638         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
9639         TYPE_POLYMORPHIC_P.
9641         * typeck.c (build_static_cast): Remove unused variable.
9643 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9645         * pt.c: Fix typo in comment.
9647 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9649         * decl2.c (warn_format): Remove definition.
9650         (lang_decode_option): Handle -Wformat-nonliteral,
9651         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
9653 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9655         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
9656         (init_decl_processing): Don't create string_type_node,
9657         const_string_type_node, wint_type_node, intmax_type_node,
9658         uintmax_type_node, default_function_type, ptrdiff_type_node and
9659         unsigned_ptrdiff_type_node.  Adjust position of call to
9660         c_common_nodes_and_builtins.
9661         (identifier_global_value): New function.
9663 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
9665         * call.c (standard_conversion): Reject pointer to member
9666         conversions from ambiguous, inaccessible or virtual bases.
9667         * typeck.c (build_static_cast): Don't check pointers to members
9668         specially.
9670 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9672         * method.c (do_build_copy_constructor): Preserve cv
9673         qualifications when accessing source object members.
9674         (do_build_assign_ref): Likewise. Remove separate diagnostics for
9675         unnamed fields.
9677 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9679         * method.c (do_build_assign_ref): Construct appropriately
9680         CV-qualified base reference. Don't allow const casts in base
9681         conversion.
9683 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9685         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
9686         incomplete return type.
9688 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9690         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
9691         * semantics.c (finish_base_specifier): Accept a _TYPE not a
9692         _DECL.
9694 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9696         * spew.c (yyerror): Cope if yylval.ttype is NULL.
9698 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9700         * decl.c (grokdeclarator): Diagnose undefined template contexts.
9702 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9704         * decl.c (grokdeclarator): Do type access control on friend
9705         class.
9707 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9709         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
9710         bison parser ickiness.
9711         * pt.c (tsubst_friend_function): Enter namespace scope when
9712         tsubsting the function name.
9713         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
9715 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9717         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
9718         * cvt.c (cp_convert_to_pointer): Add force parameter.
9719         Allow conversions via virtual base if forced.
9720         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
9721         (ocp_convert): Likewise.
9722         * search.c (binfo_from_vbase): Return the virtual base's binfo.
9723         * typeck.c (get_delta_difference): Adjust handling of virtual
9724         bases.
9726 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
9728         * tree.c (struct list_hash): Remove.
9729         (list_hash_table): Make it be an htab.
9730         (struct list_proxy): New type.
9731         (list_hash_eq): New function.
9732         (list_hash_pieces): Renamed from ...
9733         (list_hash): ... this.
9734         (list_hash_lookup): Remove.
9735         (list_hash_add): Remove.
9736         (hash_tree_cons): Use the generic hashtable.
9737         (mark_list_hash): Remove.
9738         (init_tree): Create the hashtable.
9740 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
9742         * method.c (build_mangled_C9x_name): Rename to
9743         build_mangled_C99_name.  Change C9X references in comments to
9744         refer to C99.
9746 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9748         * parse.y (unary_expr): Move VA_ARG from here ...
9749         (primary): ... to here.
9751 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9753         * semantics.c (finish_id_expr): If type is error_mark, return
9754         error_mark.
9756 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
9758         * pt.c (lookup_template_class): Simplify loop exit constructs.
9759         Cope when there is no partial instantiation of a template
9760         template member.
9762 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
9764         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
9766 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
9768         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
9769         prefix.
9771         * pt.c (do_decl_instantiate): Explicitly clone constructors and
9772         destructors that haven't already been cloned.
9774 2000-11-20  Richard Henderson  <rth@redhat.com>
9776         * parse.y (yyparse_1): Rename the parser entry point.
9778 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
9780         * mangle.c (write_name): Use <unscoped-name> for names directly in
9781         function scope.
9782         (write_unscoped_name): Accept names directly in function scope.
9784 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
9786         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
9787         * parse.y (extdef): Add EXPORT reduction.
9788         * spew.c (yylex): Don't skip export here.
9790 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
9792         * decl.c (init_decl_processing): Correct name of pure virtual
9793         function under the new ABI.
9794         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
9795         (throw_bad_typeid): Likewise for bad typeid function.
9797 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
9799         * decl.c (grokparms): Don't even function types of `void' type,
9800         either.
9801         * mangle.c (write_type): Don't crash when confronted with the
9802         error_mark_node.
9804         * decl.c (grokparms): Don't create parameters of `void' type.
9806 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
9808         * lex.c (mark_impl_file_chain): Delete.
9809         (init_parse): Remove call to ggc_add_string_root.  No need to
9810         ggc_strdup a string constant.  Do not add impl_file_chain to GC
9811         roots.
9812         (handle_pragma_implementation): No need to ggc_strdup main_filename.
9814 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9816         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
9818 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9820         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
9821         * decl.c (grokdeclarator): Don't reject void parms here.
9822         (require_complete_types_for_parms): Simplify, use
9823         complete_type_or_else.
9824         (grokparms): Remove bitrot. Remove funcdef parm.
9825         Deal with ellipsis parm lists here.
9826         * semantics.c (finish_parmlist): Don't append void_list_node
9827         here. Set PARMLIST_ELLIPSIS_P.
9829 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9831         * typeck2.c (incomplete_type_error): Reorganize to avoid
9832         excessive diagnostics.
9834 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
9836         * lex.c (struct impl_files, internal_filename): Constify a char *.
9838 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
9840         * mangle.c (write_special_name_constructor): Don't generate
9841         assembler junk when confronted with an old-style constructor.
9842         (write_special_name_destructor): Likewise.
9843         (mangle_decl_string): Do it here instead.
9845 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
9847         * call.c (op_error): Make error messages clearer.
9849 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
9851         * decl.c (wrapup_globals_for_namespace): Don't mark things
9852         TREE_ASM_WRITTEN when they're not.
9854 2000-11-15  Jason Merrill  <jason@redhat.com>
9856         * typeck2.c (friendly_abort): Uncount the error before handing
9857         off to fancy_abort.
9859 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9861         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
9863 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
9865         * class.c (build_vtbl_initializer): Fix typo in comment.
9866         * typeck.c (expr_sizeof): Don't crash on errors.
9868 2000-11-14  Jim Wilson  <wilson@redhat.com>
9870         * lang-specs.h: Add %2 after %(cc1_options).
9872 2000-11-14  Richard Henderson  <rth@redhat.com>
9874         * typeck.c (c_sizeof): Be strict about casting result value
9875         back to c_size_type_node.
9876         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
9878 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9880         * typeck.c (build_unary_op): Use boolean_increment from
9881         c-common.c, moving the relevant code there.
9883 2000-11-11  Jason Merrill  <jason@redhat.com>
9885         * typeck.c (mark_addressable): Don't call put_var_into_stack.
9887         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
9888         in inlines.
9890 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9892         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
9893         * lex.c (copy_lang_decl): Likewise.
9895 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
9897         * dump.c (cp_dump_tree): Don't dump function bodies here.
9899         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
9900         (dump.o): Update dependency list.
9901         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
9902         (flag_dump_translation_unit): Likewise.
9903         (CP_TYPE_QUALS): Adjust definition.
9904         (DECL_C_BIT_FIELD): Remove.
9905         (SET_DECL_C_BIT_FIELD): Likewise.
9906         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9907         (add_maybe_template): Likewise.
9908         (strip_array_types): Likewise.
9909         (dump_node_to_file): Likewise.
9910         (cp_dump_tree): New function.
9911         * decl.c (init_decl_processing): Set lang_dump_tree.
9912         * decl2.c (flag_dump_translation_unit): Remove.
9913         * dump.c: Move most of it to ../c-dump.c.
9914         (cp_dump_tree): New function.
9915         * pt.c (add_maybe_template): Remove.
9916         * typeck.c (strip_array_types): Likewise.
9918 2000-11-07  Eric Christopher  <echristo@redhat.com>
9920         * decl.c (init_decl_processing): Change definition of
9921         __wchar_t to wchar_t.  Remove artificial declaration of
9922         wchar_t.
9923         * lex.c: Change instances of __wchar_t to wchar_t.
9925 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
9927         * lex.c (do_identifier): Don't lookup_name for operators.
9928         * parse.y (operator): Save looking_for_typename.
9929         (unoperator): Restore it.
9930         * spew.c (frob_opname): Use nth_token for lookahead.
9932 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
9934         * decl.c (grok_op_properties): Always use coerce_new_type and
9935         coerce_delete_type.
9936         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
9937         exception specification. Tidy up.
9938         (coerce_delete_type): Preserve exception specification. Tidy up.
9940 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9942         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
9943         (push_binding_level), error.c (cp_tree_printer), pt.c
9944         (process_partial_specialization, tsubst_template_arg_vector),
9945         search.c (lookup_member): Use memset () instead of bzero ().
9947 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
9949         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
9951 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
9953         * Make-lang.in (c++.distdir): Remove.
9955 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
9957         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
9958         declarations from different namespaces to be combined.
9960 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
9962         * decl.c: Include tm_p.h.
9964 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9966         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
9968 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9970         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
9971         (build_overload_value), repo.c (open_repo_file), xref.c
9972         (open_xref_file): Use strchr () and strrchr () instead of index ()
9973         and rindex ().
9975 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
9977         * call.c (build_over_call): Call fold on the CALL_EXPR.
9979 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
9981         * error.c (dump_template_decl): Separate template hearders with
9982         space not comma.
9984 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
9986         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
9987         TS_* flags with corresponding TFF_*.  Adjust prototypes of
9988         functions (which used to take a tree_string_flags) to take an int.
9990         * cp-tree.h (enum tree_string_flags): Remove
9991         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
9992         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
9993         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
9994         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
9995         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
9996         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
9997         (type_as_string, decl_as_string, expr_as_string,
9998         context_as_string): Adjust prototype.
10000         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
10001         instead of TS_PLAIN.
10003         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
10004         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
10005         plain `0'.
10007 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
10009         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
10010         (linkage_kind): New enumeration.
10011         (decl_linkage): New function.
10012         * decl2.c (comdat_linkage): Extend comment.
10013         * error.c (dump_function_decl): Print the arguments used to
10014         instantiate a template, even when not printing the type of the
10015         function.
10016         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
10017         not TREE_PUBLIC, to test for external linkage.
10018         * tree.c (decl_linkage): New function.
10020 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
10022         * pt.c (instantiate_decl): Always instantiate static data members
10023         initialized in-class.
10025 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10027         * Make-lang.in: Move all build rules here from Makefile.in,
10028         adapt to new context.  Wrap all rules that change the current
10029         directory in parentheses.  Expunge all references to $(P).
10030         When one command depends on another and they're run all at
10031         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10032         all object-file generation rules.  Delete obsolete variables.
10034         * Makefile.in: Delete.
10035         * config-lang.in: Delete outputs= line.
10037 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10039         * error.c (dump_function_decl): Print no space between
10040         `ptr-operator' the `type-specifier' of the return type.
10041         (dump_type_prefix): Make sure we put space at the appropriate
10042         place.
10044 2000-10-23  Jason Merrill  <jason@redhat.com>
10046         * call.c (equal_functions): Also call decls_match for extern "C" fns.
10048 2000-10-22  Jason Merrill  <jason@redhat.com>
10050         * call.c (build_conditional_expr): Use ocp_convert to force
10051         rvalue conversion.
10053 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
10055         * call.c (standard_conversion): Use RVALUE_CONVs for all
10056         expressions that satisfy lvalue_p, not just those that satisfy
10057         real_lvalue_p.
10059         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
10061         * typeck.c (c_sizeof): Return an expression of `size_t' type,
10062         not one with TYPE_IS_SIZETYPE set.
10063         (dubious_conversion_warnings): Remove special-case code.
10065 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
10067         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
10068         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
10069         (dump_type_prefix): Print vector-of-int as 'int vector'.
10070         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
10071         * tree.c (walk_tree): Handle VECTOR_TYPE.
10073         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
10075 2000-10-21  Jason Merrill  <jason@redhat.com>
10077         * parse.y (operator): Set got_object from got_scope.
10078         Set looking_for_typename.
10079         * decl.c (lookup_name_real): Clear val after setting from_obj.
10080         Reorganize diagnostic.
10082 2000-10-20  Jason Merrill  <jason@redhat.com>
10084         * tree.c (walk_tree): Don't walk into default args.
10086         * error.c (dump_expr): Use host_integerp.
10088 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
10090         * typeck2.c (abstract_virtuals_error): Use "because" instead of
10091         "since" in error message.
10093 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10095         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
10097 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
10099         * decl.c (revert_static_member_fn): Fixed typo.
10101 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
10103         * class.c (subobject_offset_fn): New type.
10104         (dfs_record_base_offsets): Remove.
10105         (record_base_offsets): Likewise.
10106         (dfs_search_base_offsets): Likewise.
10107         (record_subobject_offset): New function.
10108         (check_subobject_offset): Likewise.
10109         (walk_subobject_offsets): Likewise.
10110         (record_subobject_offsets): Likewise.
10111         (layout_conflict_p): Reimplement.
10112         (layout_nonempty_base_or_field): Correct handling of type
10113         conflicts during layout.
10114         (layout_empty_base): Likewise.
10115         (build_base_field): Adjust to handle new representation of empty
10116         base offset table.
10117         (build_base_fields): Likewise.
10118         (layout_virtual_bases): Likewise.
10119         (splay_tree_compare_integer_csts): New function.
10120         (layout_class_type): Use a splay_tree, rather than a varray, to
10121         represent the offsets of empty bases.
10123         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
10124         * decl.c (select_decl): Don't return declarations that are
10125         DECL_ANTICIPATED.
10127 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
10129         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
10130         (fake_std_node): New macro.
10131         * decl.c (in_std): Rename to ...
10132         (in_fake_std): ... this.
10133         (flag_no_builtin): Remove.
10134         (flag_no_nonansi_builtin): Likewise.
10135         (walk_namespaces_r): Use fake_std_node.
10136         (push_namespace): Use std_identifier.
10137         (pop_namespace): Use in_fake_std.
10138         (lookup_name_real): Use fake_std_node.
10139         (init_decl_processing): When -fhonor-std, create the `std'
10140         namespace.  Don't create a dummy fake_std_node in that case.
10141         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
10142         (builtin_function): Put builtins whose names don't begin
10143         with `_' in the std namespace.
10144         * decl2.c (flag_no_builtin): Remove.
10145         (flag_no_nonansi_builtin): Likewise.
10146         (set_decl_namespace): Use fake_std_node.
10147         (validate_nonmember_using_decl): Likewise.
10148         (do_using_directive): Likewise.
10149         (handle_class_head): Likewise.
10150         * dump.c (dequeue_and_dump): Likewise.
10151         * except.c (init_exception_processing): Use std_identifier.
10152         * init.c (build_member_call): Use fake_std_node.
10153         * rtti.c (init_rtti_processing): Use std_identifier.
10155 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
10157         * cp-tree.h (back_end_hook): Remove declaration.
10158         * decl2.c (back_end_hook): Remove definition.
10160         * dump.c (dequeue_and_dump): Dump TREE_USED.
10162 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
10164         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
10166 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10168         * decl.c (WINT_TYPE): Define.
10169         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
10170         c_size_type_node, signed_size_type_node and wint_type_node.
10172 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10174         * decl2.c (warn_missing_format_attribute): New variable.
10175         (lang_decode_option): Decode -Wmissing-format-attribute.
10177 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
10179         * typeck.c (qualify_type): Remove.
10180         (composite_pointer_type): Fix handling of conversions to `cv void*'.
10182 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10184         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
10186 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10188         * Makefile.in (parse.c, parse.h): Create atomically.
10190 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
10192         * class.c (current_obstack): Remove.
10193         * decl.c (ggc_p): Remove.
10194         (start_decl): Don't use decl_tree_cons.
10195         (grokdeclarator): Don't use build_decl_list.
10196         (start_function): Don't use decl_tree_cons.
10197         (finish_function): Don't mess with obstacks.
10198         * decl2.c (grok_x_components): Don't use build_decl_list.
10199         * lex.c (make_call_declarator): Don't call decl_tree_cons.
10200         (implicitly_declare_fn): Don't call build_decl_list.
10201         * parse.y (frob_specs): Don't call build_decl_list or
10202         decl_tree_cons.
10203         (expr_or_declarator_intern): Don't call decl_tree_cons.
10204         (primary): Don't call build_decl_list.
10205         (fcast_or_absdcl): Likewise.
10206         (typed_declspecs): Don't call decl_tree_cons.
10207         (reserved_declspecs): Don't call build_decl_list.
10208         (declmods): Likewise.
10209         (reserved_typespecquals): Likewise.
10210         (aggr): Likewise.
10211         (new_type_id): Likewise.
10212         (cv_qualifiers): Likewise.
10213         (after_type_declarator_intern): Likewise.
10214         (notype_declarator_intern): Likewise.
10215         (absdcl_intern): Likewise.
10216         (named_parm): Likewise.
10217         * pt.c (most_specialized_class): Likewise.
10218         * repo.c (temporary_obstack): Make it a structure, not a pointer.
10219         (init_repo): Initialize it.
10220         * search.c (current_obstack): Remove.
10221         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
10223 2000-10-09  Richard Henderson  <rth@cygnus.com>
10225         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
10226         (c++ language support bits for libgcc): Remove.
10227         (c++.clean): Remove cplib2.txt cleanup.
10228         * config-lang.in (headers, lib2funcs): Remove.
10230         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
10231         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
10232         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
10233         * inc/new.h, inc/typeinfo: Remove files.
10235 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10237         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
10238         defined.
10239         (init_decl_processing): Initialize intmax_type_node and
10240         uintmax_type_node.
10242 2000-10-06  Richard Henderson  <rth@cygnus.com>
10244         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
10245         (original_result_rtx): Remove.
10246         * decl.c (save_function_data): Don't clear x_result_rtx.
10247         (mark_lang_function): Don't mark it either.
10248         * expr.c (fixup_result_decl): Remove.
10249         * semantics.c (genrtl_named_return_value): Frob the return decl
10250         before calling emit_local_var.
10251         (genrtl_finish_function): Don't call fixup_result_decl.
10252         Always emit the jump to return_label.
10254 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
10256         * pt.c (lookup_template_class): Set current access for enum.
10257         (tsubst_enum): Set file & line for enum decl.
10259         * spew.c (yylex): Remove unused variable.
10261 2000-10-05  Richard Henderson  <rth@cygnus.com>
10263         * semantics.c (genrtl_finish_function): Don't init or check
10264         can_reach_end; remove noreturn and return value checks.
10266 2000-10-05  Tom Tromey  <tromey@cygnus.com>
10268         * init.c (build_java_class_ref): Use `build_static_name' with a
10269         suffix, not a prefix, to build the class object's name.
10271 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10273         * cp-tree.h (access_kind): Fix comment typo.
10274         * decl2.c (grokfield): Fix diagnostic typo.
10275         * semantics.c (finish_template_type): Fix comment typo.
10276         (finish_qualified_object_call_expr): Likewise.
10278 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10280         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
10281         tsubsting fails.
10283 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10285         * spew.c (frob_id): New static function.
10286         (frob_opname): Use it.
10287         (yylex): Use it.
10289 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
10291         * decl.c (lang_mark_false_label_stack): Remove.
10292         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
10294 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
10296         * gxxint.texi: Use @email for formatting email addresses.
10298 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
10300         * error.c: Remove direct obstack manipulation.  Replace with
10301         output_buffer-based formatting.  Adjust calls to removed macros.
10302         (obstack_chunk_alloc, obstack_chunk_free): Remove.
10303         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
10304         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
10306 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
10308         * ir.texi: Move to ../c-tree.texi.
10310 2000-09-20  Jason Merrill  <jason@redhat.com>
10312         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
10314 2000-09-21  Andreas Jaeger  <aj@suse.de>
10316         * errfn.c: Move declaration of cp_printer and cp_printers to ...
10317         * cp-tree.h: ... here.
10319         * error.c: Remove declaration of cp_printer.
10321 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
10323         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
10325 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
10327         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
10328         users.
10330 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
10332         * decl.c (start_function): Robustify.
10334 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10336         * cp-tree.h (check_function_format): Accept a `status' parameter.
10338         * call.c, typeck.c: Updates calls to `check_function_format'.
10340 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
10342         * decl2.c (handle_class_head): Always push some scope even
10343         in the error case.
10345 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
10347         * cp-tree.h (struct cp_language_function): Remove
10348         x_scope_stmt_stack and name_declared.
10349         (current_scope_stmt_stack): Remove.
10350         (function_name_declared_p): New macro.
10351         (struct lang_decl_flags): Use c_lang_decl as a base class.
10352         (context): Remove.
10353         (struct lang_decl): Replace saved_tree with context.
10354         (DECL_FRIEND_CONTEXT): Adjust accordingly.
10355         (SET_DECL_FRIEND_CONTEXT): Likewise.
10356         (DECL_VIRTUAL_CONTEXT): Likewise.
10357         (DECL_SAVED_TREE): Remove.
10358         (C_DECLARED_LABEL_FLAG): Likewise.
10359         (cplus_expand_expr_stmt): Don't declare.
10360         (add_decl_stmt): Likewise.
10361         (add_scope_stmt): Likewise.
10362         * decl.c (mark_stmt_tree): Remove.
10363         (case_compare): Likewise.
10364         (finish_case_label): Use c_add_case_label.
10365         (init_decl_processing): Set more language-specific hooks.
10366         (build_enumerator): Fix typo in comment.
10367         (cplus_expand_expr_stmt): Remove.
10368         (mark_lang_function): Use mark_c_language_function.
10369         (lang_mark_tree): Use c_mark_lang_decl.
10370         * decl2.c: Change order of inclusion.
10371         * except.c: Likewise.
10372         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
10373         back on c_expand_expr.
10374         * friend.c: Include expr.h.
10375         * init.c: Change order of inclusion.
10376         * Makefile.in: Update dependencies.
10377         * lex.h (free_lang_decl_chain): Remove.
10378         * optimize.c (maybe_clone_body): Use function_name_declared_p.
10379         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
10380         it doesn't exist.
10381         (instantiate_decl): Use function_name_declared_p.
10382         * semantics.c (lang_expand_expr_stmt): Remove.
10383         (set_current_function_name_declared): Likewise.
10384         (current_function_name_declared): Likewise.
10385         (begin_compound_stmt): Use function_name_declared_p.
10386         (add_decl_stmt): Remove.
10387         (setup_vtbl_ptr): Use function_name_declared_p.
10388         (add_scope_stmt): Remove.
10389         (current_scope_stmt_stack): New function.
10390         (cp_expand_stmt): Don't handle SCOPE_STMTs.
10391         (expand_body): Use function_name_declared_p.
10392         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
10393         * typeck.c: Change order of includes.
10394         (convert_sequence): Remove.
10396 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
10398         * lex.c (reswords): Add _Complex.
10400 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10402         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
10404 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
10406         * init.c (begin_init_stmts): Don't use // comments.
10408 2000-09-12  Jason Merrill  <jason@redhat.com>
10410         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
10411         all non-extern arrays.
10413         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
10414         typenames, too.  Downgrade complaint to pedwarn.
10415         (xref_tag): Warn about surprising behavior of 'friend struct T'.
10416         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
10417         'class This::Inherited'.
10419 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
10421         * decl.c (finish_case_label): Given the LABEL_DECL a
10422         DECL_CONTEXT.
10424 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
10426         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
10427         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
10428         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10429         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10430         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
10431         New macros.
10432         (sorry_for_unsupported_tree, print_scope_operator,
10433         print_left_paren, print_right_paren, print_left_bracket,
10434         print_right_bracket, print_whitespace): Likewise.
10435         (aggr_variety): Rename to class_key_or_enum.
10436         (print_type): Rename to print_type_id.
10437         (print_type_specifier_seq, print_simple_type_specifier,
10438         print_elaborated_type_specifier,
10439         print_rest_of_abstract_declarator,
10440         print_parameter_declaration_clause, print_exception_specification,
10441         print_nested_name_specifier, print_template_id,
10442         typedef_original_name,  print_template_argument_list_start,
10443         print_template_argument_list_end): New functions.
10445 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
10447         * ir.texi: Add more documentation.
10449 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
10451         * cp-tree.h (struct saved_scope): Remove x_function_parms.
10452         (current_function_parms): Don't define.
10453         (struct cp_language_function): Remove parms_stored.
10454         (current_function_just_assigned_this): Don't define.
10455         (current_function_parms_stored): Likewise.
10456         (static_ctors): Declare.
10457         (static_dtors): Likewise.
10458         (SF_EXPAND): Don't define.
10459         (expand_start_early_try_stmts): Remove declaration.
10460         (store_parm_decls): Likewise.
10461         * decl.c (static_ctors): Don't declare.
10462         (static_dtors): Likewise.
10463         (struct binding_level): Remove this_block.
10464         (poplevel): Remove dead code.
10465         (set_block): Likewise.
10466         (mark_binding_level): Don't mark this_block.
10467         (mark_saved_scope): Don't mark x_function_parms.
10468         (init_decl_processing): Don't add current_function_parms as a GC
10469         root.
10470         (check_function_type): Change prototype.
10471         (start_function): Remove RTL-generation code.
10472         (expand_start_early_try_stmts): Remove.
10473         (store_parm_decls): Give it internal linkage.  Remove
10474         RTL-generation code.
10475         (finish_function): Remove RTL-generation code.
10476         * decl2.c (static_ctors): Fix formatting.
10477         (static_dtors): Likewise.
10478         * method.c (use_thunk): Don't call store_parm_decls.
10479         (synthesize_method): Likewise.
10480         * optimize.c (maybe_clone_body): Likewise.
10481         * parse.y (fn.def2): Likewise.
10482         (.set_base_init): Likewise.
10483         (nodecls): Likewise.
10484         * pt.c (instantiate_decl): Likewise.
10485         * rtti.c (synthesize_tinfo_fn): Likewise.
10486         * semantics.c (genrtl_try_block): Simplify.
10487         (expand_body): Use genrtl_start_function and
10488         genrtl_finish_function.
10489         (genrtl_start_function): New function.
10490         (genrtl_finish_function): Likewise.
10492 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10494         * error.c (cp_tree_printer, case 'P'): Append break.
10496 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10498         * cp-tree.h (frob_opname): Declare.
10499         * parse.y (saved_scopes): New static variable.
10500         (cp_parse_init): Adjust.
10501         (do_id): If lastiddecl is NULL, do do_identifier.
10502         (operator): Save scope information.
10503         (unoperator): New reduction. Restore scope information.
10504         (operator_name): Append unoperator. Call frob_opname.
10505         * spew.c (frob_opname): Define.
10507 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
10509         * decl.c, rtti.c: Include defaults.h if not already included.
10510         Don't define the *_TYPE_SIZE macros.
10512 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
10514         * cp-tree.h (push_switch): Change prototype.
10515         (check_cp_case_value): Remove declaration.
10516         (decl_constant_value): Likewise.
10517         * decl.c (struct cp_switch): Add switch_stmt and cases.
10518         (case_compare): New function.
10519         (push_switch): Set switch_stmt.  Initialize cases.
10520         (pop_switch): Clean up cases.
10521         (define_case_label): Rename to ...
10522         (finish_case_label): ... this.  Do semantic analysis for case
10523         labels here.
10524         (start_function): Correct comment.
10525         * decl2.c (check_cp_case_value): Remove.
10526         * expr.c (do_case): Remove.
10527         * pt.c (tsubst_expr): Adjust call to finish_case_label.
10528         * semantics.c (genrtl_do_poplevel): Remove declaration.
10529         (RECHAIN_STMTS): Remove.
10530         (finish_break_stmt): Use build_break_stmt.
10531         (finish_continue_stmt): Use build_continue_stmt.
10532         (finish_switch_cond): Adjust condition here, rater than in
10533         c_expand_start_case.
10534         (finish_case_label): Remove.
10535         * typeck.c (c_expand_return): Remove.
10536         (c_expand_start_case): Likewise.
10538 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
10540         * ir.texi: Document type nodes.
10542 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10544         * cp-tree.h (init_cp_semantics): Declare.
10545         (genrtl_try_block): Don't declare.
10546         (genrtl_handler): Likewise.
10547         (genrtl_catch_block): Likewise.
10548         (genrtl_ctor_stmt): Likewise.
10549         (genrtl_subobject): Likewise.
10550         (genrtl_do_poplevel): Likewise.
10551         (genrtl_named_return_value): Likewise.
10552         * lex.c (init_parse): Call init_cp_semantics.
10553         * semantics.c (genrtl_try_block): Give it internal linkage.
10554         (genrtl_handler): Likewise.
10555         (genrtl_catch_block): Likewise.
10556         (genrtl_ctor_stmt): Likewise.
10557         (genrtl_subobject): Likewise.
10558         (genrtl_do_poplevel): Likewise.
10559         (genrtl_named_return_value): Likewise.
10560         (lang_expand_stmt): Rename to ...
10561         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
10562         (init_cp_semantics): Define.
10564         * decl.c (initialize_local_var): Remove RTL-generating code.
10565         * semantics.c (genrtl_try_block): Fix formatting.
10567         Move statement-tree facilities from C++ to C front-end.
10568         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
10569         (void_zero_node): Remove.
10570         (stmt_tree): Likewise.
10571         (scope_chain): Adjust.
10572         (language_function): Rename to cp_language_function.
10573         (cp_function_chain): Adjust.
10574         (current_stmt_tree): Remove.
10575         (last_tree): Likewise.
10576         (last_expr_type): Likewise.
10577         (struct lang_decl): Adjust.
10578         (STMT_IS_FULL_EXPR_P): Remove.
10579         (add_tree): Remove.
10580         (begin_stmt_tree): Likewise.
10581         (finish_stmt_tree): Likewise.
10582         (walk_tree_fn): Likewise.
10583         (walk_stmt_tree): Likewise.
10584         * class.c (finish_struct): Replace use of add_tree with add_stmt.
10585         * decl.c (mark_stmt_tree): Adjust type.
10586         (init_decl_processing): Don't build void_zero_node.
10587         (initialize_local_var): Adjust usage of current_stmt_tree.
10588         (finish_enum): Use add_stmt, not add_tree.
10589         (save_function_data): Adjust use of language_function.
10590         (finish_constructor_body): Use add_stmt, not add_tree.
10591         (finish_destructor_body): Likewise.
10592         (push_cp_function_context): Adjust use of language_function.
10593         (pop_cp_function_context): Likewise.
10594         (mark_lang_function): Likewise.
10595         (mark_cp_function_context): Likewise.
10596         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
10597         (build_vec_init): Likewise.
10598         * semantics.c (SET_LAST_STMT): Remove.
10599         (RECHAIN_STMTS): Don't use it.
10600         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
10601         (current_stmt_tree): Define.
10602         (add_tree): Remove.
10603         (finish_goto_stmt): Use add_stmt, not add_tree.
10604         (finish_expr_stmt): Likewise.
10605         (begin_if_stmt): Likewise.
10606         (finish_then_clause): Likewise.
10607         (begin_while_stmt): Likewise.
10608         (begin_do_stmt): Likewise.
10609         (finish_return_stmt): Likewise.
10610         (begin_for_stmt): Likewise.
10611         (finish_break_stmt): Likewise.
10612         (finish_continue_stmt): Likewise.
10613         (begin_switch_stmt): Likewise.
10614         (finish_case_label): Likewise.
10615         (begin_try_block): Likewise.
10616         (begin_function_try_block): Likewise.
10617         (begin_handler): Likewise.
10618         (begin_catch_block): Likewise.
10619         (begin_compound_stmt): Likewise.
10620         (begin_asm_stmt): Likewise.
10621         (finish_asm_stmt): Likewise.
10622         (finish_label_stmt): Likewise.
10623         (add_decl_stmt): Likewise.
10624         (finish_subobject): Likewise.
10625         (finish_decl_cleanup): Likewise.
10626         (finish_named_return_value): Likewise.
10627         (setup_vtbl_ptr): Likewise.
10628         (add_scope_stmt): Likewise.
10629         (finish_stmt_expr): Likewise.
10630         (prune_unused_decls): Remove.
10631         (begin_stmt_tree): Likewise.
10632         (finish_stmt_tree): Likewise.
10633         (prep_stmt): Adjust use of current_stmt_tree.
10634         (lang_expand_stmt): Likewise.
10635         * tree.c (statement_code_p): Remove.
10636         (cp_statement_code_p): New function.
10637         (walk_stmt_tree): Remove.
10638         (init_tree): Set lang_statement_code_p.
10640 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
10642         Integrated preprocessor.
10644         * Make-lang.in, Makefile.in: Remove all references to input.c,
10645         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
10646         * gxx.gperf, hash.h, input.c: Delete.
10647         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
10648         initialized properly.
10650         * class.c (fixup_pending_inline): Take a tree, not a
10651         struct pending_inline *.  All callers changed.
10652         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
10653         RID_PROTECTED entries in ridpointers[] array here.
10654         * decl.c (duplicate_decls): Do not refer to struct
10655         pending_inline.
10656         (record_builtin_type, init_decl_processing): Use RID_MAX not
10657         CP_RID_MAX.
10658         (grokdeclarator): Use C_IS_RESERVED_WORD.
10659         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
10660         cpplib.
10661         (grok_x_components): Do not inspect pending_inlines chain.
10663         * cp-tree.h (struct lang_identifier): Add rid_code entry.
10664         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
10665         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
10666         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
10667         TIME_IDENTIFIER_FILEINFO): Kill.
10668         Update prototypes.
10669         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
10670         single 32-bit word.
10671         * parse.y: Call do_pending_inlines unconditionally.
10672         reinit_parse_for_method is now snarf_method.  fn.defpen is no
10673         longer necessary.  Remove unnecessary <itype> annotation on
10674         SCOPE.  Do not refer to end_of_file or struct pending_inline.
10675         * semantics.c (begin_inline_definitions): Call
10676         do_pending_inlines unconditionally.
10678         * lex.c: Remove all code now shared with C front end.
10679         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
10680         into the get_identifier table.  Rewrite pragma handling to
10681         work with the registry.  Move code to save tokens for later
10682         processing to spew.c.
10684         * spew.c: Rewrite everything in terms of token streams instead
10685         of text.  Move routines here from lex.c / input.c as
10686         appropriate.  GC-mark trees hanging off the pending inlines
10687         chain.
10689 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10691         * NEWS: Mention that the named return value extension has been
10692         deprecated.
10693         * cp-tree.h (original_result_rtx): Define.
10694         (TREE_REFERENCE_EXPR): Remove.
10695         (DECL_VPARENT): Likewise.
10696         (pushdecl_nonclass_level): Likewise.
10697         (store_return_init): Likewise.
10698         (reinit_lang_specific): Likewise.
10699         (genrtl_named_return_value): Change prototype.
10700         * decl.c (original_result_rtx): Remove.
10701         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
10702         Do not generate RTL for local variables here.
10703         (store_return_init): Remove.
10704         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
10705         store_return_init.
10706         (finish_named_return_value): Adjust accordingly.  Warn that this
10707         extension is deprecated.
10708         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
10710 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10712         * pt.c (type_unification_real): Replace switch with if.
10713         (unify): Tsubst non-type parms before comparing.
10715 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10717         * error.c (dump_typename): New function, broken out of ...
10718         (dump_type): ... here. Use it.
10719         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
10721 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10723         * init.c (build_offset_ref): Deal with namespace scoped
10724         TEMPLATE_ID_EXPRs.
10726 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10728         * class.c (resolve_address_of_overloaded_function): Add
10729         explanation message.
10730         * decl.c (define_case_label): Reformat explanation.
10731         * decl2.c (finish_static_data_member_decl): Likewise.
10732         (grokfield): Likewise.
10733         * friend.c (do_friend): Likewise.
10735 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
10737         * tree.c (walk_tree): Expose tail recursion.
10738         (walk_stmt_tree): New function.
10739         * cp-tree.h: Prototype walk_stmt_tree.
10740         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
10741         the BLOCKs directly.  If a BLOCK has no variables after
10742         pruning, discard it.
10743         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
10744         restore the line number.
10746 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
10748         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
10749         (pt.o): Remove dependency on HTAB_H.
10750         * cp-tree.h: Include hashtab.h.
10751         (walk_tree): Change prototype.
10752         (walk_tree_without_duplicates): New function.
10753         * decl.c (check_default_argument): Use it.
10754         * optimize.c (remap_decl): Adjust calls to walk_tree.
10755         (copy_body): Likewise.
10756         (expand_calls_inline): Likewise.
10757         (calls_setjmp_p): Use walk_tree_without_duplicates.
10758         * pt.c: Don't include hashtab.h.
10759         (for_each_template_parm): Use walk_tree_without_duplicates.
10760         * semantics.c (finish-stmt_tree): Likewise.
10761         (expand_body): Likewise.
10762         * tree.c (walk_tree): Add additional parameter.
10763         (walk_tree_without_duplicates): New function.
10764         (count_trees): Use it.
10765         (verify_stmt_tree): Adjust call to walk_tree.
10766         (find_tree): Use walk_tree_without_duplicates.
10767         (no_linkage_check): Likewise.
10768         (break_out_target_exprs): Adjust call to walk_tree.
10769         (cp_unsave): Likewise.
10771 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10773         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
10774         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
10775         * cp-tree.h (TYPE_BINFO): Adjust comment.
10776         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10777         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10778         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10779         (TYPE_TEMPLATE_INFO): Likewise.
10780         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
10781         * class.c (push_nested_class): Likewise.
10782         * decl.c (lookup_name_real): Likewise.
10783         (grokdeclarator): Likewise.
10784         (grok_op_properties): Likewise.
10785         (xref_tag): Likewise.
10786         (xref_basetypes): Likewise.
10787         * decl2.c (constructor_name_full): Likewise.
10788         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
10789         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10790         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
10791         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10792         (dump_type_suffix): Likewise.
10793         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
10794         instead.
10795         (get_aggr_from_typedef): Likewise.
10796         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
10797         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10798         (write_template_parm): Likewise.
10799         (write_template_template_parm): Check tree code instead of
10800         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10801         * method.c (build_overload_nested_name): Add
10802         BOUND_TEMPLATE_TEMPLATE_PARM.
10803         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
10804         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10805         * pt.c (convert_template_argument): Check tree code instead of
10806         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10807         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
10808         (for_each_template_parm): Adjust comment.
10809         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
10810         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10811         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
10812         template_args_equal to compare template template parameter cases.
10813         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10814         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
10815         instead.
10816         * tree.c (copy_template_template_parm): Decide whether to create
10817         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
10818         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10819         (copy_tree_r): Likewise.
10820         * typeck.c (comptypes): Likewise.  Check tree code instead of
10821         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10823 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
10825         * decl.c (finish_function): Move the code for handling functions
10826         marked with the constructor and destructor attributes inside the
10827         expand_p block.
10829 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10831         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
10833 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10835         * pt.c (lookup_template_class): Remove abort.
10836         * tree.c (get_type_decl): Allow error_mark_node.
10838 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10840         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
10841         TEMPLATE_ID_EXPRs.
10843 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
10845         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
10846         new ABI mangling.
10848 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10850         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
10851         union tag mismatch error reporting.
10853 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10855         * call.c (build_scoped_method_call): Check it is not a namespace.
10857 2000-08-30  Jason Merrill  <jason@redhat.com>
10859         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
10861         * tree.c (bot_manip): Check TREE_CONSTANT rather than
10862         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
10863         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
10865         * decl.c (start_function): Always call make_function_rtl.
10867 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10869         * semantics.c (prune_unused_decls): New function.
10870         (finish_stmt_tree): Call it via walk_tree.
10872 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10874         * class.c (build_secondary_vtable): Constify a char *.
10875         * decl.c (init_decl_processing): Initialize function_id_node,
10876         pretty_function_id_node, and func_id_node.
10877         * input.c (struct input_source): Constify 'str'.
10878         (feed_input): Constify first argument.
10879         * mangle.c (write_identifier): Constify argument.
10880         * pt.c (mangle_class_name_for_template): Constify argument.
10882 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
10884         * typeck.c (mark_addressable): Remove code that pokes around in
10885         RTL.
10887 2000-08-28  Jason Merrill  <jason@redhat.com>
10889         * lex.c (file_name_nondirectory): Move to toplev.c.
10891         * cp-tree.h (LOCAL_CLASS_P): New macro.
10892         * class.c (finish_struct_1): Use it.
10894 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
10896         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
10897         (write_encoding): Pass another argument to write_name.
10898         (write_name): Add ignore_local_scope parameter.  Fix handling of
10899         local names.
10900         (write_nested_name): Use write_unqualified_name.
10901         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
10902         (write_template_prefix): Use write_unqualified_name.
10903         (write_component): Remove.
10904         (write_local_name): Add parameter.  Use direct local entity to
10905         discriminator calculation.
10906         (write_class_enum_type): Pass another argument to write_name.
10907         (write_template_template_arg): Likewise.
10908         (make_guard_variable): Likewise.
10910 2000-08-27  Jason Merrill  <jason@redhat.com>
10912         * decl.c (pushdecl): Matching decls for local externs are found in
10913         the current level.  Propagate linkage information from previous
10914         declarations.
10916 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10918         * ir.texi (Expressions): Fix typo.
10920 2000-08-25  Greg McGary  <greg@mcgary.org>
10922         * tree.c (init_tree): Use ARRAY_SIZE.
10924 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10926         * error.c (cp_tree_printer): Rework.
10928 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
10930         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
10931         dyn-string.o.
10932         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
10933         (cp-demangle.o): Remove target.
10934         (dyn-string.o): Likewise.
10936         * decl.c (grokfndecl): Require that `main' return an `int'.
10937         * mangle.c (write_encoding): Don't mangle return types for
10938         conversion functions.
10940 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
10942         * error.c (tree_formatting_info): New data type.
10943         (tree_being_formatted): New macro.
10944         (tree_formatting_flags): Likewise.
10945         (put_whitespace): Likewise.
10946         (print_tree_identifier): Likewise.
10947         (print_identifier): Likewise.
10948         (cp_tree_printer, print_function_argument_list, print_declaration,
10949         print_expression, print_function_declaration,
10950         print_function_parameter, print_type, print_cv_qualifier): New
10951         functions.
10952         (init_error): Initialize lang_printer.
10954 2000-08-24  Jason Merrill  <jason@redhat.com>
10956         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
10957         adjustment necessary.
10959 2000-08-24  Greg McGary  <greg@mcgary.org>
10961         * cp-tree.h (MAIN_NAME_P): Remove macro.
10963 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
10965         * error.c (print_instantiation_context): Don't forget to flush the
10966         buffer.
10968 2000-08-23  Jason Merrill  <jason@redhat.com>
10970         * typeck.c (build_ptrmemfunc): Save the input pmf.
10972         * method.c (process_modifiers): Use same_type_p.
10974 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
10976         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
10977         * mangle.c (write_function_type): Change prototype.
10978         (write_encoding): Don't mangle return types for
10979         constructors or destructors.
10980         (write_type): Adjust call to write_function_type.
10981         * pt.c (instantiate_template): Instantiate alternate entry points
10982         when instantiating the main function.
10984 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10986         * error.c (cp_print_error_function): Don't use embedded '\n' in
10987         output_printf.
10989 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
10991         * decl.c (init_decl_processing): Remove bogus initialization.
10992         * error.c (lang_print_error_function): Restore here.
10993         (init_error): Initialize print_error_function.
10995 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10997         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
10999 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
11001         * Makefile.in (error.o): Depends on diagnostic.h
11003         * cp-tree.h (problematic_instantiation_changed,
11004         record_last_problematic_instantiation, current_instantiation,
11005         print_instantiation_context): Declare.
11006         (maybe_print_template_context): Remove.
11008         * decl.c (init_decl_processing): Set print_error_function to NULL.
11009         (lang_print_error_function): Remove, since we're using a new
11010         machinery.
11012         * error.c: #include diagnostic.h
11013         (function_category): New function.
11014         (cp_diagnostic_starter): Likewise.
11015         (cp_diagnostic_finalizer): Likewise.
11016         (cp_print_error_function): Likewise.
11017         (maybe_print_instantiation_context): Likewise.
11018         (print_instantiation_full_context): Likewise.
11019         (print_instantiation_partial_context): Likewise.
11020         (print_instantiation_context): Define.
11021         (init_error): Initialize diagnostic pager and finalizer.
11023         * pt.c (problematic_instantiation_changed): Define.
11024         (record_last_problematic_instantiation): Likewise.
11025         (current_instantiation): Likewise.
11026         (maybe_print_template_context): Remove.
11027         (print_template_context): Likewise.
11028         (current_tinst_level): Make static to reflect Brendan Kehoe's
11029         change of 1995-04-13.
11030         (push_tinst_level): Call print_instantiation_context.
11032 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11034         * lang-specs.h: Do not process -o or run the assembler if
11035         -fsyntax-only.
11037 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11039         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
11040         variables.
11041         * decl2.c (lang_decode_option): Disable gettext attributes for
11042         -ansi.
11044 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11046         * lex.c (lang_init_options): Default diagnostic message maximum
11047         length to 80, when line-wrapping.
11049 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
11051         * class.c (build_vtbl_initializer): Clear the entire
11052         vtbl_init_data.  Start keeping track of the functions for which we
11053         have created vcall offsets here.
11054         (dfs_build_vcall_offset_vtbl_entries): Remove.
11055         (build_vcall_offset_vtbl_entries): Reimplement.
11056         (add_vcall_offset_vtbl_entries_r): New function.
11057         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
11058         computing when vcall offsets are necessary.
11060 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11062         * decl.c (member_function_or_else): Use cp_error ... %T.
11063         (grokdeclarator): Likewise.
11064         (start_method): Likewise.
11065         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
11067 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11069         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
11070         TYPE_DECLs.
11072 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11074         * cp-tree.h (PTRMEM_OK_P): New macro.
11075         (itf_ptrmem_ok): New enumeration value.
11076         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
11077         argument. Diagnose implicit pointer to member.
11078         (instantiate_type): Don't diagnose implicit pointer to member
11079         here. Pass itf_ptrmem_ok if ok. Adjust calls to
11080         resolve_address_of_overloaded_function.
11081         * init.c (build_offset_ref): Set PTRMEM_OK_P.
11082         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
11083         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
11084         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
11085         (build_unary_op): Deal with single non-static member in
11086         microsoft-land.
11088 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11090         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
11092 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11094         * cp-tree.h (enum_name_string): Remove prototype.
11095         (report_case_error): Remove prototype.
11096         * cp/typeck2.c (enum_name_string): Remove.
11097         (report_case_error): Remove.
11098         * error.c (dump_expr): Deal with enum values directly.
11099         Correctly negate integer constant.
11101 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11103         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
11104         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
11105         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
11106         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
11107         (__cxa_vec_new): Use __cxa_vec_new2.
11108         (__cxa_vec_delete): Use __cxa_vec_delete2.
11110 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11112         * vec.cc (__cxa_vec_new): Set "C" linkage.
11113         (__cxa_vec_ctor): Likewise.
11114         (__cxa_vec_cctor): Likewise.
11115         (__cxa_vec_dtor): Likewise.
11116         (__cxa_vec_delete): Likewise.
11117         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
11118         (__cxa_vec_ctor): Likewise.
11119         (__cxa_vec_cctor): Likewise.
11120         (__cxa_vec_dtor): Likewise.
11121         (__cxa_vec_delete): Likewise.
11123 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11125         * class.c (instantiate_type): Reinstate local variable
11126         deleted in previous change.
11128         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
11129         itf_no_attributes.
11131 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11133         * cp-tree.h (instantiate_type_flags): New enumeration.
11134         (instantiate_type): Change parameter.
11135         * class.c (instantiate_type): Adjust prototype. Adjust.
11136         * call.c (standard_conversion): Adjust instantiate_type call.
11137         (reference_binding): Likewise.
11138         (build_op_delete_call): Likewise.
11139         (convert_like_real): Likewise.
11140         * cvt.c (cp_convert_to_pointer): Likewise.
11141         (convert_to_reference): Likewise.
11142         * pt.c (convert_nontype_argument): Likewise.
11143         * typeck.c (build_binary_op): Likewise.
11144         (build_ptrmemfunc): Likewise.
11145         (convert_for_assignment): Likewise.
11147 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11149         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
11150         (current_aggr): Define.
11151         * decl.c (grokdeclarator): Make sure a friend class is an
11152         elaborated type specifier.
11153         * parse.y (current_aggr): Remove static definition.
11154         (cp_parse_init): Adjust.
11155         (structsp): Clear and restore current_aggr.
11156         (component_decl_list): Clear current_aggr.
11158         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
11159         aggregate tag on the typename's context.
11161         * pt.c (tsubst_friend_class): Return error_mark_node, if
11162         parms becomes NULL.
11163         (instantiate_class_template): Ignore error_mark_node friend types.
11165 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
11167         * cvt.c (warn_ref_binding): New static function, broken out of ...
11168         (convert_to_reference): ... here. Use it.
11170 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11172         * parse.y (template_arg): Add rule for template qualified with
11173         global scope.
11175 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11177         * decl2.c (add_function): Reorganize.
11178         (arg_assoc): Do not consider function template decls.
11180 2000-08-11  Jason Merrill  <jason@redhat.com>
11182         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
11183         looking inside.
11185 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11187         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
11188         (lookup_nested_tag): Likewise.
11190         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
11191         can be produced.
11193 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11195         * parse.y (named_complex_class_head_sans_basetype): Remove
11196         always true if.
11198 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11200         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
11201         explicit TEMPLATE_ID_EXPR args.
11202         (build_expr_from_tree, case CALL_EXPR): Likewise.
11204 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11206         * decl.c (check_tag_decl): Diagnose typename's which don't
11207         declare anything.
11209 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
11211         * init.c (build_aggr_init): Reject bogus array initializers
11212         early.
11214 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11216         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
11217         runtime.
11218         * cp/tinfo.cc (__dynamic_cast): Likewise.
11219         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
11221 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11223         * cvt.c (convert_to_pointer_force): Fix error message when
11224         attempting to cast from ambiguous base.
11226 2000-08-08  Jason Merrill  <jason@redhat.com>
11228         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
11229         (tsubst_template_arg_vector): Likewise.
11231         * decl2.c (build_anon_union_vars): Choose the largest field; don't
11232         assume that one will be as large as the union.
11234 2000-08-07  Kazu Hirata  <kazu@hxi.com>
11236         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
11237         * decl.c (pop_labels): Likewise.
11239 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
11241         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
11242         specifications.
11243         (__pointer_to_member_type_info): Likewise.
11244         (__base_class_info): Likewise.
11245         (__class_type_info): Likewise.
11246         (__si_class_type_info): Likewise.
11247         (__vmi_class_type_info): Likewise.
11248         * tinfo.cc (__si_class_type_info::__do_find_public_src):
11249         Changed member names to match specifications.
11250         (__vmi_class_type_info::__do_find_public_src): Likewise.
11251         (__si_class_type_info::__do_dyncast): Likewise.
11252         (__vmi_class_type_info::__do_dyncast): Likewise.
11253         (__si_class_type_info::__do_upcast): Likewise.
11254         (__vmi_class_type_info::__do_upcast): Likewise.
11255         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
11256         (__pbase_type_info::__pointer_catch): Likewise.
11257         (__pointer_type_info::__pointer_catch): Likewise.
11258         (__pointer_to_member_type_info::__pointer_catch): Likewise.
11260 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11262         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
11263         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
11264         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
11266 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
11268         * cp-tree.h (add_method): Change prototype.
11269         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
11270         Don't double the size of the method vector in the error case.
11271         (handle_using_decl): Adjust call to add_method.
11272         (add_implicitly_declared_members): Likewise.
11273         (clone_function_decl): Likewise.
11274         * decl2.c (check_classfn): Likewise.
11275         * semantics.c (finish_member_declaration): Likewise.
11277 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11279         * decl.c (flag_isoc94): New variable.
11281 2000-08-02  Jason Merrill  <jason@redhat.com>
11283         * pt.c (do_type_instantiation): Add complain parm; don't complain
11284         if called recursively.
11285         * cp-tree.h, parse.y: Adjust.
11287 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11289         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
11290         -Wno-strict-prototypes.
11292         * g++spec.c: Adjust type of second argument to
11293         lang_specific_driver, and update code as necessary.
11295         * cp-tree.h: Don't prototype min_precision here.
11296         (my_friendly_assert): Cast expression to void.
11297         * semantics.c (do_poplevel): Initialize scope_stmts.
11299 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
11301         * cp-tree.h (DECL_NEEDED_P): Tweak.
11303 2000-07-28  Jason Merrill  <jason@redhat.com>
11305         * lang-specs.h: Use %i in rule for .ii files.
11307 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
11309         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
11311 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
11313         Allow indirect primary bases.
11314         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
11315         primary_base.
11316         (CLASSTYPE_VFIELD_PARENT): Remove.
11317         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
11318         (BINFO_PRIMARY_BINFO): Remove.
11319         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
11320         (BINFO_VBASE_PRIMARY_P): Likewise.
11321         (BINFO_PRIMARY_BASE_OF): New macro.
11322         (BINFO_INDIRECT_PRIMARY_P): Likewise.
11323         (get_primary_binfo): New function.
11324         * decl.c (lang_mark_tree): Make lang_type::primary_base.
11325         * class.c (vcall_offset_data_s): Rename to ...
11326         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
11327         and add ctor_vtbl_p.
11328         (get_derived_offset): Use get_primary_binfo.
11329         (dfs_mark_primary_bases): Adjust handling of virtual primary
11330         bases.
11331         (mark_primary_bases): Likewise.
11332         (set_primary_base): Take a binfo, not an integer, as a
11333         representation of the primary base.
11334         (indirect_primary_base_p): Remove.
11335         (determine_primary_base): Adjust for indirect primary bases.
11336         (dfs_find_final_overrider): Fix typo in coment.
11337         (update_vtable_entry_for_fn): Use get_primary_binfo.
11338         (layout_nonempty_base_or_field): Tweak.
11339         (build_base_fields): Adjust for new primary base semantics.
11340         (dfs_propagate_binfo_offsets): Remove.
11341         (propagate_binfo_offsets): Rewrite.
11342         (dfs_set_offset_for_shared_vbases): Remove.
11343         (layout_virtual_bases): Don't use it.
11344         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
11345         ABI.
11346         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
11347         CLASSTYPE_VFIELD_PARENT.
11348         (dfs_get_primary_binfo): New function.
11349         (get_primary_binfo): Likewise.
11350         (dump_class_hierarchy_r): Tweak printing of primary bases.
11351         (build_vtbl_initializer): Fix typo in comments.  Use
11352         vtbl_init_data.
11353         (build_vcall_and_vbase_vtbl_entries): Likewise.
11354         (build_vbaes_offset_vtbl_entries): Likewise.
11355         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
11356         BV_VCALL_INDEX to handle indirect primary bases.
11357         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
11358         (build_rtti_vtbl_entries): Likewise.
11359         * search.c (get_shared_vbase_if_not_primary): Tweak.
11360         (find_vbase_instance): Likewise.
11361         (binfo_for_vtable): Simplify.
11362         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
11363         (make_binfo): Make it have 11 entries.
11365 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
11367         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
11368         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
11369         ascertaining primaryness.
11370         (G): Remove template_args.
11371         (decl_is_template_id): New function.
11372         (write_encoding): Use decl_is_template_id.
11373         (write_name): Likewise.  Handle type_decls.  Get main variant of
11374         type decls.
11375         (write_nested_name): Likewise.
11376         (write_prefix): Likewise.
11377         (write_template_prefix): Likewise.
11378         (write_special_name_constructor): Remove defunct production from
11379         comment.
11380         (write_bare_function_type): Remove comment about absent parameter.
11381         (write_template_template_arg): Add missing grammar production to
11382         comment.
11384 2000-07-27  Jason Merrill  <jason@redhat.com>
11386         * decl.c (duplicate_decls): If common_type produces a non-typedef
11387         type for a typedef, just use the old type.
11389 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
11391         * cp-tree.h (function_depth): Declare.
11392         (verify_stmt_tree): Likewise.
11393         (find_tree): Likewise.
11394         * decl.c (function_depth): Give it external linkage.
11395         * optimize.c (optimize_function): Increment and decrement it.
11396         * tree.c (verify_stmt_tree_r): New function.
11397         (verify_stmt_tree): Likewise.
11398         (find_tree_r): Likewise.
11399         (find_tree): Likewise.
11401 2000-07-27  Jason Merrill  <jason@redhat.com>
11403         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
11404         TYPE_PTRMEMFUNC_P.
11405         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
11407 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11409         * decl.c (start_cleanup_fn): Mark the function as `inline'.
11410         * decl2.c (get_guard): Call cp_finish_decl, not
11411         rest_of_decl_compilation, for local guards.
11412         * lex.c (do_identifier): Remove unused variable.
11414 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
11416         * parse.y:  Add missing ';'.
11418 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11420         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
11421         of `extern "C++"'.
11423 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11425         Kill strict_prototype. Backwards compatibility only for
11426         non NO_IMPLICIT_EXTERN_C systems.
11427         * cp-tree.h (flag_strict_prototype): Remove.
11428         (strict_prototype): Remove.
11429         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11430         * decl.c (maybe_push_to_top_level): Adjust.
11431         (pop_from_top_level): Adjust.
11432         (decls_match): Only allow sloppy parm matching for ancient
11433         system headers.
11434         (init_decl_processing): Adjust.
11435         (grokdeclarator): Adjust.
11436         * decl2.c (flag_strict_prototype): Remove.
11437         (strict_prototype): Remove.
11438         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11439         (lang_f_options): Remove "strict-prototype".
11440         (unsupported-options): Add "strict-prototype".
11441         * lex.c (do_identifier): Adjust.
11442         (do_scoped_id): Adjust.
11443         * parse.y (empty_parms): Adjust.
11444         * class.c (push_lang_context): Adjust.
11445         (pop_lang_context): Adjust.
11446         * typeck.c (comp_target_parms): Adjust.
11448 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11450         * decl.c (poplevel): Deal with anonymous variables at for scope.
11451         (maybe_inject_for_scope_var): Likewise.
11453 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
11455         * decl.c: Remove all signal handling code, now done in toplev.c.
11457 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
11459         * decl.c (make_rtl_for_nonlocal_decl): Rework.
11461         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
11462         correctly.
11464 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
11466         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
11467         Define my_friendly_assert and my_friendly_abort as macros
11468         which may call friendly_abort.  Prototype friendly abort, not
11469         my_friendly_abort or my_friendly_assert.
11470         * decl.c (signal_catch): Report the signal caught in the error
11471         message.  Call fatal directly.
11472         * typeck2.c (ack, my_friendly_assert): Delete.
11473         (my_friendly_abort): Rename to friendly_abort.  Expect file,
11474         line, and function parameters.  Report the abort code, then
11475         call fancy_abort.  Do not mask an abort if errors have
11476         already occurred.
11478 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
11480         * typeck.c (comp_target_parms): Remove obsolete parameter.
11481         (comp_target_types): Adjust.
11483 2000-07-17  Jason Merrill  <jason@redhat.com>
11485         * typeck.c (mark_addressable): Never set TREE_USED.
11486         * call.c (build_call): Don't abort on calls to library functions
11487         that have been declared normally.
11489         * typeck.c (build_binary_op): Fix grammar in warning.
11491         * exception.cc (__eh_free): Fix prototype.
11493         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
11495         * decl.c (pushdecl): Handle seeing an OVERLOAD in
11496         IDENTIFIER_NAMESPACE_VALUE.
11498 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
11500         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
11501         * method.c (use_thunk): Correct handling of vcall offsets.
11503 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11505         * .cvsignore: parse.h and parse.c have no cp- prefix.
11507 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11509         * .cvsignore: New file.
11511 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11513         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11515 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11517         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
11518         * parse.c: Remove.
11519         * parse.h: Likewise.
11521 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
11523         * class.c (layout_class_type): Add pointers to virtual bases after
11524         base classes under the old ABI.
11526 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
11528         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
11529         (finish_continue_stmt): Likewise.
11530         (begin_for_stmt): Remove call to note_level_for_for.
11531         (finish_goto_stmt): Change call from build_min_nt
11532         to build_stmt.
11533         (finish_expr_stmt): Likewise.
11534         (begin_if_stmt): Likewise.
11535         (begin_while_stmt): Likewise.
11536         (finish_while_stmt): Likewise.
11537         (finish_return_stmt): Likewise.
11538         (begin_for_stmt): Likewise.
11539         (finish_for_stmt): Likewise.
11540         (finish_break_stmt): Likewise.
11541         (begin_switch_stmt): Likewise.
11542         (finish_case_label): Likewise.
11543         (genrtl_try_block): Likewise.
11544         (begin_try_block): Likewise.
11545         (begin_handler): Likewise.
11546         (begin_compound_stmt): Likewise.
11547         (finish_asm_stmt): Likewise.
11548         (finish_label_stmt): Likewise.
11549         (add_decl_stmt): Likewise.
11550         (finish_subobject): Likewise.
11551         (finish_decl_cleanup): Likewise.
11552         (finish_named_return_value): Likewise.
11553         (setup_vtbl_ptr): Likewise.
11554         (add_scope_stmt): Likewise.
11555         * decl.c (finish_constructor_body): Likewise.
11556         (finish_destructor_body): Likewise.
11557         * optimize.c (copy_body_r): Likewise.
11558         (initialize_inlined_parameters): Likewise.
11559         (declare_return_variable): Likewise.
11560         (expand_call_inline): Likewise.
11562 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
11564         * semantics.c (expand_body): Sync interface information
11565         at the end of function body expansion.
11567 2000-07-09  Jason Merrill  <jason@redhat.com>
11569         * init.c (build_new_1): Bail early if the call to new fails.
11571         * decl.c (compute_array_index_type): Check specifically for
11572         an INTEGER_CST, not just TREE_CONSTANT.
11574         * decl.c (duplicate_decls): Don't call duplicate_decls on
11575         the DECL_TEMPLATE_RESULT.
11576         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
11577         codes.
11579         * error.c (dump_template_bindings): Don't crash if we had an
11580         invalid argument list.
11582         * typeck.c (c_expand_start_case): Do narrowing here.
11583         * semantics.c (finish_switch_cond): Not here.
11585 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
11587         * parse.y (asm_clobbers): Do string concatenation.
11589 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11591         * decl.c (pushtag): Don't put local classes in template functions
11592         on the local_classes list.
11594 2000-07-04  Scott Snyder  <snyder@fnal.gov>
11596         * decl2.c (get_guard): Add missing return for old ABI local
11597         variable case.
11599 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11601         * cp-tree.h (char_type_p): New function.
11602         * decl.c (init_decl_processing): Don't initialize
11603         signed_wchar_type_node or unsigned_wchar_type_node.
11604         (complete_array_type): Handle brace-enclosed string-constants.
11605         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
11606         * tree.c (char_type_p): New function.
11607         * typeck2.c (digest_init): Use char_type_p.
11609 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11611         * pt.c (tsubst): Don't layout type, if it's error_mark.
11613 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11615         * pt.c (instantiate_pending_templates): Reset template level.
11617 2000-07-05  Jason Merrill  <jason@redhat.com>
11619         * call.c (joust): Don't complain about `operator char *()' beating
11620         `operator const char *() const'.
11622 2000-07-04  scott snyder  <snyder@fnal.gov>
11623             Jason Merrill  <jason@redhat.com>
11625         * repo.c (repo_get_id): Handle the case where a class with virtual
11626         bases has a null TYPE_BINFO_VTABLE.
11628 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
11629             Jason Merrill  <jason@redhat.com>
11631         * parse.y (member_init): Just pass in the type.
11632         * init.c (expand_member_init): Handle getting a type.
11634 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11635             Jason Merrill  <jason@redhat.com>
11637         * decl.c (finish_function): Warn if a function has no return
11638         statement.
11639         Suggested by Andrew Koenig.
11640         * typeck.c (check_return_expr): Do set current_function_returns_value
11641         if we got an error_mark_node.
11643 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11645         * decl2.c (push_decl_namespace): Push the original namespace.
11647 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11649         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
11650         * semantics.c (begin_class_definition): Clear it.
11652 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
11654         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
11655         (genrtl_expr_stmt): Likewise.
11656         (genrtl_decl_stmt): Likewise.
11657         (genrtl_if_stmt): Likewise.
11658         (genrtl_while_stmt): Likewise.
11659         (genrtl_do_stmt): Likewise.
11660         (genrtl_return_stmt): Likewise.
11661         (genrtl_for_stmt): Likewise.
11662         (genrtl_break_stmt): Likewise.
11663         (genrtl_continue_stmt): Likewise.
11664         (genrtl_scope_stmt): Likewise.
11665         (genrtl_switch_stmt): Likewise.
11666         (genrtl_case_label): Likewise.
11667         (genrtl_begin_compound_stmt): Likewise.
11668         (genrtl_finish_compound_stmt): Likewise.
11669         (genrtl_compound_stmt): Likewise.
11670         (genrtl_asm_stmt): Likewise.
11672         * init.c (begin_init_stmts): Remove call to
11673         genrtl_begin_compound_stmt.
11674         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
11676         * semantics.c (lang_expand_stmt): Changed call to
11677         genrtl_compound_stmt to ignore return value.
11679 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
11681         * mangle.c (canonicalize_for_substitution): Return the canonical
11682         variant of a type.
11684         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
11685         TYPE_DECL.
11686         * typeck.c (commonparms): Remove obstack manipulations.
11688 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
11690         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
11692         * Makefile.in (OBJS): Added ../c-semantics.o.
11693         (OBJDEPS): Likewise.
11695         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
11696         ../c-common.h.
11697         (struct stmt_tree): Added comment.
11698         (current_function_name_declared): Removed.
11699         (stmts_are_full_exprs_p): Likewise.
11700         (genrtl_do_pushlevel): Likewise.
11701         (genrtl_clear_out_block): Likewise.
11702         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
11703         (DECL_ANON_UNION_ELEMS): Likewise.
11704         (emit_local_var): Likewise.
11705         (make_rtl_for_local_static): Likewise.
11706         (do_case): Likewise.
11707         (expand_stmt): Likewise.
11708         (genrtl_decl_cleanup): Likewise.
11709         (c_expand_asm_operands): Likewise.
11710         (c_expand_return): Likewise.
11711         (c_expand_start_case): Likewise.
11713         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
11714         (emit_local_var): Likewise.
11715         (initialize_local_var): Change reference to
11716         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11717         Change reference to stmts_are_full_exprs_p to
11718         current_stmt_tree->stmts_are_full_exprs_p.
11719         (push_cp_function_context): Likewise.
11721         * expect.c (expand_throw): Change reference to
11722         stmts_are_full_exprs_p.
11724         * init.c (build_aggr_init): Change reference to
11725         stmts_are_full_exprs_p.
11726         (build_vec_init): Likewise.
11728         * optimize.c (maybe_clone_body): Change reference to
11729         current_function_name_declared to
11730         cp_function_chain->name_declared.
11732         * pt.c (instantiate_decl): Change reference to
11733         current_function_name_declared to
11734         cp_function_chain->name_declared.
11736         * semantics.c (expand_cond): Moved declaration to c-common.h.
11737         (genrtl_do_pushlevel): Moved to c-semantics.c.
11738         (genrtl_clear_out_block): Likewise.
11739         (genrtl_goto_stmt): Likewise.
11740         (genrtl_expr_stmt): Likewise.
11741         (genrtl_decl_stmt): Likewise.
11742         (gerntl_if_stmt): Likewise.
11743         (genrtl_while_stmt): Likewise.
11744         (genrtl_do_stmt): Likewise.
11745         (genrtl_return_stmt): Likewise.
11746         (genrtl_for_stmt): Likewise.
11747         (genrtl_break_stmt): Likewise.
11748         (genrtl_continue_stmt): Likewise.
11749         (genrtl_scope_stmt): Likewise.
11750         (genrtl_switch_stmt): Likewise.
11751         (genrtl_case_label): Likewise.
11752         (genrtl_begin_compound_stmt): Likewise.
11753         (genrtl_finish_compound_stmt): Likewise.
11754         (genrtl_compound_stmt): Likewise.
11755         (genrtl_asm_stmt): Likewise.
11756         (genrtl_decl_cleanup): Likewise.
11757         (expand_cond): Likewise.
11758         (expand_stmt): Renamed to ...
11759         (lang_expand_stmt): ... this.
11760         (lang_expand_expr_stmt): Initialize.
11761         (set_current_function_name_declared): Likewise.
11762         (stmts_are_full_exprs_p): Likewise.
11763         (current_function_name_declared): Likewise.
11764         (anon_aggr_type_p): Likewise.
11765         (do_poplevel): Change reference to
11766         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11767         Change reference to stmts_are_full_exprs_p to
11768         current_stmt_tree->stmts_are_full_exprs_p.
11769         (add_tree): Likewise.
11770         (finish_expr_stmt): Likewise.
11771         (prep_stmt): Likewise.
11772         (lang_expand_stmt): Likewise.
11773         (begin_compound_stmt): Change reference to
11774         current_function_name_declared to
11775         cp_function_chain->name_declared and call to
11776         current_function_name_declared().
11777         (setup_vtbl_ptr): Likewise.
11778         (genrtl_do_poplevel): Removed.
11780 2000-06-30  Jason Merrill  <jason@redhat.com>
11782         * init.c (init_init_processing): Go back to aligning like
11783         double_type_node for old ABI.
11784         (get_cookie_size): Make cookie larger if we get a type that needs
11785         more alignment.
11786         (build_vec_delete): Call it.
11788         * typeck.c (qualify_type_recursive): New fn.
11789         (composite_pointer_type): Use it.
11790         (build_binary_op): Use composite_pointer_type.
11792 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
11793             Jason Merrill  <jason@redhat.com>
11795         * typeck.c (check_return_expr): Don't complain about returning
11796         NULL from operator new if -fcheck-new.
11797         * cp-tree.h: Declare flag_check_new here.
11798         * init.c: Not here.
11800 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11802         * mangle.c (find_substitution): Use same_type_p.
11803         (write_encoding): Don't check for substitutions.
11805 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11807         * parse.y (expr_no_comma_rangle): New non-terminal.
11808         (template_parm): Use it for default parameter case.
11809         (template_arg): Use it.
11810         (expr_no_commas): Remove commented out undefined extensions.
11811         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11812         * parse.h, parse.c: Rebuilt.
11814 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
11816         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
11817         (finish_asm_stmt): Do it here, instead.
11819         * cp-tree.h (ridpointers): Don't declare.
11820         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
11821         (record_builtin_java_type): Likewise.
11822         (init_decl_processing): Likewise.
11823         * lex.c: Move inclusion of lex.h.
11824         (ridpointers): Don't define.
11825         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
11826         RID_MAX.
11827         * lex.h (enum rid): Rename to ...
11828         (enum cp_rid): ... this.
11829         (ridpointers): Don't declare.
11830         * parse.y: Move inclusion of lex.h.
11831         * parse.c: Regenerated.
11832         * spew.c: Move inclusion of lex.h.
11834         * cp-tree.h (struct language_function): Remove temp_name_counter.
11835         (temp_name_counter): Remove.
11836         (get_temp_name): Change prototype.
11837         (get_guard): New function.
11838         (get_guard_cond): Likewise.
11839         (set_guard): Likewise.
11840         * cvt.c (build_up_reference): Adjust call to get_temp_name.
11841         * decl.c (expand_static_init): Use get_guard and friends to
11842         implement guard variables.
11843         * decl2.c (get_temp_name): Assume that the variables created are
11844         always static.
11845         (get_sentry): Rename to ...
11846         (get_guard): ... this.  Implement new ABI guard variables.
11847         (get_guard_bits): New function.
11848         (get_guard_cond): Likewise.
11849         (set_guard): Likewise.
11850         (start_static_initialization_or_destruction): Use them.
11851         (do_static_initialization): Replace sentry with guard throughout.
11852         (do_static_destruction): Likewise.
11853         * init.c (create_temporary_var): Add comment.
11855 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11857         * mangle.c (find_substitution): Use same_type_p.
11858         (write_encoding): Don't check for substitutions.
11860 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11862         * parse.y (expr_no_comma_rangle): New non-terminal.
11863         (template_parm): Use it for default parameter case.
11864         (template_arg): Use it.
11865         (expr_no_commas): Remove commented out undefined extensions.
11866         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11867         * parse.h, parse.c: Rebuilt.
11869 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
11871         * cp-tree.h (flag_const_strings): Remove.
11872         (warn_parentheses): Likewise.
11873         (warn_format): Likewise.
11874         (common_type): Likewise.
11875         (default_conversion): Likewise.
11876         (build_binary_op): Likewise.
11877         (cp_build_binary_op): New macro.
11878         * call.c (build_new_op): Use cp_build_binary_op instead of
11879         build_binary_op.
11880         * class.c (build_vtable_entry_ref): Likewise.
11881         * decl.c (expand_static_init): Likewise.
11882         (compute_array_index_type): Likewise.
11883         (build_enumerator): Likewise.
11884         * decl2.c (delete_sanity): Likewise.
11885         (start_static_initialization_or_destruction): Likewise.
11886         * error.c (dump_type_suffix): Likewise.
11887         * init.c (resolve_offset_ref): Likewise.
11888         (build_new): Likewise.
11889         (build_new_1): Likewise.
11890         (build_vec_delete_1): Likewise.
11891         (build_vec_init): Likewise.
11892         (build_delete): Likewise.
11893         * rtti.c (synthesize_tinfo_fn): Likewise.
11894         (synthesize_tinfo_var): Likewise.
11895         * search.c (expand_upcast_fixups): Likewise.
11896         (fixup_all_virtual_upcast_offsets): Likewise.
11897         * typeck.c (build_array_ref): Likewise.
11898         (get_member_function_from_ptrfunc): Likewise.
11899         (build_binary_op): Add parameter.
11900         (pointer_int_sum): Use cp_build_binary_op.
11901         (pointer_diff): Likewise.
11902         (build_modify_expr): Likewise.
11903         (get_delta_difference): Likewise.
11904         (build_ptrmemfunc): Likewise.
11906 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11908         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
11909         * decl.c (create_implicit_typedef): Adjust.
11910         * decl2.c (build_artificial_parm): Adjust.
11911         * method.c (implicitly_declare_fn): Adjust.
11912         * pt.c (push_inline_template_parms_recursive): Adjust.
11913         (process_template_parm): Adjust.
11914         (overloaded_template_name): Adjust.
11915         * semantics.c (finish_template_template_parm): Adjust.
11917 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
11919         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
11920         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
11921         where to emit thunks.
11922         (build_vtt): Adjust call to build_vtt_inits.
11923         (build_vtt_inits): Add parameter to indicate whether or not
11924         sub-VTTs for virtual bases should be included.  Adjust handling of
11925         construction vtables.
11926         (get_matching_base): New function.
11927         (dfs_build_vtt_inits): Rename to ...
11928         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
11929         construction vtables.
11930         (dfs_fixup_binfo_vtbls): Likewise.
11931         (build_ctor_vtbl_groups): Build construction vtables for virtual
11932         bases, too.
11933         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
11934         to build construction vtbls.
11935         (dfs_accumulate_vtbl_inits): Adjust handling of
11936         construction vtables.
11938         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
11939         types correctly.
11941 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
11943         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
11945 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11947         * search.c (hides): Remove.
11948         (is_subobject_of_p): Add most_derived parameter. Use
11949         CANONICAL_BINFO.
11950         (lookup_field_queue_p): Adjust.
11951         (lookup_field_r): Adjust.
11953 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
11955         * decl2.c (handle_class_head): Bash typedefs to the type's main
11956         decl.
11958 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
11960         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
11961         (begin_global_stmt_expr): ... this.
11962         (genrtl_finish_stmt_expr): Rename to ...
11963         (finish_global_stmt_expr): ... this.
11964         * init.c (begin_init_stmts): Adjust calls.
11965         (finish_init_stmts): Likewise.
11966         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
11967         (begin_global_stmt_expr): ... this.
11968         (genrtl_finish_stmt_expr): Rename to ...
11969         (finish_global_stmt_expr): ... this.
11971 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11973         * search.c (lookup_member): Fix typo in comment.
11975 2000-06-24  Jason Merrill  <jason@redhat.com>
11977         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
11978         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
11980 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11982         * parse.y (complex_direct_notype_declarator): Support global_scope.
11983         * Makefile.in: Adjust conflict count.
11985 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11987         * parse.y (template_arg): Convert TEMPLATE_DECL
11988         that is a template template parameter to
11989         TEMPLATE_TEMPLATE_PARM here.
11991         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
11992         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
11993         (copy_template_template_parm): Adjust prototype.
11994         * decl.c (grokdeclarator): Remove dead code.
11995         * pt.c (process_template_parm): Tidy.
11996         (lookup_template_class): Construct nodes in
11997         copy_template_template_parm.
11998         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
11999         lookup_template_class.  Use TYPE_TI_TEMPLATE.
12000         * tree.c (copy_template_template_parm): Add NEWARGS
12001         parameter.
12002         (mapcar): Adjust call to copy_template_template_parm.
12003         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
12004         * method.c (build_template_template_parm_names): Change error
12005         code to avoid compilation warning.
12007         * gxxint.texi: Document template template parameter
12008         name mangling.
12010 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
12012         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
12013         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
12014         (cp-demangle.o): New rule.
12015         (dyn-string.o): Likewise.
12016         * inc/cxxabi.h (__cxa_demangle): New declaration.
12018 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
12020         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
12021         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
12022         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
12023         a tree, not an int.
12024         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
12025         (make_thunk): Change prototype.
12026         (emit_thunk): Rename to use_thunk.
12027         (mangle_thunk): Change prototype.
12028         * class.c (get_derived_offset): Simplify.
12029         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
12030         BV_GENERATE_THUNK_WITH_VTABLE_P.
12031         (build_primary_vtable): Simplify.
12032         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
12033         (dfs_find_base): Remove.
12034         (update_vtable_entry_for_fn): Correct bug in finding the base
12035         where a virtual function was first declared.  Figure out whether
12036         or not to emit a vcall-thunk with the vtables in which it appears.
12037         Correct logic for deciding whether to use an ordinary thunk, or a
12038         vcall thunk.
12039         (finish_struct_1): Remove unnecssary code.
12040         (build_vtbl_initializer): Use ssize_int for the running counter of
12041         negative indices.
12042         (build_vtbl_initializer): Only use vcall thunks where necessary.
12043         Mark thunks as needing to be emitted with their vtables, or not.
12044         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
12045         indices.  Use size_binop.
12046         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
12047         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
12048         size_binop.
12049         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
12050         (build_vtable_entry): Mark thunks as needing to be emitted with
12051         their vtables, or not.
12052         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
12053         * decl2.c (mark_vtable_entries): Use use_thunk instead of
12054         emit_thunk.
12055         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
12056         information.
12057         * error.c (dump_expr): Use BV_FN.
12058         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
12059         not an int.
12060         * method.c (make_thunk): Likewise.
12061         (emit_thunk): Rename to use_thunk.  Allow callers to decide
12062         whether or not to actually emit the thunk.  Adjust for changes in
12063         representation of vcall offsets.
12064         * search.c (dfs_get_pure_virtuals): Use BV_FN.
12065         * semantics.c (emit_associated_thunks): New function.
12066         (expand_body): Use it.
12067         * ir.texi: Adjust decriptions of thunks.
12069 2000-06-22  Jason Merrill  <jason@redhat.com>
12071         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
12072         (tsubst_friend_function): Copy it here.
12074         * decl.c (grok_op_properties): Fix typo.
12076         * decl2.c (delete_sanity): Clarify warning, avoid failure on
12077         deleting void*.
12079         * pt.c (check_explicit_specialization): Clarify error.
12081         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
12082         an old OVERLOAD when we're declaring a non-function.
12083         (pushdecl, destroy_local_var): Check for error_mark_node.
12084         (warn_extern_redeclared_static): Also bail early if
12085         we're a CONST_DECL.
12086         (push_overloaded_decl): Ignore an old error_mark_node.
12088 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
12090         * call.c (build_x_va_arg): Check if in a template decl.
12091         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
12093 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12095         * class.c (push_lang_context): TYPE_NAME gets you to the Java
12096         types DECLs.
12097         * decl.c (check_goto): Computed gotos assumed OK.
12099 2000-06-20  Jason Merrill  <jason@redhat.com>
12101         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
12102         for which we don't need to look for instantiations.
12104 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
12106         * parse.y (program): Always call finish_translation_unit.
12107         * parse.c, parse.h: Rebuilt.
12109 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
12111         * method.c: Don't include hard-reg-set.h.
12113 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12115         * rtti.c (get_base_offset): Cope when vbase field is in a base.
12117 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12119         * call.c (build_conditional_expr): Use VOID_TYPE_P.
12120         * cvt.c (cp_convert_to_pointer): Likewise.
12121         (convert_to_void): Likewise.
12122         * error.c (dump_expr): Likewise.
12123         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
12124         * init.c (build_delete): Likewise.
12125         * method.c (emit_thunk): Likewise.
12126         * optmize.c (declare_return_variable): Likewise.
12127         * rtti.c (get_tinfo_decl_dynamic): Likewise.
12128         (get_typeid): Likewise.
12129         (build_dynamic_cast_1): Likewise.
12130         * typeck.c (composite_pointer_type): Likewise.
12131         (common_type): Likewise.
12132         (build_indirect_ref): Likewise.
12133         (build_binary_op): Likewise.
12134         (build_x_compound_expr): Likewise.
12135         (check_return_expr): Likewise.
12136         * typeck2.c (add_exception_specifier): Likewise.
12138         * mangle.c (write_method_parms): Use direct comparison for end
12139         of parmlist.
12141 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
12143         * cp-tree.h (genrtl_try_block): Declare function.
12144         (genrtl_handler): Likewise.
12145         (genrtl_catch_block): Likewise.
12146         (genrtl_ctor_stmt): Likewise.
12147         (genrtl_subobject): Likewise.
12148         (genrtl_decl_cleanup): Likewise.
12149         (genrtl_do_poplevel): Likewise.
12150         (genrtl_do_pushlevel): Likewise.
12151         (genrtl_clear_out_block): Likewise.
12152         (genrtl_goto_stmt): Likewise.
12153         (genrtl_expr_stmt): Likewise.
12154         (genrtl_decl_stmt): Likewise.
12155         (genrtl_if_stmt): Likewise.
12156         (genrtl_while_stmt): Likewise.
12157         (genrtl_do_stmt): Likewise.
12158         (genrtl_return_stmt): Likewise.
12159         (genrtl_for_stmt): Likewise.
12160         (genrtl_break_stmt): Likewise.
12161         (genrtl_continue_stmt): Likewise.
12162         (genrtl_scope_stmt): Likewise.
12163         (genrtl_switch_stmt): Likewise.
12164         (genrtl_case_label): Likewise.
12165         (genrtl_begin_compound_stmt): Likewise.
12166         (genrtl_finish_compound_stmt): Likewise.
12167         (genrtl_compound_stmt): Likewise.
12168         (genrtl_asm_stmt): Likewise.
12169         (genrtl_named_return_value): Likewise.
12170         (genrtl_begin_stmt_expr): Likewise.
12171         (genrtl_finish_stmt_expr): Likewise.
12172         (finish_for_stmt): Removed first argument.
12173         (finish_switch_stmt): Likewise.
12175         * semantics.c (genrtl_try_block): Define function.
12176         (genrtl_handler): Likewise.
12177         (genrtl_catch_block): Likewise.
12178         (genrtl_ctor_stmt): Likewise.
12179         (genrtl_subobject): Likewise.
12180         (genrtl_decl_cleanup): Likewise.
12181         (genrtl_do_poplevel): Likewise.
12182         (genrtl_do_pushlevel): Likewise.
12183         (genrtl_clear_out_block): Likewise.
12184         (genrtl_goto_stmt): Likewise.
12185         (genrtl_expr_stmt): Likewise.
12186         (genrtl_decl_stmt): Likewise.
12187         (genrtl_if_stmt): Likewise.
12188         (genrtl_while_stmt): Likewise.
12189         (genrtl_do_stmt): Likewise.
12190         (genrtl_return_stmt): Likewise.
12191         (genrtl_for_stmt): Likewise.
12192         (genrtl_break_stmt): Likewise.
12193         (genrtl_continue_stmt): Likewise.
12194         (genrtl_scope_stmt): Likewise.
12195         (genrtl_switch_stmt): Likewise.
12196         (genrtl_case_label): Likewise.
12197         (genrtl_begin_compound_stmt): Likewise.
12198         (genrtl_finish_compound_stmt): Likewise.
12199         (genrtl_compound_stmt): Likewise.
12200         (genrtl_asm_stmt): Likewise.
12201         (genrtl_named_return_value): Likewise.
12202         (genrtl_begin_stmt_expr): Likewise.
12203         (genrtl_finish_stmt_expr): Likewise.
12204         (finish_for_stmt): Removed first argument and generate rtl
12205         specific code.
12206         (finish_switch_stmt): Likewise.
12207         (do_poplevel): Removed generate rtl specific code.
12208         (do_pushlevel): Likewise.
12209         (add_tree): Likewise.
12210         (finish_goto_stmt): Likewise.
12211         (finish_expr_stmt): Likewise.
12212         (begin_if_stmt): Likewise.
12213         (finish_if_stmt_cond): Likewise.
12214         (finish_then_clause): Likewise.
12215         (begin_else_clause): Likewise.
12216         (finish_else_clause): Likewise.
12217         (finish_if_stmt): Likewise.
12218         (clear_out_block): Likewise.
12219         (begin_while_stmt): Likewise.
12220         (finish_while_stmt_cond): Likewise.
12221         (finish_while_stmt): Likewise.
12222         (begin_do_stmt): Likewise.
12223         (finish_do_body): Likewise.
12224         (finish_do_stmt): Likewise.
12225         (finish_return_stmt): Likewise.
12226         (begin_for_stmt): Likewise.
12227         (finish_for_init_stmt): Likewise.
12228         (finish_for_cond): Likewise.
12229         (finish_for_expr): Likewise.
12230         (finish_break_stmt): Likewise.
12231         (finish_continue_stmt): Likewise.
12232         (begin_switch_stmt): Likewise.
12233         (finish_switch_cond): Likewise.
12234         (finish_case_label): Likewise.
12235         (begin_try_block): Likewise.
12236         (begin_function_try_block): Likewise.
12237         (finish_try_block): Likewise.
12238         (finish_cleanup_try_block): Likewise.
12239         (finish_cleanup): Likewise.
12240         (finish_function_try_block): Likewise.
12241         (finish_handler_sequence): Likewise.
12242         (finish_function_handler_sequence): Likewise.
12243         (begin_handler): Likewise.
12244         (finish_handler_parms): Likewise.
12245         (begin_catch_block): Likewise.
12246         (finish_handler): Likewise.
12247         (begin_compound_stmt): Likewise.
12248         (finish_compound_stmt): Likewise.
12249         (finish_asm_stmt): Likewise.
12250         (finish_label_stmt): Likewise.
12251         (finish_label_decl): Likewise.
12252         (finish_subobject): Likewise.
12253         (finish_decl_cleanup): Likewise.
12254         (finish_named_return_value): Likewise.
12255         (begin_stmt_expr): Likewise.
12256         (finish_stmt_expr): Likewise.
12258         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
12259         to call genrtl_expr_stmt when appropriate.
12261         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
12262         begin_compound_expr to call genrtl_begin_stmt_expr and
12263         genrtl_begin_compound_expr when appropriate.
12264         (finish_init_stmts): Changed calls to finish_compound_expr and
12265         finish_stmt_expr to call genrtl_finish_compound_expr and
12266         genrtl_finish_stmt_expr when appropriate.
12267         (expand_default_init): Changed call to finish_expr_stmt to call
12268         genrtl_expr_stmt when appropriate.
12269         (build_vec_init): Likewise.
12271         * parse.y (simple_stmt): Removed first argument from call to
12272         finish_for_stmt. Removed first argument from call to
12273         finish_switch_stmt.
12275         * parse.c: Regenerated.
12277         * pt.c (tsubst_expr): Removed first argument from call to
12278         finish_for_stmt. Removed first argument from call to
12279         finish_switch_stmt.
12281 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
12283         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
12284         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
12286         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
12287         (cplus_tree_code_length[]): Likewise.
12288         (cplus_tree_code_name[]): Likewise.
12289         (init_parse): Added call to add_c_tree_codes. Changed
12290         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
12292 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
12294         * cp-tree.h (finish_mem_initializers): Declare.
12295         (count_trees): Likewise.
12296         * parse.y (base_init): Use finish_mem_initializers.
12297         * semantics.c (finish_mem_initializers): New function.
12299         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
12300         the number of trees.
12301         (n_trees): Remove.
12302         (count_trees): Don't use it.
12304 2000-06-15  Jason Merrill  <jason@redhat.com>
12306         * tree.c (count_trees): New debugging function.
12308         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
12309         * init.c (build_member_call): Pull out the name of a DECL.
12311         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
12312         * semantics.c (expand_body): Push to TV_INTEGRATION here.
12313         * optimize.c (optimize_function): Not here.
12314         * pt.c (instantiate_decl): Push to TV_PARSE.
12316 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
12318         * cp-tree.h (struct language_function): Remove x_base_init_list
12319         and x_member_init_list.
12320         (current_base_init_list): Remove.
12321         (current_member_init_list): Likewise.
12322         (setup_vtbl_ptr): Change prototype.
12323         (emit_base_init): Likewise.
12324         (expand_member_init): Likewise.
12325         (reinit_parse_for_function): Remove.
12326         * decl.c (save_function_data): Don't clear x_base_init_list and
12327         x_member_init_list.
12328         (mark_language_function): Don't mark them.
12329         * init.c (perform_member_init): Tweak comment.
12330         (sort_member_init): Take the list of initializers as an argument.
12331         (sort_base_init): Likewise.
12332         (emit_base_init): Likewise.
12333         (expand_member_init): Return the initializer.  Don't use global
12334         variables.
12335         * lex.c (reinit_parse_for_function): Remove.
12336         * method.c (build_template_parm_names): Correct substitution.
12337         (do_build_copy_constructor): Don't use current_member_init_list
12338         and current_base_init_list.
12339         (synthesize_method): Likewise.
12340         * parse.y (base_init): Split mem-initializers into
12341         base-initializers and field-initializers.
12342         (member_init_list): Build up the list here.
12343         (member_init): Return the initializer.
12344         (fn.depfn): Don't use reinit_parse_for_function.
12345         * parse.c: Regenerated.
12346         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
12347         ERROR_MARK.
12348         (tsubst_expr): Don't use current_member_init_list
12349         and current_base_init_list.
12350         (tsubst_expr_values): Rename to ...
12351         (tsubst_initializer_list): ... this.  Use convert_from_reference.
12352         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
12353         and current_base_init_list.
12354         (begin_function_definition): Don't call reinit_parse_for_function.
12356         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
12358         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
12359         correctly.
12361         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
12363 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
12365         * cp-tree.h (IF_COND): Move to c-common.h.
12366         (THEN_CLAUSE): Likewise.
12367         (ELSE_CLAUSE): Likewise.
12368         (WHILE_COND): Likewise.
12369         (WHILE_BODY): Likewise.
12370         (DO_COND): Likewise.
12371         (DO_BODY): Likewise.
12372         (RETURN_EXPR): Likewise.
12373         (EXPR_STMT_EXPR): Likewise.
12374         (FOR_INIT_STMT): Likewise.
12375         (FOR_COND): Likewise.
12376         (FOR_EXPR): Likewise.
12377         (FOR_BODY): Likewise.
12378         (SWITCH_COND): Likewise.
12379         (SWITCH_BODY): Likewise.
12380         (CASE_LOW): Likewise.
12381         (CASE_HIGH): Likewise.
12382         (GOTO_DESTINATION): Likewise.
12383         (COMPOUND_BODY): Likewise.
12384         (ASM_CV_QUAL): Likewise.
12385         (ASM_STRING): Likewise.
12386         (ASM_OUTPUTS): Likewise.
12387         (ASM_INPUTS): Likewise.
12388         (ASM_CLOBBERS): Likewise.
12389         (DECL_STMT_DECL): Likewise.
12390         (STMT_EXPR_STMT): Likewise.
12391         (LABEL_STMT_LABEL): Likewise.
12392         (SCOPE_BEGIN_P): Likewise.
12393         (SCOPE_END_P): Likewise.
12394         (SCOPE_STMT_BLOCK): Likewise.
12395         (SCOPE_NULLIFIED_P): Likewise.
12396         (SCOPE_NO_CLEANUPS_P): Likewise.
12397         (SCOPE_PARTIAL_P): Likewise.
12398         (ASM_VOLATILE_P): Likewise.
12399         (STMT_LINENO): Likewise.
12400         (STMT_LINENO_FOR_FN_P): Likewise.
12402         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
12403         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
12404         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
12405         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
12406         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
12408         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
12410         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
12411         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
12413         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
12414         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
12415         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
12417 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
12419         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
12420         * class.c (dfs_find_final_overrider): Set it appropriately.
12421         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
12422         avoid unneeded secondary vptrs.
12424 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12426         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
12427         (check_bitfield_decl, check_field_decl): Likewise.
12428         (build_vtbl_or_vbase_field, build_base_field): Likewise.
12429         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
12430         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
12431         (xfer_tag, finish_enum): Likewise.
12432         * decl2.c (finish_builtin_type): Likewise.
12433         * init.c (init_init_processing): Likewise.
12434         * pt.c (instantiate_class_template): Likewise.
12435         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
12436         * cp-tree.h (struct lang_type): Add user_align member.
12437         (CLASSTYPE_USER_ALIGN): Define.
12439 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
12441         * Make-lang.in (c++.install-common): Install g++-cross in
12442         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
12443         $(target_alias)-g++ and $(target_alias)-c++.
12445 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
12447         * class.c (vcall_offset_data_s): Add last_init and fns.
12448         (overrides): Rename to same_signature_p.
12449         (dfs_find_final_overrider): Adjust accordingly.
12450         (mark_overriders): Likewise.
12451         (warn_hidden): Likewise.
12452         (build_vtbl_initializer): Reorganize machinery for building things
12453         at negative offsets.
12454         (build_vcall_and_vbase_vtbl_entries): Likewise.
12455         (build_vbase_offset_vtbl_entries): Likewise.
12456         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
12457         offset entries.  Do not create two entries for functions with the
12458         same signature.
12459         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
12460         (build_rtti_vtbl_entries): Reorganize machinery for building things
12461         at negative offsets.
12463         * optimize.c (expand_call_inline): Don't recurse into the code
12464         used to initialize the parameters more than once.
12466 2000-06-11  Mark Mitchell <mark@codesourcery.com>
12468         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
12469         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
12470         (find_substitution): Only use the `Sa' substitution for
12471         std::allocator, not instantiations of it.
12472         (write_template_prefix): Move comment.  Only use a TREE_LIST to
12473         represent substitutions for a member template.
12474         (write_array_type): Mangle array dimensions correctly.
12475         * optimize.c (maybe_clone_body): Copy more information from the
12476         cloned function.
12477         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
12478         on the regenerated declaration.
12480 2000-06-11  Chip Salzenberg  <chip@valinux.com>
12481             Mark Mitchell <mark@codesourcery.com>
12483         * class.c (build_vtable): Clarify comment.
12484         (build_ctor_vtbl_group): Pass the most derived type to
12485         build_vtable.
12487 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12489         * decl2.c (compare_options): Don't needlessly cast away const-ness.
12491 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
12493         * decl.c (add_binding): Handle duplicate declarations of external
12494         variables.
12496 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12497             Mark Mitchell <mark@codesourcery.com>
12499         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
12500         argument.
12501         (write_signed_number): New macro.
12502         (write_unsigned_number): Likewise.
12503         (write_source_name): Use them.
12504         (write_number): Handle signed and unsigned values.
12505         (write_integer_cst): Use tree_int_cst_sgn, and use
12506         write_unsigned_number or write_signed_number as appropriate.
12507         (write_discriminator): Use write_unsigned_number or
12508         write_signed_number as appropriate.
12509         (write_template_arg_literal): Likewise.
12510         (write_array_type): Use tree_low_cst.
12511         (write_template_parm):  Use write_unsigned_number or
12512         write_signed_number as appropriate.
12513         (write_substitution): Adjust call to write_number.
12514         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
12515         (write_expression): Handle non-type template arguments of
12516         reference type correctly.
12517         (mangle_thunk): Use write_signed_number.
12519 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12521         * mangle.c (find_substition): Don't mangle objects with typename
12522         substitutions (e.g. "cin" as "Si").
12524 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
12526         * call.c (add_candidate): Use ggc_alloc_cleared.
12527         * decl.c (lookup_label): Likewise.
12528         * lex.c (retrofit_lang_decl): Likewise.
12530 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
12532         * semantics.c (expand_body): Push to TV_EXPAND.
12533         * optimize.c (optimize_function): Push to TV_INTEGRATION.
12534         * decl.c (start_function): Always call announce_function.
12536         * tinfo2.cc: Just declare abort.
12538 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
12540         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
12541         whenever @ is a symbolic name.
12543 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
12545         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
12547 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
12549         * decl.c (pushdecl): Look up functions by DECL_NAME, not
12550         DECL_ASSEMBLER_NAME.
12552 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12554         * decl2.c (c_language): Define.
12556 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
12558         * lex.c (lang_init_options): Tweak.
12560         * decl2.c: Remove #inclusion of diagnostic.h
12561         (lang_decode_option): Move diagnostic formatting options to
12562         toplevel.
12564         * lang-options.h: Remove documentation for diagnostic options.
12566         * Makefile.in (lex.o): Depends upon diagnostic.h
12568 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12570         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
12571         the same DECL_RESULT, it's not a redefinition.
12572         * pt.c (tsubst_decl): Remove code to handle illegal
12573         specializations.
12575 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
12577         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
12579 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
12581         * search.c (maybe_suppress_debug_info): Don't check
12582         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
12584         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
12585         here if extern_p.
12587         Remember instantiation context in deferred instantiations.
12588         * cp-tree.h (struct tinst_level): Remove.
12589         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
12590         * pt.c (current_tinst_level): Now a tree.
12591         (print_template_context, push_tinst_level, pop_tinst_level,
12592         tinst_for_decl): Adjust.
12593         (reopen_tinst_level): New fn.
12594         (init_pt): Register current_tinst_level as a root.
12595         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
12596         of the pending templates list.
12597         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
12598         * lex.c (extract_interface_info): Adjust.
12599         * decl2.c (warn_if_unknown_interface): Adjust.
12601 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
12603         * class.c (indirect_primary_base_p): New function.
12604         (determine_primary_base): Use it.
12606 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12608         Update new-abi dynamic cast algorithm.
12609         * tinfo.cc (__class_type_info::__dyncast_result): Add
12610         whole_details. Adjust constructor.
12611         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
12612         Avoid unnecessary searching.
12613         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
12615 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12617         * decl.c (init_decl_processing): Don't call record_component_aliases.
12618         * tree.c (build_cplus_array_type_1): Likewise.
12620 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
12622         * ir.texi: Correct typo.
12623         * mangle.c (write_expression): Handle non-type template arguments
12624         with reference type.
12625         * method.c (build_overload_value): Likewise.
12626         * pt.c (convert_nontype_argument): Explicitly represent conversion
12627         to a reference with an ADDR_EXPR.
12628         (unify): Always unify arguments in left-to-right order.
12630 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
12631             Mark Mitchell  <mark@codesourcery.com>
12633         * Make-lang.in (CXX_SRCS): Add mangle.c.
12634         * Makefile.in (CXX_OBJS): Add mangle.o.
12635         (mangle.o): New rule.
12637         * class.c (local_classes): New variable.
12638         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
12639         (get_vtt_name): Use mangle_vtt_name for new ABI.
12640         (init_class_processing): Initialize local_classes.
12641         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
12642         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
12643         (std_identifier): New macro.
12644         (DECL_VOLATILE_MEMFUNC_P): New macro.
12645         (DECL_NAMESPACE_STD_P): Likewise.
12646         (local_classes): Declare.
12647         (get_mostly_instantiated_function_type): Declare.
12648         (init_mangle): Declare.
12649         (mangle_decl): Likewise.
12650         (mangle_type_string): Likewise.
12651         (mangle_type): Likewise.
12652         (mangle_typeinfo_for_type): Likewise.
12653         (mangle_typeinfo_string_for_type): Likewise.
12654         (mangle_vtbl_for_type): Likewise.
12655         (mangle_vtt_for_type): Likewise.
12656         (mangle_ctor_vtbl_for_type): Likewise.
12657         (mangle_thunk): Likewise.
12658         (mangle_conv_op_name_for_type): Likewise.
12659         (mangle_guard_variable): Likewise.
12660         * decl.c (pushtag): Keep track of local classes.
12661         (initialize_predefined_identifiers): Initialize std_identifier.
12662         (init_decl_processing): Use std_identifier.
12663         (start_decl): Don't treat instantiations as specializations.
12664         (grokdeclarator): Likewise.
12665         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
12666         name for fully-instantiated templates.
12667         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
12668         destructors with the new ABI.
12669         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
12670         (grokfield): Use mangle_type for new ABI.
12671         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
12672         (get_sentry): Use mangle_guard_variable for new ABI.
12673         (start_static_initialization_or_destruction): Likewise.
12674         * expr.c (extract_aggr_init): Remove.
12675         (extract_scalar_init): Likewise.
12676         (extract_init): Remove #if 0'd code.
12677         * mangle.c: New function.
12678         * method.c (build_mangled_name): Assert not flag_new_abi.
12679         (build_static_name): Likewise.
12680         (build_decl_overload_real): Likewise.
12681         (build_typename_overload): Likewise.
12682         (build_overload_with_type): Likewise.
12683         (build_overload_name): Likewise.
12684         (get_ctor_vtbl_name): Likewise.
12685         (start_squangling): Likewise.
12686         (get_id_2): Likewise.
12687         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
12688         (init_method): Call init_mangle for new ABI.
12689         (make_thunk): Call mangle_thunk for new ABI.
12690         * operators.def: Correct new ABI manglings for the `%' operator.
12691         Add `::' operator.
12692         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
12693         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
12694         (lookup_template_class): Call mangle_decl for new ABI.
12695         (get_mostly_instantiated_function_type): New function.
12696         (set_mangled_name_for_template_decl): Use it.
12697         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
12698         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
12699         conversion op names.
12700         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
12701         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
12702         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
12703         mangle_typeinfo_string_for_type.
12705 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
12707         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
12708         (INNERMOST_TEMPLATE_ARGS): New macro.
12709         (innermost_args): Remove.
12710         (get_innermost_template_args): New function.
12711         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
12712         * error.c (dump_function_decl): Be caution when using
12713         most_general_template.
12714         * method.c (build_template_parm_names):  Use
12715         INNERMOST_TEMPLATE_ARGS.
12716         * pt.c (add_to_template_args): Tidy comment
12717         (get_innermost_template_args): New function.
12718         (check_explicit_specialization): Clear DECL_INITIAL for a new
12719         specialization.
12720         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
12721         Tidy.
12722         (push_template_decl): Always register specializations of the most
12723         general template.
12724         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
12725         (coerce_template_parms): Likewise.
12726         (lookup_template_class): Likewise.
12727         (innermost_args): Remove.
12728         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
12729         (tsubst_decl): Handle tricky specializations.  Use
12730         get_innermost_template_args.
12731         (instantiate_template): Simplify handling of partial
12732         instantiations.
12733         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
12734         (most_general_template): Reimplement, in a more straightforward
12735         manner.
12736         (regenerate_decl_from_template): Tweak formatting.  Use
12737         TMPL_ARGS_DEPTH for clarity.
12738         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
12740         * dump.c (dequeue_and_dump): Dump information about thunks.
12742 2000-06-01  Richard Henderson  <rth@cygnus.com>
12744         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
12746 2000-06-01  Richard Henderson  <rth@cygnus.com>
12748         * decl2.c (unsupported_options): Fix typo, make const.
12749         (lang_decode_option): Fix bsearch argument order.
12751 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
12753         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
12754         on FIELD_DECLs.
12756 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12758         * cp-tree.h (c_get_alias_set): Deleted.
12759         * Makefile.in (decl.o): Include ../expr.h.
12760         * decl.c (expr.h): Include.
12761         (init_decl_processing): Call record_component_aliases for arrays.
12762         (grokdeclarator): Likewise.
12763         Set TREE_ADDRESSABLE for fields that aren't bitfields.
12764         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
12766 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
12768         Remove guiding declaration support.
12769         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
12770         (flag_guiding_decls): Remove.
12771         * call.c (build_user_type_conversion_1): Remove support for
12772         guiding decls.
12773         (build_new_function_call): Likewise.
12774         (build_new_op): Likewise.
12775         (build_new_method_call): Likewise.
12776         * decl.c (start_function): Likewise.
12777         * friend.c (is_friend): Likewise.
12778         (do_friend): Likewise.
12779         * decl2.c ((flag_dump_translation_unit): Make it const.
12780         (flag_guiding_decls): Remove.
12781         (unsupported_options): New variable
12782         (compare_options): New function.
12783         (lang_decode_option): Use them.
12785         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
12787         * method.c (mangle_expression): Adjust test for legal expression
12788         operators.
12790         * pt.c (instantiate_decl): Save and restore the local
12791         specializations list.
12793 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
12795         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
12797 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
12799         * call.c (add_template_candidate_real): Handle member template
12800         constructors for classes with virtual bases.
12801         (build_user_type_conversion_1): Use in_charge_arg_for_name.
12802         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
12804         * ir.texi: Update thunk documentation.
12806         * call.c (joust): Fix handling of overloaded builtin operators.
12808 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
12810         * cp-tree.h (DECL_ANTICIPATED): New macro.
12811         Document new use of DECL_LANG_FLAG_7.
12812         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
12813         in the user namespace.
12814         * lex.c (do_identifier): If the identifier's declaration has
12815         DECL_ANTICIPATED on, it has not yet been declared.  But do not
12816         replace it with an ordinary implicit declaration.
12818         * tinfo2.cc: Include stdlib.h.
12820 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
12822         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
12823         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
12824         CLASSTYPE_ALIGN.
12826 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
12828         * decl2.c (lang_decode_option): Use skip_leading_substring instead
12829         of plain strncmp.
12831 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
12833         * operators.def (<?): Duplicated, should have been...
12834         (>?): this.  Fixed.
12836 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
12837             Mark Mitchell  <mark@codesourcery.com>
12839         * cp-tree.h (ansi_opname): Make it a macro.
12840         (ansi_assopname): Likewise.
12841         (struct lang_decl_flags): Add assignment_operator_p.
12842         (struct lang_decl): Add operator_code.
12843         (DECL_VTT_PARM): Adjust.
12844         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
12845         overloaded operator.
12846         (SET_OVERLOADED_OPERATOR_CODE): New macro.
12847         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
12848         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
12849         (opname_tab): Remove.
12850         (assignop_tab): Likewise.
12851         (operator_name_info_t): New type.
12852         (operator_name_info): New variable.
12853         (assignment_operator_name_info): Likewise.
12854         (build_cp_library_fn): Remove declaration.
12855         (push_cp_library_fn): Likewise.
12856         (operator_name_string): Likewise.
12857         (build_decl_overload): Likewise.
12858         * call.c (print_z_candidates): Simplify.
12859         (build_object_call): Adjust usage of ansi_opname.  Use
12860         DECL_OVERLOADED_OPERATOR_P.
12861         (op_error): Adjust operator name lookup.
12862         (build_conditional_expr): Adjust usage of ansi_opname.
12863         (build_new_op): Likewise.
12864         (build_op_delete_call): Likewise.
12865         (build_over_call): Likewise.
12866         (joust): Use DECL_OVERLOADED_OPERATOR_P.
12867         * decl.c (duplicate_decls): Copy operator_code.
12868         (init_decl_processing): Adjust parameters to push_cp_library_fn.
12869         (builtin_function): Adjust parameters to build_library_fn_1.
12870         (build_library_fn_1): Accept an overloaded operator code.
12871         (build_library_fn): Pass ERROR_MARK.
12872         (build_cp_library_fn): Accept an overloaded operator code.
12873         (push_cp_library_fn): Likewise.
12874         (grokfndecl): Tweak.
12875         (grokdeclarator): Simplify code to compute names of overloaded
12876         operators.  Adjust use of ansi_opname.
12877         (ambi_op_p): Work on tree_codes, not identifiers.
12878         (unary_op_p): Likewise.
12879         (grok_op_properties): Likewise.
12880         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
12881         (lang_mark_tree): Don't try to mark the operator_code.
12882         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
12883         * error.c (dump_decl): Remove special handling for operator
12884         names.
12885         (dump_function_name): Likewise.
12886         (dump_expr): Adjust name lookup of operators.
12887         (op_to_string): Simplify.
12888         (assop_to_string): Likewise.
12889         * init.c (build_new_1): Adjust use of ansi_opname.
12890         * lex.c (opname_tab): Remove.
12891         (assignop_tab): Likewise.
12892         (ansi_opname): Likewise.
12893         (ansi_assopname): Likewise.
12894         (operator_name_string): Likewise.
12895         (reinit_lang_specific): Likewise.
12896         (operator_name_info): New variable.
12897         (assignment_operator_name_info): Likewise.
12898         (init_operators): New function.
12899         (init_parse): Use it.
12900         (do_identifier): Adjust use of ansi_opname.
12901         * method.c (mangle_expression): Don't use ansi_opname for
12902         mangling.
12903         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
12904         (build_decl_overload): Remove.
12905         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
12906         (do_build_assign_ref): Adjust use of ansi_opname.
12907         (synthesize_method): Likewise.
12908         (implicitly_declare_fn): Likewise.
12909         * operators.def: New file.
12910         * parse.y (operator): Adjust use of ansi_opname.
12911         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
12912         (set_mangled_name_for_template_decl): Don't play games with
12913         current_namespace.
12914         (special_function_p): Adjust use of ansi_opname.
12915         * typeck.c (check_return_expr): Likewise.
12916         * Make-lang.in (cc1plus): Depend on operators.def.
12917         * Makefile.in (lex.o): Likewise.
12918         (decl.o): Likewise.
12920 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
12922         * Make-lang.in (cplib2.ready): Eradicate.
12924 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12926         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
12927         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
12928         (built_min, cp_tree_equal): Likewise.
12930 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12932         * class.c (layout_nonempty_base_or_field): Replace
12933         `record_layout_info' with `record_layout_info_s'.
12935 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
12937         Fix goto checking.
12938         * cp-tree.h (struct language_function): x_named_labels is now
12939         a struct named_label_list*.
12940         * decl.c (struct named_label_use_list): Renamed from...
12941         (struct named_label_list): ...this.  New struct.
12942         (push_binding_level): Don't set eh_region.
12943         (note_level_for_eh): New fn.
12944         (pop_label): Take label and old value directly.
12945         (pop_labels): Adjust for new named_labels format.
12946         (lookup_label): Likewise.
12947         (poplevel): Note characteristics of a binding level containing a
12948         named label.  Mess with named label lists earlier.
12949         (mark_named_label_lists): New fn.
12950         (mark_lang_function): Call it.
12951         (use_label): New fn, split out from...
12952         (make_label_decl): ...here.  Don't call it.
12953         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
12954         check_previous_gotos): New fns, split out from...
12955         (define_label): ...here.
12956         (check_switch_goto): New fn.
12957         (define_case_label): Call it.
12958         (check_goto): New fn.
12959         * semantics.c (finish_goto_stmt): Call it and use_label.
12960         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
12961         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
12963 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
12965         * class.c (build_vtable_entry_ref): Correct usage of
12966         get_vtbl_decl_for_binfo.
12968         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
12969         * method.c (implicitly_declare_fn): Not here.
12971 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
12973         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
12974         (CPTI_PTMD_DESC_TYPE): ... here.
12975         (ptmd_desc_type_node): Rename to ...
12976         (ptm_desc_type_node): ... here.
12977         * decl.c: Likewise.
12978         * rtti.c (ptmd_initializer): Rename to ...
12979         (ptm_initializer): ... here.
12980         (sythesize_tinfo_var): Adjust. Deal with pointer to member
12981         function.
12982         (create_tinfo_types): Adjust.
12984 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
12986         Finish implementation of VTTs.
12987         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
12988         CPTI_VTT_PARM_IDENTIFIER.
12989         (vtt_parm_identifier): New macro.
12990         (vtt_parm_type): Likewise.
12991         (BINFO_SUBVTT_INDEX): Likewise.
12992         (BINFO_VPTR_INDEX): Likewise.
12993         (struct lang_decl): Add vtt_parm.
12994         (DECL_VTT_PARM): New macro.
12995         (DECL_USE_VTT_PARM): Likewise.
12996         (DECL_NEEDS_VTT_PARM_P): Likewise.
12997         (get_vtt_name): Declare.
12998         (build_artificial_parm): Likewise.
12999         (fixup_all_virtual_upcast_offsets): Likewise.
13000         (expand_indirect_vtbls_init): Remove.
13001         * call.c (build_new_method_call): Pass the vtt to subobject
13002         constructors and destructors.
13003         * class.c (get_vtt_name): Give it external linkage.
13004         (build_clone): Handle the magic VTT parameters for clones.
13005         (clone_function_decl): Fix typo in comment.
13006         (build_vtt): Keep track of the indices in the VTTs where various
13007         entities are stored.
13008         (build_vtt_inits): Likewise.
13009         (dfs_build_vtt_inits): Likewise.
13010         (build_ctor_vtbl_group): Tweak type of construction vtables.
13011         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
13012         primary bases, when building construction vtables.
13013         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
13014         (initialize_predefined_identifiers): Add vtt_parm_identifier.
13015         (init_decl_processing): Initialize vtt_parm_type.
13016         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
13017         (lang_mark_tree): Make vtt_parm.
13018         * decl2.c (build_artificial_parm): New function.
13019         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
13020         (grokclassfn): Use build_artificial_parm.
13021         * init.c (initialize_vtbl_ptrs): Call
13022         fixup_all_virtual_upcast_offsets directly.
13023         (perform_member_init): Use the complete subobject destructor for
13024         member cleanups.
13025         (build_vtbl_address): New function.
13026         (expand_virtual_init): Handle VTTs.
13027         * optimize (maybe_clone_body): Likewise.
13028         * search.c (fixup_all_virtual_upcast_offsets): Give it external
13029         linkage.
13030         (expand_indirect_vtbls_init): Remove.
13031         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
13032         * tree.c (make_binfo): Make them bigger.
13034 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13036         * inc/cxxabi.h (__pbase_type_info): Define, based on
13037         __pointer_type_info.
13038         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
13039         (__pointer_to_member_type_info): Likewise.
13040         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
13041         (__pointer_to_member_type_info::__is_pointer_p): Remove.
13042         (__pointer_type_info::__do_catch): Rename to ...
13043         (__pbase_type_info::__do_catch): ... here. Adjust.
13044         (__pbase_type_info::__pointer_catch): Implement.
13045         (__pointer_type_info::__pointer_catch): Adjust.
13046         (__pointer_to_member_type_info::__pointer_catch): Adjust.
13048 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13050         * tinfo.h (__user_type_info::contained_virtual_p): New
13051         predicate.
13052         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
13053         shaped hierarchy.
13054         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
13055         diamond shaped hierarchy. Add early out for mixed diamond and
13056         duplicate shaped hierarchy.
13058 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
13060         * cp-tree.h (build_delete): Change prototype.
13061         (build_vec_delete): Likewise.
13062         * call.c (build_scoped_method_call): Use special_function_kind
13063         values to indicate the kind of destruction to be done.
13064         (build_method_call): Likewise.
13065         * decl.c (finish_destructor_body): Likewise.
13066         (maybe_build_cleanup_1): Likewise.  Rename to ...
13067         (maybe_build_cleanup): ... this.
13068         * decl2.c (delete_sanity): Use special_function_kind
13069         values to indicate the kind of destruction to be done.
13070         (build_cleanup): Likewise.
13071         * init.c (perform_member_init): Likewise.
13072         (build_vec_delete_1): Likewise.
13073         (build_dtor_call): Simplify.
13074         (build_delete): Use special_function_kind
13075         values to indicate the kind of destruction to be done.
13076         (build_vbase_delete): Likewise.
13077         (build_vec_delete): Likewise.
13079         * init.c (sort_member_init): Fix typo in error message generation
13080         code.
13082 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
13084         * semantics.c (begin_class_definition): make the packed
13085         attribute be sensitive to the "-fpack-struct" command line flag
13087 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
13089         Update new-abi upcast algorithm.
13090         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
13091         prototype and meaning of return value.
13092         (__si_class_type_info::__do_upcast): Likewise.
13093         (__vmi_class_type_info::__do_upcast): Likewise.
13094         * tinfo.cc (__class_type_info::__upcast_result): Replace
13095         whole2dst with part2dst. Adjust ctor.
13096         (__class_type_info::__do_upcast): Adjust call of worker function.
13097         (__class_type_info::__do_upcast): Adjust.
13098         (__si_class_type_info::__do_upcast): Adjust. Use parent's
13099         __do_upcast.
13100         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
13101         virtual base in diamond hierarchy bug.
13103 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
13105         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
13106         and bitfield to tinfo_fn_p.
13107         (DECL_TINFO_FN_P): Adjust.
13108         (SET_DECL_TINFO_FN_P): Likewise.
13109         (DECL_MUTABLE_P): Likewise.
13110         (DECL_C_BIT_FIELD): Likewise.
13111         (SET_DECL_C_BIT_FIELD): Likewise.
13112         (CLEAR_DECL_C_BIT_FIELD): Likewise.
13113         (DECL_UNINLINABLE): Likewise.
13114         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
13115         (handle_using_decl): Remove assertion.
13116         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
13117         to build FIELD_DECLs.
13118         (build_base_field): Likewise.
13119         (layout_class_type): Likewise.
13120         * decl.c (init_decl_processing): Likewise.
13121         (build_ptrmemfunc_type): Likewise.
13122         (grokdeclarator): Likewise.
13123         * decl2.c (grok_x_components): Likewise.
13124         * except.c (call_eh_info): Likewise.
13125         * init.c (init_init_processing): Likewise.
13126         * rtti.c (expand_class_desc): Likewise.
13127         (create_pseudo_type_info): Likewise.
13128         (get_vmi_pseudo_type_info): Likewise.
13129         (create_tinfo_types): Likewise.
13130         * ptree.c (print_lang_decl): Adjust.
13131         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
13132         before checking DECL_MUTABLE_P.
13134         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
13135         parameters for template functions.
13136         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
13137         destructors as well as constructors.
13139 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
13141         * class.c (build_ctor_vtbl_group): Set inits.
13142         * optimize.c (maybe_clone_body): Set DECL_INLINE and
13143         DECL_THIS_INLINE appropriately for clones.
13145         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
13146         (DECL_CONV_FN_P): Simplify.
13147         (DECL_OPERATOR): Remove.
13148         (language_to_string): Declare.
13149         * decl.c (duplicate_decls): Fix typo in comment.
13150         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
13151         (grok_op_properties): Use DECL_CONV_FN_P instead of
13152         IDENTIFIER_TYPENAME_P.
13153         * dump.c (dequeue_and_dump): Dump the language linkage of
13154         declarations.
13155         * error.c (language_to_string): Give it external linkage.
13156         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
13157         (implicitly_declare_fn): Set DECL_LANGUAGE.
13158         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
13159         IDENTIFIER_TYPENAME_P.
13160         (tsubst_decl): Likewise.
13161         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
13162         * semantics.c (finish_member_declaration): Don't mark members of
13163         classes declared in an extern "C" region as extern "C".
13165 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13167         * decl2.c (qualified_lookup_using_namespace): Look through
13168         namespace aliases.
13170         * decl.c (push_using_decl): Return the old decl on namespace level.
13172 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
13174         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
13175         (VTT_NAME_PREFIX): New macro.
13176         (CTOR_VTBL_NAME_PREFIX): Likewise.
13177         (get_ctor_vtbl_name): New function.
13178         * class.c (get_vtable_name): Simplify.
13179         (get_vtt_name): New function.
13180         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
13181         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
13182         when a virtual base becomes primary.
13183         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
13184         VTTs.
13185         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
13186         additional parameters.
13187         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
13188         (initialize_array): New function.
13189         (build_vtt): Likewise.
13190         (build_vtt_inits): Likewise.
13191         (dfs_build_vtt_inits): Likewise.
13192         (dfs_fixup_binfo_vtbls): Likewise.
13193         (build_ctor_vtbl_group): Likewise.
13194         (initialize_vtable): Use initialize_array.
13195         (accumulate_vtbl_inits): Reimplement to handle construction
13196         vtables.
13197         (dfs_accumulate_vtbl_inits): Likewise.
13198         (bulid_vtbl_initializer): Adjust parameter name.
13199         * method.c (build_typename_overload): Remove #if 0'd code.
13200         (get_ctor_vtbl_name): New function.
13201         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
13202         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
13204         * cp-tree.h (struct lang_type): Remove search_slot.
13205         (CLASSTYPE_SEARCH_SLOT): Remove.
13206         (emit_base_init): Change prototype.
13207         (initialize_vtbl_ptrs): Likewise.
13208         (expand_indirect_vtbls_init): Likewise.
13209         (clear_search_slots): Remove.
13210         * decl.c (lang_mark_tree): Don't mark search_slot.
13211         * init.c (initialize_vtbl_ptrs): Simplify.
13212         (emit_base_init): Likewise.
13213         * search.c (struct vbase_info): Document decl_ptr.
13214         (convert_pointer_to_single_level): Remove.
13215         (dfs_find_vbases): Remove.
13216         (dfs_init_base_pointers): Simplify.
13217         (dfs_clear_vbase_slots): Remove.
13218         (dfs_vtable_path_unmark): New function.
13219         (init_vbase_pointers): Simplify.
13220         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
13221         (expand_indirect_vtbls_init): Simplify.  Don't call
13222         mark_all_temps_used.
13223         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
13224         initialize_vtbl_ptrs.
13226 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
13228         * except.c: Add static prototypes.
13230 2000-05-20  H.J. Lu  <hjl@gnu.org>
13232         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
13234 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
13236         Don't create a separate copy of virtual bases for the
13237         CLASSTYPE_VBASECLASSES list.
13238         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
13239         (BINFO_FOR_VBASE): Remove.
13240         (CANONICAL_BINFO): Adjust.
13241         (binfo_for_vbase): New function.
13242         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
13243         instead of BINFO_FOR_VBASE.
13244         (build_vbase_pointer): Likewise.
13245         (build_secondary_vtable): Likewise.
13246         (dfs_mark_primary_bases): Likewise.
13247         (mark_primary_bases): Likewise.
13248         (layout_nonempty_base_or_field): Likewise.
13249         (dfs_set_offset_for_shared_vbases): Likewise.
13250         (dfs_set_offset_for_unshared_vbases): Likewise.
13251         (layout_virtual_bases): Likewise.  Adjust for changes to the
13252         CLASSTYPE_VBASECLASSES list.
13253         (dump_class_hierarchy_r): Use binfo_for_vbase
13254         instead of BINFO_FOR_VBASE.
13255         (dump_class_hierarchy): Likewise.
13256         (finish_vtbls): Likewise.
13257         (build_vtbl_initializer): Adjust for changes to the
13258         CLASSTYPE_VBASECLASSES list.
13259         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
13260         * decl.c (finish_destructor_body): Adjust for changes to the
13261         CLASSTYPE_VBASECLASSES list.
13262         * init.c (sort_base_init): Use binfo_for_vbase.
13263         (construct_virtual_bases): Adjust for changes to the
13264         CLASSTYPE_VBASECLASSES list.
13265         (expand_member_init): Use binfo_for_vbase.
13266         (build_vbase_delete):  Adjust for changes to the
13267         CLASSTYPE_VBASECLASSES list.
13268         * method.c (do_build_copy_constructor): Likewise.
13269         * rtti.c (get_base_offset): Use binfo_for_vbase.
13270         (expand_class_desc): Remove #if 0'd code.
13271         * search.c (struct vbase_info): Remove vbase_types.
13272         (get_base_distance):  Use binfo_for_vbase.
13273         (lookup_field_queue_p): Use CANONICAL_BINFO.
13274         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
13275         (get_pure_virtuals): Adjust for changes to the
13276         CLASSTYPE_VBASECLASSES list.
13277         (dfs_find_vbases): Use binfo_for_vbase.
13278         (dfs_init_vbase_pointers): Likewise.
13279         (init_vbase_pointers): Don't initialize vi.vbase_types.
13280         (virtual_context): Use binfo_for_vbase.
13281         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
13282         CLASSTYPE_VBASECLASSES list.
13283         (expand_indirect_vtbls_init): Simplify.
13284         (dfs_get_vbase_types): Don't replicate virtual bases.
13285         (find_vbase_instance): Use binfo_for_vbase.
13286         (binfo_for_vbase): New function.
13287         * typeck.c (get_delta_difference): Use binfo_for_vbase.
13289 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
13291         * decl2.c (finish_anon_union): Generalize error messages to handle
13292         anonymous structures.
13293         * init.c (perform_member_init): Remove `name' parameter.
13294         (build_field_list): New function.
13295         (sort_member_init): Handle anonymous union initialization order
13296         correctly.  Check for multiple initializations of the same union.
13297         (emit_base_init): Don't look up fields by name here.
13298         (expand_member_init): Record the result of name lookup for future
13299         reference.
13300         * typeck.c (build_component_ref): Fix formatting.
13302 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
13304         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
13305         * typeck.c (build_x_compound_expr): Replace warn_unused with
13306         warn_unused_value.
13308         * decl2.c (lang_decode_option): Update -Wall unused flags by
13309         calling set_Wunused.
13311 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
13313         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
13314         * init.c (dfs_vtable_path_unmark): Remove.
13315         * search.c (marked_new_vtable_p): Likewise.
13316         (unmarked_new_vtable_p): Likewise.
13317         (dfs_search_slot_nonempty_p): Likewise.
13318         (dfs_mark): Likewise.
13319         (dfs_vtable_path_unmark): Likewise.
13320         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
13321         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
13322         (dfs_init_vbase_pointers): Remove special-case new ABI code.
13323         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
13324         (init_vbase_pointers): Simplify.
13325         (expand_indirect_vtbls_init): Likewise.
13327         * class.c (copy_virtuals): New function.
13328         (build_primary_table): Use it.
13329         (build_secondary_vtable): Likewise.
13330         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
13331         indicate that no vcall offset is required.
13332         (add_virtual_function): Likewise.
13333         (modify_all_vtables): Likewise.
13334         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13335         (dfs_accumulate_vtbl_inits): Likewise.
13336         (build_vtbl_initializer): Make changes to handle construction
13337         vtables.
13338         (dfs_build_vcall_offset_vtbl_entries): Likewise.
13339         (build_rtti_vtbl_entries): Likewise.
13340         (build_vtable_entries): Handle a NULL vcall_index.
13342 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13344         * decl2.c (lang_decode_option): Fix thinko.
13346 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
13348         * except.c (check_handlers): New fn.
13349         * cp-tree.h: Declare it.
13350         * semantics.c (finish_handler_sequence): Call it.
13351         (finish_function_handler_sequence): Likewise.
13352         (finish_handler_parms): Set TREE_TYPE on the handler.
13353         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
13354         * search.c (get_base_distance_recursive): If protect>1, ignore
13355         special access.
13356         (get_base_distance): Don't reduce watch_access.
13358 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
13360         * lex.c: #include diagnostic.h.
13361         (lang_init_options): Set default prefixing rules.
13363         * lang-options.h: Add -fdiagnostics-show-location=.
13365         * decl2.c: #include diagnostic.h.
13366         (lang_decode_option): Handle -fdiagnostics-show-location=.
13368 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
13370         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
13371         * vec.cc: Revert my 2000-05-07 change.
13373 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
13375         * class.c (check_field_decls): Complain about non-static data
13376         members with same name as class in class with constructor.
13378 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
13380         * decl.c (grokdeclarator): Allow non-static data members with
13381         same name as class.
13383 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
13385         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
13386         and pending_inline.filename.  Update prototypes.
13387         * decl.c (define_label): Constify filename parameter.
13388         * decl2.c (warn_if_unknown_interface): Constify local char *.
13389         * input.c Constify input_source.filename. Don't declare
13390         input_filename or lineno.  Constify filename parameter to feed_input.
13391         * lex.c (init_parse): Constify parameter and return value.
13392         (cp_pragma_interface, cp_pragma_implementation): Constify
13393         filename argument.
13394         (reinit_parse_for_method, reinit_parse_for_block,
13395         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
13396         Constify local char *.
13397         * pt.c: Don't declare lineno or input_filename.
13398         (print_template_context, tsubst_friend_function, tsubst_decl,
13399         tsubst, instantiate_decl): Constify local char *.
13400         * semantics.c (expand_body): Constify local char *.
13401         * tree.c (build_srcloc): Constify filename parameter.
13402         * typeck.c (c_expand_asm_operands): Constify filename
13403         parameter.
13405 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
13407         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
13408         offsetof expansion.
13410 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
13412         * inc/cxxabi.h:  Fix typos in comment.
13413         (__base_class_info::__offset): Use a static_cast.
13415 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
13417         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
13418         of std::size_t and std::ptrdiff_t respectively.
13419         * tinfo.cc: Likewise.
13420         * vec.cc: Likewise.
13422 2000-05-06  Richard Henderson  <rth@cygnus.com>
13424         * typeck.c (build_c_cast): Don't warn integer->pointer size
13425         mismatch for constants.
13427 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
13429         * rtti.c (ptmd_initializer): Set non-public, if class is
13430         incomplete.
13432         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
13433         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13434         __cxa_vec_delete): Likewise.
13435         * tinfo.cc (__dynamic_cast): Likewise.
13436         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13437         __cxa_vec_delete): Likewise.
13439 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13441         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
13442         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
13443         (lang_decl_flags): Add vcall_offset.
13444         (THUNK_VCALL_OFFSET): Use it.
13445         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
13446         * method.c (make_thunk): Create the lang_decl here, not in
13447         emit_thunk.
13448         (emit_thunk): Make generic thunks into ordinary functions once
13449         they have been fed to expand_body.
13450         * semantics.c (expand_body): Set current_function_is_thunk here.
13452 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13454         * class.c (update_vtable_entry_for_fn): Prototype.
13456         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
13457         and `tmpl'.
13459         * search.c (dfs_build_inheritance_graph_order): Prototype.
13461 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13463         * cp-tree.h (special_function_kind): Add various kinds of
13464         destructors.
13465         (special_function_p): New function.
13466         * class.c (overrides): Don't let one kind of destructor override
13467         another.
13468         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
13469         whether or not to instantiate a template.
13470         * tree.c (special_function_p): Define.
13472 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
13474         * cp-tree.def (THUNK_DECL): Remove.
13475         * cp-tree.h (DECL_THUNK_P): New macro.
13476         (DECL_NON_THUNK_FUNCTION_P): Likewise.
13477         (DECL_EXTERN_C_FUNCTION_P): Likewise.
13478         (SET_DECL_THUNK_P): Likewise.
13479         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
13480         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
13481         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
13482         * decl.c (decls_match): Use DECL_EXTERN_C_P.
13483         (duplicate_decls): Likewise.
13484         (pushdecl): Likewise.  Adjust thunk handling.
13485         (grokfndecl): Use DECL_EXTERN_C_P.
13486         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
13487         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
13488         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
13489         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
13490         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
13491         DECL_NO_STATIC_CHAIN.
13492         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
13493         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
13494         * search.c (covariant_return_p): Remove THUNK_DECL handling.
13495         * ir.texi: Update.
13497 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13499         * tree.c (walk_tree): Set lineno.
13501 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13503         * exception.cc: Update license notice.
13504         * new.cc: Likewise.
13505         * new1.cc: Likewise.
13506         * new2.cc: Likewise.
13507         * tinfo.cc: Likewise.
13508         * tinfo2.cc: Likewise.
13509         * vec.cc: Likewise.
13510         * inc/cxxabi.h: Likewise.
13511         * inc/exception: Likewise.
13512         * inc/new: Likewise.
13513         * inc/new.h: Likewise.
13514         * inc/typeinfo: Likewise.
13516 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13518         * tree.c (build_target_expr_with_type): If we already have a
13519         TARGET_EXPR, just return it.
13521         * optimize.c (initialize_inlined_parameters): Don't generate an
13522         EXPR_STMT if we can just use DECL_INITIAL.
13523         * decl.c (emit_local_var): Only make the initialization a
13524         full-expression if stmts_are_full_exprs_p.
13526 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13528         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
13529         macro.
13530         * call.c (standard_conversion): Use it.
13531         (direct_reference_binding): Likewise.
13532         (build_over_call): Likewise.
13533         (is_properly_derived_from): Likewise.
13534         (compare_ics): Likewise.
13535         * class.c (resolves_to_fixed_type_p): Likewise.
13536         * optimize.c (declare_return_variable): Likewise.
13537         * pt.c (is_specialization_of): Likewise.
13538         (unify): Likewise.
13539         * typeck.c (comp_target_parms): Likeiwse.
13540         (build_static_cast): Likewise.
13541         (build_reinterpret_cast): Likewise.
13542         (build_const_cast): Likewise.
13543         (comp_ptr_ttypes_real): Likewise.
13544         (comp_ptr_ttypes_const): Likewise.
13545         * typeck2.c (process_init_constructor): Likewise.
13547 2000-04-30  Scott Snyder <snyder@fnal.gov>
13549         * decl.c (finish_destructor_body): Use the base destructor when
13550         destroying virtual bases.
13552 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
13554         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
13555         STMT_EXPRs.
13556         * optimize.c (struct inline_data): Add target_exprs field.
13557         (declare_return_variable): When a function returns an aggregate,
13558         use the variable declared in the TARGET_EXPR as the remapped
13559         DECL_RESULT.
13560         (expand_call_inline): Update the pending target_exprs stack.
13561         (optimize_function): Initialize the stack.
13563         * decl2.c (finish_file): Fix typo in comment.
13565         * method.c (emit_thunk): Don't try to return a `void' value.
13567         * optimize.c (initialize_inlined_parameters): If the parameter is
13568         addressable, we need to make a new VAR_DECL, even if the
13569         initializer is constant.
13571 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
13573         * decl.c (grok_op_properties): Add an extra check of argtypes.
13575 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
13577         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
13578         variables.
13579         (initialize_inlined_parameters): Try to avoid creating new
13580         VAR_DECLs.
13582 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
13584         * lex.c (my_get_run_time): Remove.
13585         (init_filename_times): Use get_run_time instead of my_get_run_time.
13586         (check_newline): Likewise.
13587         (dump_time_statistics): Likewise.
13588         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
13589         of computing elapsed time explicitly.
13591 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
13593         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
13594         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
13595         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
13596         before calling decl_constant_value.
13597         * class.c (check_bitfield_decl): Likewise.
13598         * cvt.c (ocp_convert): Likewise.
13599         (convert): Likewise.
13600         * decl.c (compute_array_index_type): Likewise.
13601         (build_enumerator): Likewise.
13602         * decl2.c (check_cp_case_value): Likewise.
13603         * pt.c (convert_nontype_argument): Likewise.
13604         (tsubst): Likewise.
13605         * typeck.c (decay_conversion): Likewise.
13606         (build_compound_expr): Likewise.
13607         (build_reinterpret_cast): Likewise.
13608         (build_c_cast): Likewise.
13609         (convert_for_assignment): Likewise.
13611 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
13613         * decl.c (finish_function): Don't play games with DECL_INLINE.
13615 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
13617         * ir.texi: Correct typo.
13619 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13621         * decl.c (grokdeclarator): Reject VLAs as members.
13623 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
13625         * call.c (standard_conversion): Accept conversion between
13626         COMPLEX_TYPEs.
13628         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
13630 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
13632         * decl2.c (finish_file): Remove double setup for accounting
13633         compile time.
13635 2000-04-24  Robert Lipe <robertlipe@usa.net>
13637         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
13639 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
13641         * new.cc (set_new_handler): Needs to be in std::.
13643 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
13645         * cp-tree.h (lang_decl): Remove pretty_function_p.
13646         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
13647         language-specific node.
13648         * decl.c (cp_make_fname_decl): Use build_decl, not
13649         build_lang_decl, to build the variables.
13650         (grokvardecl): Don't call build_lang_decl for local variables in
13651         templates.
13652         (grokdeclarator): Don't call build_lang_decl for local type
13653         declarations in templates.
13654         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
13655         zero'd memory, rather than calling memset.
13656         * pt.c: Include hashtab.h.
13657         (local_specializations): New variable.
13658         (retrieve_local_specialization): Use it.
13659         (register_local_specialization): Likewise.
13660         (tsubst_decl): Don't assume local variables have
13661         DECL_LANG_SPECIFIC.
13662         (instantiate_decl): Set up local_specializations.
13663         * Makefile.in (HTAB_H): New variable.
13665 2000-04-23  Richard Henderson  <rth@cygnus.com>
13667         * typeck.c (c_expand_asm_operands): Restore the original
13668         contents of the output list.
13670 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
13672         * ir.texi:  Document complex number representation.
13674 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13676         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
13677         (target_incomplete_p): New function.
13678         (tinfo_base_init): Create comdat NTBS name variable.
13679         (ptr_initializer): Add non_public parameter. Calculate it.
13680         (ptmd_initializer): Likewise.
13681         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
13682         (create_real_tinfo_var): Add non_public parameter. Use it.
13683         Push proxy into global namespace.
13684         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
13685         New enumeration.
13686         * inc/typeinfo (type_info::before, type_info::operator==):
13687         Compare __name addresses.
13689         * tinfo2.cc: Remove new-abi builtins comment.
13691 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
13693         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
13695         * call.c (joust): Exit early if we get the same function, too.
13697         * decl2.c (key_method): Return NULL_TREE for template classes.
13698         (import_export_class): Don't need to check for template classes.
13700 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
13702         * lex.c: Remove references to cccp.c.
13704 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
13706         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
13707         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
13708         (DECL_DESTRUCTOR_P): Use destructor_attr.
13709         (DECL_CONST_MEMFUNC_P): Reimplement.
13710         (DECL_VOLATILE_MEMFUNC_P): Remove.
13711         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
13712         (overrides): Use DECL_DESTRUCTOR_P.
13713         (check_for_override): Likewise.
13714         * decl.c (start_function): Likewise.
13715         * decl2.c (grokfclassfn): Likewise.
13716         (check_classfn): Likewise.
13717         (grok_function_init): Likewise.
13719 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
13721         * decl2.c (grokfield): Issue error on illegal data member
13722         declaration.
13724 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
13726         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
13728 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
13730         * class.c (build_vtable_entry): Don't build thunks for type-info
13731         functions.
13733 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
13735         * decl.c (decls_match): Allow a redeclaration of a builtin to
13736         specify args while the builtin did not.
13738 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
13740         * cp-tree.def (THUNK_DECL): Add to documentation.
13741         * cp-tree.h (flag_huge_objects): Declare.
13742         * class.c (modify_vtable_entry): Tidy.
13743         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
13744         Calculate delta appropriately for the new ABI.
13745         (dfs_modify_vtables): Use it.
13746         (modify_all_vtables): Fix thinko in code to add overriding copies
13747         of functions to primary vtables.
13748         (build_clone): Fix typo in comment.
13749         (clone_function_decl): Correct order of destructors in vtable.
13750         (build_vbase_offset_vtbl_entries): Adjust comment.
13751         (dfs_vcall_offset_queue_p): Remove.
13752         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
13753         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
13754         (build_vtable_entry): Correct check for pure virtual functions.
13755         Don't declare flag_huge_objects.
13756         * decl.c (flag_huge_objects): Remove declaration.
13757         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
13758         Use int_size_in_bytes.
13759         (emit_thunk): Handle vcall offset thunks.
13761 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13763         * decl2.c (parse_time, varconst_time): Delete declarations.
13764         (finish_file): Delete LINENO declaration.
13765         START_TIME and THIS_TIME now long.
13767 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
13769         * class.c (build_base_field): Reformat comment.
13771         * inc/cxxabi.h (stddef.h): Comment inclusion.
13772         (__base_class_info::__offset): Comment shift.
13774 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
13776         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
13777         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
13778         (cp_push_exception_identifier): New macro.
13779         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
13780         (DECL_BASE_DESTRUCTOR_P): Likewise.
13781         (DECL_DELETING_DESTRUCTOR_P): Likewise.
13782         (get_vtbl_decl_for_binfo): Fix formatting.
13783         (in_charge_arg_for_name): New macro.
13784         (maybe_build_cleanup_and_delete): Remove declaration.
13785         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
13786         (in_charge_arg_for_name): New function.
13787         (build_new_method_call): Use it.  Handle cloned destructors.
13788         (build_clone): Don't make the base constructor virtual.
13789         Automatically defer generated functions.
13790         (clone_function_decl): Handle destructors, too.
13791         (clone_constructors_and_destructors): Likewise.
13792         (create_vtable_ptr): Don't create a vtable entry for a cloned
13793         function.
13794         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
13795         (initialize_predefined_identifiers): Update appropriately.
13796         (finish_destructor_body): Simplify.
13797         (maybe_build_cleanup_and_delete): Remove.
13798         * except.c (expand_throw): Handle new-ABI destructors.
13799         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
13800         (build_dtor_call): New function.
13801         (build_delete): Use it.  Simplify.
13802         * optimize.c (maybe_clone_body): Handle destructors.
13803         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
13805         * exception.cc (cleanup_fn): New typedef.
13806         (CALL_CLEANUP): New macro.
13807         (cp_eh_info): Use them.
13808         (__cp_push_exception): Likewise.
13809         (__cp_pop_exception): Likewise.
13811 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
13813         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
13814         (complete_dtor_identifier): New macro.
13815         (CLASSTYPE_FIRST_CONVERSION): Remove.
13816         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
13817         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
13818         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
13819         (CLASSTYPE_CONSTRUCTORS): Likewise.
13820         (CLASSTYPE_DESTRUCTORS): Likewise.
13821         (lang_decl): Add cloned_function.
13822         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
13823         (DECL_BASE_CONSTRUCTOR_P): Likewise.
13824         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
13825         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
13826         (DECL_CLONED_FUNCTION_P): Likewise.
13827         (DECL_CLONED_FUNCTION): Likewise.
13828         (clone_function_decl): Declare.
13829         (maybe_clone_body): Likewise.
13830         * call.c (build_user_type_conversion_1): Call complete object
13831         constructors in the new ABI.
13832         (build_new_method_call): Don't add in-charge parameters under the
13833         new ABI.
13834         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
13835         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
13836         CLASSTYPE_DESTRUCTOR_SLOT.
13837         (build_clone): New function.
13838         (clone_function_decl): Likewise.
13839         (clone_constructors_and_destructors): Likewise.
13840         (check_bases_and_members): Use it.
13841         * decl.c (iniitialize_predefined_identifiers): Initialize
13842         complete_dtor_identifier.
13843         (finish_function): Don't add extra code to a clone.
13844         (lang_mark_tree): Mark cloned_function.
13845         * decl2.c (mark_used): Don't bother trying to instantiate things
13846         we synthesized.
13847         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
13848         * method.c (set_mangled_name_for_decl): Don't treat clones as
13849         constructors.
13850         (synthesize_method): Sythesize cloned functions, not the clones.
13851         * optimize.c (inline_data): Update comment on ret_label.
13852         (remap_block): Don't assume DECL_INITIAL exists.
13853         (copy_body_r): Allow ret_label to be NULL.
13854         (maybe_clone_body): Define.
13855         * pt.c (tsubst_decl): Handle clones.
13856         (instantiate_clone): New function.
13857         (instantiate_template): Use it.
13858         (set_mangled_name_for_template_decl): Don't treat clones as
13859         constructors.
13860         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
13861         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
13862         * semantics.c (expand_body): Clone function bodies as necessary.
13864         * optimize.c (remap_decl): Avoid sharing structure for arrays
13865         whose size is only known at run-time.
13866         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
13868         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
13869         to has_in_charge_parm_p.
13870         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
13871         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
13872         (DECL_COPY_CONSTRUCTOR_P): New macro.
13873         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
13874         (build_user_type_conversion_1): Likewise.
13875         (convert_like_real): Likewise.
13876         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
13877         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
13878         (copy_args_p): Likewise.
13879         (grok_ctor_properties): Likewise.
13880         (start_function): Likewise.
13881         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
13882         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
13883         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
13884         * method.c (do_build_copy_constructor): Use
13885         DECL_HAS_IN_CHARGE_PARM_P.
13886         (synthesize_method): Likewise.
13887         * pt.c (instantiate_template): Remove goto.
13888         * tree.c (build_cplus_method_type): Remove mention of obstacks in
13889         comment.
13891         * cp-tre.h (finish_function): Change prototype.
13892         * decl.c (end_cleanup_fn): Adjust caller.
13893         (finish_function): Take only one parameter.
13894         * decl2.c (finish_objects): Adjust caller.
13895         (finish_static_storage_duration_function): Likewise.
13896         * method.c (emit_thunk): Likewise.
13897         * parse.y: Likewise.
13898         * parse.c: Regenerated.
13899         * pt.c (instantiate_decl): Likewise.
13900         * rtti.c (synthesize_tinfo_fn): Likewise.
13901         * semantics.c (expand_body): Likewise.
13903         * cp-tree.h (copy_decl): New function.
13904         * class.c (finish_struct_1): Use it.
13905         * lex.c (copy_decl): Define it.
13906         * pt.c (tsubst_decl): Likewise.
13907         * tree.c (copy_template_template_parm): Likewise.
13909         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
13910         has_nonpublic_assign_ref.
13911         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
13912         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
13913         * class.c (finish_struct_methods): Don't set
13914         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
13915         (interface_only): Don't declare.
13916         (interface_unknown): Likewise.
13918 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13920         * tree.h (HAVE_TEMPLATES): Remove definition.
13921         * lang-options.h (-fthis-is-variable): Remove documentation.
13923 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
13925         * class.c (instantiate_type): Handle object-relative template-id.
13927         * semantics.c (finish_expr_stmt): Call convert_to_void here.
13928         * decl.c (cplus_expand_expr_stmt): Not here.
13930         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
13931         Initialize exprtype earlier.
13933         * parse.y (fn.def1): Check for defining types in return types.
13935         * decl.c (check_tag_decl): Notice extra fundamental types.
13936         Diagnose empty decls in classes, too.
13938         * decl.c (grokdeclarator): Don't override an anonymous name if no
13939         declarator was given.
13941         * cvt.c (convert_to_void): Call resolve_offset_ref.
13943         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
13945         * decl2.c (decl_namespace): Handle getting a type.
13947         * typeck.c (build_c_cast): Re-enable warning for cast between
13948         pointer and integer of different size.
13950 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
13952         * inc/cxxabi.h (__pointer_type_info): Add restrict and
13953         incomplete flags.
13954         (__pointer_type_info::__pointer_catch): New virtual function.
13955         (__pointer_to_member_type_info): Derive from
13956         __pointer_type_info. Adjust.
13957         (__pointer_to_member_type_info::__do_catch): Remove.
13958         (__pointer_to_member_type_info::__is_pointer_p): Declare.
13959         (__pointer_to_member_type_info::__pointer_catch): Declare.
13960         * rtti.c (qualifier_flags): Add restrict flag.
13961         (ptmd_initializer): Reorder members.
13962         (create_tinfo_types): Expand comments. Reorder
13963         ptmd_desc_type_node members.
13964         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
13965         Implement.
13966         (__pointer_type_info::__do_catch): Move specific code into
13967         __pointer_catch. Call it.
13968         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
13969         specific catch checking. Fix void conversion check.
13970         (__pointer_to_member_type_info::__do_catch): Remove.
13971         (__pointer_to_member_type_info::__pointer_catch): Implement.
13973 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13975         * lex.c (init_parse): Remove traces of classof and headof.
13976         * decl2.c (flag_operator_names): Default to 1.
13977         (lang_decode_option): Do not set it for -ansi.
13979 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
13981         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
13982         (DECL_MAIN_VARIANT): Remove.
13983         * decl.c (duplicate_decls): Don't set it.
13984         (start_function): Likewise.
13985         (lang_mark_tree): Don't mark it.
13986         * decl2.c (defer_fn): Don't use it.
13987         * lex.c (retrofit_lang_decl): Don't set it.
13988         * pt.c (tsubst_decl): Likewise.
13989         * ptree.c (print_lang_decl): Don't print it.
13990         * typeck.c (mark_addressable): Don't use it.
13992 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
13994         * vec.cc: Include <new> and <exception>.
13995         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
13996         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
13997         terminate.
13998         (__cxa_vec_delete): Catch dtor exceptions.
14000 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14002         Prepend __ to implementation defined names.
14003         * inc/typeinfo (type_info): Rename _name to __name.
14004         (type_info::type_info): Rename parameter.
14005         (type_info::operator==, type_info::operator!=,
14006         type_info::before): Likewise.
14007         (type_info::is_pointer_p, type_info::is_function_p,
14008         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
14009         parameters.
14010         * inc/cxxabi.h
14011         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
14012         (__pointer_type_info::__pointer_type_info): Likewise.
14013         (__pointer_type_info::is_pointer_p,
14014         __pointer_type_info::do_catch): Prepend __. Rename parameters.
14015         (__array_type_info::__array_type_info): Rename parameters.
14016         (__function_type_info::__function_type_info): Likewise.
14017         (__function_type_info::is_function_p): Prepend __.
14018         (__enum_type_info::__enum_type_info): Rename parameters.
14019         (__pointer_to_member_type_info::__pointer_to_member_type_info):
14020         Likewise.
14021         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
14022         parameters.
14023         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
14024         (__class_type_info::__class_type_info): Rename parameters.
14025         (__class_type_info::sub_kind): Prepend __. Adjust member names.
14026         (__class_type_info::upcast_result,
14027         __class_type_info::dyncast_result): Prepend __. Move definition
14028         into tinfo.cc.
14029         (__class_type_info::do_upcast, __class_type_info::do_catch,
14030         __class_type_info::find_public_src,
14031         __class_type_info::do_dyncast,
14032         __class_type_info::do_find_public_src): Prepend __. Rename
14033         parameters.
14034         (__si_class_type_info::__si_class_type_info): Rename parameters.
14035         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
14036         __si_class_type_info::do_find_public_src): Prepent __. Rename
14037         parameters.
14038         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
14039         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
14040         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
14041         parameters.
14042         (__dynamic_cast): Rename parameters.
14043         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
14044         type_info::do_catch, type_info::do_upcast): Prepend __.
14045         (contained_p, public_p, virtual_p, contained_public_p,
14046         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
14047         (__class_type_info::do_catch,
14048         __class_type_info::do_upcast): Prepend __. Adjust.
14049         (__class_type_info::__upcast_result,
14050         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
14051         Adjust.
14052         (__class_type_info::find_public_src): Prepend __. Adjust.
14053         (__class_type_info::do_find_public_src,
14054         __si_class_type_info::do_find_public_src,
14055         __vmi_class_type_info::do_find_public_src): Likewise.
14056         (__class_type_info::do_dyncast,
14057         __si_class_type_info::do_dyncast,
14058         __vmi_class_type_info::do_dyncast): Likewise.
14059         (__class_type_info::do_upcast,
14060         __si_class_type_info::do_upcast,
14061         __vmi_class_type_info::do_upcast): Likewise.
14062         (__dynamic_cast): Adjust.
14063         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
14064         (__function_type_info::is_function_p): Likewise.
14065         (__pointer_type_info::do_catch): Likewise. Adjust.
14066         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
14067         (__throw_type_match_rtti_2): Adjust.
14068         (__is_pointer): Adjust.
14070 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
14072         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
14073         (complete_ctor_identifier): New macro.
14074         (special_function_kind): Add sfk_copy_constructor and
14075         sfk_assignment_operator.
14076         (LOOKUP_HAS_IN_CHARGE): Remove.
14077         (cons_up_default_function): Rename to ...
14078         (implicitly_declare_fn): ... this.
14079         * call.c (build_new_method_call): Add in-charge parameters for
14080         constructors here.
14081         * class.c (add_implicitly_declared_members): Change parameter name
14082         from cant_have_assignment to cant_have_const_assignment.
14083         Replace calls to cons_up_default_function to implicitly_declare_fn.
14084         * cvt.c (ocp_convert): Use complete_ctor_identifier.
14085         * decl.c (initialize_predefined_identifiers): Initialize it.
14086         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
14087         complex expression.
14088         * init.c (expand_default_init): Don't calculate the in-charge
14089         parameter here.
14090         (build_new_1): Likewise.
14091         * lex.c (cons_up_default_function): Move to method.c.
14092         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
14093         (implicitly_declare_fn): New function.
14094         * typeck.c (build_static_cast): Use complete_ctor_identifier.
14095         (build_modify_expr): Likewise.
14096         * typeck2.c (build_functional_cast): Likewise.
14098         Under the new ABI, constructors don't return `this'.
14099         * cp-tree.h (warn_reorder): Declare.
14100         (special_function_kind): New enum.
14101         (global_base_init_list): Remove declaration.
14102         (emit_base_init): Don't return a value.
14103         (check_base_init): Don't declare.
14104         (is_aggr_typedef): Likewise.
14105         * decl.c (check_special_function_return_type): New function.
14106         (return_types): Remove.
14107         (grokdeclarator): Use check_special_function_return_type.
14108         (start_function): Don't initialize ctor_label under the new ABI.
14109         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
14110         * init.c (begin_init_stmts): Move to top of file.
14111         (finish_init_stmts): Likewise.
14112         (warn_reorder): Don't declare.
14113         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
14114         value.
14115         (check_base_init): Remove.
14116         (is_aggr_typedef): Likewise.
14117         (build_new_1): Don't use the return value of a constructor.
14118         * semantics.c (setup_vtbl_ptr): Don't use the return value
14119         of emit_base_init.
14120         * typeck.c (check_return_expr): Don't magically convert return
14121         statements into `return this' in constructors under the new ABI.
14123         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
14124         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
14125         (base_ctor_identifier): New macro.
14126         (base_dtor_identifier): Likewise.
14127         (deleting_dtor_identifier): Likewise.
14128         * decl.c: Don't include obstack.h.
14129         (obstack_chunk_alloc): Don't define.
14130         (obstack_chunk_free): Likewise.
14131         (struct predefined_identifier): New type.
14132         (initialize_predefined_identifiers): New function.
14133         (init_decl_processing): Use it.
14134         (debug_temp_inits): Remove.
14135         (start_method): Don't call preserve_data.
14136         (hack_incomplete_structures): Update comment.
14137         * init.c (init_init_processing): Don't initialize
14138         nelts_identifier.
14139         (build_offset_rf): Remove dead code.
14140         (build_delete): Use CLASSTYPE_N_BASECLASSES.
14141         * search.c (init_search_processing): Don't initialize
14142         vptr_identifier.
14144 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14146         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
14147         some sign_compare warnings.
14149 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14151         Rename abi::__vmi_class_type_info members.
14152         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
14153         base_list, detail_masks members to vmi_flags, vmi_base_count,
14154         vmi_bases and vmi_flags_masks respectively.
14155         (__vmi_class_type_info::vmi_flags_masks): Rename
14156         details_unknown_mask to flags_unknown_mask.
14157         * tinfo.cc (__class_type_info::do_upcast): Adjust.
14158         (__vmi_class_type_info::do_find_public_src): Adjust.
14159         (__vmi_class_type_info::do_dyncast): Adjust.
14160         (__vmi_class_type_info::do_upcast): Adjust.
14162 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14164         * tinfo.cc (convert_to_base): New function.
14165         (get_vbase_offset): Remove. Move into convert_to_base.
14166         (__vmi_class_type_info::do_find_public_src): Adjust.
14167         (__vmi_class_type_info::do_dyncast): Adjust.
14168         (__vmi_class_type_info::do_upcast): Adjust.
14170 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
14172         * tinfo.cc (operator=): Use __builtin_strcmp.
14173         * tinfo2.cc (before): Likewise.
14175 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
14177         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
14178         (DECL_SAVED_INLINE): Rename to ...
14179         (DECL_DEFERRED_FN): ... this.
14180         (in_function_p): Remove declaration.
14181         (mark_inline_for_output): Rename to ...
14182         (defer_fn): ... this.
14183         * decl.c (finish_function): Adjust call to mark_inline_for_output.
14184         (in_function_p): Remove definition.
14185         * decl2.c (saved_inlines): Rename to ...
14186         (deferred_fns): ... this.
14187         (saved_inlines_used): Rename to ...
14188         (deferred_fns_used): ... this.
14189         (mark_inline_for_output): Rename to ...
14190         (defer_fn): ... this.
14191         (finish_file): Adjust accordingly.
14192         (init_decl2): Likewise.
14193         * lex.c (cons_up_default_function): Likewise.
14194         * pt.c (mark_decl_instantiated): Likewise.
14195         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
14196         circumstances.
14197         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
14198         * semantics.c (expand_body): Defer more functions.
14200 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14202         * vec.cc: New file.
14203         * Make-lang.in (CXX_LIB2FUNCS): Add it.
14204         (vec.o): Build it.
14205         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14206         __cxa_vec_delete): Declare.
14208 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14210         * rtti.c (dfs_class_hint_mark): New static function.
14211         (dfs_class_hint_unmark): New static function.
14212         (class_hint_flags): Use them.
14214 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
14216         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
14218 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
14220         * cp-tree.h (instantiate_decl): Change prototype.
14221         * decl2.c (mark_used): Adjust call.
14222         * optimize.c (inlinable_function_p): Adjust handling of templates.
14223         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
14224         (do_type_instantiation): Likewise.
14225         (instantiate_decl): Defer more templates.
14226         (instantiate_pending_templates): Adjust logic to handle inline
14227         friend functions.
14229         * Makefile.in (GGC_H): New variable.  Use it throughout in place
14230         of ggc.h.
14232         * call.c: Don't include obstack.h.  Include ggc.h.
14233         (obstack_chunk_alloc): Don't define.
14234         (obstack_chunk_free): Likewise.
14235         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
14236         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
14237         (pop_switch): Free it.
14239         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
14241         * dump.c (dequeue_and_dump): Don't try to print the bit_position
14242         if we don't have a DECL_FIELD_OFFSET.
14244 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
14246         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
14247         special_function_p.
14249 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14251         * cfns.gperf (hash, libc_name_p): Prototype.
14253         * rtti.c (build_dynamic_cast_1): Constification.
14255         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
14257         * semantics.c (deferred_type_access_control): Prototype.
14259 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
14261         Correct many new ABI issues regarding vbase and vcall offset
14262         layout.
14263         * cp-tree.h (BINFO_VTABLE): Document.
14264         (struct lang_type): Tweak formatting.
14265         (BINFO_PRIMARY_BINFO): Add to documentation.
14266         (CLASSTYPE_VSIZE): Fix typo in comment.
14267         (CLASSTYPE_VBASECLASSES): Update documentation.
14268         (BINFO_VBASE_MARKED): Remove.
14269         (SET_BINFO_VBASE_MARKED): Likewise.
14270         (CLEAR_BINFO_VBASE_MARKED): Likewise.
14271         (BINFO_FIELDS_MARKED): Remove.
14272         (SET_BINFO_FIELDS_MARKED): Likewise.
14273         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
14274         (enum access_kind): New enumeration.
14275         (num_extra_vtbl_entries): Remove declaration.
14276         (size_extra_vtbl_entries): Likewise.
14277         (get_vtbl_decl_for_binfo): New function.
14278         (dfs_vbase_unmark): Remove declaration.
14279         (mark_primary_bases): Likewise.
14280         * class.c (SAME_FN): Remove.
14281         (struct vcall_offset_data_s): Move definition.
14282         (build_vbase_pointer): Use `build', not `build_binary_op', to
14283         access the vbase pointer under the new ABI.
14284         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
14285         (build_primary_vtable): Likewise.
14286         (dfs_mark_primary_bases): Move here from search.c.
14287         (mark_primary_bases): Likewise.
14288         (determine_primary_bases): Under the new ABI, don't make a base
14289         class a primary base just because we don't yet have any virtual
14290         functions.
14291         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
14292         (num_vfun_entries): Remove.
14293         (dfs_count_virtuals): Likewise.
14294         (num_extra_vtbl_entries): Likewise.
14295         (size_extra_vtbl_entries): Likewise.
14296         (layout_virtual_bases): Iterate in inheritance graph order under
14297         the new ABI.
14298         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
14299         indicate that a vfield is present.
14300         (init_class_processing): Initialize access_public_node, etc., from
14301         ak_public, etc.
14302         (get_vtbl_decl_for_binfo): New function.
14303         (dump_class_hierarchy_r): Likewise.
14304         (dump_class_hierarchy): Use it.
14305         (finish_vtbls): Build the vtbls in inheritance graph order.
14306         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14307         (initialize_vtable): Use get_vtbl_decl_for_binfo.
14308         (accumulate_vtbl_inits): Add comments explaining why a pre-order
14309         walk is required.
14310         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
14311         where the vptr points, even for primary vtables.
14312         (build_vtbl_initializer): Adjust handling of vbase and vcall
14313         offsets.
14314         (build_vcall_and_vbase_vtable_entries): New function.
14315         (dfs_build_vbase_offset_vtbl_entries): Remove.
14316         (build_vbase_offset_vtbl_entries): Reimplement.
14317         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
14318         were already handled in a primary base class vtable.
14319         (build_vcall_offset_vtbl_entries): Adjust.
14320         (build_rtti_vtbl_entries): Adjust.
14321         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
14322         * init.c (expand_virtual_init): Simplify.
14323         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
14324         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
14325         * search.c (BINFO_ACCESS): New macro.
14326         (SET_BINFO_ACCESS): Likewise.
14327         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
14328         (access_in_type): Likewise.
14329         (dfs_accessible_p): Likewise.
14330         (protected_accessible_p): Likewise.
14331         (lookup_fnfields_1): Adjust documentation.
14332         (dfs_mark_primary_bases): Move to class.c
14333         (mark_primary_bases): Likewise.
14334         (dfs_vbase_unmark): Remove.
14335         (virtual_context): Use BINFO_FOR_VBASE.
14336         (dfs_get_vbase_types): Simplify.
14337         (dfs_build_inheritance_graph_order): New function.
14338         (get_vbase_types): Use it.
14339         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
14341         * tinfo.cc (get_vbase_offset): New function.
14342         (__vmi_class_type_info::do_find_public_src): Use it.
14343         (__vmi_class_type_info::do_dyncast): Likewise.
14344         (__vmi_class_type_info::do_upcast): Likewise.
14346 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
14348         * lang-specs.h: Pass -fno-show-column to the preprocessor.
14350 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
14352         * rtti.c (class_hint_flags): Rename flags.
14353         (class_initializer): Remove flags.
14354         (synthesize_tinfo_var): Combine offset and flags. Add flags
14355         for __vmi_class_type_info.
14356         (create_tinfo_types): Remove flags from __class_type_info and
14357         __si_class_type_info. Merge flags and offset from
14358         base_class_type_info.
14359         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
14360         (__base_class_info::is_virtual_p): Adjust.
14361         (__base_class_info::is_public_p): Adjust.
14362         (__base_class_info::offset): New accessor.
14363         (__class_type_info::details): Remove member.
14364         (__class_type_info::__class_type_info): Lose details.
14365         (__class_type_info::detail_masks): Remove.
14366         (__si_class_type_info::__si_class_type_info): Lose details.
14367         (__vmi_class_type_info::details): New member.
14368         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
14369         (__vmi_class_type_info::detail_masks): New member.
14370         * tinfo.cc (__class_type_info::do_upcast): Initialize result
14371         with unknown_details_mask.
14372         (__vmi_class_type_info::do_find_public_src): Adjust
14373         (__vmi_class_type_info::do_dyncast): Adjust.
14374         (__vmi_class_type_info::do_upcast): Set result details, if
14375         needed. Adjust.
14376         (__dynamic_cast): Temporarily #if out optimization.
14378 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
14380         * rtti.c (get_tinfo_decl): Mark used.
14381         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
14382         mark as dealt with, if we output it.
14384 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14386         * class.c: Reorganize to put virtual function table initialization
14387         machinery at the end of the file.
14389 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
14391         * class.c (finish_struct): Use bitsize_zero_node.
14392         * pt.c (instantiate_class_template): Likewise.
14394 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14396         Put RTTI entries at negative offsets in new ABI.
14397         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
14398         vbase offset at index -3, not -1.
14399         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
14400         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
14401         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
14402         (build_rtti_vtbl_entries): New function.
14403         (set_rtti_entry): Remove.
14404         (build_primary_vtable): Don't use it.
14405         (build_secondary_vtable): Likewise.
14406         (start_vtable): Remove.
14407         (first_vfun_index): New function.
14408         (set_vindex): Likewise.
14409         (add_virtual_function): Don't call start_vtable.  Do call
14410         set_vindex.
14411         (set_primary_base): Rename parameter.
14412         (determine_primary_base): Likewise.
14413         (num_vfun_entries): Don't use skip_rtti_stuff.
14414         (num_extra_vtbl_entries): Include RTTI information.
14415         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
14416         (skip_rtti_stuff): Remove.
14417         (dfs_modify_vtables): Don't use it.
14418         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
14419         (layout_nonempty_base_or_field): Update size handling.
14420         (create_vtable_ptr): Tweak.
14421         (layout_class_type): Adjust parameter names.
14422         (finish_struct_1): Simplify.
14423         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
14424         (skip_rtti_stuff): Remove.
14425         (first_vfun_index): New function.
14426         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14427         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
14428         (marked_vtable_pathp): Declare.
14429         (unmarked_vtable_pathp): Likewise.
14430         * error.c (dump_expr): Use first_vfun_index to calculate vtable
14431         offsets.
14432         * rtti.c (build_headof): Look for RTTI at negative offsets.
14433         (get_tinfo_decl_dynamic): Likewise.
14434         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
14435         here.
14436         (create_pseudo_type_info): Do it here instead.  Adjust so that
14437         vptr points at first virtual function.
14438         * search.c (marked_vtable_pathp): Make it global.
14439         (unmarked_vtable_pathp): Likewise.
14440         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14441         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
14442         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
14443         (get_pure_virtuals): Likewise.
14444         (expand_upcast_fixups): Likewise.
14445         * tree.c (debug_binfo): Likewise.
14446         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
14447         negative offset.
14449 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14451         * class.c (check_field_decl): Fix typo.
14452         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
14453         (check_methods): Likewise.
14454         (check_field_decls): Likewise.
14455         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
14456         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
14457         Use DECL_RESULT_FLD, not DECL_RESULT.
14458         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
14459         * lex.c (identifier_type): Likewise.
14460         * pt.c (determine_specialization, lookup_template_class): Likewise.
14461         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
14462         (resolve_overloaded_unification, more_specialized): Likewise.
14463         * semantics.c (finish_member_declaration): Likewise.
14464         * typeck.c (build_x_function_call): Likewise.
14466 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
14468         * class.c (layout_empty_base): Handle empty bases with non-byte
14469         alignment.
14470         (build_base_field): Likewise.
14471         (layout_virtual_bases): Likewise.
14473         * class.c (finish_struct_1): Fix typo in this change:
14475         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14477 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
14479         * decl.c (grokdeclarator): Count partial specializations when
14480         keeping track of how many template classes have been seen.
14482         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
14484 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14486         * class.c (build_vbase_pointer_fields): layout_field now place_field.
14487         (get_vfield_offset): Use byte_position.
14488         (set_rtti_entry): Set OFFSET to ssizetype zero.
14489         (get_binfo_offset_as_int): Deleted.
14490         (dfs_record_base_offsets): Use tree_low_cst.
14491         (dfs_search_base_offsets): Likewise.
14492         (layout_nonempty_base_or_field): Reflect changes in RLI format
14493         and call byte_position.
14494         (layout_empty_base): Convert offset to ssizetype.
14495         (build_base_field): use rli_size_unit_so_far.
14496         (dfs_propagate_binfo_offsets): Do computation in proper type.
14497         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
14498         (layout_class_type): Reflect changes in RLI names and fields.
14499         (finish_struct_1): Set DECL_FIELD_OFFSET.
14500         * dump.c (dequeue_and_dump): Call bit_position.
14501         * expr.c (cplus_expand_constant): Use byte_position.
14502         * rtti.c (expand_class_desc): Use bitsize_one_node.
14503         * typeck.c (build_component_addr): Use byte_position and don't
14504         special case for zero offset.
14506 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
14508         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
14510         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
14511         tinfo object.
14512         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
14513         vtable.
14515 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14517         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
14518         DECL_P macros.
14519         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
14520         make_typename_type, check_initializer, cp_finish_decl,
14521         xref_tag): Likewise.
14522         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
14523         decl_namespace, arg_assoc_template_arg, arg_assoc,
14524         validate_nonmember_using_decl, do_class_using_decl): Likewise.
14525         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
14526         args_to_string): Likewise.
14527         * friend.c (is_friend): Likewise.
14528         * lex.c (note_got_semicolon, note_list_got_semicolon,
14529         is_global): Likewise.
14530         * method.c (build_overload_nested_name, build_overload_value,
14531         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
14532         * parse.y (typename_sub, typename_sub1): Likewise.
14533         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
14534         process_partial_specialization, convert_template_argument,
14535         template_args_equal, add_pending_template, lookup_template_class,
14536         for_each_template_parm_r, maybe_fold_nontype_arg,
14537         tsubst, instantiate_template, type_unification_real, unify,
14538         instantiate_pending_templates, set_mangled_name_for_template_decl):
14539         Likewise.
14540         * repo.c (repo_get_id, repo_template_used): Likewise.
14541         * search.c (lookup_field_1): Likewise.
14542         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
14543         * xref.c (classname): Likewise.
14545 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
14547         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
14548         (CANONICAL_BINFO): New macro.
14549         (BINFO_NEW_VTABLE_MARKED): Use it.
14550         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
14551         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
14552         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
14553         not TREE_TYPE.
14554         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14555         (build_secondary_vtable): Likewise.
14556         (dfs_finish_vtbls): Likewise.
14557         (dfs_accumulate_vtbl_inits): Likewise.
14558         (accumulate_vtbl_inits): New function.
14559         (finish_vtbls): Make sure that virtual bases come after
14560         non-virtual bases in the vtable group.
14561         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
14562         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14563         * search.c (struct vbase_info): Move definition.
14564         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14565         (unmarked_new_vtable_p): Likewise.
14566         (dfs_mark_vtable_path): Remove.
14567         (dfs_mark_new_vtable): Remove.
14568         (dfs_unmark_new_vtable): Likewise.
14569         (dfs_clear_search_slot): Likewise.
14570         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
14571         (dfs_clear_vbase_slots): Likewise.
14572         (init_vbase_pointers): LIkewise.
14574 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
14576         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
14577         SIZETYPE to a non-SIZETYPE.
14579 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
14581         * class.c (layout_virtual_bases): Adjust names in conditionally
14582         compiled code.
14584         * class.c (record_base_offsets): New function.
14585         (layout_conflict_p): Likewise.
14586         (layout_nonempty_base_or_field): Use it.
14587         (layout_empty_base): New function.
14588         (build_base_field): Use it.
14589         (build_base_fields): Update comment.
14590         (layout_virtual_bases): Fold in a little code form
14591         layout_basetypes.  Use layout_empty_base.
14592         (layout_basetypes): Remove.
14593         (end_of_class): New function.
14594         (layout_class_type): Use it.  Adjust.
14596         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
14597         (fntype_p): Remove.
14598         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
14599         comment.
14600         (dfs_skip_nonprimary_vbases_markedp): Likewise.
14601         * typeck.c (fntype_p): Remove.
14603         * cp-tree.h (TI_SPEC_INFO): Remove.
14604         (CLASSTYPE_TI_SPEC_INFO): Likewise.
14605         * pt.c (process_partial_specialization): Likewise.
14607         * class.c (build_base_field): Fix thinko in computation of binfo
14608         offsets.
14610         * tree.c (mark_local_for_remap_p): Mark variables declared in
14611         TARGET_EXPRs as well.
14613 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14615         * typeck.c (require_complete_type, complete_type,
14616         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
14617         build_array_ref, convert_arguments, pointer_diff,
14618         build_x_unary_op, build_unary_op, build_c_cast,
14619         build_modify_expr): Use COMPLETE_TYPE_P etc.
14620         * call.c (is_complete, convert_like_real,
14621         build_new_method_call): Likewise.
14622         * class.c (build_vbase_pointer_fields, check_bases,
14623         build_base_field, finish_struct_1, pushclass): Likewise.
14624         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
14625         * decl.c (maybe_process_template_type_declaration, pushtag,
14626         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
14627         layout_var_decl, check_initializer, cp_finish_decl,
14628         grokdeclarator, require_complete_types_for_parms,
14629         grok_op_properties, xref_tag, xref_basetypes,
14630         check_function_type): Likewise.
14631         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
14632         * friend.c (do_friend): Likewise.
14633         * init.c (build_offset_ref): Likewise.
14634         * parse.y (structsp): Likewise.
14635         * pt.c (maybe_process_partial_specialization,
14636         tsubst_friend_function, instantiate_class_template, tsubst,
14637         do_type_instantiation, instantiate_pending_templates): Likewise.
14638         * repo.c (repo_get_id): Likewise.
14639         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
14640         synthesize_tinfo_var, emit_support_tinfos): Likewise.
14641         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
14642         * semantics.c (begin_class_definition): Likewise.
14643         * tree.c (build_cplus_method_type): Likewise.
14644         * typeck2.c (digest_init, build_functional_cast,
14645         add_exception_specifier): Likewise.
14646         * parse.h, parse.c: Regenerated.
14648 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14650         * inc/cxxabi.h: New header file. Define new-abi entry points.
14651         (__pointer_type_info::target): Rename member to ...
14652         (__pointer_type_info::type): ... here.
14653         (__base_class_info::type): Rename member to ...
14654         (__base_class_info::base): ... here.
14655         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
14656         * cp-tree.h (CPTI_ABI): New global tree enumeration.
14657         (abi_node): New global tree node.
14658         * decl.c (abi_node): Document.
14659         (init_decl_processing): Initialize abi_node.
14660         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
14661         (get_vmi_pseudo_type_info): Likewise.
14662         (create_tinfo_types): Likewise.
14663         (emit_support_tinfos): Likewise.
14664         * tinfo.h (cxxabi.h): Include for new-abi.
14665         Move rtti class definitions to new header file.
14666         * tinfo.cc (abi): Use the namespace.
14667         (std): Move new abi rtti classes from here ...
14668         (__cxxabiv1): ... to here.
14669         * tinfo2.cc (cxxabi.h): Include for new-abi.
14670         Move rtti class definitions to new header file.
14671         (std): Move new abi rtti classes from here ...
14672         (__cxxabiv1): ... to here.
14673         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
14674         namespace.
14676 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
14677             Jason Merrill  <jason@casey.cygnus.com>
14679         * method.c (build_overload_int): Use host_integerp.
14681 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14683         * init.c (build_offset_ref): Handle the case of a templated member
14684         function.
14686 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14688         * except.c (expand_exception_blocks): Clear catch_clauses_last.
14690 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
14692         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
14693         * class.c (check_bitfield_decl): Turn illegal bitfields into
14694         non-bitfields.
14695         (dfs_propagate_binfo_offsets): Adjust for new size_binop
14696         semantics.
14697         (dfs_offset_for_unshared_vbases): Likewise.
14698         * cvt.c (cp_convert_to_pointer): Convert NULL to a
14699         pointer-to-member correctly under the new ABI.
14700         * expr.c (cplus_expand_constant): Don't use cp_convert when
14701         turning an offset into a pointer-to-member.
14702         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
14703         when dereferencing them under the new ABI.
14704         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
14705         of pointers-to-members under the new ABI.
14707         * class.c (check_bitfield_decl): Remove restriction on really long
14708         bitfields.
14709         (layout_class_type): Implement new ABI handling of bitfields
14710         longer than their types.
14712 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14714         * parse.y (extdefs): Call ggc_collect.
14715         * parse.c: Regenerated.
14717 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
14719         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
14720         (note_name_declared_in_class): Use OVL_CURRENT to get at a
14721         potential overload.
14723 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14725         * class.c (build_vbase_path): Use integer_zerop.
14726         (build_vtable_entry): Use tree_low_cst.
14727         (get_vfield_offset): Use bit_position.
14728         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
14729         Use tree_low_cst.
14730         (check_bitfield_decl): Set DECL_SIZE using convert.
14731         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
14732         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
14733         Use tree_low_cst.
14734         (finish_struct_1): Use bit_position.
14735         (dump_class_hierarchy): Use tree_low_cst.
14736         * cp-tree.h (min_precision): Add declaration.
14737         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
14738         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
14739         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
14740         * expr.c (cplus_expand_constant): Use bit_position.
14741         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
14742         * rtti.c (get_base_offset): Use bit_position.
14743         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
14744         host_integerp, and tree_low_cst.
14745         (pointer_int_sum): Use integer_zerop.
14746         (build_component_addr): Use bit_position.
14748 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
14750         * typeck.c (require_complete_type): Don't assume size_zero_node.
14751         (complete_type_or_else): Likewise.
14753 2000-03-16  Steven Grady <grady@digitaldeck.com>
14754             Jason Merrill  <jason@casey.cygnus.com>
14756         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
14758 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
14760         * decl2.c (grokfield): Bail out if type is error_mark_node.
14762 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14764         * tinfo2.cc (__ptr_to_member_data): Rename to ...
14765         (__pointer_to_member_data): ... here. Adjust.
14766         * rtti.c (create_tinfo_types): Adjust.
14768 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14770         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
14771         * decl.c (ref_desc_type_node): Undocument.
14772         * rtti.c (ptr_ref_initializer): Rename to ...
14773         (ptr_initializer): ... here. Adjust comments.
14774         (ptmd_initializer): Fix comment thinko.
14775         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
14776         (create_tinfo_types): Remove ref_desc_type_node init.
14777         * tinfo2.cc (__reference_type_info): Remove.
14779 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14781         * decl.c (cp_finish_decl): Remove obsolete comment.
14783         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
14785 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
14787         * cp-tree.h: Tweak documentation.
14788         * class.c (build_vbase_pointer_fields): Layout the fields, too.
14789         (avoid_overlap): Remove.
14790         (get_binfo_offset_as_int): New function.
14791         (dfs_serach_base_offsets): Likewise.
14792         (layout_nonempty_base_or_field): Likewise.
14793         (build_base_field): Layout fields here.  Avoid placing two objects
14794         of the same type at the same address, under the new ABI.
14795         (build_base_fields): Adjust accordingly.
14796         (create_vtable_ptr): Return the new field, but don't attach it to
14797         TYPE_FIELDS.
14798         (remove_base_field): Remove.
14799         (remove_base_fields): Remove.
14800         (layout_basetypes): Adjust accordingly.
14801         (layout_class_type): Call layout_field for each field, rather than
14802         just making a wholesale call to layout_type.
14804 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
14806         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
14808 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
14810         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
14812         * except.c (dtor_nothrow): New fn.
14813         (do_pop_exception): Use it.  Take type parm.
14814         (push_eh_cleanup): Take type parm.
14815         (expand_start_catch_block): Pass it.
14816         (build_eh_type_type_ref): Accept null type.
14818 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
14820         * cp-tree.h (revert_static_member_fn): Change prototype.
14821         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
14822         (grok_op_properties): Likewise.
14823         (start_function): Likewise.
14824         (revert_static_member_fn): Simplify.
14825         * pt.c (check_explicit_specialization): Adjust call to
14826         revert_static_member_fn.
14828 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
14830         * cp-tree.h (scope_kind): New type.
14831         (tmpl_spec_kind): Likewise.
14832         (declare_pseudo_global_level): Remove.
14833         (pseudo_global_level_p): Rename to template_parm_scope_p.
14834         (pushlevel): Remove declaration.
14835         (begin_scope): New function.
14836         (finish_scope): Likewise.
14837         (current_tmpl_spec_kind): Likewise.
14838         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
14839         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
14840         Add template_spec_p.
14841         (toplevel_bindings_p): Adjust.
14842         (declare_pseudo_global_level): Remove.
14843         (pseudo_global_level_p): Rename to template_parm_scope_p.
14844         (current_tmpl_spec_kind): New function.
14845         (begin_scope): Likewise.
14846         (finish_scope): Likewise.
14847         (maybe_push_to_top_level): Adjust.
14848         (maybe_process_template_type_declaration): Likewise.
14849         (pushtag): Likewise.
14850         (pushdecl_nonclass_level): Likewise.
14851         (lookup_tag): Likewise.
14852         (grokfndecl): Handle member template specializations.  Share
14853         constructor and non-constructor code.
14854         * decl2.c (check_classfn): Handle member template specializations.
14855         * pt.c (begin_template_parm_list): Use begin_scope.
14856         (begin_specialization): Likewise.
14857         (end_specialization): Likewise.
14858         (check_explicit_specialization): Use current_tmpl_spec_kind.
14859         Handle member template specializations.
14860         (end_template_decl): Use finish_scope.  Remove call to
14861         get_pending_sizes.
14862         (push_template_decl_real): Remove bogus error message.
14863         (tsubst_decl): Fix typo in code contained in comment.
14864         (instantiate_template): Handle member template specializations.
14865         (most_general_template): Likewise.
14867 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14869         * lex.c (whitespace_cr): Compress consecutive calls to warning().
14870         (do_identifier): Ditto for error().
14872         * pt.c (convert_nontype_argument): Ditto for cp_error().
14873         (convert_template_argument): Ditto for cp_pedwarn().
14875 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
14877         * exception.cc (__check_null_eh_spec): New fn.
14878         * except.c (expand_end_eh_spec): Call it if the spec is throw().
14880 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14882         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
14883         * except.c (expand_end_eh_spec): Add the return type.
14884         * rtti.c (throw_bad_cast): Add the parmtypes.
14885         (throw_bad_typeid): Likewise.
14887         * semantics.c (expand_stmt): Only leave out rtl for unused
14888         artificials, and set DECL_IGNORED_P on them as well.
14889         * decl.c (wrapup_globals_for_namespace): Likewise.
14891 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
14893         * decl.c (maybe_commonize_var): Skip all artificial decls.
14894         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
14896 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14898         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
14899         * cp-tree.h: Declare flag_enforce_eh_specs.
14900         * decl.c (store_parm_decls, finish_function): Check it.
14902         C library functions don't throw.
14903         * Makefile.in (cfns.h): New target.
14904         (except.o): Depend on it.
14905         * Make-lang.in (cc1plus): Depend on cfns.gperf.
14906         * cfns.gperf: New file.
14907         * cfns.h: Generated.
14908         * except.c: Include it.
14909         (nothrow_libfn_p): New fn.
14910         * decl.c (grokfndecl): Use it.
14911         * cp-tree.h: Declare it.
14913         * decl.c (push_overloaded_decl_1, auto_function,
14914         define_function): Lose.
14915         (build_library_fn_1): New static fn.
14916         (builtin_function): Use it.
14917         (get_atexit_node): Use build_library_fn_ptr.
14918         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
14919         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
14920         push_void_library_fn, push_throw_library_fn): New fns.
14921         * cp-tree.h: Declare them.
14922         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
14923         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
14924         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
14925         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
14926         * rtti.c (build_runtime_decl): Lose.
14927         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
14928         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
14929         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
14931         * call.c (build_call): Remove result_type parm.
14932         Call mark_used on unused artificial fns.
14933         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
14935 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
14937         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
14938         appropriate.
14939         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
14940         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
14941         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
14942         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
14943         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
14944         expand_generic_desc): Likewise.
14946 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14948         * exception.cc (__cp_pop_exception): Cleanup the original object.
14950 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14952         * decl.c (grok_op_properties): Merge conversion to void warning
14953         with other silly op warnings.
14955 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
14957         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
14958         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
14960 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14962         * decl.c (cp_make_fname_decl): New function.
14963         (wrapup_globals_for_namespace): Don't emit unused static vars.
14964         (init_decl_processing): Remove comment about use of
14965         array_domain_type. Set make_fname_decl.
14966         (cp_finish_decl): Remove __FUNCTION__ nadgering.
14967         * semantics.c (begin_compound_stmt): Remove
14968         current_function_name_declared flagging.
14969         (expand_stmt): Don't emit unused local statics.
14970         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
14971         specially.
14973 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
14975         * typeck.c (convert_for_assignment): Don't look at array
14976         initializer.
14977         * call.c (convert_like_real): Likewise.
14979 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
14981         Add initial support for '\uNNNN' specifier.
14982         * lex.c (read_ucs): New fn.
14983         (readescape, skip_white_space): Call it.
14984         (is_extended_char, is_extended_char_1): New fns.
14985         (utf8_extend_token): New fn, #if 0'd out.
14986         (real_yylex): Treat extended chars like letters.
14988         * search.c (note_debug_info_needed): Walk the bases even if we
14989         weren't deferring the type itself.
14991 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14993         * decl2.c (finish_objects): Constify a char*.
14995         * method.c (emit_thunk): Likewise.
14997 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
14999         * typeck.c (dubious_conversion_warnings): Look through
15000         REFERENCE_TYPE.
15002 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15004         * class.c (dfs_modify_vtables): I is now unsigned.
15005         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
15006         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
15007         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
15008         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
15009         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
15010         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
15011         Call integer_all_onesp.
15012         * typeck2.c (process_init_constructor): Use compare_tree_int.
15014         * lang-specs.h (as): Don't call if -syntax-only.
15016 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
15018         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
15019         RTL_EXPR_HAS_NO_SCOPE after all.
15021 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
15023         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
15024         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
15025         RTL_EXPR_HAS_NO_SCOPE.
15027         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
15028         later.
15030         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
15032 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
15034         * call.c (convert_like): Macrofy.
15035         (convert_like_with_context): New macro.
15036         (convert_like_real): Renamed from convert_like.  Add calling
15037         context parameters, for diagnostics. Add recursive flag.  Call
15038         dubious_conversion_warnings for outer conversion.
15039         (build_user_type_conversion): Use convert_like_with_context.
15040         (build_over_call): Likewise. Don't warn about dubious
15041         conversions here. Adjust convert_default_arg calls.
15042         (convert_default_arg): Add context parameters for diagnostics.
15043         Pass through to convert_like_with_context.
15044         * cp-tree.h (convert_default_arg): Add context parameters.
15045         (dubious_conversion_warnings): Prototype new function.
15046         * typeck.c (convert_arguments): Adjust convert_default_arg call.
15047         (dubious_conversion_warnings): New function, broken
15048         out of convert_for_assignment.
15049         (convert_for_assignment): Adjust.
15051 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
15053         * decl2.c (key_method): Break out from...
15054         (import_export_vtable, import_export_class): ...here.
15056         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
15057         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
15059         * search.c (note_debug_info_needed, dfs_debug_mark,
15060         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
15061         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
15063 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
15065         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
15066         typos.
15068 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
15070         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
15071         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
15072         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
15073         (lang_type): Split gets_new into has_new and has_array_new.
15074         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15075         (TYPE_GETS_NEW): Split into ...
15076         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
15077         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
15078         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
15079         (build_op_new_call): Don't declare.
15080         (build_new_1): Likewise.
15081         * call.c (build_op_new_call): Remove.
15082         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15083         instead of TYPE_NEEDS_DESTRUCTOR.
15084         (finish_struct_bits): Likewise.
15085         (add_implicitly_declared_members): Likewise.
15086         (check_field_decl): Likewise.
15087         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
15088         correctly under the new ABI.
15089         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15090         instead of TYPE_NEEDS_DESTRUCTOR.
15091         (initialize_local_var): Likewise.
15092         (destroy_local_var): Likewise.
15093         (cp_finish_decl): Likewise.
15094         (register_dtor_fn): Likewise.
15095         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
15096         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
15097         TYPE_VEC_DELETE_TAKES_SIZE here.
15098         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
15099         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
15100         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15101         (finish_destructor_body): Likewise.
15102         (maybe_build_cleanup_1): Likewise.
15103         * decl2.c (do_static_destruction): Likewise.
15104         * init.c (build_new_1): Make it static.
15105         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15106         (expand_cleanup_for_base): Likewise.
15107         (get_cookie_size): New function.
15108         (build_new_1): Handle array-new cookies correctly under the new
15109         ABI.
15110         (build_vec_delete_1): Likewise.
15111         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15112         (build_delete): Likewise.
15113         (build_vec_delete): Handle array-new cookies correctly under the new
15114         ABI.
15115         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15116         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
15117         TYPE_HAS_ARRAY_NEW_OPERATOR.
15118         * ptree.c (print_lang_type): Check them.
15119         * search.c (context_for_name_lookup): Fix typo in comment.
15120         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15121         * tree.c (break_out_cleanups): Likewise.
15122         (build_cplus_array_test_1): Likewise.
15123         (cp_build_qualified_type_real): Likewise.
15124         * typeck.c (complete_type): Likewise.
15126         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
15127         the command-line, not the end.
15129 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
15131         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
15133 2000-03-02  Tom Tromey  <tromey@cygnus.com>
15135         * cp-tree.h (build_java_class_ref): Declare.
15136         * init.c (build_java_class_ref): No longer static.
15137         * except.c (expand_throw): Generate a Java-style `throw' if the
15138         thrown object is a "Java" object.
15139         (initialize_handler_parm): Generate a Java-style lookup of
15140         exception info if the caught object is a "Java" object.
15141         (catch_language, catch_language_init): New globals.
15142         (decl_is_java_type): New function.
15143         (expand_start_catch_block): Don't call push_eh_info() or
15144         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
15145         class reference to build_catch_block.
15147 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15149         * typeck.c (comptypes): Treat sizetype like its language equivalent.
15151 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
15153         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
15154         to merge reference/pointer code and fix incorrect warnings.
15156 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
15158         * search.c (protected_accessible_p): Use context_for_name_lookup.
15160         * init.c (construct_virtual_bases): Fix thinko.
15161         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
15163 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15165         * decl.c (current_function_decl): Move to toplev.c.
15167 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
15169         * pt.c (fn_type_unification): Unify return type, whenever
15170         provided.
15171         (get_bindings_real): Only pass return type when necessary.
15172         Remove explicit return type check.
15173         * class.c (resolve_address_of_overloaded_function): Pass desired
15174         return type to fn_type_unification.
15176 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15178         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
15179         DECL_FIELD_SIZE.
15180         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
15181         DECL_FIELD_SIZE.
15182         * rtti.c (expand_class_desc): Likewise.
15183         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
15184         (THUNK_VCALL_OFFSET): Likewise.
15185         (THUNK_DELTA): Reflect changes in ../tree.h.
15187 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
15189         * search.c (protected_accessible_p): Also allow the access if
15190         the member is public in DERIVED.  Lose TYPE parm.
15191         (friend_accessible_p): Lose TYPE parm.
15192         (accessible_p): Adjust.
15194 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15196         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
15197         on things that are not sizes; ssize_binop deleted.
15198         Call size_diffop when appropriate.
15199         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15200         (build_primary_vtable, build_secondary_vtable): Likewise.
15201         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
15202         Variable I is HOST_WIDE_INT.
15203         (get_vfield_offset): Pass proper types to size_binop.
15204         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
15205         (finish_struct_1): Likewise.
15206         (skip_rtti_stuff): Arg N is now pointer to signed.
15207         (layout_class_type): Use size_zero_node.
15208         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
15209         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
15210         * decl.c (complete_arry_type): Pass proper types to size_binop.
15211         (xref_basetypes): BINFO_OFFSET is sizetype.
15212         * error.c (dump_expr): Don't use size_binop non-sizes.
15213         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
15214         * init.c (construct_virtual_bases): Fix type error.
15215         (build_vec_delete_1): Pass proper type to size_binop and don't
15216         fold result.
15217         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
15218         * rtti.c (get_base_offset): Pass proper type to size_binop.
15219         * search.c (dfs_find_vbases): Fix type error.
15220         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
15221         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
15222         * tree.c (debug_binfo): Variable N is signed.
15223         Use HOST_WIDE_INT_PRINT_DEC.
15224         * typeck.c (comptypes): sizetype is same as equivalent integer type.
15225         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
15226         size_one_node and size_zero_node.
15227         (c_alignof): Use size_one_node.
15228         (build_component_addr): Pass proper types to size_binop.
15229         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
15231 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
15233         Implement class scope using-declarations for functions.
15234         * class.c (handle_using_decl): Call add_method for used functions.
15235         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
15236         (add_method): Used functions are hidden by local functions.
15237         (check_bases_and_members): Handle using-decls before finalizing
15238         CLASSTYPE_METHOD_VEC.
15239         * call.c (add_function_candidate): Add ctype parm; if nonzero,
15240         override the type of 'this' accordingly.
15241         (add_template_candidate, add_template_candidate_real): Add ctype parm.
15242         (convert_class_to_reference, build_user_type_conversion_1,
15243         build_new_function_call, build_object_call, build_new_op,
15244         build_new_method_call): Pass ctype parm.
15246         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
15247         the baselink.
15248         * call.c (convert_class_to_reference, build_user_type_conversion_1,
15249         build_new_function_call, build_object_call, build_new_op,
15250         build_new_method_call, build_op_delete_call): Don't get basetype_path
15251         from a baselink.
15252         * typeck.c (build_component_ref): Likewise.
15253         * init.c (build_offset_ref): Likewise.
15254         (resolve_offset_ref): Don't call enforce_access.
15255         Call build_scoped_ref.
15256         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
15257         would cause an error or if -pedantic.
15258         * class.c (alter_access): Lose binfo parm.
15260 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15262         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
15263         types.
15265 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
15267         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
15268         pseudo_type_info creation into the std namespace
15270 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15272         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
15273         (import_export_class): Remove declaration.
15274         * decl2.c (import_export_class): Make it static.
15275         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
15276         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
15277         EXPR_WITH_FILE_LOCATION.
15278         * lex.c (check_newline): Tweak filename/lineno setting.
15279         * semantics.c (begin_while_stmt): Fix typo in comment.
15281 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15283         * lang-options.h (-fmessage-length=): Add missing option.
15285         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
15287 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
15289         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
15291 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
15293         * optimize.c (expand_call_inline): Emit the return label before
15294         evaluating the return value.
15296 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
15298         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
15299         than duplicating functionality here.
15300         * optimize.c: Include input.h.
15301         (expand_call_inline): Use push_srcloc and pop_srcloc.
15302         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
15303         * parse.c: Regenerated.
15304         * Makefile.in (lex.o): Depend on input.h.
15305         (optimize.o): Likewise.
15307 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
15309         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
15310         function type, rather than ICE.
15312 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
15314         * decl.c (grokdeclarator): Call decl_type_access_control.
15315         * parse.y (parse_end_decl): Don't call decl_type_access_control if
15316         decl is null.
15318 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
15320         * decl.c (decls_match): Remove obsolete static member nadgering.
15322 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15324         * decl.c (grokdeclarator): Change ANSI to ISO.
15325         * lex.c (consume_string, readescape, do_identifier): Likewise.
15326         (parse_float, real_yylex): Likewise.
15327         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
15328         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
15329         new_type_id, maybe_label_decls, simple_stmt,
15330         for.init.statement): Likewise.
15331         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
15332         * semantics.c (finish_named_return_value): Likewise.
15333         * parse.c: Regenerate.
15335 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
15337         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
15338         (CPTI_CLASS_STAR_TYPE): Remove.
15339         (vtable_index_type): Likewise.
15340         (class_star_type_node): Remove.
15341         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
15342         (build_binary_op_nodefault): Remove.
15343         * call.c (build_new_op): Use build_binary_op instead of
15344         build_binary_op_nodefault.
15345         * decl.c (init_decl_processing): Remove class_star_type_node
15346         initialization.  Make delta_type_node ptrdiff_type_node under the
15347         new ABI.  Initialize vtable_index_type.
15348         (build_ptrmemfunc_type): Build different structures for the new
15349         ABI.
15350         (build_enumerator): Use build_binary_op instead of
15351         build_binary_op_nodefault.
15352         * method.c (build_overload_value): Mangle pointers-to-members
15353         appropriately under the new ABI.
15354         * typeck.c (build_array_ref): Use build_binary_op instead of
15355         build_binary_op_nodefault.
15356         (get_member_function_from_ptrfunc): Adjust for the new ABI.
15357         (build_binary_op_nodefault): Rename to ...
15358         (build_binary_op): ... this.  Remove old version.  Adjust for
15359         pointer-to-member comparisons under the new ABI.
15360         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
15361         (build_ptrmemfunc): Adjust for the new ABI.
15362         (expand_ptrmemfunc_cst): Likewise.
15363         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
15364         (pfn_from_ptrmemfunc): Adjust for the new ABI.
15366 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
15368         * call.c (build_object_call): Compress consecutive calls to
15369         cp_error.
15370         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
15371         (build_op_delete_call): Adjust message formatting.
15373         * class.c (check_bases): Compress consecutive calls to
15374         cp_pedwarn.
15375         (finish_struct_anon): Say 'ISO C++'.
15377         * decl.c (start_decl): Same here.
15378         (grok_reference_init): Likewise.
15379         (grokfndecl): Correct message formatting.
15380         (grokfndecl): Improve diagnostic.
15381         (check_static_variable_definition): Likewise. Say 'ISO C++'
15382         (compute_array_index_type): Say 'ISO C++'
15383         (create_array_type_for_decl): Compress consecutive calls to
15384         cp_error.
15385         (grokdeclarator): Say 'ISO C++'
15386         (grok_op_properties): Likewise.
15388         * decl2.c (delete_sanity): Clairify diagnostic.
15389         (check_member_template): Same here.
15390         (grok_function_init): Use consistent terminology.
15392         * expr.c (do_case): Say 'ISO C++'
15394         * friend.c (do_friend): Compress consecutive calls to warning.
15396 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
15398         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
15399         * class.c (build_secondary_vtable): Reorganize.  Don't create a
15400         new vtable under the new ABI.
15401         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
15402         computing the size.
15403         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
15404         the initializing elements.
15405         (initialize_vtable): New function.
15406         (dfs_finish_vtbls): Use it.
15407         (dfs_accumulate_vtbl_inits): New function.
15408         (finish_vtbls): Merge primary and secondary vtables under the new
15409         ABI.
15410         (finish_struct_1): Remove redundant call to layout_vtable_decl.
15411         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
15412         aren't VAR_DECLs.
15414         * class.c (build_vtable): New function, split out from ...
15415         (get_vtable_decl): ... here, and ...
15416         (build_secondary_vtable): ... here.
15418         * pt.c (tsubst_decl): Fix formatting.
15420 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15422         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
15423         (avoid_overlap, build_base_field): Likewise.
15424         (build_base_field, build_base_fields, is_empty_class):
15425         Test DECL_SIZE with integer_zero.
15426         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
15427         * cp-tree.h (struct lang_type): New field size_unit.
15428         (CLASSTYPE_SIZE_UNIT): New macro.
15429         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
15430         (cp_finish_decl): Delete -Wlarger-than processing.
15431         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
15432         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
15433         * tree.c (make_binfo): binfo vector is one entry longer.
15434         (walk_tree): Walk DECL_SIZE_UNIT.
15436 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
15438         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
15439         comment.
15440         (build_vtable_entry): Don't assume all vtable entries are
15441         functions.
15442         (build_vtbl_initializer): Adjust accordingly.
15443         (get_vtable_decl): Fix formatting.
15445 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
15447         * semantics.c (deferred_type_access_control): Walk the entire
15448         type_lookups list.
15449         (save_type_access_control): Rename from
15450         initial_deferred_type_access_control.  Just remember the value.
15451         (decl_type_access_control): New fn.
15452         (begin_function_definition): Use deferred_type_access_control, after
15453         we've started the function.  Set type_lookups to error_mark_node.
15454         * parse.y (frob_specs, fn.def1): Adjust.
15455         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
15456         (parse_end_decl, parse_bitfield0, parse_method): New fns.
15457         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
15458         (after_type_component_declarator0): Likewise.
15459         (after_type_component_declarator): Likewise.
15460         (notype_component_declarator): Likewise.
15461         * cp-tree.h: Adjust.
15463         * decl.c (redeclaration_error_message): Allow redeclaration of
15464         namespace-scope decls.
15466 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15468         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
15470 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
15472         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
15473         * decl2.c (grokclassfn): Likewise.
15475         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
15477         * decl2.c (lang_decode_option): Don't set default message length
15478         here.
15479         * lex.c (lang_init_options): Set it here.
15481 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
15483         Make DECL_CONTEXT mean the class in which a member function was
15484         declared, even for a virtual function.
15485         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
15486         (DECL_FRIEND_CONTEXT): New macro.
15487         (DECL_REAL_CONTEXT): Remove.
15488         (SET_DECL_FRIEND_CONTEXT): Likewise.
15489         (DECL_VIRTUAL_CONTEXT): Adjust.
15490         (DECL_CLASS_SCOPE_P): Use TYPE_P.
15491         (add_friends): Remove.
15492         (hack_decl_function_context): Likewise.
15493         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
15494         CP_DECL_CONTEXT.
15495         (build_over_call): Fix indentation.  Use DECL_CONTEXT
15496         instead of DECL_CLASS_CONTEXT.
15497         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
15498         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15499         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15500         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
15501         (build_base_field): Likewise.
15502         (finish_struct_1): Likewise.
15503         (build_self_reference): Likewise.
15504         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
15505         DECL_REAL_CONTEXT.
15506         (pushtag): Use decl_function_context, not
15507         hack_decl_function_context.
15508         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15509         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
15510         (pushdecl): Remove bogus code.
15511         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
15512         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15513         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15514         Use decl_function_context, nothack_decl_function_context.
15515         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
15516         (grokdeclarator): Likewise.  Use decl_function_context, not
15517         hack_decl_function_context.
15518         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
15519         (start_function): Use DECL_FRIEND_CONTEXT, not
15520         DECL_CLASS_CONTEXT.  Use decl_function_context, not
15521         hack_decl_function_context.
15522         (finish_function): Use decl_function_context, not
15523         hack_decl_function_context.
15524         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
15525         DECL_CLASS_CONTEXT.
15526         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
15527         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
15528         (grokfield): Likewise.
15529         (finish_builtin_type): Likewise.
15530         (finish_vtable_vardec): Use decl_function_context, not
15531         hack_decl_function_context.
15532         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15533         (start_static_initialization_or_destruction): Likewise.
15534         (finish_static_initialization_or_destruction): Likewise.
15535         (mark_used): Adjust logic for deciding when to synthesize methods.
15536         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
15537         DECL_REAL_CONTEXT.
15538         * error.c (dump_function_decl): Use DECL_CONTEXT, not
15539         DECL_CLASS_CONTEXT.
15540         * friend.c (is_friend): Likewise.
15541         (add_friends): Remove.
15542         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
15543         * lex.c (begin_definition_of_inclass_inline): Use
15544         decl_function_context, not hack_decl_function_context.
15545         (process_next_inline): Likewise.
15546         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15547         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
15548         DECL_CLASSS_CONTEXT.
15549         (hack_identifier): Likewise.
15550         (synthesize_method):  Use decl_function_context, not
15551         hack_decl_function_context.
15552         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
15553         DECL_REAL_CONTEXT.
15554         (is_member_template): Use decl_function_context, not
15555         hack_decl_function_context.  Use DECL_CONTEXT, not
15556         DECL_CLASS_CONTEXT.
15557         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
15558         DECL_CLASS_CONTEXT.
15559         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
15560         DECL_REAL_CONTEXT.
15561         (push_template_decl_real): Likewise.
15562         (instantiate_class_template): Don't call add_friends.
15563         (tsubst_default_argument): Use DECL_CONTEXT, not
15564         DECL_REAL_CONTEXT.
15565         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15566         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15567         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
15568         DECL_CLASS_CONTEXT.
15569         * repo.c (repo_inline_used): Likewise.
15570         * search.c (current_scope): Adjust for new _CONTEXT macros.
15571         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
15572         DECL_REAL_CONTEXT.
15573         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15574         (lookup_fnfields_here):Likewise.
15575         (check_final_overrider): Likewise.
15576         (init_vbase_pointers): Likewise.
15577         (virtual_context): Likewise.
15578         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
15579         (expand_body): Use decl_function_context, not
15580         hack_decl_function_context.
15581         * tree.c (hack_decl_function_context): Remove.
15582         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
15583         DECL_CLASS_CONTEXT.
15584         * typeck2.c (error_not_base_type): Likewise.
15586 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
15588         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
15590 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15592         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
15594 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
15596         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
15598 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
15600         * decl2.c (lang_decode_option): Enable automatic line wrapping.
15602 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
15604         * parse.y (frob_specs): Split out...
15605         (parse_decl): From here.
15606         (fn.def2): Call initial_deferred_type_access_control.
15607         (after_type_component_declarator0): Call frob_specs.
15608         (notype_component_declarator0): Likewise.
15609         * search.c (friend_accessible_p): Nested classes are friends of their
15610         enclosing classes.
15612 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
15614         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
15615         used to create an implicit temporary.
15617         * class.c (dfs_modify_vtables): Tweak calculation of functions to
15618         override.
15620 2000-02-08  Nathan Sidwell  <nathan@acm.org>
15622         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
15623         strip array element qualifiers too.
15625 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
15627         * decl.c (store_parm_decls): Don't build cleanups for parameters
15628         while processing_template_decl.
15630 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
15632         * cp-tree.h (struct saved_scope): Add incomplete field.
15633         (namespace_scope_incomplete): New macro.
15634         * decl.c (pushdecl): Use it.
15635         (hack_incomplete_structures): Use it.  See through artificial
15636         binding levels.
15637         (mark_saved_scope): Mark it.
15639         Implement access control for nested types.
15640         * search.c (type_access_control): New fn.
15641         (accessible_p): Now we do perform access control for types.
15642         * semantics.c (deferred_type_access_control): New fn.
15643         (initial_deferred_type_access_control): New fn.
15644         (begin_function_definition): Call it.  Add lookups parm.
15645         * decl.c (struct binding_level): Add this_class field.
15646         (pushlevel_class): Set it.
15647         (mark_binding_level): Mark it.
15648         (lookup_name_real): Use it.  Call type_access_control.
15649         (mark_saved_scope): Mark lookups field.
15650         * cp-tree.h (flagged_type_tree): Add lookups field.
15651         (struct saved_scope): Add lookups field.
15652         (type_lookups): New macro.
15653         * parse.y (declmods): Now <ftype>.
15654         (parse_decl): Add lookups parm.  Call
15655         initial_deferred_type_access_control.
15656         (lang_extdef): Clear type_lookups.
15657         (typed_declspecs, declmods, typespec): Set lookups field.
15658         (initdcl): Call deferred_type_access_control.
15659         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
15660         component_decl_1, named_parm): Adjust.
15661         * friend.c (is_friend): Nested classes are friends of their
15662         enclosing classes.
15664         * class.c (currently_open_derived_class): New fn.
15665         * method.c (hack_identifier): Use it.
15667         * lex.c (do_identifier): Remove obsolete code.
15669         * parse.y (typed_typespecs): Propagate new_type_flag properly.
15671 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
15673         * tinfo.h: Remove apostrophes from C++ comment (xgettext
15674         thinks this file is plain C).
15676 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15678         * Makefile.in (call.o): Depend on $(EXPR_H).
15680         * call.c: Include "expr.h".
15682         * class.c (dump_class_hierarchy): Add prototype.
15684         * search.c (dfs_get_pure_virtuals): Likewise.
15686 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
15688         * parse.y (simple_stmt): Allow :: token in asm parameter list.
15689         * parse.c: Rebuilt.
15691 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
15693         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
15694         Store it in DECL_FCONTEXT.
15695         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
15697 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
15699         * tinfo.h (old abi): #include "tconfig.h".
15700         * tinfo.cc (convert_to_base): Move into old abi section.
15702 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
15704         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
15705         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
15706         (BINFO_PRIMARY_BINFO): New macro.
15707         (BF_DELTA): Rename to ...
15708         (BV_DELTA): ... this.
15709         (BF_VCALL_INDEX): Rename to ...
15710         (BV_VCALL_INDEX): ... this.
15711         (BF_FN): Rename to ...
15712         (BV_FN): ... this.
15713         * class.c (build_vbase_path): Adjust for changes to reverse_path.
15714         (set_rtti_entry): Rename BF_ macros to BV_ variants.
15715         (modify_vtable_entry): Simplify.
15716         (add_virtual_function): Rename BF_ macros to BV_ variants.
15717         (build_vtable_initializer): Likewise.
15718         (get_class_offset_1): Remove.
15719         (dfs_get_class_offset): Likewise.
15720         (get_class_offset): Likewise.
15721         (dfs_find_final_overrider): New function.
15722         (find_final_overrider): Likewise.
15723         (modify_one_vtable): Remove.
15724         (dfs_find_base): New function.
15725         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
15726         find_final_overrider.
15727         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
15728         virtuals.
15729         (dfs_fixup_vtable_deltas): Remove.
15730         (override_one_vtable): Remove.
15731         (merge_overrides): Likewise.
15732         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
15733         unreal chilren of virtual bases.
15734         (finish_struct_1): Don't use merge_overrides.  Don't use
15735         dfs_fixup_vtable_deltas.
15736         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
15737         BINFOs.
15739 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
15740             Jason Merrill  <jason@yorick.cygnus.com>
15742         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
15744 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
15746         * exception.cc (__throw_bad_typeid): Add missing std::.
15748 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15750         * cp-tree.h (make_thunk): PROTO -> PARAMS.
15752 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
15754         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
15756         Runtime support for new-abi rtti.
15757         * inc/typeinfo (type_info::operator!=): Define in class.
15758         (type_info::before, type_info::name, type_info::operator==,
15759         type_info::operator!=): Define new ABI implementations.
15760         (type_info::is_pointer_p, type_info::is_function_p): Declare
15761         new virtual functions.
15762         (type_info::do_catch, type_info::do_upcast): Likewise.
15764         * tinfo.h (__base_class_info): Define new class.
15765         (__class_type_info): Likewise.
15766         (__si_class_type_info): Likewise.
15767         (__vmi_class_type_info): Likewise.
15768         (__dynamic_cast): Prototype.
15770         * tinfo.cc: Conditionalize old and new rtti mechanisms.
15771         (type_info::is_pointer_p): Define new function.
15772         (type_info::is_function_p): Likewise.
15773         (type_info::do_catch): Likewise.
15774         (type_info::do_upcast): Likewise.
15775         (vtable_prefix): New structure for vtable access.
15776         (adjust_pointer): Define new template function.
15777         (contained_p, public_p, virtual_p, contained_public_p,
15778         contained_nonpublic_p, contained_nonvirtual_p): Define new
15779         functions.
15780         (nonvirtual_base_type): New local variable.
15781         (__class_type_info::~__class_type_info): Define.
15782         (__si_class_type_info::~__si_class_type_info): Likewise.
15783         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
15784         (__class_type_info::do_catch): Define new function.
15785         (__class_type_info::do_upcast): Likewise.
15786         (__class_type_info::find_public_src): Likewise.
15787         (__class_type_info::do_find_public_src): Likewise.
15788         (__si_class_type_info::do_find_public_src): Likewise.
15789         (__vmi_class_type_info::do_find_public_src): Likewise.
15790         (__class_type_info::do_dyncast): Likewise.
15791         (__si_class_type_info::do_dyncast): Likewise.
15792         (__vmi_class_type_info::do_dyncast): Likewise.
15793         (__class_type_info::do_upcast): Likewise.
15794         (__si_class_type_info::do_upcast): Likewise.
15795         (__vmi_class_type_info::do_upcast): Likewise.
15796         (__dynamic_cast): Likewise.
15798         * tinfo2.cc (__fundamental_type_info): Define new class.
15799         (__pointer_type_info): Likewise.
15800         (__reference_type_info): Likewise.
15801         (__array_type_info): Likewise.
15802         (__function_type_info): Likewise.
15803         (__enum_type_info): Likewise.
15804         (__ptr_to_member_type_info): Likewise.
15805         (__fundamental_type_info::~__fundamental_type_info): Define.
15806         (__pointer_type_info::~__pointer_type_info): Likewise.
15807         (__reference_type_info::~__reference_type_info): Likewise.
15808         (__array_type_info::~__array_type_info): Likewise.
15809         (__function_type_info::~__function_type_info): Likewise.
15810         (__enum_type_info::~__enum_type_info): Likewise.
15811         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
15812         (__pointer_type_info::do_catch): Define new function.
15813         (__ptr_to_member_type_info::do_catch): Define new function.
15815         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
15816         (__is_pointer): Likewise.
15818         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
15820 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
15822         * cp/class.c (build_vtable): Rename to build_primary_vtable.
15823         (prepare_fresh_vtable): Rename to build_secondary_vtable.
15824         (make_new_vtable): New function.
15825         (modify_vtable_entry): Handle generation of new vtables correctly.
15826         (modify_one_vtable): Remove unused parameter.
15827         (dfs_fixup_vtable_deltas): Likewise.
15828         (override_one_vtable): Use build_secondary_vtable.
15829         (finish_struct_1): Use build_primary_vtable and
15830         build_secondary_vtable.
15832 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
15834         * cp/decl.c: Adjust variable names, comments, help strings.
15836 2000-01-29  Nathan Sidwell  <nathan@acm.org>
15838         * new2.cc (operator delete[]): Use operator delete, don't assume
15839         implementation.
15841 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
15843         * class.c (build_vtbl_initializer): Add argument to
15844         build_vtable_entry call.
15846 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
15848         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
15849         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
15850         (BF_DELTA): New macro.
15851         (BF_VCALL_INDEX): Likewise.
15852         (BF_FN): Likewise.
15853         (THUNK_VCALL_OFFSET): Likewise.
15854         (make_thunk): Change prototype.
15855         * class.c (build_vtable_entry): Integrate
15856         build_vtable_entry_for_fn.  Handle vcall indices.
15857         (build_vtable_entry_for_fn): Remove.
15858         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
15859         BF_VCALL_INDEX, BF_FN.
15860         (modify_vtable_entry): Integrate common code from
15861         modify_one_vtable and dfs_fixup_vtable_deltas.
15862         (add_virtual_function): Set BF_VCALL_INDEX.
15863         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
15864         and BF_FN.
15865         (modify_one_vtable): Simplify.
15866         (dfs_fixup_vtable_deltas): Likewise.
15867         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
15868         * method.c (make_thunk): Handle vcall indices.
15870 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
15872         Compiler side new abi rtti (not enabled).
15873         * cp-tree.h (new_abi_rtti_p): New macro.
15874         (emit_support_tinfos): Prototype new function.
15875         (tinfo_decl_p): Likewise.
15876         (emit_tinfo_decl): Likwise.
15877         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
15878         macros.
15879         (doing_runtime): New local static.
15880         (init_rtti_processing): Add new-abi initializer.
15881         (get_tinfo_decl): Add new-abi logic.
15882         (tinfo_from_decl): Likewise.
15883         (build_dynamic_cast_1): Likewise.
15884         (qualifier_flags): New static function.
15885         (tinfo_base_init): Likewise.
15886         (generic_initializer): Likewise.
15887         (ptr_ref_initializer): Likewise.
15888         (ptmd_initializer): Likewise.
15889         (class_hint_flags): Likewise.
15890         (class_initializer): Likewise.
15891         (synthesize_tinfo_var): Likewise.
15892         (create_real_tinfo_var): Likewise.
15893         (create_pseudo_type_info): Likewise.
15894         (get_vmi_pseudo_type_info): Likewise.
15895         (create_tinfo_types): Likewise.
15896         (emit_support_tinfos): New global function.
15897         (tinfo_decl_p): New global predicate.
15898         (emit_tinfo_decl): New global function.
15899         * class.c (set_rtti_entry): Generalize for old and new rtti.
15900         (build_vtbl_initializer): Likewise.
15901         * decl2.c (finish_file): Likewise.
15903 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
15905         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
15906         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
15908 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
15910         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
15911         for scopes.
15913 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
15915         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
15917 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
15919         * optimize.c (calls_setjmp_r): Supply new argument
15920         to special_function_p.
15922 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15924         * call.c: PROTO -> PARAMS.
15925         * class.c: Likewise.
15926         * cp-tree.h: Likewise.
15927         * cvt.c: Likewise.
15928         * decl.c: Likewise.
15929         * decl.h: Likewise.
15930         * decl2.c: Likewise.
15931         * dump.c: Likewise.
15932         * errfn.c: Likewise.
15933         * error.c: Likewise.
15934         * except.c: Likewise.
15935         * expr.c: Likewise.
15936         * init.c: Likewise.
15937         * input.c: Likewise.
15938         * lex.c: Likewise.
15939         * lex.h: Likewise.
15940         * method.c: Likewise.
15941         * optimize.c: Likewise.
15942         * parse.y: Likewise.
15943         * pt.c: Likewise.
15944         * repo.c: Likewise.
15945         * rtti.c: Likewise.
15946         * search.c: Likewise.
15947         * semantics.c: Likewise.
15948         * spew.c: Likewise.
15949         * tree.c: Likewise.
15950         * typeck.c: Likewise.
15951         * typeck2.c: Likewise.
15952         * xref.c: Likewise.
15954 2000-01-25  Richard Henderson  <rth@cygnus.com>
15956         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
15958 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
15960         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
15961         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
15962         (struct vcall_offset_data_s): New type.
15963         (dfs_vcall_offset_queue_p): New function.
15964         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15965         (build_vcall_offset_vtbl_entries): Likewise.
15966         (layout_vtable_decl): Likewise.
15967         (num_vfun_entries): Likewise.
15968         (num_extra_vtbl_entries): Add the entries for vcall offsets.
15969         (build_vtbl_initializer): Likewise.
15970         (dfs_finish_vtabls): Use layout_vtable_decl.
15971         (modify_one_vtables): Always duplicate vtables under the new ABI.
15972         (finish_struct_1): Use layout_vtable_decl.
15974 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15976         * decl.c (member_function_or_else): Change third arg from a format
15977         specifier to an `enum overload_flags'.  Callers changed.
15979 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
15981         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
15982         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
15983         build_const_cast, get_delta_difference, check_return_expr): Avoid
15984         ANSI string concatenation usage.
15986 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
15988         * class.c (layout_class_type): Put the fields required to make a
15989         class non-empty at the end, not the beginning, of the TYPE_FIELDs
15990         list.
15992 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
15994         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
15995         template.
15997         * decl2.c (mark_used): Do instantiate inlines that have been
15998         explicitly instantiated.
16000 2000-01-24  Richard Henderson  <rth@cygnus.com>
16002         * call.c (build_over_call): Use expand_tree_builtin.
16003         * typeck.c (build_function_call_real): Likewise.
16004         (build_binary_op_nodefault): Handle unordered compares.
16006 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16008         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
16009         cp_tree_index values.
16010         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
16011         New global node #defines for them.
16012         * rtti.c (call_void_fn): Replace with ...
16013         (build_runtime_decl): ... new static function.
16014         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
16015         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
16016         (build_dynamic_cast_1): Always produce correctly typed result.
16017         Explicitly produce type_info addresses. Use dynamic_cast_node.
16018         * exception.cc (__throw_bad_cast): Return `void *'.
16019         (__throw_bad_typeid): Return `const type_info &'.
16021 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16023         * cp-tree.h (get_vtable_decl): Prototype new function.
16024         * class.c (get_vtable_decl): New function. Broken out from ...
16025         (build_vtable): ... here. Use it.
16026         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
16027         by get_vtable_decl.
16029 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16031         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
16032         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
16033         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
16034         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
16035         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
16036         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
16037         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
16038         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
16039         (CPTI_TINFO_VAR_ID): New enumeration.
16040         (__tp_desc_type_node, __access_mode_type_node,
16041         __bltn_desc_type_node, __user_desc_type_node,
16042         __class_desc_type_node, __ptr_desc_type_node,
16043         __attr_desc_type_node, __func_desc_type_node,
16044         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
16045         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
16046         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
16047         enum_desc_type_node, class_desc_type_node,
16048         si_class_desc_type_node, vmi_class_desc_type_node,
16049         ptmd_desc_type_node, base_desc_type_node): New #defines.
16050         (tinfo_fn_id, tinfo_fn_type): Rename to ...
16051         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
16052         (tinfo_var_id): New enumeration.
16053         (DECL_TINFO_FN_P): Augment comment.
16054         * decl.c (cp_global_trees): Adjust documentation.
16055         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
16056         tinfo_decl_type and tinfo_var_id.
16057         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
16058         (build_typeid): Remove unused variable.
16059         (get_tinfo_var): Use tinfo_var_id.
16060         (tinfo_name): New static function.
16061         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
16062         (tinfo_from_decl): Likewise.
16063         (get_base_offset): New static function, broken out of
16064         expand_class_desc.
16065         (expand_si_desc): Use tinfo_name.
16066         (expand_class_desc): Likewise. Lose local static variable.
16067         Use base_desc_type_node. Use get_base_offset.
16068         (expand_ptr_desc): Use tinfo_name.
16069         (expand_attr_desc): Likewise.
16070         (expand_generic_desc): Likewise.
16072         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
16073         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
16075 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16077         * cp-tree.h (__eprintf): Remove declaration.
16078         * tree.c (__eprintf): Remove definition.
16080 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
16081             Mark Mitchell  <mark@codesourcery.com>
16083         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
16084         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
16086 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
16088         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
16090 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16092         * cp-tree.h (register_dtor_fn): New function.
16093         * decl.c (destroy_local_static): Rename to ...
16094         (register_dtor_fn): ... this.  Give it external linkage.
16095         (expand_static_init): Use it.
16096         * decl2.c (do_static_initialization): Likewise, if using
16097         __cxa_atexit.
16098         (do_static_destruction): Check that __cxa_atexit is not in use.
16099         (finish_file): Don't call do_static_destruction if using
16100         __cxa_atexit.
16102         * typeck.c (convert_arguments): Restore two-message error
16103         reporting.
16105 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
16107         Remap dynamic cast hint values to be consistent across ABIs.
16108         * search.c (dynamic_cast_base_recurse): Remap generated value.
16109         (get_dynamic_cast_base_type): Adjust documentation.
16110         * tinfo.h (__user_type_info::dyncast): Likewise.
16111         (__user_type_info::find_public_subobj): Remap BOFF meaning.
16112         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
16113         (__class_type_info::do_dyncast): Likewise.
16114         (__class_type_info::do_find_public_subobj): Likewise.
16115         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
16117 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16119         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
16121         * typeck2.c (incomplete_type_error): Restore previous
16122         cp_error and cp_error_at call sequence.
16124 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
16126         * class.c (dump_class_hierarchy): Make format agree with argument;
16127         cast pointer to unsigned long and print with %lx.
16129 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16131         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
16133         * typeck.c (composite_pointer_type, common_type,
16134         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
16135         build_function_call_real, convert_arguments,
16136         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
16137         build_unary_op, mark_addressable, build_compound_expr,
16138         build_static_cast, build_reinterpret_cast, build_const_cast,
16139         build_c_cast, build_modify_expr, get_delta_difference,
16140         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
16141         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
16142         into a single one.
16143         * typeck2.c (readonly_error, abstract_virtuals_error,
16144         process_init_constructor, check_for_new_type): Likewise.
16146 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
16148         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
16149         VAR_DECLs.
16151 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
16153         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
16154         (build_x_typeid): Likewise.
16155         (get_tinfo_fn): Likewise.
16156         (get_tinfo_fn_unused): Rename to ...
16157         (get_tinfo_decl): ... here.
16158         * rtti.c (build_headof): Replace logic error with assertion.
16159         (get_tinfo_fn_dynamic): Rename to ...
16160         (get_tinfo_decl_dynamic): ... here. Make static. Use
16161         complete_type_or_else.
16162         (build_x_typeid): Move into ...
16163         (build_typeid): ... here. Adjust call to
16164         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
16165         throw_bad_typeid expression.
16166         (get_tinfo_fn_unused): Rename to ...
16167         (get_tinfo_decl): ... here. Adjust comment.
16168         (get_tinfo_fn): Delete.
16169         (tinfo_from_decl): New static function.
16170         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
16171         (get_typeid): Use complete_type_or_else.
16172         (build_dynamic_cast_1): Adjust calls to
16173         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
16174         * parse.y (primary): Adjust call to build_typeid.
16175         * except.c (build_eh_type_type_ref): Adjust call to
16176         get_tinfo_decl. Mark as used.
16177         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
16178         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
16179         * parse.c: Regenerated.
16181 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
16183         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
16184         calling convention.
16185         (resolves_to_fixed_type_p): Document calling convention.
16186         * rtti.c (build_x_typeid): Initialize NONNULL.
16188         * cp-tree.h (build_shared_int_cst): New function.
16189         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
16190         * class.c (modify_vtable_entry): Likewise.
16191         (add_virtual_function): Split out code to generated shared
16192         INTEGER_CSTs to build_share_int_cst.
16193         (modify_all_vtables): Handle all the overridden functions here.
16194         Add overridden functions from non-primary virtual bases to the
16195         primary vtable.
16196         (finish_struct_1): Adjust call to modify_all_vtables.  Add
16197         overridden functions from non-primary bases to the vtable.
16198         * tree.c (build_shared_int_cst): New function.
16200         * cp-tree.h (scratchalloc): Remove.
16201         (build_scratch_list): Likewise.
16202         * call.c (convert_class_to_reference): Replace build_scratch_list
16203         and build_expr_list with build_tree_list.
16204         (add_candidate): Replace scratchalloc with expralloc.  Note memory
16205         leak.
16206         (build_user_type_conversion_1):  Replace build_scratch_list
16207         and build_expr_list with build_tree_list.
16208         (build_new_op): Likewise.
16209         (build_op_delete_call): Likewise.
16210         (convert_like): Likewise.
16211         * cvt.c (ocp_convert): Likewise.
16212         * decl.c (start_decl): Likewise.
16213         (start_function): Likewise.
16214         (finish_destructor_body): Likewise.
16215         (maybe_build_cleanup_1): Likewise.
16216         * decl2.c (reparse_decl_as_expr): Likewise.
16217         * init.c (perform_member_init): Likewise.
16218         (expand_cleanup_for_base): Likewise.
16219         (build_builtin_delete_call): Likewise.
16220         (build_new_1): Likewise.
16221         (build_delete): Likewise.
16222         * method.c (do_build_assign_ref): Likewise.
16223         * parse.y (already_scoped_stmt): Likewise.
16224         (nontrivial_exprlist): Likewise.
16225         (net_initializer): Likewise.
16226         (initlist): Likewise.
16227         * parse.c: Regenerated.
16228         * rtti.c (build_x_typeid): Likewise.
16229         (build_dynamic_cast_1): Likewise.
16230         * typeck.c (build_x_compound_expr): Likewise.
16231         (build_static_cast): Likewise.
16232         (build_modify_expr): Likewise.
16234         * cp-tree.h (DECL_VINDEX): Add documentation.
16235         * class.c (build_vtable_entry): Likewise.
16236         (start_vtable): Add comment.
16237         (add_virtual_function): Replace pending_hard_virtuals with
16238         overridden_virtuals and pending_virtuals with new_virtuals.
16239         Replace redundant assignments with assertions.
16240         (check_for_override): Add comment.
16241         (check_bases_and_members): Replace pending_hard_virtuals with
16242         overridden_virtuals and pending_virtuals with new_virtuals.
16243         (create_vtbl_ptr): Likewise.
16244         (layout_class_type): Likewise.
16245         (finish_struct_1): Likewise.  Add comments.
16247 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
16249         * class.c (finish_struct_1): Replace redundant code with
16250         assertions.
16252         * cp-tree.h (flag_new_abi): Move.
16253         (flag_use_cxa_atexit): Likewise.
16254         (flag_honor_std): Likewise.
16255         (flag_rtti): Likewise.
16256         (vbase_offsets_in_vtable_p): Define.
16257         (vptrs_present_everywhere_p): Likewise.
16258         (TYPE_CONTAINS_VPTR_P): Likewise.
16259         (dfs_walk_real): Declare.
16260         * class.c (build_vbase_pointer_fields): Check
16261         vbase_offsets_in_vtable_p.
16262         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
16263         BINFO_VPTR_FIELD.
16264         (build_vbase_offset_vtbl_entries): Simplify.
16265         (build_vbase_offset_vtbl_entries): Adjust.
16266         (build_vbase_pointer): Add ability to look up vbase offsets in
16267         vtable.
16268         (start_vtable): New function.
16269         (add_virtual_function): Use it.
16270         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
16271         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
16272         (build_vtbl_initializer): Take the type of the complete object as
16273         input.  Use it to correctly calculate vbase offsets.
16274         (dfs_finish_vtbls): Pass the complete type to
16275         build_vtbl_initializer.
16276         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
16277         (create_vtable_ptr): Create a vtable even if there are no
16278         new virtual functions, under the new ABI.
16279         (finish_struct_1): Likewise.
16280         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
16281         * decl.c (exapnd_static_init): Remove call to
16282         preserve_initializer.
16283         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
16284         vtables.
16285         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
16286         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
16287         (construct_virtual_bases): Don't initialize virtual base pointers
16288         under the new ABI.
16289         (build_aggr_init): Clean up comment.
16290         (expand_aggr_init_1): Likewise.
16291         * rtti.c (expand_class_desc): Store the virtual function table
16292         index where the vbase offset lives in the offset field.
16293         * search.c (dfs_walk_real): Make it global.
16294         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
16295         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
16297         * tinfo.h (USItype): Make it signed under the new ABI.
16298         * tinfo.cc (convert_to_base): New function.  Encapsulate base
16299         conversion logic here.
16300         (__class_type_info::do_upcast): Use it.
16301         (__class_type_info::do_dyncast): Likewise.
16302         (__class_type_info::do_find_public_subobj): Likewise.
16304         * init.c (construct_virtual_bases): Don't look up the addresses of
16305         virtual bases at run-time.
16307         * class.c (build_vbase_pointer): Relocate.
16308         (build_vbase_pointer_fields): Likewise.
16309         (dfs_build_vbase_offset_vtbl_entries): Likewise.
16310         (build_vbase_offset_vtbl_entries): Likewise.
16312         * decl.c (init_decl_processing): Complain if -fnew-abi
16313         -fno-vtable-thunks is used.
16315         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
16316         flag_new_abi.
16318 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
16320         * cp-tree.h (num_extra_vtbl_entries): New function.
16321         (size_extra_vtbl_entries): Likewise.
16322         (dfs_vtable_path_unmark): Likewise.
16323         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
16324         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16325         * class.c (num_extra_vtbl_entries): New function.
16326         (size_extra_vtbl_entries): Likewise.
16327         (dfs_build_vbase_offset_vtbl_entries): New function.
16328         (build_vbase_offset_vtbl_entries): Likewise.
16329         (build_vtbl_initializer): Use it.
16330         (finish_struct_1): Adjust vtable sizes (using
16331         num_extra_vtbl_entries).
16332         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
16333         THUNK_DECL is non-NULL before expanding it.
16334         * init.c (expand_virtual_init): Adjust the vtable pointer by
16335         size_extra_vtbl_entries before storing it.
16336         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
16337         Handle TREE_LIST parameters here, not in the dfs_* functions.
16338         (dfs_unmarked_real_bases_queue_p): Adjust.
16339         (dfs_marked_real_bases_queue_p): Likewise.
16340         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
16341         (dfs_vtable_path_marked_real_bases_queue_p): New function.
16342         (dfs_vtable_path_unmark): Likewise.
16344 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
16346         * optimize.c (copy_body_r): Clear the operand three of a
16347         TARGET_EXPR when copying it.
16349 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16351         * method.c (build_decl_overload_real): Check whether we are in ::
16352         before returning __builtin_new/delete.
16354 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
16356         * pt.c (tsubst_friend_function): Improve comment.
16357         (instantiate_decl): Avoid crashing when a "nested" function is
16358         instantiated from the top level.
16360         * dump.c (dqeueue_and_dump): Dump
16361         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
16363 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16365         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
16367 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
16369         * g++spec.c (lang_specific_driver): Add -fnew-abi if
16370         ENABLE_NEW_GXX_ABI defined.
16371         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
16372         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
16373         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
16375 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
16377         * decl.c (start_cleanup_fn): Call pushdecl.
16379         * call.c (convert_class_to_reference): Fix typos.
16380         (build_conditional_expr): Handle errors gracefully.
16381         * class.c (push_nested_class): Likewise.
16382         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
16383         (DECL_THIS_EXTERN): Use it.
16384         (DECL_THIS_STATIC): Likewise.
16385         * cvt.c (convert_to_void): Handle errors gracefully.
16386         (build_expr_type_conversion): Likewise.
16387         * decl.c (maybe_push_decl): Likewise.
16388         (start_decl_1): Likewise.
16389         (require_complete_types_for_parms): Likewise.
16390         * parse.y (structsp): Likewise.
16391         (base_class): Likewise.
16392         * parse.c: Regenerated.
16393         * pt.c (finish_member_template_decl): Likewise.
16394         * typeck.c (decay_conversion): Likewise.
16396         * cp-tree.h (dfs_skip_vbases): New function.
16397         (find_vbase_instance): Likewise.
16398         * class.c (determine_primary_base): Allow a nearly empty base to
16399         serve as a primary base class under the new ABI.
16400         (get_class_offset_1): Rename to ...
16401         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
16402         messages here.
16403         (get_class_offset): Use it.  Issue error messages here.
16404         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
16405         find the right copies of virtual bases.
16406         (fixup_vtable_deltas1): Rename to ...
16407         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
16408         bases as primary bases.
16409         (fixup_vtable_deltas): Remove.
16410         (override_one_vtable): Handle virtual bases as primary bases.
16411         (merge_overrides): Likewise.
16412         (finish_struct_1): Likewise.
16413         (dump_class_hierarchy): Dump primary-ness of bases as well.
16414         * search.c (mark_primary_bases): Use a pre-order traversal to
16415         handle primary virtual bases.
16416         (dfs_skip_vbases): New fiunction.
16417         (expand_upcast_fixups): Adjust to handle primary virtual bases.
16418         (fixup_virtual_upcast_offsets): Likewise.
16419         (fixup_all_virtual_upcast_offsets): Likewise.
16420         (dfs_find_vbase_instances): New function.
16421         (find_vbase_instance): Likewise.
16423 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
16425         * lex.c (DIR_SEPARATOR): Delete macro.
16427 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
16429        * decl2.c (lang_decode_option): Handle automatic line wrapping
16430        option.
16432 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
16434         * friend.c (do_friend): Don't resolve scopes when processing
16435         template declarations, even if the qualifying scope doesn't
16436         involve template parameters.
16438 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
16440         * class.c (dfs_modify_vtables_queue_p): Remove.
16441         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
16442         and dfs_marked_real_bases_queue_p instead of
16443         dfs_modify_vtables_queue_p.
16445         * class.c (build_vbase_path): Simplify.
16446         (dfs_propagate_binfo_offsets): New function.
16447         (propagate_binfo_offsets): Use it.
16448         (remove_base_field): Simplify.
16449         (dfs_set_offset_for_vbases): Remove.
16450         (dfs_set_offset_for_shared_vbases): New function.
16451         (dfs_set_offset_for_unshared_vbases): Likewise.
16452         (layout_virtual_bases): Use them.
16453         (layout_basetypes): Don't call propagate_binfo_offsets.
16454         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
16455         for the vbases.
16457         * class.c (build_base_field): New function, split out from ...
16458         (build_base_fields): ... here.  Use it.  Allocate primary bases
16459         first, under the new ABI.
16460         (get_vtable_entry): Remove.
16461         (remove_base_field): New function, split out from ...
16462         (remove_base_fields): ... here.  Adjust since primary bases come
16463         first under the new ABI.
16465         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
16466         (initialize_vtbl_ptrs): New function.
16467         (expand_indirect_vtbls_init): Change prototype.
16468         (convert_pointer_to_vbase): Declare.
16469         * init.c (expand_direct_vtbls_init): Remove.
16470         (dfs_initialize_vtbl_ptrs): New function.
16471         (initialize_vtbl_ptrs): Likewise.
16472         (emit_base_init): Use initialize_vtbl_ptrs.
16473         * search.c (convert_pointer_to_vbase): Make it global.
16474         (expand_indirect_vtbls_init): Remove vtable initialization code.
16475         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
16477         * class.c (dfs_finish_vtbls): New function.
16478         (finish_vtbls): Use it.
16479         (dump_class_hierarchy): New function.
16481         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
16482         (BINFO_VBASE_PRIMARY_P): New macro.
16483         (BINFO_VIRTUALS): Add to documentation.
16484         (SET_BINFO_PRIMARY_MARKED_P): Remove.
16485         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16486         (dfs_mark_primary_bases_queue_p): Likewise.
16487         (dfs_unmarked_real_bases_queue_p): New function.
16488         (dfs_marked_real_bases_queue_p): Likewise.
16489         * search.c (dfs_mark_primary_bases): Adjust.
16490         (mark_primary_bases): Likewise.
16491         (get_shared_vbase_if_not_primary): New function.
16492         (dfs_unmarked_real_bases_queue_p): Likewise.
16493         (dfs_marked_real_bases_queue_p): Likewise.
16494         (dfs_get_pure_virtuals): Simplify.
16495         (get_pure_virtuals): Likewise.
16497 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16499         * lex.c: Include tm_p.h.
16501 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
16503         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
16505 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
16507         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
16508         * pt.c (instantiate_decl): Defer comdat templates that might not be
16509         needed.
16511         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
16512         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
16513         (finish_file): Likewise.
16515         * decl2.c (import_export_class): Undo 12/14 change.
16517         * error.c (dump_decl): operator new, not operatornew.
16519         * class.c (field_decl_cmp): A nontype is "greater" than a type.
16520         * search.c (lookup_field_1): Look for the last field with the
16521         desired name.
16523 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16525         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
16526         FUNCTION_DECL.
16528 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16530         * typeck.c (build_static_cast): Don't strip target qualifiers
16531         when casting from a class.
16533 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16535         * class.c (warn_hidden): Initialize variable `fndecl'.
16537 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
16539         * decl.c (flag_isoc9x): New variable to be able to use code in
16540         c-common.c.  For now always zero.
16542 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
16544         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
16545         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
16546         or unshare_base_binfos for virtual bases here.
16547         * search.c (dfs_get_vbase_types): Do it here.
16548         (get_vbase_types): Adjust.
16550 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
16552         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
16553         (BINFO_PRIMARY_MARKED_P): Use flag 5.
16554         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16555         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16556         (unmark_primary_bases): Remove declaration.
16557         (unmarkedp): Declare.
16558         (dfs_vbase_unmark): Likewise.
16559         * class.c (determine_primary_base): Return immediately if there
16560         are no base classes.  Call mark_primary_bases here.
16561         (modify_all_direct_vtables): Remove.
16562         (modify_all_indirect_vtables): Remove.
16563         (dfs_modify_vtables_queue_p): New function.
16564         (dfs_modify_vtables): New function.
16565         (modify_all_vtables): Use them.
16566         (build_base_fields): Build FIELD_DECLs for primary virtual base
16567         classes.
16568         (create_vtable_ptr): Don't call determine_primary_base here.
16569         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
16570         (dfs_set_offset_for_vbases): ... this.
16571         (layout_virtual_bases): Use it.
16572         (layout_class_type): Call determine_primary_base here.
16573         * search.c (unmarkedp): Make it global.
16574         (shared_marked_p): Simplify.
16575         (shared_unmarked_p): Likewise.
16576         (dfs_primary_bases_queue_p): Remove.
16577         (dfs_unmark_primary_bases): Likewise.
16578         (unmark_primary_bases): Likewise.
16579         (mark_primary_bases): Simplify.
16580         (get_pure_virtuals): Don't call mark_primary_bases here.
16581         (dfs_vbase_unmark): New function.
16582         (get_vbase_types): Simplify.
16584         * class.c (struct base_info): Remove.
16585         (determine_primary_base): Take has_virtual_p rather than a
16586         base_info as input.  Don't calculate max_has_virtual.
16587         (finish_struct_bits): Remove max_has_virtual argument.
16588         (create_vtable_ptr): Remove max_has_virtual_p argument.
16589         (layout_virtual_bases): Remove max argument.
16590         (layout_basetypes): Likewise.
16591         (layout_class_type): Remove max_has_virtual_p argument.
16592         (finish_struct_1): Remove max_has_virtual.
16594         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
16595         (layout_basetypes): Remove.
16596         * class.c (propagate_binfo_offsets): Moved here from tree.c.
16597         Update to handle primary virtual bases.
16598         (remove_base_fields): New function, split out from
16599         layout_basetypes.
16600         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
16601         (layout_virtual_bases): New function, split out from
16602         layout_basetypes.  Update to handle primary virtual bases.
16603         (layout_basetypes): Moved here from tree.c.  Use
16604         remove_base_fields and layout_virtual_bases.
16605         * search.c (dfs_mark_primary_bases_queue_p): New function.
16606         (mark_primary_bases): Use it.
16607         * tree.c (CEIL): Remove.
16608         (propagate_binfo_offsets): Remove.
16609         (layout_basetypes): Remove.
16611 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16613         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
16614         (BINFO_PRIMARY_MARKED_P): New macro.
16615         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16616         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16617         (mark_primary_bases): New function.
16618         (unmark_primary_bases): Likewise.
16619         * search.c (get_abstract_virtuals_1): Remove.
16620         (dfs_mark_primary_bases): New function.
16621         (mark_primary_bases): Likewise.
16622         (dfs_unmark_primary_bases): Likewise.
16623         (unmark_primary_bases): Likewise.
16624         (dfs_get_pure_virtuals): Likewise.
16626 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16628         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
16629         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
16630         (modify_one_vtable): Adjust.
16631         (fixup_vtable_deltas1): Likewise.
16632         (override_one_vtable): Likewise.
16633         * search.c (get_abstract_virtuals_1): Likewise.
16634         (get_pure_virtuals): Likewise.
16635         (expand_upcast_fixups): Likewise.
16636         * tree.c (debug_binfo): Likewise.
16638         * class.c (build_vtable): Don't return a value.  Don't rebuild
16639         vtables for bases that have already been handled.
16640         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
16641         already been handled.
16642         (modify_one_vtable): Adjust accordingly.
16643         (fixup_vtable_deltas1): Likewise.
16644         (finish_struct_1): Likewise.
16646 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16648         * call.c (build_new_method_call): Also check destructors.