OSDN Git Service

PR c++/9459
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2003-02-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2
3         PR c++/9459
4         * error.c (dump_type_prefix): Handle TYPEOF_TYPE.
5         (dump_type_suffix): Likewise.
6
7 2003-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8
9         * search.c: ANSIfy function declarations and definitions.
10         * cp-tree.h (lookup_field, lookup_member): Last parameter is a bool.
11         * call.c (build_method_call, resolve_scoped_fn_name,
12         build_java_interface_fn_ref): Adjust lookup_field, lookup_member
13         calls.
14         * class.c (handle_using_decl): Likewise.
15         * decl.c (make_typename_type, make_unmound_class_template,
16         start_decl, compute_array_index_type): Likewise.
17         * decl2.c (build_expr_from_tree, build_call_from_tree): Likewise.
18         * init.c (expand_member_init, build_member_call): Likewise.
19         * pt.c (tsubst_copy, tsubst_copy_and_build, do_decl_instantiation,
20         resolve_typename_type): Likewise.
21         * typeck.c (lookup_destructor, finish_class_member_access_exprm
22         build_prememfunc_access_expr): Likewise.
23
24 2003-02-13  Gabriel Dos Reis <gdr@integrable-solutions.net>
25
26         * decl2.c: Include "timevar.h".
27         (namespace_ancestor): Time name lookup.
28         (add_using_namespace): Likewise.
29         (lookup_using_namespace): Likewise.
30         (qualified_lookup_using_namespace): Likewise.
31         (decl_namespace): Likewise.
32         (lookup_arg_dependent): Likewise.
33         * lex.c (do_identifier): Likewise.
34         (do_scoped_id): Likewise.
35         * pt.c (lookup_template_class): Likewise.
36
37 2003-02-14   Andrew Pinski <pinskia@physics.uc.edu>
38
39         * decl.c: (define_label): Fix warning for return 0 instead of NULL.
40         
41 2003-02-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
42
43         * decl.c: Include "timevar.h".
44         (poplevel): Time name lookup.
45         (find_binding): Likewise.
46         (push_namespace): Likewise.
47         (pop_nested_namespace): Likewise.
48         (store_bindings): Likewise.
49         (maybe_push_to_top_level): Likewise.
50         (pop_from_top_level): Likewise.
51         (push_local_name): Likewise.
52         (pushtag): Likewise.
53         (pushdecl): Likewise.
54         (pushdecl_with_scope): Likewise.
55         (pushdecl_namespace_level): Likewise.
56         (pushdecl_top_level): Likewise.
57         (pushdecl_class_level): Likewise.
58         (push_class_level_binding): Likewise.
59         (push_using_decl): Likewise.
60         (push_using_directive): Likewise.
61         (push_overloaded_decl): Likewise.
62         (lookup_label): Likewise.
63         (define_label): Likewise.
64         (lookup_tag): Likewise.
65         (lookup_tag_reverse): Likewise.
66         (lookup_namespace_name): Likewise.
67         (select_decl): Likewise.
68         (unqualified_namespace_lookup): Likewise.
69         (lookup_name_real): Likewise.
70         (lookup_name_current_level): Likewise.
71         (lookup_type_current_level): Likewise.
72         (maybe_inject_for_scope_var): Likewise.
73         (xref_tag): Likewise.
74
75         * Make-lang.in (cp/decl.o): Add dependency on timevar.h
76         
77 2003-02-12  Phil Edwards  <pme@gcc.gnu.org>
78
79         * decl.c (build_enumerator):  Remove unneeded test.
80
81 2003-02-09  Dan Nicolaescu  <dann@ics.uci.edu>
82
83         * cp-tree.h (struct lang_type_header): Make all fields unsigned
84         char.
85
86 2003-02-03  Mark Mitchell  <mark@codesourcery.com>
87
88         PR c++/7129
89         * call.c (z_candidate): Add args.
90         (convert_class_to_reference): Set it.
91         (implicit_conversion): Tidy.
92         (add_candidate): Add args parameter.
93         (add_function_candidate): Adjust call to add_candidate.
94         (add_conv_candidate): Likewise.
95         (build_builtin_candidate): Likewise.
96         (build_user_type_conversion_1): Eliminate wasteful tree_cons
97         usage.
98         (build_new_function_call): Likewise.
99         (build_object_call): Likewise.
100         (add_candidates): New function.
101         (build_new_op): Use it.
102         (covert_like_real): Adjust call to build_over_call.
103         (build_over_call): Remove args parameter.
104         * operators.def: Add <?= and >?=.
105
106 2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
107
108         * typeck.c (build_indirect_ref): Don't check flag_volatile.
109
110 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
111
112         PR c++/8849
113         * pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
114
115 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
116
117         * cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,
118         BINFO_PRIMARY_BASE_OF): Use BINFO_ELTS.
119         (BINFO_LANG_ELTS): New #define.
120         * tree.c (make_binfo): Use BINFO_LANG_ELTS.
121
122 2003-01-30  Geoffrey Keating  <geoffk@apple.com>
123
124         * cp/Make-lang.in: Remove -Wno-error from cp/decl.o.
125
126 2003-01-30  Mark Mitchell  <mark@codesourcery.com>
127
128         * class.c (check_field_decls): Only check C_TYPE_FIELDS_READONLY
129         for class types.
130         * cp-tree.h (C_TYPE_FIELDS_READONLY): Use a lang-specific bit
131         rather than TYPE_LANG_FLAG_0.
132         (TYPE_BUILT_IN): Remove.
133         (TYPE_DEPENDENT_P): New macro.
134         (TYPE_DEPENDENT_P_VALID): Likewise.
135         (lang_type_class): Add fields_readonly.
136         * decl.c (record_builtin_type): Don't set TYPE_BUILT_IN.
137         * pt.c (dependent_type_p_r): New function, split out from ...
138         (dependent_type_p): ... here.  Memoize results.
139         * search.c (dependent_base_p): Use dependent_type_p, not
140         uses_template_parms.
141         * typeck.c (build_modify_expr): Only check C_TYPE_FIELDS_READONLY
142         for class types.
143
144 2003-01-29  Mark Mitchell  <mark@codesourcery.com>
145
146         * call.c (build_field_call): Use build_new_op, not build_opfncall.
147         (prep_operand): New function.
148         (build_new_op): Use it.  Remove dead code.
149         * class.c (pushclass): Change "modify" parameter type from int to
150         bool.
151         (currently_open_class): Use same_type_p, not pointer equality.
152         (push_nested_class): Adjust calls to pushclass, remove modify
153         parameter.
154         * cp-tree.h (INTEGRAL_OR_ENUMERATION_TYPE_P): New macro.
155         (pushclass): Change prototype.
156         (push_nested_class): Likewise.
157         (grokoptypename): Remove.
158         (build_opfncall): Remove.
159         (value_dependent_expression_p): Declare.
160         (resolve_typename_type): Likewise.
161         (resolve_typename_type_in_current_instantiation): Likewise.
162         (enter_scope_of): Remove.
163         (tsubst): Remove.
164         (tsubst_expr): Likewise.
165         (tsubst_copy): Likewise.
166         (tsubst_copy_and_build): Likewise.
167         * decl.c (warn_about_implicit_typename_lookup): Remove.
168         (finish_case_label): Return error_mark_node for erroneous labels.
169         (start_decl): Adjust calls to push_nested_class.
170         (grokfndecl): Call push_scope/pop_scope around call to
171         duplicate_decls.
172         (grokdeclarator): Do not call tsubst.
173         (start_function): Adjust calls to push_nested_class.
174         * decl2.c (grok_array_decl): Use build_new_op, not build_opfncall.
175         (check_classfn): Use push_scope/pop_scope around type comparisions.
176         (grokoptypename): Remove.
177         (push_sscope): Adjust call to push_nested_class.
178         * error.c (dump_type): Show cv-qualification of typename types.
179         * init.c (build_member_call): Use build_new_op, not
180         build_opfncall.
181         * method.c (build_opfncall): Remove.
182         * parser.c (cp_parser): Add allow_non_constant_expression_p and
183         non_constant_expression_p.
184         (cp_parser_constant_expression): Adjust prototype.
185         (cp_parser_resolve_typename_type): Remove.
186         (cp_parser_non_constant_expression): New function.
187         (cp_parser_non_constant_id_expression): Likewise.
188         (cp_parser_new): Set allow_non_constant_expression_p and
189         non_constant_expression_p.
190         (cp_parser_primary_expression): Reject `this' and `va_arg' in
191         constant-expressions.  Note that dependent names aren't really
192         constant.
193         (cp_parser_postfix_expression): Reject conversions to non-integral
194         types in constant-expressions.  Neither are increments or
195         decrements.
196         (cp_parser_unary_expression): Reject increments and decrements in
197         constant-expressions.
198         (cp_parser_direct_new_declarator): Adjust call to
199         cp_parser_constant_expression.
200         (cp_parser_cast_expression): Reject conversions to non-integral
201         types in constant-expressions.
202         (cp_parser_assignment_expression): Rejects assignments in
203         constant-expressions.
204         (cp_parser_expression): Reject commas in constant-expressions.
205         (cp_parser_labeled_statement): Adjust call to
206         cp_parser_constant_expression.
207         (cp_parser_direct_declarator): Simplify array bounds, even in
208         templates, when they are non-dependent.  Use
209         resolve_typename_type, not cp_parser_resolve_typename_type.
210         (cp_parser_class_head): Use resolve_typename_type, not
211         cp_parser_resolve_typename_type.
212         (cp_parser_member_declaration): Adjust call to
213         cp_parser_constant_expression.
214         (cp_parser_constant_initializer): Likewise.
215         (cp_parser_constructor_declarator): Use resolve_typename_type, not
216         cp_parser_resolve_typename_type.
217         (cp_parser_late_parsing_default_args): Adjust call to
218         push_nested_class.
219         * pt.c (tsubst): Give it internal linkage.
220         (tsubst_expr): Likewise.
221         (tsubst_copy): Likewise.
222         (tsubst_copy_and_build): Likewise.
223         (push_access_scope_real): Likewise.
224         (tsubst_friend_class): Likewise.
225         (instantiate_class_template): Adjust call to pushclass.
226         (value_dependent_expression_p): Give it external linkage.
227         Robustify.
228         (resolve_typename_type): New function.
229         * semantics.c (finish_call_expr): Use build_new_op, not
230         build_opfncall.
231         (begin_constructor_declarator): Remove.
232         (begin_class_definition): Adjust call to pushclass.
233         (enter_scope_of): Remove.
234         * typeck.c (comptypes): Resolve typename types as appropriate.
235         (build_x_indirect_ref): Use build_new_op, not build_opfncall.
236         (build_x_compound_expr): Likewise.
237         (build_modify_expr): Likewise.
238         (build_x_modify_expr): Likewise.
239         * typeck2.c (build_x_arrow): Likewise.
240         
241 2003-01-29  Fariborz Jahanian  <fjahanian@apple.com>
242
243         * pt.c (last_pending_template) Declare GTY().
244
245 2003-01-29  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
246
247         PR c++/8591
248         * parser.c (cp_parser_elaborated_type_specifier): Convert
249         TEMPLATE_DECL to TYPE_DECL only when processing template friends.
250         (cp_parser_maybe_treat_template_as_class): Remove redundant tests.
251
252 2003-01-28  Nathan Sidwell  <nathan@codesourcery.com>
253
254         PR c++/9437
255         * pt.c (unify): Don't unify '*T' with 'U C::*'.
256
257         PR c++/3902
258         * parser.c (cp_parser_decl_specifier_seq): Cannot have constructor
259         inside a declarator.
260
261 2003-01-27  Nathan Sidwell  <nathan@codesourcery.com>
262
263         * class.c (update_vtable_entry_for_fn): Add index parameter.
264         Generate vcall thunk for covariant overriding from a virtual
265         primary base.
266         (dfs_modify_vtables): Adjust.
267
268 2003-01-25  Nathan Sidwell  <nathan@codesourcery.com>
269
270         PR c++/9403
271         * parser.c (cp_parser_class_or_namespace_name): Reject duplicate
272         template keyword.
273         (cp_parser_base_specifier): Look for and consume a
274         TEMPLATE keyword. Replace switch with array index.
275
276         PR c++/795
277         * semantics.c (finish_non_static_data_member): Remember the
278         field's type even in a template.
279
280         PR c++/9415
281         * pt.c (tsubst_copy_and_build, CALL_EXPR): BASELINK exprs are
282         already scoped.
283         
284         PR c++/8545
285         * parser.c (cp_parser_cast_expression): Be more tentative.
286
287 2003-01-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
288
289         * cp-tree.h (flagged_type_tree_s): Remove.
290         (check_for_new_type): Likewise.
291         * typeck2.c (check_for_new_type): Likewise.
292
293 2003-01-23  Nathanael Nerode  <neroden@gcc.gnu.org>
294
295         * dump.c: ANSIfy function declarations and definitions.
296
297         * cp-tree.h, decl.h: Get rid of PARAMS.  Again.
298
299 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
300
301         PR c++/9354
302         * init.c (build_new): Set the type of the new-expression, even
303         when processing_templte_decl.
304
305         PR c++/9216
306         * parser.c (cp_parser_primary_expression): Improve error message
307         for templates used in an expression context.
308
309         PR c++/8696
310         * parser.c (cp_parser_decl_specifier_seq): Commit to tentative
311         parse when encountering "typedef".
312
313 2003-01-22  Nathanael Nerode  <neroden@gcc.gnu.org>
314
315         * class.c, parser.c: ANSIfy function definitions and declarations.
316
317 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
318
319         PR c++/9328
320         * error.c (dump_decl): For an OVERLOAD, just print the name of the
321         function; it doesn't make sense to try to print its type.
322         * semantics.c (finish_typeof): Issue errors about invalid uses.
323
324         PR c++/9298
325         * parser.c (cp_parser_consume_semicolon_at_end_of_statement): New
326         function.
327         (cp_parser_expression_statement): Use it.
328         (cp_parser_explicit_instantiation): Likewise.
329         * pt.c (do_decl_instantiation): Improve error handling logic.
330         
331 2003-01-22  Mark Mitchell  <mark@codesourcery.com>
332
333         PR c++/9384
334         * parser.c (cp_parser_using_declaration): Issue error messages
335         about name resolution failures here.
336
337         PR c++/9388
338         * class.c (currently_open_derived_class): Use dependent_type_p.
339         * cp-tree.h (dependent_type_p): New function.
340         (dependent_template_arg_p): Likewise.
341         (dependent_template_p): Likewise.
342         (type_dependent_expression_p): Likewise.
343         * parser.c (cp_parser_dependent_type_p): Remove.
344         (cp_parser_value_dependent_type_p): Likewise.
345         (cp_parser_type_dependent_expression_p): Likewise.
346         (cp_parser_dependent_template_arg_p): Likewise.
347         (cp_parser_dependent_template_id_p): Likewise.
348         (cp_parser_dependent_template_p): Likewise.
349         (cp_parser_diagnose_invalid_type_name): Replace
350         cp_parser_dependent_type_p with dependent_type_p, etc.
351         (cp_parser_primary_expresion): Likewise.
352         (cp_parser_nested_name_specifier_opt): Likewise.
353         (cp_parser_postfix_expression): Likewise.
354         (cp_parser_unary_expression): Likewise.
355         (cp_parser_template_name): Likewise.
356         (cp_parser_class_name): Likewise.
357         (cp_parser_lookup_name): Likewise.
358         * pt.c (dependent_type_p): New function.
359         (value_dependent_expression_p): Likewise.
360         (type_dependent_expression_p): Likewise.
361         (dependent_template_arg_p): Likewise.
362         (dependent_template_id_p): Likewise.
363         (dependent_template_p): Likewise.
364         
365         PR c++/9285
366         PR c++/9294
367         * parser.c (cp_parser_simple_declaration): Return quickly when
368         encountering errors.
369
370 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
371
372         Make-lang.in (cp/decl.o-warn): Add -Wno-error.
373
374 2003-01-17  Jason Merrill  <jason@redhat.com>
375
376         PR c++/9167, c++/9358
377         * decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.
378
379 2003-01-17  Jason Merrill  <jason@redhat.com>
380
381         PR c++/9342
382         * call.c (build_conditional_expr): Always do lvalue-rvalue
383         conversion.
384
385 2003-01-17  Mark Mitchell  <mark@codesourcery.com>
386
387         PR c++/9294
388         * cp-tree.def (BASELINK): Make it class 'x', not class 'e'.
389         * cp-tree.h (BASELINK_BINFO): Adjust.
390         (BASELINK_FUNCTIONS): Likewise.
391         (BASELINK_ACCESS_BINFO): Likewise.
392         (tree_baselink): New structure.
393         (cp_tree_node_structure_enum): Add TS_CP_BASELINK.
394         (lang_tree_node): Add baselink.
395         * decl.c (cp_tree_node_structure): Add BASELINK case.
396         * search.c (build_baselink): Adjust.
397         * tree.c (cp_walk_subtrees): Add BASELINK case.  Remove BASELINK_P
398         test from TREE_LIST case.
399
400         PR c++/9272
401         * parser.c (cp_parser_constructor_declarator_p): Do not assume
402         that a constructor cannot be declared outside of its own class.
403         
404         * parser.c (cp_parser_resolve_typename_type): If the scope cannot
405         be resolved, neither can the qualified name.
406
407         * rtti.c (get_pseudo_ti_desc): Fix thinko.
408
409 2003-01-16  Jason Merrill  <jason@redhat.com>
410
411         PR c++/8564
412         * init.c (build_vec_init): Re-add maxindex parm.
413         (perform_member_init, build_aggr_init): Pass it.
414         (build_new_1): Pass it. Use an incomplete array type for full_type.
415         * typeck.c (build_modify_expr): Pass it.
416         * cp-tree.h: Adjust.
417
418 2003-01-16  Jeffrey D. Oldham  <oldham@codesourcery.com>
419
420         * cp-tree.h (tsubst_copy_and_build): New declaration.
421         * pt.c (tsubst_copy): Remove 'build_expr_from_tree' from comment.
422         (tsubst_expr): Use 'tsubst_copy_and_build'.  Update initial comment.
423         (tsubst_copy_and_build): New function.
424
425 2003-01-16  Mark Mitchell  <mark@codesourcery.com>
426
427         * cp-tree.h (lang_type_class): Remove is_partial_instantiation.
428         (PARTIAL_INSTANTIATION_P): Remove.
429         (IMPLICIT_TYPENAME_P): Likewise.
430         (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise.
431         (build_typename_type): Remove declaration.
432         (parmlist_is_exprlist): Likewise.
433         * decl.c (build_typename_type): Make it static, remove third
434         parameter.
435         (push_class_binding): Don't do implicit typename stuff.
436         (make_typename_type): Likewise.
437         (lookup_name_real): Likewise.
438         (grokdeclarator): Don't try to convert declarations into
439         initializations.  Don't do implicit typename stuff.
440         (parmlist_is_exprlist): Remove.
441         (xref_basetypes): Simplify.
442         * decl2.c (grokfield): Don't try to convert declarations into
443         initializations.
444         (build_anon_union_vars): Do this while processing templates, too.
445         (finish_anon_union): Likewise.
446         * error.c (dump_type): Remove implicit typename handling.
447         * parser.c (cp_parser_diagnose_invalid_type_name): New method.
448         (cp_parser_primary_expression): Correct handling of names not
449         found by unqualified name lookup in templates.
450         (cp_parser_nested_name_specifier_opt): Avoid checking dependency
451         of types when possible.
452         (cp_parser_simple_declaration): Complain intelligently about some
453         invalid declarations.
454         (cp_parser_member_declaration): Likewise.
455         (cp_parser_constructor_declarator_p): Don't check when we're in a
456         function scope.
457         * pt.c (instantiate_class_template): Remove
458         PARTIAL_INSTANTIATION_P gunk.
459         * search.c (lookup_field_r): Don't build implicit typenames.
460         (marked_pushdecls_p): Don't enter dependent base types.
461         (unmarked_pushdecls_p): Likewise.
462         * semantics.c (begin_class_definition): Remove implicit typename
463         stuff.
464
465 2003-01-16  Nathan Sidwell  <nathan@codesourcery.com>
466
467         PR c++/9212
468         * parser.c (cp_parser_direct_declarator): If accepting either
469         abstract or named, the name must be an unqualified-id.
470
471 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
472
473         * class.c (layout_virtual_bases): Avoid signed/unsigned warning.
474
475 2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
476
477         * decl2.c (check_classfn): Fix uninitialized warning.
478         (build_anon_union_vars): Likewise.
479         * pt.c (tsubst_copy): Likewise.
480
481 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
482
483         Further conform g++'s __vmi_class_type_info to the C++ ABI
484         specification.
485         * rtti.c (dfs_class_hint_mark): Do not set hints not specified by
486         the specification.
487         (class_hint_flags): Likewise.
488
489 2003-01-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
490
491         * config-lang.in: Add semantics.c to gtfiles.
492         * cp-tree.h (flagged_type_tree_s): Remove lookups field.
493         (saved_scope): Likewise.
494         (type_lookups): Remove.
495         (deferred_access): New structure.
496         (type_access_control): Remove.
497         (save_type_access_control): Likewise.
498         (reset_type_access_control): Likewise.
499         (decl_type_access_control): Likewise.
500         (push_deferring_access_checks): Declare.
501         (resume_deferring_access_checks): Likewise.
502         (stop_deferring_access_checks): Likewise.
503         (pop_deferring_access_checks): Likewise.
504         (get_deferred_access_checks): Likewise.
505         (pop_to_parent_deferring_access_checks): Likewise.
506         (perform_deferred_access_checks): Likewise.
507         (perform_or_defer_access_check): Likewise.
508         * decl.c (make_typename_type): Use perform_or_defer_access_check.
509         (make_unbound_class_template): Likewise.
510         (grokdeclarator): Don't call decl_type_access_control.
511         * parser.c (cp_parser_context): Remove deferred_access_checks
512         and deferring_access_checks_p fields.
513         (cp_parser_context_new): Adjust.
514         (cp_parser): Remove access_checks_lists.
515         (cp_parser_defer_access_check): Remove.
516         (cp_parser_start_deferring_access_checks): Remove.
517         (cp_parser_stop_deferring_access_checks): Remove.
518         (cp_parser_perform_deferred_access_checks): Remove.
519         (cp_parser_nested_name_specifier_opt): Use new deferred access
520         functions.
521         (cp_parser_simple_declaration): Likewise.
522         (cp_parser_template_id): Likewise.
523         (cp_parser_function_definition): Likewise.
524         (cp_parser_class_specifier): Likewise.
525         (cp_parser_lookup_name): Likewise.
526         (cp_parser_single_declaration): Likewise.
527         (cp_parser_pre_parsed_nested_name_specifier): Likewise.
528         (cp_parser_parse_tentatively): Likewise.
529         (cp_parser_parse_definitely): Likewise.
530         (yyparse): Likewise.
531         (cp_parser_init_declarator): Remove access_checks parameter.
532         Use new deferred access functions.
533         (cp_parser_function_definition_from_specifiers_and_declarator):
534         Likewise.
535         (cp_parser_class_head): Remove deferring_access_checks_p and
536         saved_access_checks parameters.  Use new deferred access functions.
537         (cp_parser_member_specification_opt): Don't call
538         reset_type_access_control.
539         * search.c (type_access_control): Remove.
540         * semantics.c: Include "gt-cp-semantics.h".
541         (deferred_type_access_control): Remove.
542         (deferred_access_stack): New variable.
543         (deferred_access_free_list): Likewise.
544         (push_deferring_access_checks): New function.
545         (resume_deferring_access_checks): Likewise.
546         (stop_deferring_access_checks): Likewise.
547         (pop_deferring_access_checks): Likewise.
548         (get_deferred_access_checks): Likewise.
549         (pop_to_parent_deferring_access_checks): Likewise.
550         (perform_deferred_access_checks): New function, adapted from
551         cp_parser_perform_deferred_access_checks.
552         (perform_or_defer_access_check): New function, adapted from
553         cp_parser_defer_access_check.
554         (current_type_lookups): Remove.
555         (deferred_type_access_control): Likewise.
556         (decl_type_access_control): Likewise.
557         (save_type_access_control): Likewise.
558         (reset_type_access_control): Likewise.
559         (begin_function_definition): Adjust.
560         (begin_class_definiton): Likewise.
561
562 2003-01-13  Jason Merrill  <jason@redhat.com>
563
564         PR c++/8748
565         * class.c (build_base_path): Take the address before calling save_expr.
566
567         * call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
568         all the ambiguous conversions are bad.
569
570         * class.c (maybe_warn_about_overly_private_class): Don't stop
571         searching when we find a nonprivate method.
572
573         * typeck.c (build_class_member_access_expr): Use unary_complex_lvalue.
574
575 2003-01-12  Mark Mitchell  <mark@codesourcery.com>
576
577         * cp-tree.h (get_arglist_len_in_bytes): Remove.
578
579         PR c++/9264
580         * parser.c (cp_parser_elaborated_type_specifier): Handle erroneous
581         typeame types more robustly.
582
583 2003-01-11  Phil Edwards  <pme@gcc.gnu.org>
584
585         * parser.c:  Fix comment typos.
586
587 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
588
589         PR c++/9099
590         * parser.c (cp_parser_scope_through_which_access_occurs): Handle
591         an object_type which is not a class type.
592
593 2003-01-10  Geoffrey Keating  <geoffk@apple.com>
594
595         * parser.c (cp_parser_late_parsing_for_member): Don't cast to void.
596         (cp_parser_late_parsing_default_args): Likewise.
597
598 2003-01-10  Nathanael Nerode  <neroden@gcc.gnu.org>
599
600         * cfns.gperf: ANSIfy function declarations.
601         * cfns.h: Regenerate.
602         * cp-tree.h: ANSIfy function declarations.
603
604 2003-01-10  Mark Mitchell  <mark@codesourcery.com>
605
606         * cp-tree.h (reparse_absdcl_as_expr): Remove.
607         (reparse_absdcl_as_casts): Likewise.
608         (reparse_decl_as_expr): Likewise.
609         (finish_decl_parsing): Likewise.
610         * decl2.c (reparse_absdcl_as_expr): Remove.
611         (reparse_absdcl_as_casts): Likewise.
612         (repase_decl_as_expr): Likewise.
613         (finish_decl_parsing): Likewise.
614
615         PR c++/9128
616         PR c++/9153
617         PR c++/9171
618         * parser.c (cp_parser_pre_parsed_nested_name_specifier): New
619         function.
620         (cp_parser_nested_name_specifier_opt): Correct the
621         check_dependency_p false.
622         (cp_parser_postfix_expression): Fix formatting.
623         (cp_parser_decl_specifier_seq): Avoid looking for constructor
624         declarators when possible.
625         (cp_parser_template_id): Avoid performing name-lookup when
626         possible.
627         (cp_parser_class_head): Do not count specializations when counting
628         levels of templates.
629         (cp_parser_constructor_declarator_p): Return immediately if
630         there's no chance that the tokens form a constructor declarator.
631         * rtti.c (throw_bad_typeid): Add comment.  Do not return an
632         expression with reference type.
633         (get_tinfo_decl_dynamic): Do not return an expression with
634         reference type.
635         (build_typeid): Add comment.  Do not return an expression with
636         reference type.
637         * typeck.c (build_class_member_access_expr): Improve handling of
638         conditionals and comma-expressions as objects.
639
640 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
641
642         * cfns.gperf: ANSIfy function declarations.
643         * cfns.h: Regenerate.
644         * cp-tree.h: ANSIfy function declarations.
645         * parser.c: ANSIfy function declarations & definitions.
646
647         * decl.c (bad_specifiers): Fix parameter order error I introduced.
648
649 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
650
651         Merge from pch-branch:
652
653         2003-01-09  Geoffrey Keating  <geoffk@apple.com>
654
655         Merge to tag pch-merge-20030102:
656         
657         * semantics.c (finish_translation_unit): Don't call finish_file.
658         * parser.c: Don't include ggc.h.
659         (cp_lexer_new_main): Rename from cp_lexer_new, only create main lexer,
660         read first token here.  Don't allow PCH files after the first
661         token is read.
662         (cp_lexer_new_from_tokens): Duplicate functionality from cp_lexer_new.
663         (cp_lexer_get_preprocessor_token): Allow LEXER to be NULL.
664         (cp_parser_new): Call cp_lexer_new_main before allocating GCed memory.
665         (cp_parser_late_parsing_for_member): Don't duplicate call to
666         cp_lexer_set_source_position_from_token.
667         (cp_parser_late_parsing_default_args): Likewise.
668         (yyparse): Call finish_file after clearing the_parser.
669
670         2002-12-11  Geoffrey Keating  <geoffk@apple.com>
671
672         * Make-lang.in: Remove $(GGC_H) from all dependencies.
673         (CXX_TREE_H): Add $(GGC_H).
674         * class.c: Don't include ggc.h. 
675         (field_decl_cmp): Make parameters be 'const void *' to match qsort.
676         (method_name_cmp): Likewise.
677         (resort_data): New variable.
678         (resort_field_decl_cmp): New.
679         (resort_method_name_cmp): New.
680         (resort_sorted_fields): New.
681         (resort_type_method_vec): New.
682         (finish_struct_methods): Delete cast.
683         (finish_struct_1): Delete cast.
684         * cp-tree.h: Include ggc.h.
685         (struct lang_type_class): Add reorder attribute to field `methods'.
686         (union lang_decl_u3): Add reorder attribute to field `sorted_fields'.
687         (resort_sorted_fields): New prototype.
688         (resort_type_method_vec): New prototype.
689         * call.c: Don't include ggc.h.
690         * decl.c: Likewise.
691         * decl2.c: Likewise.
692         * init.c: Likewise.
693         * lex.c: Likewise.
694         * method.c: Likewise.
695         * optimize.c: Likewise.
696         * parse.y: Likewise.
697         * pt.c: Likewise.
698         * repo.c: Likewise.
699         * search.c: Likewise.
700         * semantics.c: Likewise.
701         * spew.c: Likewise.
702         * tree.c: Likewise.
703
704         * lang-specs.h: Remove comment.
705
706         2002-12-03  Geoffrey Keating  <geoffk@apple.com>
707
708         * cp-tree.h (struct operator_name_info_t): Mark for GTY machinery.
709         (operator_name_info): Mark to be saved for PCH, specify size.
710         (assignment_operator_name_info): Likewise.
711
712         2002-11-19  Geoffrey Keating  <geoffk@apple.com>
713
714         * decl.c (anon_cnt): Mark to be saved for PCH.
715
716         2002-10-25  Geoffrey Keating  <geoffk@apple.com>
717
718         * lex.c  (init_reswords): Delete now-untrue comment.
719         Allocate ridpointers using GGC.
720
721         2002-10-04  Geoffrey Keating  <geoffk@apple.com>
722
723         * cp-tree.h (union lang_decl_u2): Add tags to all fields.
724
725         * g++spec.c (lang_specific_driver): Don't include standard
726         libraries in `added'.
727
728         2002-08-27  Geoffrey Keating  <geoffk@redhat.com>
729
730         * decl2.c (finish_file): Call c_common_write_pch.
731         * Make-lang.in (CXX_C_OBJS): Add c-pch.o.
732
733         2002-08-17  Geoffrey Keating  <geoffk@redhat.com>
734
735         * g++spec.c (lang_specific_driver): Treat .h files as C++ header
736         files when using g++.
737         * lang-specs.h: Handle compiling C++ header files.
738
739 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
740
741         * decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.
742
743 2003-01-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
744
745         * pt.c (push_access_scope_real): Call push_to_top_level for
746         function in namespace scope.
747         (pop_access_scope): Call pop_from_top_level for function in
748         namespace scope.
749
750 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
751
752         * decl.c (start_decl): Don't set DECL_COMMON for __thread variables.
753
754 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
755
756         * Make-lang.in (c++.install-common, c++.install-man,
757         c++.uninstall): Prepend $(DESTDIR) to destination paths in
758         all (un)installation commands.
759         (c++.install-common): Rewrite $(LN) commands to support
760         DESTDIR with "ln" as well as with "ln -s".
761
762 2003-01-08  Jason Merrill  <jason@redhat.com>
763
764         * parser.c (cp_parser_primary_expression): See through explicitly
765         scoped ALIAS_DECLs, too.
766
767 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
768
769         * decl.c: Remove some #if 0 code.
770
771         * decl.c: ANSIfy function declarations.
772
773 2003-01-07  Mark Mitchell  <mark@codesourcery.com>
774
775         * parser.c (cp_parser_asm_definition): Correct handling of omitted
776         operands.
777
778 2003-01-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
779
780         PR c++/9030
781         * decl.c (make_typename_type): Check access only when tf_error.
782         (make_unbound_class_template): Likewise.
783         * pt.c (saved_access_scope): New variable.
784         (push_access_scope_real): New function.
785         (push_access_scope): Likewise.
786         (pop_access_scope): Likewise.
787         (tsubst_default_argument): Use them.
788         (instantiate_template): Likewise.
789         (regenerate_decl_from_template): Likewise.
790         (instantiate_decl): Likewise.
791         (get_mostly_instantiated_function_type): Likewise.
792
793 2003-01-07  Nathanael Nerode <neroden@gcc.gnu.org>
794
795         * tree.c: Delete bogus #if 0 code.
796
797 2003-01-07  Andreas Schwab  <schwab@suse.de>
798
799         * class.c (layout_class_type): Don't use
800         PCC_BITFIELD_TYPE_MATTERS if not defined.
801
802 2003-01-06  Mark Mitchell  <mark@codesourcery.com>
803
804         PR c++/9165
805         * decl2.c (build_cleanup): Mark the object as used.
806
807         * pt.c (retrieve_local_specialization): Revert 2003-01-05 change.
808         (hash_local_specialization): New function.
809         (register_local_specialization): Revert 2003-01-05 change.
810         (instantiate_decl): Use hash_local_specialization when creating
811         the local_specializations table.
812         
813         * decl2.c (mark_used): Do not synthesize thunks.
814
815         * class.c (layout_class_type): Correct handling of unnamed
816         bitfields wider than their types.
817
818         PR c++/9189
819         * parser.c (cp_parser): Remove default_arg_types.  Update
820         documentation for unparsed_functions_queues.
821         (cp_parser_late_parsing_default_args): Take a FUNCTION_DECL as the
822         parameter.
823         (cp_parser_new): Don't set parser->default_arg_types.
824         (cp_parser_function_definition): Adjust usage of
825         unparsed_funtions_queues.
826         (cp_parser_class_specifier): Don't mess with
827         parser->default_arg_types.  Handle default argument processing in
828         a separate phase from function body processing.
829         (cp_parser_template_declaration_after_export): Adjust usage of
830         unparsed_functions_queues.
831         (cp_parser_late_parsing_for_member): Do not handle default
832         arguments.
833
834 2003-01-06  Nathan Sidwell  <nathan@codesourcery.com>
835
836         PR c++/9109
837         * parser.c (cp_parser_declarator_kind): New enum.
838         (cp_parser_declarator): Adjust.
839         (cp_parser_direct_declarator): Adjust. Allow for either named or
840         abstract declarator. Prefer abstract, if possible. Allow
841         parenthesized function name.
842         (cp_parser_condition): Adjust cp_parser_declarator call.
843         (cp_parser_explicit_instantiation): Likewise.
844         (cp_parser_init_declarator): Likewise.
845         (cp_parser_type_id): Likewise.
846         (cp_parser_function_definition): Likewise.
847         (cp_parser_member_declaration): Likewise.
848         (cp_parser_parameter_declaration): Use cp_parser_declarator to do
849         the tentative parsing.
850         (cp_parser_exception_declaration): Likewise.
851
852 2003-01-05  Mark Mitchell  <mark@codesourcery.com>
853
854         * parser.c (cp_parser_template_parameter): Adjust call to
855         cp_parser_parameter_declaration.
856         (cp_parser_parameter_declaration_list): Likewise.
857         (cp_parser_parameter_declaration): Replace
858         greater_than_is_operator_p with template_parm_p parameter.  Do not
859         cache tokens for template default arguments.
860
861         * pt.c (retrieve_local_specialization): Use htab_find, not
862         htab_find_with_hash.
863         (register_local_specialization): Use htab_find_slot, not
864         htab_find_slot_with_hash.
865         (instantiate_decl): Pass a hash function to htab_create.
866         
867 2003-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
868
869         * parser.c (cp_parser_binary_expression,
870         cp_parser_multiplicative_expression,
871         cp_parser_additive_expression, cp_parser_shift_expression,
872         cp_parser_relational_expression, cp_parser_equality_expression,
873         cp_parser_and_expression, cp_parser_exclusive_or_expression,
874         cp_parser_inclusive_or_expression,
875         cp_parser_logical_and_expression, cp_parser_logical_or_expression,
876         cp_parser_binary_expression): Const-ify.
877
878 2003-01-04  Mark Mitchell  <mark@codesourcery.com>
879
880         * method.c (use_thunk): Disable access control while building the
881         body of the thunk.
882
883 2003-01-03  Nathanael Nerode  <neroden@gcc.gnu.org>
884
885         * cvt.c, decl.c, decl2.c: This is the C++ front end, not the C 
886         front end.
887
888 2003-01-03  Matt Austern  <austern@apple.com>
889
890         * cp-tree.h (struct lang_type_class): add field for key method
891         (cp_global_trees): rename dynamic_classes to keyed_classes
892         (key_method): add definition
893         * class.c (finish_struct_1): compute class's key method, and add
894         the class to keyed_classes list if there is no key method.
895         * decl.c (finish_function): add class to keyed_classes list if we
896         see a definition of the class's key method.
897         * pt.c (instantiate_class_template): add template specialization
898         of a dynamic class to keyed_classes list.
899         * decl2.c (key_method): remove
900         (finish_file): iterate only through keyed_classes list when
901         deciding whether to emit vtables, remove class from its list after
902         we do the emission.
903         
904 2003-01-02  Jason Merrill  <jason@redhat.com>
905
906         * call.c (build_conditional_expr): Stabilize lvalues properly.
907         * cvt.c (ocp_convert): Don't build NOP_EXPRs of class type.
908         * tree.c (lvalue_p_1): Don't allow sloppy NOP_EXPRs as lvalues.
909         Don't allow CALL_EXPR or VA_ARG_EXPR, either.
910
911         * call.c (convert_like_real): Call decl_constant_value for an
912         IDENTITY_CONV even if there are no more conversions.
913
914         * cvt.c (build_up_reference): Don't push unnamed temps.
915
916         * decl2.c (do_namespace_alias): Namespace aliases are DECL_EXTERNAL.
917
918         * dump.c (cp_dump_tree): Don't try to dump class-specific fields
919         for a backend struct.
920
921         * except.c (wrap_cleanups_r, build_throw): Make
922         MUST_NOT_THROW_EXPRs void.
923         * init.c (expand_default_init): Update to handle MUST_NOT_THROW_EXPR.
924
925         * init.c (build_vec_delete_1): Pre-evaluate the base address.
926
927         * init.c (get_temp_regvar): Simplify logic.
928
929         * tree.c (cp_copy_res_decl_for_inlining): Only do debug tweaks if
930         our replacement is a decl.
931
932         * decl.c (cp_make_fname_decl): Push the decls inside the
933         outermost scope.
934
935 2003-01-03  Nathan Sidwell  <nathan@codesourcery.com>
936
937         PR c++/45, c++/3784
938         * tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
939         the same too.
940
941 2003-01-03  Graham Stott  <graham.stott@btinternet.com>
942
943         * parser.c (struct cp_parser): Add access_checks_lists field
944         (cp_parser_simple_declaration): Use.
945         (cp_parser_init_declarator): Likewise. 
946
947 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
948
949         * parser.c (cp_parser_declaration): Accept the __extension__
950         keyword before the declaration.
951
952         PR c++/2843
953         * parser.c (cp_parser_parameter_declaration): Allow attributes to
954         appear after the declarator.
955
956         * call.c (build_new_method_call): Fix typo in message format
957         string.
958
959 2003-01-02  Mark Mitchell  <mark@codesourcery.com>
960
961         * parser.c (cp_lexer_next_token_is): Declare it inline.
962         (cp_lexer_set_source_position_from_token): Likewise.
963         (cp_lexer_debugging_p): Likewise.
964         (cp_parser_parsing_tentatively): Likewise.
965         (cp_parser_nested_name_specifier_opt): Reduce the number of calls
966         to the cp_lexer_peek_token.
967
968         * parser.c (cp_parser_sizeof_operand): Do not evaluate the
969         expression.
970
971 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
972
973         * cp/except.c, cp/expr.c, cp/friend.c, cp/g++spec.c,
974         cp/lang-options.h, cp/lang-specs.h, cp/lex.h, cp/ptree.c,
975         cp/repo.c: Fix copyright years.
976
977 2003-01-01  Neil Booth  <neil@daikokuya.co.uk>
978
979         * lex.c: Remove superfluous include of cpplib.h.
980         (CONSTRAINT): Define without conditions.
981         (init_cp_pragma): Use c_register_pragma.
982
983 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
984
985         * .cvsignore: Remove.
986
987 2002-12-31  Steven Bosscher  <s.bosscher@student.tudelft.nl>
988
989         * call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
990           except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
991           lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
992           pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
993           typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
994           copyright header.
995         * lex.h: parse.y is dead, so don't mention it.  Also replace the
996           copyright header with the default GNU copyright header.
997
998 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
999
1000         * cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
1001         (lookup_name_namespace_only): Likewise.
1002         (begin_only_namespace_names): Likewise.
1003         (end_only_namespace_names): Likewise.
1004         * decl.c (only_namespace_names): Remove.
1005         (qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
1006         (lookup_name_real): Do not check only_namespace_names.
1007         (lookup_name_namespace_only): Remove.
1008         (begin_only_namespace_names): Likewise.
1009         (end_only_namespace_names): Likewise.
1010         * parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
1011         nested-name-specifiers more gracefully.
1012         (cp_parser_class_or_namespace_name): Avoid looking up namespace
1013         names when they cannot possibly appear.
1014         (cp_parser_template_name): Adjust call to cp_parser_lookup_name.
1015         (cp_parser_elaborated_type_specifier): Likewise.
1016         (cp_parser_namespace_name): Only look for namespace names.
1017         (cp_parser_lookup_name): Add is_namespace parameter.
1018         (cp_parser_lookup_name_simple): Adjust call to
1019         cp_parser_lookup_name.
1020
1021         * parser.c (cp_parser_dependent_type_p): Fix thinko.
1022
1023 2002-12-31  Neil Booth  <neil@daikokuya.co.uk>
1024
1025         * .cvsignore: Update.
1026
1027 2002-12-31  Nathan Sidwell  <nathan@codesourcery.com>
1028
1029         * class.c (modify_vtable_entry): Remove unused variable.
1030         (get_vcall_index): Always expect a non-thunk.
1031         (update_vtable_entry_for_fn): Combine covariant adjustments, when
1032         overriding a thunk. Pass get_vcall_index a non-thunk.
1033
1034         * decl2.c (finish_file): Mark undefined inlines as extern.
1035
1036 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1037
1038         * cp-tree.def (RETURN_INIT): Remove.
1039         * cp-tree.h (DECL_IN_MEMORY_P): Remove.
1040         (scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
1041         (note_level_for_for): Remove.
1042         (note_level_for_try): Likewise.
1043         (note_level_for_catch): Likewise.
1044         (finish_named_return_value): Likewise.
1045         (do_pushlevel): Change prototype.
1046         (pending_lang_change): Remove.
1047         * decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
1048         sk_for.
1049         (note_level_for_for): Remove.
1050         (note_level_for_try): Likewise.
1051         (note_level_for_catch): Likewise.
1052         (maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
1053         * parser.c (cp_parser_context_free_list): Make it "deletable".
1054         (cp_parser_template_argument): Remove misleading comment.
1055         * pt.c (tsubst_expr): Remove RETURN_INIT code.
1056         * semantics.c (genrtl_named_return_value): Remove.
1057         (do_pushlevel): Take a scope kind as an argument.
1058         (begin_if_stmt): Adjust.
1059         (begin_while_stmt): Likewise.
1060         (begin_for_stmt): Likewise.
1061         (finish_for_init_stmt): Likewise.
1062         (begin_switch_stmt): Likewise.
1063         (begin_handler): Likewise.
1064         (begin_compound_stmt): Likewise.
1065         (finish_named_return_value): Remove.
1066         (cp_expand_stmt): Remove RETURN_INIT case.
1067         * tree.c (cp_statement_code_p): Remove RETURN_INIT case.
1068
1069 2002-12-31  Mark Mitchell  <mark@codesourcery.com>
1070
1071         PR c++/9112
1072         * parser.c (cp_parser_direct_declarator): Handle erroneous
1073         parenthesized declarators correctly.
1074
1075 2002-12-31  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1076
1077         * cp-tree.h (pending_lang_change): Declare.
1078
1079 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1080
1081         * parser.c (cp_parser_context_free_list): New variable.
1082         (cp_parser_context_new): Use it.
1083         (cp_parser_error): Check return code from
1084         cp_parser_simulate_error.
1085         (cp_parser_simulate_error): Return a value.
1086         (cp_parser_id_expression): Optimize common case.
1087         (cp_parser_class_name): Likewise.
1088         (cp_parser_class_specifier): Adjust call to
1089         cp_parser_late_parsing_default_args.
1090         (cp_parser_lookup_name): Optimize common case.
1091         (cp_parser_late_parsing_for_member): Adjust call to
1092         cp_parser_late_parsing_default_args.
1093         (cp_parser_late_parsing_default_args): Add scope parameter.
1094         (cp_parser_require): Avoid creating the error message unless it's
1095         needed.
1096         (cp_parser_parse_definitely): Place free'd contexts on the free
1097         list.
1098
1099         * parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.
1100
1101 2002-12-30  David Edelsohn  <edelsohn@gnu.org>
1102
1103         * parser.c (cp_parser_parameter_declaration_clause): Treat system
1104         header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.
1105
1106 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1107
1108         * config-lang.in, Make-lang.in, operators.def, cp-tree.def:
1109         GCC, not GNU CC.
1110
1111 2002-12-30  Mark Mitchell  <mark@codesourcery.com>
1112
1113         * parse.y: Remove.
1114         * spew.c: Likewise.
1115         * Make-lang.in (gt-cp-spew.h): Remove.
1116         * cp-tree.h (do_pending_lang_change): Remove.
1117         (do_identifier): Change prototype.
1118         (finish_id_expr): Remove.
1119         * decl.c (lookup_name_real): Remove yylex variable.
1120         * decl2.c (build_expr_from_tree): Adjust call to do_identifier.
1121         * lex.c (init_cpp_parse): Remove.
1122         (reduce_cmp): Likewise.
1123         (token_cmp): Likewise.
1124         (yychar): Likewise.
1125         (lastiddecl): Likewise.
1126         (token_count): Likewise.
1127         (reduce_count): Likewise.
1128         (yyhook): Likewise.
1129         (print_parse_statistics): Likewise.
1130         (do_pending_lang_change): Likewise.
1131         (do_identifier): Remove parsing parameter.
1132         * lex.h (lastiddecl): Remove.
1133         (looking_for_typename): Remove.
1134         (looking_for_template): Likewise.
1135         (pending_lang_change): Likewise.
1136         (yylex): Likewise.
1137         * semantics.c (finish_id_expr): Remove.
1138
1139         * decl.c (grokdeclarator): Diagnost "extern thread" and "static
1140         thread" correctly.
1141
1142 2002-12-30  Nathanael Nerode  <neroden@gcc.gnu.org>
1143
1144         * decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
1145         end, not the C front end.
1146
1147 2002-12-30  Nathan Sidwell  <nathan@codesourcery.com>
1148
1149         * cp-tree.h (THUNK_TARGET): New macro.
1150         (THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
1151         (finish_thunk): Remove offset parms.
1152         * class.c (find_final_overrider): Look through thunks.
1153         (get_vcall_index): Use THUNK_TARGET.
1154         (update_vtable_entry_for_fn): Look through thunks. Set covariant
1155         fixed offset here. Adjust finish_thunk call.
1156         (build_vtbl_initializer): Adjust finish_thunk calls.
1157         * mangle.c (mangle_call_offset): Remove superfluous if.
1158         (mangle_thunk): Adjust.
1159         * method.c (make_thunk): Adjust.
1160         (finish_thunk): Adjust.
1161         (thunk_adjust): Remove assert.
1162         (use_thunk): Use THUNK_TARGET
1163         * dump1.c (cp_dump_tree): Adjust thunk dumping.
1164
1165         PR c++/9054
1166         * class.c (layout_class_type): Set TYPE_CONTEXT of type for base.
1167         * dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.
1168
1169 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1170
1171         Remove traditional C constructs 4/n.
1172         * decl2.c (grok_method_quals, warn_if_unknown_interface,
1173         grok_x_components, cp_build_parm_decl, build_artificial_parm,
1174         maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
1175         delete_sanity, check_member_template, check_java_method,
1176         check_classfn, finish_static_data_member_decl, grokfield,
1177         grokbitfield, grokoptypename, grok_function_init,
1178         cplus_decl_attributes, constructor_name, defer_fn,
1179         build_anon_union_vars, finish_anon_union, coerce_new_type,
1180         coerce_delete_type, comdat_linkage, maybe_make_one_only,
1181         key_method, import_export_vtable, import_export_class,
1182         output_vtable_inherit, import_export_decl, import_export_tinfo,
1183         build_cleanup, get_guard, get_guard_bits, get_guard_cond,
1184         set_guard, start_objects, finish_objects,
1185         start_static_storage_duration_function,
1186         finish_static_storage_duration_function, get_priority_info,
1187         start_static_initialization_or_destruction,
1188         finish_static_initialization_or_destruction,
1189         do_static_initialization, do_static_destruction,
1190         prune_vars_needing_no_initialization, write_out_vars,
1191         reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
1192         add_using_namespace, merge_functions, ambiguous_decl,
1193         lookup_using_namespace, lookup_using_namespace,
1194         qualified_lookup_using_namespace, set_decl_namespace,
1195         decl_namespace, current_decl_namespace, push_decl_namespace,
1196         pop_decl_namespace, push_scope, pop_scope, add_function,
1197         arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
1198         lookup_arg_dependent, do_namespace_alias,
1199         validate_nonmember_using_decl, do_nonmember_using_decl,
1200         do_toplevel_using_decl, do_local_using_decl,
1201         do_class_using_decl, do_using_directive, check_default_args,
1202         mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
1203         * parser.c (cp_parser_class_head): Use booleanss.
1204         * decl.c (walk_globals, walk_vtables): Likewise.
1205         * cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
1206         walk_globals): Change return type from 'int' to 'bool'.
1207         * rtti.c (init_rtti_processing, build_headof, throw_bad_cast
1208         throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
1209         build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
1210         get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
1211         qualifier_flags, tinfo_base_init, generic_initializer,
1212         ptr_initializer, dfs_class_hint_mark, ptm_initializer,
1213         dfs_class_hint_unmark, class_hint_flags, class_initializer,
1214         typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
1215         get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
1216         unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
1217         * repo.c (repo_compile_flags, repo_template_declared,
1218         repo_template_defined, repo_class_defined, repo_get_id,
1219         repo_template_used, repo_vtable_used, repo_inline_used,
1220         repo_tinfo_used, repo_template_instantiated, extract_string,
1221         open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
1222         finish_repo): Likewise.
1223         * ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
1224         cxx_print_xnode): Likewise..
1225         * cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
1226         cxx_warn_unused_global_decl, cp_expr_size): Likewise.
1227         * cxxfilt.c (demangle_it, print_demangler_list, usage,
1228         standard_symbol_characters, hp_symbol_characters, main, fatal):
1229         Likewise.
1230         (strip_underscore):  Change type from 'int' to 'bool'.
1231         (main): Use boolean constants.
1232
1233 2002-12-28  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1234
1235         Remove traditional C constructs 3/n.
1236         * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1237         build_up_reference, warn_ref_binding, convert_to_reference,
1238         convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
1239         convert_to_void, convert, convert_force, build_type_conversion,
1240         build_expr_type_conversion, type_promotes_to,
1241         perform_qualification_conversions): Use C90 prototyping style.
1242         * decl2.c (grok_array_decl): Use boolean constant.
1243         (delete_sanity): Likewise.
1244         * typeck.c (build_unary_op): Likewise.
1245         * semantics.c (finish_switch_cond): Likewise.
1246         * parser.c (cp_parser_direct_new_declarator): Likewise.
1247         * init.c (build_new): Likewise.
1248
1249 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
1250
1251         * Make-lang.in (po-generated): Remove parse.c.
1252         (CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
1253         ($(srcdir)/cp/parse.h): Remove target.
1254         ($(srcdir)/cp/parse.c): Likewise.
1255         (gt-cp-parse.h): Likewise.
1256         (gt-cp-parser.h): New target.
1257         (c++.distclean): Do not remove parse.output.
1258         (c++.maintainer-clean): Do not remove parse.c or parse.h.
1259         (cp/spew.o): Remove target.
1260         (cp/lex.o): Adjust dependencies.
1261         (cp/pt.o): Likewise.
1262         (cp/parse.o): Likewise.
1263         (cp/TAGS): Do not mention parse.c.
1264         (cp/parser.o): New target.
1265         * NEWS: Mention the new parser.
1266         * call.c (build_scoped_method_call): Simplify.
1267         (build_method_call): Likewise.
1268         (build_new_function_call): Adjust calls to add_function_candidate
1269         and add_template_candidate.
1270         (build_new_op): Improve handling of erroroneous operands.
1271         (convert_default_arg): Remove circular argument processing.
1272         (name_as_c_string): New function.
1273         (build_new_method_call): Use it.
1274         (perform_implicit_conversion): Use error_operand_p.
1275         * class.c (finish_struct_anon): Use constructor_name_p.
1276         (check_field_decls): Likewise.
1277         (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
1278         (resolve_address_of_overloaded_function): Likewise.
1279         (instantiate_type): Tweak pointer-to-member handling.
1280         (get_primary_binfo): Remove incorrect assertion.
1281         * config-lang.in (gtfiles): Add parser.c, remove parse.c.
1282         * cp-tree.h (DEFARG_TOKENS): New macro.
1283         (default_arg): New structure.
1284         (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
1285         (lang_tree_node): Add default_arg.
1286         (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
1287         (type_info_ref_type): New macro.
1288         (saved_scope): Make processing_explicit_instantiation a boolean.
1289         (check_access): New field.
1290         (unparsed_text): Remove.
1291         (language_function): Remove unparsed_inlines.
1292         (error_operand_p): New macro.
1293         (lang_decl): Adjust pending_inline_info.
1294         (DEFARG_POINTER): Remove.
1295         (tag_types): Add typenames.
1296         (lookup_ualified_name): Declare.
1297         (lookup_name_real): Likewise.
1298         (shadow_tag): Adjust prototype.
1299         (get_scope_of_declarator): Declare it.
1300         (process_next_inline): Remove it.
1301         (check_for_missing_semicolon): Likewise.
1302         (maybe_get_template_decl_from_type_decl): Declare it.
1303         (finish_label_stmt): Adjust prototype.
1304         (finish_non_static_data_meber): Declare it.
1305         (finish_pseudo_destructor_call_expr): Rename to ...
1306         (finish_pseudo_destructor_expr): ... this.
1307         (finish_compound_literal): Declare it.
1308         (begin_inline_definitions): Remove it.
1309         (init_spew): Remove.
1310         (peekyylex): Likewise.
1311         (arbitrate_lookup): Likewise.
1312         (frob_opname): Likewise.
1313         (maybe_snarf_defarg): Likewise.
1314         (add_defarg_fn): Likewise.
1315         (do_pending_defargs): Likewise.
1316         (done_pending_defargs): Likewise.
1317         (unprocessed_defarg_fn): Likewise.
1318         (replace_defarg): Likewise.
1319         (end_input): Likewise.
1320         (get_overloaded_fn): Likewise.
1321         * cvt.c (convert_to_reference): Improve error handling.
1322         * decl.c (lookup_name_real): Do not declare it static.
1323         (maybe_push_to_top_level): Set check_access.
1324         (identifier_type_value): Adjust call to lookup_name_real.
1325         (lookup_qualified_name): New method.
1326         (lookup_name_real): Remove special-case parsing code.
1327         (lookup_name-nonclass): Adjust call to lookup_name_real.
1328         (lookup_name_namespace_only): Likewise.
1329         (lookup_name): Likewise.
1330         (check_tag_decl): Return the type declared.
1331         (shadow_tag): Likewise.
1332         (register_dtor_fn): Tweak check_access.
1333         (grokfndecl): Use constructor_name_p.
1334         (get_scope_of_declarator): New function.
1335         (grokdeclarator): Obscure tweaks for slightly different declarator
1336         representations.
1337         (start_method): Return error_mark_node to indicate failure.
1338         (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
1339         * decl2.c (constructor_name_full): Simplify.
1340         (constructor_name): Use it.
1341         (build_expr_from_tree): Adjust for changes to do new parser.
1342         (push_scope): Improve robustness.
1343         (validate_nonmember_using_decl): Process declarations, not names.
1344         (do_class_using_decl): Likewise.
1345         (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
1346         here.
1347         * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
1348         * expr.c (cxx_expand_expr): Handle BASELINKs.
1349         * init.c (member_init_ok_or_else): Issue more errors.
1350         (build_offset_ref): Tweak handling of FUNCTION_DECLs.
1351         * lex.c: Do not include parse.h.
1352         (yypring): Do not declare.
1353         (yylval): Likewise.
1354         (make_reference_declarator): Remove error-generating code.
1355         (rid_to_yy): Remove.
1356         (cxx_init): Do not call init_spew.
1357         (yypring): Remove.
1358         (check_for_missing_semicolon): Remove.
1359         * lex.h (got_scope): Remove.
1360         (got_object): Remove.
1361         * method.c (hack_identifier): Use finish_non_static_data_member.
1362         (implicitly_declare_fn): Adjust use of constructor_name.
1363         * parser.c: New file.
1364         * pt.c (parse.h): Do not include it.
1365         (maybe_get_template_decl_from_template): Do not declare it.
1366         (finish_member_template_decl): Tweak.
1367         (begin_explicit_instantiation): Adjust for
1368         processing_explicit_instantiation being boolean.
1369         (end_explicit_instantiation): Likewise.
1370         (maybe_process_partial_specialization): Tighten specialization
1371         test.
1372         (retrieve_local_specialization): Adjust ue of hash table.
1373         (eq_local_specializations): New function.
1374         (register_local_specialization): Likewise.
1375         (push_template_decl_real): Remove unnecessary test.
1376         (maybe_get_template_decl_from_type_decl): Don't make it static.
1377         (for_each_template_parm_r): Handle TYPEOF_TYPE.
1378         (tsubst_copy): Use retrieive_local_specialization to handle
1379         PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
1380         Handle COMPONENT_REFs with pseudo-destructor-expressions.
1381         Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
1382         (tsubst_expr): Pass decls, not names, to do_local_using_decl.
1383         (unify): Tweak handling of CONST_DECLs.
1384         (regenerate_decl_from_template): Use push_nested_class.
1385         (template_for_substitution): New funciton.
1386         (instantiate_decl): Use it.  Register parameters as local
1387         specializations.
1388         * rtti.c (init_rtti_processing): Set type_info_ref_type.
1389         (build_typeid): Use it.
1390         (get_typeid): Likeise.
1391         * search.c (accessible_p): Use check_access, not
1392         flag_access_control.
1393         (adjust_result_of_qualified_name_lookup): Pay attention to the
1394         context_class.
1395         * semantics.c (finish_asm_stmt): Adjust error handling.
1396         (finish_label_stmt): Return the statement.
1397         (finish_non_static_data_member): New function.
1398         (finish_class_expr): Handle BASELINKs.
1399         (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
1400         (finish_object_call_expr): Simplify handling during templates.
1401         (finish_pseudo_destructor_call_expr): Rename to ...
1402         (finish_pseudo_dtor_expr): ... this.
1403         (finish_compound_literal): New function.
1404         (begin_inline_definitions): Remove.
1405         (finish_sizeof): Remove special template handling.
1406         * spew.c: Do not include parse.h.
1407         * tree.c (get_overloaded_fn): Remove.
1408         * typeck.c (build_class_member_access_expr): Handle
1409         PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
1410         (lookup_destructor): New function.
1411         (finish_class_member_access_expr): Use it.
1412         (convert_arguments): Simplify.
1413         (build_unary_op): Handle BASELINKs.
1414
1415 2002-12-26  Nathan Sidwell  <nathan@codesourcery.com>
1416
1417         PR c++/4803
1418         * decl2.c (mark_used): Defer inline functions.
1419         (finish_file): Merge deferred_fns loops. Check all used
1420         inline functions have a definition.
1421         * method.c (make_thunk): Thunks are not inline.
1422
1423         PR c++/5116, c++/764
1424         * call.c (build_new_op): Make sure template class operands are
1425         instantiated.
1426
1427 2002-12-24  Nathan Sidwell  <nathan@codesourcery.com>
1428
1429         PR C++/7964
1430         * cp-tree.h (resolve_scoped_fn_name): Prototype.
1431         * call.c (resolve_scoped_fn_name): New function. Deal with
1432         more template expansion. Broken out of ...
1433         * parse.y (parse_finish_call_expr): ... here. Call it.
1434         * decl2.c (build_expr_from_tree, CALL_EXPR): Use
1435         resolve_scoped_fn_name and build_call_from_tree.
1436
1437         PR c++/9053
1438         * decl.c (duplicate_decls): Templates may be disambiguated by
1439         return type.
1440
1441         PR c++/8702
1442         * decl2.c (check_classfn): Use lookup_fnfield_1. List all
1443         conversion operators on failure.
1444
1445 2002-12-23  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1446
1447         Remove traditional C constructs 2/n.
1448         * call.c (tourney, build_field_call, equal_functions, joust,
1449         compare_ics, build_over_call, build_java_interface_fn_ref,
1450         convert_like_real, op_error, build_object_call, resolve_args,
1451         build_vfield_ref, check_dtor_name, build_scoped_method_call,
1452         build_addr_func, build_call, build_method_call, null_ptr_cst_p,
1453         sufficient_parms_p, build_conv, non_reference, strip_top_quals,
1454         standard_conversion, reference_related_p,
1455         reference_compatible_p, convert_class_to_reference,
1456         direct_reference_binding, reference_binding,
1457         ,implicit_conversion, is_complete, promoted_arithmetic_type_p,
1458         add_template_conv_candidate, any_viable, any_strictly_viable,
1459         build_this, splice_viable, print_z_candidates,
1460         build_user_type_conversion, build_new_function_call,
1461         conditional_conversion, build_conditional_expr, build_new_op,
1462         build_op_delete_call, enforce_access, call_builtin_trap,
1463         convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
1464         convert_default_arg, type_passed_as, convert_for_arg_passing,
1465         in_charge_arg_for_name, is_properly_derived_from,
1466         maybe_handle_implicit_object, maybe_handle_ref_bind,
1467         source_type, add_warning, can_convert, can_convert_arg,
1468         perform_implicit_conversion, can_convert_arg_bad,
1469         initialize_reference, add_conv_candidate,
1470         add_template_candidate_real, add_template_candidate): Ansify.
1471
1472 2002-12-22  Nathan Sidwell  <nathan@codesourcery.com>
1473
1474         PR c++/8572
1475         * cp-tree.h (grokoptypename): Add SCOPE parameter.
1476         * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
1477         if in a template scope.
1478         * parse.y (unoperator): Return the scope.
1479         (operator_name): Adjust grokoptypename call.
1480
1481 2002-12-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1482
1483         * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
1484         * decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
1485         * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.
1486
1487 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
1488
1489         * ChangeLog: Fix a typo.
1490         * class.c: Fix comment typos.
1491         * cp-tree.h: Likewise.
1492
1493 2002-12-18  Jason Merrill  <jason@redhat.com>
1494
1495         Handle anonymous unions at the tree level.
1496         C++ ABI change: Mangle anonymous unions using the name of their
1497         first named field (by depth-first search).  Should not cause
1498         binary compatibility problems, though, as the compiler previously
1499         didn't emit anything for affected unions.
1500         * cp-tree.def (ALIAS_DECL): New tree code.
1501         * decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
1502         first field, not the largest.
1503         (finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
1504         push the decl, and write it out at namespace scope.
1505         * decl.c (lookup_name_real): See through an ALIAS_DECL.
1506         (pushdecl): Add namespace bindings for ALIAS_DECLs.
1507         * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
1508         of a decl which doesn't have one.
1509         * typeck.c (build_class_member_access_expr): Don't recurse if
1510         we already have the type we want.
1511
1512 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1513
1514         PR c++/8099
1515         * friend.c (make_friend_class): Allow partial specialization
1516         when declaration is not a template friend.
1517
1518 2002-12-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1519
1520         PR c++/3663
1521         * pt.c (lookup_template_class): Copy TREE_PRIVATE and
1522         TREE_PROTECTED to created decl nodes.
1523
1524 2002-12-18  Mark Mitchell  <mark@codesourcery.com>
1525
1526         * class.c (build_base_field): Do not set DECL_PACKED on the
1527         FIELD_DECL.
1528
1529 2002-12-18  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1530
1531         * cp-tree.h (struct tree_srcloc): Use location_t.
1532         (SOURCE_LOCUS): New.
1533         (SRCLOC_FILE, SRCLOC_LINE): Adjust.
1534
1535 2002-12-17  Jason Merrill  <jason@redhat.com>
1536
1537         * decl.c (finish_function): Also complain about no return in
1538         templates.
1539         * semantics.c (finish_return_stmt): Also call check_return_expr in
1540         templates.
1541         * typeck.c (check_return_expr): In a template, just remember that we
1542         saw a return.
1543
1544 2002-12-16  Jason Merrill  <jason@redhat.com>
1545
1546         * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
1547         of the CALL_EXPR.
1548
1549         * semantics.c (do_pushlevel): Call pushlevel after adding the
1550         SCOPE_STMT.
1551         (do_poplevel): Call poplevel before adding the SCOPE_STMT.
1552         * parse.y (function_body): Go back to using compstmt.
1553         * decl.c (pushdecl): Skip another level to get to the parms level.
1554
1555         * call.c (build_new_method_call): Use is_dummy_object to determine
1556         whether or not to evaluate the object parameter to a static member
1557         function.
1558
1559 2002-12-14  Jason Merrill  <jason@redhat.com>
1560
1561         * semantics.c (simplify_aggr_init_exprs_r): Also prepend the
1562         return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
1563         * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
1564         don't bother with an AGGR_INIT_EXPR.
1565         (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
1566         just generate a new decl normally.  Take return slot parm.
1567         * cp-tree.h: Adjust prototype.
1568
1569 2002-12-13  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1570
1571         PR C++/8031
1572         * cvt.c (convert_to_pointer_force): Don't try comparing against
1573         erronous type.
1574
1575 2002-12-13  Geoffrey Keating  <geoffk@apple.com>
1576
1577         * cp-tree.h: Have the multiple-include guards around
1578         the entire file.
1579
1580 2002-12-10  David Edelsohn  <edelsohn@gnu.org>
1581
1582         * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
1583         for SPEW_DEBUG.
1584         (snarf_method): Same.
1585         (snarf_defarg): Same.
1586
1587 2002-12-10  Mark Mitchell  <mark@codesourcery.com>
1588
1589         PR c++/8372
1590         * pt.c (tsubst_copy): Handle destructor names more correctly.
1591
1592 2002-12-10  Matt Austern   <austern@apple.com>
1593
1594         * cp-tree.h: get rid of needs_virtual_reinit bit.
1595
1596 2002-12-09  Mark Mitchell  <mark@codesourcery.com>
1597
1598         * NEWS: Document removal of in-class initialization extension for
1599         static data members of non-arithmetic, non-enumeration type.
1600         * decl.c (check_static_variable_definition): Do not allow that
1601         extension.
1602         * decl2.c (grokfield): Do not call digest_init when processing
1603         templates.
1604
1605 2002-12-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1606
1607         * error.c (dump_expr): Fix format specifier warning.
1608
1609 2002-12-04  Geoffrey Keating  <geoffk@apple.com>
1610
1611         * class.c (finish_struct_1): Correct comment.
1612         * cp-tree.c (DECL_SORTED_FIELDS): Likewise.
1613
1614 2002-12-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1615
1616         PR C++/8799
1617         * error.c (dump_expr): Don't ever try to dump a non-existent
1618         expression.
1619
1620 2002-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1621
1622         Implement covariant returns.
1623         * cp-tree.h (IS_AGGR_TYPE_2): Remove.
1624         (struct lang_decl_flags): Add this_thunk_p flag.
1625         Rename vcall_offset to virtual_offset.
1626         (struct lang_decl): Rename delta to fixed_offset.
1627         (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines.
1628         (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg.
1629         (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ...
1630         (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here.
1631         (make_thunk): Add this_adjusting arg.
1632         (finish_thunk): Declare.
1633         (mangle_thunk): Add this_adjusting arg.
1634         * class.c (get_vcall_index): Use base function for lookup.
1635         (update_vtable_entry_for_fn): Generate covariant thunk.
1636         (finish_struct_1): Set DECL_VINDEX to NULL for thunks.
1637         (build_vtbl_initializer): Use base function for lookup.
1638         Finish covariant thunk here. Adjust thunk generation.
1639         * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
1640         Adjust thunk dumping.
1641         * mangle.c (mangle_call_offset): New function.
1642         (mangle_thunk): Adjust for covariant thunks.
1643         * method.c (make_thunk): Adjust. Do not set name here.
1644         (finish_thunk): New function. Set name here.
1645         (use_thunk): Generate covariant thunks too.
1646         (thunk_adjust): New function.
1647         * search.c (covariant_return_p): Remove. Fold into ...
1648         (check_final_overrider): ... here. Simplify.
1649         * semantics.c (emit_associated_thunks): Walk covariant thunk lists.
1650
1651 2002-12-03  Jason Merrill  <jason@redhat.com>
1652
1653         PR c++/8674
1654         * call.c (build_over_call): Check specifically for TARGET_EXPR
1655         when eliding.
1656
1657         PR c++/8461, c++/8625
1658         * call.c (convert_for_arg_passing): Don't mess with error_mark_node.
1659         (cp_convert_parm_for_inlining): Remove.
1660         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
1661         Remove.
1662         * cp-tree.h (ADDR_IS_INVISIREF): Remove.
1663         * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code.
1664
1665         * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on
1666         an ambiguous conversion.
1667
1668 2002-12-03  Mark Mitchell  <mark@codesourcery.com>
1669
1670         PR c++/8688
1671         * decl.c (reshape_init): Handle erroneous initializers.
1672
1673 2002-12-02  Mark Mitchell  <mark@codesourcery.com>
1674
1675         PR c++/8720
1676         * spew.c (remove_last_token): Make sure that last_chunk is set
1677         correctly.
1678
1679         PR c++/8615
1680         * error.c (dump_expr): Handle character constants with
1681         TREE_OVERFLOW set.
1682
1683 2002-12-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1684
1685         DR 180
1686         * decl.c (grokdeclarator): Require class-key for all friend class.
1687         Output the correct type and context in the error message.
1688
1689 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1690
1691         PR c++/5919
1692         * pt.c (unify): Use variably_modified_type_p to test validity of
1693         template argument types.
1694
1695         PR c++/8727
1696         * cp-tree.h (lang_type_class): Add typeinfo_var.
1697         (CLASSTYPE_TYPEINFO_VAR): New macro.
1698         * rtti.c (get_tinfo_decl): Use it.
1699
1700         PR c++/8663
1701         * init.c (expand_member_init): Always get the main variant of a
1702         base class.
1703
1704 2002-12-01  Mark Mitchell  <mark@codesourcery.com>
1705
1706         PR c++/8332
1707         PR c++/8493
1708         * decl.c (cxx_init_decl_processing): Use size_type_node, not
1709         c_size_type_node.
1710         * decl2.c (coerce_new_type): Likewise.
1711         * except.c (do_allocate_exception): Likewise.
1712
1713 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
1714
1715         * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
1716         dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
1717         lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
1718         repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1719         typeck2.c: Include coretypes.h and tm.h.
1720         * Make-lang.in: Update dependencies.
1721
1722 2002-11-30  Mark Mitchell  <mark@codesourcery.com>
1723
1724         PR c++/8227
1725         * decl.c (layout_var_decl): Deal gracefully with erroneous types.
1726         (check_initializer): Validate the type of the initialized
1727         variable, even if the initializer is absent.
1728         * typeck.c (cp_type_quals): Deal gracefully with erroneous types.
1729
1730         PR c++/8214
1731         * typeck.c (convert_for_assignment): Do not use
1732         decl_constant_value on the operand.
1733
1734         PR c++/8511
1735         * pt.c (instantiate_decl): Handle template friends defined outside
1736         of the class correctly.
1737
1738 2002-11-29  Joe Buck <jbuck@synopsys.com>
1739
1740         * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
1741         anonymous structs.
1742
1743 2002-11-29  Mark Mitchell  <mark@codesourcery.com>
1744
1745         * class.c (walk_subobject_offsets): Recur on binfos as well as on
1746         types.
1747         (layout_nonempty_base_or_field): Pass it a binfo when processing a
1748         base class.
1749         (layout_empty_base): Likewise.
1750         (build_base_field): Likewise.
1751
1752 2002-11-27  Mark Mitchell  <mark@codesourcery.com>
1753
1754         * class.c (build_base_field): Make sure we get the canonical base
1755         when descending through primary bases.
1756
1757 2002-11-26  Geoffrey Keating  <geoffk@apple.com>
1758
1759         * decl.c (check_initializer): Don't error on initialisation of
1760         a scalar with a brace-enclosed expression.
1761
1762 2002-11-26  Nathan Sidwell  <nathan@codesourcery.com>
1763
1764         * cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
1765         (template_parms_equal): Remove prototype.
1766         * typeck.c (buuld_indirect_ref): Reformat.
1767
1768 2002-11-25  Jason Merrill  <jason@redhat.com>
1769
1770         * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
1771         and a DO_STMT.
1772
1773 2002-11-25  Mark Mitchell  <mark@codesourcery.com>
1774
1775         * tree.c (cp_build_qualified_type_real): Correct handling of
1776         array types.
1777         * class.c (walk_subobject_offsets): Fix thinko.
1778         (build_base_field): Record offsets of empty bases in primary
1779         virtual bases.
1780         (layout_class_type): Record offsets of empty bases in fields.
1781
1782         * search.c (is_subobject_of_p_1): Fix thinko.
1783         (lookup_field_queue_p): Likewise.
1784
1785 2002-11-24  Mark Mitchell  <mark@codesourcery.com>
1786
1787         * class.c (layout_class_type): Reuse tail padding when laying out
1788         virtual bases.
1789
1790 2002-11-22  Mark Mitchell  <mark@codesourcery.com>
1791
1792         * rtti.c (qualifier_flags): Fix thinko.
1793
1794 2002-11-21  Gabriel Dos Reis  <gdr@integrable-solutions.net>
1795
1796         Remove traditional C constructs 1/n.
1797         * cp-tree.h (init_method, set_mangled_name_for_decl,
1798         build_opfncall, hack_identifier, make_thunk, use_thunk,
1799         synthesize_method, implicitly_declare_fn,
1800         skip_artificial_parms_for, optimize_function, calls_setjmp_p,
1801         maybe_clone_body): Remove use of PARAMS.
1802
1803         * method.c (do_build_assign_ref, do_build_copy_constructor,
1804         synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
1805         Likewise.
1806         (synthesize_method): Use 'bool' type and constants instead of
1807         'int'.
1808         (locate_copy): Likewise.
1809         (implicitly_declare_fn): Likewise.
1810
1811         * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
1812         Remove old-style declaration.
1813         (maybe_clone_body): Use 'bool' type and constants.
1814
1815 2002-11-21  Glen Nakamura  <glen@imodulo.com>
1816
1817         PR c++/8342
1818         * typeck.c (get_member_function_from_ptrfunc): Make sure that a
1819         SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
1820         of the branches of a COND_EXPR.
1821
1822 2002-11-19  Mark Mitchell  <mark@codesourcery.com>
1823
1824         * pt.c (for_each_template_parm): Free allocated memory.
1825         * search.c (is_subobject_of_p_1): New function.
1826         (is_subobject_of_p): Avoid walking virtual bases multiple times.
1827
1828 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
1829
1830         * g++spec.c (lang_specific_spec_functions): New.
1831
1832 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
1833
1834         * ChangeLog: Follow spelling conventions.
1835         * class.c: Likewise.
1836         * decl2.c: Likewise.
1837
1838 2002-11-14  Zack Weinberg  <zack@codesourcery.com>
1839
1840         * search.c (dfs_push_decls): Do not try to reorder elements
1841         3..n of method_vec if method_vec has only two elements.
1842         Reverse order of two tests to avoid accessing unallocated
1843         memory.
1844
1845 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
1846
1847         * class.c (dfs_find_final_overrider): Adjust so that the most
1848         derived object is a binfo, rather than a class type.
1849         (find_final_overrider): Likewise.
1850         (add_vcall_offset_vtbl_entries_1): Simplify accordingly.
1851         (add_vcall_offset): Likewise.
1852
1853 2002-11-09  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1854
1855         PR c++/8389
1856         * pt.c (instantiate_template): Push class scope for member
1857         functions.
1858         (get_mostly_instantiated_function_type): Likewise.  Don't call
1859         tsubst on context.  Remove CONTEXTP and TPARMSP parameters.
1860         * cp-tree.h (get_mostly_instantiated_function_type): Adjust.
1861         * mangle.c (write_encoding, write_unqualified_name): Adjust.
1862
1863 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1864
1865         * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of
1866         vcall offfsets.  Split out ...
1867         (add_vcall_offset): ... new function.
1868
1869         PR c++/8338
1870         * pt.c (for_each_template_parm): Add htab parameter.
1871         (process_partial_specialization): Adjust call.
1872         (push_template_decl_real): Likewise.
1873         (pair_fn_data): Add visited.
1874         (for_each_template_parm_r): Avoid walking duplicates more than
1875         once.
1876         (uses_template_parms): Adjust call to for_each_template_parm.
1877
1878 2002-11-07  Mark Mitchell  <mark@codesourcery.com>
1879
1880         * class.c (add_implicitly_declared_members): Put implicitly
1881         declared functions at the end of TYPE_METHODs when -fabi-version
1882         is at least 2.
1883
1884 2002-11-05  Geoffrey Keating  <geoffk@apple.com>
1885
1886         * decl2.c (finish_file): Correct spelling.
1887
1888 2002-11-03  Mark Mitchell  <mark@codesourcery.com>
1889
1890         * call.c (build_special_member_call): Do not try to lookup VTTs by
1891         name.
1892         * class.c (vtbl_init_data): Add generate_vcall_entries.
1893         (get_vtable_decl): Do not look up virtual tables by name.
1894         (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P.
1895         (set_primary_base): Do not set CLASSTYPE_RTTI.
1896         (determine_primary_base): Likewise.
1897         (get_matching_virtual): Remove.
1898         (get_vcall_index): New function.
1899         (update_vtable_entry_for_fn): Do not try to use virtual thunks
1900         when they are not required.  Assign vcall indices at this point.
1901         (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT.
1902         Do update dynamic_classes.
1903         (build_vtt): Do not add VTTs to the symbol table.
1904         (build_ctor_vtbl_group): Likewise.
1905         (build_vtbl_initializer): Simplify handling of vcall indices.
1906         (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets
1907         for the most derived class.
1908         (add_vcall_offset_vtbl_entries_1): But do not actually add them to
1909         the vtable.
1910         * cp-tree.h (dynamic_classes): New macro.
1911         (lang_type_class): Remove rtti.  Add vtables.  Add vcall_indices.
1912         (CLASSTYPE_RTTI): Remove.
1913         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove.
1914         (CLASSTYPE_VCALL_INDICES): New macro.
1915         (CLASSTYPE_VTABLES): Likewise.
1916         (BV_USE_VCALL_INDEX_P): Remove.
1917         (build_vtable_path): Remove.
1918         * decl2.c (finish_vtable_vardecl): Remove.
1919         (key_method): Remove #if 0'd code.
1920         (finish_vtable_vardecl): Rename to ...
1921         (maybe_emit_vtables): ... this.
1922         (finish_file): Use it.
1923         * search.c (look_for_overrides_here): Update comment.
1924
1925 2002-11-01  Zack Weinberg  <zack@codesourcery.com>
1926
1927         PR c/7353 redux
1928         * decl2.c (grokfield): Reject TYPE_DECLs with initializers.
1929
1930 2002-10-30  Jason Merrill  <jason@redhat.com>
1931
1932         PR c++/8186
1933         * cp-tree.h (ADDR_IS_INVISIREF): New macro.
1934         * call.c (convert_for_arg_passing): Set it.
1935         * except.c (stabilize_throw_expr): Recurse for such an arg.
1936
1937 2002-10-31  Mark Mitchell  <mark@codesourcery.com>
1938
1939         * cp-tree.h (lang_decl_flags): Remove init_priority.
1940         (lang_decl): Add delta.
1941         (GLOBAL_INIT_PRIORITY): Remove.
1942         (THUNK_DELTA): Revise definition.
1943         * decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
1944         * dump.c (cp_dump_tree): Don't dump it.
1945
1946 2002-10-30  Mark Mitchell  <mark@codesourcery.com>
1947
1948         PR c++/8160
1949         * typeck2.c (process_init_constructor): Call complete_array_type.
1950
1951         PR c++/8149
1952         * decl.c (make_typename_type): Issue errors about invalid results.
1953
1954 2002-10-30  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1955
1956         Core issue 287, PR c++/7639
1957         * cp-tree.h (lang_type_class): Add decl_list field.
1958         (CLASSTYPE_DECL_LIST): New macro.
1959         (maybe_add_class_template_decl_list): Add declaration.
1960         * class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
1961         (unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
1962         (maybe_add_class_template_decl_list): New function.
1963         (add_implicitly_declared_members): Use it.
1964         * decl.c (maybe_process_template_type_declaration): Likewise.
1965         (pushtag): Likewise.
1966         * friend.c (add_friend): Likewise.
1967         (make_friend_class): Likewise.
1968         * semantics.c (finish_member_declaration): Likewise.
1969         (begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
1970         * pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
1971         to process members and friends in the order of declaration.
1972
1973 2002-10-29  Mark Mitchell  <mark@codesourcery.com>
1974
1975         PR c++/8287
1976         * decl.c (finish_destructor_body): Create the label to jump to
1977         when returning from a destructor here.
1978         (finish_function_body): Rather than here.
1979
1980 2002-10-25  Zack Weinberg  <zack@codesourcery.com>
1981
1982         PR c++/7266
1983         * decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
1984         SCOPE_REF is not null before dereferencing it.
1985
1986 2002-10-25  Mark Mitchell  <mark@codesourcery.com>
1987
1988         * call.c (build_over_call): Use DECL_CONTEXT, not
1989         DECL_VIRTUAL_CONTEXT.
1990         * class.c (modify_vtable_entry): Don't mess with
1991         DECL_VIRTUAL_CONTEXT.
1992         (set_vindex): Remove.
1993         (set_primary_base): Remove vfuns_p parameter.
1994         (determine_primary_base): Likewise.
1995         (modify_all_vtables): Likewise.
1996         (layout_class_type): Likewise.  Adjust calls to other functions
1997         accordingly.
1998         (finish_struct_1): Adjust calls to modified functions.  Set
1999         DECL_VINDEX here.
2000         * cp-tree.h (lang_type_class): Remove vsize.
2001         (CLASSTYPE_VSIZE): Remove.
2002         (lang_decl): Remove thunks.
2003         (DECL_THUNKS): Adjust.
2004         (DECL_VIRTUAL_CONTEXT): Remove.
2005         (duplicate_decls): Don't copy it.
2006         * pt.c (build_template_decl): Don't set it.
2007         (tsubst_decl): Likewise.
2008         * typeck.c (expand_ptrmemfunc_cst): Don't use it.
2009
2010         * class.c (build_vtbl_initializer): Don't use build_vtable_entry.
2011         (build_vtable_entry): Remove.
2012         * cp-tree.h (BINFO_VIRTUALS): Expand documentation.
2013         (lang_decl): Add thunks.
2014         (DECL_THUNKS): New macro.
2015         * decl.c (duplicate_decls): Copy it.
2016         * method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
2017         * semantics.c (emit_associated_thunks): Simplify.
2018
2019 2002-10-24  David Edelsohn  <edelsohn@gnu.org>
2020
2021         PR c++/7228
2022         * cp-tree.h (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Check that
2023         lang_type structure exists before accessing field.
2024         (SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT): New macro.
2025         (CLASSTYPE_REF_FIELDS_NEED_INIT): Similar.
2026         (SET_CLASSTYPE_REF_FIELDS_NEED_INIT): New macro.
2027         * class.c (check_field_decls): Use new macros.
2028         * typeck2.c (process_init_constructor): Remove redundant check for
2029         existence of lang_type structure.
2030
2031 2002-10-24  Mark Mitchell  <mark@codesourcery.com>
2032
2033         * class.c (end_of_base): New method.
2034         (end_of_class): Use it.  Check indirect virtual bases.
2035
2036         * class.c (check_field_decls): Fix typo.
2037
2038 2002-10-23  Mark Mitchell  <mark@codesourcery.com>
2039
2040         PR c++/8067
2041         * decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
2042         related variables.
2043
2044         PR c++/7679
2045         * spew.c (next_token): Do not return an endless stream of
2046         END_OF_SAVED_INPUT tokens.
2047         (snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
2048         the cached token stream.
2049         (snarf_defarg): Likewise.
2050
2051 2002-10-23  Zack Weinberg  <zack@codesourcery.com>
2052
2053         * cp-lang.c (cp_var_mod_type_p): New: C++ hook for
2054         variably_modified_type_p.
2055         * cp-tree.h: Remove prototype of variably_modified_type_p.
2056         * tree.c (variably_modified_type_p): Remove; now implemented
2057         in language-independent code.
2058
2059 2002-10-22  Mark Mitchell  <mark@codesourcery.com>
2060
2061         PR c++/6579
2062         * spew.c (snarf_parenthesized_expression): New function.
2063         (snarf_block): Use it.
2064
2065 2002-10-22  Richard Henderson  <rth@redhat.com>
2066
2067         * method.c (use_thunk): Always compute vcall_value; assert that
2068         it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
2069         for vcall thunks as well.
2070
2071 2002-10-21  Mark Mitchell  <mark@codesourcery.com>
2072
2073         * class.c (empty_base_at_nonzero_offset_p): New function.
2074         (layout_nonempty_base_or_field): Do not check for conflicts when
2075         laying out a virtual base using the GCC 3.2 ABI.
2076         (build_base_field): Correct checking for presence of empty classes
2077         at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.
2078
2079         * class.c (include_empty_classes): Use normalize_rli.
2080         (layout_class_type): Likewise.
2081
2082         * decl.c (reshape_init): Tweak handling of character arrays.
2083
2084         PR c++/8218
2085         * cp-tree.h (lang_type_class): Add contains_empty_class_p.
2086         (CLASSTYPE_CONTAINS_EMPTY_CLASS_P): New macro.
2087         * class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
2088         (check_field_decls): Likewise.
2089         (layout_class_type): Likewise.
2090         (finish_struct_1): Initialize it.
2091         (walk_subobject_offsets): Use it to prune searches.
2092
2093 2002-10-20  Mark Mitchell  <mark@codesourcery.com>
2094
2095         * method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
2096         * optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with
2097         TARGET_ASM_OUTPUT_MI_THUNK in comments.
2098
2099 2002-10-18  Zack Weinberg  <zack@codesourcery.com>
2100
2101         * decl.c (start_decl): Point users of the old initialized-
2102         typedef extension at __typeof__.
2103
2104 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2105
2106         * Make-lang.in (method.o): Depend on TARGET_H.
2107         * method.c (target.h): Include it.
2108         (use_thunk): Use target hooks.  Use vcall thunks, if available.
2109
2110 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2111
2112         * class.c (base_derived_from): Make sure return value is a bool.
2113
2114 2002-10-18  Mark Mitchell  <mark@codesourcery.com>
2115
2116         * class.c (find_final_overrider_data_s): Remove overriding_fn and
2117         overriding_base.
2118         (dfs_base_derived_from): New function.
2119         (base_derived_from): Likewise.
2120         (dfs_find_final_overrider): Use base_derived_from.
2121         (find_final_overrider): Adjust.
2122
2123 2002-10-18  Jason Merrill  <jason@redhat.com>
2124
2125         PR c++/8080
2126         * semantics.c (finish_for_cond, finish_while_cond): Don't mess
2127         with condition decls in a template.
2128
2129 2002-10-17  Nathan Sidwell  <nathan@codesourcery.com>
2130
2131         * class.c (add_method): Compare template parms too.
2132
2133 2002-10-17  Mark Mitchell  <mark@codesourcery.com>
2134
2135         PR c++/7584
2136         * class.c (handle_using_decl): Allow the declaration used to be
2137         from an ambiguous base.
2138
2139         * pt.c (convert_template_argument): Revert this change:
2140                 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2141                 * pt.c (convert_template_argument): Do not fold non-type
2142                 template rguments when inside a template.
2143
2144         * init.c (expand_default_init): Handle brace-enclosed initializers
2145         correctly.
2146
2147 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2148
2149         * mangle.c (write_expression): Correct handling of enumeration
2150         constants.
2151         (write_template_arg): Likewise.
2152         * pt.c (convert_template_argument): Do not fold non-type template
2153         arguments when inside a template.
2154
2155         PR c++/7478
2156         * cvt.c (convert_to_reference): Allow references as the incoming
2157         type.
2158
2159 2002-10-16  Mark Mitchell  <mark@codesourcery.com>
2160
2161         PR c++/7524
2162         * method.c (do_build_assign_ref): Use cp_build_qualified_type, not
2163         build_qualified_type.
2164
2165 2002-10-15  Richard Henderson  <rth@redhat.com>
2166
2167         * error.c (dump_expr): Use real_to_decimal directly, and with
2168         the new arguments.
2169
2170 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
2171
2172         * decl.c (reshape_init): Fix typo.
2173
2174         * cp-tree.h (operator_name_info_t): Add arity.
2175         * lex.c (init_operators): Initialize it.
2176         * mangle.c (write_conversion_operator_name): New function.
2177         (write_unqualified_name): Use it.
2178         (write_template_args): Accept template arguments as a TREE_LIST.
2179         (write_expression): Adjust handling of qualified names to match
2180         specification.
2181
2182 2002-10-15  Jason Merrill  <jason@redhat.com>
2183
2184         * call.c (call_builtin_trap): New fn.
2185         (convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
2186         (build_call): Don't set current_function_returns_abnormally outside
2187         a function.
2188
2189 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2190
2191         * class.c (check_field_decls): Remove empty_p parameter.  Instead,
2192         clear CLASSTYPE_EMPTY_P.
2193         (build_base_field): Likewise.
2194         (build_base_fields): Likewise.
2195         (check_bases_and_members): Likewise.
2196         (create_vtbl_ptr): Likewise.
2197         (layout_class_type): Likewise.  Ensure that empty classes have
2198         size zero when used as base classes in the 3.2 ABI.
2199         (finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
2200         CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
2201         parameter.
2202         (is_empty_class): Correct definition when using post-3.2 ABI.
2203         * cp-tree.h (lang_type_class): Add empty_p.
2204         (CLASSTYPE_EMPTY_P): New macro.
2205
2206 2002-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2207
2208         * init.c (build_delete): Do not apply save_expr for arrays.
2209         (build_vec_delete): Likewise.
2210
2211 2002-10-14  Mark Mitchell  <mark@codesourcery.com>
2212
2213         * decl.c (layout_var_decl): Call layout_decl even for variables
2214         whose type is an array with unspecified bounds.
2215
2216         PR c++/7176
2217         * lex.c (do_identifier): Add another option for the parsing
2218         parameter.
2219         * parse.y (do_id): Use it.
2220
2221 2002-10-11  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2222
2223         PRs C++/6803, C++/7721 and C++/7803
2224         * decl.c (grokdeclarator): Gracefully handle template-name as
2225         decl-specifier.
2226
2227 2002-10-11  Jason Molenda  <jmolenda@apple.com>
2228
2229         * init.c (build_field_list): Provide uses_unions_p with a default
2230         value.
2231
2232 2002-10-11  Mark Mitchell  <mark@codesourcery.com>
2233
2234         PR c++/5661
2235         * cp-tree.h (variably_modified_type_p): New function.
2236         (grokdeclarator) Tighten check for variably modified types as
2237         fields.
2238         * pt.c (convert_template_argument): Do not allow variably modified
2239         types as template arguments.
2240         * tree.c (variably_modified_type_p): New function.
2241
2242         * NEWS: Document removal of "new X = ..." extension.
2243         * class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
2244         brace-enclosed initializers.
2245         * cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
2246         (initialize_local_var): Remove declaration.
2247         (expand_static_init): Likewise.
2248         * decl.c (next_initializable_field): New function.
2249         (reshape_init): Likewise.
2250         (check_initializer): Use them.  Build dynamic initializer for
2251         aggregates here too.
2252         (initialize_local_var): Simplify, and incorporate cleanup
2253         insertion code as well.
2254         (destroy_local_var): Remove.
2255         (cp_finish_decl): Tidy.
2256         (expand_static_init): Fold checks for whether or not a variable
2257         needs initialization into this function.  Simplify.
2258         * decl2.c (do_static_initialization): Simplify.
2259         * init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
2260         be done for us automatically.
2261         (expand_default_init): Handle brace-enclosed initializers
2262         correctly.
2263         (expand_aggr_init_1): Remove RTL-generation code.
2264         (build_vec_init): Remove "new X = ..." support.
2265         * parse.y (new_initializer): Likewise.
2266         * rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
2267         brace-enclosed initializer.
2268         (create_pseudo_type_info): Likewise.
2269         * typeck2.c (store_init_value): Don't try to handle digest_init
2270         being called more than once.
2271         (digest_init): Tidy handling of brace-enclosed initializers.
2272
2273 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2274
2275         * decl.c (typename_hash): Use htab_hash_pointer.
2276
2277 2002-10-10  Jim Wilson  <wilson@redhat.com>
2278
2279         * decl.c (duplicate_decls): Don't call decl_attributes.
2280
2281 2002-10-09  Zack Weinberg  <zack@codesourcery.com>
2282
2283         PR c/7353
2284         * decl.c (start_decl): Unconditionally issue error for
2285         'typedef foo = bar'.
2286         (cp_finish_decl): Remove special case for TYPE_DECL with initializer.
2287         (grokdeclarator): Remove redundant error for 'typedef foo = bar'.
2288
2289 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2290
2291         * decl2.c (prune_vtable_vardecl): Delete unused function.
2292
2293 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2294
2295         PR c++/7754
2296         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2297         procesing template functions.
2298         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2299         type. Call layout_decl.
2300         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2301
2302 2002-10-07  Richard Henderson  <rth@redhat.com>
2303
2304         * decl2.c, pt.c: Revert c++/7754 fix.
2305
2306 2002-10-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2307
2308         PR c++/7804
2309         * error.c (dump_expr) [REAL_CST]: Output in decimal format.
2310
2311 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2312
2313         PR c++/7931
2314         * pt.c (for_each_template_parm_r): Handle BASELINKs.
2315
2316         PR c++/7754
2317         * decl2.c (finish_anon_union): Do not expand anonymous unions when
2318         procesing template functions.
2319         * pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
2320         type. Call layout_decl.
2321         (tsubst_expr, case DECL_STMT): Handle anonymous unions.
2322
2323 2002-10-03  Mark Mitchell  <mark@codesourcery.com>
2324
2325         PR c++/8006
2326         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
2327         template parameters.
2328         (globals): Add entity and need_abi_warning.
2329         (decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
2330         CLASSTYPE_TEMPLATE_INFO.
2331         (is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
2332         TYPE_TI_TEMPLATE.
2333         (write_prefix): Handle typename types correctly.
2334         (write_template_prefix): Handle template template parameters
2335         correctly.
2336         (start_mangling): Add entity parameter.
2337         (finish_mangling): Warn about names whose mangling will change.
2338         (mangle_decl_string): Adjust.
2339         (mangle_type_string): Likewise.
2340         (mangle_special_for_type): Likewise.
2341         (mangle_ctor_vtbl_for_type): Likewise.
2342         (mangle_thunk): Likewise.
2343         (mangle_guard_variable): Likewise.
2344         (mangle_ref_init_variable): Likewise.
2345
2346 2002-10-02  Mark Mitchell  <mark@codesourcery.com>
2347
2348         PR c++/7188.
2349         * cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
2350         * cp-tree.h (emit_base_init): Rename to ....
2351         (emit_mem_initializers): ... this.
2352         (expand_member_init): Change prototype.
2353         * init.c (perform_member_init): Compute explicit, rather than
2354         requiring it as a parameter.
2355         (sort_member_init): Rename to ...
2356         (sort_mem_initializers): ... this.  Process bases and data members
2357         together.
2358         (sort_base_init): Remove.
2359         (emit_base_init): Rename to ...
2360         (emit_mem_initializers): ... this.
2361         (expand_aggr_vbase_init_1): Remove.
2362         (construct_virtual_bases): Rename to ...
2363         (construct_virtual_base): ... this.
2364         (expand_member_init): Rework handling of base initializers.
2365         * method.c (do_build_copy_constructor): Use
2366         finish_mem_initializers.
2367         * parse.y (member_init): Adjust calls to expand_member_init.
2368         * pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
2369         (tsubst_initializer_list): Use expand_member_init.
2370         * semantics.c (finish_mem_intiailizers): Simplify.
2371
2372 2002-10-02  Matt Austern  <austern@apple.com>
2373         * decl.c (walk_vtables_r): Fixed typo that caused result to
2374         never get a nonzero value.
2375
2376 2002-10-02  Roger Sayle  <roger@eyesopen.com>
2377
2378         PR optimization/6627
2379         * cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
2380         from here, and move it to tree.h.
2381         * decl.c (cxx_init_decl_processing): If storing the vbit
2382         in function pointers, ensure that force_align_functions_log
2383         is atleast one.
2384
2385 2002-10-02  Matt Austern  <austern@apple.com>
2386
2387         * class.c (check_field_decls): Changed warning about const member
2388         variables so that it doesn't get issued for a class aggregate.
2389
2390 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2391
2392         * decl.c (cp_finish_decl): Make sure array types are laid out,
2393         even if the array bounds are unknown.
2394
2395 2002-10-01  Steve Ellcey  <sje@cup.hp.com>
2396
2397         * class.c (build_vtbl_initializer): Change build_c_cast
2398         to build1.
2399
2400 2002-10-01  Mark Mitchell  <mark@codesourcery.com>
2401
2402         * decl.c (cp_finish_decl): Make sure array types are laid out,
2403         even if the array bounds are unknown.
2404
2405         * decl.c (cp_finish_decl): Correct check for dynamic
2406         initialization of thread-local storage.
2407
2408 2002-09-30  Nathan Sidwell  <nathan@codesourcery.com>
2409
2410         * tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also
2411         overloaded.
2412
2413 2002-09-30  Steve Ellcey  <sje@cup.hp.com>
2414
2415         * class.c (build_vtbl_initializer): Add cast.
2416         (add_vcall_offset_vtbl_entries_1):
2417         Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.
2418
2419 2002-09-30  Mark Mitchell  <mark@codesourcery.com>
2420
2421         * class.c (walk_subobject_offsets): Correct the calculation of
2422         offsets for virtual bases.  Correct the counting of array
2423         elements.
2424         (layout_nonempty_base_or_field): Simplify.  Correct the
2425         calculation of offsets to be propagated through the binfo
2426         hierarchy.
2427         (build_base_field): Avoid creating a FIELD_DECL for empty bases.
2428         Add the FIELD_DECL to TYPE_FIELDS.
2429         (build_base_fields): Adjust accordingly.
2430         (layout_virtual_bases): Use build_base_field.
2431         (end_of_class): Return a tree, not an integer.
2432         (warn_about_ambiguous_direct_bases): Rename to ...
2433         (warn_about_ambiguous_bases): ... this.
2434         (include_empty_classes): New function.
2435         (layout_class_type): Create an alternative version of the type to
2436         be used when as a base class type.  Do not call
2437         finish_record_layout until we are done laying out the class.
2438         * cp-tree.h (lang_type_class): Remove size, size_unit.  Add
2439         as_base.
2440         (CLASSTYPE_SIZE): Reimplement.
2441         (CLASSTYPE_SIZE_UNIT): Likewise.
2442         (CLASSTYPE_ALIGN): Likweise.
2443         (CLASSTYPE_USER_ALIGN): Likewise.
2444         (CLASSTYPE_AS_BASE): New macro.
2445         (DECL_INITIALIZED_P): Likewise.
2446         (extract_init): Remove prototype.
2447         (build_forced_zero_init): Rename to ...
2448         (build_zero_init): ... this.
2449         (force_store_init_value): Remove.
2450         * decl.c (obscure_complex_init): Remove.
2451         (duplicate_decls): Copy DECL_INITIALIZED_P.
2452         (check_initializer): Do not leave junk in DECL_INITIAL.
2453         (cp_finish_decl): Handle zero-initialization of entities with
2454         static storage duration.
2455         * expr.c (extract_init): Remove.
2456         * init.c (build_forced_zero_init): Remove.
2457         (build_zero_init): New function.
2458         (build_default_init): Use it.
2459         (build_field_list): Skip FIELD_DECLs for base subobjects.
2460         (push_base_cleanups): Likewise.
2461         * method.c (do_build_assign_ref): Likewise.
2462         (synthesize_exception_spec): Likewise.
2463         * pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
2464         (regenerate_decl_from_template): To not set DECL_INITIAL for a
2465         static data member whose initialization took place in its class.
2466         (instantiate_decl): Do not pass an initializer to cp_finish_decl
2467         in that situation.
2468         * search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
2469         (dfs_unuse_fields): Likewise.
2470         * tree.c (pod_type_p): Handle error_mark_node.
2471         (zero_init_p): Likewise.
2472         * typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
2473         subobjects.
2474         * typeck2.c (store_init_value): Remove #if 0'd code.
2475         (force_store_init_value): Remove.
2476         (process_init_constructor): Use build_zero_init.
2477
2478 2002-09-29  Nathan Sidwell  <nathan@codesourcery.com>
2479
2480         PR c++/7788
2481         * rtti.c (unemitted_tinfo_decl_p): Check it has a field.
2482
2483 2002-09-29  Kazu Hirata  <kazu@cs.umass.edu>
2484
2485         * cp-tree.h: Fix comment typos.
2486         * decl.c: Likewise.
2487         * pt.c: Likewise.
2488
2489 2002-09-25  Mark Mitchell  <mark@codesourcery.com>
2490
2491         * cp/class.c (contains_empty_class_p): New method.
2492         (walk_subobject_offsets): Correct computation of field offset.
2493         (layout_empty_base): Correct placement of emtpy base classes.
2494         (layout_class_type): Warn about ABI changes.
2495
2496 2002-09-23  Mark Mitchell  <mark@codesourcery.com>
2497
2498         * cp/class.c (layout_virtual_bases): Do not round the size of the
2499         type to a multiple of the alignment before laying out virtual bases.
2500         (layout_class_type): Correct handling of bit-fields that are wider
2501         than their type inside unions.  Round the size of the type to a
2502         even number of bytes when computing the size without virtual
2503         bases.
2504         * cp/cp-tree.h (abi_version_at_least): New macro.
2505
2506 2002-09-21  Kazu Hirata  <kazu@cs.umass.edu>
2507
2508         * ChangeLog: Follow spelling conventions.
2509         * ChangeLog.2: Likewise.
2510         * call.c: Likewise.
2511         * class.c: Likewise.
2512         * cp-tree.h: Likewise.
2513         * cvt.c: Likewise.
2514         * decl.c: Likewise.
2515         * decl2.c: Likewise.
2516         * except.c: Likewise.
2517         * friend.c: Likewise.
2518         * g++spec.c: Likewise.
2519         * init.c: Likewise.
2520         * lex.c: Likewise.
2521         * mangle.c: Likewise.
2522         * method.c: Likewise.
2523         * operators.def: Likewise.
2524         * optimize.c: Likewise.
2525         * pt.c: Likewise.
2526         * rtti.c: Likewise.
2527         * search.c: Likewise.
2528         * semantics.c: Likewise.
2529         * spew.c: Likewise.
2530         * tree.c: Likewise.
2531         * typeck.c: Likewise.
2532
2533 2002-09-18  Devang Patel  <dpatel@apple.com>
2534
2535         * cp/cp-tree.h: New prototype for walk_vtabls().
2536         * cp/decl.c (walk_vtables_r): New function.
2537         (struct cp_binding_level): Add new members, namespaces,
2538         names_size and vtables.
2539         (add_decl_to_level): Add decl in namespaces or vtables
2540         chain, if conditions match.
2541         (walk_vtables): New function.
2542         (walk_namespaces_r): Travers separate namespace chain
2543         for namespace decls.
2544         (wrapup_globals_for_namespace): Use names_size instead
2545         of list_length().
2546         * cp/decl2.c (finish_file): Use walk_vtables() instead of
2547         walk_globals() to walk vtable decls.
2548
2549 2002-09-18  Nathan Sidwell  <nathan@codesourcery.com>
2550
2551         * decl.c (grokdeclarator): Use assert, not internal_error. Don't
2552         ICE with invalid pointers & references.
2553
2554 2002-09-17  Zack Weinberg  <zack@codesourcery.com>
2555
2556         * Make-lang.in: Remove all references to the demangler.
2557         * cxxfilt.c: Moved to binutils.
2558
2559 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2560
2561         PR c++/7718
2562         * pt.c (tsubst_decl): Remove assert.
2563
2564         Remove DR 295 implementation.
2565         * pt.c (check_cv_quals_for_unify): Disable function & method cases.
2566         * tree.c (cp_build_qualified_type_real): Likewise. Don't warn
2567         about ignoring volatile qualifiers.
2568
2569         * search.c (lookup_member): Correct documentation.
2570
2571 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
2572
2573         * cp-tree.h (union lang_tree_node): Add chain_next option.
2574
2575 2002-09-16  Nathan Sidwell  <nathan@codesourcery.com>
2576
2577         * parse.y (parse_finish_call_expr): Check lookup_member result.
2578
2579         PR c++/7015
2580         * semantic.c (finish_asm_stmt): Fix operand/output_operands
2581         thinko.
2582         * typeck.c (c_expand_asm_operands): Protect from error_mark_node.
2583
2584 2002-09-15  Nathan Sidwell  <nathan@codesourcery.com>
2585
2586         PR c++/7919
2587         * call.c (build_over_call): Convert this pointer for fns found by
2588         using decls.
2589
2590 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
2591
2592         * ChangeLog: Follow spelling conventions.
2593         * ChangeLog.1: Likewise.
2594
2595 2002-09-14  Nathan Sidwell  <nathan@codesourcery.com>
2596
2597         PR c++/7768
2598         * pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.
2599
2600 2002-09-14  Kazu Hirata  <kazu@cs.umass.edu>
2601
2602         * error.c: Fix comment formatting.
2603         * except.c: Likewise.
2604         * expr.c: Likewise.
2605         * friend.c: Likewise.
2606         * g++spec.c: Likewise.
2607         * init.c: Likewise.
2608         * lex.c: Likewise.
2609         * mangle.c: Likewise.
2610         * method.c: Likewise.
2611         * optimize.c: Likewise.
2612         * pt.c: Likewise.
2613         * rtti.c: Likewise.
2614         * search.c: Likewise.
2615         * semantics.c: Likewise.
2616         * spew.c: Likewise.
2617         * tree.c: Likewise.
2618         * typeck.c: Likewise.
2619         * typeck2.c: Likewise.
2620
2621 2002-09-13  Matt Austern  <austern@apple.com>
2622
2623         PR C++/7828
2624         * cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
2625         * cp/call.c: Change call-by-const-reference mechanism to use
2626         non_cast_lvalue_p when deciding whether the create a temporary.
2627         We need a temporary when passing, e.g. (long) x by const ref.
2628
2629 2002-09-13  Nathan Sidwell  <nathan@codesourcery.com>
2630
2631         * pt.c (unify, ARRAY_TYPE): Element type can be more qualified.
2632
2633 2002-09-13  Kazu Hirata  <kazu@cs.umass.edu>
2634
2635         * decl.c: Fix comment formatting.
2636         * decl2.c: Likewise.
2637
2638 2002-09-12  Kazu Hirata  <kazu@cs.umass.edu>
2639
2640         * call.c: Fix comment formatting.
2641         * class.c: Likewise.
2642         * cp-lang.c: Likewise.
2643         * cp-tree.h: Likewise.
2644         * cvt.c: Likewise.
2645
2646 2002-09-11  Zack Weinberg  <zack@codesourcery.com>
2647
2648         * Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
2649         and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
2650         * cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
2651         minor adjustments (use version_string, eliminate yet another
2652         duplicate of xmalloc)
2653
2654 2002-09-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2655
2656         * cp-tree.h (require_complete_eh_spec_types): Add prototype.
2657
2658 2002-09-05  Jason Merrill  <jason@redhat.com>
2659
2660         * typeck2.c (add_exception_specifier): Only pedwarn for an
2661         incomplete type.
2662         (require_complete_eh_spec_types): New fn.
2663         (cxx_incomplete_type_diagnostic): Also support pedwarning.
2664         * typeck.c (complete_type_or_diagnostic): Likewise.
2665         * call.c (build_call): Call require_complete_eh_spec_types.
2666         * rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
2667         on an incomplete type.
2668
2669 2002-09-04  Jakub Jelinek  <jakub@redhat.com>
2670
2671         * decl.c (start_cleanup_fn): Clear interface_only before
2672         start_function, restore it afterwards.
2673
2674 2002-09-02  Nathan Sidwell  <nathan@codesourcery.com>
2675
2676         * cp-tree.h (finish_builtin_type): Remove.
2677         * decl2.c (finish_builtin_type): Move to common code.
2678         * decl.c (build_ptrmemfunc_type): Adjust.
2679         * rtti.c (create_pseudo_type_info): Adjust.
2680         (create_tinfo_types): Adjust.
2681
2682 2002-08-31  Jason Merrill  <jason@redhat.com>
2683
2684         * cp-lang.c (cp_expr_size): Allow initialization from a
2685         CONSTRUCTOR.
2686
2687 2002-08-30  Richard Henderson  <rth@redhat.com>
2688
2689         PR opt/7515
2690         * tree.c: Include target.h.
2691         (cp_cannot_inline_tree_fn): Don't auto-inline functions that
2692         don't bind locally.
2693         * Makefile.in (tree.o): Update.
2694
2695 2002-08-27  Mark Mitchell  <mark@codesourcery.com>
2696
2697         * class.c (layout_virtual_bases): Warn about bugs in G++ that
2698         result in incorrect object layouts.
2699         (layout_class_type): Likewise.
2700
2701 2002-08-24  Matt Austern  <austern@apple.com>
2702
2703         * tree.c (lvalue_p_1): Add argument for whether casts of lvalues
2704         are allowable.
2705         (real_lvalue_p): Update caller.
2706         (lvalue_p): Ditto.
2707         (non_cast_lvalue_or_else): New.
2708         * tree.h: Declare it.
2709         * typeck.c (build_unary_op): Use non_cast_lvalue_or_else.
2710
2711 2002-08-22  Mark Mitchell  <mark@codesourcery.com>
2712
2713         * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
2714         and COND_EXPR specially; fix error message output.
2715
2716 2002-08-22  Jason Merrill  <jason@redhat.com>
2717
2718         * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
2719         * semantics.c (nullify_returns_r): Likewise.
2720
2721 2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
2722
2723         Fix PR/7621
2724         * typeck.c (finish_class_member_access_expr): Diagnose cases where
2725         name lookup finds nothing.
2726
2727 2002-08-15  Jason Merrill  <jason@redhat.com>
2728
2729         * semantics.c (finish_then_clause): Remove redundant assignment.
2730         (finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
2731         extra binding level outside the if/switch statement.
2732         (finish_while_cond, finish_for_cond): Rewrite complex condition
2733         into the loop body.
2734
2735 2002-08-15  Alexandre Oliva  <aoliva@redhat.com>
2736
2737         * parse.y (sizeof, alignof, typeof): New non-terminals to
2738         increment skip_evaluation.  Replace terminals with them and
2739         decrement skip_evaluation at the end of rules using them.
2740         * decl2.c (mark_used): Don't assemble_external if
2741         skipping evaluation.
2742
2743 2002-08-15  Gabriel Dos Reis  <gdr@nerim.net>
2744
2745         Fix PR/7504
2746         * parse.y (parse_finish_call_expr): Handle incomplete
2747         type used to name a scope.
2748
2749 2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
2750
2751         PR c++/7598
2752         * typeck.c (build_unary_op): Fold offsetof idiom. Fixes
2753         regression caused by my 2002-08-08 patch.
2754
2755 2002-08-13  Mark Mitchell  <mark@codesourcery.com>
2756
2757         * decl.c (pushdecl_class_level): Honor requests to bind names to
2758         OVERLOADs.
2759
2760 2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2761
2762         * decl2.c (build_call_from_tree): Fix uninitialized variable.
2763         * parse.y (parse_finish_call_expr): Likewise.
2764         * repo.c (old_args, old_dir, old_main): Const-ify.
2765
2766 2002-08-11  Gabriel Dos Reis  <gdr@nerim.net>
2767
2768         * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
2769         DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
2770         * optimize.c (maybe_clone_body): Likewise.
2771         * pt.c (tsubst_enum): Likewise.
2772         (lookup_template_class): Likewise.
2773         * tree.c (cp_copy_res_decl_for_inlining): Likewise.
2774
2775 2002-08-10  Neil Booth  <neil@daikokuya.co.uk>
2776
2777         * lang-specs.h: Remove -ansi.
2778
2779 2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
2780
2781         * tree.c (maybe_dummy_object): Replace // with /* */
2782
2783 2002-08-09  Mark Mitchell  <mark@codesourcery.com>
2784
2785         * call.c (standard_conversion): Use build_ptrmem_type.
2786         * cp-tree.h (build_ptrmem_type): New function.
2787         (adjust_result_of_qualified_name_lookup): Likewise.
2788         * decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
2789         static data members.
2790         (build_ptrmem_type): New function.
2791         (grokdeclarator): Do not use build_offset_type when encountering a
2792         qualified name.
2793         * parse.y (parse_finish_call_expr): Use
2794         adjust_result_of_qualified_name_lookup.
2795         * search.c (adjust_result_of_qualified_name_lookup): New function.
2796         * typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
2797         accessing OFFSET_TYPEs directly.
2798
2799 2002-08-08  Mike Stump  <mrs@apple.com>
2800
2801         * call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
2802         (type_decays_to): Likewise.
2803         * class.c (find_final_overrider): Likewise.
2804         (maybe_note_name_used_in_class): Likewise.
2805         * decl.c (current_tmpl_spec_kind): Likewise.
2806         (add_binding): Likewise.
2807         (push_class_binding): Likewise.
2808         (duplicate_decls): Likewise.
2809         (layout_var_decl): Likewise.
2810         (grokfndecl): Likewise.
2811         (grokdeclarator): Likewise.
2812         (check_default_argument): Likewise.
2813         * decl2.c (handle_class_head): Likewise.
2814         * error.c (dump_template_decl): Likewise.
2815         * init.c (build_offset_ref): Likewise.
2816         * pt.c (check_specialization_scope): Likewise.
2817         (determine_specialization): Likewise.
2818         (check_explicit_specialization): Likewise.
2819         (maybe_check_template_type): Likewise.
2820         (process_partial_specialization): Likewise.
2821         (check_default_tmpl_args): Likewise.
2822         (push_template_decl_real): Likewise.
2823         (convert_template_argument): Likewise.
2824         (try_class_unification): Likewise.
2825         (get_bindings_real): Likewise.
2826         (do_decl_instantiation): Likewise.
2827         * semantics.c (begin_function_definition): Likewise.
2828         (finish_member_declaration): Likewise.
2829         (check_multiple_declarators): Likewise.
2830         * typeck.c (comp_array_types): Likewise.
2831         (comptypes): Likewise.
2832         (expr_sizeof): Likewise.
2833         (build_binary_op): Likewise.
2834         (dubious_conversion_warnings): Likewise.
2835         (check_return_expr): Likewise.
2836
2837 2002-08-08  Mark Mitchell  <mark@codesourcery.com>
2838
2839         * typeck.c (build_class_member_access_expr): Do not return
2840         error_mark_node when no error has occurred.
2841
2842 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2843
2844         * typeck.c (build_component_addr): Remove.
2845         (build_unary_op): Just check it's not a bitfield, and then build
2846         an ADDR_EXPR.
2847
2848 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2849
2850         * class.c (convert_to_base): Correct check for error_mark_node.
2851         (create_vtable_ptr): Remove unused VFUNS_P parm.
2852
2853 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2854
2855         * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
2856
2857 2002-08-07  Mark Mitchell  <mark@codesourcery.com>
2858
2859         Rework build_component_ref.
2860         * call.c (build_vfield_ref): Do not go through build_component_ref.
2861         (build_field_call): Use build_class_member_access_expr.
2862         (build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
2863         (build_object_call): Likewise.
2864         * class.c (convert_to_base): New function.
2865         (type_requires_array_cookie): Use BASELINK_FUNCTIONS.
2866         (instantiate_type): Handle BASELINKs.
2867         * cp-tree.def (BASELINK): New tree code.
2868         * cp-tree.h (BASELINK_P): Reimplement.
2869         (SET_BASELINK_P): Remove.
2870         (BASELINK_BINFO): Reimplement.
2871         (BASELINK_FUNCTIONS): Likewise.
2872         (BASELINK_ACCESS_BINFO): Likewise.
2873         (BASELINK_OPTYPE): Likewise.
2874         (convert_to_base): New function.
2875         (name_p): Likewise.
2876         (build_object_ref): Remove.
2877         (build_component_ref_1): Likewise.
2878         (build_component_ref): Likewise.
2879         (build_x_component_ref): Likewise.
2880         (build_class_member_access_expr): New function.
2881         (finish_class_member_access_expr): Likewise.
2882         (build_ptrmemfunc_access_expr): Likewise.
2883         * decl.c (grokdeclarator): Handle BASELINKs.
2884         * decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
2885         finish_class_member_access_expr.
2886         (arg_assoc): Handle BASELINKs.
2887         (do_class_using_decl): Likewise.
2888         * error.c (dump_decl): Likewise.
2889         (dump_expr): Use build_ptrmemfunc_access_expr.
2890         * except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
2891         destructors.
2892         (build_throw): Use BASELINK_FUNCTIONS.
2893         * init.c (perform_member_init): Use
2894         build_class_member_access_expr.
2895         (build_offset_ref): Handle BASELINKs.  Use
2896         build_class_member_access_expr.
2897         * method.c (hack_identifier): Likewise.
2898         * parse.y (do_id): Use BASELINK, not TREE_LIST.
2899         (primary): Remove uses of build_object_ref.
2900         * pt.c (lookup_template_function): Handle BASELINKs.
2901         (resolve_overloaded_unification): Likewise.
2902         * search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
2903         (lookup_field): Use BASELINK, not TREE_LIST.
2904         (lookup_fnfiels): Likewise.
2905         (setup_class_bindings): Likewise.
2906         * semantics.c (finish_object_call_expr): Do not use
2907         build_method_call when we already know what function is being
2908         called.
2909         * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
2910         * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
2911         TREE_CHAIN.
2912         (name_p): New function.
2913         * typeck.c (build_object_ref): Remove.
2914         (build_component_ref_1): Likewise.
2915         (build_x_component_ref): Likewise.
2916         (build_class_member_access_expr): New function.
2917         (finish_class_member_access_expr): Likewise.
2918         (build_ptrmemfunc_access_expr): Likewise.
2919         (get_member_function_from_ptrfunc): Use
2920         build_ptrmemfunc_access_expr.
2921         (build_binary_op): Likewise.
2922         (build_unary_op): Likewise.
2923         (build_ptrmemfunc): Likewise.
2924         (pfn_from_ptrmemfunc): Likewise.
2925         * typeck2.c (build_m_component_ref): Adjust comment.
2926
2927 2002-08-07  Neil Booth  <neil@daikokuya.co.uk>
2928
2929         * Make-lang.in (CXX_C_OBJS): Update.
2930         * cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
2931         * cp-tree.h (cxx_decode_option): Remove.
2932         * decl2.c (compare_options, lang_f_options, unsupported_options,
2933         cxx_decode_option): Remove.
2934
2935 2002-08-06  Gabriel Dos Reis  <gdr@nerim.net>
2936
2937         * typeck.c (build_x_unary_op): Handle pointer-to-member.
2938
2939 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
2940
2941         * class.c: Don't include obstack.h.
2942         (popclass):
2943         * decl2.c: Delete bogus comment.
2944         * error.c: Don't include obstack.h.
2945         * except.c: Likewise.
2946         (dump_type): Correct comment.
2947         * method.c: Don't include obstack.h.
2948         * tree.c: Likewise.
2949
2950 2002-08-04  Gabriel Dos Reis  <gdr@nerim.net>
2951
2952         Fix PR/2213
2953         * cvt.c (cp_convert_to_pointer): Reject conversions from integral
2954         expressions to pointer-to-data-member of pointer-to-member-functions.
2955
2956 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
2957
2958         * cvt.c (ocp_convert): Delete obsolete code.
2959         * parse.y (permanent_obstack): Delete declaration.
2960         * pt.c (permanent_obstack): Delete declaration.
2961         * repo.c (permanent_obstack): Delete declaration.
2962         (open_repo_file): Use xmalloc instead of permanent_obstack.
2963         (init_repo): Use xstrdup instead of permanent_obstack.
2964
2965 2002-08-04  Nathan Sidwell  <nathan@codesourcery.com>
2966
2967         * cp-tree.h (VF_DERIVED_VALUE): Remove.
2968         * class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.
2969
2970 2002-08-03  Nathan Sidwell  <nathan@codesourcery.com>
2971
2972         PR 7470.
2973         C++ ABI change - vfunc ordering.
2974         * class.c (add_virtual_function): Remove.
2975         (dfs_modify_all_vtables): Take list of all declared
2976         virtuals. Assign all that are not in primary base.
2977         (check_for_override): Adjust comments.
2978         (create_vtable_ptr): Take single list of virtuals. Build chain
2979         of declared virtuals here.
2980         (layout_class_type): Take single list of virtuals. Adjust.
2981         (finish_struct_1): Keep virtuals on single list. Adjust.
2982
2983 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2984
2985         * init.c (build_member_call): Use build_new_method_call, not
2986         build_method_call.
2987
2988 2002-08-02  Krister Walfridsson  <cato@df.lth.se>
2989
2990         * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
2991
2992 2002-08-02  Mark Mitchell  <mark@codesourcery.com>
2993
2994         * call.c (build_method_call): Issue a more helpful error message
2995         about ambiguous method names.
2996
2997 2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2998
2999         * tree.c (build_shared_int_cst): Make cache file scope, and
3000         GTY it.
3001
3002 2002-08-02  Jason Merrill  <jason@redhat.com>
3003
3004         * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
3005         (cp_expr_size): New fn.
3006         * call.c (build_over_call): Lose empty class hackery.
3007         (convert_arg_to_ellipsis): Promote non-POD warning to error.
3008         * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
3009
3010         * semantics.c (expand_body): Do tree optimization in the function
3011         context, too.
3012
3013 2002-08-01  Neil Booth  <neil@daikokuya.co.uk>
3014
3015         * cp-tree.h: Move all warning and flag declarations to c-common.h.
3016         * decl.c: Move all warning and flag variables to c-common.c.
3017         * decl2.c: Move all warning and flag variables to c-common.c.
3018         * lex.c (flag_digraphs): Remove.
3019         (warn_traditional): Now in c-common.c.
3020
3021 2002-07-31  Mark Mitchell  <mark@codesourcery.com>
3022
3023         * call.c (build_field_call): Do not look up the field by name.
3024         (build_method_call): Simplify.
3025         (struct z_candidate): Add access_path and conversion_path.  Remove
3026         basetype_path.
3027         (convert_class_to_reference): Adjust use of
3028         add_function_candidate.
3029         (add_candidate): Add conversion_path argument.
3030         (add_function_candidate): Use it.
3031         (add_conv_dndidate): Likewise.
3032         (build_builtin_candidate): Likewise.
3033         (add_template_candidate_real): Add conversion_path argument.
3034         (add_template_conv_candidate): Likewise.
3035         (add_template_candidate): Likewise.
3036         (build_user_type_conversion_1): Use it.
3037         (build_new_function_call): Remove name lookup code.  Adjust use of
3038         add_template_candidate and add_function_candidate.
3039         (build_new_op): Likewise.
3040         (convert_like_real): Use build_special_member_call.
3041         (build_over_call): Use cand->conversion_path.
3042         (build_special_member_call): New method.
3043         (build_new_method_call): Remove name lookup code.
3044         * cp-tree.def (OFFSET_REF): Update documentation.
3045         (TEMPLATE_ID_EXPR): Likewise.
3046         * cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
3047         (BASELINK_OPTYPE): Likewise.
3048         (build_new_method_call): Adjust prototype.
3049         (build_special_member_call): New method.
3050         (build_baselink): New method.
3051         (build_offset_ref_call_from_tree): Likewise.
3052         (build_call_from_tree): Likewise.
3053         (finish_qualified_call_expr): Remove.
3054         (finish_call_expr): Adjust prototype.
3055         (build_x_function_call): Remove.
3056         * cvt.c (ocp_convert): Use build_special_member_call.
3057         * decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
3058         (build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
3059         CALL_EXPR.
3060         (build_offset_ref_call_from_tree): New function.
3061         (build_call_from_tree): Likewise.
3062         * init.c (expand_cleanup): Use build_special_member_call.
3063         (expand_default_init): Likewise.
3064         (build_member_call): Use finish_call_expr.
3065         (build_new_1): Use build_special_member_call.
3066         (push_base_cleanups): Likewise.
3067         * method.c (do_build_assign_ref): Likewise.
3068         * parse.y (template_id): Do not pass a COMPONENT_REF to
3069         lookup_template_function.
3070         (primary): Use parse_finish_call_epxr, not finish_call_expr.
3071         (parse_finish_call_expr): New function.
3072         * pt.c (lookup_template_function): Add assertions.
3073         * search.c (lookup_base): Allow T to be a binfo.
3074         (build_baselink): New function.
3075         (lookup_member): Use it.
3076         * semantics.c (finish_call_expr): Do not do name lookup.
3077         (finish_object_call_expr): Remove #if 0'd code.
3078         (finish_qualified_call_expr): Remove.
3079         * typeck.c (build_x_function_call): Remove.
3080         (build_static_case): Use build_special_member_call.
3081         * typeck2.c (build_functional_cast): Likewise.
3082
3083 2002-07-30  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
3084
3085         * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
3086
3087 2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
3088
3089         * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
3090
3091 2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
3092
3093         * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
3094         documentation.
3095
3096 2002-07-29  Alan Modra  <amodra@bigpond.net.au>
3097
3098         * cp-tree.h: Comment typo fix.
3099
3100 2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
3101
3102         * spew.c (space_for_token): Allocate zeroed memory for a new token
3103         chunk.
3104
3105 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3106
3107         * decl.c (builtin_function_1): No need to explicitly mark
3108         BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
3109
3110 2002-07-27  Roger Sayle  <roger@eyesopen.com>
3111
3112         * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
3113
3114 2002-07-26  Jason Merrill  <jason@redhat.com>
3115
3116         * call.c (build_over_call): Likewise.
3117         (cp_convert_parm_for_inlining): New fn.
3118         (convert_for_arg_passing): New fn.
3119         (convert_default_arg, build_over_call): Use it.
3120         (type_passed_as): New fn.
3121         * pt.c (tsubst_decl): Use it.
3122         * decl2.c (cp_build_parm_decl): New fn.
3123         (build_artificial_parm): Use it.
3124         (start_static_storage_duration_function): Likewise.
3125         * decl.c (start_cleanup_fn, grokdeclarater): Likewise.
3126         (grokparms): Don't mess with DECL_ARG_TYPE.
3127         * typeck.c (convert_arguments): Use convert_for_arg_passing.
3128         * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
3129         Define.
3130         * cp-tree.h: Declare new fns.
3131
3132 2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
3133
3134         * cp-tree.h (flag_operator_names): Remove.
3135         * decl2.c (flag_operator_names): Remove.
3136         (lang_f_options): Remove operator-names.
3137         * lex.c (D_OPNAME): Remove.
3138         (reswords): Remove operator names.
3139         (rid_to_yy): Remove operator names.
3140         (init_reswords): No need to handle D_OPNAME.
3141         * spew.c (read_process_identifier): There are no operator
3142         names.
3143
3144 2002-07-26  Jason Merrill  <jason@redhat.com>
3145
3146         * dump.c (cp_dump_tree): Call c_dump_tree.
3147         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3148
3149 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3150
3151         * error.c (print_whitespace): Remove.
3152         * g++spec.c (LIBUNWIND): Move.
3153         * mangle.c (mangled_position, write_signed_number): Remove.
3154
3155 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
3156
3157         * decl2.c (cxx_decode_option): Similarly.
3158
3159 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
3160
3161         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
3162         (cxx_sizeof_or_alignof_type): Take a third argument.
3163         (cxx_sizeof): Adjust definition.
3164         (cxx_alignof): Likewise.
3165         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
3166         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
3167         complaining.
3168         (c_sizeof_nowarn): Remove definition.
3169         (build_unary_op): Use cxx_sizeof_nowarn.
3170
3171 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
3172
3173         * tree.c (cp_build_qualified_type_real): When copying
3174         pointer-to-method types, unshare the record that holds
3175         the cached pointer-to-member-function type.
3176
3177 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3178
3179         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
3180
3181 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
3182
3183         Fix PR/7363:
3184         * typeck.c (cxx_sizeof_or_alignof_type): New function.
3185         (c_sizeof): Remove definition.
3186         (expr_sizeof): Use cxx_sizeof.
3187         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
3188         * decl.c (finish_destructor_body): Use cxx_sizeof.
3189         * semantics.c (finish_alignof): Likewise.
3190         (finish_alignof): Use cxx_alignof.
3191         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
3192         (cxx_sizeof_or_alignof_type): Declare.
3193         (my_friendly_assert): Move to ../c-common.h.
3194
3195 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
3196
3197         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
3198
3199 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3200
3201         PR c++/7347, c++/7348
3202         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
3203         * decl.c (make_typename_type): Use it.
3204         (make_unbound_class_template): Likewise.
3205         (lookup_name_real): Don't call type_access_control if scope is
3206         template parameter dependent.
3207         * parse.y (template_arg): Call make_unbound_class_template with
3208         tf_parsing set.
3209         (nest_name_specifier): Call make_typename_type with tf_parsing set.
3210         (typename_sub0): Likewise.
3211         (typename_sub1): Likewise.
3212         (instantiate_decl): Push class scope.
3213         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
3214         for both static variable and member function template.
3215         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
3216         and arguments.
3217         * search.c (type_access_control): Do type access for TEMPLATE_DECL
3218         too.
3219
3220 2002-07-20  Roger Sayle  <roger@eyesopen.com>
3221
3222         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
3223         test by using positive_option.  Make whitespace consistent.
3224
3225 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
3226
3227         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
3228         members with 'locus'.  Adjust use throughout.
3229         (struct feed):  Likewise.
3230         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
3231         Adjust use.
3232         (snarf_defarg): Use error(), not error_with_file_and_line().
3233
3234 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
3235
3236         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
3237         cpp_options is included.
3238
3239 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3240
3241         PR c++/2862, c++/2863
3242         * pt.c (determine_specialization): Compare the length of
3243         TYPE_ARG_TYPES.  Tidy.
3244
3245 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3246
3247         PR c++/3797
3248         * decl.c (duplicate_decls): Don't propagate inlining parameters from
3249         olddecl to newdecl when newdecl is a specialization of the
3250         instantiation olddecl.
3251
3252 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3253
3254         PR c++/4802, c++/5387
3255         * decl.c (make_typename_type): Use enforce_access.
3256
3257 2002-07-17  Scott Snyder <snyder@fnal.gov>
3258
3259         PR c++/7320
3260         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
3261
3262 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
3263
3264         * class.c (add_method): Correct handling of conversion operators.
3265
3266 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
3267
3268         PR c++/7224
3269         * class.c (add_method): Simplify.
3270
3271 2002-07-11  Jason Merrill  <jason@redhat.com>
3272
3273         PR c++/7279
3274         * tree.c (cp_copy_res_decl_for_inlining): Also copy
3275         TREE_ADDRESSABLE.
3276
3277 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
3278
3279         * pt.c (template_parm_this_level_p, push_template_decl_real):
3280         Pass depth as int pointer.
3281
3282 2002-07-11  Tim Josling  <tej@melbpc.org.au>
3283
3284         Remove front end hard coding from gengtype.c.
3285
3286         * config-lang.in (gtfiles): Add files needed for this front end.
3287
3288 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
3289
3290         * cp-tree.h (unqualified_name_lookup_error): Declare it.
3291         (begin_function_definition): Adjust prototype.
3292         * lex.c (unqualified_name_lookup_error): New function, split out
3293         from ...
3294         (do_identifier): ... here.
3295         * parse.y (parse_begin_function_definition): New function.
3296         (fn.def1): Use it.
3297         * semantics.c (begin_function_definition): Accept decl-specifiers
3298         and attributes as separate parameters.
3299
3300 2002-07-10  Jason Merrill  <jason@redhat.com>
3301
3302         PR c++/6255
3303         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
3304         modifying the old one.
3305
3306 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
3307
3308         * cp-tree.h (constructor_name_p): Declare it.
3309         (check_template_template_default_arg): Likewise.
3310         * class.c (handle_using_decl): Use constructor_name_p.
3311         * decl.c (grokdeclarator): Likewise.
3312         * decl2.c (constructor_name_p): Define it.
3313         * init.c (build_member_call): Use constructor_name_p.
3314         * parse.y (template_parm): Use check_template_template_default_arg.
3315         * pt.c (check_explicit_specialization): Use constructor_name_p.
3316         * semantics.c (check_template_template_default_arg): New function.
3317
3318 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3319
3320         * pt.c (can_complete_type_without_circularity): Add static to
3321         function definition.
3322
3323 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
3324
3325         * cp-tree.h (have_extern_spec): Declare it
3326         * decl.c (have_extern_spec): Define it.
3327         (start_decl): Eliminate use of used_extern_spec.
3328         (start_function): Likewise.
3329         * parse.y (have_extern_spec): Remove declaration.
3330         (used_extern_spec): Likewise.
3331         (frob_specs): Eliminate use of used_extern_spec.
3332         (.hush_warning): Likewise.
3333
3334 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
3335
3336         * Make-lang.in (cp/parse.o): Depend on decl.h.
3337         * cp-tree.h (do_decl_instantiation): Change prototype.
3338         * parse.y: Include decl.h.
3339         (parse_decl_instantiation): New function.
3340         (explicit_instantiation): Use it.
3341         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
3342         and DECLSPECS.
3343
3344 2002-07-07  Roger Sayle  <roger@eyesopen.com>
3345
3346         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
3347         constructor and destructor tests when passed a TEMPLATE_DECL.
3348
3349 2002-07-05  Jason Merrill  <jason@redhat.com>
3350
3351         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
3352         pointers.
3353
3354         PR optimization/7145
3355         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
3356
3357 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
3358
3359         Repair damage on weak-impared targets caused by my previous patch.
3360         * cp-tree.h (import_export_tinfo): Add parameter.
3361         * decl2.c (import_export_tinfo): Add parameter, post adjust
3362         DECL_COMDAT.
3363         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
3364         import_export_tinfo.
3365
3366 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3367
3368         PR c++/6944
3369         * init.c (build_aggr_init): Remove qualifiers of init before calling
3370         build_vec_init.
3371         (build_vec_init): Flatten multi-dimensional array during cleanup.
3372         (build_vec_delete_1): Abort if the type of each element is array.
3373
3374 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
3375
3376         * pt.c (instantiate_class_template): Fix typo.
3377
3378 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3379
3380         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
3381         by CVS conflict in my last patch.
3382
3383 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3384
3385         PR c++/6716
3386         * pt.c (can_complete_type_without_circularity): New function.
3387         (instantiate_class_template): Use it.
3388         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
3389         message due to incomplete fields.
3390
3391 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
3392
3393         PR c++/7112
3394         * mangle.c (write_expression): Add mangling for sizeof when
3395         applied to a type.
3396         * operators.def: Remove stale comment.
3397
3398 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
3399
3400         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
3401         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
3402         (tinfo_decl_type): Replace with ...
3403         (type_info_ptr_type): ... this.
3404         (import_export_tinfo): Declare.
3405         (tinfo_decl_p): Rename to ...
3406         (unemitted_tinfo_decl_p): ... this.
3407         * decl2.c (import_export_decl): Break out tinfo handling into ...
3408         (import_export_tinfo): ... here. New function.
3409         (finish_file): Adjust.
3410         * rtti.c (TINFO_REAL_NAME): New macro.
3411         (init_rtti_processing): Create the tinfo types.
3412         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
3413         (get_tinfo_decl): Adjust.
3414         (get_tinfo_ptr): New function.
3415         (get_type_id): Use it.
3416         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
3417         (ptr_initializer): Use get_tinfo_ptr.
3418         (ptm_initializer): Likewise.
3419         (synthesize_tinfo_var): Break into ...
3420         (get_pseudo_ti_init): ... this. Just create the initializer.
3421         (get_pseudo_ti_desc): .. and this.
3422         (create_real_tinfo_var): Remove.
3423         (create_pseudo_type_info): Don't create the vtable decl here.
3424         (get_vmi_pseudo_type_info): Remove.
3425         (create_tinfo_types): Adjust.
3426         (tinfo_decl_p): Rename to ...
3427         (unemitted_tinfo_decl_p): ... here. Adjust.
3428         (emit_tinfo_decl): Adjust. Create the initializer.
3429
3430 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
3431
3432         PR c++/6695
3433         * pt.c (tsubst_friend_class): Substitute into the context of the
3434         friend before using it.
3435
3436 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
3437
3438         * cp-tree.h (xref_tag): Change prototype.
3439         (handle_class_head): Likewise.
3440         (build_x_component_ref): Likewise.
3441         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
3442         (xref_tag): Take attributes as a separate parameter.
3443         (xref_tag_from_type): Adjust call to xref_tag.
3444         * decl2.c (build_expr_from_tree): Adjust call to
3445         build_x_component_ref.
3446         (handle_class_head): Take attributes as a separate parameter.
3447         * parse.y (parse_xref_tag): New function.
3448         (parse_handle_class_head): Likewise.
3449         (primary): Use parse_xref_tag.
3450         (class_head_decl): Use parse_handle_class_head.
3451         (class_head_defn): Likewise.
3452         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
3453         (build_dynamic_cast_1): Likewise.
3454         (create_pseudo_type_info): Likewise.
3455         (emit_support_tinfos): Likewise.
3456         * typeck.c (build_object_ref): Adjust call to
3457         build_x_component_ref.
3458         (build_x_component_ref): Remove protect parameter.
3459
3460 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
3461
3462         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
3463         * class.c (handle_using_decl): Likewise.
3464         (instantiate_type): Likewise.
3465         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
3466         (xref_basetypes): Change prototype.
3467         (begin_mem_initializers): New function.
3468         (get_overloaded_fn): Likewise.
3469         * decl.c (xref_basetypes): Simplify.
3470         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
3471         * init.c (build_offset_ref): Likewise.
3472         * parse.y (base_init): Use begin_mem_initializers().
3473         (structsp): Adjust call to xref_basetypes.
3474         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
3475         (instantiate_class_template): Adjust call to xref_basetypes.
3476         * semantics.c (begin_mem_initializers): New function.
3477         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
3478         (really_overlaoded_fn): Likewise.
3479         (get_overloaded_fn): New function.'
3480         (get_first_fn): USe BASELINK_FUNCTIONS.
3481
3482 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
3483
3484         * cp-tree.h (SCALAR_TYPE_P): New macro.
3485         (check_for_out_of_scope_variable): New function.
3486         (at_class_scope_p): Likewise.
3487         (finish_fname): Likewise.
3488         * class.c (finish_struct): Use at_function_scope_p.
3489         * decl.c (check_for_out_of_scope_variable): New function, split
3490         out from do_identifier.
3491         (finish_enum): Use at_function_scope_p.
3492         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
3493         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
3494         (primary): Use at_function_scope_p.
3495         * search.c (at_class_scope_p): New function.
3496         * semantics.c (finish_fname): Likewise.
3497         (check_multiple_declarators): Use at_function_scope_p.
3498
3499 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
3500
3501         * parse.y (parse_scoped_id): New function.
3502         (primary): Use it.
3503         * cp-tree.h (do_scoped_id): Adjust declaration.
3504         * lex.c (do_scoped_id): Remove call to yylex.
3505         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
3506         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
3507         expanding it inline.
3508
3509 2002-06-23  Matt Thomas  <matt@3am-software.com>
3510
3511         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
3512         "#if VMS_TARGET".
3513
3514 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3515
3516         * mangle.c (integer_type_codes): Const-ify.
3517
3518 2002-06-20  Richard Henderson  <rth@redhat.com>
3519
3520         PR c++/6747
3521         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
3522         Call put_var_into_stack.
3523
3524 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3525
3526         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
3527         array size calculation.
3528
3529 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3530
3531         PR c++/6892
3532         * pt.c (tsubst_expr): Handle FILE_STMT.
3533
3534 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3535
3536         PR c++/6723
3537         * pt.c (lookup_template_class): Don't build complete argument of
3538         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
3539         argument.
3540
3541 2002-06-19  Akim Demaille  <akim@epita.fr>
3542
3543         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
3544         decl.h's TYPENAME.
3545         * spew.c, lex.c: Adjust.
3546         * parse.y (explicit_instantiation): Add empty action to override
3547         the default $$ = $1 where it introduces a type clash.
3548
3549 2002-06-14  Jason Merrill  <jason@redhat.com>
3550
3551         * semantics.c (begin_for_stmt): Push the 'for' scope before
3552         adding the FOR_STMT.
3553
3554         C++ ABI changes.
3555         * class.c (build_base_field): Set DECL_PACKED.
3556         (layout_class_type): Don't use tail padding of PODs.
3557         * mangle.c (write_unqualified_name): Fix template conversion op
3558         mangling.
3559
3560 2002-06-16  Richard Henderson  <rth@redhat.com>
3561
3562         PR opt/6793
3563         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
3564         after template instantiation.
3565
3566 2002-06-16  Richard Henderson  <rth@redhat.com>
3567
3568         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
3569
3570 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
3571
3572         * cp-tree.h (compiler_error): Remove declaration.
3573         * lex.c (compiler_error): Remove definition.
3574
3575 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
3576
3577         * g++spec.c (LIBUNWIND): New.
3578         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
3579
3580 2002-06-13  Jessica Han  <jessica@cup.hp.com>
3581
3582         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
3583         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
3584         (build_vbase_offset_vtbl_entries): Likewise.
3585         * rtti.c (build_headof): Likewise.
3586         (get_tinfo_decl_dynamic): Likewise.
3587         (create_pseudo_type_info): Likewise.
3588
3589 2002-06-12  Stan Shebs  <shebs@apple.com>
3590
3591         * mpw-config.in: Remove file, no longer used.
3592         * mpw-make.sed: Ditto.
3593
3594 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
3595
3596         * decl2.c: Update call to cpp_handle_option.
3597
3598 2002-06-07  H.J. Lu  (hjl@gnu.org)
3599
3600         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
3601
3602 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
3603
3604         * error.c (cp_error_at): Fix typo.
3605
3606 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
3607
3608         * error.c (cp_diagnostic_starter): Adjust call.
3609         (maybe_print_instantiation_context): Change prototype to take a
3610         'diagnostic_info *'.
3611         (print_instantiation_full_context): Likewise.
3612         (print_instantiation_partial_context): Likewise.
3613         (cp_diagnostic_starter): Likewise.
3614         (cp_diagnostic_finalizer): Likewise.
3615         (cp_print_error_function): Likewise.
3616         (cp_printer): Take a secondary parameter as a 'text_info *'.
3617         Remove output_state savings.  Adjust calls.
3618
3619 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
3620
3621         * pt.c (inline_parm_levels): Mark for GC.
3622
3623         * mangle.c (start_mangling): Allocate G.substitutions here...
3624         (init_mangle): ... rather than here.
3625         (finish_mangling): Clear the varray pointer when done with it.
3626         * spew.c (yylexstring): Don't use VARRAY_FREE.
3627         * search.c (bfs_walk): Don't use VARRAY_FREE.
3628         * decl2.c (pending_statics): Use gengtype to mark.
3629         (deferred_fns): Likewise.
3630         (ssdf_decls): Likewise.
3631         (init_decl2): Delete.
3632         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
3633         (cxx_init_decl_processing): Don't call init_decl2.
3634         (cxx_pop_function_context): Don't use VARRAY_FREE.
3635         * cp-tree.h (struct saved_scope): No need for special marking
3636         of varrays.
3637         (struct language_function): Likewise.
3638         (local_classes): Use gengtype to mark.
3639         (init_decl2): Delete prototype.
3640         * class.c (init_class_processing): Don't use
3641         ggc_add_tree_varray_root.
3642         (build_vtbl_initializer): Don't use VARRAY_FREE.
3643
3644         * decl.c (typename_compare): Don't use same_type_p.
3645
3646         * decl.c: Include hashtab.h instead of hash.h.
3647         (typename_hash): Update to use htab_h.
3648         (typename_compare): Likewise.
3649         (typename_htab): Use gengtype to mark.
3650         (build_typename_type): Update to use htab_h.
3651         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
3652
3653         * Make-lang.in (gt-cp-tree.h): New rule.
3654         (cp/tree.o): Depend on gt-cp-tree.h.
3655         * config-lang.in (gtfiles): Add cp/tree.c.
3656         * tree.c: Include gt-cp-tree.h.
3657         (list_hash_table): Use gengtype to mark.
3658         (init_tree): Use gengtype to mark trees.
3659
3660         * Make-lang.in (cp/decl.o): Add debug.h dependency.
3661         * call.c (struct z_candidate): Use gengtype.
3662         (USER_CONV_CAND): Use WRAPPER_ZC.
3663         (convert_class_to_reference): Use build_zc_wrapper.
3664         (build_type_conversion_1): Likewise.
3665         (build_over_call): Use WRAPPER_ZC.
3666         (add_warning): Use build_zc_wrapper.
3667         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
3668         * cp-tree.h (struct lang_identifier): Use gengtype.
3669         (struct template_parm_index_s): Likewise.
3670         (struct ptrmem_cst): Likewise.
3671         (struct tree_binding): Likewise.
3672         (struct tree_overload): Likewise.
3673         (struct tree_srcloc): Likewise.
3674         (struct tree_wrapper): Likewise.  Also modify to have a pointer
3675         to struct z_candidate rather than void.
3676         (enum cp_tree_node_structure_enum): New.
3677         (union lang_tree_node): New.
3678         (cxx_mark_tree): Delete prototype.
3679         (cp_tree_node_structure): New prototype.
3680         (build_ptr_wrapper): Delete prototype.
3681         (build_int_wrapper): Delete prototype.
3682         (build_zc_wrapper): New prototype.
3683         * decl.c: Include debug.h
3684         (cxx_mark_tree): Delete.
3685         (cp_tree_node_structure): New.
3686         * tree.c (build_ptr_wrapper): Delete.
3687         (build_int_wrapper): Delete.
3688         (build_zc_wrapper): New.
3689
3690         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
3691         Correct typo.  Patch from k_fukui@highway.ne.jp.
3692
3693         * semantics.c (current_stmt_tree): Update for change to
3694         struct language_function.
3695         (finish_mem_initializers): Likewise.
3696         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
3697         * cp-tree.h (struct language_function): Rename from
3698         cp_language_function.  Change all uses.
3699         (cp_function_chain): Don't need to cast.
3700
3701         * class.c (duplicate_tag_error): Reset discriminator.
3702         (check_bases_and_members): Update for data structure changes.
3703         * cp-tree.h (struct lang_id2): Use gengtype.
3704         (flagged_type_tree): Likewise.
3705         (SET_LANG_ID): Use GGC on struct lang_id2.
3706         (struct cp_language_function): Use gengtype.  Remove field
3707         'x_vcalls_possible_p'.
3708         (current_vcalls_possible_p): Delete.
3709         (struct lang_type_header): New.
3710         (struct lang_type_class): Rename from struct lang_type.  Include
3711         struct lang_type_header.
3712         (struct lang_type_ptrmem): New.
3713         (struct lang_type): New.
3714         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
3715         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
3716         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
3717         (struct lang_decl_flags): Use gengtype.  Add discriminators.
3718         (struct lang_decl): Use gengtype.  Add and use discriminators.
3719         Update the macros that reference moved fields.
3720         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
3721         (SET_DECL_THUNK_P): Set discriminator too.
3722         (clear_inline_text_obstack): Delete prototype.
3723         (finish_inline_definitions): Delete prototype.
3724         (mark_pending_inlines): Delete prototype.
3725         (lang_check_failed): New prototype.
3726         * decl.c (struct named_label_use_list): Use gengtype.
3727         (struct named_label_list): Likewise.
3728         (mark_binding_level): Delete.
3729         (mark_named_label_lists): Delete.
3730         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
3731         (cxx_init_decl_processing): Use generated marker routine.
3732         (begin_destructor_body): Delete dead set to
3733         current_vcalls_possible_p.
3734         (mark_lang_function): Delete.
3735         (mark_cp_function_context): Delete.
3736         (lang_mark_tree): Use generated marker routines.
3737         * decl2.c (start_objects): Set discriminator when setting
3738         GLOBAL_INIT_PRIORITY.
3739         * lex.c (retrofit_lang_decl): Set discriminators.
3740         (copy_lang_type): Update for changes to lang_type structure.
3741         (cp_make_lang_type): Set discriminator.
3742         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
3743         * search.c: Include ggc.h.
3744         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
3745         (finish_inline_definitions): Delete.
3746         * spew.c (struct token): Use gengtype.
3747         (struct token_chunk): New.
3748         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
3749         (struct feed): Use gengtype.
3750         (feed_obstack): Delete.
3751         (feed): Mark as GC root.
3752         (pending_inlines): Mark as GC root.
3753         (pending_inlines_tail): Likewise.
3754         (processing_these_inlines): Likewise.
3755         (token_obstack): Make static.
3756         (first_token): Likewise.
3757         (init_spew): Don't initialize deleted things; use gengtype for roots.
3758         (clear_inline_text_obstack): Delete.
3759         (feed_input): Use GC for struct feed.  Update for changes to
3760         struct unparsed_text.
3761         (mark_pending_inlines): Delete.
3762         (next_token): Rename from add_token.  Change all callers.  Update
3763         for changes to struct unparsed_text.
3764         (space_for_token): New.
3765         (remove_last_token): New.
3766         (alloc_unparsed_text): New.
3767         (snarf_block): Take an unparsed_text.  Update for changes to struct
3768         unparsed_text.
3769         (snarf_method): Update for changes to struct unparsed_text.
3770         (snarf_defarg): Update for changes to struct unparsed_text.
3771         * tree.c (lang_check_failed): New.
3772
3773         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
3774         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
3775         (cp/spew.o): Add dependency on gt-<filename>.h.
3776         (cp/decl2.o): Add dependency on gt-<filename>.h.
3777         (cp/call.o): Add dependency on gt-<filename>.h.
3778         (cp/pt.o): Add dependency on gt-<filename>.h.
3779         (cp/repo.o): Add dependency on gt-<filename>.h.
3780         (cp/parse.o): Add dependency on gt-<filename>.h.
3781         * call.c: Use gengtype for roots.
3782         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
3783         decl2.c parse.y pt.c repo.c spew.c.
3784         * cp-tree.h: Use gengtype for roots.
3785         (struct saved_scope): Use GGC, gengtype.
3786         (cp_parse_init): Delete prototype.
3787         (init_pt): Delete prototype.
3788         * decl.c: Use gengtype for roots.
3789         (mark_saved_scope): Delete.
3790         (cxx_init_decl_processing): Don't call deleted initilisation
3791         routines.
3792         (signed_size_zero_node): Delete, unused.
3793         * decl.h: Use gengtype for roots.
3794         * decl2.c: Use gengtype for roots.
3795         * lex.h: Use gengtype for roots.
3796         * parse.y: Use gengtype for roots.
3797         (cp_parse_init): Delete.
3798         * pt.c: Use gengtype for roots.
3799         (init_pt): Delete.
3800         * repo.c: Use gengtype for roots.
3801         * spew.c: Use gengtype for roots.
3802
3803         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
3804         (cp/decl.o): Add dependency on gtype-cp.h.
3805         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
3806         Include gtype-cp.h.  Allow for filename changes.
3807
3808         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
3809         (cp/decl.o): Add cp/gt-decl.h dependency.
3810         * config-lang.in (gtfiles): New.
3811         * tree.h: Rename struct binding_level to struct cp_binding_level.
3812         * decl.c: Rename struct binding_level to struct cp_binding_level.
3813         Include cp/gt-decl.h.
3814         (struct cp_binding_level): Use gengtype.
3815         (make_binding_level): Use GGC on struct cp_binding_level.
3816         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
3817         (cxx_init_decl_processing): Mark free_binding_level as
3818         deletable.
3819
3820         * decl.c (mark_cp_function_context): Update calling sequence.
3821
3822         * decl.c (start_function): Don't free 'struct
3823         cp_language_function'.
3824         (pop_cp_function_context): Likewise.
3825         (save_function_data): Allocate it using GC.
3826         * semantics.c (genrtl_start_function): Don't free 'struct
3827         cp_language_function'.
3828
3829 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
3830
3831         * lang-specs.h: Use cpp_debug_options.
3832
3833 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
3834
3835         * mangle.c, tree.c: Include real.h.
3836         * Make-lang.in: Update dependency lists.
3837
3838 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
3839
3840         * lex.c: Don't include c-lex.h.
3841         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
3842
3843 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
3844
3845         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
3846
3847 2002-05-22  Richard Henderson  <rth@redhat.com>
3848
3849         * decl.c (obscure_complex_init): Check for VAR_DECL
3850         before using DECL_THREAD_LOCAL.
3851
3852 2002-05-22  Richard Henderson  <rth@redhat.com>
3853
3854         * decl.c (check_tag_decl): Handle RID_THREAD.
3855         (obscure_complex_init): Reject run-time init of tls.
3856         (grokvardecl, grokdeclarator): Handle RID_THREAD.
3857         * lex.c (reswords): Add __thread.
3858         (rid_to_yy): Map RID_THREAD to SCSPEC.
3859
3860 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
3861
3862         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
3863         * cp-tree.h (cxx_post_options): Kill.
3864         * cp-lex.c (cxx_post_options): Kill.
3865
3866 2002-05-21  Richard Henderson  <rth@redhat.com>
3867
3868         * lex.c (rid_to_yy): Add RID_THREAD.
3869
3870 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
3871
3872         * init.c (build_vec_init): Test for trivial copy-assignment when
3873         copy-assigning arrays.
3874
3875 2002-05-20  Andreas Jaeger  <aj@suse.de>
3876
3877         * init.c (build_default_init): Remove unused variable.
3878
3879 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
3880
3881         * call.c (any_strictly_viable): New.
3882         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
3883
3884 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3885
3886         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
3887
3888 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3889
3890         PR c++/186, DR 259
3891         * pt.c (do_decl_instantiation): Don't complain explicit
3892         instantiation after explicit specialization.
3893         (do_type_instantiation): Likewise.
3894
3895 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
3896
3897         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
3898         renamed from...
3899         (complete_type_or_else): ... this.  Redefined as macro.
3900         (cxx_incomplete_type_diagnostic): Declare.
3901         (cxx_incomplete_type_error): Define as macro.
3902         * init.c (build_delete): Warn about incomplete types other than
3903         void, and use the built-in operator delete for them.
3904         * typeck.c (complete_type_or_diagnostic): Renamed from
3905         complete_type_or_else.  Added warn_only argument, passed to...
3906         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
3907         warnings or errors depending on new warn_only argument.  Renamed
3908         from...
3909         (cxx_incomplete_type_error): ... this.  New implementation in
3910         terms of cxx_incomplete_type_diagnostic.
3911
3912 2002-05-18  Jason Merrill  <jason@redhat.com>
3913
3914         PR c++/6611
3915         * decl2.c (import_export_decl): If we clear
3916         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
3917
3918 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3919
3920         PR c++/6620
3921         * pt.c (verify_class_unification): Don't check if PARM is template
3922         parameter dependent.  Simplify.
3923         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
3924         parameter dependent expression.
3925
3926 2002-05-14  Jason Merrill  <jason@redhat.com>
3927
3928         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
3929         Do set DECL_COMDAT.
3930         (synthesize_tinfo_var): Take the public decl.
3931         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
3932         (emit_tinfo_decl): Adjust.  Call import_export_decl.
3933         * decl2.c (import_export_decl): Simplify tinfo decl handling.
3934
3935 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
3936
3937         * cp-tree.h (struct lang_type): Added non_zero_init.
3938         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
3939         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
3940         * class.c (check_field_decls): Test non_zero_init.
3941         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
3942         zero-to-NULL conversions.
3943         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
3944         type that needs zero-initialization without zeros.
3945         (check_initializer_decl): Compute zero-initializer for types
3946         that require a non-trivial one.
3947         * init.c (build_forced_zero_init): New function.
3948         (build_default_init): Use it.
3949         * tree.c (zero_init_p): New function.
3950         * typeck2.c (force_store_init_value): New function.
3951         (process_init_constructor): Create non-trivial zero-initializers
3952         for array members and class fields.
3953
3954 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
3955
3956         * lang-specs.h: Remove redundant -lang-c++.
3957
3958 2002-05-13  Jason Merrill  <jason@redhat.com>
3959
3960         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
3961         (fixed_type_or_null): See through reference vars.
3962         (build_base_path): Vtable contents are constant.
3963         * typeck.c (get_member_function_from_ptrfunc): Likewise.
3964
3965 2002-05-12  Jason Merrill  <jason@redhat.com>
3966
3967         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
3968         structs are safe.
3969
3970 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
3971
3972         * cp-tree.h (flag_ansi): Remove.
3973         * decl2.c (flag_ansi): Remove.
3974         (cxx_decode_option): Set flag_iso and flag_undef.
3975
3976 2002-05-09  Jason Merrill  <jason@redhat.com>
3977
3978         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
3979         Use subtraction rather than a bitmask to get the index.
3980         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
3981
3982         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
3983
3984 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
3985
3986         * Make-lang.in (decl2.o): Update.
3987         * cp-tree.h (warn_multichar): Remove.
3988         * decl2.c: Include c-common.h.
3989         (warn_multichar): Remove.
3990
3991 2002-05-03  Jason Merrill  <jason@redhat.com>
3992
3993         * tree.c (build_cplus_array_type): Only const and volatile get
3994         special handling.
3995
3996         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
3997
3998 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
3999
4000         ABI change, returning simple classes from functions.
4001         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
4002         TYPE_HAS_TRIVIAL_INIT_REF is false or
4003         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
4004
4005 2002-04-30  Jason Merrill  <jason@redhat.com>
4006
4007         PR debug/6436
4008         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
4009         anonymous class with a typedef if there are attributes.
4010
4011 2002-04-29  Paul Eggert  <eggert@twinsun.com>
4012
4013         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
4014
4015 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
4016
4017         PR c++/6477
4018         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
4019         non-NULL first.
4020
4021 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
4022
4023         PR c++/6492
4024         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
4025         enter that scope before name lookup.
4026
4027         PR c++/6486
4028         * method.c (do_build_copy_constructor): Avoid building
4029         cv-qualified reference types.
4030
4031 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
4032
4033         PR c++/5719
4034         * decl.c (grok_op_properties): Assignment ops don't have to return
4035         by value. operator% should.
4036
4037 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
4038
4039         PR c/6343
4040         * decl.c (duplicate_decls): Call merge_weak.
4041
4042 2002-04-26  Richard Henderson  <rth@redhat.com>
4043
4044         * parse.y (malloced_yyss, malloced_yyvs): New.
4045         (yyoverflow): Re-add.  Set them.
4046         (free_parser_stacks): New.
4047
4048 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
4049
4050         PR c++/6497
4051         * method.c (do_build_assign_ref): Pass a derivation to
4052         build_method_call when calling base class assignment operators.
4053
4054 2002-04-26  Richard Henderson  <rth@redhat.com>
4055
4056         * parse.y (yyoverflow): Revert.
4057
4058 2002-04-26  Richard Henderson  <rth@redhat.com>
4059
4060         PR c/3581
4061         * parse.y (string): Remove.  Update all uses to use STRING
4062         instead, and not call combine_strings.
4063         * rtti.c (tinfo_name): Use fix_string_type.
4064         * semantics.c (finish_asm_stmt): Don't call combine_strings.
4065         * spew.c (yylexstring): New.
4066         (read_token): Use it.
4067
4068 2002-04-25  Richard Henderson  <rth@redhat.com>
4069
4070         PR c/2161
4071         * parse.y (yyoverflow): New.
4072
4073 2002-04-25  Jason Merrill  <jason@redhat.com>
4074
4075         PR c++/5607
4076         * search.c (check_final_overrider): No longer static.
4077         * class.c (update_vtable_entry_for_fn): Call it.
4078         * cp-tree.h: Adjust.
4079
4080 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4081
4082         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
4083         * cp-tree.h (cxx_set_yydebug): Die.
4084         * lex.c (YYDEBUG): Get from c-lex.h.
4085         (cxx_set_yydebug): Remove.
4086         * parse.y: Include c-lex.h.
4087         (YYDEBUG): Get from c-lex.h.
4088
4089 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
4090
4091         PR c++/6438.
4092         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
4093         void.
4094
4095 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4096
4097         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
4098         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
4099         Redefine.
4100         * cp-tree.h (cp_attribute_table): Rename.
4101         * decl.c (lang_attribute_table): Remove declaration.
4102         (cxx_init_decl_processing): Don't set it.
4103         * tree.c (cp_attribute_table): Rename.
4104
4105 2002-04-24  Jason Merrill  <jason@redhat.com>
4106
4107         PR c++/6331
4108         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
4109         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
4110         The pedwarn for array assignment is now unconditional.
4111         * tree.c (build_cplus_array_type_1): Still process simple array types
4112         normally in templates.
4113
4114         PR c++/6395
4115         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
4116         stuff for comdats.
4117
4118 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
4119
4120         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
4121         node with attributes.
4122
4123 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
4124
4125         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
4126         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
4127
4128 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
4129
4130         PR c++/6256:
4131         * pt.c (tsubst_friend_class): Handle templates with explicit
4132         nested names.
4133
4134         PR c++/6331:
4135         * typeck.c (merge_types): Remember the cv-qualification of pointer
4136         types when merging them.
4137
4138 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4139
4140         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
4141         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
4142         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
4143         cxx_mark_function_context): New.
4144         * decl.c (push_cp_function_context, pop_cp_function_context,
4145         mark_cp_function_context): Rename for consistency.
4146         (cxx_init_decl_processing): Don't set old hooks.
4147
4148 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
4149
4150         * call.c (convert_type_from_ellipsis): Rename, update.
4151         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
4152         * cp-tree.h (convert_type_from_ellipsis): Rename.
4153         * decl.c (cxx_init_decl_processing): Don't set hook.
4154
4155 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
4156
4157         * call.c (build_new_method_call): Update.
4158         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
4159         * cp-tree.h (cxx_incomplete_type_error): New.
4160         * decl.c (grokdeclarator, grokparms): Update.
4161         * decl2.c (check_classfn): Update.
4162         * pt.c (tsubst): Update.
4163         * typeck.c (complete_type_or_else, expr_sizeof,
4164         decay_conversion): Update.
4165         * typeck2.c (incomplete_type_error): Rename.
4166         (add_exception_specifier): Update.
4167
4168 2002-04-18  Jason Merrill  <jason@redhat.com>
4169
4170         PR c++/5658
4171         * search.c (setup_class_bindings): A class template qualifies as a
4172         type binding.
4173
4174 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
4175
4176         PR c++/6316
4177         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
4178         before expanding.
4179
4180 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
4181
4182         * init.c (begin_init_stmts): Remove commented out code.
4183         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
4184         * semantics.c (begin_gobal_stmt_expr): Adjust call to
4185         expand_start_stmt_expr.
4186
4187 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
4188
4189         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
4190         dso_handle itself, to __cxa_atexit.
4191
4192 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4193
4194         * error.c (cxx_print_error_function): Adjust call to macros.
4195
4196 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
4197
4198         * class.c (layout_virtual_bases): Do all dsize computation on trees.
4199
4200 2002-04-14  Jason Merrill  <jason@redhat.com>
4201
4202         * typeck.c (get_member_function_from_ptrfunc): Don't do
4203         gratuitious division and multiplication on
4204         ptrmemfunc_vbit_in_delta targets.
4205
4206 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4207
4208         PR c++/5373.
4209         * semantics.c (finish_expr_stmt): Remember the type of the
4210         expression before any conversions are performed.
4211
4212 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4213
4214         PR c++/5189.
4215         * call.c (add_template_candidate_real): Do not treat member
4216         templates as copy constructors.
4217
4218 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
4219
4220         * decl.c (duplicate_decls): Do not copy the RTL for a variable
4221         declaration if the old variable had an incomplete type and the new
4222         variable does not.
4223         (complete_vars): Do not call layout_decl for completed variables.
4224
4225 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
4226
4227         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
4228         with an explicit one.
4229         (follow_tag_typedef): New.
4230         (lookup_tag): Use it to extract the tag of an explicit typedef.
4231         (xref_tag): Likewise.
4232
4233 2002-04-11  Andrew Haley  <aph@redhat.com>
4234
4235         * typeck.c (type_after_usual_arithmetic_conversions):
4236         If two types have the same variant, return immediately.
4237         When two floating-point operands are the same precision:
4238           convert to float if one of the operands is float;
4239           if neither operand is one of the standard types, return the type
4240           of the first operand.
4241
4242 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
4243
4244         PR c++/5507
4245         * decl.c (make_typename_type): Remove implicit typenameness.
4246
4247 2002-04-09  Jason Merrill  <jason@redhat.com>
4248
4249         PR optimization/6189
4250         * semantics.c (genrtl_start_function): Don't free
4251         DECL_SAVED_FUNCTION_DATA for inline functions.
4252
4253         * init.c (build_member_call): For now, don't convert to
4254         intermediate base if it would cause an error.
4255
4256 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
4257
4258         * parse.y (namespace_qualifier, maybe_identifier,
4259         begin_explicit_instantiation, end_explicit_instantiation,
4260         apparent_template_type, .finish_template_type,
4261         do_id, maybe_init, defarg_again, component_decl_1):
4262         Add ending ';', in accordance with POSIX.
4263
4264 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
4265
4266         PR c++/5571
4267         * class.c (layout_class_type): Remember incomplete static
4268         variables.
4269         (finish_struct_1): Call complete_vars, not
4270         hack_incomplete_structures.
4271         * cp-tree.h (hack_incomplete_structures): Rename to ...
4272         (complete_vars): ... this.
4273         (struct saved_scope): Remove incomplete.
4274         (namespace_scope_incomplete): Remove.
4275         * decl.c (struct binding_level): Remove incomplete.
4276         (incomplete_vars): New variable.
4277         (mark_binding_level): Don't mark incomplete.
4278         (print_binding_level): Don't print it.
4279         (mark_saved_scope): Don't mark incomplete.
4280         (pushdecl): Use maybe_register_incopmlete_var.
4281         (cxx_init_decl_processing): Register incomplete_vars for GC.
4282         (start_decl_1): Clarify error message.
4283         (hack_incomplete_vars): Remove.
4284         (maybe_register_incomplete_var): New function.
4285         (complete_vars): Likewise.
4286
4287 2002-04-06  Jason Merrill  <jason@redhat.com>
4288
4289         PR c++/4934
4290         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
4291         set before checking it.
4292
4293         PR c++/525
4294         * init.c (build_member_call): Use build_scoped_ref.
4295         (resolve_offset_ref): Likewise.
4296         * call.c (build_scoped_method_call): Likewise.
4297         * tree.c (maybe_dummy_object): Kludge around current_class_type being
4298         wrong.
4299         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
4300         * cp-tree.h: Adjust.
4301
4302         * init.c (push_base_cleanups): Just use build_scoped_method_call.
4303
4304         PR c++/6179
4305         * method.c (implicitly_declare_fn): Pass unqualified type to
4306         synthesize_exception_spec.
4307
4308 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
4309
4310         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
4311         * cvt.c: Update comment.
4312         * init.c (expand_cleanup_for_base): Update.
4313         * semantics.c (finish_parenthesized_expr): Update.
4314         * typeck.c (cp_truthvalue_conversion): Update.
4315
4316 2002-04-04  Jason Merrill  <jason@redhat.com>
4317
4318         * semantics.c (finish_eh_cleanup): New fn.
4319         * cp-tree.h: Add prototype.
4320         * init.c (perform_member_init, expand_cleanup_for_base): Use
4321         finish_eh_cleanup.
4322         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
4323         * cp-tree.h: Remove references.
4324         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
4325         * dump.c (cp_dump_tree): Likewise.
4326         * pt.c (tsubst_expr): Likewise.
4327         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
4328         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
4329         * tree.c (cp_statement_code_p): Likewise.
4330
4331         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
4332
4333         PR c++/5636
4334         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
4335         cleanup for nrv.
4336
4337         PR c++/5104
4338         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
4339         specifiers.
4340         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
4341
4342 2002-04-03  Richard Henderson  <rth@redhat.com>
4343
4344         * cp-lang.c (cxx_warn_unused_global_decl): New.
4345         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
4346
4347 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
4348
4349         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
4350         * tree.c (init_tree): Don't set hook.
4351
4352 2002-04-03  Roger Sayle  <roger@eyesopen.com>
4353
4354         PR c++/5998:
4355         * decl.c (duplicate_decls): Don't mess with assembler names when
4356         redeclaring builtin functions as static.
4357
4358 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4359
4360         * call.c (build_addr_func): Update.
4361         * class.c (resolve_address_of_overloaded_function): Update.
4362         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
4363         * cp-tree.h (cxx_mark_addressable): New.
4364         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
4365         * decl2.c (build_cleanup): Update.
4366         * except.c (build_throw): Update.
4367         * init.c (resolve_offset_ref): Update.
4368         * pt.c (convert_nontype_argument): Update.
4369         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
4370         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
4371         unary_complex_lvalue): Update.
4372         (mark_addressable): Rename.
4373
4374 2002-04-01  Roger Sayle  <roger@eyesopen.com>
4375
4376         PR c++/5998:
4377         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
4378         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
4379         but follow the SET_DECL_RTL idiom used elsewhere in the function.
4380
4381 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
4382
4383         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
4384         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
4385         * decl.c (grokdeclarator): Update.
4386         * mangle.c (write_integer_cst): Update.
4387         * typeck.c (build_binary_op): Update.
4388
4389 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4390
4391         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
4392         * lex.c (cxx_init): Don't set hook.
4393
4394 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
4395
4396         * Make-lang.in (error.o): Update.
4397         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
4398         * cp-tree.h (struct diagnostic_context): Predeclare.
4399         (cxx_print_error_function): New.
4400         * error.c: Include langhooks-def.h.
4401         (lang_print_error_function): Rename.  Update.
4402         (init_error): Don't set hook.
4403
4404 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4405
4406         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
4407         Redefine.
4408         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
4409         * decl.c (finish_enum): Similarly.
4410         * error.c (dump_type): Similarly.
4411         * lex.c (cxx_init): Similarly.
4412         * mangle.c (write_builtin_type): Similarly.
4413         * typeck.c (comptypes): Similarly.
4414
4415 2002-03-28  Roger Sayle  <roger@eyesopen.com>
4416
4417         PR c++/5998:
4418         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
4419         in the g++ front-end.
4420         (duplicate_decl): Allow redefinition of anticipated built-ins.
4421         Fix inlining problem by over-writing the old DECL_RTL.
4422         (lookup_namespace_name): Fail to find an identifier in the
4423         specified namespace if its still anticipated.
4424         (builtin_function_1): New function split out from builtin_function
4425         to create a builtin in the current namespace with given context.
4426         (builtin_function): Call builtin_function_1 to define the
4427         appropriate builtins in both the std and global namespaces.
4428         (select_decl): Don't test for anticipated decls here.
4429         (unqualified_namespace_lookup): Instead ignore them whilst
4430         searching through scopes and namespaces.
4431         * decl2.c (do_nonmember_using_decl): If a using declaration
4432         specifies an anticipated built-in function, mark it as no longer
4433         anticipated in that scope.
4434         (ambiguous_decl):  Avoid resolving to an anticipated decl.
4435         * lex.c (do_scoped_id): Fail to find an identifier in the global
4436         namespace if its still anticipated.
4437
4438 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
4439
4440         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
4441         * cp-tree.h (cp_make_lang_type): Rename.
4442         * lex.c (cp_make_lang_type): Rename.
4443         (make_aggr_type): Update.
4444         * tree.c (init_tree): Don't set make_lang_type_fn.
4445
4446 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
4447
4448         PR c++/6073
4449         * class.c (finish_struct_1): Update static field's DECL_MODE even
4450         if its type is a variant of t.
4451
4452 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4453
4454         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
4455         * cp-tree.h (cxx_insert_default_attributes): New.
4456         * decl.c (insert_default_attributes): Rename.
4457
4458 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
4459
4460         PR c++/4884
4461         * call.c (build_op_delete_call): Allow for the fact the placement
4462         may be a COMPOUND_EXPR.
4463
4464 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
4465
4466         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
4467         * cp-tree.h (init_cplus_expand): Remove.
4468         (cxx_expand_expr): New.
4469         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
4470         fix prototype.
4471         (init_cplus_expand): Remove.
4472         * lex.c (cxx_init): Don't call init_cplus_expand.
4473
4474 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
4475
4476         PR c++/4884.
4477         * init.c (build_new_1): Allow for the fact the result of
4478         build_function_call may be a COMPOUND_EXPR.
4479
4480 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
4481
4482         PR c++/5682
4483         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
4484         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4485         (dfs_skip_nonprimary_vbases_markedp): Remove.
4486         * search.c (get_shared_vbase_if_not_primary): Remove.
4487         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
4488         (dfs_skip_nonprimary_vbases_markedp): Remove.
4489         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
4490         (dfs_marked_real_bases_queue_p): Likewise.
4491
4492 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
4493
4494         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
4495         * cp-tree.h (cxx_mark_tree): New.
4496         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
4497
4498 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
4499
4500         * cp-tree.h (cxx_maybe_build_cleanup): New.
4501         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
4502         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
4503         * tree.c (build_target_expr): Update.
4504         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
4505
4506 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
4507
4508         * decl2.c (cxx_decode_option): Handle -E.
4509         * lang-specs.h (default_compilers): Preprocess with cc1plus.
4510         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
4511
4512 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
4513
4514         PR c++/6037
4515         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
4516
4517 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4518
4519         * error.c (dump_type): Be careful about implicit typenames.
4520
4521 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4522
4523         PR C++/3656
4524         * semantics.c (finish_base_specifier): Handle erronous base
4525         classes.
4526
4527 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
4528
4529         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
4530         REAL_IS_NOT_DOUBLE.
4531
4532 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
4533
4534         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
4535         an index into the vtable_entry array regardless of
4536         TARGET_PTRMEMFUNC_VBIT_LOCATION.
4537
4538 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
4539
4540         * tree.c (cp_cannot_inline_tree_fn): Same.
4541
4542 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
4543
4544         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
4545         insert_block, getdecls, global_bindings_p): New.
4546
4547 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
4548
4549         PR c++/4361
4550         * mangle.c (struct globals) Add internal_mangling_p member.
4551         (write_template_param): Do internal mangling, if needed.
4552         (mangle_conv_op_name_for_type): Request internal mangling.
4553
4554 2002-03-20  Jason Merrill  <jason@redhat.com>
4555
4556         PR c++/2136
4557         * init.c (build_delete): Check access for a member op delete here.
4558         * decl2.c (delete_sanity): Not here.
4559
4560 2002-03-19  Jason Merrill  <jason@redhat.com>
4561
4562         PR c++/5118
4563         * class.c (get_vfield_name): Use the constructor_name.
4564
4565 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4566
4567         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
4568         * cp-tree.h (lang_printable_name): Rename.
4569         * error.c (lang_decl_name): Use new hook.
4570         * lex.c (cxx_init): Remove old hook.
4571         * pt.c (tsubst_decl): Use new hook.
4572         * tree.c (lang_printable_name): Rename.
4573
4574 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
4575
4576         PR c++/3882
4577         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
4578         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
4579         only after recording the declaration.
4580
4581 2002-03-18  Jason Merrill  <jason@redhat.com>
4582
4583         PR c++/2039
4584         * init.c (resolve_offset_ref): Hand off to build_component_ref.
4585
4586         PR c++/4222, c++/5995
4587         * call.c (build_over_call): Fix empty class logic.
4588
4589         PR c++/3870
4590         * cp-tree.h (struct saved_scope): Add last_parms field.
4591         * decl.c (maybe_push_to_top_level): Save last_function_parms.
4592         (pop_from_top_level): Restore it.
4593
4594         PR c++/4377
4595         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
4596         NON_LVALUE_EXPRs.
4597
4598         PR c++/4003
4599         * pt.c (tsubst_friend_function): Use decl_namespace_context.
4600
4601         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
4602         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
4603         type with a nontrivial destructor.
4604
4605 2002-03-17  Jason Merrill  <jason@redhat.com>
4606
4607         PR c++/4460
4608         * class.c (build_base_path): Virtual base layout is fixed in
4609         in-charge [cd]tors.
4610
4611 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
4612
4613         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
4614         * parse.y (yyparse): Remove macro.
4615
4616 2002-03-17  Jason Merrill  <jason@redhat.com>
4617
4618         PR c++/5757
4619         * init.c (build_new_1): Pass the right pointer to op delete.
4620
4621 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
4622
4623         PR c++/4361
4624         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
4625         conversion operators go.
4626         (struct lang_decl_flags): Add template_conv_p and unused
4627         bitfields.
4628         (DECL_TEMPLATE_CONV_FN_P): New macro.
4629         * call.c (build_user_type_conversion_1): Don't check second type
4630         conversion of overload set first.
4631         * class.c (add_method): Make sure templated conversion operators
4632         all end up on slot 2.
4633         * lex.c (do_identifier): A conversion operator token might be
4634         satisfied by a templated conversion operator.
4635         * pt.c (check_explicit_specialization): Use
4636         CLASSTYPE_FIRST_CONVERSION_SLOT.
4637         (template_parm_this_level_p): New function.
4638         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
4639         * search.c (lookup_fnfields_1): Template conversions will be on
4640         the first slot.
4641         * typeck.c (build_component_ref): Preserve the type of an
4642         conversion operator name on the overload type.
4643         (build_x_function_call): Retrieve the conversion operator name.
4644
4645 2002-03-15  Richard Henderson  <rth@redhat.com>
4646
4647         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
4648
4649 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
4650
4651         * cp-tree.h (CLEANUP_DECL): Remove.
4652         (CLEANUP_EXPR): Likewise.
4653         * decl.c (destroy_local_var): Simplify.
4654         (maybe_build_cleanup): Tidy.
4655         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
4656         * semantics.c (cp_expand_stmt): Likewise.
4657         * cp/tree.c (cp_statement_code_p): Likewise.
4658
4659 2002-03-15  Jason Merrill  <jason@redhat.com>
4660
4661         PR c++/5857
4662         * decl.c (duplicate_decls): Use merge_types instead of common_type.
4663         * typeck.c (common_type): Just hand off to
4664         type_after_usual_arithmetic_conversions and
4665         composite_pointer_type.
4666         (merge_types): New fn.
4667         (commonparms): Use it instead of common_type.
4668         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
4669         (composite_pointer_type): Also handle attributes.
4670         * cp-tree.h: Declare merge_types.
4671
4672         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
4673         variables.
4674         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
4675
4676 2002-03-14  Richard Henderson  <rth@redhat.com>
4677
4678         * decl.c: Include c-pragma.h.
4679         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
4680         * Make-lang.in: Update dependencies.
4681
4682 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
4683
4684         PR c++/5908
4685         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
4686         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
4687
4688 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4689
4690         * mangle.c (write_builtin_type): Handle 128-bit integers even if
4691         they are not a standard integer type.
4692
4693 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
4694
4695         * cp-tree.h (init_init_processing): Remove declaration.
4696         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
4697         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
4698
4699 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4700
4701         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
4702         Define.
4703         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
4704         tree_code_length.
4705         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
4706         cplus_tree_code_name): Delete.
4707         (cxx_init): Don't call add_c_tree_codes, instead set
4708         lang_unsafe_for_reeval.  Don't try to copy into the various
4709         tree_code arrays.
4710
4711 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
4712
4713         PR c++/5659
4714         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
4715         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
4716         definitions.
4717
4718 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4719
4720         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
4721         DR209 is now not a defect.
4722         * cp-tree.h (skip_type_access_control): Remove.
4723         * decl.c (grokdeclarator): Do type access control for friend
4724         declarations.
4725         * semantics.c (decl_type_access_control): Don't reset
4726         current_type_lookups.
4727         (save_type_access_control): Always save the lookups.
4728         (skip_type_access_control): Remove.
4729         (finish_class_definition): Don't change type_lookups.
4730
4731 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
4732
4733         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
4734         It is incorrect.
4735         * typeck.c (build_static_cast): Compare non-qualified types
4736         with pointer to member conversions.
4737
4738 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
4739             Daniel Berlin  <dan@dberlin.org>
4740
4741         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
4742         (cxx_get_alias_set): Use it.
4743
4744 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4745
4746         * cp-tree.h (stabilize_expr): Prototype.
4747
4748 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4749
4750         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
4751         conditional return void.
4752
4753 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
4754
4755         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
4756         * cp-tree.h (cxx_unsave): New.
4757         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
4758         (init_tree): Update.
4759
4760 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4761
4762         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
4763         explicit sizeof/sizeof.
4764         * decl2.c (cxx_decode_option): Likewise.
4765         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
4766
4767 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4768
4769         PR c++/775
4770         * decl.c (lookup_tag): Only reject enum/class mismatch, not
4771         class/union mismatch.
4772         * parse.y (check_class_key): New function.
4773         (structsp): Call it.
4774
4775 2002-03-01  Michael Matz  <matz@suse.de>
4776
4777         * typeck.c (cp_pointer_int_sum): Complete inner type which is
4778         used later by size_in_bytes().
4779
4780 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
4781
4782         * cp-tree.h:  Require __GNUC__ to be #defined.
4783         (build_init):  Add missing prototype.
4784
4785 2002-03-01  Jason Merrill  <jason@redhat.com>
4786
4787         * except.c: Don't include decl.h or obstack.h.  Do include
4788         tree-inline.h.
4789         (build_throw): Destroy temporaries from the thrown
4790         expression before calling __cxa_throw.  Construct a thrown
4791         temporary directly into the exception object.
4792         (stabilize_throw_expr): New function.
4793         (wrap_cleanups_r): New function.
4794         * tree.c (stabilize_expr): New function.
4795         * init.c (build_init): New function.
4796         * Make-lang.in (cp/except.o): Adjust .h deps.
4797
4798 2002-02-28  Jason Merrill  <jason@redhat.com>
4799
4800         * search.c (lookup_base_r): Don't clear is_non_public just because
4801         we found a friendly scope.
4802
4803         * decl.c (finish_function): Only warn about missing return
4804         statement with -Wreturn-type.
4805
4806 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
4807
4808         * class.c (build_clone): Update.
4809         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
4810         * cp-tree.h (cxx_dup_lang_specific_decl): New.
4811         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
4812         (copy_decl): Update.
4813         * method.c (make_thunk): Update.
4814
4815 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
4816
4817         * decl2.c: Delete traditional-mode-related code copied from
4818         the C front end but not used, or used only to permit the
4819         compiler to link.
4820
4821 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
4822
4823         PR c++/4093
4824         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
4825         to void.
4826
4827 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
4828
4829         PR other/5746
4830         * semantics.c (finish_switch_cond): Don't call get_unwidened
4831         if error_mark_node.
4832
4833 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
4834
4835         PR c++/2645, DR 295
4836         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
4837         tf_keep_type_decl.
4838         (make_typename_type): Use tsubst_flags_t.
4839         * decl.c (make_typename_type): Adjust. Return non-artificial
4840         TYPE_DECLs, if required.
4841         (grokdeclarator): Simplify CVR qualification handling. Allow bad
4842         qualifiers on typedef types.
4843         * decl2.c (handle_class_head): Adjust make_typename_type call.
4844         * parse.y (nested_name_specifier): Likewise.
4845         (typename_sub0): Likewise.
4846         (typename_sub1): Likewise.
4847         * pt.c (convert_template_argument): Adjust make_typename_type
4848         return value.
4849         (tsubst): Adjust cp_build_qualified_type_real calls.
4850         (check_cv_quals_for_unify): Cope with allowing bad qualifications
4851         on template type parms.
4852         (instantiate_decl): Recheck substitutions to give warnings on bad
4853         qualifications.
4854         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
4855
4856 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
4857
4858         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
4859
4860         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
4861         unless DECL_ALWAYS_INLINE.
4862
4863 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4864
4865         * typeck.c (cp_pointer_int_sum): Renamed from
4866         pointer_int_sum, call pointer_int_sum.
4867
4868 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
4869
4870         * decl.c (duplicate_decls): Return 0 if issued error about
4871         redeclaration.
4872
4873 2002-02-19  Jason Merrill  <jason@redhat.com>
4874
4875         ABI change: Mangle `void (A::*)() const' as
4876         M1AKFvvE, not MK1AFvvE.
4877         * mangle.c (write_function_type): Write cv-quals for member
4878         function type here.
4879         (write_pointer_to_member_type): Not here.
4880
4881 2002-02-18  Jason Merrill  <jason@redhat.com>
4882
4883         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
4884         (do_decl_instantiation): Likewise.
4885
4886 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
4887
4888         PR c++/5685
4889         * decl.c (duplicate_decls): Make warning unconditional
4890         if duplicate default argument declarations are present.
4891
4892 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
4893
4894         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
4895         shortening.
4896
4897 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
4898
4899         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
4900         remove incorrect comment. Move #if 0'd code to common path. Use
4901         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
4902
4903 2002-02-13  Jason Merrill  <jason@redhat.com>
4904
4905         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
4906         (finish_function): Don't warn if current_function_returns_null.
4907
4908         * typeck2.c (digest_init): Do handle values of vector type.
4909
4910         * typeck2.c (digest_init, process_init_constructor): Treat vectors
4911         like arrays.
4912
4913 2002-02-11  Jason Merrill  <jason@redhat.com>
4914
4915         * parse.y (reserved_declspecs): Don't handle attributes.
4916         (reserved_typespecquals): Handle them here.
4917         * Make-lang.in (parse.c): Adjust expected conflicts.
4918
4919 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
4920
4921         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
4922         instead of compstmt.
4923         (compstmt_or_stmtexpr): Renamed from compstmt.
4924         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
4925
4926 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4927
4928         Rename instantiate_type_flags to tsubst_flags_t & expand use.
4929         * cp-tree.h (instantiate_type_flags): Rename to ...
4930         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
4931         add tf_warning flag.
4932         (instantiate_type): Adjust prototype.
4933         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
4934         do_type_instantiation, cp_build_qualified_type_real): Likewise.
4935         cp_build_qualified_type: Adjust.
4936         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
4937         tf_*.
4938         * call.c (standard_conversion): Rename itf_* to tf_*.
4939         (reference_binding): Likewise.
4940         (convert_like_real): Likewise.
4941         * cvt.c (cp_convert_to_pointer): Likewise.
4942         (convert_to_reference): Likewise.
4943         * decl.c (lookup_namespace_name): Use tf_* flags.
4944         (make_typename_type): Likewise.
4945         (grokdeclarator): Likewise.
4946         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
4947         (coerce_template_template_parms, convert_template_argument,
4948         coerce_template_parms, maybe_get_template_decl_from_type_decl,
4949         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
4950         instantiate_class_template, tsubst_template_arg_vector,
4951         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
4952         tsubst_decl, tsubst_arg_types, tsubst_function_type,
4953         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
4954         instantiate_template, fn_type_unification,
4955         resolve_overloaded_unification, verify_class_unification,
4956         unify, get_bindings_real, do_type_instantiation,
4957         regenerate_decl_from_template, instantiate_decl,
4958         tsubst_initializer_list, tsubst_enum,
4959         get_mostly_instantiated_function_type,
4960         invalid_nontype_parm_type_p): Likewise.
4961         * tree.c (cp_build_qualified_type_real): Likewise.
4962         * typeck.c (build_binary_op): Rename itf_* to tf_*.
4963         (build_ptrmemfunc): Likewise.
4964         (convert_for_assignment): Likewise.
4965
4966 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
4967
4968         PR c++/109
4969         * decl.c (grokdeclarator): Allow friend declarations from
4970         dependent types.
4971         * decl2.c (handle_class_head): Don't push into template parm contexts.
4972         * pt.c (push_template_decl_real): Template parm contexts are never
4973         being defined.
4974
4975 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
4976
4977         * class.c: Include target.h.
4978         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
4979         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
4980         bit-field layout.
4981         * Make-lang.in: Adjust deps.
4982
4983 2002-02-05  Jason Merrill  <jason@redhat.com>
4984
4985         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
4986
4987 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
4988
4989         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
4990         (finish_switch_cond): Set SWITCH_TYPE.
4991
4992 2002-02-04  Richard Henderson  <rth@redhat.com>
4993
4994         * method.c (use_thunk): Always initialize the block tree.  Reindent.
4995         * semantics.c (expand_body): Emit thunks after function, not before.
4996
4997 2002-02-04  Jason Merrill  <jason@redhat.com>
4998
4999         * decl.c (start_function): Call cplus_decl_attributes immediately
5000         after grokdeclarator.
5001
5002         * decl.c (start_function): Combine DECL_RESULT handling code.
5003
5004 2002-02-03  Jason Merrill  <jason@redhat.com>
5005
5006         * xref.c: Remove.
5007         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
5008         (cp/xref.o): Remove dependencies.
5009         * class.c (finish_struct_1, check_methods): Don't call xref fns.
5010         (finish_struct_1): Likewise.
5011         * friend.c (make_friend_class): Likewise.
5012         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
5013         * spew.c (read_process_identifier): Likewise.
5014
5015 2002-02-01  Jason Merrill  <jason@redhat.com>
5016
5017         PR c++/4872
5018         * decl.c (finish_function): Warn about a non-void function with
5019         no return statement and no abnormal exit.
5020         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
5021         (current_function_returns_abnormally): New macro.
5022         * call.c (build_call): Set it.
5023
5024         * typeck.c (build_component_ref): Always complain about offsetof
5025         constructs on non-PODs.  Only make it an error for members of
5026         virtual bases.
5027
5028         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
5029         (dump_function_decl): Always dump parms.
5030
5031         * decl2.c (finish_static_data_member_decl): Complain about a local
5032         class with a static data member.
5033
5034         PR c++/4286
5035         * search.c (lookup_field_1): Don't xref a static data member
5036         just because we looked it up.
5037
5038 2002-01-31  Jason Merrill  <jason@redhat.com>
5039
5040         * Make-lang.in (parse.c): Handle .output file.
5041
5042         PR c++/3395
5043         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
5044         not TREE_TYPE.
5045         * semantics.c (finish_class_definition): Adjust.
5046
5047         Allow attributes in parms and casts.
5048         * parse.y (named_parm): Don't strip attrs.
5049         (declmods): Remove 'attributes' production.
5050         (nonempty_cv_qualifiers): Accept attributes.
5051         (ATTRIBUTE): Give precedence.
5052         * decl.c (groktypename): Handle attributes.
5053         (grokparms): Likewise.
5054
5055 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
5056
5057         * decl2.c (cxx_decode_option): Pass 0 as last argument to
5058         cpp_handle_option.
5059         * lang-specs.h: Use cpp_unique_options instead of cpp_options
5060         when used together with cc1_options.
5061
5062 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
5063
5064         PR c++/5132
5065         * typeck2.c (digest_init): Make sure non-array core type is
5066         instantiated.
5067         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
5068         constructor, rather than build a new one.
5069         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
5070         PURPOSE of constructor elts.
5071
5072 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5073
5074         * Make-lang.in (parse.c): Adjust expected number of
5075         shift-reduce conflicts.
5076         (decl.o): Depend on diagnostic.h.
5077         * decl.c: Include diagnostic.h.
5078         (grokdeclarator): Check for null pointer.
5079         (finish_function): Don't abort when
5080         current_binding_level->parm_flag != 1, if errors have
5081         occurred; throw away the statement tree and extra binding
5082         levels, and continue.
5083         * lex.c (note_list_got_semicolon): Check for null pointer.
5084         * method.c (hack_identifier): Just return error_mark_node if
5085         value is error_mark_node.
5086         * parse.y (primary: TYPEID(type_id)): No need to use
5087         TYPE_MAIN_VARIANT here.
5088         (handler_seq): Accept an empty list of catch clauses and
5089         generate a fake handler block to avoid later crashes.
5090         (ansi_raise_identifier): Accept the error token too.
5091         * semantics.c (begin_class_definition,
5092         finish_class_definition): Check for error_mark_node.
5093
5094 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
5095
5096         * typeck2.c (friendly_abort): Delete definition.
5097         * cp-tree.h (friendly_abort): Don't prototype.
5098         (my_friendly_assert): Use fancy_abort.
5099
5100 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5101
5102         * cp-tree.h (my_friendly_abort): Remove.
5103
5104 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
5105
5106         * spew.c (pending_inlines, pending_inlines_tail,
5107         processing_these_inlines): Make static.
5108         (mark_pending_inlines): Remove static.
5109         (begin_parsing_inclass_inline): If in function, save pi
5110         for GC to cp_function_chain->unparsed_inlines instead.
5111         (process_next_inline): Likewise.
5112         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
5113         (mark_pending_inlines): Add prototype.
5114         * decl.c (spew_debug): Remove unused extern.
5115         (mark_lang_function): Call mark_pending_inlines.
5116
5117 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
5118
5119         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
5120         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
5121         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
5122         Change my_fancy_abort() to abort().
5123
5124 2002-01-23  Jason Merrill  <jason@redhat.com>
5125
5126         PR c++/5453
5127         * class.c (fixed_type_or_null): Fix thinko.
5128
5129         PR c++/3331
5130         * init.c (resolve_offset_ref): Use build_indirect_ref.
5131
5132         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
5133
5134 2002-01-22  Jason Merrill  <jason@redhat.com>
5135
5136         * parse.y (function_body): Suppress the block for the outermost
5137         curly braces.
5138         * decl.c (pushdecl): Don't try to skip it.
5139         (begin_function_body): Keep the block we create, not the next one.
5140         * init.c (emit_base_init): Don't mess with keep_next_level.
5141
5142         * class.c (build_base_path): Tweak formatting.
5143
5144 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5145
5146         Fix regression introduced with patch for c++/775
5147         * parse.y (class_head_defn): Check for template specializations
5148         with a different class-key.
5149
5150 2002-01-17  Jason Merrill  <jason@redhat.com>
5151
5152         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
5153         (begin_function_body): Call them and keep_next_level.
5154         * init.c (emit_base_init): Call keep_next_level.
5155         * semantics.c (setup_vtbl_ptr): Lose.
5156         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
5157         (vtbls_set_up_p): Lose.
5158         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
5159         * method.c (do_build_copy_constructor): Likewise.
5160         (synthesize_method): Call finish_mem_initializers.
5161         * parse.y (nodecls): Likewise.
5162
5163         * error.c (dump_type_suffix): Print the exception specs before
5164         recursing.
5165         (dump_function_decl): Here, too.
5166
5167         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
5168
5169 2002-01-10  Ira Ruben   <ira@apple.com>
5170
5171         PR c++/907
5172         * decl.c (start_method): Handle attrlist.
5173
5174 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
5175
5176         * decl2.c (max_tinst_depth): Increase default limit to 500.
5177
5178 2002-01-10  Graham Stott  <grahams@redhat.com>
5179
5180         * spew.c (YYCHAR): Uppercase macro parameter and add
5181         parenthesis.
5182         (YYCODE): Likewise.
5183         (NAME): Uppercase macro parameter.
5184
5185 2002-01-09  Graham Stott  <grahams@redhat.com>
5186
5187         * decl.h (grokdeclarator): Wrap long line.
5188
5189         * semantics.c (FINISH_COND): Uppercase macro paramaters and
5190         add parenthesis.
5191
5192 2002-01-08  Graham Stott  <grahams@redhat.com>
5193
5194         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
5195         (PALLOC): Uppercase macro parameter and whitespace.
5196         (SALLOC): Uppercase macro parameter.
5197         (SFREE): Uppercase macros parameter, add parenthese and
5198         whitespace.
5199         (STREQL): Uppercase macro parameter and whitespace.
5200         (STRNEQ): Likewise.
5201         (STRLSS): Likewise.
5202         (STRLEQ): Likewise.
5203         (STRGTR): Likewise.
5204         (STRGEQ): Likewise.
5205
5206         * call.c (convert_like): Add parenthesis and wrap.
5207         (convert_like_with_context): Likewise.
5208         (ICS_RANK): Whitespace.
5209         (NEED_TEMPORARY_P): Remove parenthesis.
5210
5211         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
5212         whitespace.
5213         (VTT_MARKED_BINFO_P): Likewise.
5214
5215         * decl.c (BINDING_LEVEL): Add parenthesis.
5216         (DEF_OPERATOR): Likewise.
5217
5218         * mangle.c (MANGLE_TRACE): Add parenthesis.
5219         (MANGLE_TRACE_TREE): Likewise.
5220         (write_signed_number): Likewise.
5221         (write_unsigned_number): Likewise.
5222
5223         * pt.c (ccat): Uppercase macro parameter.
5224         (cat): Likewise
5225
5226         * search.c (SET_BINFO_ACCESS): Add parenthesis.
5227
5228 2002-01-07  Jason Merrill  <jason@redhat.com>
5229
5230         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
5231         to pedwarn.
5232
5233         PR c++/3536
5234         * method.c (make_thunk): If !flag_weak, give the thunk the
5235         function's linkage.
5236         (use_thunk): Here, too.
5237
5238 2002-01-07  Graham Stott  <grahams@redhat.com>
5239
5240         * error.c: Update copyright date.
5241         (print_scope_operator): Add parenthesis.
5242         (print_left_paren): Likewise.
5243         (print_right_paren): Likewise.
5244         (print_left_bracket): Likewise.
5245         (print_right_bracket): Likewise.
5246         (print_template_argument_list_start): Likewise.
5247         (print_template_argument_list_end): Likewise.
5248         (print_non_consecutive_character): Likewise.
5249         (print_tree_identifier): Likewise.
5250         (print_identifier): Likewise.
5251         (NEXT_CODE): Uppercase macro parameter.
5252         (ident_fndecl): Delete unused.
5253         (GLOBAL_THING): Likewise.
5254
5255 2002-01-06  Graham Stott  <grahams@redhat.com>
5256
5257         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
5258         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
5259         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
5260         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
5261         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
5262         (C_IS_RESERVED_WORD): Uppercase macro parameter.
5263         (C_RID_YYCODE) Likewise.
5264         (ptrmem_cst): Use rtx.
5265         (LOCAL_BINDING_P): Add whitespace.
5266         (INHERITED_VALUE_BINDING_P): Likewise.
5267         (BINDING_SCOPE): Wrap long line.
5268         (BINDING_HAS_LEVEL_P): Remove parenthesis.
5269         (BINDING_VALUE): Wrap long line.
5270         (BINDING_TYPE): Whitespace.
5271         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
5272         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
5273         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
5274         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
5275         (same_type_p): Uppercase macro parameters.
5276         (same_type_ignoring_top_level_qualifiers_p): Likewise.
5277         (OVL_FUNCTION): Wrap long line.
5278         (OVL_CHAIN): Whitespace.
5279         (OVL_CURRENT): Add parenthesis and whitespace.
5280         (OVL_NEXT): Whitespace.
5281         (OVL_USED): Likewise.
5282         (IDENTIFIER_TYPE_VALUE): Likewise.
5283         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
5284         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
5285         (LANG_ID_FIELD): Whitespace.
5286         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
5287         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
5288         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
5289         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
5290         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
5291         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
5292         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
5293         (IDENTIFIER_VIRTUAL_P): Likewise.
5294         (IDENTIFIER_OPNAME_P): Likewise.
5295         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
5296         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
5297         (C_SET_EXP_ORIGINAL_CODE): Likewise.
5298         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
5299         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
5300         (IS_AGGR_TYPE): Uppercase macro parameter.
5301         (CLASS_TYPE_P): Likewise.
5302         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
5303         (IS_AGGR_TYPE_2): Whitespace.
5304         (TAGGED_TYPE_P): Uppercase macro parameter.
5305         (TYPE_BUILT_IN): Whitespace.
5306         (TYPE_FOR_JAVA): Likewise.
5307         (FUNCTION_ARG_CHAIN): Remove parenthesis.
5308         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
5309         (FUNCTION_FIRST_USER_PARAM): Likewise.
5310         (PROMOTES_TO_AGGR_TYPE): Whitespace.
5311         (DERIVED_FROM_P): Add parenthesis and wrap.
5312         (UNIQUELY_DERIVED_FROM_P): Likewise.
5313         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
5314         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
5315         (CLASSTYPE_USE_TEMPLATE): Whitespace.
5316         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
5317         (TYPE_GETS_DELETE): Add parenthesis.
5318         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
5319         (TYPE_HAS_ASSIGN_REF): Likewise,
5320         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
5321         (TYPE_HAS_INIT_REF): Likewise.
5322         (TYPE_HAS_CONST_INIT_REF): Likewise.
5323         (TYPE_BEING_DEFINED): Likewise.
5324         (TYPE_LANG_SPECIFIC): Likewise.
5325         (CLASSTYPE_RTTI): Likewise.
5326         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
5327         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
5328         (TYPE_OVERLOADS_ARROW): Likewise.
5329         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
5330         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
5331         (CLASSTYPE_METHOD_VEC): Likewise.
5332         (CLASSTYPE_MARKED_N): Likewise.
5333         (CLASSTYPE_MARKED): Likewise.
5334         (CLASSTYPE_MARKED2): Likewise.
5335         (CLASSTYPE_MARKED3): Likewise.
5336         (CLASSTYPE_MARKED4): Likewise.
5337         (CLASSTYPE_MARKED5): Likewise.
5338         (CLASSTYPE_MARKED6): Likewise.
5339         (SET_CLASSTYPE_MARKED): Whitespace.
5340         (CLEAR_CLASSTYPE_MARKED): Likewise.
5341         (SET_CLASSTYPE_MARKED2): Likewise.
5342         (CLEAR_CLASSTYPE_MARKED2): Likewise.
5343         (SET_CLASSTYPE_MARKED3): Likewise.
5344         (CLEAR_CLASSTYPE_MARKED3): Likewise.
5345         (SET_CLASSTYPE_MARKED4): Likewise.
5346         (CLEAR_CLASSTYPE_MARKED4): Likewise.
5347         (SET_CLASSTYPE_MARKED5): Likewise.
5348         (CLEAR_CLASSTYPE_MARKED5): Likewise.
5349         (SET_CLASSTYPE_MARKED6): Likewise.
5350         (CLEAR_CLASSTYPE_MARKED6): Likewise.
5351         (CLASSTYPE_TAGS): Likewise.
5352         (CLASSTYPE_VSIZE): Likewise.
5353         (CLASSTYPE_VBASECLASSES): Likewise.
5354         (CANONICAL_BINFO): Add parenthesis.
5355         (CLASSTYPE_SIZE(NODE): Likewise.
5356         (CLASSTYPE_SIZE_UNIT): Likewise.
5357         (CLASSTYPE_ALIGN(NODE): Likewise.
5358         (CLASSTYPE_USER_ALIGN): Likewise.
5359         (TYPE_JAVA_INTERFACE): Likewise.
5360         (CLASSTYPE_PURE_VIRTUALS): Likewise.
5361         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
5362         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
5363         (CLASSTYPE_HAS_MUTABLE): Likewise.
5364         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
5365         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
5366         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
5367         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
5368         (CLASSTYPE_INTERFACE_ONLY): Likewise.
5369         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
5370         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5371         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
5372         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5373         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
5374         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
5375         (BINFO_UNSHARED_MARKED): Whitespace.
5376         (BINFO_MARKED): Whitespace and wrap.
5377         (SET_BINFO_MARKED): Likewise.
5378         (CLEAR_BINFO_MARKED): Likewise.
5379         (BINFO_VTABLE_PATH_MARKED): Likewise.
5380         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
5381         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
5382         (BINFO_SUBVTT_INDEX): Remove parenthesis.
5383         (BINFO_VPTR_INDEX): Likewise.
5384         (BINFO_PRIMARY_BASE_OF): Likewise,
5385         (CLASSTYPE_VFIELDS): Whitespace.
5386         (VF_DERIVED_VALUE): Wrap long line.
5387         (NAMESPACE_LEVEL): Whitespace.
5388         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
5389         (DEFARG_POINTER): Whitespace.
5390         (DECL_NEEDED_P): Remove parenthesis.
5391         (DECL_LANGUAGE): Whitespace.
5392         (SET_DECL_LANGUAGE): Add parenthesis.
5393         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
5394         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
5395         (DECL_IN_AGGR_P): Whitespace.
5396         (DECL_FRIEND_P): Likewise.
5397         (DECL_BEFRIENDING_CLASSES): Likewise.
5398         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
5399         (DECL_NONCONVERTING_P): Whitespace.
5400         (DECL_PURE_VIRTUAL_P): Likewise.
5401         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
5402         (DECL_PENDING_INLINE_INFO): Whitespace.
5403         (DECL_SORTED_FIELDS): Likewise.
5404         (DECL_DEFERRED_FN): Likewise.
5405         (DECL_TEMPLATE_INFO): Likewise.
5406         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
5407         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
5408         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
5409         (TMPL_ARGS_LEVEL): Likewise.
5410         (SET_TMPL_ARGS_LEVEL): Likewise.
5411         (INNERMOST_TEMPLATE_PARMS): Whitespace.
5412         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
5413         (INTEGRAL_CODE_P(CODE): Add parenthesis.
5414         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
5415         (TYPE_HAS_CONSTRUCTOR): Whitespace.
5416         (TREE_HAS_CONSTRUCTOR): Likewise.
5417         (TYPE_HAS_DESTRUCTOR): Likewise.
5418         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
5419         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
5420         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5421         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
5422         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
5423         (TYPE_PTRMEMFUNC_P): Likewise.
5424         (TYPE_PTRMEMFUNC_FLAG): Likewise.
5425         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
5426         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
5427         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
5428         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
5429         (DECL_ACCESS): Whitespace.
5430         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
5431         (DECL_GLOBAL_DTOR_P): Likewise.
5432         (GLOBAL_INIT_PRIORITY): Likewise.
5433         (DECL_TEMPLATE_PARMS): Likewise.
5434         (DECL_TEMPLATE_RESULT): Likewise.
5435         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
5436         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
5437         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
5438         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
5439         (PRIMARY_TEMPLATE_P): Add parenthesis.
5440         (DECL_USE_TEMPLATE): Whitespace.
5441         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5442         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
5443         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5444         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
5445         (CALL_DECLARATOR_PARMS): Remove parenthesis.
5446         (CALL_DECLARATOR_QUALS): Likewise.
5447         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
5448         (TEMP_NAME_P): Wrap.
5449         (VFIELD_NAME_P): Likewise.
5450         (B_SET): Uppercase macro parameters and add parenthesis.
5451         (B_CLR): Likewise.
5452         (B_TST): Likewise.
5453         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
5454         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
5455         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
5456         (same_or_base_type_p): Likewise.
5457         (cp_deprecated): Likewise.
5458
5459 2002-01-05  Richard Henderson  <rth@redhat.com>
5460
5461         * semantics.c (expand_body): Revert last change.
5462
5463 2002-01-04  Jason Merrill  <jason@redhat.com>
5464
5465         PR c++/4122
5466         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
5467         lost primary.
5468
5469         * class.c (build_vtbl_initializer): Check for a lost primary
5470         before calculating the vtable entry to throw away.
5471
5472 2002-01-02  Jason Merrill  <jason@redhat.com>
5473
5474         * semantics.c (expand_body): Call outlining_inline_function when
5475         emitting an inline function out of line.
5476
5477 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5478
5479         PR c++/5116, c++/764 reversion
5480         * call.c (build_new_op): Revert the instantiations. They are
5481         incorrect.
5482
5483 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5484
5485         PR c++/5089
5486         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
5487
5488 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5489
5490         PR c++/3716
5491         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
5492         (tsubst, case POINTER_TYPE): Handle pmfs here.
5493         (tsubst, case OFFSET_TYPE): Check it is not an offset to
5494         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
5495
5496 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5497
5498         PR c++/35
5499         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
5500         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
5501         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
5502         PARM_DECL.
5503         (tsubst_template_parms): Break up loop statements.
5504         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
5505         parm PARM_DECLs don't get promoted.
5506
5507 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5508
5509         PR c++/5123
5510         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
5511         (build_x_function_call): Cope with a COMPONENT_REF containing a
5512         TEMPLATE_ID_EXPR.
5513
5514 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5515
5516         PR c++/5213
5517         * pt.c (convert_template_argument): Be more careful determining
5518         when RECORD_TYPE templates are or are not templates.
5519
5520 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5521
5522         PR c++/775
5523         * cp-tree.h (handle_class_head): Adjust prototype.
5524         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
5525         parameters. Use for all class heads.
5526         * parse.y (named_class_head_sans_basetype, named_class_head,
5527         named_complex_class_head_sans_basetype,
5528         named_class_head_sans_basetype_defn,
5529         unnamed_class_head): Remove.
5530         (class_head, class_head_apparent_template): Recognize class heads
5531         (class_head_decl, class_head_defn): New reductions. Process class
5532         heads.
5533         (structsp): Adjust class definition and class declaration
5534         reductions.
5535         (maybe_base_class_list): Give diagnostic on empty list.
5536
5537 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5538
5539         PR c++/4379
5540         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
5541         single non-static member.
5542         (unary_complex_lvalue): If it cannot be a pointer to member, don't
5543         make it so. Check it is not pointer to reference.
5544
5545 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5546
5547         PR c++/5132
5548         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
5549         are processing a template decl.
5550
5551 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
5552
5553         PR c++/5116, c++/764
5554         * call.c (build_new_op): Make sure template class operands are
5555         instantiated. Simplify arglist construction.
5556
5557 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5558
5559         * call.c (build_user_type_conversion_1): Use my_friendly_assert
5560         rather than if ... abort.
5561         * cvt.c (convert_to_reference): Likewise.
5562         * semantics.c (setup_vtbl_ptr): Likewise.
5563         * pt.c (lookup_template_class): Comment typo.
5564
5565 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5566
5567         PR c++/5125
5568         * pt.c (push_template_decl_real): Make sure DECL has
5569         DECL_LANG_SPECIFIC.
5570
5571 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
5572
5573         PR c++/335
5574         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
5575         for non-reference fields.
5576         * typeck.c (require_complete_type): Use resolve_offset_ref).
5577
5578 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
5579
5580         PR c++/196
5581         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
5582
5583 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
5584
5585         PR c++/160
5586         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
5587         up. Don't stabilize_references when initializing a reference.
5588
5589 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5590
5591         * decl2.c (lang_f_options): Const-ify.
5592
5593 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
5594
5595         * config-lang.in (diff_excludes): Remove.
5596
5597 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
5598
5599         PR c++/90
5600         * typeck.c (build_function_call_real): Use original function
5601         expression for errors.
5602
5603 2001-12-18  Jason Merrill  <jason@redhat.com>
5604
5605         PR c++/3242
5606         * class.c (add_method): Do compare 'this' quals when trying to match a
5607         used function.  Don't defer to another used function.
5608
5609 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5610
5611         * pt.c (instantiate_clone): Remove, fold into ...
5612         (instantiate_template): ... here. Simplify by removing mutual
5613         recursion.
5614         * typeck2.c (build_m_component_ref): Don't cv qualify the function
5615         pointed to by a pointer to function.
5616         * class.c (delete_duplicate_fields_1): Typo.
5617
5618 2001-12-18  Jason Merrill  <jason@redhat.com>
5619
5620         C++ ABI change: destroy value arguments in caller.
5621         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
5622         create an extra binding level for the parameters.
5623         * decl.c (store_parm_decls): Don't do parameter cleanups.
5624
5625 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
5626
5627         * call.c (build_new_method_call): Use '%#V'.
5628         * error.c (cv_to_string): Use V parameter to determine padding.
5629
5630 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
5631
5632         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
5633         spellings in messages.
5634
5635 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
5636
5637         * cp-tree.h: Delete #defines for cp_error, cp_warning,
5638         cp_pedwarn, and cp_compiler_error.
5639         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
5640         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
5641         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
5642         typeck2.c: Change calls to the above macros to use their
5643         language-independent equivalents: error, warning, pedwarn, and
5644         internal_error respectively.
5645
5646 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
5647
5648         * decl2.c (finish_file): Remove back_end_hook.
5649
5650 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
5651
5652         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
5653         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
5654         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
5655
5656 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
5657
5658         * lang-options.h: Use American spelling in messages.
5659
5660 2001-12-13  Jason Merrill  <jason@redhat.com>
5661
5662         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
5663
5664         Use cleanups to run base and member destructors.
5665         * init.c (push_base_cleanups): New function, split out from...
5666         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
5667         * decl.c (finish_destructor_body): Move vbase destruction code to
5668         push_base_cleanups.
5669         (begin_function_body, finish_function_body): New fns.
5670         (finish_function): Move [cd]tor handling and call_poplevel to
5671         finish_function_body.
5672         (pushdecl): Skip the new level.
5673         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
5674         (setup_vtbl_ptr): Call push_base_cleanups.
5675         * method.c (synthesize_method): Call {begin,end}_function_body.
5676         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
5677         * cp-tree.h: Declare new fns.
5678         * parse.y (function_body, .begin_function_body): New nonterminals.
5679         (fndef, pending_inline, function_try_block): Use function_body.
5680         (ctor_initializer_opt, function_try_block): No longer has a value.
5681         (base_init): Remove .set_base_init token.
5682         (.set_base_init, compstmt_or_error): Remove.
5683         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
5684
5685         * optimize.c (maybe_clone_body): Fix parameter updating.
5686
5687 2001-12-12  Jason Merrill  <jason@redhat.com>
5688
5689         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
5690         * semantics.c (genrtl_start_function): Don't pass
5691         parms_have_cleanups or push an extra binding level.
5692         (genrtl_finish_function): Lose cleanup_label cruft.
5693
5694         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
5695         (ctor_label): Remove.
5696         * semantics.c (finish_return_stmt): Lose ctor_label support.
5697         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
5698         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
5699         dtor_label.
5700
5701         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
5702         check for [cd]tors.
5703         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
5704
5705         * decl.c (finish_function): Check VMS_TARGET, not VMS.
5706
5707         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
5708         (end_cleanup_fn): And poplevel.
5709
5710         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
5711         if we're in a template.
5712
5713 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
5714
5715         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
5716         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
5717         THIS_NAME_P): Delete.
5718         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
5719         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
5720         with internal naming scheme.
5721         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
5722
5723 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
5724
5725         * decl.c (grokdeclarator): Deprecated implicit typename use.
5726
5727 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
5728
5729         PR g++/51
5730         * parse.y (frob_specs): Indicate it is a language linkage which
5731         contained the extern.
5732         * decl.c (grokdeclarator): Allow extern language linkage with
5733         other specifiers.
5734
5735 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
5736
5737         PR g++/72
5738         * decl.c (add_binding): Don't reject duplicate typedefs involving
5739         template parameters.
5740
5741 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
5742
5743         * parse.y, semantics.c: Similarly.
5744
5745 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
5746
5747         PR g++/87
5748         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
5749         (copy_args_p): Rename to ...
5750         (copy_fn_p): ... here.
5751         (grok_special_member_properties): New function.
5752         (grok_op_properties): Lose VIRTUALP parameter.
5753         (copy_assignment_arg_p): Remove.
5754         * call.c (build_over_call): Use copy_fn_p.
5755         * decl.c (grokfndecl): Reformat. Adjust call to
5756         grok_op_properties.
5757         (copy_args_p): Rename to ...
5758         (copy_fn_p): ... here. Reject template functions. Check for pass
5759         by value.
5760         (grok_special_member_properties): Remember special functions.
5761         (grok_ctor_properties): Don't remember them here, just check.
5762         (grok_op_properties): Likewise.
5763         (start_method): Call grok_special_member_properties.
5764         * decl2.c (grokfield): Likewise.
5765         (copy_assignment_arg_p): Remove.
5766         (grok_function_init): Don't remember abstract assignment here.
5767         * pt.c (instantiate_class_template): Call
5768         grok_special_member_properties.
5769         (tsubst_decl): Adjust grok_op_properties call.
5770
5771 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
5772
5773         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
5774         RID_TYPES_COMPATIBLE_P.
5775
5776 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5777
5778         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
5779         call to build_aggr_init.
5780         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
5781
5782 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
5783
5784         * parse.y: Replace uses of the string non-terminal with STRING.
5785         Don't perform string concatentaion here.
5786         (string): Remove non-terminal.
5787         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
5788
5789 2001-12-05  Jason Merrill  <jason@redhat.com>
5790
5791         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
5792         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
5793         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
5794         * pt.c (push_tinst_level): No longer static.
5795         * cp-tree.h: Declare them.
5796
5797         * init.c (resolve_offset_ref): Don't check access for the base
5798         conversion to access a FIELD_DECL.
5799
5800         * cp-tree.h (TYPE_REFFN_P): New macro.
5801         * decl.c (bad_specifiers): Check it, too.
5802
5803         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
5804         on the __*_type_info type if we haven't seen a definition.
5805
5806 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
5807
5808         * decl.c: Include c-common.h.
5809         (shadow_warning): Move to c-common.c.
5810
5811 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5812
5813         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
5814
5815 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5816
5817         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
5818
5819 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5820
5821         PR g++/164
5822         * init.c (sort_base_init): Allow binfos to be directly specified.
5823         * method.c (do_build_copy_constructor): Explicitly convert to the
5824         base instance.
5825         (do_build_assign_ref): Likewise.
5826
5827 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
5828
5829         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
5830         declaration and initialization.
5831
5832 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
5833
5834         * typeck2.c: Remove leading capital from diagnostic messages, as
5835         per GNU coding standards.
5836
5837 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
5838
5839         PR c++/3394
5840         * decl.c (xref_basetypes): Handle attributes between
5841         'class' and name.
5842
5843 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
5844
5845         PR g++/3381
5846         * parse.y (named_complex_class_head_sans_basetype): Add new
5847         reduction.
5848         * Make-lang.in (parse.c): Adjust expected conflict count.
5849
5850 2001-12-03  Jason Merrill  <jason@redhat.com>
5851
5852         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
5853         immediate binfos for our virtual bases.
5854
5855 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
5856
5857         * call.c (build_java_interface_fn_ref): Similarly.
5858         * except.c (is_admissible_throw_operand): Similarly.
5859         * init.c (build_java_class_ref): Similarly.
5860         * xref.c (open_xref_file): Similarly.
5861
5862 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
5863
5864         * class.c (finish_struct): Remove trailing periods from messages.
5865         * decl.c (check_tag_decl): Similarly.
5866         * lex.c (cxx_set_yydebug): Similarly.
5867         * typeck2.c (friendly_abort): Similarly.
5868
5869 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5870
5871         PR c++/3048
5872         * cp-tree.h (ovl_member): Remove.
5873         * decl2.c (merge_functions): Handle extern "C" functions
5874         specially.
5875         * tree.c (ovl_member): Remove.
5876
5877 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5878
5879         PR c++/4842
5880         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
5881         FUNCTION_DECL, as input.
5882         (mark_overriders): Remove.
5883         (warn_hidden): Rework for the new ABI.
5884
5885 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
5886
5887         PR c++/3471
5888         * call.c (convert_like_real): Do not build additional temporaries
5889         for rvalues of class type.
5890
5891 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5892
5893         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
5894         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
5895         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
5896         (DERIVED_FROM_P): Likewise.
5897         (enum base_access): Renumber, add ba_quiet bit mask.
5898         (get_binfo): Remove.
5899         (get_base_distance): Remove.
5900         (binfo_value): Remove.
5901         (ACCESSIBLY_DERIVED_FROM_P): Remove.
5902         * call.c (standard_conversion): Use lookup_base.
5903         * class.c (strictly_overrides): Likewise.
5904         (layout_virtual_bases): Likewise.
5905         (warn_about_ambiguous_direct_bases): Likewise.
5906         (is_base_of_enclosing_class): Likewise.
5907         (add_vcall_offset_vtbl_entries_1): Likewise.
5908         * cvt.c (build_up_reference): Adjust comment.
5909         * init.c (build_member_call): Reformat.
5910         * search.c (get_binfo): Remove.
5911         (get_base_distance_recursive): Remove.
5912         (get_base_distance): Remove.
5913         (lookup_base_r): Tweak.
5914         (lookup_base): Add ba_quiet control. Complete the types here.
5915         (covariant_return_p): Use lookup_base.
5916         * tree.c (binfo_value): Remove.
5917         (maybe_dummy_object): Use lookup_base.
5918         * typeck.c (build_static_cast): Use lookup_base.
5919         (get_delta_difference): Likewise.
5920         * typeck2.c (binfo_or_else): Use lookup_base.
5921         (build_scoped_ref): Add back error_mark_check.
5922         (build_m_component_ref): Use lookup_base.
5923
5924 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5925
5926         * Make-lang.in (c++.generated-manpages): New dummy target.
5927
5928 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5929
5930         * Make-lang.in (cp-lang.o): Depends on c-common.h.
5931         * cp-lang.c (c-common.h): Include.
5932         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
5933         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
5934         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
5935
5936 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
5937
5938         * decl2.c (c_language): Move to c-common.c.
5939         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
5940         functions.
5941         (cxx_init): Update.
5942
5943 2001-11-26  Jason Merrill  <jason@redhat.com>
5944
5945         * call.c (joust): Remove COND_EXPR hack.
5946
5947 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
5948
5949         * search.c (lookup_base_r): Declare bk in variable declaration
5950         space.
5951
5952 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
5953
5954         PR g++/3145
5955         * class.c (build_vbase_pointer): Remove.
5956         (build_vbase_path): Remove.
5957         (build_base_path): New function.
5958         * cp-tree.h (base_access, base_kind): New enumerations.
5959         (build_base_path): Declare.
5960         (convert_pointer_to_real): Remove.
5961         (convert_pointer_to): Remove.
5962         (lookup_base): Declare.
5963         (convert_pointer_to_vbase): Remove.
5964         * call.c (build_scoped_method_call): Use lookup_base &
5965         build_base_path instead of convert_pointer_to_real,
5966         get_base_distance & get_binfo.
5967         (build_over_call): Likewise.
5968         * cvt.c (cp_convert_to_pointer): Likewise.
5969         (convert_to_pointer_force): Likewise.
5970         (build_up_reference): Likewise.
5971         (convert_pointer_to_real): Remove.
5972         (convert_pointer_to): Remove.
5973         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
5974         instead of convert_pointer_to_vbase & build_vbase_path.
5975         (emit_base_init): Use build_base_path instead of
5976         convert_pointer_to_real.
5977         (expand_virtual_init): Lose unrequired conversions.
5978         (resolve_offset_ref): Use lookup_base and build_base_path
5979         instead of convert_pointer_to.
5980         * rtti.c (build_dynamic_cast_1): Use lookup_base &
5981         build_base_path instead of get_base_distance & build_vbase_path.
5982         * search.c (get_vbase_1): Remove.
5983         (get_vbase): Remove.
5984         (convert_pointer_to_vbase): Remove.
5985         (lookup_base_r): New function.
5986         (lookup_base): New function.
5987         * typeck.c (require_complete_type): Use lookup_base &
5988         build_base_path instead of convert_pointer_to.
5989         (build_component_ref): Likewise.
5990         (build_x_function_call): Likewise.
5991         (get_member_function_from_ptrfunc): Likewise.
5992         (build_component_addr): Likewise.
5993         * typeck2.c (build_scoped_ref): Likewise.
5994
5995 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5996
5997         * cp-tree.h (CP_TYPE_QUALS): Removed.
5998         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
5999         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
6000         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
6001         * dump.c (cp_dump_tree): Use void* dump_info argument to match
6002         lang-hooks prototype.
6003         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
6004         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
6005         CP_TYPE_QUALS changed to cp_type_quals.
6006         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
6007         (CXX_C_OBJS): Remove c-dump.o.
6008
6009 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
6010
6011         PR c++/3637
6012         * pt.c (lookup_template_class): Ensure that all specializations
6013         are registered on the list corresponding to the most general
6014         template.
6015
6016 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
6017
6018         * call.c (non_reference): Add documentation.
6019         (convert_class_to_reference): Do not strip reference types
6020         from conversion operators.
6021         (maybe_handle_ref_bind): Simplify.
6022         (compare_ics): Correct handling of references.
6023
6024 2001-11-19  John Wilkinson <johnw@research.att.com>
6025
6026         * dump.c (dump_op): New function.
6027         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
6028         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
6029         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
6030
6031 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
6032
6033         PR4629
6034         * semantics.c (finish_sizeof): Make sure that expression created
6035         while processing a template do not have a type.
6036         (finish_alignof): Likewise.
6037         * typeck.c (c_sizeof): Likewise.
6038         (expr_sizeof): Likewise.
6039
6040 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
6041
6042         * lex.c (cxx_finish): Call c_common_finish.
6043         (finish_parse): Remove.
6044
6045 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6046
6047         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
6048         when displaying error message about missing array bounds.
6049
6050 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6051
6052         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
6053         CONST_CAST_EXPR.
6054         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
6055
6056 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
6057
6058         * cp-tree.h (print_class_statistics): Restore.
6059
6060 2001-11-15  Jason Merrill  <jason@redhat.com>
6061
6062         * method.c (use_thunk): Don't emit debugging information for thunks.
6063
6064         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
6065         * decl.c (make_typename_type): Handle getting a class template.
6066         * search.c (lookup_field_r): A class template is good enough for
6067         want_type.
6068
6069         * call.c (convert_like_real): Only use cp_convert for the bad part.
6070         (standard_conversion): Also allow bad int->enum.
6071         * typeck.c (ptr_reasonably_similar): Also allow functions to
6072         interconvert.  Pointers to same-size integers are reasonably
6073         similar.
6074
6075         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
6076         give it void type.
6077
6078 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
6079
6080         PR g++/3154
6081         * init.c (sort_base_init): Remove unreachable code.
6082         (expand_member_init): Adjust comment to reflect reality. Simplify
6083         and remove unreachable code.
6084
6085 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
6086
6087         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
6088         (cxx_init): Update prototype.
6089         * decl.c (init_decl_processing): Rename.  Move null node init
6090         to its creation time.
6091         * lex.c (cxx_init_options): Update.
6092         (cxx_init): Combine with old init_parse; also call
6093         cxx_init_decl_processing.
6094
6095 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
6096
6097         * decl.c (check_initializer): Try to complete the type of an
6098         array element before checking whether it's complete.  Don't
6099         complain about arrays with complete element types but an
6100         unknown size.
6101         (cp_finish_decl): Build the hierarchical constructor before
6102         calling maybe_deduce_size_from_array_init.
6103
6104 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6105
6106         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
6107
6108 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
6109
6110         PR g++/4206
6111         * parse.y (already_scoped_stmt): Remove.
6112         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
6113
6114 2001-11-12  H.J. Lu <hjl@gnu.org>
6115
6116         * cvt.c (ocp_convert): Don't warn the address of a weak
6117         function is always `true'.
6118
6119 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6120
6121         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
6122         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
6123         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
6124         * cp-tree.h (print_class_statistics): Remove.
6125         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
6126         cxx_print_identifier, cxx_set_yydebug): New.
6127         * lex.c (set_yydebug): Rename c_set_yydebug.
6128         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
6129         lang_print_xnode): Rename.
6130         * tree.c (print_lang_statistics): Rename.
6131
6132 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6133
6134         * class.c (dump_array): Fix format specifier warning.
6135
6136 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
6137
6138         * cp-lang.c (LANG_HOOKS_NAME): Override.
6139         (struct lang_hooks): Constify.
6140         * lex.c (cxx_init_options): Update.
6141         (lang_identify): Remove.
6142         * parse.y (language_string): Remove.
6143
6144 2001-11-08  Andreas Franck  <afranck@gmx.de>
6145
6146         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
6147         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
6148         suggested by autoconf.
6149         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
6150         (c++.install-common): Use the transformed target alias names.
6151
6152 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6153
6154         * Make-lang.in: Update.
6155         * cp-lang.c: Include langhooks-def.h.
6156
6157 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6158
6159         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
6160
6161 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6162
6163         * lex.c (copy_lang_type): Add static prototype.
6164
6165 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6166
6167         * pt.c (unify): Handle SCOPE_REF.
6168
6169 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
6170
6171         * tree.c (cp_copy_res_decl_for_inlining): Adjust
6172         DECL_ABSTRACT_ORIGIN for the return variable.
6173
6174 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
6175
6176         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
6177
6178 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
6179
6180         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
6181         semantics.c, spew.c: Fix spelling errors.
6182
6183 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6184
6185         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
6186
6187 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
6188
6189         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
6190         pop_everything.
6191
6192 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6193
6194         * cp-lang.c (cxx_get_alias_set): New function.
6195         Point LANG_HOOKS_GET_ALIAS_SET to it.
6196
6197 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6198
6199         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
6200         * cp-tree.h (make_unbound_class_template): Prototype new function.
6201         * decl.c (make_unbound_class_template): New function.
6202         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
6203         * error.c (dump_type): Likewise.
6204         * mangle.c (write_type): Likewise.
6205         * parse.y (template_parm): Likewise.
6206         (template_argument): Use make_unbound_class_template.
6207         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
6208         (tsubst): Likewise.
6209         (tsubst_copy): Likewise.
6210         (unify): Likewise.
6211         * tree.c (walk_tree): Likewise.
6212         * typeck.c (comptypes): Likewise.
6213
6214 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6215
6216         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
6217         extra calls into fewer ones.
6218
6219 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
6220
6221         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
6222         Warn when merging inline with attribute noinline.
6223         (start_decl, start_function): Warn if inline and attribute
6224         noinline appear in the same declaration.
6225
6226 2001-10-16  H.J. Lu <hjl@gnu.org>
6227
6228         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
6229         for tree checking disabled.
6230
6231 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
6232
6233         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
6234         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
6235
6236 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6237
6238         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
6239         (unify): Only handle MINUS_EXPR specially if the above flag is set
6240         and the subtracted constant is 1.  Clear the flag on recursive calls.
6241         Set it when unifying the maximum value in an INTEGER_TYPE's range.
6242
6243 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
6244
6245         * decl.c (bad_specifiers): Don't allow exception specifications
6246         on any typedefs.
6247
6248 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
6249
6250         * cp/lex.c (init_cp_pragma): Similarly.
6251
6252 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6253
6254         * pt.c (lookup_template_class): Build complete template arguments
6255         for BOUND_TEMPLATE_TEMPLATE_PARM.
6256
6257 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6258
6259         * cp-tree.h (TYPE_BINFO): Update comment.
6260         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
6261         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
6262         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
6263         (copy_type): Prototype new function.
6264         * lex.c (copy_lang_decl): Gather tree node statistics.
6265         (copy_lang_type): New function.
6266         (copy_type): Likewise.
6267         (cp_make_lang_type): Create lang_type for
6268         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
6269         and BOUND_TEMPLATE_TEMPLATE_PARM.
6270         * pt.c (tsubst): Use copy_type instead of copy_node.
6271         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
6272
6273 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6274
6275         * pt.c (determine_specialization): Ignore functions without
6276         DECL_TEMPLATE_INFO.
6277
6278 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
6279
6280         PR g++/4476
6281         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
6282
6283 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
6284
6285         * typeck2.c (store_init_value): Don't re-digest a bracketed
6286         initializer.
6287
6288         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
6289         ANON_AGGR_TYPE_P.
6290
6291 2001-10-11  Richard Henderson  <rth@redhat.com>
6292
6293         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
6294         of an asm statement.
6295         (build_vtbl_ref_1): Split out from build_vtbl_ref.
6296         (build_vfn_ref): Use it to handle vtable descriptors before
6297         calling build_vtable_entry_ref.
6298         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
6299
6300 2001-10-10  Richard Henderson  <rth@redhat.com>
6301
6302         * parse.y (asm_operand): Allow named operands.
6303         * semantics.c (finish_asm_stmt): Tweek for changed location
6304         of the operand constraint.
6305
6306 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
6307
6308         * call.c (standard_conversion): Add bad conversion between
6309         integers and pointers.
6310         (convert_like_real): Don't use convert_for_initialization for bad
6311         conversions; complain here and use cp_convert.
6312         (build_over_call): Don't handle bad conversions specially.
6313         (perform_implicit_conversion): Allow bad conversions.
6314         (can_convert_arg_bad): New fn.
6315         * cp-tree.h: Declare it.
6316         * typeck.c (convert_for_assignment): Use it.
6317         (ptr_reasonably_similar): Any target type is similar to void.
6318
6319 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
6320
6321         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
6322         (cp/cp-lang.o): New rule.
6323         * cp-tree.h: Declare hooks.
6324         * tree.c: Make hooks non-static.
6325         (init_tree): Don't initialize hooks here.
6326         * lex.c: Likewise.  Move definition of lang_hooks to...
6327         * cp-lang.c: ... new file.
6328
6329 2001-10-08  Richard Henderson  <rth@redhat.com>
6330
6331         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
6332         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
6333
6334 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6335
6336         * class.c (build_vtable_entry_ref): Const-ify.
6337         * decl.c (predefined_identifier,
6338         initialize_predefined_identifiers): Likewise.
6339         * init.c (build_new_1): Likewise.
6340         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
6341         Likewise.
6342
6343 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
6344
6345         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
6346         (INSNS_PER_STMT): Likewise.
6347         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
6348         (copy_body, initialize_inlined_parameters): Likewise.
6349         (declare_return_variable, inlinable_function_p): Likewise.
6350         (expand_call_inline, expand_calls_inline): Likewise.
6351         (optimize_inline_calls, clone_body): Likewise.
6352         * tree.c (walk_tree): Moved to ../tree-inline.c.
6353         (walk_tree_without_duplicates): Likewise.
6354         (copy_tree_r, remap_save_expr): Likewise.
6355
6356 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
6357
6358         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
6359         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
6360         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
6361         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
6362         (flag_inline_trees): Moved declaration to ../tree-inline.h.
6363         (walk_tree): Moved declaration to ../tree-inline.h.
6364         (walk_tree_without_duplicates, copy_tree_r): Likewise.
6365         (remap_save_expr): Likewise.
6366         * decl.c: Include tree-inline.h.
6367         (lang_mark_tree): Don't mark inlined_fns.
6368         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
6369         * optimize.c: Include tree-inline.h.
6370         (optimize_inline_calls): Move declaration to ../tree.h, as
6371         non-static.
6372         (remap_decl): Use language-independent constructs and hooks.
6373         (remap_block, copy_body_r, declare_return_variable): Likewise.
6374         (inlinable_function_p): Likewise.  Don't test for
6375         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
6376         no longer language-specific.
6377         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
6378         call of dump_function to...
6379         (optimize_function): Here...
6380         (clone_body): New function, extracted from...
6381         (maybe_clone_body): ... here.  Build decl_map locally and pass
6382         it on to clone_body.
6383         * pt.c, semantics.c: Include tree-inline.h.
6384         * tree.c: Likewise.
6385         (cp_walk_subtrees): New language-specific hook for tree inlining.
6386         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
6387         cp_is_overload_p, cp_auto_var_in_fn_p,
6388         cp_copy_res_decl_for_inlining): Likewise.
6389         (walk_tree): Move language-specific constructs into...
6390         (cp_walk_subtrees): this new function.
6391         (copy_tree_r): Use language-independent constructs and hooks.
6392         (init_tree): Initialize tree inlining hooks.
6393         (remap_save_expr): Adjust prototype so that the declaration
6394         does not require the definition of splay_tree.
6395
6396 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6397
6398         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
6399         to build the declaration instead of the declaration itself.
6400
6401 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
6402
6403         * decl2.c (cxx_decode_option): Add 'else'.
6404
6405         * spew.c (end_input): No longer static.
6406         * cp-tree.h: Declare it.
6407         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
6408
6409 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6410
6411         * call.c (build_over_call), typeck.c (build_function_call_real):
6412         Pass type attributes to check_function_format rather than name or
6413         assembler name.  Don't require there to be a name or assembler
6414         name to check formats.
6415
6416 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6417
6418         * decl.c (init_decl_processing): Don't call
6419         init_function_format_info.  Initialize lang_attribute_table
6420         earlier.
6421         (builtin_function): Call decl_attributes.
6422         (insert_default_attributes): New.
6423
6424 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
6425
6426         * decl.c (grokdeclarator): Copy array typedef handling from C
6427         frontend.
6428
6429         * decl.c (grokdeclarator): Copy too-large array handling from C
6430         frontend.
6431
6432 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
6433
6434         * config-lang.in (target_libs): Added target-gperf, so that we
6435         don't try to build it if C++ is disabled.
6436
6437 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
6438
6439         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
6440         (cp/errfn.o): Delete rule.
6441         (cp/error.o): Depend on flags.h.
6442         * errfn.c: Delete file.
6443         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
6444         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
6445         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
6446         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
6447         internal_error respectively.  Make cp_deprecated into a macro.
6448         Don't define cp_printer typedef or declare cp_printers.
6449         * error.c: Include flags.h.
6450         Delete: struct tree_formatting_info, print_function_argument_list,
6451         print_declaration, print_expression, print_function_declaration,
6452         print_function_parameter, print_type_id, print_cv_qualifier_seq,
6453         print_type_specifier_seq, print_simple_type_specifier,
6454         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
6455         print_parameter_declaration_clause, print_exception_specification,
6456         print_nested_name_specifier, and definition of cp_printers.
6457         (locate_error): New function.
6458         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
6459         rewritten in terms of locate_error and diagnostic.c.
6460         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
6461         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
6462         (init_error): Adjust to match.
6463
6464 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6465
6466         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
6467
6468 2001-09-21  Richard Henderson  <rth@redhat.com>
6469
6470         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
6471         (build_vtbl_initializer): Likewise.
6472         (build_vfn_ref): New.
6473         * cp-tree.h: Declare it.
6474         * call.c (build_over_call): Use it.
6475         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
6476         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
6477
6478 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
6479
6480         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
6481
6482 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
6483
6484         Table-driven attributes.
6485         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
6486         * decl2.c (cplus_decl_attributes): Only take one attributes
6487         parameter.
6488         * cp-tree.c (cplus_decl_attributes): Update prototype.
6489         * class.c (finish_struct), decl.c (start_decl, start_function),
6490         decl2.c (grokfield), friend.c (do_friend), parse.y
6491         (parse_bitfield): Update calls to cplus_decl_attributes.
6492         * decl.c (grokdeclarator): Take a pointer to a single ordinary
6493         attribute list.
6494         * decl.h (grokdeclarator): Update prototype.
6495         * decl2.c (grokfield): Take a single ordinary attribute list.
6496         * friend.c (do_friend): Likewise.
6497         * decl.c (shadow_tag, groktypename, start_decl,
6498         start_handler_parms, grokdeclarator, grokparms, start_function,
6499         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
6500         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
6501         (process_template_parm, do_decl_instantiation): Pass single
6502         ordinary attribute lists around.
6503         * decl.c (grokdeclarator): Correct handling of nested attributes.
6504         Revert the patch
6505         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
6506                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
6507                 not the left.
6508         .
6509         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
6510         (cp_attribute_table): Declare.
6511         * decl.c (valid_lang_attribute): Don't define.
6512         (lang_attribute_table): Define.
6513         (init_decl_processing): Initialize lang_attribute_table instead of
6514         valid_lang_attribute.
6515         * tree.c (cp_valid_lang_attribute): Remove.
6516         (handle_java_interface_attribute, handle_com_interface_attribute,
6517         handle_init_priority_attribute): New functions.
6518         (cp_attribute_table): New array.
6519         * decl2.c (import_export_class): Don't use
6520         targetm.valid_type_attribute.
6521
6522 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6523
6524         * Make-lang.in (cp/error.o): Depend on real.h
6525         * error.c: #include "real.h"
6526
6527 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6528
6529         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
6530         xmalloc/strcpy/strcat.
6531
6532 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6533
6534         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
6535         Const-ification.
6536         * pt.c (tsubst_decl): Likewise.
6537
6538 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6539
6540         * decl2.c (lang_f_options): Const-ification.
6541         * lex.c (cplus_tree_code_name): Likewise.
6542         * spew.c (yyerror): Likewise.
6543
6544 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6545
6546         PR c++/3986
6547         * class.c (force_canonical_binfo_r): Check & move an indirect
6548         primary base first.
6549         (force_canonical_binfo): Check that it's not already
6550         canonical.
6551         (mark_primary_virtual_base): Remove BINFO parameter.
6552         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
6553
6554 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6555
6556         Remove TYPE_NONCOPIED_PARTS.
6557         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
6558         CLASSTYPE_PURE_VIRTUALS.
6559         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
6560         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
6561         (layout_class_type): Don't call fixup_inline_methods here ...
6562         (finish_struct_1): ... call it here.
6563
6564 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
6565
6566         * decl.c (duplicate_decls): Remove code deadling with
6567         DECL_SAVED_INSNS.
6568         * decl2.c (finish_file): Likewise.
6569         * pt.c (instantiate_decl): Likewise.
6570         * semantics.c (expand_body): Don't defer local functions if
6571         they wouldn't be deferred for some other reason.  Don't
6572         generate RTL for functions that will not be emitted.
6573         (genrtl_start_function): Remove code deadling with
6574         DECL_SAVED_INSNS.
6575         (genrtl_finish_function): Likewise.
6576
6577 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6578
6579         PR c++/4203
6580         * call.c (build_over_call): Do not optimize any empty base
6581         construction.
6582
6583 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6584
6585         * error.c (dump_template_decl): Output template parameters
6586         together with their specifiers.
6587         Output `class' prefix for template template parameter.
6588         (dump_decl): Fix formatting.
6589
6590 2001-08-30  Kurt Garloff  <garloff@suse.de>
6591
6592         * optimize.c (inlinable_function_p): Allow only smaller single
6593         functions. Halve inline limit after reaching recursive limit.
6594
6595 2001-08-30  Joern Rennecke <amylaar@redhat.com>
6596             Jason Merrill  <jason_merrill@redhat.com>
6597
6598         * class.c (build_vtable_entry_ref): Subtract in char*, not
6599         ptrdiff_t.
6600
6601 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
6602
6603         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
6604         (build_cplus_array_type): Use cp_build_qualified_type, not
6605         TYPE_MAIN_VARIANT, to get an unqualified version.
6606
6607         * decl2.c (grok_alignof): Lose.
6608         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
6609         * typeck.c (c_alignof): Lose.
6610         * semantics.c (finish_sizeof, finish_alignof): New.
6611         * parse.y: Use them.
6612         * cp-tree.h: Declare them.
6613
6614 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
6615
6616         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
6617         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
6618         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
6619
6620 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
6621
6622         * typeck2.c (add_exception_specifier): Only require complete type if
6623         not in processing template declaration.
6624
6625 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6626
6627         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
6628         GNU_xref_start_scope and GNU_xref_end_scope.
6629
6630         * tree.c (TYPE_HASH): Moved to ../tree.h.
6631
6632 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
6633
6634         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
6635         on COMPOUND_EXPRs.
6636
6637 2001-08-14  Richard Henderson  <rth@redhat.com>
6638
6639         * class.c, cp-tree.h (build_vfn_ref): Remove.
6640         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
6641
6642 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
6643
6644         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
6645         empty class assignment as having side-effects to avoid
6646         spurious warnings.
6647
6648 2001-08-13  Zack Weinberg  <zackw@panix.com>
6649
6650         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
6651         * except.c: Include libfuncs.h.
6652
6653 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6654
6655         * decl.c (grokdeclarator): Clarify diagnostic message.
6656
6657 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6658
6659         * decl2.c (do_nonmember_using_decl): Replace using directive
6660         with using declaration in the error message.
6661
6662 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6663
6664         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
6665         criterion to avoid rebuilding expression tree instead of
6666         processing_template_decl.
6667
6668 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6669
6670         Support named return value optimization for inlines, too.
6671         * decl.c (finish_function): Nullify returns here.
6672         * semantics.c (genrtl_start_function): Not here.
6673         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
6674         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
6675         Also nullify the CLEANUP_STMT for the nrv.
6676         * cp-tree.h: Declare it.
6677         * optimize.c (declare_return_variable): Replace the nrv with the
6678         return variable.
6679         * typeck.c (check_return_expr): Be more flexible on alignment check.
6680         Ignore cv-quals when checking for a matching type.
6681
6682 2001-08-09  Richard Henderson  <rth@redhat.com>
6683
6684         * decl2.c (finish_objects): Use target hooks instead of
6685         assemble_constructor and assemble_destructor.
6686
6687 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6688
6689         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
6690
6691 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
6692
6693         PR c++/3820
6694         Stop using TYPE_NONCOPIED_PARTS.
6695         * call.c (build_over_call): Be careful when copy constructing
6696         or assigning to an empty class.
6697         * class.c (check_bases_and_members): It has a
6698         COMPLEX_ASSIGN_REF if it has a vptr.
6699         (layout_class_type): Don't add empty class padding to
6700         TYPE_NONCOPIED_PARTS.
6701         (finish_struct_1): Don't add the VFIELD either.
6702         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
6703         initialization.
6704
6705 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
6706
6707         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
6708
6709 2001-08-06  Richard Henderson  <rth@redhat.com>
6710
6711         * decl2.c (finish_objects): Pass a symbol_ref and priority to
6712         assemble_{constructor,destructor}.  Remove priority handling.
6713
6714 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
6715
6716         Don't allow template-id in using-declaration.
6717         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
6718         (do_class_using_decl): Likewise.
6719
6720 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
6721
6722         * cp/spew.c (read_token): No need to pop buffers.
6723
6724 2001-08-02  Stan Shebs  <shebs@apple.com>
6725
6726         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
6727         (fnaddr_from_vtable_entry): Remove decl.
6728         * method.c (use_thunk): Update comment.
6729
6730 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
6731
6732         * repo.c (get_base_filename): Change return value to const char
6733         pointer.
6734
6735 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
6736
6737         Kill -fhonor-std.
6738         * NEWS: Document.
6739         * cp-tree.h (flag_honor_std): Remove.
6740         (CPTI_FAKE_STD): Remove.
6741         (std_node): Remove comment about it being NULL.
6742         (fake_std_node): Remove.
6743         * decl.c (in_fake_std): Remove.
6744         (walk_namespaces_r): Remove fake_std_node check.
6745         (push_namespace): Remove in_fake_std code.
6746         (pop_namespace): Likewise.
6747         (lookup_name_real): Remove fake_std_node check.
6748         (init_decl_processing): Always create std_node. Always add
6749         std:: things there.
6750         (builtin_function): Always put non '_' fns in std.
6751         * decl2.c (flag_honor_std): Remove.
6752         (lang_f_options): Remove honor-std.
6753         (unsupported_options): Add honor-std.
6754         (set_decl_namespace): Remove fake_std_node check.
6755         (validate_nonmember_using_decl): Likewise.
6756         (do_using_directive): Likewise.
6757         (handle_class_head): Likewise.
6758         * dump.c (cp_dump_tree): Likewise.
6759         * except.c (init_exception_processing): Adjust.
6760         * init.c (build_member_call): Remove fake_std_node check.
6761         (build_offset_ref): Likewise.
6762         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
6763         * rtti.c (init_rtti_processing): Adjust.
6764
6765 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
6766
6767         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
6768         operand while calling cp_tree_equal.
6769
6770 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6771
6772         The 3.0 ABI no longer has vbase pointer fields.
6773         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
6774         FORMAT_VBASE_NAME): Remove.
6775         * method.c (do_build_copy_constructor): Adjust.
6776         (do_build_assign_ref): Adjust.
6777         * search.c (lookup_field_r): Adjust.
6778         * typeck.c (build_component_ref): Adjust.
6779
6780         The 3.0 ABI always has a vtable pointer at the start of every
6781         polymorphic class.
6782         * rtti.c (build_headof_sub): Remove.
6783         (build_headof): Adjust.
6784         (get_tinfo_decl_dynamic): No need to check flag_rtti
6785         here. Adjust.
6786         (create_real_tinfo_var): Explain why we need a hidden name.
6787
6788 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6789
6790         PR c++/3631
6791         * class.c (update_vtable_entry_for_fn): The fixed adjustment
6792         of a virtual thunk should be from declaring base.
6793
6794 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
6795
6796         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
6797         the shared virtual base, so preserving inheritance graph order.
6798
6799 2001-07-30  Andreas Jaeger  <aj@suse.de>
6800
6801         * decl2.c: Remove unused var global_temp_name_counter.
6802
6803 2001-07-28  Richard Henderson  <rth@redhat.com>
6804
6805         * method.c (pending_inlines): Remove.
6806
6807 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6808
6809         * class.c (mark_primary_virtual_base): Don't adjust base
6810         offsets here.
6811         (dfs_unshared_virtual_bases): Adjust them here.
6812         (mark_primary_bases): Explain why we adjust at the end.
6813
6814 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
6815
6816         * class.c (finish_struct_1): When copying the primary base's
6817         VFIELD, make sure we find it is at offset zero.
6818
6819 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6820
6821         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
6822         tsubst_expr for default template arguments.
6823
6824 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6825
6826         PR c++/3621
6827         * spew.c (yylex): Only copy the token's lineno, if it is
6828         nonzero.
6829
6830 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6831
6832         PR c++/3624
6833         * call.c (resolve_args): Simplify, call
6834         convert_from_reference.
6835         (build_new_op): Resolve and convert from reference ARG1
6836         earlier. Adjust ARG2 & ARG3 resolve and conversion.
6837
6838 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
6839
6840         * decl.c (last_function_parm_tags): Remove.
6841         (current_function_parm_tags): Remove.
6842         (init_decl_processing): Adjust.
6843         (start_function): Adjust.
6844         (store_parm_decls): Adjust.
6845
6846         PR c++/3152
6847         * decl.c (grokdeclarator): Detect when a function typedef is
6848         declaring a function, and create last_function_parms correctly.
6849
6850 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
6851
6852         * call.c (joust): Only prefer a non-builtin candidate to a builtin
6853         one if they have the same signature.
6854
6855         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
6856         it rather than toplevel_bindings_p.  Give it a mangled name if static.
6857         (convert_to_reference): Adjust.
6858         * decl2.c (get_temp_name): Lose.
6859         * mangle.c (mangle_ref_init_variable): New fn.
6860         (mangle_guard_variable): Strip the ref-init header.
6861         * cp-tree.h: Adjust.
6862         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
6863         initializer.
6864         (grok_reference_init): Always use DECL_INITIAL.
6865
6866 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6867
6868         PR c++/3416
6869         * call.c (build_conditional_expr): Recheck args after
6870         conversions.
6871         * cp-tree.h (build_conditional_expr): Move to correct file.
6872         * typeck.c (decay_conversion): Diagnose any unknown types
6873         reaching here.
6874         (build_binary_op): Don't do initial decay or default
6875         conversions on overloaded functions.
6876         (build_static_cast): Don't do a decay conversion here.
6877
6878 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6879
6880         PR c++/3543
6881         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
6882         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
6883
6884 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6885
6886         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
6887         (create_vtbl_ptr): ... here.
6888
6889 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6890
6891         * class.c (build_vbase_offset_vbtl_entries): Look for
6892         non-primary base of which we are a sub vtable.
6893
6894 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
6895
6896         * semantics.c (finish_this_expr):  Remove unused code.
6897
6898 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
6899
6900         Simplify rtti, now we've only one ABI.
6901         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
6902         CPTI_TINFO_VAR_ID.
6903         (tinfo_decl_id, tinfo_var_id): Remove.
6904         (get_typeid_1): Remove.
6905         * rtti.c
6906         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
6907         (typeid_ok_p): New function.
6908         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
6909         (get_tinfo_decl): Remove old abi documentation.
6910         (tinfo_from_decl): Remove.
6911         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
6912         (get_typeid_1): Remove.
6913         (get_base_offset): Remove.
6914         (synthesize_tinfo_var): Absorb get_base_offset.
6915         (create_real_tinfo_var): Don't use tinfo_decl_id.
6916
6917 2001-07-23  Graham Stott  <grahams@redhat.com>
6918
6919         * cp/class.c (type_requires_array_cookie): Fix use of uninitialized
6920         variable has_two_argument_delete_p.
6921
6922 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
6923
6924         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
6925         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
6926         (CPTI_INDEX_IDENTIFIER): Remove.
6927         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
6928         (delta2_identifier): Remove.
6929         (index_identifier): Remove.
6930         (pfn_or_delta2_identifier): Remove.
6931         (flag_vtable_thunks): Remove.
6932         (VTABLE_DELTA2_NAME): Remove.
6933         (VTABLE_INDEX_NAME): Remove.
6934         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
6935         (vfunc_ptr_type_node): Adjust.
6936         (VTABLE_NAME_PREFIX): Adjust.
6937         (build_vfn_ref): Lose first parameter.
6938         (fixup_all_virtual_upcast_offsets): Remove.
6939         * decl.c (initialize_predefined_identifiers): Remove
6940         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
6941         (init_decl_processing): Remove no-vtable-thunk code.
6942         * decl2.c (flag_vtable_thunks): Remove.
6943         (mark_vtable_entries): Remove no-vtable-thunk code.
6944         * error.c (dump_decl): Remove no-vtable-thunk code.
6945         (dump_expr): Adjust ptr to member function code.
6946         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
6947         code.
6948         * rtti.c (build_headof): Remove no-vtable-thunk code.
6949         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
6950         * search.c (get_base_distance): Remove expand_upcast_fixups case.
6951         (virtual_context) Remove.
6952         (expand_upcast_fixups): Remove.
6953         (fixup_virtual_upcast_offsets): Remove.
6954         (fixup_all_virtual_upcast_offsets): Remove.
6955         * typeck.c (get_member_function_from_ptrfunc): Remove
6956         no-vtable-thunk code.
6957         * call.c (build_over_call): Adjust call to build_vfn_ref.
6958         * class.c (build_vfn_ref): Lose first parameter. Remove
6959         no-vtable-thunk code.
6960         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
6961         (build_vtable_entry): Remove no-vtable-thunk code.
6962
6963 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
6964
6965         Remove old-abi remnants. Remove comments about old abi
6966         behavior. Remove references to 'new-abi' in comments.
6967         * cp-tree.h: Adjust comments.
6968         (vbase_offsets_in_vtable_p): Delete.
6969         (vcall_offsets_in_vtable_p): Delete.
6970         (vptrs_present_everywhere_p): Delete.
6971         (all_overridden_vfuns_in_vtables_p): Delete.
6972         (merge_primary_and_secondary_vtables_p): Delete.
6973         (TYPE_CONTAINS_VPTR_P): Adjust.
6974         (VTT_NAME_PREFIX): Remove.
6975         (CTOR_VTBL_NAME_PREFIX): Remove.
6976         (init_vbase_pointers): Remove.
6977         * class.c: Adjust coments.
6978         (build_vbase_pointer_fields): Delete.
6979         (build_vbase_pointer): Remove old-abi code.
6980         (build_secondary_vtable): Likewise.
6981         (modify_all_vtables): Likewise.
6982         (create_vtable_ptr): Likewise.
6983         (layout_class_type): Likewise.
6984         (finish_struct_1): Likewise.
6985         (finish_vtbls): Likewise.
6986         (dfs_finish_vtbls): Delete.
6987         (build_vbase_offset_vtbl_entries): Remove old-abi code.
6988         * cvt.c: Adjust comments.
6989         * decl.c: Adjust comments.
6990         * decl2.c: Adjust comments.
6991         * init.c: Adjust comments.
6992         (construct_virtual_bases): Remove old-abi code.
6993         * lang-specs.h: Remove -fno-new-abi.
6994         * mangle.c: Adjust comments.
6995         * rtti.c: Adjust comments.
6996         (get_base_offset): Remove old-abi-code.
6997         * search.c: Adjust comments.
6998         (dfs_init_vbase_pointers): Remove.
6999         (dfs_vtable_path_unmark): Remove.
7000         (init_vbase_pointers): Remove.
7001         * semantics.c: Adjust comments.
7002         (emit_associated_thunks): Remove old-abi code.
7003         * typeck.c: Adjust comments.
7004
7005 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
7006
7007         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
7008         params.h.
7009
7010 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
7011
7012         * class.c (finish_struct_anon): Forbid nested classes.
7013
7014 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7015
7016         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
7017         * optimize.c: Include debug.h.
7018         (maybe_clone_body): Use debug hook.
7019         * semantics.c: Include debug.h.
7020         (expand_body): Use debug hook.
7021
7022 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
7023
7024         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
7025
7026 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
7027
7028         * class.c (type_requires_array_cookie): New function.
7029         (check_methods): Don't try to figure out whether the type needs a
7030         cookie here.
7031         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
7032         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
7033         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
7034         * pt.c (instantiate_class_template): Don't set
7035         TYPE_VEC_DELETE_TAKES_SIZE.
7036         * NEWS: Document ABI changes from GCC 3.0.
7037
7038 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
7039             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
7040
7041         * NEWS (Changes in GCC 3.0): Fix typo.
7042
7043 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
7044
7045         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
7046         which attributes are to be attached, and a flags argument.  Update
7047         call to decl_attributes.
7048         (grokfield): Update call to decl_attributes.
7049         * class.c (finish_struct): Update call to cplus_decl_attributes.
7050         * cp-tree.h (cplus_decl_attributes): Update prototype.
7051         * decl.c (start_decl, grokdeclarator, start_function): Update
7052         calls to decl_attributes and cplus_decl_attributes.
7053         * friend.c (do_friend): Update call to cplus_decl_attributes.
7054         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
7055
7056 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
7057
7058         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
7059         for `register' variables with an asm-specification.
7060
7061 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
7062
7063         * semantics.c (finish_asm_stmt): Mark the output operands
7064         to an asm addressable, if necessary.
7065
7066 2001-07-11  Ben Elliston  <bje@redhat.com>
7067
7068         * Revert this change -- there is a subtle bug.
7069
7070         PR c++/80
7071         * decl.c (finish_enum): New "attributes" argument; pass it to
7072         cplus_decl_attributes.  Use a narrower type if the enum is packed.
7073         * cp-tree.h (finish_enum): Adjust prototype.
7074         * parse.y (enum_head): New non-terminal.
7075         (structsp): Use it. Enums now may be preceded or followed by
7076         optional attributes -- pass their chained tree to finish_enum().
7077         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
7078
7079 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
7080
7081         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
7082         variables.
7083
7084 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
7085
7086         * semantics.c (cp_expand_stmt): Fix for null
7087         current_function_return_value.
7088
7089 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
7090
7091         * call.c (build_op_delete_call): Initialize fn.
7092         (convert_like_real): Delete conditional.
7093         (joust): Initialize *w and *l.
7094         * class.c: Add prototype for binfo_ctor_vtable.
7095         (get_primary_binfo): Initialize result.
7096         * init.c (build_java_class_ref): Initialize name.
7097
7098 2001-07-09  Erik Rozendaal  <dlr@acm.org>
7099
7100         * typeck.c (unary_complex_lvalue): Do not duplicate the
7101         argument to modify, pre-, or post-increment when used as an
7102         lvalue and when the argument has side-effects.
7103
7104 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7105
7106         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7107         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
7108         cplus_decl_attributes even if attrs is NULL.
7109         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
7110
7111 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7112
7113         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
7114         calls to decl_attributes.
7115
7116 2001-07-06  Ira Ruben   <ira@apple.com>
7117
7118         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
7119         be DECL_TEMPLATE_RESULT.
7120
7121 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7122
7123         * cp-tree.h (copy_template_template_parm): Rename to ...
7124         (bind_template_template_parm): ... here.
7125         * tree.c (copy_template_template_parm): Rename to ...
7126         (bind_template_template_parm): ... here.  Remove the case when
7127         NEWARGS is NULL_TREE.
7128         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
7129         BOUND_TEMPLATE_TEMPLATE_PARM.
7130         * pt.c (lookup_template_class): Adjust.
7131
7132 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
7133
7134         * cvt.c (convert_lvalue): New fn.
7135         * cp-tree.h: Declare it.
7136         * method.c (do_build_assign_ref): Use it.
7137         (do_build_copy_constructor): Convert parm to base types
7138         before calling base constructors.
7139
7140         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
7141         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
7142         optimize.
7143         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
7144
7145 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
7146
7147         * optimize.c (optimize_inline_calls): New function, broken out
7148         of ...
7149         (optimize_function): ... here. Call it. Don't inline if it is
7150         a thunk.
7151         (dump_function): Print name of dump flag causing this dump.
7152         * semantics.c (expand_body): Move thunk inline check to
7153         optimize_function.
7154
7155 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7156
7157         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
7158         (comptypes): Use target.comp_type_attributes.
7159
7160 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
7161
7162         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
7163
7164 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
7165
7166         * error.c (lang_print_error_function): Add a `diagnostic_context *'
7167         parameter. Tweak.
7168
7169 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7170
7171         * decl2.c (import_export_class): Update.
7172
7173 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7174
7175         * error.c (init_error): Adjust settings.
7176
7177 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7178
7179         * error.c (init_error): Adjust settings.
7180
7181 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
7182
7183         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
7184         return pointers to data members by reference rather than by value.
7185
7186 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
7187
7188         Implement the Named Return Value optimization.
7189         * cp-tree.h (struct cp_language_function): Add x_return_value.
7190         (current_function_return_value): Now a macro.
7191         * decl.c: Don't define it.
7192         (define_label, finish_case_label): Don't clear it.
7193         (init_decl_processing): Don't register it with GC.
7194         * semantics.c (genrtl_finish_function): Don't check it for
7195         no_return_label.  Copy the RTL from the return value to
7196         current_function_return_value and walk, calling...
7197         (nullify_returns_r): ...this new fn.
7198         * typeck.c (check_return_expr): Set current_function_return_value.
7199
7200 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
7201
7202         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
7203         sharing a ctor vtable with.  Merge code for cases 1 and 2.
7204         (binfo_ctor_vtable): New fn.
7205         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
7206
7207 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
7208
7209         * class.c (dfs_find_final_overrider): Fix logic.
7210
7211         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
7212         virtual thunk instead of non-virtual.
7213         (get_matching_virtual): Uncomment.
7214
7215         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
7216         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
7217         PARM, not ARG.
7218
7219 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7220
7221         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
7222         we've not emerged from the hierarchy of RTTI_BINFO on reaching
7223         a non-virtual base.
7224
7225 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
7226
7227         * NEWS: Update release number.
7228
7229 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7230
7231         PR c++/3130, c++/3131, c++/3132
7232         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
7233         * class.c (force_canonical_binfo_r): Move
7234         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
7235         virtual bases unless they're primary and what they're primary
7236         too has been moved.
7237         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
7238         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
7239         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
7240         derived binfo.
7241         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
7242         (layout_nonempty_base_or_field): Add most derived type
7243         parameter. Adjust.
7244         (layout_empty_base): Likewise.
7245         (build_base_field): Likewise.
7246         (build_base_fields): Likewise.
7247         (propagate_binfo_offsets): Add most derived type
7248         parameter. Skip non canonical virtual bases too.
7249         (dfs_set_offset_for_unshared_vbases): Don't skip primary
7250         bases. Do skip canonical bases.
7251         (layout_virtual_bases): Adjust.
7252         (layout_class_type): Adjust.
7253         (dfs_get_primary_binfo): Build list of virtual primary base
7254         candidates.
7255         (get_primary_binfo): Check that the shared virtual primary
7256         base candidate was found first.
7257         (accumulate_vtbl_inits): Don't do anything for non-vptr
7258         containing binfos. For case 1 primary virtual bases, keep
7259         checking that we've not emerged from the hierarchy of RTTI_BINFO.
7260
7261 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
7262
7263         PR c++/3089
7264         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
7265         hierarchy looking for primary bases for a ctor
7266         vtable. Recursively call oneself, if we meet our primary via
7267         this route and haven't met it yet via inheritance graph order.
7268
7269 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
7270
7271         * lang-options.h: Emit documentation for -fno-honor-std, not
7272         -fhonor-std.
7273
7274 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
7275
7276         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
7277         Don't clobber delta.
7278         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
7279
7280 2001-06-10  Mark Mitchell <mark@codesourcery.com>
7281             Gabriel Dos Reis  <gdr@codesourcery.com>
7282
7283         * Make-lang.in (cp/call.o): Depend on diagnostic.h
7284         (cp/typeck.o): Depend on diagnostic.h
7285         (cp/typeck2.o): Depend on diagnostic.h
7286         (cp/repo.o): Depend on dignostic.h
7287         * typeck.c: #include diagnostic.h
7288         (convert_for_initialization): Remove extern declaration for
7289         warningcount and errorcount.
7290
7291         * call.c: #include diagnostic.h
7292         (convert_like_real): Remove extern declaration for warnincount and
7293         errorcount.
7294
7295         * repo.c: #include diagnostic.h
7296         * typeck2.c: #include diagnostic.h
7297
7298 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7299
7300         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
7301         in previous change.
7302
7303 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7304
7305         PR c++/2929
7306         * friend.c (do_friend): Use push_decl_namespace for classes at
7307         namespace scope.
7308
7309 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
7310             Jason Merrill <jason_merrill@redhat.com>
7311
7312         PR c++/3061
7313         * class.c (build_secondary_vtable): Use assert, rather than an error
7314         message.
7315         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
7316         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
7317         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
7318         Don't set BINFO_VTABLE for a primary virtual base.
7319
7320 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
7321
7322         * decl.c (duplicate_decls): Update source position information
7323         when a template function is defined.
7324
7325 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
7326
7327         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
7328
7329 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
7330
7331         PR c++/2914
7332         * decl.c (pushtag): Don't push into a complete type's scope.
7333
7334 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
7335
7336         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
7337         (struct lang_decl_flags): Lose generate_with_vtable_p.
7338         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
7339         * class.c (copy_virtuals): Adjust.
7340         * decl2.c (mark_vtable_entries): Adjust.
7341         * method.c (make_thunk, build_vtable_entry): Adjust.
7342         * class.c (update_vtable_entry_for_fn): Only look as far as the
7343         first defining class.
7344         (build_vtbl_initializer): Put nothing in the slot for a function only
7345         defined in a lost primary virtual base.
7346         (add_vcall_offset_vtbl_entries_1): Use the same code for
7347         the lost primary case and the normal case.
7348         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
7349         (get_vfield_offset, get_derived_offset): Lose.
7350         (dfs_find_final_overrider): Use look_for_overrides_here.
7351         (get_matching_virtual): New fn.
7352         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
7353         not BV_VCALL_INDEX.
7354         * search.c (look_for_overrides_here): Split out from...
7355         (look_for_overrides_r): Here.
7356
7357         * class.c (find_final_overrider): Return error_mark_node on error.
7358
7359         * decl2.c (key_method): #if 0 accidental change.
7360
7361 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7362
7363         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
7364         (build_over_call): Likewise.
7365         * decl.c (grokparms): Likewise.
7366         * pt.c (tsubst_decl): Likewise.
7367         * typeck.c (convert_arguments): Likewise.
7368
7369 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
7370
7371         * semantics.c (begin_class_definition): Robustify.
7372
7373         * pt.c (instantiate_decl): Tell the repository code about the
7374         clones, not the cloned functions.
7375         * repo.c (repo_template_used): Explicitly instantiate the cloned
7376         function, not the clones.
7377
7378 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7379
7380         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
7381         ICS_BAD_FLAG on created conversion.
7382         (compare_ics): Break out rank.
7383
7384 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7385
7386         * decl.c (xref_tag): Remove extraneous %s on dependent name
7387         lookup warning.
7388
7389 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7390
7391         * class.c (layout_vtable_decl): Fix off by one error on
7392         build_index_type.
7393         (build_vtt): Likewise.
7394         (build_ctor_vtbl_group): Likewise.
7395
7396 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
7397
7398         * class.c (maybe_indent_hierarchy): New function.
7399         (dump_class_hierarchy_r): Add flags. Dump extra binfo
7400         information, if enabled. Use maybe_indent_hierarchy. Adjust
7401         output format.
7402         (dump_class_hierarchy): Adjust prototype. Adjust output format.
7403         (dump_array, dump_vtable, dump_vtt): New functions.
7404         (finish_struct_1): Adjust hierarchy dumping.
7405         (initialize_vtable): Call dump_vtable.
7406         (build_vtt): Call dump_vtt.
7407         (build_ctor_vtbl_group): Call dump_vtable.
7408         * decl2.c (flag_dump_class_layout): Remove.
7409         (cxx_decode_option): Remove dump translation unit
7410         and dump class hierarchy check. Call dump_switch_p.
7411         (finish_file): Adjust dumping.
7412         (dump.c): Only dump base classes if not TDF_SLIM.
7413         Only dump namespace members if not TDF_SLIM.
7414         * optimize.c (dump_function): New function.
7415         (optimize_function): Call dump_function.
7416         * semantics.c (expand_body): Use dump_enabled_p.
7417
7418 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
7419
7420         PR g++/2936
7421         Part missed from first commit
7422         * decl2.c (finish_anon_union): Copy context.
7423
7424 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
7425
7426         PR g++/2936
7427         * optimize.c (remap_decl): Remap anonymous aggregate members too.
7428
7429 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
7430
7431         PR g++/2823
7432         * semantics.c (expand_body): Don't optimize thunks.
7433
7434 2001-05-25  Sam TH  <sam@uchicago.edu>
7435
7436         * cp-tree.h lex.h: Fix header include guards.
7437
7438 2001-05-25  Mark Mitchell <mark@codesourcery.com>
7439
7440         * decl.c (init_decl_processing): Tweak.
7441
7442 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
7443
7444         * decl.c (duplicate_decls): Tidy.
7445         (init_decl_processing): Always set flag_no_builtin.
7446
7447 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
7448
7449         PR c++/2184
7450         * decl2.c (do_local_using_decl): Push the decls, even in a
7451         template.
7452
7453 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
7454
7455         * optimize.c (initialize_inlined_parameters): Don't set
7456         TREE_READONLY for a VAR_DECL taking the place of an inlined
7457         PARM_DECL.
7458
7459 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
7460
7461         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
7462         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
7463         attribute.
7464
7465 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
7466
7467         * parse.y: Refer to compound literals as such, not as
7468         constructor-expressions.
7469
7470 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
7471
7472         * call.c (build_op_delete_call): Ignore exception-specifications
7473         when looking for matching delete operators.
7474         * init.c (build_new_1): Compute whether or not the allocation
7475         function used is a placement allocation function or not, and
7476         communicate this information to build_op_delete_call.
7477
7478 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
7479
7480         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
7481         (build_vtbl_ref): Adjust.
7482         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
7483         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
7484         Re-add vtable-gc.
7485         (unsupported_options): Correspondingly.
7486
7487         * decl2.c (maybe_make_one_only): Check flag_weak, not
7488         supports_one_only().
7489
7490         * cp-tree.def (START_CATCH_STMT): Lose.
7491         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
7492         * tree.c (cp_statement_code_p): Don't case it.
7493         * semantics.c (cp_expand_stmt): Likewise.
7494         * cp-tree.h (START_CATCH_TYPE): Lose.
7495         (HANDLER_TYPE): New.
7496         * except.c (expand_start_catch_block): Don't start any blocks.
7497         Return the type.
7498         (expand_end_catch_block): Don't end any blocks.
7499         * parse.y (handler): Don't pass anything from finish_handler_parms
7500         to finish_handler.
7501         * pt.c (tsubst_expr): Likewise.
7502         * semantics.c (begin_handler): Call note_level_for_catch here.
7503         (finish_handler_parms): Don't return anything.
7504         (genrtl_catch_block, begin_catch_block): Lose.
7505         (genrtl_handler): Call expand_start_catch here.
7506
7507 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
7508
7509         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
7510         (get_vtable_decl, build_vtt): Not here.
7511
7512 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
7513
7514         PR c++/2781
7515         * optimize.c (update_cloned_parm): Copy addressability and other
7516         flags.
7517
7518 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7519
7520         * pt.c (determine_specialization): Ignore artificial functions.
7521
7522 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
7523
7524         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
7525         (C_RID_CODE): Remove.
7526         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
7527         (init_parse): Don't do it here.
7528
7529 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
7530
7531         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
7532         function declaration to avoid stripping the symbol's attributes.
7533
7534 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
7535
7536         * decl.c (pushdecl): Adjust error string.
7537         (xref_tag): Adjust friend class injection warning. Remove the
7538         inherited name from the class shadowed scope.
7539
7540 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
7541
7542         * except.c (cp_protect_cleanup_actions): New function.
7543         (init_exception_processing): Don't set protect_cleanup_actions
7544         here.  Do set lang_protect_cleanup_actions.
7545
7546 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7547
7548         * spew.c (read_token): Call yyerror on all unexpected tokens.
7549
7550 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
7551
7552         * init.c (member_init_ok_or_else): Take a tree rather than
7553         string for name.
7554         (expand_member_init): Adjust.
7555
7556 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
7557
7558         * decl.c (duplicate_decls): Suppress warning about duplicate
7559         decls if the first decl is a friend.
7560
7561 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
7562
7563         * except.c (choose_personality_routine): Export.  Add
7564         explanatory comment.  Take an enum languages, not a boolean.
7565         (initialize_handler_parm): Adjust to match.
7566         * cp-tree.h: Prototype choose_personality_routine.
7567         * lex.c (handle_pragma_java_exceptions): New function.
7568         (init_cp_pragma): Register #pragma GCC java_exceptions.
7569
7570 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
7571
7572         * method.c (build_mangled_C99_name): Remove unused prototype.
7573
7574 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
7575
7576         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
7577         * typeck.c (get_member_function_from_ptrfunc,
7578         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
7579         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
7580
7581         Reverted Geoff Keating's 2001-05-03's patch.
7582
7583 2001-05-11  Ira Ruben   <ira@apple.com>
7584
7585         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
7586
7587 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
7588
7589         * cp-tree.h (finish_label_expr, lookup_label): Delete.
7590         * parse.y: Update for '&&'; don't issue warning here.
7591         * semantics.c (finish_label_expr): Delete.
7592
7593 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
7594
7595         * splay-tree.h (splay_tree_max): New function.
7596         (splay_tree_min): Likewise.
7597
7598 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
7599
7600         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
7601         (pfn_vflag_identifier): Define.
7602         Update comment about layout of pointer functions.
7603         (build_ptrmemfunc1): Update prototype.
7604         (expand_ptrmemfunc_cst): Update prototype.
7605         * decl.c (initialize_predefined_identifiers): Initialize
7606         pfn_vflag_identifier.
7607         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
7608         an extra field to the type.
7609         * expr.c (cplus_expand_constant): Pass 'flag' between
7610         expand_ptrmemfunc_cst and build_ptrmemfunc1.
7611         * typeck.c (get_member_function_from_ptrfunc): When
7612         FUNCTION_BOUNDARY < 16, look at additional field to determine
7613         if a pointer-to-member is a real pointer or a vtable offset.
7614         (build_ptrmemfunc1): Add new parameter to contain extra field.
7615         (build_ptrmemfunc): Pass the extra field around.
7616         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
7617         (pfn_from_ptrmemfunc): Ignore the extra field.
7618
7619 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
7620
7621         * cp-tree.h (flag_inline_trees): Update documentation.
7622         * decl.c (init_decl_processing): Adjust handling of
7623         flag_inline_functions and flag_inline_trees to support -O3.
7624         (grokfndecl): Set DECL_INLINE on all functions if that's what
7625         the user requested.
7626         (save_function_data): Clear DECL_INLINE in
7627         current_function_cannot_inline is non-NULL.
7628         * decl2.c (flag_inline_trees): Update documentation.
7629
7630 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
7631
7632         * dump.c (cp_dump_tree, USING_STMT case): New case.
7633         * tree.c (cp_statement_code_p): Add USING_STMT.
7634         * decl2.c (do_using_directive): Add the using directive statement.
7635
7636         * tree.c (walk_tree): Reformat an if block.
7637
7638 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7639
7640         * decl.c (compute_array_index_type): Don't try to do anything with
7641         the indices when processing a template.
7642
7643 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7644
7645         * call.c: NULL_PTR -> NULL.
7646         * class.c: Likewise.
7647         * cvt.c: Likewise.
7648         * decl.c: Likewise.
7649         * decl2.c: Likewise.
7650         * except.c: Likewise.
7651         * init.c: Likewise.
7652         * rtti.c: Likewise.
7653         * search.c: Likewise.
7654         * tree.c: Likewise.
7655         * typeck.c: Likewise.
7656         * typeck2.c: Likewise.
7657
7658 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
7659
7660         * decl2.c (do_using_directive): Revert previous patch.
7661
7662 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7663
7664         * cp-tree.def (USING_STMT): New statement node.
7665         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
7666         * decl2.c (do_using_directive): Add USING_STMT to statement
7667         tree. Don't emit errors when processing template decl.
7668         * pt.c (tsubst_expr, USING_STMT case): New case.
7669         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
7670
7671 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7672
7673         * call.c (build_new_op): Convert args from reference here.
7674         (build_conditional_expr): Don't convert here.
7675
7676 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7677
7678         * spew.c (last_token_id): New static variable.
7679         (read_token): Set it here.
7680         (yyerror): Use it here.
7681
7682 2001-04-30  Richard Henderson  <rth@redhat.com>
7683
7684         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
7685         * decl.c: Likewise.
7686
7687 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7688
7689         * gxxint.texi: Remove.
7690         * Make-lang.in: Remove all traces of gxxint.texi.
7691
7692 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
7693
7694         * decl2.c (start_static_initialization_or_destruction): Correct
7695         logic to handle the -fno-use-cxa-atexit case.
7696
7697 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
7698
7699         * optimize.c (update_cloned_parm): New function.
7700         (maybe_clone_body): Use it.  Update the `this' parameter too.
7701
7702 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
7703
7704         * decl2.c (unsupported_options): Add new-abi.
7705         * lang-options.h: Remove no longer supported options.
7706
7707 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7708
7709         * except.c (can_convert_eh): Don't check template parms,
7710         typename types etc.
7711
7712 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7713
7714         * optimize.c (maybe_clone_body): Copy parameter names and locations.
7715
7716 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
7717
7718         * cp-tree.h (adjust_clone_args): Prototype new function.
7719         * class.c (adjust_clone_args): New function.
7720         * decl.c (start_function): Call it for in charge ctors.
7721
7722 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
7723
7724         * method.c (use_thunk): Make sure that thunks really are emitted
7725         when requested.
7726
7727 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
7728
7729         * mangle.c (write_chars): New macro.
7730         (hwint_to_ascii): New function
7731         (write_number): Use it.
7732         (write_integer_cst): Deal with really big numbers.
7733
7734 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
7735
7736         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
7737         the clone.
7738
7739 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
7740
7741         * decl.c (grokdeclarator): Set context of namespace scope
7742         TYPE_DECLS.
7743
7744 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
7745
7746         * cp/optimize.c: Include hashtab.h.
7747         (struct inline_data): Add tree_pruner.
7748         (expand_call_inline, expand_calls_inline): Use it when calling
7749         walk_tree.
7750         (optimize_function): Initialize and free tree_pruner.
7751
7752 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
7753
7754         Lazy __FUNCTION__ generation.
7755         * cp-tree.def (FUNCTION_NAME): Remove.
7756         * cp-tree.h (function_name_declared_p): Remove.
7757         (cp_fname_init): Prototype.
7758         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
7759         don't call declare_function_name. Call start_fname_decls.
7760         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
7761         clobber the line number.
7762         (cp_fname_init): New function.
7763         (start_function): Call start_fname_decls.
7764         (finish_function): Call finish_fname_decls.
7765         * lex.c (reswords): Add slots for __FUNCTION__ et al.
7766         (rid_to_yy): Add mappings for __FUNCTION__ et al.
7767         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
7768         * parse.y (VAR_FUNC_NAME): New token.
7769         (primary): Add VAR_FUNC_NAME.
7770         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
7771         generation.
7772         (tsubst, FUNCTION_NAME case): Remove.
7773         (tsubst_copy, FUNCTION_NAME case): Remove.
7774         (tsubst_expr, DECL_STMT case): Be careful with a
7775         DECL_PRETTY_FUNCTION_P.
7776         (instantiate_decl): Remove function_name_declared_p.
7777         * semantics.c (begin_compound_statement): Don't call
7778         declare_function_name here.
7779         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
7780         (finish_translation_unit): Call finish_fname_decls.
7781         (expand_body): Remove function_name_declared_p.
7782         * typeck2.c (digest_init): Allow any ERROR_MARK.
7783
7784 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
7785
7786         * pt.c (tsubst_decl): Use VOID_TYPE_P.
7787         * semantics.c: Fix some typos.
7788
7789 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
7790
7791         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
7792
7793 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7794
7795         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
7796
7797 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
7798
7799         * except.c (build_throw): Wrap the initialization of the exception
7800         object in a MUST_NOT_THROW_EXPR.
7801         (do_free_exception): #if 0.
7802
7803 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
7804
7805         * cp-tree.h (finish_enum): Change prototype.
7806         * decl.c (finish_enum): Reorganize.
7807         * parse.y (structsp): Adjust calls to finish_enum.
7808
7809 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7810
7811         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
7812         't' case.
7813
7814 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7815
7816         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
7817         (layout_empty_base): Return at end flag.
7818         (build_base_field): Likewise.
7819         (build_base_fields): Likewise.
7820         (layout_virtual_bases): Don't add 1 to eoc value.
7821         (end_of_class): Use full size for empty bases.
7822         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
7823         empty bases. Don't add 1 to eoc value. Only add trailing padding
7824         if we're an empty class with no empty bases.
7825         (dump_class_hierarchy): Dump size and alignment.
7826
7827 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7828
7829         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
7830         ICS_BAD_FLAG.
7831
7832 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
7833
7834         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
7835         is found, look first if name does not match the structure name.
7836
7837 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
7838
7839         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
7840         set.
7841         (SET_DECL_LANGUAGE): New macro.
7842         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
7843         (pushdecl): Likewise.
7844         (build_library_fn_1): Likewise.
7845         (build_cp_library_fn): Likewise.
7846         (grokfndecl): Likewise.
7847         (grokvardecl): Mark `extern "C"' variables as having C linkage.
7848         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
7849         * lex.c (retrofit_lang_decl): Likewise.
7850         * mangle.c (mangle_decl_string): Don't mangle the names of
7851         variables declared with C language linkage.
7852         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
7853
7854 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7855
7856         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
7857         flag_access_control from uninitialized storage.
7858
7859 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
7860
7861         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
7862         * mangle.c (write_pointer_to_member_type): Fix mangling of
7863         pointers to cv-qualified member function types.
7864
7865         * init.c (build_delete): Create a SAVE_EXPR for the address if
7866         we're going to use it more than once.
7867
7868 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
7869
7870         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
7871         (expand_ptremfunc_cst): Change prototype.
7872         (delta2_from_ptrmemfunc): Remove.
7873         * expr.c (cplus_expand_constant): Adjust call to
7874         expand_ptrmemfunc_cst.
7875         * typeck.c (build_ptrmemfunc1): Simplify.
7876         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
7877         results in a constant.
7878         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
7879         (delta2_from_ptrmemfunc): Remove.
7880         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
7881
7882 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
7883
7884         * cp-tree.h (decl_namespace_list): New macro.
7885         (struct saved_scope): Add decl_ns_list.
7886         * decl.c (mark_saved_scope): Mark it.
7887         * decl2.c: Lose static decl_namespace_list.
7888         (init_decl2): Don't save it.
7889
7890 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7891
7892         * cp-tree.h (warn_return_type, yylex): Delete redundant
7893         declarations.
7894
7895         * decl.c (current_class_depth, global_namespace): Likewise.
7896
7897         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
7898
7899         * repo.c (flag_use_repository): Likewise.
7900
7901 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7902
7903         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
7904         set_block, pushdecl, getdecls, gettags, init_decl_processing,
7905         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
7906         lvalue_or_else, print_lang_statistics, comp_target_types,
7907         unsigned_type, signed_type, signed_or_unsigned_type,
7908         build_function_call, mark_addressable, incomplete_type_error):
7909         Delete redundant declarations.
7910
7911 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
7912
7913         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
7914         (TYPE_ANONYMOUS_P): New macro.
7915         (TAGGED_TYPE_P): New macro.
7916         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
7917         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
7918         * tree.c (no_linkage_helper): Likewise.
7919         * semantics.c (begin_class_definition): Likewise.
7920         * pt.c (convert_template_argument): Likewise.
7921         * lex.c (check_for_missing_semicolon): Likewise.
7922
7923 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7924
7925         * class.c (dfs_unshared_virtual_bases): New function.
7926         (mark_primary_bases): Call it.
7927         (check_bases): Ignore virtual bases when determining
7928         nearly-emptiness.
7929
7930 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
7931
7932         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
7933
7934 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
7935
7936         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
7937         cloned function to the clone.
7938
7939 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7940
7941         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
7942
7943         * semantics.c: Include expr.h.
7944
7945 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
7946
7947         * method.c (implicitly_declare_fn): Commonize code for copy ctor
7948         and assignment op. Set TREE_USED for parameter.
7949
7950 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
7951
7952         * class.c (find_final_overrider_data): Add `candidates'.
7953         (dfs_find_final_overrider): Don't issue error messages
7954         prematurely.
7955         (find_final_overrider): Issue error messages here.
7956         (build_base_field): Don't warn about amgibuous direct bases here.
7957         (warn_about_ambiguous_direct_bases): New function.
7958         (layout_class_type): Use it.
7959
7960 2001-04-10  Richard Henderson  <rth@redhat.com>
7961
7962         * typeck.c (build_array_ref): Push the array reference inside
7963         COMPOUND_EXPR and COND_EXPR.
7964
7965 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
7966
7967         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
7968         * decl.c (duplicate_decls): Adjust accordingly.
7969         (maybe_commonize_var): Likewise.
7970         (grokfndecl): Likewise.
7971         (start_function): Likewise.
7972         (start_method): Likewise.
7973         * decl2.c (key_method): Likewise.
7974         (import_export_decl): Likewise.
7975         * method.c (implicitly_declare_fn): Likewise.
7976         * optimize.c (maybe_clone_body): Likewise.
7977
7978 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
7979
7980         * lang-specs.h: Add __DEPRECATED.
7981
7982 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
7983
7984         * search.c (get_dynamic_cast_base_type): When building a new
7985         constant, set its type to ssizetype.
7986
7987 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
7988
7989         * optimize.c (expand_call_inline): Only add newly inlined statements
7990         into inlined_stmts.
7991
7992 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
7993
7994         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
7995         (OPERATOR_FORMAT): Likewise.
7996         (OPERATOR_TYPENAME_FORMAT): Likewise.
7997         * operators.def: Remove old name-mangling information.
7998         * decl.c (grok_op_properties): Adjust accordingly.
7999         * lex.c (init_operators): Likewise.
8000         * rtti.c (get_tinfo_decl): Issue error messages about types that
8001         have variable size.
8002
8003 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
8004
8005         * decl2.c (import_export_decl): Don't call import_export_class
8006         when processing an inline member function.
8007         * semantics.c (expand_body): Call import_export_decl before
8008         emitting inline functions.
8009
8010 2001-03-28  Richard Henderson  <rth@redhat.com>
8011
8012         IA-64 ABI Exception Handling:
8013         * cp-tree.def (EH_SPEC_BLOCK): New.
8014         (MUST_NOT_THROW_EXPR): New.
8015         * cp-tree.h: Update changed function declarations.
8016         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
8017         (CPTI_CALL_UNEXPECTED): New.
8018         (struct cp_language_function): Rename x_eh_spec_try_block
8019         to x_eh_spec_block.
8020         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
8021         * decl.c (current_binding_level): If no current function
8022         bindings, revert to scope_chain.
8023         (initialize_predefined_identifiers): Remove __cp_push_exception.
8024         (store_parm_decls): Use begin_eh_spec_block.
8025         (finish_function): Use finish_eh_spec_block.
8026         (mark_lang_function): Update for name changes.
8027         * decl2.c (finish_file): No mark_all_runtime_matches.
8028         * dump.c (cp_dump_tree): Handle new tree codes.
8029         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
8030         * except.c (catch_language_init, catch_language): Remove.
8031         (init_exception_processing): Don't set language code.
8032         Initialize call_unexpected_node, protect_cleanup_actions,
8033         eh_personality_libfunc, lang_eh_runtime_type.
8034         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
8035         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
8036         (prepare_eh_type): Split out type canonicalizations ...
8037         (build_eh_type_type): ... from here.
8038         (build_eh_type_type_ref): Remove.
8039         (mark_all_runtime_matches): Remove.
8040         (build_exc_ptr): New.
8041         (do_begin_catch, do_end_catch): New.
8042         (do_pop_exception): Remove.
8043         (build_terminate_handler): Remove.
8044         (choose_personality_routine): Split out language choice from ...
8045         (initialize_handler_parm): ... here.
8046         Use MUST_NOT_THROW_EXPR.
8047         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
8048         exception object handling.
8049         (expand_start_eh_spec, expand_end_eh_spec): Remove.
8050         (expand_exception_blocks, alloc_eh_object): Remove.
8051         (begin_eh_spec_block, finish_eh_spec_block): New.
8052         (do_allocate_exception, do_free_exception): New.
8053         (expand_throw): Merge into ...
8054         (build_throw): ... here.  Update for abi.
8055         * expr.c (cplus_expand_expr): No expand_internal_throw.
8056         Handle MUST_NOT_THROW_EXPR.
8057         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
8058         * semantics.c (*) Update for except.h name changes.
8059         (genrtl_try_block): No protect_with_terminate.
8060         (genrtl_eh_spec_block): New.
8061         (genrtl_handler): Don't emit the goto here.
8062         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
8063         (genrtl_finish_function): Don't expand_exception_blocks.
8064         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
8065
8066 2001-03-28  Richard Henderson  <rth@redhat.com>
8067
8068         * decl.c (struct named_label_list): Rename eh_region to
8069         in_try_scope, add in_catch_scope.
8070         (struct binding_level): Rename eh_region to is_try_scope,
8071         add is_catch_scope.
8072         (note_level_for_try): Rename from note_level_for_eh.
8073         (note_level_for_catch): New.
8074         (poplevel): Copy both is_try_scope and is_catch_scope to
8075         the named_label_list struct.
8076         (check_previous_goto_1): Don't check for catch block via
8077         DECL_ARTIFICIAL; use in_try_scope instead.
8078         (check_goto): Likewise.
8079         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
8080         * except.c (expand_start_catch_block): Call note_level_for_catch.
8081         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
8082
8083 2001-03-27  Richard Henderson  <rth@redhat.com>
8084
8085         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
8086         exceptions_via_longjmp.
8087
8088 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
8089
8090         * pt.c (check_default_tmpl_args):  Make error messages clearer.
8091
8092 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
8093
8094         * error.c:  Also undefine 'A' macro used for cp_printers definition.
8095
8096 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8097
8098         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
8099
8100 2001-03-26  Mike Yang <yang@research.att.com>
8101             Mark Mitchell  <mark@codesourcery.com>
8102
8103         * dump.c (dump_access): New function.
8104         (cp_dump_tree): Use it.  Dump basetype information for class
8105         types.
8106
8107 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
8108
8109         * Makefile.in (optimize.o): Depend on params.h.
8110         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
8111         (init_decl_processing): Set flag_no_inline when doing
8112         inlining-on-trees.
8113         * optimize.c: Include params.h.
8114         (struct inline_data): Improve documentation of FNS.  Add
8115         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
8116         (INSNS_PER_STMT): New macro.
8117         (remap_block): Use CLONING_P.
8118         (inlinable_function_p): Don't inline big functions.
8119         (expand_call_inline): Keep track of how much inlining we've done.
8120         (optimize_function): Set FIRST_INLINED_FN.
8121         (maybe_clone_body): Set CLONING_P.
8122         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
8123         tree nodes.
8124         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
8125         rest_of_compilation.  Clear DECL_RTL for local variables
8126         afterwards.
8127         (clear_decl_rtl): New function.
8128
8129 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
8130
8131         Implement DR 209
8132         * cp-tree.h (skip_type_access_control,
8133         reset_type_access_control): Prototype.
8134         * decl.c (grokdeclarator): Access of friends is not checked.
8135         * parse.y (component_decl_list): Reset type access control.
8136         * semantics.c (decl_type_access_control): Clear
8137         current_type_lookups.
8138         (save_type_access_control): Don't save if not deferring.
8139         (skip_type_access_control, reset_type_access_control): New
8140         functions.
8141         (begin_class_definition): Do type access control for basetypes.
8142         Start deferred access control.
8143         (finish_class_definition): Resume immediate access control if
8144         this is a local class.
8145
8146 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8147
8148         * class.c (add_method): Use memcpy/memmove, not bcopy.
8149
8150         * decl.c (duplicate_decls): Likewise.
8151
8152 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8153
8154         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
8155         not `_'.
8156
8157 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
8158
8159         * decl.c (local_names): Define.
8160         (push_local_name): New.
8161         (grok_reference_init): Return init if initializing static reference
8162         variable with non-constant instead of emitting it.
8163         Move expand_static_init call to cp_finish_decl.
8164         (layout_var_decl): Call push_local_name.
8165         (maybe_commonize_var): Allow inlining functions even if they have
8166         static local variables, use comdat_linkage for them if flag_weak.
8167         (check_initializer): Call obscure_complex_init if
8168         grok_reference_init returned nonzero.
8169         (save_function_data): Clear x_local_names.
8170         (pop_cp_function_context): Free x_local_names.
8171         (mark_inlined_fns): Remove.
8172         (mark_lang_function): Mark x_local_names.
8173         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
8174         Mark inlined_fns as tree, remove call to mark_inlined_fns.
8175         * class.c (alter_access): Ensure DECL_ACCESS is never set if
8176         DECL_DISCRIMINATOR_P.
8177         * cp-tree.h (cp_language_function): Add x_local_names.
8178         (lang_decl_flags): Add discriminator into u2.
8179         (lang_decl_inlined_fns): Remove.
8180         (lang_decl): inlined_fns is now a TREE_VEC.
8181         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
8182         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
8183         TREE_VEC, not a custom structure.
8184         (optimize_function): Likewise.
8185         * mangle.c (discriminator_for_local_entity): Discriminate among
8186         VAR_DECL local entities.
8187         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
8188         is not valid.
8189
8190 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
8191
8192         Add support for Java interface method calls.
8193         * cp-tree.h (struct lang_type): Add java_interface flag.
8194         (TYPE_JAVA_INTERFACE): New macro.
8195         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
8196         by setting TYPE_JAVA_INTERFACE.
8197         * call.c (java_iface_lookup_fn): New static.
8198         (build_over_call): If calling a method declared in a
8199         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
8200         expression which resolves the function address.
8201         (build_java_interface_fn_ref): New function.
8202
8203 2001-03-22  Richard Henderson  <rth@redhat.com>
8204
8205         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
8206         * except.c: Don't include it.
8207
8208 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8209             based on an idea from Joe Buck <jbuck@synopsys.com>
8210
8211         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
8212         New nonterminals.
8213         (data_def, component_decl): Add reductions to bad_decl.
8214
8215 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
8216
8217         * method.c (do_build_assign_ref): Don't use build_modify_expr for
8218         anonymous aggregates, since they don't have assignment operator
8219         method.
8220         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
8221         assignment operators for anonymous structure fields.
8222
8223 2001-03-21  Jason Merrill  <jason@redhat.com>
8224
8225         * pt.c (instantiate_decl): Abort if we see a member constant
8226         instantiation that doesn't already have its initializer.
8227         Downgrade explicit instantiation without definition to pedwarn.
8228
8229         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
8230         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
8231         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
8232
8233         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
8234         (pending_vtables): Remove.
8235         * decl2.c (pending_vtables): Remove.
8236         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
8237         CLASSTYPE_VTABLE_NEEDS_WRITING.
8238         (import_export_class): Likewise.
8239         (init_decl2): Don't mark pending_vtables.
8240         * lex.c (handle_pragma_vtable): Just sorry.
8241         * pt.c (instantiate_class_template): Don't mess with
8242         CLASSTYPE_VTABLE_NEEDS_WRITING.
8243         (mark_class_instantiated): Likewise.
8244         * ptree.c (print_lang_type): Don't print it.
8245         * semantics.c (begin_class_definition): Don't set it.
8246
8247         * pt.c (template_tail): Replace with last_pending_template.
8248         (maybe_templates, maybe_template_tail): Remove.
8249         (add_pending_template): Adjust.
8250         (instantiate_pending_templates): Adjust.
8251
8252         * cp-tree.h (struct saved_scope): Remove lang_stack field.
8253         (current_lang_stack): Remove.
8254         * decl.c (maybe_push_to_top_level): Don't initialize it.
8255         (duplicate_decls): Use current_lang_depth.
8256         (xref_basetypes): Likewise.
8257         * class.c (current_lang_depth): New fn.
8258         (push_lang_context): Use more varray functionality.
8259         (pop_lang_context): Likewise.
8260
8261         * error.c (GLOBAL_THING): Always use '__'.
8262
8263 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
8264
8265         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
8266
8267         * mangle.c (mangle_decl_string): Mangle the names of overloaded
8268         operators, even when they have `extern "C"' linkage.
8269
8270 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
8271
8272         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
8273         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8274         where it's not necessary.
8275         (add_method): Remove optimization involving comparison of
8276         DECL_ASSEMBLER_NAME.
8277         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
8278         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8279         where it's not necessary.
8280         (check_methods): Likewise.
8281         (build_clone): Likewise.
8282         (built_vtt): Likewise.
8283         * cp-tree.h (DECL_NEEDED_P): Likewise.
8284         * decl.c (pushtag): Likewise.
8285         (duplicate_decls): Likewise.
8286         (pushdecl): Likewise.
8287         (builtin_function): Likewise.
8288         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
8289         (build_cp_library_fn): Likewise.
8290         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
8291         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8292         where it's not necessary.
8293         (make_rtl_for_nonlocal_decl): Likewise.
8294         (cp_finish_decl): Likewise.
8295         (grokfndecl): Likewise.
8296         (grokvardecl): Likewise.
8297         (grokdeclarator): Likewise.
8298         (start_function): Likewise.
8299         (cp_missing_return_ok_p): Likewise.
8300         * decl2.c (grokclassfn): Likewise.
8301         (check_classfn): Likewise.
8302         (finish_static_data_member_decl): Likewise.
8303         (grokfield): Likewise.
8304         * error.c (GLOBAL_IORD_P): Remove.
8305         (dump_global_iord): Improve output.
8306         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
8307         * except.c (nothrow_libfn_p): Summarily reject any function not in
8308         namespace-scope.
8309         * init.c (build_java_class_ref): Don't explicitly set
8310         DECL_ASSEMBLER_NAME after calling mangle_decl.
8311         * mangle.c (mangle_decl_string): Handle extern "C" functions.
8312         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
8313         * method.c (set_mangled_name_for_decl): Don't explicitly set
8314         DECL_ASSEMBLER_NAME after calling mangle_decl.
8315         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
8316         IDENTIFIER_GLOBAL_VALUE for the thunk.
8317         * pt.c (set_mangled_name_for_template_decl): Remove.
8318         (check_explicit_specialization): Don't use it.
8319         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
8320         (tsubst_friend_function): Likewise.
8321         (tsubst_decl): Likewise.
8322         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
8323         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
8324         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
8325         where it's not necessary.
8326         (tinfo_base_init): Likewise.
8327         (create_real_tinfo_var): Likewise.
8328         * search.c (looup_field_1): Likewise.
8329         * semantics.c (finish_named_return_value): Likewise.
8330         * tree.c (init_tree): Set lang_set_decl_assembler_name.
8331
8332 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
8333
8334         Correct semantics restrictions checking in throw-expression.
8335         * except.c (is_admissible_throw_operand): New function.
8336         (build_throw): Use it.
8337
8338 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8339
8340         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
8341         and its ilk.
8342
8343 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
8344
8345         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8346         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
8347         * decl.c (duplicate_decls): Likewise.
8348         (builtin_function): Likewise.
8349         (build_library_fn): Likewise.
8350         (build_cp_library_fn): Likewise.
8351         (check_initializer): Likewise.
8352         (cp_finish_decl): Likewise.
8353         * decl2.c (grokfield): Likewise.
8354         (grok_function_init): Remove #if 0'd code.
8355         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
8356         * friend.c (do_friend): Likewise.
8357         * init.c (get_temp_regvar): Likewise.
8358         * method.c (make_thunk): Likewise.
8359         * pt.c (tsubst_friend_function): Likewise.
8360         (tsubst_decl): Likewise.
8361         (regenerate_decl_from_template): Likewise.
8362         * semantics.c (genrtl_named_return_value): Likewise.
8363         (expand_body): Likewise.
8364         (genrtl_finish_function): Likewise.
8365         * tree.c (cp_tree_equal): Likewise.
8366
8367 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
8368
8369         * call.c (convert_like_real): Add extra semantics to INNER
8370         parameter. Don't convert to temporary if a user conversion
8371         gives us an lvalue that we're about to bind to a reference.
8372         Set INNER to indicate pending reference binding on recursive
8373         calls.
8374
8375 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8376
8377         * cp/lex.c: Delete duplicate pending_lang_change.
8378
8379 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
8380
8381         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
8382         Similarly.
8383         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
8384         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
8385
8386 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
8387
8388         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
8389
8390 2001-03-08  Stan Shebs  <shebs@apple.com>
8391
8392         * cp-tree.h (set_identifier_local_value): Remove unused decl.
8393
8394 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
8395
8396         * spew.c: Remove references to CPP_OSTRING.
8397
8398 2001-03-06  Andrew Haley  <aph@redhat.com>
8399
8400         * typeck.c (convert_arguments): Check that we have an fndecl.
8401
8402 2001-03-05  Andrew Haley  <aph@redhat.com>
8403
8404         * typeck.c (convert_arguments): Don't do ellipsis conversion for
8405         __built_in_constant_p.
8406
8407 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8408
8409         * typeck.c (build_static_cast): Allow enum to enum conversions
8410         as per DR 128.
8411
8412 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8413
8414         * class.c (check_field_decls): Pointers to member do not a
8415         non-pod struct make, as per DR 148.
8416
8417 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8418
8419         * call.c (joust): cp_pedwarn when using gnu extension concerning
8420         worst conversion sequences.
8421
8422 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8423
8424         * decl.c: Replace all uses of 'boolean' with 'bool'.
8425
8426 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
8427
8428         * lang-specs.h: Add zero initializer for cpp_spec field to
8429         all array elements that need one.  Don't put an #ifdef inside
8430         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
8431         use it.
8432
8433 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8434
8435         Implement using decls inside template functions.
8436         * decl2.c (validate_nonmember_using_decl): Don't special case
8437         fake_std_node in the global namespace. Don't reject early when
8438         processing a template.
8439         (do_local_using_decl): Add to statement tree. Don't do further
8440         processing when building a template.
8441         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
8442
8443 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
8444
8445         * decl2.c (do_nonmember_using_decl): Don't complain if we find
8446         same function. Do complain about ambiguating extern "C"
8447         declarations.
8448
8449 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
8450
8451         Remove floating point and complex type template constant parms.
8452         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
8453         COMPLEX_TYPE extensions.
8454         (invalid_nontype_parm_type_p): Likewise.
8455
8456 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
8457
8458         * except.c (call_eh_info): Revert "match_function"'s type.
8459
8460 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
8461
8462         Fix ctor vtable vcall offsets.
8463         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
8464         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
8465         (get_matching_base): Remove.
8466         (get_original_base): New function.
8467         (build_vtbl_initializer): Initialize vid.rtti_binfo.
8468         Use a virtual thunk for a ctor vtable with an index
8469         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
8470         primary base within a constructor vtable. Only set
8471         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
8472         when primary base has been lost.
8473         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
8474
8475 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
8476
8477         * call.c (joust): Ensure more_specialized()'s argument length
8478         parameter has correct value for constructors.
8479
8480 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
8481
8482         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
8483
8484         * decl.c (mark_inlined_fns): Prototype.
8485
8486 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8487
8488         * spew.c (yylex): Correct handling of friends.
8489
8490 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
8491
8492         * mangle.c (write_encoding): Pass write_function_type the
8493         FUNCTION_DECL for the function being encoded.
8494         (write_function_type): Pass it along to write_bare_function_type.
8495         (write_bare_function_type): Pass it along to write_method_parms.
8496         (write_method_parms): Don't mangle the compiler-generated
8497         parameters to a constructor or destructor.
8498
8499 2001-02-22  Andreas Jaeger  <aj@suse.de>
8500
8501         * optimize.c: Include toplev.h for
8502         note_deferral_of_defined_inline_function prototype.
8503
8504 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
8505
8506         * cp-tree.h (struct lang_decl_inlined_fns): New.
8507         (struct lang_decls): Add inlined_fns.
8508         (DECL_INLINED_FNS): New macro.
8509         * optimize.c (struct inline_data): Add inlined_fns.
8510         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
8511         (inlinable_function_p): Likewise, fix typo in comment,
8512         function is not inlinable if it already inlined function currently
8513         being optimized.
8514         (expand_call_inline): Add fn to inlined_fns if necessary.
8515         (optimize_function): Initialize inlined_fns.
8516         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
8517         * decl.c (mark_inlined_fns): New function.
8518         (lang_mark_tree): Call it.
8519
8520 2001-02-21  Jason Merrill  <jason@redhat.com>
8521
8522         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
8523         (DECL_UNINLINABLE): Move to middle-end.
8524
8525         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
8526         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
8527         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
8528         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
8529         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
8530
8531         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
8532         second parm of op=.
8533
8534 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
8535
8536         * decl2.c (set_decl_namespace): Allow explicit instantiations in
8537         any namespace.
8538
8539 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8540
8541         * optimize.c (expand_call_inline): Don't walk subtrees of type
8542         nodes.
8543
8544 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
8545
8546         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
8547         for a destructor.
8548
8549 2001-02-18  Jason Merrill  <jason@redhat.com>
8550
8551         Do put the VTT parameter in DECL_ARGUMENTS.
8552         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
8553         (current_vtt_parm): New macro.
8554         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
8555         (DECL_HAS_VTT_PARM_P): New macro.
8556         (DECL_VTT_PARM): Remove.
8557         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
8558         * decl.c (duplicate_decls): Only copy the operator code if
8559         appropriate.
8560         (start_function): Set current_vtt_parm.
8561         (lang_mark_tree): Don't mark vtt_parm.
8562         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
8563         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
8564         * class.c (build_clone): Maybe remove the VTT parm.
8565         * optimize.c (maybe_clone_body): Set up the VTT parm.
8566         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
8567         * call.c (build_over_call): Just allow the VTT arg.
8568         * method.c (make_thunk): Don't set DECL_VTT_PARM.
8569         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
8570         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
8571         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
8572         * error.c (dump_function_decl): Likewise.
8573         * call.c (build_user_type_conversion_1, convert_like_real): Abort
8574         if we try to call a constructor with in-charge or VTT parms.
8575         * method.c (skip_artificial_parms_for): New fn.
8576         * call.c (add_function_candidate, build_over_call): Call it.
8577         * call.c (build_new_method_call): Use current_vtt_parm.
8578         * init.c (expand_virtual_init): Likewise.
8579         * class.c (same_signature_p): No longer static.
8580         * cp-tree.h: Declare it.
8581         * search.c (look_for_overrides_r): Use it.
8582
8583 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8584
8585         * cp-tree.h (new_abi_rtti_p): Remove.
8586         (name_mangling_version): Likewise.
8587         (flag_do_squangling): Likewise.
8588         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
8589         * decl.c (grokfndecl): Likewise.
8590         * decl2.c (name_mangling_version): Remove.
8591         (flag_do_squangling): Likewise.
8592         (lang_f_options): Remove `squangle'.
8593         (unsupported_options): Add `squangle'.
8594         (cxx_decode_option): Issue a warning about uses of
8595         -fname-mangling-version.
8596         (finish_file): Remove old ABI support.
8597         * pt.c (check_explicit_specialization): Likewise.
8598         (tsubst_decl): Likewise.
8599         * rtti.c (init_rtti_processing): Likewise.
8600         (build_headof): Likewise.
8601         (get_tinfo_decl_dynamic): Likewise.
8602         (tinfo_from_decl): Likewise.
8603         (build_dynamic_cast_1): Likewise.
8604         (synthesize_tinfo_var): Likewise.
8605         * init.c (build_new): Allow enumeration types for the array-bounds
8606         in a direct-new-declarator.
8607
8608         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
8609
8610         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
8611         TREE_PROTECTED from the template being specialized.
8612
8613 2001-02-17  Jason Merrill  <jason@redhat.com>
8614
8615         * decl2.c (build_artificial_parm): Set TREE_READONLY.
8616
8617         * decl.c (bad_specifiers): Allow throw specs on things with
8618         pointer-to-function or -member-function type.
8619         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
8620         a pmf.
8621
8622 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
8623
8624         * call.c (check_dtor_name): Handle template names correctly.
8625
8626 2001-02-16  Jason Merrill  <jason@redhat.com>
8627
8628         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
8629         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
8630         * optimize.c (maybe_clone_body): Don't substitute it.
8631         * call.c (build_new_method_call): Check in_chrg instead.
8632         * init.c (expand_virtual_init): Likewise.
8633
8634 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
8635
8636         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
8637         class-type introduces at least a type-name.
8638
8639 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
8640
8641         * call.c (convert_like_real): Create a temporary for non-lvalue.
8642
8643 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
8644
8645         * cp-tree.h: Fix typos in comments.
8646
8647 2001-02-16  Jason Merrill  <jason@redhat.com>
8648
8649         * optimize.c (remap_block): If we're compiling a clone, pass the
8650         new block to insert_block.
8651
8652 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
8653
8654         * semantics.c (finish_asm_stmt): Robustify.
8655
8656 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8657
8658         * pt.c (push_template_decl_real): Don't remangle the name of a
8659         class template.
8660
8661 2001-02-15  Jim Meyering  <meyering@lucent.com>
8662
8663         * Make-lang.in (c++.install-common): Depend on installdirs.
8664         (c++.install-info): Likewise.
8665         (c++.install-man): Likewise.
8666
8667 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
8668
8669         * typeck2.c (build_m_component_ref): Robustify.
8670
8671 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
8672
8673         * friend.c (do_friend): Don't take the nested [template] class
8674         into account when deciding whether to warn about the friend
8675         function not referring to a template function.
8676
8677 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
8678
8679         * typeck.c (build_unary_op): Clarify error message.
8680
8681 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
8682
8683         * parse.y (component_constructor_declarator): allow optional
8684         parentheses around constructor class name.
8685
8686 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8687
8688         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
8689         section.
8690         * init.c (emit_base_init): Remove incorrect comment about
8691         virtual bases.
8692         * method.c (make_thunk): Fix comment alignment.
8693
8694 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8695
8696         Kill remnants of this is variable.
8697         * cp-tree.h (flag_this_is_variable): Remove.
8698         * decl2.c (flag_this_is_variable): Remove.
8699         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
8700         (build_vbase_path): The path is non-static, even in a cdtor.
8701         (resolves_to_fixed_type_p): Add additional return value.
8702         * search.c (init_vbase_pointers): Adjust.
8703         * tree.c (lvalue_p_1): Adjust.
8704         * typeck.c (mark_addressable): Adjust.
8705
8706 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8707
8708         * pt.c (unify): Don't check cv quals of array types.
8709
8710 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
8711
8712         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
8713         check whether we already have the type.
8714
8715 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
8716
8717         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
8718         * call.c (build_op_delete_call): Simplify to remove duplicate
8719         code.
8720         * class.c (clone_function_decl): Don't build the deleting variant
8721         of a non-virtual destructor.
8722         * decl.c (finish_destructor_body): Don't call delete if this is a
8723         non-virtual destructor.
8724         * init.c (build_delete): Explicitly call `operator delete' when
8725         deleting an object with a non-virtual destructor.
8726
8727 2001-02-13  Jason Merrill  <jason@redhat.com>
8728
8729         * lang-specs.h: Add more __EXCEPTIONS.
8730
8731 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8732
8733         * typeck2.c (process_init_constructor): Check
8734         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
8735
8736 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8737
8738         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
8739         Remove spurious information in comment. Allow further
8740         adjustments of REFERENCE_TYPE args.
8741
8742 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
8743
8744         * errfn.c (cp_deprecated): Tweak diagnostic text.
8745         * parse.y (new_initializer): Deprecate initializer lists
8746         extension.
8747
8748 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
8749
8750         Remove old ABI support.
8751
8752 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
8753
8754         * decl2.c (flag_vtable_thunks): Always set it to 1.
8755         (flag_new_abi): Likewise.
8756         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
8757
8758         * Makefile.in (g++spec.o): Fix typo.
8759
8760 2001-02-09  Jason Merrill  <jason@redhat.com>
8761
8762         * lang-specs.h: Restore definition of __EXCEPTIONS.
8763
8764 2001-02-08  Jason Merrill  <jason@redhat.com>
8765
8766         * search.c (shared_member_p): New function.
8767         (lookup_field_r): Use it.
8768         * cp-tree.h (SHARED_MEMBER_P): Remove.
8769
8770         * method.c (process_overload_item): Handle template-dependent array
8771         bounds.
8772         * pt.c (type_unification_real): If we end up with undeduced nontype
8773         parms, try again.
8774
8775         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
8776         types.
8777
8778         * typeck2.c (friendly_abort): Don't say anything if we have
8779         earlier errors or sorries.
8780
8781         * decl.c (check_tag_decl): Notice attempts to redefine bool and
8782         wchar_t.  Ignore if in_system_header.
8783
8784         * decl.c (maybe_push_cleanup_level): New fn...
8785         (start_decl_1): ...split out from here.
8786         * cvt.c (build_up_reference): Use it.
8787         * cp-tree.h: Declare it.
8788
8789 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
8790
8791         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
8792         spec.
8793
8794 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
8795
8796         * pt.c (lookup_template_class): Make sure it's a primary
8797         template or template_template_parm when called from the parser.
8798         (instantiate_template_class): Add assertion.
8799
8800 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
8801
8802         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
8803         from error_mark_node.
8804
8805 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
8806
8807         Fix specification and implementation bugs in V3 ABI
8808         construction vtables.
8809         * cp-tree.h (flag_dump_class_layout): New flag.
8810         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
8811         (BINFO_LOST_PRIMARY_P): New flag.
8812         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
8813         (BINFO_PRIMARY_MARKED_P): Rename to ...
8814         (BINFO_PRIMARY_P): ... here.
8815         (binfo_via_virtual): New prototype.
8816         * decl2.c (flag_dump_class_layout): New flag.
8817         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
8818         use `=' as a file name separator.
8819         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
8820         bases.
8821         (build_vtbl_address): If this is a virtual primary base, then
8822         get the vtbl of what it is ultimately primary for.
8823         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
8824         for BINFO_PRIMARY_P.
8825         (dfs_skip_nonprimary_vbases_markedp): Likewise.
8826         (get_shared_vbase_if_not_primary): Likewise.
8827         (dfs_get_pure_virtuals): Likewise.
8828         (expand_upcast_fixups): Likewise.
8829         (fixup_virtual_upcast_offsets): Likewise.
8830         (dfs_find_vbase_instance): Likewise.
8831         (find_vbase_instance): Likewise.
8832         (binfo_from_vbase): Adjust comment to reflect reality.
8833         (binfo_via_virtual): New function.
8834         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
8835         for binfo walking during VTT construction.
8836         (dfs_mark_primary_bases): Remove.
8837         (force_canonical_binfo_r): New function.
8838         (force_canonical_binfo): New function.
8839         (mark_primary_virtual_base): New function.
8840         (mark_primary_bases): Walk in inheritance graph order, use
8841         mark_primary_virtual_base.
8842         (determine_primary_base): Use some more intermediate variables.
8843         (dfs_find_final_overrider): Don't check for overriding along a
8844         virtual path.
8845         (dfs_modify_vtables): Walk into primary virtual bases too.
8846         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
8847         (build_base_fields): Likewise.
8848         (dfs_set_offset_for_unshared_vbases): Likewise.
8849         (layout_virtual_bases): Likewise.
8850         (end_of_class): Likewise.
8851         (finish_struct_1): Call dump_class_hierarchy, if requested.
8852         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
8853         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
8854         (dump_class_hierarchy): Add file parameter. Append to file, if
8855         required.
8856         (finish_vtbls): Adjust accumulate_vtbl_inits call.
8857         Use canonical base for virtual bases.
8858         (build_vtt): Add more comments. Adjust build_vtt_inits call.
8859         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
8860         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
8861         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
8862         virtual VTTs.
8863         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
8864         from DATA.  We want virtual primary bases and all bases via virtual.
8865         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
8866         virtual base when not a construction vtable.
8867         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
8868         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
8869         Use canonical bases when processing virtual bases.
8870         (accumulate_vtbl_inits): We're interested in any base via a
8871         virtual path.
8872         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
8873         within a construction vtable, determine what is being overridden.
8874         (build_vtbl_initializer): Add more comments
8875         (add_vcall_offset_vtbl_entries_1): Adjust comment.
8876         (build_rtti_vtbl_entries): Check if the base has lost its
8877         primary.
8878
8879 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
8880
8881         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
8882
8883 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8884
8885         * decl.c (pushdecl): Call abort instead of fatal.
8886         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
8887         * init.c (build_new_1): Likewise.
8888         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
8889         * decl.c (build_typename_type): hash_table_init now returns void.
8890         decl.c (init_decl_processing): Make an error non-fatal.
8891
8892 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
8893
8894         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
8895         Document.
8896         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
8897         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
8898         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
8899         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
8900         * decl.c (maybe_commonize_var): Use the new name-mangling where
8901         appropriate.
8902         * decl2.c (comdat_linkage): Enhance comments.  Make all
8903         compiler-generated things static, if COMDAT is not available.
8904         (get_tinfo_decl): Do not make typeinfo objects that belong in the
8905         library COMDAT.
8906         (tinfo_base_init): Use the correct mangled name for typeinfo
8907         strings, and push them into the global scope.
8908         (typeinfo_in_lib_p): New function.
8909         (synthesize_tinfo_var): Use it.
8910         (create_real_tinfo_var): Likewise.
8911
8912 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
8913
8914         * decl.c (push_class_binding): Use context_for_name_lookup instead
8915         of CP_DECL_CONTEXT.
8916         * search.c (context_for_name_lookup): Remove static.  Check for NULL
8917         context in the loop.
8918         * cp-tree.h (context_for_name_lookup): Add prototype.
8919
8920 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
8921
8922         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
8923         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
8924         Remove.
8925         * call.c (convert_class_to_reference, build_user_type_conversion_1,
8926         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
8927
8928 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
8929
8930         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
8931         of macros used when compiling g++spec.c.
8932         * g++spec.c (lang_specific_driver): Link with the shared
8933         libgcc by default.
8934
8935 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8936
8937         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
8938         make_reference_declarator, make_call_declarator), method.c
8939         (implicitly_declare_fn), parse.y (namespace_using_decl,
8940         notype_unqualified_id, expr_or_declarator, new_type_id,
8941         after_type_declarator, direct_after_type_declarator,
8942         notype_declarator, complex_notype_declarator,
8943         complex_direct_notype_declarator, qualified_id,
8944         notype_qualified_id, overqualified_id, direct_new_declarator,
8945         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
8946         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
8947         instead of build_parse_node.
8948
8949 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8950
8951         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
8952         (minus_one_node): Moved to top level gcc directory.  Renamed
8953         to integer_minus_one_node.
8954
8955         * init.c (init_init_processing): Don't set minus_one_node.
8956         (build_vec_init): Use integer_minus_one_node.
8957
8958         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8959
8960 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
8961
8962         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
8963         identical and they would be replaced with constant, remove
8964         MODIFY_EXPR from the tree.
8965
8966 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8967
8968         * Make-lang.in: Remove all dependencies on defaults.h.
8969         * call.c: Don't include defaults.h.
8970         * decl.c: Likewise.
8971         * decl2.c: Likewise.
8972         * except.c: Likewise.
8973         * pt.c: Likewise.
8974         * rtti.c: Likewise.
8975         * tree.c: Likewise.
8976         * typeck.c: Likewise.
8977
8978 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
8979
8980         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
8981         operators even in "C" linkage.
8982         * method.c (set_mangled_name_for_decl): Likewise.
8983         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
8984         overloaded operators in "C" linkage.
8985
8986 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8987
8988         * pt.c (tsubst_decl): Remove IN_DECL parameter.
8989         (tsubst_arg_types): Check parameter is not void.
8990         (tsubst): Adjust tsubst_decl call.
8991
8992 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
8993
8994         * call.c (add_builtin_candidate): Quote std properly, from
8995         previous change.
8996
8997 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
8998
8999         * pt.c (check_explicit_specialization): Clone constructors and
9000         destructors.
9001
9002 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9003
9004         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
9005         indicates anything special about template depth. Make sure we
9006         only count the user visible template classes.
9007
9008 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
9009
9010         * call.c (build_conv): Typo in comment.
9011         (add_builtin_candidate): Add more explanation.
9012         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
9013         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
9014         when we have enumeral types.
9015         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
9016         candidates for relops and eqops.
9017         (joust): Simplify control flow. Allow a non-template user
9018         function to hide a builtin.
9019
9020 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
9021
9022         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
9023         (more_specialized): Add deduction parameter.
9024         * call.c (joust): Adjust more_specialized call.
9025         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
9026         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
9027         (get_bindings_order): Remove.
9028         (get_bindings_real): Add DEDUCE parameter.
9029         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
9030         REFERENCE_TYPE jig for DEDUCE_ORDER.
9031         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
9032         maybe_adjust_types_for_deduction.
9033         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
9034         directly.
9035         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
9036         (check_cv_quals_for_unify): Use new unify qualifier flags.
9037         (unify): Clear new unify qualifier flags.
9038         (get_bindings_real): Add DEDUCE parameter.
9039         (get_bindings): Adjust call to get_bindings_real.
9040         (get_bindings_overload): Likewise.
9041         (most_specialized_instantiation): Adjust call to
9042         more_specialized.
9043
9044 2001-01-19  Jason Merrill  <jason@redhat.com>
9045
9046         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
9047
9048         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
9049         -fnew-abi.
9050
9051 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
9052
9053         * decl2.c (arg_assoc_class): Fix double iteration logic.
9054
9055 2001-01-19  Jason Merrill  <jason@redhat.com>
9056
9057         * init.c (build_delete): Always call convert_force to strip cv-quals.
9058
9059         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
9060         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
9061         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
9062
9063 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9064
9065         * search.c (get_vbase_1): Count only virtual bases.
9066
9067 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9068
9069         * class.c (duplicate_tag_error): Robustify flag clearing.
9070
9071 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9072
9073         * cp-tree.h (lookup_template_class): Add complain parm.
9074         * decl.c (lookup_namespace_name): Adjust call to
9075         lookup_template_class.
9076         (make_typename_type): Likewise.
9077         * semantics.c (finish_template_type): Likewise.
9078         * pt.c (lookup_template_class): Add complain parm. Adjust.
9079         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
9080         (tsubst): Likewise.
9081
9082 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
9083
9084         * pt.c (copy_default_args_to_explicit_spec): Preserve
9085         object's CV quals. Reorganize.
9086
9087 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9088
9089         * typeck.c (build_modify_expr): Say `initialization' for
9090         INIT_EXPRs.
9091         * init.c (build_default_init): Convert to enumeral type, if
9092         needed.
9093
9094 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
9095
9096         * parse.y (nomods_initdcl0): Properly set things up for
9097         initdcl0_innards.
9098
9099 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9100
9101         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
9102         (type_unification_real): Set it.
9103         (unify): Use it.
9104
9105 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9106
9107         * decl.c (finish_destructor_body): Convert to vbase pointer here.
9108
9109 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9110
9111         * semantics.c (begin_class_definition): Check we're not inside a
9112         template parm list.
9113
9114 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
9115
9116         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
9117         BASELINK_P.
9118
9119 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9120
9121         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
9122         * call.c (build_over_call): Add comment.
9123
9124 2001-01-16 Daniel Berlin <dberlin@redhat.com>
9125
9126         * cvt.c (ocp_convert): Handle vector type conversion
9127         * typeck2.c (digest_init): Handle vector type initializations
9128
9129 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
9130
9131         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
9132           was given.
9133
9134 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9135
9136         * pt.c (check_nontype_parm): Rename to ...
9137         (invalid_nontype_parm_type_p): ... here.
9138         (process_template_parm): Adjust.
9139         (convert_template_argument): Adjust.
9140
9141 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
9142
9143         * pt.c (check_nontype_parm): New function.
9144         (process_template_parm): Use it.
9145         (convert_template_argument): Use it.
9146         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
9147         member.
9148
9149 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
9150
9151         * tree.c: Add defaults.h
9152         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
9153         * Make-lang.in (cp/tree.o): Add defaults.h.
9154
9155 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9156
9157         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
9158
9159 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9160
9161         * g++.1: Change to be ".so man1/gcc.1".
9162
9163 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9164
9165         * Make-lang.in (c++.info, c++.install-info): Build and install g++
9166         internals info.
9167         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
9168         ($(srcdir)/cp/g++int.info): New target.
9169         * gxxint.texi: Add info directory entry.  Use @@ in email address.
9170         * .cvsignore: Update.
9171
9172 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9173
9174         * typeck.c (build_c_cast): Do template processing earlier.
9175         Always pedwarn on array casts.
9176
9177 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
9178
9179         * friend.c (make_friend_class): Make sure a templated class is
9180         actually a template.
9181
9182 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9183
9184         * decl2.c (get_guard): Set linkage from guarded decl.
9185
9186 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9187
9188         * call.c (convert_default_arg): Check for unprocessed
9189         DEFAULT_ARG.
9190         * cp-tree.h (replace_defarg): Move to spew.c.
9191         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
9192         spew.c, which is where they really are.
9193         (done_pending_defargs): Declare.
9194         (unprocessed_defarg_fn): Declare.
9195         * decl.c (replace_defarg): Move to spew.c
9196         * parse.y (structsp): Call done_pending_defargs.
9197         * spew.c (defarg_fns): Rearrange list structure.
9198         (defarg_fnsdone): New static variable.
9199         (defarg_depfns): New static variable.
9200         (init_spew): Adjust.
9201         (add_defarg_fn): Store the type in TREE_TYPE.
9202         (do_pending_defargs): Detect and deal with ordering constraints
9203         and circularity.
9204         (done_pending_defargs): New function.
9205         (unprocessed_defarg_fn): New function.
9206         (replace_defarg): Moved from decl.c. Robustify. Don't save
9207         if circularity detected.
9208
9209 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9210
9211         * pt.c (unify): Check array has a domain, before checking
9212         whether it is variable sized.
9213
9214 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9215
9216         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
9217         parameters with pointers to arrays of unknown bound.
9218
9219 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
9220
9221         * parse.y (template_parm_header, template_spec_header): New
9222         reductions. Split out from ...
9223         (template_header): ... here. Use them.
9224         (template_template_parm): Use template_parm_header.
9225         * semantics.c (finish_template_template_parm): Add assert.
9226
9227 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9228
9229         * mangle.c (write_builtin_type): Fix thinko.
9230
9231         * pt.c (copy_default_args_to_explicit_spec_1): New function.
9232         (copy_default_args_to_explicit_spec): Likewise.
9233         (check_explicit_specialization): Use it.
9234
9235         * class.c (finish_struct_1):  Remove last argument in call to
9236         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
9237         * decl.c (builtin_function): Likewise.
9238         (build_cp_library_fn): Likewise.
9239         (check_initializer): Likewise.
9240         (make_rtl_for_nonlocal_decl): Likewise.
9241         (cp_finish_decl): Likewise.
9242         (start_function): Likewise.
9243         * decl2.c (finish_anon_union): Likewise.
9244         * friend.c (do_friend): Likewise.
9245         * init.c (build_java_class_ref): Likewise.
9246         * method.c (make_thunk): Likewise.
9247         * pt.c (tsubst_friend_function): Likewise.
9248         * semantics.c (expand_body): Likewise.
9249
9250 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
9251
9252         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
9253         looking at DECL_CLONED_FUNCTION for non-functions.
9254
9255 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9256
9257         * error.c (dump_template_parameter): Use parm to determine how
9258         to print default value.
9259
9260 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9261
9262         * class.c (duplicate_tag_error): Clear more flags.
9263
9264 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
9265
9266         * call.c (build_new_method_call): Use binfo_for_vbase.
9267
9268 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
9269
9270         * cp-tree.h (flag_cond_mismatch): Don't declare.
9271         * decl2.c (flag_cond_mismatch): Don't define.
9272         (lang_f_options): Remove cond-mismatch.
9273         (unsupported_options): Add cond-mismatch.
9274
9275 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
9276
9277         * class.c (handle_using_decl): Reject using of constructor name
9278         of sourcing class. Allow injecting of a method with same name as
9279         nested class. Fixup error messages.
9280
9281 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
9282
9283         * decl2.c (lang_decode_option): Handle -Wformat=2.
9284
9285 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9286
9287         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
9288         initialized_in_class.
9289         (DECL_DEFINED_IN_CLASS_P): Rename to ...
9290         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
9291         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
9292         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
9293         * pt.c (check_default_tmpl_args): Adjust for
9294         DECL_INITIALIZED_IN_CLASS_P.
9295         (instantiate_class_template): Likewise.
9296         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
9297
9298         * class.c (finish_struct): Constify saved_filename.
9299
9300 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9301
9302         * class.c (duplicate_tag_error): Adjust diagnostic.
9303         (finish_struct): Locally set location to start of struct.
9304         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
9305
9306 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
9307
9308         * decl.c (struct binding_level): Adjust class_shadowed comments
9309         to reflect reality.
9310         (push_class_level_binding): Adjust comments to reflect reality.
9311         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
9312         Don't set TREE_VALUE on the class_shadowed list.
9313
9314 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9315
9316         * decl2.c (acceptable_java_type): Allow references too.
9317         * init.c (build_java_class_ref): When using the new ABI, search
9318         `class$' and have it mangled with `mangle_decl.'
9319         * mangle.c (write_java_integer_type_codes): New function.
9320         (write_builtin_type): Detect and mangle Java integer and real
9321         types.
9322
9323 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
9324
9325         * decl2.c (grokfield): Don't accept `asm' specifiers for
9326         non-static data members.
9327
9328 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9329
9330         * expr.c (cplus_expand_expr): Don't reset `target'.
9331
9332 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
9333
9334         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
9335
9336 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9337
9338         * parse.y (template_datadef): Check for error_mark_node.
9339
9340 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
9341
9342         * cp-tree.def (DEFAULT_ARG): Make `x' class.
9343
9344 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9345
9346         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
9347         (record_builtin_type): Make non-static.
9348         (flag_short_double): Don't declare.
9349         (init_decl_processing): Remove the creation of many tree nodes now
9350         in c_common_nodes_and_builtins.
9351         (build_void_list_node): New function.
9352         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
9353         * cp-tree.h (flag_short_wchar): Don't declare.
9354
9355 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
9356
9357         * call.c (build_conv): Don't use build1 for USER_CONV.
9358         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
9359
9360 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
9361
9362         * lex.c (lang_init): Call c_common_lang_init.
9363
9364 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9365
9366         * search.c (lookup_fnfields_here): Remove.
9367         (look_for_overrides_r): Use lookup_fnfields_1.
9368         Ignore functions from using declarations.
9369
9370 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
9371
9372         Implement exceptions specifiers for implicit member functions.
9373         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
9374         * method.c (synthesize_exception_spec): New function.
9375         (locate_dtor, locate_ctor, locate_copy): New functions.
9376         (implicitly_declare_fn): Generate the exception spec too.
9377         * search.c (check_final_overrider): Check artificial functions
9378         too.
9379         * typeck2.c (merge_exception_specifiers): New function.
9380
9381 2001-01-03  Jason Merrill  <jason@redhat.com>
9382
9383         * init.c (build_default_init): New fn.
9384         (perform_member_init): Split out from here.
9385         (build_new_1): Use it.  Simplify initialization logic.
9386         (build_vec_init): Take an array, rather than a pointer and maxindex.
9387         Speed up simple initializations.  Don't clean up if we're assigning.
9388         * cp-tree.h: Adjust.
9389         * decl2.c (do_static_initialization): Remove TREE_VEC case.
9390         * parse.y (new_initializer): Return void_zero_node for ().
9391         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
9392         * typeck2.c (digest_init): Only complain about user-written
9393         CONSTRUCTORs.
9394
9395 2000-12-22  Mike Stump  <mrs@wrs.com>
9396
9397         * decl2.c: (max_tinst_depth): Increase to 50.
9398
9399 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
9400
9401         * class.c (invalidate_class_lookup_cache): Zero the
9402         previous_class_values.
9403         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
9404         TREE_INT_CST_HIGH.
9405         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
9406         * decl.c (free_bindings): New variable.
9407         (push_binding): Don't create a new binding if we have one on the
9408         free list.
9409         (pop_binding): Put old bindings on the free list.
9410         (init_decl_processing): Use size_int, not build_int_2.
9411         Register free_bindings as a GC root.
9412         (cp_make_fname_decl): Use size_int, not build_int_2.
9413         (push_inline_template_parms_recursive): Likewise.
9414         (end_template_parm_list): Likewise.
9415         (for_each_template_parm): Do not use walk_tree_without_duplicates.
9416         (tsubst_template_parms): Use size_int, not build_int_2.
9417         (tsubst): Likewise.
9418         * rtti.c (get_vmi_pseudo_type_info): Likewise.
9419
9420 2001-01-02  Richard Henderson  <rth@redhat.com>
9421
9422         * parse.y (asm): Set ASM_INPUT_P.
9423
9424 2001-01-02  Jason Merrill  <jason@redhat.com>
9425
9426         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
9427         for v3 ABI.
9428
9429         * typeck.c (cp_truthvalue_conversion): New fn.
9430         * cvt.c (ocp_convert): Use it.
9431
9432         * cp-tree.h: Lose c-common.c decls.
9433
9434         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
9435         * cvt.c (convert_to_void): Use type_unknown_p.
9436
9437         * typeck.c (strip_all_pointer_quals): Also strip quals from
9438         pointer-to-member types.
9439
9440         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
9441         parse.y as C.
9442
9443         * call.c (build_new_method_call): Do evaluate the object parameter
9444         when accessing a static member.
9445         * typeck.c (build_component_ref): Likewise.
9446
9447 2001-01-02  Andreas Jaeger  <aj@suse.de>
9448
9449         * decl.c (cp_missing_noreturn_ok_p): New.
9450         (init_decl_processing): Set lang_missing_noreturn_ok_p.
9451
9452 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
9453
9454         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
9455
9456 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
9457
9458         * class.c (pushclass): Remove #if 0'd code.
9459         * cp-tree.h (overload_template_name): Remove.
9460         * decl.c (store_bindings): Simplify.
9461         (pop_from_top_level): Likewise.
9462         * pt.c (overload_template_name): Remove.
9463         (instantiate_decl): Don't call push_to_top_level if it's not
9464         needed.
9465
9466 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
9467
9468         * pt.c (register_local_specialization): Don't return a value.
9469         (lookup_template_class): Use move-to-front heuristic when looking
9470         up template instantiations.
9471         (instantiate_decl): Only push_to_top_level when we're actually
9472         going to instantiate the template.
9473
9474 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
9475
9476         * search.c (binfo_for_vtable): Return least derived class, not
9477         most.  Handle secondary vtables.
9478
9479 2000-12-22  Jason Merrill  <jason@redhat.com>
9480
9481         * pt.c (more_specialized): Don't optimize len==0.
9482         (fn_type_unification): If we're adding the return type, increase len.
9483
9484         * typeck.c (build_binary_op): Fix pmf comparison logic.
9485
9486         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
9487         DECL_STATIC_FUNCTION_P.
9488
9489         * semantics.c (genrtl_finish_function): Don't try to jump to
9490         return_label unless it exists.
9491
9492         In partial ordering for a call, ignore parms for which we don't have
9493         a real argument.
9494         * call.c (joust): Pass len to more_specialized.
9495         (add_template_candidate_real): Strip 'this', pass len.
9496         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
9497         (get_bindings_order): New fn.  Pass len down.
9498         (get_bindings_real): Strip 'this', pass len.
9499         (fn_type_unification): Likewise.
9500         (type_unification_real): Succeed after checking 'len' args.
9501         (most_specialized_instantiation): Lose explicit_args parm.
9502         * class.c (resolve_address_of_overloaded_function): Strip 'this',
9503         pass len.
9504
9505 2000-12-21  Jason Merrill  <jason@redhat.com>
9506
9507         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
9508         DECL_TEMPLATE_RESULT.
9509
9510         * search.c (lookup_field_r): Call lookup_fnfields_1, not
9511         lookup_fnfields_here.
9512
9513         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
9514
9515         * call.c (build_object_call): Also allow conversions that return
9516         reference to pointer to function.
9517         (add_conv_candidate): Handle totype being ref to ptr to fn.
9518         (build_field_call): Also allow members of type reference to function.
9519         Lose support for calling pointer to METHOD_TYPE fields.
9520
9521         * error.c (dump_expr): Handle *_CAST_EXPR.
9522
9523         * typeck2.c (build_scoped_ref): Always convert to the naming class.
9524
9525         * tree.c (break_out_cleanups): Lose.
9526         * cp-tree.h: Remove prototype.
9527         * typeck.c (build_component_ref): Don't break_out_cleanups.
9528         (build_compound_expr): Likewise.
9529         * semantics.c (finish_expr_stmt): Likewise.
9530
9531 2000-12-20  Richard Henderson  <rth@redhat.com>
9532
9533         * cp-tree.h: Update declarations.
9534         * decl.c (finish_case_label): Return the new stmt node.
9535         * semantics.c (finish_goto_stmt): Likewise.
9536         (finish_expr_stmt, finish_return_stmt): Likewise.
9537         (finish_break_stmt, finish_continue_stmt): Likewise.
9538         (finish_asm_stmt): Likewise.
9539         * parse.y (already_scoped_stmt): Set STMT_LINENO.
9540         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
9541         (simple_if, simple_stmt): Return the new stmt node.
9542         (save_lineno): New.
9543
9544 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
9545
9546         * cp-tree.h: Don't declare warn_long_long.
9547
9548 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9549
9550         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
9551         IS_AGGR_TYPE.
9552
9553 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9554
9555         * pt.c (unify): Handle when both ARG and PARM are
9556         BOUND_TEMPLATE_TEMPLATE_PARM.
9557
9558 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9559
9560         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
9561         DECL_TEMPLATE_PARM_P.
9562
9563 2000-12-15  Jason Merrill  <jason@redhat.com>
9564
9565         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
9566
9567         * init.c (build_new_1): Don't strip quals from type.
9568
9569         * decl.c (pushdecl): Don't check for linkage on a non-decl.
9570
9571         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
9572
9573         * call.c (build_new_function_call): Lose space before paren in
9574         error message.
9575         (build_new_method_call): Likewise.
9576
9577         * typeck2.c (build_m_component_ref): Propagate quals from datum.
9578
9579 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9580
9581         * pt.c (check_explicit_specialization): Propagate default
9582         function arguments to explicit specializations.
9583
9584 2000-12-13  DJ Delorie  <dj@redhat.com>
9585
9586         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
9587         and <? operators.
9588
9589 2000-12-08  Jason Merrill  <jason@redhat.com>
9590
9591         * error.c (dump_function_name): Don't let the user see __comp_ctor.
9592
9593         Clean up copy-initialization in overloading code.
9594         * call.c (build_user_type_conversion_1): Die if we are asked to
9595         convert to the same or a base type.
9596         (implicit_conversion): Avoid doing so.  Lose reference binding code.
9597         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
9598         direct-initialization.  Also do direct-init part of copy-init.
9599         (build_user_type_conversion): Don't provide context to convert_like.
9600         * cvt.c (ocp_convert): build_user_type_conversion will now provide
9601         the constructor call for copy-init.
9602
9603         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
9604         instantiation of a member template.
9605         (do_decl_instantiation): Not here.
9606
9607 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9608
9609         * class.c (check_field_decls): Don't special case anonymous
9610         fields in error messages.
9611         (note_name_declared_in_class): Use %D on diagnostic.
9612
9613         * tree.c (pod_type_p): Use strip_array_types.
9614         (cp_valid_lang_attribute): Likewise.
9615         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
9616         multiple evaluations.
9617         (cp_has_mutable_p): Use strip_array_types.
9618
9619 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
9620
9621         * cp-tree.h (sufficient_parms_p): Declare new function.
9622         * call.c (sufficient_parms_p): New function, broken out of ...
9623         (add_function_candidate): ... here. Use it.
9624         (add_conv_candidate): Use it.
9625         * decl.c (grok_ctor_properties): Use it.
9626
9627 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
9628
9629         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
9630
9631 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
9632
9633         * decl2.c (lang_decode_option): Handle -Wformat-security.
9634
9635 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9636
9637         * pt.c (verify_class_unification): New function.
9638         (get_class_bindings): Use it.
9639         (try_class_unification): Tidy.
9640         (unify): Handle when argument of a template-id is not
9641         template parameter dependent.
9642         (template_args_equal): Handle when TREE_CODE's do not match.
9643
9644 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
9645
9646         * lang-specs.h (c++): When invoking the stand-alone preprocessor
9647         for -save-temps, pass all relevant -Defines to it, and then don't
9648         pass them to cc1plus.
9649
9650 2000-12-05  Will Cohen  <wcohen@redhat.com>
9651
9652         * decl.c (finish_case_label): Cleared
9653         more_cleanups_ok in surrounding function scopes.
9654         (define_label): Likewise.
9655
9656 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9657
9658         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
9659         (get_matching_virtual): Remove.
9660         (look_for_overrides): Declare new function.
9661         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
9662         DECL_VINDEX here.
9663         * class.c (check_for_override): Move base class iteration code
9664         to look_for_overrides.
9665         * search.c (next_baselink): Remove.
9666         (get_virtuals_named_this): Remove.
9667         (get_virtual_destructor): Remove.
9668         (tree_has_any_destructors_p): Remove.
9669         (struct gvnt_info): Remove.
9670         (check_final_overrider): Remove `virtual' from error messages.
9671         (get_matching_virtuals): Remove. Move functionality to ...
9672         (look_for_overrides): ... here, and ...
9673         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
9674         to be overriding.
9675
9676 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
9677
9678         * typeck.c (get_delta_difference): If via a virtual base,
9679         return zero.
9680         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
9681         adjustment.
9682
9683 2000-12-04  Richard Henderson  <rth@redhat.com>
9684
9685         * error.c (dump_tree): Use output_add_string not OB_PUTS.
9686
9687 2000-12-04  Jason Merrill  <jason@redhat.com>
9688
9689         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
9690         (write_builtin_type): Pass intSI_type_node and the like through
9691         type_for_mode.
9692         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
9693         Pass intSI_type_node and the like through type_for_mode.
9694         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
9695         * pt.c (tsubst, unify): Likewise.
9696         * tree.c (walk_tree): Likewise.
9697         * error.c (dump_type): Likewise.
9698         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
9699
9700         * Make-lang.in: Tweak top comment for emacs.
9701         (cp/TAGS): Restore.
9702
9703         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
9704
9705         * class.c (clone_function_decl): Robustify.
9706
9707 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
9708
9709         * decl.c (store_bindings): Only search in the non modified
9710         old_bindings for duplicates.
9711
9712 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
9713
9714         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
9715         TYPE_POLYMORPHIC_P.
9716
9717         * typeck.c (build_static_cast): Remove unused variable.
9718
9719 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
9720
9721         * pt.c: Fix typo in comment.
9722
9723 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9724
9725         * decl2.c (warn_format): Remove definition.
9726         (lang_decode_option): Handle -Wformat-nonliteral,
9727         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
9728
9729 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
9730
9731         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
9732         (init_decl_processing): Don't create string_type_node,
9733         const_string_type_node, wint_type_node, intmax_type_node,
9734         uintmax_type_node, default_function_type, ptrdiff_type_node and
9735         unsigned_ptrdiff_type_node.  Adjust position of call to
9736         c_common_nodes_and_builtins.
9737         (identifier_global_value): New function.
9738
9739 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
9740
9741         * call.c (standard_conversion): Reject pointer to member
9742         conversions from ambiguous, inaccessible or virtual bases.
9743         * typeck.c (build_static_cast): Don't check pointers to members
9744         specially.
9745
9746 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9747
9748         * method.c (do_build_copy_constructor): Preserve cv
9749         qualifications when accessing source object members.
9750         (do_build_assign_ref): Likewise. Remove separate diagnostics for
9751         unnamed fields.
9752
9753 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9754
9755         * method.c (do_build_assign_ref): Construct appropriately
9756         CV-qualified base reference. Don't allow const casts in base
9757         conversion.
9758
9759 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
9760
9761         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
9762         incomplete return type.
9763
9764 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9765
9766         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
9767         * semantics.c (finish_base_specifier): Accept a _TYPE not a
9768         _DECL.
9769
9770 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9771
9772         * spew.c (yyerror): Cope if yylval.ttype is NULL.
9773
9774 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9775
9776         * decl.c (grokdeclarator): Diagnose undefined template contexts.
9777
9778 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
9779
9780         * decl.c (grokdeclarator): Do type access control on friend
9781         class.
9782
9783 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9784
9785         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
9786         bison parser ickiness.
9787         * pt.c (tsubst_friend_function): Enter namespace scope when
9788         tsubsting the function name.
9789         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
9790
9791 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
9792
9793         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
9794         * cvt.c (cp_convert_to_pointer): Add force parameter.
9795         Allow conversions via virtual base if forced.
9796         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
9797         (ocp_convert): Likewise.
9798         * search.c (binfo_from_vbase): Return the virtual base's binfo.
9799         * typeck.c (get_delta_difference): Adjust handling of virtual
9800         bases.
9801
9802 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
9803
9804         * tree.c (struct list_hash): Remove.
9805         (list_hash_table): Make it be an htab.
9806         (struct list_proxy): New type.
9807         (list_hash_eq): New function.
9808         (list_hash_pieces): Renamed from ...
9809         (list_hash): ... this.
9810         (list_hash_lookup): Remove.
9811         (list_hash_add): Remove.
9812         (hash_tree_cons): Use the generic hashtable.
9813         (mark_list_hash): Remove.
9814         (init_tree): Create the hashtable.
9815
9816 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
9817
9818         * method.c (build_mangled_C9x_name): Rename to
9819         build_mangled_C99_name.  Change C9X references in comments to
9820         refer to C99.
9821
9822 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9823
9824         * parse.y (unary_expr): Move VA_ARG from here ...
9825         (primary): ... to here.
9826
9827 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
9828
9829         * semantics.c (finish_id_expr): If type is error_mark, return
9830         error_mark.
9831
9832 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
9833
9834         * pt.c (lookup_template_class): Simplify loop exit constructs.
9835         Cope when there is no partial instantiation of a template
9836         template member.
9837
9838 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
9839
9840         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
9841
9842 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
9843
9844         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
9845         prefix.
9846
9847         * pt.c (do_decl_instantiate): Explicitly clone constructors and
9848         destructors that haven't already been cloned.
9849
9850 2000-11-20  Richard Henderson  <rth@redhat.com>
9851
9852         * parse.y (yyparse_1): Rename the parser entry point.
9853
9854 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
9855
9856         * mangle.c (write_name): Use <unscoped-name> for names directly in
9857         function scope.
9858         (write_unscoped_name): Accept names directly in function scope.
9859
9860 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
9861
9862         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
9863         * parse.y (extdef): Add EXPORT reduction.
9864         * spew.c (yylex): Don't skip export here.
9865
9866 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
9867
9868         * decl.c (init_decl_processing): Correct name of pure virtual
9869         function under the new ABI.
9870         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
9871         (throw_bad_typeid): Likewise for bad typeid function.
9872
9873 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
9874
9875         * decl.c (grokparms): Don't even function types of `void' type,
9876         either.
9877         * mangle.c (write_type): Don't crash when confronted with the
9878         error_mark_node.
9879
9880         * decl.c (grokparms): Don't create parameters of `void' type.
9881
9882 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
9883
9884         * lex.c (mark_impl_file_chain): Delete.
9885         (init_parse): Remove call to ggc_add_string_root.  No need to
9886         ggc_strdup a string constant.  Do not add impl_file_chain to GC
9887         roots.
9888         (handle_pragma_implementation): No need to ggc_strdup main_filename.
9889
9890 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9891
9892         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
9893
9894 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9895
9896         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
9897         * decl.c (grokdeclarator): Don't reject void parms here.
9898         (require_complete_types_for_parms): Simplify, use
9899         complete_type_or_else.
9900         (grokparms): Remove bitrot. Remove funcdef parm.
9901         Deal with ellipsis parm lists here.
9902         * semantics.c (finish_parmlist): Don't append void_list_node
9903         here. Set PARMLIST_ELLIPSIS_P.
9904
9905 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9906
9907         * typeck2.c (incomplete_type_error): Reorganize to avoid
9908         excessive diagnostics.
9909
9910 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
9911
9912         * lex.c (struct impl_files, internal_filename): Constify a char *.
9913
9914 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
9915
9916         * mangle.c (write_special_name_constructor): Don't generate
9917         assembler junk when confronted with an old-style constructor.
9918         (write_special_name_destructor): Likewise.
9919         (mangle_decl_string): Do it here instead.
9920
9921 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
9922
9923         * call.c (op_error): Make error messages clearer.
9924
9925 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
9926
9927         * decl.c (wrapup_globals_for_namespace): Don't mark things
9928         TREE_ASM_WRITTEN when they're not.
9929
9930 2000-11-15  Jason Merrill  <jason@redhat.com>
9931
9932         * typeck2.c (friendly_abort): Uncount the error before handing
9933         off to fancy_abort.
9934
9935 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
9936
9937         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
9938
9939 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
9940
9941         * class.c (build_vtbl_initializer): Fix typo in comment.
9942         * typeck.c (expr_sizeof): Don't crash on errors.
9943
9944 2000-11-14  Jim Wilson  <wilson@redhat.com>
9945
9946         * lang-specs.h: Add %2 after %(cc1_options).
9947
9948 2000-11-14  Richard Henderson  <rth@redhat.com>
9949
9950         * typeck.c (c_sizeof): Be strict about casting result value
9951         back to c_size_type_node.
9952         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
9953
9954 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
9955
9956         * typeck.c (build_unary_op): Use boolean_increment from
9957         c-common.c, moving the relevant code there.
9958
9959 2000-11-11  Jason Merrill  <jason@redhat.com>
9960
9961         * typeck.c (mark_addressable): Don't call put_var_into_stack.
9962
9963         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
9964         in inlines.
9965
9966 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9967
9968         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
9969         * lex.c (copy_lang_decl): Likewise.
9970
9971 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
9972
9973         * dump.c (cp_dump_tree): Don't dump function bodies here.
9974
9975         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
9976         (dump.o): Update dependency list.
9977         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
9978         (flag_dump_translation_unit): Likewise.
9979         (CP_TYPE_QUALS): Adjust definition.
9980         (DECL_C_BIT_FIELD): Remove.
9981         (SET_DECL_C_BIT_FIELD): Likewise.
9982         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9983         (add_maybe_template): Likewise.
9984         (strip_array_types): Likewise.
9985         (dump_node_to_file): Likewise.
9986         (cp_dump_tree): New function.
9987         * decl.c (init_decl_processing): Set lang_dump_tree.
9988         * decl2.c (flag_dump_translation_unit): Remove.
9989         * dump.c: Move most of it to ../c-dump.c.
9990         (cp_dump_tree): New function.
9991         * pt.c (add_maybe_template): Remove.
9992         * typeck.c (strip_array_types): Likewise.
9993
9994 2000-11-07  Eric Christopher  <echristo@redhat.com>
9995
9996         * decl.c (init_decl_processing): Change definition of
9997         __wchar_t to wchar_t.  Remove artificial declaration of
9998         wchar_t.
9999         * lex.c: Change instances of __wchar_t to wchar_t.
10000
10001 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
10002
10003         * lex.c (do_identifier): Don't lookup_name for operators.
10004         * parse.y (operator): Save looking_for_typename.
10005         (unoperator): Restore it.
10006         * spew.c (frob_opname): Use nth_token for lookahead.
10007
10008 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
10009
10010         * decl.c (grok_op_properties): Always use coerce_new_type and
10011         coerce_delete_type.
10012         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
10013         exception specification. Tidy up.
10014         (coerce_delete_type): Preserve exception specification. Tidy up.
10015
10016 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
10017
10018         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
10019         (push_binding_level), error.c (cp_tree_printer), pt.c
10020         (process_partial_specialization, tsubst_template_arg_vector),
10021         search.c (lookup_member): Use memset () instead of bzero ().
10022
10023 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
10024
10025         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
10026
10027 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
10028
10029         * Make-lang.in (c++.distdir): Remove.
10030
10031 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
10032
10033         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
10034         declarations from different namespaces to be combined.
10035
10036 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
10037
10038         * decl.c: Include tm_p.h.
10039
10040 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
10041
10042         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
10043
10044 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10045
10046         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
10047         (build_overload_value), repo.c (open_repo_file), xref.c
10048         (open_xref_file): Use strchr () and strrchr () instead of index ()
10049         and rindex ().
10050
10051 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
10052
10053         * call.c (build_over_call): Call fold on the CALL_EXPR.
10054
10055 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
10056
10057         * error.c (dump_template_decl): Separate template hearders with
10058         space not comma.
10059
10060 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
10061
10062         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
10063         TS_* flags with corresponding TFF_*.  Adjust prototypes of
10064         functions (which used to take a tree_string_flags) to take an int.
10065
10066         * cp-tree.h (enum tree_string_flags): Remove
10067         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
10068         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
10069         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10070         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10071         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
10072         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
10073         (type_as_string, decl_as_string, expr_as_string,
10074         context_as_string): Adjust prototype.
10075
10076         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
10077         instead of TS_PLAIN.
10078
10079         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
10080         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
10081         plain `0'.
10082
10083 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
10084
10085         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
10086         (linkage_kind): New enumeration.
10087         (decl_linkage): New function.
10088         * decl2.c (comdat_linkage): Extend comment.
10089         * error.c (dump_function_decl): Print the arguments used to
10090         instantiate a template, even when not printing the type of the
10091         function.
10092         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
10093         not TREE_PUBLIC, to test for external linkage.
10094         * tree.c (decl_linkage): New function.
10095
10096 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
10097
10098         * pt.c (instantiate_decl): Always instantiate static data members
10099         initialized in-class.
10100
10101 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
10102
10103         * Make-lang.in: Move all build rules here from Makefile.in,
10104         adapt to new context.  Wrap all rules that change the current
10105         directory in parentheses.  Expunge all references to $(P).
10106         When one command depends on another and they're run all at
10107         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
10108         all object-file generation rules.  Delete obsolete variables.
10109
10110         * Makefile.in: Delete.
10111         * config-lang.in: Delete outputs= line.
10112
10113 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10114
10115         * error.c (dump_function_decl): Print no space between
10116         `ptr-operator' the `type-specifier' of the return type.
10117         (dump_type_prefix): Make sure we put space at the appropriate
10118         place.
10119
10120 2000-10-23  Jason Merrill  <jason@redhat.com>
10121
10122         * call.c (equal_functions): Also call decls_match for extern "C" fns.
10123
10124 2000-10-22  Jason Merrill  <jason@redhat.com>
10125
10126         * call.c (build_conditional_expr): Use ocp_convert to force
10127         rvalue conversion.
10128
10129 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
10130
10131         * call.c (standard_conversion): Use RVALUE_CONVs for all
10132         expressions that satisfy lvalue_p, not just those that satisfy
10133         real_lvalue_p.
10134
10135         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
10136
10137         * typeck.c (c_sizeof): Return an expression of `size_t' type,
10138         not one with TYPE_IS_SIZETYPE set.
10139         (dubious_conversion_warnings): Remove special-case code.
10140
10141 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
10142
10143         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
10144         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
10145         (dump_type_prefix): Print vector-of-int as 'int vector'.
10146         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
10147         * tree.c (walk_tree): Handle VECTOR_TYPE.
10148
10149         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
10150
10151 2000-10-21  Jason Merrill  <jason@redhat.com>
10152
10153         * parse.y (operator): Set got_object from got_scope.
10154         Set looking_for_typename.
10155         * decl.c (lookup_name_real): Clear val after setting from_obj.
10156         Reorganize diagnostic.
10157
10158 2000-10-20  Jason Merrill  <jason@redhat.com>
10159
10160         * tree.c (walk_tree): Don't walk into default args.
10161
10162         * error.c (dump_expr): Use host_integerp.
10163
10164 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
10165
10166         * typeck2.c (abstract_virtuals_error): Use "because" instead of
10167         "since" in error message.
10168
10169 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10170
10171         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
10172
10173 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
10174
10175         * decl.c (revert_static_member_fn): Fixed typo.
10176
10177 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
10178
10179         * class.c (subobject_offset_fn): New type.
10180         (dfs_record_base_offsets): Remove.
10181         (record_base_offsets): Likewise.
10182         (dfs_search_base_offsets): Likewise.
10183         (record_subobject_offset): New function.
10184         (check_subobject_offset): Likewise.
10185         (walk_subobject_offsets): Likewise.
10186         (record_subobject_offsets): Likewise.
10187         (layout_conflict_p): Reimplement.
10188         (layout_nonempty_base_or_field): Correct handling of type
10189         conflicts during layout.
10190         (layout_empty_base): Likewise.
10191         (build_base_field): Adjust to handle new representation of empty
10192         base offset table.
10193         (build_base_fields): Likewise.
10194         (layout_virtual_bases): Likewise.
10195         (splay_tree_compare_integer_csts): New function.
10196         (layout_class_type): Use a splay_tree, rather than a varray, to
10197         represent the offsets of empty bases.
10198
10199         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
10200         * decl.c (select_decl): Don't return declarations that are
10201         DECL_ANTICIPATED.
10202
10203 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
10204
10205         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
10206         (fake_std_node): New macro.
10207         * decl.c (in_std): Rename to ...
10208         (in_fake_std): ... this.
10209         (flag_no_builtin): Remove.
10210         (flag_no_nonansi_builtin): Likewise.
10211         (walk_namespaces_r): Use fake_std_node.
10212         (push_namespace): Use std_identifier.
10213         (pop_namespace): Use in_fake_std.
10214         (lookup_name_real): Use fake_std_node.
10215         (init_decl_processing): When -fhonor-std, create the `std'
10216         namespace.  Don't create a dummy fake_std_node in that case.
10217         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
10218         (builtin_function): Put builtins whose names don't begin
10219         with `_' in the std namespace.
10220         * decl2.c (flag_no_builtin): Remove.
10221         (flag_no_nonansi_builtin): Likewise.
10222         (set_decl_namespace): Use fake_std_node.
10223         (validate_nonmember_using_decl): Likewise.
10224         (do_using_directive): Likewise.
10225         (handle_class_head): Likewise.
10226         * dump.c (dequeue_and_dump): Likewise.
10227         * except.c (init_exception_processing): Use std_identifier.
10228         * init.c (build_member_call): Use fake_std_node.
10229         * rtti.c (init_rtti_processing): Use std_identifier.
10230
10231 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
10232
10233         * cp-tree.h (back_end_hook): Remove declaration.
10234         * decl2.c (back_end_hook): Remove definition.
10235
10236         * dump.c (dequeue_and_dump): Dump TREE_USED.
10237
10238 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
10239
10240         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
10241
10242 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10243
10244         * decl.c (WINT_TYPE): Define.
10245         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
10246         c_size_type_node, signed_size_type_node and wint_type_node.
10247
10248 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
10249
10250         * decl2.c (warn_missing_format_attribute): New variable.
10251         (lang_decode_option): Decode -Wmissing-format-attribute.
10252
10253 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
10254
10255         * typeck.c (qualify_type): Remove.
10256         (composite_pointer_type): Fix handling of conversions to `cv void*'.
10257
10258 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10259
10260         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
10261
10262 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10263
10264         * Makefile.in (parse.c, parse.h): Create atomically.
10265
10266 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
10267
10268         * class.c (current_obstack): Remove.
10269         * decl.c (ggc_p): Remove.
10270         (start_decl): Don't use decl_tree_cons.
10271         (grokdeclarator): Don't use build_decl_list.
10272         (start_function): Don't use decl_tree_cons.
10273         (finish_function): Don't mess with obstacks.
10274         * decl2.c (grok_x_components): Don't use build_decl_list.
10275         * lex.c (make_call_declarator): Don't call decl_tree_cons.
10276         (implicitly_declare_fn): Don't call build_decl_list.
10277         * parse.y (frob_specs): Don't call build_decl_list or
10278         decl_tree_cons.
10279         (expr_or_declarator_intern): Don't call decl_tree_cons.
10280         (primary): Don't call build_decl_list.
10281         (fcast_or_absdcl): Likewise.
10282         (typed_declspecs): Don't call decl_tree_cons.
10283         (reserved_declspecs): Don't call build_decl_list.
10284         (declmods): Likewise.
10285         (reserved_typespecquals): Likewise.
10286         (aggr): Likewise.
10287         (new_type_id): Likewise.
10288         (cv_qualifiers): Likewise.
10289         (after_type_declarator_intern): Likewise.
10290         (notype_declarator_intern): Likewise.
10291         (absdcl_intern): Likewise.
10292         (named_parm): Likewise.
10293         * pt.c (most_specialized_class): Likewise.
10294         * repo.c (temporary_obstack): Make it a structure, not a pointer.
10295         (init_repo): Initialize it.
10296         * search.c (current_obstack): Remove.
10297         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
10298
10299 2000-10-09  Richard Henderson  <rth@cygnus.com>
10300
10301         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
10302         (c++ language support bits for libgcc): Remove.
10303         (c++.clean): Remove cplib2.txt cleanup.
10304         * config-lang.in (headers, lib2funcs): Remove.
10305
10306         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
10307         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
10308         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
10309         * inc/new.h, inc/typeinfo: Remove files.
10310
10311 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10312
10313         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
10314         defined.
10315         (init_decl_processing): Initialize intmax_type_node and
10316         uintmax_type_node.
10317
10318 2000-10-06  Richard Henderson  <rth@cygnus.com>
10319
10320         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
10321         (original_result_rtx): Remove.
10322         * decl.c (save_function_data): Don't clear x_result_rtx.
10323         (mark_lang_function): Don't mark it either.
10324         * expr.c (fixup_result_decl): Remove.
10325         * semantics.c (genrtl_named_return_value): Frob the return decl
10326         before calling emit_local_var.
10327         (genrtl_finish_function): Don't call fixup_result_decl.
10328         Always emit the jump to return_label.
10329
10330 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
10331
10332         * pt.c (lookup_template_class): Set current access for enum.
10333         (tsubst_enum): Set file & line for enum decl.
10334
10335         * spew.c (yylex): Remove unused variable.
10336
10337 2000-10-05  Richard Henderson  <rth@cygnus.com>
10338
10339         * semantics.c (genrtl_finish_function): Don't init or check
10340         can_reach_end; remove noreturn and return value checks.
10341
10342 2000-10-05  Tom Tromey  <tromey@cygnus.com>
10343
10344         * init.c (build_java_class_ref): Use `build_static_name' with a
10345         suffix, not a prefix, to build the class object's name.
10346
10347 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10348
10349         * cp-tree.h (access_kind): Fix comment typo.
10350         * decl2.c (grokfield): Fix diagnostic typo.
10351         * semantics.c (finish_template_type): Fix comment typo.
10352         (finish_qualified_object_call_expr): Likewise.
10353
10354 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10355
10356         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
10357         tsubsting fails.
10358
10359 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
10360
10361         * spew.c (frob_id): New static function.
10362         (frob_opname): Use it.
10363         (yylex): Use it.
10364
10365 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
10366
10367         * decl.c (lang_mark_false_label_stack): Remove.
10368         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
10369
10370 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
10371
10372         * gxxint.texi: Use @email for formatting email addresses.
10373
10374 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
10375
10376         * error.c: Remove direct obstack manipulation.  Replace with
10377         output_buffer-based formatting.  Adjust calls to removed macros.
10378         (obstack_chunk_alloc, obstack_chunk_free): Remove.
10379         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
10380         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
10381
10382 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
10383
10384         * ir.texi: Move to ../c-tree.texi.
10385
10386 2000-09-20  Jason Merrill  <jason@redhat.com>
10387
10388         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
10389
10390 2000-09-21  Andreas Jaeger  <aj@suse.de>
10391
10392         * errfn.c: Move declaration of cp_printer and cp_printers to ...
10393         * cp-tree.h: ... here.
10394
10395         * error.c: Remove declaration of cp_printer.
10396
10397 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
10398
10399         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
10400
10401 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
10402
10403         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
10404         users.
10405
10406 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
10407
10408         * decl.c (start_function): Robustify.
10409
10410 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10411
10412         * cp-tree.h (check_function_format): Accept a `status' parameter.
10413
10414         * call.c, typeck.c: Updates calls to `check_function_format'.
10415
10416 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
10417
10418         * decl2.c (handle_class_head): Always push some scope even
10419         in the error case.
10420
10421 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
10422
10423         * cp-tree.h (struct cp_language_function): Remove
10424         x_scope_stmt_stack and name_declared.
10425         (current_scope_stmt_stack): Remove.
10426         (function_name_declared_p): New macro.
10427         (struct lang_decl_flags): Use c_lang_decl as a base class.
10428         (context): Remove.
10429         (struct lang_decl): Replace saved_tree with context.
10430         (DECL_FRIEND_CONTEXT): Adjust accordingly.
10431         (SET_DECL_FRIEND_CONTEXT): Likewise.
10432         (DECL_VIRTUAL_CONTEXT): Likewise.
10433         (DECL_SAVED_TREE): Remove.
10434         (C_DECLARED_LABEL_FLAG): Likewise.
10435         (cplus_expand_expr_stmt): Don't declare.
10436         (add_decl_stmt): Likewise.
10437         (add_scope_stmt): Likewise.
10438         * decl.c (mark_stmt_tree): Remove.
10439         (case_compare): Likewise.
10440         (finish_case_label): Use c_add_case_label.
10441         (init_decl_processing): Set more language-specific hooks.
10442         (build_enumerator): Fix typo in comment.
10443         (cplus_expand_expr_stmt): Remove.
10444         (mark_lang_function): Use mark_c_language_function.
10445         (lang_mark_tree): Use c_mark_lang_decl.
10446         * decl2.c: Change order of inclusion.
10447         * except.c: Likewise.
10448         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
10449         back on c_expand_expr.
10450         * friend.c: Include expr.h.
10451         * init.c: Change order of inclusion.
10452         * Makefile.in: Update dependencies.
10453         * lex.h (free_lang_decl_chain): Remove.
10454         * optimize.c (maybe_clone_body): Use function_name_declared_p.
10455         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
10456         it doesn't exist.
10457         (instantiate_decl): Use function_name_declared_p.
10458         * semantics.c (lang_expand_expr_stmt): Remove.
10459         (set_current_function_name_declared): Likewise.
10460         (current_function_name_declared): Likewise.
10461         (begin_compound_stmt): Use function_name_declared_p.
10462         (add_decl_stmt): Remove.
10463         (setup_vtbl_ptr): Use function_name_declared_p.
10464         (add_scope_stmt): Remove.
10465         (current_scope_stmt_stack): New function.
10466         (cp_expand_stmt): Don't handle SCOPE_STMTs.
10467         (expand_body): Use function_name_declared_p.
10468         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
10469         * typeck.c: Change order of includes.
10470         (convert_sequence): Remove.
10471
10472 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
10473
10474         * lex.c (reswords): Add _Complex.
10475
10476 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10477
10478         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
10479
10480 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
10481
10482         * init.c (begin_init_stmts): Don't use // comments.
10483
10484 2000-09-12  Jason Merrill  <jason@redhat.com>
10485
10486         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
10487         all non-extern arrays.
10488
10489         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
10490         typenames, too.  Downgrade complaint to pedwarn.
10491         (xref_tag): Warn about surprising behavior of 'friend struct T'.
10492         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
10493         'class This::Inherited'.
10494
10495 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
10496
10497         * decl.c (finish_case_label): Given the LABEL_DECL a
10498         DECL_CONTEXT.
10499
10500 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
10501
10502         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
10503         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
10504         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
10505         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
10506         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
10507         New macros.
10508         (sorry_for_unsupported_tree, print_scope_operator,
10509         print_left_paren, print_right_paren, print_left_bracket,
10510         print_right_bracket, print_whitespace): Likewise.
10511         (aggr_variety): Rename to class_key_or_enum.
10512         (print_type): Rename to print_type_id.
10513         (print_type_specifier_seq, print_simple_type_specifier,
10514         print_elaborated_type_specifier,
10515         print_rest_of_abstract_declarator,
10516         print_parameter_declaration_clause, print_exception_specification,
10517         print_nested_name_specifier, print_template_id,
10518         typedef_original_name,  print_template_argument_list_start,
10519         print_template_argument_list_end): New functions.
10520
10521 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
10522
10523         * ir.texi: Add more documentation.
10524
10525 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
10526
10527         * cp-tree.h (struct saved_scope): Remove x_function_parms.
10528         (current_function_parms): Don't define.
10529         (struct cp_language_function): Remove parms_stored.
10530         (current_function_just_assigned_this): Don't define.
10531         (current_function_parms_stored): Likewise.
10532         (static_ctors): Declare.
10533         (static_dtors): Likewise.
10534         (SF_EXPAND): Don't define.
10535         (expand_start_early_try_stmts): Remove declaration.
10536         (store_parm_decls): Likewise.
10537         * decl.c (static_ctors): Don't declare.
10538         (static_dtors): Likewise.
10539         (struct binding_level): Remove this_block.
10540         (poplevel): Remove dead code.
10541         (set_block): Likewise.
10542         (mark_binding_level): Don't mark this_block.
10543         (mark_saved_scope): Don't mark x_function_parms.
10544         (init_decl_processing): Don't add current_function_parms as a GC
10545         root.
10546         (check_function_type): Change prototype.
10547         (start_function): Remove RTL-generation code.
10548         (expand_start_early_try_stmts): Remove.
10549         (store_parm_decls): Give it internal linkage.  Remove
10550         RTL-generation code.
10551         (finish_function): Remove RTL-generation code.
10552         * decl2.c (static_ctors): Fix formatting.
10553         (static_dtors): Likewise.
10554         * method.c (use_thunk): Don't call store_parm_decls.
10555         (synthesize_method): Likewise.
10556         * optimize.c (maybe_clone_body): Likewise.
10557         * parse.y (fn.def2): Likewise.
10558         (.set_base_init): Likewise.
10559         (nodecls): Likewise.
10560         * pt.c (instantiate_decl): Likewise.
10561         * rtti.c (synthesize_tinfo_fn): Likewise.
10562         * semantics.c (genrtl_try_block): Simplify.
10563         (expand_body): Use genrtl_start_function and
10564         genrtl_finish_function.
10565         (genrtl_start_function): New function.
10566         (genrtl_finish_function): Likewise.
10567
10568 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10569
10570         * error.c (cp_tree_printer, case 'P'): Append break.
10571
10572 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
10573
10574         * cp-tree.h (frob_opname): Declare.
10575         * parse.y (saved_scopes): New static variable.
10576         (cp_parse_init): Adjust.
10577         (do_id): If lastiddecl is NULL, do do_identifier.
10578         (operator): Save scope information.
10579         (unoperator): New reduction. Restore scope information.
10580         (operator_name): Append unoperator. Call frob_opname.
10581         * spew.c (frob_opname): Define.
10582
10583 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
10584
10585         * decl.c, rtti.c: Include defaults.h if not already included.
10586         Don't define the *_TYPE_SIZE macros.
10587
10588 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
10589
10590         * cp-tree.h (push_switch): Change prototype.
10591         (check_cp_case_value): Remove declaration.
10592         (decl_constant_value): Likewise.
10593         * decl.c (struct cp_switch): Add switch_stmt and cases.
10594         (case_compare): New function.
10595         (push_switch): Set switch_stmt.  Initialize cases.
10596         (pop_switch): Clean up cases.
10597         (define_case_label): Rename to ...
10598         (finish_case_label): ... this.  Do semantic analysis for case
10599         labels here.
10600         (start_function): Correct comment.
10601         * decl2.c (check_cp_case_value): Remove.
10602         * expr.c (do_case): Remove.
10603         * pt.c (tsubst_expr): Adjust call to finish_case_label.
10604         * semantics.c (genrtl_do_poplevel): Remove declaration.
10605         (RECHAIN_STMTS): Remove.
10606         (finish_break_stmt): Use build_break_stmt.
10607         (finish_continue_stmt): Use build_continue_stmt.
10608         (finish_switch_cond): Adjust condition here, rater than in
10609         c_expand_start_case.
10610         (finish_case_label): Remove.
10611         * typeck.c (c_expand_return): Remove.
10612         (c_expand_start_case): Likewise.
10613
10614 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
10615
10616         * ir.texi: Document type nodes.
10617
10618 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10619
10620         * cp-tree.h (init_cp_semantics): Declare.
10621         (genrtl_try_block): Don't declare.
10622         (genrtl_handler): Likewise.
10623         (genrtl_catch_block): Likewise.
10624         (genrtl_ctor_stmt): Likewise.
10625         (genrtl_subobject): Likewise.
10626         (genrtl_do_poplevel): Likewise.
10627         (genrtl_named_return_value): Likewise.
10628         * lex.c (init_parse): Call init_cp_semantics.
10629         * semantics.c (genrtl_try_block): Give it internal linkage.
10630         (genrtl_handler): Likewise.
10631         (genrtl_catch_block): Likewise.
10632         (genrtl_ctor_stmt): Likewise.
10633         (genrtl_subobject): Likewise.
10634         (genrtl_do_poplevel): Likewise.
10635         (genrtl_named_return_value): Likewise.
10636         (lang_expand_stmt): Rename to ...
10637         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
10638         (init_cp_semantics): Define.
10639
10640         * decl.c (initialize_local_var): Remove RTL-generating code.
10641         * semantics.c (genrtl_try_block): Fix formatting.
10642
10643         Move statement-tree facilities from C++ to C front-end.
10644         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
10645         (void_zero_node): Remove.
10646         (stmt_tree): Likewise.
10647         (scope_chain): Adjust.
10648         (language_function): Rename to cp_language_function.
10649         (cp_function_chain): Adjust.
10650         (current_stmt_tree): Remove.
10651         (last_tree): Likewise.
10652         (last_expr_type): Likewise.
10653         (struct lang_decl): Adjust.
10654         (STMT_IS_FULL_EXPR_P): Remove.
10655         (add_tree): Remove.
10656         (begin_stmt_tree): Likewise.
10657         (finish_stmt_tree): Likewise.
10658         (walk_tree_fn): Likewise.
10659         (walk_stmt_tree): Likewise.
10660         * class.c (finish_struct): Replace use of add_tree with add_stmt.
10661         * decl.c (mark_stmt_tree): Adjust type.
10662         (init_decl_processing): Don't build void_zero_node.
10663         (initialize_local_var): Adjust usage of current_stmt_tree.
10664         (finish_enum): Use add_stmt, not add_tree.
10665         (save_function_data): Adjust use of language_function.
10666         (finish_constructor_body): Use add_stmt, not add_tree.
10667         (finish_destructor_body): Likewise.
10668         (push_cp_function_context): Adjust use of language_function.
10669         (pop_cp_function_context): Likewise.
10670         (mark_lang_function): Likewise.
10671         (mark_cp_function_context): Likewise.
10672         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
10673         (build_vec_init): Likewise.
10674         * semantics.c (SET_LAST_STMT): Remove.
10675         (RECHAIN_STMTS): Don't use it.
10676         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
10677         (current_stmt_tree): Define.
10678         (add_tree): Remove.
10679         (finish_goto_stmt): Use add_stmt, not add_tree.
10680         (finish_expr_stmt): Likewise.
10681         (begin_if_stmt): Likewise.
10682         (finish_then_clause): Likewise.
10683         (begin_while_stmt): Likewise.
10684         (begin_do_stmt): Likewise.
10685         (finish_return_stmt): Likewise.
10686         (begin_for_stmt): Likewise.
10687         (finish_break_stmt): Likewise.
10688         (finish_continue_stmt): Likewise.
10689         (begin_switch_stmt): Likewise.
10690         (finish_case_label): Likewise.
10691         (begin_try_block): Likewise.
10692         (begin_function_try_block): Likewise.
10693         (begin_handler): Likewise.
10694         (begin_catch_block): Likewise.
10695         (begin_compound_stmt): Likewise.
10696         (begin_asm_stmt): Likewise.
10697         (finish_asm_stmt): Likewise.
10698         (finish_label_stmt): Likewise.
10699         (add_decl_stmt): Likewise.
10700         (finish_subobject): Likewise.
10701         (finish_decl_cleanup): Likewise.
10702         (finish_named_return_value): Likewise.
10703         (setup_vtbl_ptr): Likewise.
10704         (add_scope_stmt): Likewise.
10705         (finish_stmt_expr): Likewise.
10706         (prune_unused_decls): Remove.
10707         (begin_stmt_tree): Likewise.
10708         (finish_stmt_tree): Likewise.
10709         (prep_stmt): Adjust use of current_stmt_tree.
10710         (lang_expand_stmt): Likewise.
10711         * tree.c (statement_code_p): Remove.
10712         (cp_statement_code_p): New function.
10713         (walk_stmt_tree): Remove.
10714         (init_tree): Set lang_statement_code_p.
10715
10716 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
10717
10718         Integrated preprocessor.
10719
10720         * Make-lang.in, Makefile.in: Remove all references to input.c,
10721         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
10722         * gxx.gperf, hash.h, input.c: Delete.
10723         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
10724         initialized properly.
10725
10726         * class.c (fixup_pending_inline): Take a tree, not a
10727         struct pending_inline *.  All callers changed.
10728         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
10729         RID_PROTECTED entries in ridpointers[] array here.
10730         * decl.c (duplicate_decls): Do not refer to struct
10731         pending_inline.
10732         (record_builtin_type, init_decl_processing): Use RID_MAX not
10733         CP_RID_MAX.
10734         (grokdeclarator): Use C_IS_RESERVED_WORD.
10735         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
10736         cpplib.
10737         (grok_x_components): Do not inspect pending_inlines chain.
10738
10739         * cp-tree.h (struct lang_identifier): Add rid_code entry.
10740         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
10741         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
10742         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
10743         TIME_IDENTIFIER_FILEINFO): Kill.
10744         Update prototypes.
10745         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
10746         single 32-bit word.
10747         * parse.y: Call do_pending_inlines unconditionally.
10748         reinit_parse_for_method is now snarf_method.  fn.defpen is no
10749         longer necessary.  Remove unnecessary <itype> annotation on
10750         SCOPE.  Do not refer to end_of_file or struct pending_inline.
10751         * semantics.c (begin_inline_definitions): Call
10752         do_pending_inlines unconditionally.
10753
10754         * lex.c: Remove all code now shared with C front end.
10755         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
10756         into the get_identifier table.  Rewrite pragma handling to
10757         work with the registry.  Move code to save tokens for later
10758         processing to spew.c.
10759
10760         * spew.c: Rewrite everything in terms of token streams instead
10761         of text.  Move routines here from lex.c / input.c as
10762         appropriate.  GC-mark trees hanging off the pending inlines
10763         chain.
10764
10765 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
10766
10767         * NEWS: Mention that the named return value extension has been
10768         deprecated.
10769         * cp-tree.h (original_result_rtx): Define.
10770         (TREE_REFERENCE_EXPR): Remove.
10771         (DECL_VPARENT): Likewise.
10772         (pushdecl_nonclass_level): Likewise.
10773         (store_return_init): Likewise.
10774         (reinit_lang_specific): Likewise.
10775         (genrtl_named_return_value): Change prototype.
10776         * decl.c (original_result_rtx): Remove.
10777         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
10778         Do not generate RTL for local variables here.
10779         (store_return_init): Remove.
10780         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
10781         store_return_init.
10782         (finish_named_return_value): Adjust accordingly.  Warn that this
10783         extension is deprecated.
10784         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
10785
10786 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10787
10788         * pt.c (type_unification_real): Replace switch with if.
10789         (unify): Tsubst non-type parms before comparing.
10790
10791 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10792
10793         * error.c (dump_typename): New function, broken out of ...
10794         (dump_type): ... here. Use it.
10795         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
10796
10797 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10798
10799         * init.c (build_offset_ref): Deal with namespace scoped
10800         TEMPLATE_ID_EXPRs.
10801
10802 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
10803
10804         * class.c (resolve_address_of_overloaded_function): Add
10805         explanation message.
10806         * decl.c (define_case_label): Reformat explanation.
10807         * decl2.c (finish_static_data_member_decl): Likewise.
10808         (grokfield): Likewise.
10809         * friend.c (do_friend): Likewise.
10810
10811 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
10812
10813         * tree.c (walk_tree): Expose tail recursion.
10814         (walk_stmt_tree): New function.
10815         * cp-tree.h: Prototype walk_stmt_tree.
10816         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
10817         the BLOCKs directly.  If a BLOCK has no variables after
10818         pruning, discard it.
10819         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
10820         restore the line number.
10821
10822 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
10823
10824         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
10825         (pt.o): Remove dependency on HTAB_H.
10826         * cp-tree.h: Include hashtab.h.
10827         (walk_tree): Change prototype.
10828         (walk_tree_without_duplicates): New function.
10829         * decl.c (check_default_argument): Use it.
10830         * optimize.c (remap_decl): Adjust calls to walk_tree.
10831         (copy_body): Likewise.
10832         (expand_calls_inline): Likewise.
10833         (calls_setjmp_p): Use walk_tree_without_duplicates.
10834         * pt.c: Don't include hashtab.h.
10835         (for_each_template_parm): Use walk_tree_without_duplicates.
10836         * semantics.c (finish-stmt_tree): Likewise.
10837         (expand_body): Likewise.
10838         * tree.c (walk_tree): Add additional parameter.
10839         (walk_tree_without_duplicates): New function.
10840         (count_trees): Use it.
10841         (verify_stmt_tree): Adjust call to walk_tree.
10842         (find_tree): Use walk_tree_without_duplicates.
10843         (no_linkage_check): Likewise.
10844         (break_out_target_exprs): Adjust call to walk_tree.
10845         (cp_unsave): Likewise.
10846
10847 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
10848
10849         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
10850         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
10851         * cp-tree.h (TYPE_BINFO): Adjust comment.
10852         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10853         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10854         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10855         (TYPE_TEMPLATE_INFO): Likewise.
10856         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
10857         * class.c (push_nested_class): Likewise.
10858         * decl.c (lookup_name_real): Likewise.
10859         (grokdeclarator): Likewise.
10860         (grok_op_properties): Likewise.
10861         (xref_tag): Likewise.
10862         (xref_basetypes): Likewise.
10863         * decl2.c (constructor_name_full): Likewise.
10864         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
10865         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
10866         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
10867         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10868         (dump_type_suffix): Likewise.
10869         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
10870         instead.
10871         (get_aggr_from_typedef): Likewise.
10872         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
10873         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10874         (write_template_parm): Likewise.
10875         (write_template_template_parm): Check tree code instead of
10876         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10877         * method.c (build_overload_nested_name): Add
10878         BOUND_TEMPLATE_TEMPLATE_PARM.
10879         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
10880         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10881         * pt.c (convert_template_argument): Check tree code instead of
10882         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10883         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
10884         (for_each_template_parm): Adjust comment.
10885         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
10886         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10887         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
10888         template_args_equal to compare template template parameter cases.
10889         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10890         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
10891         instead.
10892         * tree.c (copy_template_template_parm): Decide whether to create
10893         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
10894         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
10895         (copy_tree_r): Likewise.
10896         * typeck.c (comptypes): Likewise.  Check tree code instead of
10897         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10898
10899 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
10900
10901         * decl.c (finish_function): Move the code for handling functions
10902         marked with the constructor and destructor attributes inside the
10903         expand_p block.
10904
10905 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10906
10907         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
10908
10909 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10910
10911         * pt.c (lookup_template_class): Remove abort.
10912         * tree.c (get_type_decl): Allow error_mark_node.
10913
10914 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
10915
10916         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
10917         TEMPLATE_ID_EXPRs.
10918
10919 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
10920
10921         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
10922         new ABI mangling.
10923
10924 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10925
10926         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
10927         union tag mismatch error reporting.
10928
10929 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
10930
10931         * call.c (build_scoped_method_call): Check it is not a namespace.
10932
10933 2000-08-30  Jason Merrill  <jason@redhat.com>
10934
10935         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
10936
10937         * tree.c (bot_manip): Check TREE_CONSTANT rather than
10938         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
10939         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
10940
10941         * decl.c (start_function): Always call make_function_rtl.
10942
10943 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10944
10945         * semantics.c (prune_unused_decls): New function.
10946         (finish_stmt_tree): Call it via walk_tree.
10947
10948 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
10949
10950         * class.c (build_secondary_vtable): Constify a char *.
10951         * decl.c (init_decl_processing): Initialize function_id_node,
10952         pretty_function_id_node, and func_id_node.
10953         * input.c (struct input_source): Constify 'str'.
10954         (feed_input): Constify first argument.
10955         * mangle.c (write_identifier): Constify argument.
10956         * pt.c (mangle_class_name_for_template): Constify argument.
10957
10958 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
10959
10960         * typeck.c (mark_addressable): Remove code that pokes around in
10961         RTL.
10962
10963 2000-08-28  Jason Merrill  <jason@redhat.com>
10964
10965         * lex.c (file_name_nondirectory): Move to toplev.c.
10966
10967         * cp-tree.h (LOCAL_CLASS_P): New macro.
10968         * class.c (finish_struct_1): Use it.
10969
10970 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
10971
10972         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
10973         (write_encoding): Pass another argument to write_name.
10974         (write_name): Add ignore_local_scope parameter.  Fix handling of
10975         local names.
10976         (write_nested_name): Use write_unqualified_name.
10977         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
10978         (write_template_prefix): Use write_unqualified_name.
10979         (write_component): Remove.
10980         (write_local_name): Add parameter.  Use direct local entity to
10981         discriminator calculation.
10982         (write_class_enum_type): Pass another argument to write_name.
10983         (write_template_template_arg): Likewise.
10984         (make_guard_variable): Likewise.
10985
10986 2000-08-27  Jason Merrill  <jason@redhat.com>
10987
10988         * decl.c (pushdecl): Matching decls for local externs are found in
10989         the current level.  Propagate linkage information from previous
10990         declarations.
10991
10992 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
10993
10994         * ir.texi (Expressions): Fix typo.
10995
10996 2000-08-25  Greg McGary  <greg@mcgary.org>
10997
10998         * tree.c (init_tree): Use ARRAY_SIZE.
10999
11000 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11001
11002         * error.c (cp_tree_printer): Rework.
11003
11004 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
11005
11006         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
11007         dyn-string.o.
11008         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
11009         (cp-demangle.o): Remove target.
11010         (dyn-string.o): Likewise.
11011
11012         * decl.c (grokfndecl): Require that `main' return an `int'.
11013         * mangle.c (write_encoding): Don't mangle return types for
11014         conversion functions.
11015
11016 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11017
11018         * error.c (tree_formatting_info): New data type.
11019         (tree_being_formatted): New macro.
11020         (tree_formatting_flags): Likewise.
11021         (put_whitespace): Likewise.
11022         (print_tree_identifier): Likewise.
11023         (print_identifier): Likewise.
11024         (cp_tree_printer, print_function_argument_list, print_declaration,
11025         print_expression, print_function_declaration,
11026         print_function_parameter, print_type, print_cv_qualifier): New
11027         functions.
11028         (init_error): Initialize lang_printer.
11029
11030 2000-08-24  Jason Merrill  <jason@redhat.com>
11031
11032         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
11033         adjustment necessary.
11034
11035 2000-08-24  Greg McGary  <greg@mcgary.org>
11036
11037         * cp-tree.h (MAIN_NAME_P): Remove macro.
11038
11039 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
11040
11041         * error.c (print_instantiation_context): Don't forget to flush the
11042         buffer.
11043
11044 2000-08-23  Jason Merrill  <jason@redhat.com>
11045
11046         * typeck.c (build_ptrmemfunc): Save the input pmf.
11047
11048         * method.c (process_modifiers): Use same_type_p.
11049
11050 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
11051
11052         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
11053         * mangle.c (write_function_type): Change prototype.
11054         (write_encoding): Don't mangle return types for
11055         constructors or destructors.
11056         (write_type): Adjust call to write_function_type.
11057         * pt.c (instantiate_template): Instantiate alternate entry points
11058         when instantiating the main function.
11059
11060 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11061
11062         * error.c (cp_print_error_function): Don't use embedded '\n' in
11063         output_printf.
11064
11065 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
11066
11067         * decl.c (init_decl_processing): Remove bogus initialization.
11068         * error.c (lang_print_error_function): Restore here.
11069         (init_error): Initialize print_error_function.
11070
11071 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
11072
11073         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
11074
11075 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
11076
11077         * Makefile.in (error.o): Depends on diagnostic.h
11078
11079         * cp-tree.h (problematic_instantiation_changed,
11080         record_last_problematic_instantiation, current_instantiation,
11081         print_instantiation_context): Declare.
11082         (maybe_print_template_context): Remove.
11083
11084         * decl.c (init_decl_processing): Set print_error_function to NULL.
11085         (lang_print_error_function): Remove, since we're using a new
11086         machinery.
11087
11088         * error.c: #include diagnostic.h
11089         (function_category): New function.
11090         (cp_diagnostic_starter): Likewise.
11091         (cp_diagnostic_finalizer): Likewise.
11092         (cp_print_error_function): Likewise.
11093         (maybe_print_instantiation_context): Likewise.
11094         (print_instantiation_full_context): Likewise.
11095         (print_instantiation_partial_context): Likewise.
11096         (print_instantiation_context): Define.
11097         (init_error): Initialize diagnostic pager and finalizer.
11098
11099         * pt.c (problematic_instantiation_changed): Define.
11100         (record_last_problematic_instantiation): Likewise.
11101         (current_instantiation): Likewise.
11102         (maybe_print_template_context): Remove.
11103         (print_template_context): Likewise.
11104         (current_tinst_level): Make static to reflect Brendan Kehoe's
11105         change of 1995-04-13.
11106         (push_tinst_level): Call print_instantiation_context.
11107
11108 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11109
11110         * lang-specs.h: Do not process -o or run the assembler if
11111         -fsyntax-only.
11112
11113 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
11114
11115         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
11116         variables.
11117         * decl2.c (lang_decode_option): Disable gettext attributes for
11118         -ansi.
11119
11120 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11121
11122         * lex.c (lang_init_options): Default diagnostic message maximum
11123         length to 80, when line-wrapping.
11124
11125 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
11126
11127         * class.c (build_vtbl_initializer): Clear the entire
11128         vtbl_init_data.  Start keeping track of the functions for which we
11129         have created vcall offsets here.
11130         (dfs_build_vcall_offset_vtbl_entries): Remove.
11131         (build_vcall_offset_vtbl_entries): Reimplement.
11132         (add_vcall_offset_vtbl_entries_r): New function.
11133         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
11134         computing when vcall offsets are necessary.
11135
11136 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11137
11138         * decl.c (member_function_or_else): Use cp_error ... %T.
11139         (grokdeclarator): Likewise.
11140         (start_method): Likewise.
11141         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
11142
11143 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11144
11145         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
11146         TYPE_DECLs.
11147
11148 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11149
11150         * cp-tree.h (PTRMEM_OK_P): New macro.
11151         (itf_ptrmem_ok): New enumeration value.
11152         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
11153         argument. Diagnose implicit pointer to member.
11154         (instantiate_type): Don't diagnose implicit pointer to member
11155         here. Pass itf_ptrmem_ok if ok. Adjust calls to
11156         resolve_address_of_overloaded_function.
11157         * init.c (build_offset_ref): Set PTRMEM_OK_P.
11158         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
11159         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
11160         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
11161         (build_unary_op): Deal with single non-static member in
11162         microsoft-land.
11163
11164 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11165
11166         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
11167
11168 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
11169
11170         * cp-tree.h (enum_name_string): Remove prototype.
11171         (report_case_error): Remove prototype.
11172         * cp/typeck2.c (enum_name_string): Remove.
11173         (report_case_error): Remove.
11174         * error.c (dump_expr): Deal with enum values directly.
11175         Correctly negate integer constant.
11176
11177 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11178
11179         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
11180         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
11181         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
11182         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
11183         (__cxa_vec_new): Use __cxa_vec_new2.
11184         (__cxa_vec_delete): Use __cxa_vec_delete2.
11185
11186 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11187
11188         * vec.cc (__cxa_vec_new): Set "C" linkage.
11189         (__cxa_vec_ctor): Likewise.
11190         (__cxa_vec_cctor): Likewise.
11191         (__cxa_vec_dtor): Likewise.
11192         (__cxa_vec_delete): Likewise.
11193         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
11194         (__cxa_vec_ctor): Likewise.
11195         (__cxa_vec_cctor): Likewise.
11196         (__cxa_vec_dtor): Likewise.
11197         (__cxa_vec_delete): Likewise.
11198
11199 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11200
11201         * class.c (instantiate_type): Reinstate local variable
11202         deleted in previous change.
11203
11204         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
11205         itf_no_attributes.
11206
11207 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11208
11209         * cp-tree.h (instantiate_type_flags): New enumeration.
11210         (instantiate_type): Change parameter.
11211         * class.c (instantiate_type): Adjust prototype. Adjust.
11212         * call.c (standard_conversion): Adjust instantiate_type call.
11213         (reference_binding): Likewise.
11214         (build_op_delete_call): Likewise.
11215         (convert_like_real): Likewise.
11216         * cvt.c (cp_convert_to_pointer): Likewise.
11217         (convert_to_reference): Likewise.
11218         * pt.c (convert_nontype_argument): Likewise.
11219         * typeck.c (build_binary_op): Likewise.
11220         (build_ptrmemfunc): Likewise.
11221         (convert_for_assignment): Likewise.
11222
11223 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
11224
11225         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
11226         (current_aggr): Define.
11227         * decl.c (grokdeclarator): Make sure a friend class is an
11228         elaborated type specifier.
11229         * parse.y (current_aggr): Remove static definition.
11230         (cp_parse_init): Adjust.
11231         (structsp): Clear and restore current_aggr.
11232         (component_decl_list): Clear current_aggr.
11233
11234         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
11235         aggregate tag on the typename's context.
11236
11237         * pt.c (tsubst_friend_class): Return error_mark_node, if
11238         parms becomes NULL.
11239         (instantiate_class_template): Ignore error_mark_node friend types.
11240
11241 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
11242
11243         * cvt.c (warn_ref_binding): New static function, broken out of ...
11244         (convert_to_reference): ... here. Use it.
11245
11246 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11247
11248         * parse.y (template_arg): Add rule for template qualified with
11249         global scope.
11250
11251 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11252
11253         * decl2.c (add_function): Reorganize.
11254         (arg_assoc): Do not consider function template decls.
11255
11256 2000-08-11  Jason Merrill  <jason@redhat.com>
11257
11258         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
11259         looking inside.
11260
11261 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11262
11263         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
11264         (lookup_nested_tag): Likewise.
11265
11266         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
11267         can be produced.
11268
11269 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11270
11271         * parse.y (named_complex_class_head_sans_basetype): Remove
11272         always true if.
11273
11274 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11275
11276         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
11277         explicit TEMPLATE_ID_EXPR args.
11278         (build_expr_from_tree, case CALL_EXPR): Likewise.
11279
11280 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
11281
11282         * decl.c (check_tag_decl): Diagnose typename's which don't
11283         declare anything.
11284
11285 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
11286
11287         * init.c (build_aggr_init): Reject bogus array initializers
11288         early.
11289
11290 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11291
11292         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
11293         runtime.
11294         * cp/tinfo.cc (__dynamic_cast): Likewise.
11295         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
11296
11297 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
11298
11299         * cvt.c (convert_to_pointer_force): Fix error message when
11300         attempting to cast from ambiguous base.
11301
11302 2000-08-08  Jason Merrill  <jason@redhat.com>
11303
11304         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
11305         (tsubst_template_arg_vector): Likewise.
11306
11307         * decl2.c (build_anon_union_vars): Choose the largest field; don't
11308         assume that one will be as large as the union.
11309
11310 2000-08-07  Kazu Hirata  <kazu@hxi.com>
11311
11312         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
11313         * decl.c (pop_labels): Likewise.
11314
11315 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
11316
11317         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
11318         specifications.
11319         (__pointer_to_member_type_info): Likewise.
11320         (__base_class_info): Likewise.
11321         (__class_type_info): Likewise.
11322         (__si_class_type_info): Likewise.
11323         (__vmi_class_type_info): Likewise.
11324         * tinfo.cc (__si_class_type_info::__do_find_public_src):
11325         Changed member names to match specifications.
11326         (__vmi_class_type_info::__do_find_public_src): Likewise.
11327         (__si_class_type_info::__do_dyncast): Likewise.
11328         (__vmi_class_type_info::__do_dyncast): Likewise.
11329         (__si_class_type_info::__do_upcast): Likewise.
11330         (__vmi_class_type_info::__do_upcast): Likewise.
11331         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
11332         (__pbase_type_info::__pointer_catch): Likewise.
11333         (__pointer_type_info::__pointer_catch): Likewise.
11334         (__pointer_to_member_type_info::__pointer_catch): Likewise.
11335
11336 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
11337
11338         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
11339         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
11340         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
11341
11342 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
11343
11344         * cp-tree.h (add_method): Change prototype.
11345         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
11346         Don't double the size of the method vector in the error case.
11347         (handle_using_decl): Adjust call to add_method.
11348         (add_implicitly_declared_members): Likewise.
11349         (clone_function_decl): Likewise.
11350         * decl2.c (check_classfn): Likewise.
11351         * semantics.c (finish_member_declaration): Likewise.
11352
11353 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
11354
11355         * decl.c (flag_isoc94): New variable.
11356
11357 2000-08-02  Jason Merrill  <jason@redhat.com>
11358
11359         * pt.c (do_type_instantiation): Add complain parm; don't complain
11360         if called recursively.
11361         * cp-tree.h, parse.y: Adjust.
11362
11363 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
11364
11365         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
11366         -Wno-strict-prototypes.
11367
11368         * g++spec.c: Adjust type of second argument to
11369         lang_specific_driver, and update code as necessary.
11370
11371         * cp-tree.h: Don't prototype min_precision here.
11372         (my_friendly_assert): Cast expression to void.
11373         * semantics.c (do_poplevel): Initialize scope_stmts.
11374
11375 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
11376
11377         * cp-tree.h (DECL_NEEDED_P): Tweak.
11378
11379 2000-07-28  Jason Merrill  <jason@redhat.com>
11380
11381         * lang-specs.h: Use %i in rule for .ii files.
11382
11383 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
11384
11385         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
11386
11387 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
11388
11389         Allow indirect primary bases.
11390         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
11391         primary_base.
11392         (CLASSTYPE_VFIELD_PARENT): Remove.
11393         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
11394         (BINFO_PRIMARY_BINFO): Remove.
11395         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
11396         (BINFO_VBASE_PRIMARY_P): Likewise.
11397         (BINFO_PRIMARY_BASE_OF): New macro.
11398         (BINFO_INDIRECT_PRIMARY_P): Likewise.
11399         (get_primary_binfo): New function.
11400         * decl.c (lang_mark_tree): Make lang_type::primary_base.
11401         * class.c (vcall_offset_data_s): Rename to ...
11402         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
11403         and add ctor_vtbl_p.
11404         (get_derived_offset): Use get_primary_binfo.
11405         (dfs_mark_primary_bases): Adjust handling of virtual primary
11406         bases.
11407         (mark_primary_bases): Likewise.
11408         (set_primary_base): Take a binfo, not an integer, as a
11409         representation of the primary base.
11410         (indirect_primary_base_p): Remove.
11411         (determine_primary_base): Adjust for indirect primary bases.
11412         (dfs_find_final_overrider): Fix typo in coment.
11413         (update_vtable_entry_for_fn): Use get_primary_binfo.
11414         (layout_nonempty_base_or_field): Tweak.
11415         (build_base_fields): Adjust for new primary base semantics.
11416         (dfs_propagate_binfo_offsets): Remove.
11417         (propagate_binfo_offsets): Rewrite.
11418         (dfs_set_offset_for_shared_vbases): Remove.
11419         (layout_virtual_bases): Don't use it.
11420         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
11421         ABI.
11422         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
11423         CLASSTYPE_VFIELD_PARENT.
11424         (dfs_get_primary_binfo): New function.
11425         (get_primary_binfo): Likewise.
11426         (dump_class_hierarchy_r): Tweak printing of primary bases.
11427         (build_vtbl_initializer): Fix typo in comments.  Use
11428         vtbl_init_data.
11429         (build_vcall_and_vbase_vtbl_entries): Likewise.
11430         (build_vbaes_offset_vtbl_entries): Likewise.
11431         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
11432         BV_VCALL_INDEX to handle indirect primary bases.
11433         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
11434         (build_rtti_vtbl_entries): Likewise.
11435         * search.c (get_shared_vbase_if_not_primary): Tweak.
11436         (find_vbase_instance): Likewise.
11437         (binfo_for_vtable): Simplify.
11438         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
11439         (make_binfo): Make it have 11 entries.
11440
11441 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
11442
11443         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
11444         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
11445         ascertaining primaryness.
11446         (G): Remove template_args.
11447         (decl_is_template_id): New function.
11448         (write_encoding): Use decl_is_template_id.
11449         (write_name): Likewise.  Handle type_decls.  Get main variant of
11450         type decls.
11451         (write_nested_name): Likewise.
11452         (write_prefix): Likewise.
11453         (write_template_prefix): Likewise.
11454         (write_special_name_constructor): Remove defunct production from
11455         comment.
11456         (write_bare_function_type): Remove comment about absent parameter.
11457         (write_template_template_arg): Add missing grammar production to
11458         comment.
11459
11460 2000-07-27  Jason Merrill  <jason@redhat.com>
11461
11462         * decl.c (duplicate_decls): If common_type produces a non-typedef
11463         type for a typedef, just use the old type.
11464
11465 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
11466
11467         * cp-tree.h (function_depth): Declare.
11468         (verify_stmt_tree): Likewise.
11469         (find_tree): Likewise.
11470         * decl.c (function_depth): Give it external linkage.
11471         * optimize.c (optimize_function): Increment and decrement it.
11472         * tree.c (verify_stmt_tree_r): New function.
11473         (verify_stmt_tree): Likewise.
11474         (find_tree_r): Likewise.
11475         (find_tree): Likewise.
11476
11477 2000-07-27  Jason Merrill  <jason@redhat.com>
11478
11479         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
11480         TYPE_PTRMEMFUNC_P.
11481         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
11482
11483 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11484
11485         * decl.c (start_cleanup_fn): Mark the function as `inline'.
11486         * decl2.c (get_guard): Call cp_finish_decl, not
11487         rest_of_decl_compilation, for local guards.
11488         * lex.c (do_identifier): Remove unused variable.
11489
11490 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
11491
11492         * parse.y:  Add missing ';'.
11493
11494 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
11495
11496         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
11497         of `extern "C++"'.
11498
11499 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11500
11501         Kill strict_prototype. Backwards compatibility only for
11502         non NO_IMPLICIT_EXTERN_C systems.
11503         * cp-tree.h (flag_strict_prototype): Remove.
11504         (strict_prototype): Remove.
11505         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11506         * decl.c (maybe_push_to_top_level): Adjust.
11507         (pop_from_top_level): Adjust.
11508         (decls_match): Only allow sloppy parm matching for ancient
11509         system headers.
11510         (init_decl_processing): Adjust.
11511         (grokdeclarator): Adjust.
11512         * decl2.c (flag_strict_prototype): Remove.
11513         (strict_prototype): Remove.
11514         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
11515         (lang_f_options): Remove "strict-prototype".
11516         (unsupported-options): Add "strict-prototype".
11517         * lex.c (do_identifier): Adjust.
11518         (do_scoped_id): Adjust.
11519         * parse.y (empty_parms): Adjust.
11520         * class.c (push_lang_context): Adjust.
11521         (pop_lang_context): Adjust.
11522         * typeck.c (comp_target_parms): Adjust.
11523
11524 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
11525
11526         * decl.c (poplevel): Deal with anonymous variables at for scope.
11527         (maybe_inject_for_scope_var): Likewise.
11528
11529 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
11530
11531         * decl.c: Remove all signal handling code, now done in toplev.c.
11532
11533 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
11534
11535         * decl.c (make_rtl_for_nonlocal_decl): Rework.
11536
11537         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
11538         correctly.
11539
11540 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
11541
11542         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
11543         Define my_friendly_assert and my_friendly_abort as macros
11544         which may call friendly_abort.  Prototype friendly abort, not
11545         my_friendly_abort or my_friendly_assert.
11546         * decl.c (signal_catch): Report the signal caught in the error
11547         message.  Call fatal directly.
11548         * typeck2.c (ack, my_friendly_assert): Delete.
11549         (my_friendly_abort): Rename to friendly_abort.  Expect file,
11550         line, and function parameters.  Report the abort code, then
11551         call fancy_abort.  Do not mask an abort if errors have
11552         already occurred.
11553
11554 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
11555
11556         * typeck.c (comp_target_parms): Remove obsolete parameter.
11557         (comp_target_types): Adjust.
11558
11559 2000-07-17  Jason Merrill  <jason@redhat.com>
11560
11561         * typeck.c (mark_addressable): Never set TREE_USED.
11562         * call.c (build_call): Don't abort on calls to library functions
11563         that have been declared normally.
11564
11565         * typeck.c (build_binary_op): Fix grammar in warning.
11566
11567         * exception.cc (__eh_free): Fix prototype.
11568
11569         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
11570
11571         * decl.c (pushdecl): Handle seeing an OVERLOAD in
11572         IDENTIFIER_NAMESPACE_VALUE.
11573
11574 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
11575
11576         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
11577         * method.c (use_thunk): Correct handling of vcall offsets.
11578
11579 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
11580
11581         * .cvsignore: parse.h and parse.c have no cp- prefix.
11582
11583 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
11584
11585         * .cvsignore: New file.
11586
11587 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
11588
11589         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
11590
11591 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
11592
11593         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
11594         * parse.c: Remove.
11595         * parse.h: Likewise.
11596
11597 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
11598
11599         * class.c (layout_class_type): Add pointers to virtual bases after
11600         base classes under the old ABI.
11601
11602 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
11603
11604         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
11605         (finish_continue_stmt): Likewise.
11606         (begin_for_stmt): Remove call to note_level_for_for.
11607         (finish_goto_stmt): Change call from build_min_nt
11608         to build_stmt.
11609         (finish_expr_stmt): Likewise.
11610         (begin_if_stmt): Likewise.
11611         (begin_while_stmt): Likewise.
11612         (finish_while_stmt): Likewise.
11613         (finish_return_stmt): Likewise.
11614         (begin_for_stmt): Likewise.
11615         (finish_for_stmt): Likewise.
11616         (finish_break_stmt): Likewise.
11617         (begin_switch_stmt): Likewise.
11618         (finish_case_label): Likewise.
11619         (genrtl_try_block): Likewise.
11620         (begin_try_block): Likewise.
11621         (begin_handler): Likewise.
11622         (begin_compound_stmt): Likewise.
11623         (finish_asm_stmt): Likewise.
11624         (finish_label_stmt): Likewise.
11625         (add_decl_stmt): Likewise.
11626         (finish_subobject): Likewise.
11627         (finish_decl_cleanup): Likewise.
11628         (finish_named_return_value): Likewise.
11629         (setup_vtbl_ptr): Likewise.
11630         (add_scope_stmt): Likewise.
11631         * decl.c (finish_constructor_body): Likewise.
11632         (finish_destructor_body): Likewise.
11633         * optimize.c (copy_body_r): Likewise.
11634         (initialize_inlined_parameters): Likewise.
11635         (declare_return_variable): Likewise.
11636         (expand_call_inline): Likewise.
11637
11638 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
11639
11640         * semantics.c (expand_body): Sync interface information
11641         at the end of function body expansion.
11642
11643 2000-07-09  Jason Merrill  <jason@redhat.com>
11644
11645         * init.c (build_new_1): Bail early if the call to new fails.
11646
11647         * decl.c (compute_array_index_type): Check specifically for
11648         an INTEGER_CST, not just TREE_CONSTANT.
11649
11650         * decl.c (duplicate_decls): Don't call duplicate_decls on
11651         the DECL_TEMPLATE_RESULT.
11652         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
11653         codes.
11654
11655         * error.c (dump_template_bindings): Don't crash if we had an
11656         invalid argument list.
11657
11658         * typeck.c (c_expand_start_case): Do narrowing here.
11659         * semantics.c (finish_switch_cond): Not here.
11660
11661 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
11662
11663         * parse.y (asm_clobbers): Do string concatenation.
11664
11665 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11666
11667         * decl.c (pushtag): Don't put local classes in template functions
11668         on the local_classes list.
11669
11670 2000-07-04  Scott Snyder  <snyder@fnal.gov>
11671
11672         * decl2.c (get_guard): Add missing return for old ABI local
11673         variable case.
11674
11675 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
11676
11677         * cp-tree.h (char_type_p): New function.
11678         * decl.c (init_decl_processing): Don't initialize
11679         signed_wchar_type_node or unsigned_wchar_type_node.
11680         (complete_array_type): Handle brace-enclosed string-constants.
11681         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
11682         * tree.c (char_type_p): New function.
11683         * typeck2.c (digest_init): Use char_type_p.
11684
11685 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11686
11687         * pt.c (tsubst): Don't layout type, if it's error_mark.
11688
11689 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
11690
11691         * pt.c (instantiate_pending_templates): Reset template level.
11692
11693 2000-07-05  Jason Merrill  <jason@redhat.com>
11694
11695         * call.c (joust): Don't complain about `operator char *()' beating
11696         `operator const char *() const'.
11697
11698 2000-07-04  scott snyder  <snyder@fnal.gov>
11699             Jason Merrill  <jason@redhat.com>
11700
11701         * repo.c (repo_get_id): Handle the case where a class with virtual
11702         bases has a null TYPE_BINFO_VTABLE.
11703
11704 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
11705             Jason Merrill  <jason@redhat.com>
11706
11707         * parse.y (member_init): Just pass in the type.
11708         * init.c (expand_member_init): Handle getting a type.
11709
11710 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11711             Jason Merrill  <jason@redhat.com>
11712
11713         * decl.c (finish_function): Warn if a function has no return
11714         statement.
11715         Suggested by Andrew Koenig.
11716         * typeck.c (check_return_expr): Do set current_function_returns_value
11717         if we got an error_mark_node.
11718
11719 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11720
11721         * decl2.c (push_decl_namespace): Push the original namespace.
11722
11723 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
11724
11725         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
11726         * semantics.c (begin_class_definition): Clear it.
11727
11728 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
11729
11730         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
11731         (genrtl_expr_stmt): Likewise.
11732         (genrtl_decl_stmt): Likewise.
11733         (genrtl_if_stmt): Likewise.
11734         (genrtl_while_stmt): Likewise.
11735         (genrtl_do_stmt): Likewise.
11736         (genrtl_return_stmt): Likewise.
11737         (genrtl_for_stmt): Likewise.
11738         (genrtl_break_stmt): Likewise.
11739         (genrtl_continue_stmt): Likewise.
11740         (genrtl_scope_stmt): Likewise.
11741         (genrtl_switch_stmt): Likewise.
11742         (genrtl_case_label): Likewise.
11743         (genrtl_begin_compound_stmt): Likewise.
11744         (genrtl_finish_compound_stmt): Likewise.
11745         (genrtl_compound_stmt): Likewise.
11746         (genrtl_asm_stmt): Likewise.
11747
11748         * init.c (begin_init_stmts): Remove call to
11749         genrtl_begin_compound_stmt.
11750         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
11751
11752         * semantics.c (lang_expand_stmt): Changed call to
11753         genrtl_compound_stmt to ignore return value.
11754
11755 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
11756
11757         * mangle.c (canonicalize_for_substitution): Return the canonical
11758         variant of a type.
11759
11760         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
11761         TYPE_DECL.
11762         * typeck.c (commonparms): Remove obstack manipulations.
11763
11764 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
11765
11766         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
11767
11768         * Makefile.in (OBJS): Added ../c-semantics.o.
11769         (OBJDEPS): Likewise.
11770
11771         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
11772         ../c-common.h.
11773         (struct stmt_tree): Added comment.
11774         (current_function_name_declared): Removed.
11775         (stmts_are_full_exprs_p): Likewise.
11776         (genrtl_do_pushlevel): Likewise.
11777         (genrtl_clear_out_block): Likewise.
11778         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
11779         (DECL_ANON_UNION_ELEMS): Likewise.
11780         (emit_local_var): Likewise.
11781         (make_rtl_for_local_static): Likewise.
11782         (do_case): Likewise.
11783         (expand_stmt): Likewise.
11784         (genrtl_decl_cleanup): Likewise.
11785         (c_expand_asm_operands): Likewise.
11786         (c_expand_return): Likewise.
11787         (c_expand_start_case): Likewise.
11788
11789         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
11790         (emit_local_var): Likewise.
11791         (initialize_local_var): Change reference to
11792         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11793         Change reference to stmts_are_full_exprs_p to
11794         current_stmt_tree->stmts_are_full_exprs_p.
11795         (push_cp_function_context): Likewise.
11796
11797         * expect.c (expand_throw): Change reference to
11798         stmts_are_full_exprs_p.
11799
11800         * init.c (build_aggr_init): Change reference to
11801         stmts_are_full_exprs_p.
11802         (build_vec_init): Likewise.
11803
11804         * optimize.c (maybe_clone_body): Change reference to
11805         current_function_name_declared to
11806         cp_function_chain->name_declared.
11807
11808         * pt.c (instantiate_decl): Change reference to
11809         current_function_name_declared to
11810         cp_function_chain->name_declared.
11811
11812         * semantics.c (expand_cond): Moved declaration to c-common.h.
11813         (genrtl_do_pushlevel): Moved to c-semantics.c.
11814         (genrtl_clear_out_block): Likewise.
11815         (genrtl_goto_stmt): Likewise.
11816         (genrtl_expr_stmt): Likewise.
11817         (genrtl_decl_stmt): Likewise.
11818         (gerntl_if_stmt): Likewise.
11819         (genrtl_while_stmt): Likewise.
11820         (genrtl_do_stmt): Likewise.
11821         (genrtl_return_stmt): Likewise.
11822         (genrtl_for_stmt): Likewise.
11823         (genrtl_break_stmt): Likewise.
11824         (genrtl_continue_stmt): Likewise.
11825         (genrtl_scope_stmt): Likewise.
11826         (genrtl_switch_stmt): Likewise.
11827         (genrtl_case_label): Likewise.
11828         (genrtl_begin_compound_stmt): Likewise.
11829         (genrtl_finish_compound_stmt): Likewise.
11830         (genrtl_compound_stmt): Likewise.
11831         (genrtl_asm_stmt): Likewise.
11832         (genrtl_decl_cleanup): Likewise.
11833         (expand_cond): Likewise.
11834         (expand_stmt): Renamed to ...
11835         (lang_expand_stmt): ... this.
11836         (lang_expand_expr_stmt): Initialize.
11837         (set_current_function_name_declared): Likewise.
11838         (stmts_are_full_exprs_p): Likewise.
11839         (current_function_name_declared): Likewise.
11840         (anon_aggr_type_p): Likewise.
11841         (do_poplevel): Change reference to
11842         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
11843         Change reference to stmts_are_full_exprs_p to
11844         current_stmt_tree->stmts_are_full_exprs_p.
11845         (add_tree): Likewise.
11846         (finish_expr_stmt): Likewise.
11847         (prep_stmt): Likewise.
11848         (lang_expand_stmt): Likewise.
11849         (begin_compound_stmt): Change reference to
11850         current_function_name_declared to
11851         cp_function_chain->name_declared and call to
11852         current_function_name_declared().
11853         (setup_vtbl_ptr): Likewise.
11854         (genrtl_do_poplevel): Removed.
11855
11856 2000-06-30  Jason Merrill  <jason@redhat.com>
11857
11858         * init.c (init_init_processing): Go back to aligning like
11859         double_type_node for old ABI.
11860         (get_cookie_size): Make cookie larger if we get a type that needs
11861         more alignment.
11862         (build_vec_delete): Call it.
11863
11864         * typeck.c (qualify_type_recursive): New fn.
11865         (composite_pointer_type): Use it.
11866         (build_binary_op): Use composite_pointer_type.
11867
11868 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
11869             Jason Merrill  <jason@redhat.com>
11870
11871         * typeck.c (check_return_expr): Don't complain about returning
11872         NULL from operator new if -fcheck-new.
11873         * cp-tree.h: Declare flag_check_new here.
11874         * init.c: Not here.
11875
11876 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11877
11878         * mangle.c (find_substitution): Use same_type_p.
11879         (write_encoding): Don't check for substitutions.
11880
11881 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11882
11883         * parse.y (expr_no_comma_rangle): New non-terminal.
11884         (template_parm): Use it for default parameter case.
11885         (template_arg): Use it.
11886         (expr_no_commas): Remove commented out undefined extensions.
11887         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11888         * parse.h, parse.c: Rebuilt.
11889
11890 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
11891
11892         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
11893         (finish_asm_stmt): Do it here, instead.
11894
11895         * cp-tree.h (ridpointers): Don't declare.
11896         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
11897         (record_builtin_java_type): Likewise.
11898         (init_decl_processing): Likewise.
11899         * lex.c: Move inclusion of lex.h.
11900         (ridpointers): Don't define.
11901         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
11902         RID_MAX.
11903         * lex.h (enum rid): Rename to ...
11904         (enum cp_rid): ... this.
11905         (ridpointers): Don't declare.
11906         * parse.y: Move inclusion of lex.h.
11907         * parse.c: Regenerated.
11908         * spew.c: Move inclusion of lex.h.
11909
11910         * cp-tree.h (struct language_function): Remove temp_name_counter.
11911         (temp_name_counter): Remove.
11912         (get_temp_name): Change prototype.
11913         (get_guard): New function.
11914         (get_guard_cond): Likewise.
11915         (set_guard): Likewise.
11916         * cvt.c (build_up_reference): Adjust call to get_temp_name.
11917         * decl.c (expand_static_init): Use get_guard and friends to
11918         implement guard variables.
11919         * decl2.c (get_temp_name): Assume that the variables created are
11920         always static.
11921         (get_sentry): Rename to ...
11922         (get_guard): ... this.  Implement new ABI guard variables.
11923         (get_guard_bits): New function.
11924         (get_guard_cond): Likewise.
11925         (set_guard): Likewise.
11926         (start_static_initialization_or_destruction): Use them.
11927         (do_static_initialization): Replace sentry with guard throughout.
11928         (do_static_destruction): Likewise.
11929         * init.c (create_temporary_var): Add comment.
11930
11931 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
11932
11933         * mangle.c (find_substitution): Use same_type_p.
11934         (write_encoding): Don't check for substitutions.
11935
11936 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
11937
11938         * parse.y (expr_no_comma_rangle): New non-terminal.
11939         (template_parm): Use it for default parameter case.
11940         (template_arg): Use it.
11941         (expr_no_commas): Remove commented out undefined extensions.
11942         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
11943         * parse.h, parse.c: Rebuilt.
11944
11945 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
11946
11947         * cp-tree.h (flag_const_strings): Remove.
11948         (warn_parentheses): Likewise.
11949         (warn_format): Likewise.
11950         (common_type): Likewise.
11951         (default_conversion): Likewise.
11952         (build_binary_op): Likewise.
11953         (cp_build_binary_op): New macro.
11954         * call.c (build_new_op): Use cp_build_binary_op instead of
11955         build_binary_op.
11956         * class.c (build_vtable_entry_ref): Likewise.
11957         * decl.c (expand_static_init): Likewise.
11958         (compute_array_index_type): Likewise.
11959         (build_enumerator): Likewise.
11960         * decl2.c (delete_sanity): Likewise.
11961         (start_static_initialization_or_destruction): Likewise.
11962         * error.c (dump_type_suffix): Likewise.
11963         * init.c (resolve_offset_ref): Likewise.
11964         (build_new): Likewise.
11965         (build_new_1): Likewise.
11966         (build_vec_delete_1): Likewise.
11967         (build_vec_init): Likewise.
11968         (build_delete): Likewise.
11969         * rtti.c (synthesize_tinfo_fn): Likewise.
11970         (synthesize_tinfo_var): Likewise.
11971         * search.c (expand_upcast_fixups): Likewise.
11972         (fixup_all_virtual_upcast_offsets): Likewise.
11973         * typeck.c (build_array_ref): Likewise.
11974         (get_member_function_from_ptrfunc): Likewise.
11975         (build_binary_op): Add parameter.
11976         (pointer_int_sum): Use cp_build_binary_op.
11977         (pointer_diff): Likewise.
11978         (build_modify_expr): Likewise.
11979         (get_delta_difference): Likewise.
11980         (build_ptrmemfunc): Likewise.
11981
11982 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
11983
11984         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
11985         * decl.c (create_implicit_typedef): Adjust.
11986         * decl2.c (build_artificial_parm): Adjust.
11987         * method.c (implicitly_declare_fn): Adjust.
11988         * pt.c (push_inline_template_parms_recursive): Adjust.
11989         (process_template_parm): Adjust.
11990         (overloaded_template_name): Adjust.
11991         * semantics.c (finish_template_template_parm): Adjust.
11992
11993 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
11994
11995         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
11996         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
11997         where to emit thunks.
11998         (build_vtt): Adjust call to build_vtt_inits.
11999         (build_vtt_inits): Add parameter to indicate whether or not
12000         sub-VTTs for virtual bases should be included.  Adjust handling of
12001         construction vtables.
12002         (get_matching_base): New function.
12003         (dfs_build_vtt_inits): Rename to ...
12004         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
12005         construction vtables.
12006         (dfs_fixup_binfo_vtbls): Likewise.
12007         (build_ctor_vtbl_groups): Build construction vtables for virtual
12008         bases, too.
12009         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
12010         to build construction vtbls.
12011         (dfs_accumulate_vtbl_inits): Adjust handling of
12012         construction vtables.
12013
12014         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
12015         types correctly.
12016
12017 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
12018
12019         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
12020
12021 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12022
12023         * search.c (hides): Remove.
12024         (is_subobject_of_p): Add most_derived parameter. Use
12025         CANONICAL_BINFO.
12026         (lookup_field_queue_p): Adjust.
12027         (lookup_field_r): Adjust.
12028
12029 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
12030
12031         * decl2.c (handle_class_head): Bash typedefs to the type's main
12032         decl.
12033
12034 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
12035
12036         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
12037         (begin_global_stmt_expr): ... this.
12038         (genrtl_finish_stmt_expr): Rename to ...
12039         (finish_global_stmt_expr): ... this.
12040         * init.c (begin_init_stmts): Adjust calls.
12041         (finish_init_stmts): Likewise.
12042         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
12043         (begin_global_stmt_expr): ... this.
12044         (genrtl_finish_stmt_expr): Rename to ...
12045         (finish_global_stmt_expr): ... this.
12046
12047 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
12048
12049         * search.c (lookup_member): Fix typo in comment.
12050
12051 2000-06-24  Jason Merrill  <jason@redhat.com>
12052
12053         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
12054         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
12055
12056 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12057
12058         * parse.y (complex_direct_notype_declarator): Support global_scope.
12059         * Makefile.in: Adjust conflict count.
12060
12061 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
12062
12063         * parse.y (template_arg): Convert TEMPLATE_DECL
12064         that is a template template parameter to
12065         TEMPLATE_TEMPLATE_PARM here.
12066
12067         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
12068         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
12069         (copy_template_template_parm): Adjust prototype.
12070         * decl.c (grokdeclarator): Remove dead code.
12071         * pt.c (process_template_parm): Tidy.
12072         (lookup_template_class): Construct nodes in
12073         copy_template_template_parm.
12074         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
12075         lookup_template_class.  Use TYPE_TI_TEMPLATE.
12076         * tree.c (copy_template_template_parm): Add NEWARGS
12077         parameter.
12078         (mapcar): Adjust call to copy_template_template_parm.
12079         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
12080         * method.c (build_template_template_parm_names): Change error
12081         code to avoid compilation warning.
12082
12083         * gxxint.texi: Document template template parameter
12084         name mangling.
12085
12086 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
12087
12088         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
12089         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
12090         (cp-demangle.o): New rule.
12091         (dyn-string.o): Likewise.
12092         * inc/cxxabi.h (__cxa_demangle): New declaration.
12093
12094 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
12095
12096         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
12097         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
12098         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
12099         a tree, not an int.
12100         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
12101         (make_thunk): Change prototype.
12102         (emit_thunk): Rename to use_thunk.
12103         (mangle_thunk): Change prototype.
12104         * class.c (get_derived_offset): Simplify.
12105         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
12106         BV_GENERATE_THUNK_WITH_VTABLE_P.
12107         (build_primary_vtable): Simplify.
12108         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
12109         (dfs_find_base): Remove.
12110         (update_vtable_entry_for_fn): Correct bug in finding the base
12111         where a virtual function was first declared.  Figure out whether
12112         or not to emit a vcall-thunk with the vtables in which it appears.
12113         Correct logic for deciding whether to use an ordinary thunk, or a
12114         vcall thunk.
12115         (finish_struct_1): Remove unnecssary code.
12116         (build_vtbl_initializer): Use ssize_int for the running counter of
12117         negative indices.
12118         (build_vtbl_initializer): Only use vcall thunks where necessary.
12119         Mark thunks as needing to be emitted with their vtables, or not.
12120         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
12121         indices.  Use size_binop.
12122         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
12123         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
12124         size_binop.
12125         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
12126         (build_vtable_entry): Mark thunks as needing to be emitted with
12127         their vtables, or not.
12128         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
12129         * decl2.c (mark_vtable_entries): Use use_thunk instead of
12130         emit_thunk.
12131         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
12132         information.
12133         * error.c (dump_expr): Use BV_FN.
12134         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
12135         not an int.
12136         * method.c (make_thunk): Likewise.
12137         (emit_thunk): Rename to use_thunk.  Allow callers to decide
12138         whether or not to actually emit the thunk.  Adjust for changes in
12139         representation of vcall offsets.
12140         * search.c (dfs_get_pure_virtuals): Use BV_FN.
12141         * semantics.c (emit_associated_thunks): New function.
12142         (expand_body): Use it.
12143         * ir.texi: Adjust decriptions of thunks.
12144
12145 2000-06-22  Jason Merrill  <jason@redhat.com>
12146
12147         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
12148         (tsubst_friend_function): Copy it here.
12149
12150         * decl.c (grok_op_properties): Fix typo.
12151
12152         * decl2.c (delete_sanity): Clarify warning, avoid failure on
12153         deleting void*.
12154
12155         * pt.c (check_explicit_specialization): Clarify error.
12156
12157         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
12158         an old OVERLOAD when we're declaring a non-function.
12159         (pushdecl, destroy_local_var): Check for error_mark_node.
12160         (warn_extern_redeclared_static): Also bail early if
12161         we're a CONST_DECL.
12162         (push_overloaded_decl): Ignore an old error_mark_node.
12163
12164 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
12165
12166         * call.c (build_x_va_arg): Check if in a template decl.
12167         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
12168
12169 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12170
12171         * class.c (push_lang_context): TYPE_NAME gets you to the Java
12172         types DECLs.
12173         * decl.c (check_goto): Computed gotos assumed OK.
12174
12175 2000-06-20  Jason Merrill  <jason@redhat.com>
12176
12177         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
12178         for which we don't need to look for instantiations.
12179
12180 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
12181
12182         * parse.y (program): Always call finish_translation_unit.
12183         * parse.c, parse.h: Rebuilt.
12184
12185 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
12186
12187         * method.c: Don't include hard-reg-set.h.
12188
12189 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12190
12191         * rtti.c (get_base_offset): Cope when vbase field is in a base.
12192
12193 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
12194
12195         * call.c (build_conditional_expr): Use VOID_TYPE_P.
12196         * cvt.c (cp_convert_to_pointer): Likewise.
12197         (convert_to_void): Likewise.
12198         * error.c (dump_expr): Likewise.
12199         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
12200         * init.c (build_delete): Likewise.
12201         * method.c (emit_thunk): Likewise.
12202         * optmize.c (declare_return_variable): Likewise.
12203         * rtti.c (get_tinfo_decl_dynamic): Likewise.
12204         (get_typeid): Likewise.
12205         (build_dynamic_cast_1): Likewise.
12206         * typeck.c (composite_pointer_type): Likewise.
12207         (common_type): Likewise.
12208         (build_indirect_ref): Likewise.
12209         (build_binary_op): Likewise.
12210         (build_x_compound_expr): Likewise.
12211         (check_return_expr): Likewise.
12212         * typeck2.c (add_exception_specifier): Likewise.
12213
12214         * mangle.c (write_method_parms): Use direct comparison for end
12215         of parmlist.
12216
12217 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
12218
12219         * cp-tree.h (genrtl_try_block): Declare function.
12220         (genrtl_handler): Likewise.
12221         (genrtl_catch_block): Likewise.
12222         (genrtl_ctor_stmt): Likewise.
12223         (genrtl_subobject): Likewise.
12224         (genrtl_decl_cleanup): Likewise.
12225         (genrtl_do_poplevel): Likewise.
12226         (genrtl_do_pushlevel): Likewise.
12227         (genrtl_clear_out_block): Likewise.
12228         (genrtl_goto_stmt): Likewise.
12229         (genrtl_expr_stmt): Likewise.
12230         (genrtl_decl_stmt): Likewise.
12231         (genrtl_if_stmt): Likewise.
12232         (genrtl_while_stmt): Likewise.
12233         (genrtl_do_stmt): Likewise.
12234         (genrtl_return_stmt): Likewise.
12235         (genrtl_for_stmt): Likewise.
12236         (genrtl_break_stmt): Likewise.
12237         (genrtl_continue_stmt): Likewise.
12238         (genrtl_scope_stmt): Likewise.
12239         (genrtl_switch_stmt): Likewise.
12240         (genrtl_case_label): Likewise.
12241         (genrtl_begin_compound_stmt): Likewise.
12242         (genrtl_finish_compound_stmt): Likewise.
12243         (genrtl_compound_stmt): Likewise.
12244         (genrtl_asm_stmt): Likewise.
12245         (genrtl_named_return_value): Likewise.
12246         (genrtl_begin_stmt_expr): Likewise.
12247         (genrtl_finish_stmt_expr): Likewise.
12248         (finish_for_stmt): Removed first argument.
12249         (finish_switch_stmt): Likewise.
12250
12251         * semantics.c (genrtl_try_block): Define function.
12252         (genrtl_handler): Likewise.
12253         (genrtl_catch_block): Likewise.
12254         (genrtl_ctor_stmt): Likewise.
12255         (genrtl_subobject): Likewise.
12256         (genrtl_decl_cleanup): Likewise.
12257         (genrtl_do_poplevel): Likewise.
12258         (genrtl_do_pushlevel): Likewise.
12259         (genrtl_clear_out_block): Likewise.
12260         (genrtl_goto_stmt): Likewise.
12261         (genrtl_expr_stmt): Likewise.
12262         (genrtl_decl_stmt): Likewise.
12263         (genrtl_if_stmt): Likewise.
12264         (genrtl_while_stmt): Likewise.
12265         (genrtl_do_stmt): Likewise.
12266         (genrtl_return_stmt): Likewise.
12267         (genrtl_for_stmt): Likewise.
12268         (genrtl_break_stmt): Likewise.
12269         (genrtl_continue_stmt): Likewise.
12270         (genrtl_scope_stmt): Likewise.
12271         (genrtl_switch_stmt): Likewise.
12272         (genrtl_case_label): Likewise.
12273         (genrtl_begin_compound_stmt): Likewise.
12274         (genrtl_finish_compound_stmt): Likewise.
12275         (genrtl_compound_stmt): Likewise.
12276         (genrtl_asm_stmt): Likewise.
12277         (genrtl_named_return_value): Likewise.
12278         (genrtl_begin_stmt_expr): Likewise.
12279         (genrtl_finish_stmt_expr): Likewise.
12280         (finish_for_stmt): Removed first argument and generate rtl
12281         specific code.
12282         (finish_switch_stmt): Likewise.
12283         (do_poplevel): Removed generate rtl specific code.
12284         (do_pushlevel): Likewise.
12285         (add_tree): Likewise.
12286         (finish_goto_stmt): Likewise.
12287         (finish_expr_stmt): Likewise.
12288         (begin_if_stmt): Likewise.
12289         (finish_if_stmt_cond): Likewise.
12290         (finish_then_clause): Likewise.
12291         (begin_else_clause): Likewise.
12292         (finish_else_clause): Likewise.
12293         (finish_if_stmt): Likewise.
12294         (clear_out_block): Likewise.
12295         (begin_while_stmt): Likewise.
12296         (finish_while_stmt_cond): Likewise.
12297         (finish_while_stmt): Likewise.
12298         (begin_do_stmt): Likewise.
12299         (finish_do_body): Likewise.
12300         (finish_do_stmt): Likewise.
12301         (finish_return_stmt): Likewise.
12302         (begin_for_stmt): Likewise.
12303         (finish_for_init_stmt): Likewise.
12304         (finish_for_cond): Likewise.
12305         (finish_for_expr): Likewise.
12306         (finish_break_stmt): Likewise.
12307         (finish_continue_stmt): Likewise.
12308         (begin_switch_stmt): Likewise.
12309         (finish_switch_cond): Likewise.
12310         (finish_case_label): Likewise.
12311         (begin_try_block): Likewise.
12312         (begin_function_try_block): Likewise.
12313         (finish_try_block): Likewise.
12314         (finish_cleanup_try_block): Likewise.
12315         (finish_cleanup): Likewise.
12316         (finish_function_try_block): Likewise.
12317         (finish_handler_sequence): Likewise.
12318         (finish_function_handler_sequence): Likewise.
12319         (begin_handler): Likewise.
12320         (finish_handler_parms): Likewise.
12321         (begin_catch_block): Likewise.
12322         (finish_handler): Likewise.
12323         (begin_compound_stmt): Likewise.
12324         (finish_compound_stmt): Likewise.
12325         (finish_asm_stmt): Likewise.
12326         (finish_label_stmt): Likewise.
12327         (finish_label_decl): Likewise.
12328         (finish_subobject): Likewise.
12329         (finish_decl_cleanup): Likewise.
12330         (finish_named_return_value): Likewise.
12331         (begin_stmt_expr): Likewise.
12332         (finish_stmt_expr): Likewise.
12333
12334         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
12335         to call genrtl_expr_stmt when appropriate.
12336
12337         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
12338         begin_compound_expr to call genrtl_begin_stmt_expr and
12339         genrtl_begin_compound_expr when appropriate.
12340         (finish_init_stmts): Changed calls to finish_compound_expr and
12341         finish_stmt_expr to call genrtl_finish_compound_expr and
12342         genrtl_finish_stmt_expr when appropriate.
12343         (expand_default_init): Changed call to finish_expr_stmt to call
12344         genrtl_expr_stmt when appropriate.
12345         (build_vec_init): Likewise.
12346
12347         * parse.y (simple_stmt): Removed first argument from call to
12348         finish_for_stmt. Removed first argument from call to
12349         finish_switch_stmt.
12350
12351         * parse.c: Regenerated.
12352
12353         * pt.c (tsubst_expr): Removed first argument from call to
12354         finish_for_stmt. Removed first argument from call to
12355         finish_switch_stmt.
12356
12357 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
12358
12359         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
12360         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
12361
12362         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
12363         (cplus_tree_code_length[]): Likewise.
12364         (cplus_tree_code_name[]): Likewise.
12365         (init_parse): Added call to add_c_tree_codes. Changed
12366         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
12367
12368 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
12369
12370         * cp-tree.h (finish_mem_initializers): Declare.
12371         (count_trees): Likewise.
12372         * parse.y (base_init): Use finish_mem_initializers.
12373         * semantics.c (finish_mem_initializers): New function.
12374
12375         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
12376         the number of trees.
12377         (n_trees): Remove.
12378         (count_trees): Don't use it.
12379
12380 2000-06-15  Jason Merrill  <jason@redhat.com>
12381
12382         * tree.c (count_trees): New debugging function.
12383
12384         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
12385         * init.c (build_member_call): Pull out the name of a DECL.
12386
12387         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
12388         * semantics.c (expand_body): Push to TV_INTEGRATION here.
12389         * optimize.c (optimize_function): Not here.
12390         * pt.c (instantiate_decl): Push to TV_PARSE.
12391
12392 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
12393
12394         * cp-tree.h (struct language_function): Remove x_base_init_list
12395         and x_member_init_list.
12396         (current_base_init_list): Remove.
12397         (current_member_init_list): Likewise.
12398         (setup_vtbl_ptr): Change prototype.
12399         (emit_base_init): Likewise.
12400         (expand_member_init): Likewise.
12401         (reinit_parse_for_function): Remove.
12402         * decl.c (save_function_data): Don't clear x_base_init_list and
12403         x_member_init_list.
12404         (mark_language_function): Don't mark them.
12405         * init.c (perform_member_init): Tweak comment.
12406         (sort_member_init): Take the list of initializers as an argument.
12407         (sort_base_init): Likewise.
12408         (emit_base_init): Likewise.
12409         (expand_member_init): Return the initializer.  Don't use global
12410         variables.
12411         * lex.c (reinit_parse_for_function): Remove.
12412         * method.c (build_template_parm_names): Correct substitution.
12413         (do_build_copy_constructor): Don't use current_member_init_list
12414         and current_base_init_list.
12415         (synthesize_method): Likewise.
12416         * parse.y (base_init): Split mem-initializers into
12417         base-initializers and field-initializers.
12418         (member_init_list): Build up the list here.
12419         (member_init): Return the initializer.
12420         (fn.depfn): Don't use reinit_parse_for_function.
12421         * parse.c: Regenerated.
12422         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
12423         ERROR_MARK.
12424         (tsubst_expr): Don't use current_member_init_list
12425         and current_base_init_list.
12426         (tsubst_expr_values): Rename to ...
12427         (tsubst_initializer_list): ... this.  Use convert_from_reference.
12428         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
12429         and current_base_init_list.
12430         (begin_function_definition): Don't call reinit_parse_for_function.
12431
12432         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
12433
12434         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
12435         correctly.
12436
12437         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
12438
12439 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
12440
12441         * cp-tree.h (IF_COND): Move to c-common.h.
12442         (THEN_CLAUSE): Likewise.
12443         (ELSE_CLAUSE): Likewise.
12444         (WHILE_COND): Likewise.
12445         (WHILE_BODY): Likewise.
12446         (DO_COND): Likewise.
12447         (DO_BODY): Likewise.
12448         (RETURN_EXPR): Likewise.
12449         (EXPR_STMT_EXPR): Likewise.
12450         (FOR_INIT_STMT): Likewise.
12451         (FOR_COND): Likewise.
12452         (FOR_EXPR): Likewise.
12453         (FOR_BODY): Likewise.
12454         (SWITCH_COND): Likewise.
12455         (SWITCH_BODY): Likewise.
12456         (CASE_LOW): Likewise.
12457         (CASE_HIGH): Likewise.
12458         (GOTO_DESTINATION): Likewise.
12459         (COMPOUND_BODY): Likewise.
12460         (ASM_CV_QUAL): Likewise.
12461         (ASM_STRING): Likewise.
12462         (ASM_OUTPUTS): Likewise.
12463         (ASM_INPUTS): Likewise.
12464         (ASM_CLOBBERS): Likewise.
12465         (DECL_STMT_DECL): Likewise.
12466         (STMT_EXPR_STMT): Likewise.
12467         (LABEL_STMT_LABEL): Likewise.
12468         (SCOPE_BEGIN_P): Likewise.
12469         (SCOPE_END_P): Likewise.
12470         (SCOPE_STMT_BLOCK): Likewise.
12471         (SCOPE_NULLIFIED_P): Likewise.
12472         (SCOPE_NO_CLEANUPS_P): Likewise.
12473         (SCOPE_PARTIAL_P): Likewise.
12474         (ASM_VOLATILE_P): Likewise.
12475         (STMT_LINENO): Likewise.
12476         (STMT_LINENO_FOR_FN_P): Likewise.
12477
12478         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
12479         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
12480         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
12481         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
12482         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
12483
12484         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
12485
12486         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
12487         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
12488
12489         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
12490         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
12491         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
12492
12493 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
12494
12495         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
12496         * class.c (dfs_find_final_overrider): Set it appropriately.
12497         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
12498         avoid unneeded secondary vptrs.
12499
12500 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12501
12502         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
12503         (check_bitfield_decl, check_field_decl): Likewise.
12504         (build_vtbl_or_vbase_field, build_base_field): Likewise.
12505         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
12506         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
12507         (xfer_tag, finish_enum): Likewise.
12508         * decl2.c (finish_builtin_type): Likewise.
12509         * init.c (init_init_processing): Likewise.
12510         * pt.c (instantiate_class_template): Likewise.
12511         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
12512         * cp-tree.h (struct lang_type): Add user_align member.
12513         (CLASSTYPE_USER_ALIGN): Define.
12514
12515 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
12516
12517         * Make-lang.in (c++.install-common): Install g++-cross in
12518         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
12519         $(target_alias)-g++ and $(target_alias)-c++.
12520
12521 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
12522
12523         * class.c (vcall_offset_data_s): Add last_init and fns.
12524         (overrides): Rename to same_signature_p.
12525         (dfs_find_final_overrider): Adjust accordingly.
12526         (mark_overriders): Likewise.
12527         (warn_hidden): Likewise.
12528         (build_vtbl_initializer): Reorganize machinery for building things
12529         at negative offsets.
12530         (build_vcall_and_vbase_vtbl_entries): Likewise.
12531         (build_vbase_offset_vtbl_entries): Likewise.
12532         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
12533         offset entries.  Do not create two entries for functions with the
12534         same signature.
12535         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
12536         (build_rtti_vtbl_entries): Reorganize machinery for building things
12537         at negative offsets.
12538
12539         * optimize.c (expand_call_inline): Don't recurse into the code
12540         used to initialize the parameters more than once.
12541
12542 2000-06-11  Mark Mitchell <mark@codesourcery.com>
12543
12544         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
12545         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
12546         (find_substitution): Only use the `Sa' substitution for
12547         std::allocator, not instantiations of it.
12548         (write_template_prefix): Move comment.  Only use a TREE_LIST to
12549         represent substitutions for a member template.
12550         (write_array_type): Mangle array dimensions correctly.
12551         * optimize.c (maybe_clone_body): Copy more information from the
12552         cloned function.
12553         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
12554         on the regenerated declaration.
12555
12556 2000-06-11  Chip Salzenberg  <chip@valinux.com>
12557             Mark Mitchell <mark@codesourcery.com>
12558
12559         * class.c (build_vtable): Clarify comment.
12560         (build_ctor_vtbl_group): Pass the most derived type to
12561         build_vtable.
12562
12563 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12564
12565         * decl2.c (compare_options): Don't needlessly cast away const-ness.
12566
12567 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
12568
12569         * decl.c (add_binding): Handle duplicate declarations of external
12570         variables.
12571
12572 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12573             Mark Mitchell <mark@codesourcery.com>
12574
12575         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
12576         argument.
12577         (write_signed_number): New macro.
12578         (write_unsigned_number): Likewise.
12579         (write_source_name): Use them.
12580         (write_number): Handle signed and unsigned values.
12581         (write_integer_cst): Use tree_int_cst_sgn, and use
12582         write_unsigned_number or write_signed_number as appropriate.
12583         (write_discriminator): Use write_unsigned_number or
12584         write_signed_number as appropriate.
12585         (write_template_arg_literal): Likewise.
12586         (write_array_type): Use tree_low_cst.
12587         (write_template_parm):  Use write_unsigned_number or
12588         write_signed_number as appropriate.
12589         (write_substitution): Adjust call to write_number.
12590         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
12591         (write_expression): Handle non-type template arguments of
12592         reference type correctly.
12593         (mangle_thunk): Use write_signed_number.
12594
12595 2000-06-09  Chip Salzenberg  <chip@valinux.com>
12596
12597         * mangle.c (find_substition): Don't mangle objects with typename
12598         substitutions (e.g. "cin" as "Si").
12599
12600 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
12601
12602         * call.c (add_candidate): Use ggc_alloc_cleared.
12603         * decl.c (lookup_label): Likewise.
12604         * lex.c (retrofit_lang_decl): Likewise.
12605
12606 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
12607
12608         * semantics.c (expand_body): Push to TV_EXPAND.
12609         * optimize.c (optimize_function): Push to TV_INTEGRATION.
12610         * decl.c (start_function): Always call announce_function.
12611
12612         * tinfo2.cc: Just declare abort.
12613
12614 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
12615
12616         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
12617         whenever @ is a symbolic name.
12618
12619 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
12620
12621         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
12622
12623 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
12624
12625         * decl.c (pushdecl): Look up functions by DECL_NAME, not
12626         DECL_ASSEMBLER_NAME.
12627
12628 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12629
12630         * decl2.c (c_language): Define.
12631
12632 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
12633
12634         * lex.c (lang_init_options): Tweak.
12635
12636         * decl2.c: Remove #inclusion of diagnostic.h
12637         (lang_decode_option): Move diagnostic formatting options to
12638         toplevel.
12639
12640         * lang-options.h: Remove documentation for diagnostic options.
12641
12642         * Makefile.in (lex.o): Depends upon diagnostic.h
12643
12644 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
12645
12646         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
12647         the same DECL_RESULT, it's not a redefinition.
12648         * pt.c (tsubst_decl): Remove code to handle illegal
12649         specializations.
12650
12651 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
12652
12653         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
12654
12655 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
12656
12657         * search.c (maybe_suppress_debug_info): Don't check
12658         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
12659
12660         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
12661         here if extern_p.
12662
12663         Remember instantiation context in deferred instantiations.
12664         * cp-tree.h (struct tinst_level): Remove.
12665         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
12666         * pt.c (current_tinst_level): Now a tree.
12667         (print_template_context, push_tinst_level, pop_tinst_level,
12668         tinst_for_decl): Adjust.
12669         (reopen_tinst_level): New fn.
12670         (init_pt): Register current_tinst_level as a root.
12671         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
12672         of the pending templates list.
12673         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
12674         * lex.c (extract_interface_info): Adjust.
12675         * decl2.c (warn_if_unknown_interface): Adjust.
12676
12677 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
12678
12679         * class.c (indirect_primary_base_p): New function.
12680         (determine_primary_base): Use it.
12681
12682 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
12683
12684         Update new-abi dynamic cast algorithm.
12685         * tinfo.cc (__class_type_info::__dyncast_result): Add
12686         whole_details. Adjust constructor.
12687         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
12688         Avoid unnecessary searching.
12689         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
12690
12691 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12692
12693         * decl.c (init_decl_processing): Don't call record_component_aliases.
12694         * tree.c (build_cplus_array_type_1): Likewise.
12695
12696 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
12697
12698         * ir.texi: Correct typo.
12699         * mangle.c (write_expression): Handle non-type template arguments
12700         with reference type.
12701         * method.c (build_overload_value): Likewise.
12702         * pt.c (convert_nontype_argument): Explicitly represent conversion
12703         to a reference with an ADDR_EXPR.
12704         (unify): Always unify arguments in left-to-right order.
12705
12706 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
12707             Mark Mitchell  <mark@codesourcery.com>
12708
12709         * Make-lang.in (CXX_SRCS): Add mangle.c.
12710         * Makefile.in (CXX_OBJS): Add mangle.o.
12711         (mangle.o): New rule.
12712
12713         * class.c (local_classes): New variable.
12714         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
12715         (get_vtt_name): Use mangle_vtt_name for new ABI.
12716         (init_class_processing): Initialize local_classes.
12717         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
12718         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
12719         (std_identifier): New macro.
12720         (DECL_VOLATILE_MEMFUNC_P): New macro.
12721         (DECL_NAMESPACE_STD_P): Likewise.
12722         (local_classes): Declare.
12723         (get_mostly_instantiated_function_type): Declare.
12724         (init_mangle): Declare.
12725         (mangle_decl): Likewise.
12726         (mangle_type_string): Likewise.
12727         (mangle_type): Likewise.
12728         (mangle_typeinfo_for_type): Likewise.
12729         (mangle_typeinfo_string_for_type): Likewise.
12730         (mangle_vtbl_for_type): Likewise.
12731         (mangle_vtt_for_type): Likewise.
12732         (mangle_ctor_vtbl_for_type): Likewise.
12733         (mangle_thunk): Likewise.
12734         (mangle_conv_op_name_for_type): Likewise.
12735         (mangle_guard_variable): Likewise.
12736         * decl.c (pushtag): Keep track of local classes.
12737         (initialize_predefined_identifiers): Initialize std_identifier.
12738         (init_decl_processing): Use std_identifier.
12739         (start_decl): Don't treat instantiations as specializations.
12740         (grokdeclarator): Likewise.
12741         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
12742         name for fully-instantiated templates.
12743         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
12744         destructors with the new ABI.
12745         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
12746         (grokfield): Use mangle_type for new ABI.
12747         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
12748         (get_sentry): Use mangle_guard_variable for new ABI.
12749         (start_static_initialization_or_destruction): Likewise.
12750         * expr.c (extract_aggr_init): Remove.
12751         (extract_scalar_init): Likewise.
12752         (extract_init): Remove #if 0'd code.
12753         * mangle.c: New function.
12754         * method.c (build_mangled_name): Assert not flag_new_abi.
12755         (build_static_name): Likewise.
12756         (build_decl_overload_real): Likewise.
12757         (build_typename_overload): Likewise.
12758         (build_overload_with_type): Likewise.
12759         (build_overload_name): Likewise.
12760         (get_ctor_vtbl_name): Likewise.
12761         (start_squangling): Likewise.
12762         (get_id_2): Likewise.
12763         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
12764         (init_method): Call init_mangle for new ABI.
12765         (make_thunk): Call mangle_thunk for new ABI.
12766         * operators.def: Correct new ABI manglings for the `%' operator.
12767         Add `::' operator.
12768         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
12769         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
12770         (lookup_template_class): Call mangle_decl for new ABI.
12771         (get_mostly_instantiated_function_type): New function.
12772         (set_mangled_name_for_template_decl): Use it.
12773         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
12774         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
12775         conversion op names.
12776         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
12777         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
12778         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
12779         mangle_typeinfo_string_for_type.
12780
12781 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
12782
12783         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
12784         (INNERMOST_TEMPLATE_ARGS): New macro.
12785         (innermost_args): Remove.
12786         (get_innermost_template_args): New function.
12787         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
12788         * error.c (dump_function_decl): Be caution when using
12789         most_general_template.
12790         * method.c (build_template_parm_names):  Use
12791         INNERMOST_TEMPLATE_ARGS.
12792         * pt.c (add_to_template_args): Tidy comment
12793         (get_innermost_template_args): New function.
12794         (check_explicit_specialization): Clear DECL_INITIAL for a new
12795         specialization.
12796         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
12797         Tidy.
12798         (push_template_decl): Always register specializations of the most
12799         general template.
12800         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
12801         (coerce_template_parms): Likewise.
12802         (lookup_template_class): Likewise.
12803         (innermost_args): Remove.
12804         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
12805         (tsubst_decl): Handle tricky specializations.  Use
12806         get_innermost_template_args.
12807         (instantiate_template): Simplify handling of partial
12808         instantiations.
12809         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
12810         (most_general_template): Reimplement, in a more straightforward
12811         manner.
12812         (regenerate_decl_from_template): Tweak formatting.  Use
12813         TMPL_ARGS_DEPTH for clarity.
12814         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
12815
12816         * dump.c (dequeue_and_dump): Dump information about thunks.
12817
12818 2000-06-01  Richard Henderson  <rth@cygnus.com>
12819
12820         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
12821
12822 2000-06-01  Richard Henderson  <rth@cygnus.com>
12823
12824         * decl2.c (unsupported_options): Fix typo, make const.
12825         (lang_decode_option): Fix bsearch argument order.
12826
12827 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
12828
12829         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
12830         on FIELD_DECLs.
12831
12832 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12833
12834         * cp-tree.h (c_get_alias_set): Deleted.
12835         * Makefile.in (decl.o): Include ../expr.h.
12836         * decl.c (expr.h): Include.
12837         (init_decl_processing): Call record_component_aliases for arrays.
12838         (grokdeclarator): Likewise.
12839         Set TREE_ADDRESSABLE for fields that aren't bitfields.
12840         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
12841
12842 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
12843
12844         Remove guiding declaration support.
12845         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
12846         (flag_guiding_decls): Remove.
12847         * call.c (build_user_type_conversion_1): Remove support for
12848         guiding decls.
12849         (build_new_function_call): Likewise.
12850         (build_new_op): Likewise.
12851         (build_new_method_call): Likewise.
12852         * decl.c (start_function): Likewise.
12853         * friend.c (is_friend): Likewise.
12854         (do_friend): Likewise.
12855         * decl2.c ((flag_dump_translation_unit): Make it const.
12856         (flag_guiding_decls): Remove.
12857         (unsupported_options): New variable
12858         (compare_options): New function.
12859         (lang_decode_option): Use them.
12860
12861         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
12862
12863         * method.c (mangle_expression): Adjust test for legal expression
12864         operators.
12865
12866         * pt.c (instantiate_decl): Save and restore the local
12867         specializations list.
12868
12869 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
12870
12871         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
12872
12873 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
12874
12875         * call.c (add_template_candidate_real): Handle member template
12876         constructors for classes with virtual bases.
12877         (build_user_type_conversion_1): Use in_charge_arg_for_name.
12878         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
12879
12880         * ir.texi: Update thunk documentation.
12881
12882         * call.c (joust): Fix handling of overloaded builtin operators.
12883
12884 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
12885
12886         * cp-tree.h (DECL_ANTICIPATED): New macro.
12887         Document new use of DECL_LANG_FLAG_7.
12888         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
12889         in the user namespace.
12890         * lex.c (do_identifier): If the identifier's declaration has
12891         DECL_ANTICIPATED on, it has not yet been declared.  But do not
12892         replace it with an ordinary implicit declaration.
12893
12894         * tinfo2.cc: Include stdlib.h.
12895
12896 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
12897
12898         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
12899         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
12900         CLASSTYPE_ALIGN.
12901
12902 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
12903
12904         * decl2.c (lang_decode_option): Use skip_leading_substring instead
12905         of plain strncmp.
12906
12907 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
12908
12909         * operators.def (<?): Duplicated, should have been...
12910         (>?): this.  Fixed.
12911
12912 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
12913             Mark Mitchell  <mark@codesourcery.com>
12914
12915         * cp-tree.h (ansi_opname): Make it a macro.
12916         (ansi_assopname): Likewise.
12917         (struct lang_decl_flags): Add assignment_operator_p.
12918         (struct lang_decl): Add operator_code.
12919         (DECL_VTT_PARM): Adjust.
12920         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
12921         overloaded operator.
12922         (SET_OVERLOADED_OPERATOR_CODE): New macro.
12923         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
12924         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
12925         (opname_tab): Remove.
12926         (assignop_tab): Likewise.
12927         (operator_name_info_t): New type.
12928         (operator_name_info): New variable.
12929         (assignment_operator_name_info): Likewise.
12930         (build_cp_library_fn): Remove declaration.
12931         (push_cp_library_fn): Likewise.
12932         (operator_name_string): Likewise.
12933         (build_decl_overload): Likewise.
12934         * call.c (print_z_candidates): Simplify.
12935         (build_object_call): Adjust usage of ansi_opname.  Use
12936         DECL_OVERLOADED_OPERATOR_P.
12937         (op_error): Adjust operator name lookup.
12938         (build_conditional_expr): Adjust usage of ansi_opname.
12939         (build_new_op): Likewise.
12940         (build_op_delete_call): Likewise.
12941         (build_over_call): Likewise.
12942         (joust): Use DECL_OVERLOADED_OPERATOR_P.
12943         * decl.c (duplicate_decls): Copy operator_code.
12944         (init_decl_processing): Adjust parameters to push_cp_library_fn.
12945         (builtin_function): Adjust parameters to build_library_fn_1.
12946         (build_library_fn_1): Accept an overloaded operator code.
12947         (build_library_fn): Pass ERROR_MARK.
12948         (build_cp_library_fn): Accept an overloaded operator code.
12949         (push_cp_library_fn): Likewise.
12950         (grokfndecl): Tweak.
12951         (grokdeclarator): Simplify code to compute names of overloaded
12952         operators.  Adjust use of ansi_opname.
12953         (ambi_op_p): Work on tree_codes, not identifiers.
12954         (unary_op_p): Likewise.
12955         (grok_op_properties): Likewise.
12956         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
12957         (lang_mark_tree): Don't try to mark the operator_code.
12958         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
12959         * error.c (dump_decl): Remove special handling for operator
12960         names.
12961         (dump_function_name): Likewise.
12962         (dump_expr): Adjust name lookup of operators.
12963         (op_to_string): Simplify.
12964         (assop_to_string): Likewise.
12965         * init.c (build_new_1): Adjust use of ansi_opname.
12966         * lex.c (opname_tab): Remove.
12967         (assignop_tab): Likewise.
12968         (ansi_opname): Likewise.
12969         (ansi_assopname): Likewise.
12970         (operator_name_string): Likewise.
12971         (reinit_lang_specific): Likewise.
12972         (operator_name_info): New variable.
12973         (assignment_operator_name_info): Likewise.
12974         (init_operators): New function.
12975         (init_parse): Use it.
12976         (do_identifier): Adjust use of ansi_opname.
12977         * method.c (mangle_expression): Don't use ansi_opname for
12978         mangling.
12979         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
12980         (build_decl_overload): Remove.
12981         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
12982         (do_build_assign_ref): Adjust use of ansi_opname.
12983         (synthesize_method): Likewise.
12984         (implicitly_declare_fn): Likewise.
12985         * operators.def: New file.
12986         * parse.y (operator): Adjust use of ansi_opname.
12987         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
12988         (set_mangled_name_for_template_decl): Don't play games with
12989         current_namespace.
12990         (special_function_p): Adjust use of ansi_opname.
12991         * typeck.c (check_return_expr): Likewise.
12992         * Make-lang.in (cc1plus): Depend on operators.def.
12993         * Makefile.in (lex.o): Likewise.
12994         (decl.o): Likewise.
12995
12996 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
12997
12998         * Make-lang.in (cplib2.ready): Eradicate.
12999
13000 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13001
13002         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
13003         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
13004         (built_min, cp_tree_equal): Likewise.
13005
13006 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13007
13008         * class.c (layout_nonempty_base_or_field): Replace
13009         `record_layout_info' with `record_layout_info_s'.
13010
13011 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
13012
13013         Fix goto checking.
13014         * cp-tree.h (struct language_function): x_named_labels is now
13015         a struct named_label_list*.
13016         * decl.c (struct named_label_use_list): Renamed from...
13017         (struct named_label_list): ...this.  New struct.
13018         (push_binding_level): Don't set eh_region.
13019         (note_level_for_eh): New fn.
13020         (pop_label): Take label and old value directly.
13021         (pop_labels): Adjust for new named_labels format.
13022         (lookup_label): Likewise.
13023         (poplevel): Note characteristics of a binding level containing a
13024         named label.  Mess with named label lists earlier.
13025         (mark_named_label_lists): New fn.
13026         (mark_lang_function): Call it.
13027         (use_label): New fn, split out from...
13028         (make_label_decl): ...here.  Don't call it.
13029         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
13030         check_previous_gotos): New fns, split out from...
13031         (define_label): ...here.
13032         (check_switch_goto): New fn.
13033         (define_case_label): Call it.
13034         (check_goto): New fn.
13035         * semantics.c (finish_goto_stmt): Call it and use_label.
13036         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
13037         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
13038
13039 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
13040
13041         * class.c (build_vtable_entry_ref): Correct usage of
13042         get_vtbl_decl_for_binfo.
13043
13044         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
13045         * method.c (implicitly_declare_fn): Not here.
13046
13047 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
13048
13049         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
13050         (CPTI_PTMD_DESC_TYPE): ... here.
13051         (ptmd_desc_type_node): Rename to ...
13052         (ptm_desc_type_node): ... here.
13053         * decl.c: Likewise.
13054         * rtti.c (ptmd_initializer): Rename to ...
13055         (ptm_initializer): ... here.
13056         (sythesize_tinfo_var): Adjust. Deal with pointer to member
13057         function.
13058         (create_tinfo_types): Adjust.
13059
13060 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
13061
13062         Finish implementation of VTTs.
13063         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
13064         CPTI_VTT_PARM_IDENTIFIER.
13065         (vtt_parm_identifier): New macro.
13066         (vtt_parm_type): Likewise.
13067         (BINFO_SUBVTT_INDEX): Likewise.
13068         (BINFO_VPTR_INDEX): Likewise.
13069         (struct lang_decl): Add vtt_parm.
13070         (DECL_VTT_PARM): New macro.
13071         (DECL_USE_VTT_PARM): Likewise.
13072         (DECL_NEEDS_VTT_PARM_P): Likewise.
13073         (get_vtt_name): Declare.
13074         (build_artificial_parm): Likewise.
13075         (fixup_all_virtual_upcast_offsets): Likewise.
13076         (expand_indirect_vtbls_init): Remove.
13077         * call.c (build_new_method_call): Pass the vtt to subobject
13078         constructors and destructors.
13079         * class.c (get_vtt_name): Give it external linkage.
13080         (build_clone): Handle the magic VTT parameters for clones.
13081         (clone_function_decl): Fix typo in comment.
13082         (build_vtt): Keep track of the indices in the VTTs where various
13083         entities are stored.
13084         (build_vtt_inits): Likewise.
13085         (dfs_build_vtt_inits): Likewise.
13086         (build_ctor_vtbl_group): Tweak type of construction vtables.
13087         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
13088         primary bases, when building construction vtables.
13089         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
13090         (initialize_predefined_identifiers): Add vtt_parm_identifier.
13091         (init_decl_processing): Initialize vtt_parm_type.
13092         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
13093         (lang_mark_tree): Make vtt_parm.
13094         * decl2.c (build_artificial_parm): New function.
13095         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
13096         (grokclassfn): Use build_artificial_parm.
13097         * init.c (initialize_vtbl_ptrs): Call
13098         fixup_all_virtual_upcast_offsets directly.
13099         (perform_member_init): Use the complete subobject destructor for
13100         member cleanups.
13101         (build_vtbl_address): New function.
13102         (expand_virtual_init): Handle VTTs.
13103         * optimize (maybe_clone_body): Likewise.
13104         * search.c (fixup_all_virtual_upcast_offsets): Give it external
13105         linkage.
13106         (expand_indirect_vtbls_init): Remove.
13107         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
13108         * tree.c (make_binfo): Make them bigger.
13109
13110 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13111
13112         * inc/cxxabi.h (__pbase_type_info): Define, based on
13113         __pointer_type_info.
13114         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
13115         (__pointer_to_member_type_info): Likewise.
13116         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
13117         (__pointer_to_member_type_info::__is_pointer_p): Remove.
13118         (__pointer_type_info::__do_catch): Rename to ...
13119         (__pbase_type_info::__do_catch): ... here. Adjust.
13120         (__pbase_type_info::__pointer_catch): Implement.
13121         (__pointer_type_info::__pointer_catch): Adjust.
13122         (__pointer_to_member_type_info::__pointer_catch): Adjust.
13123
13124 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
13125
13126         * tinfo.h (__user_type_info::contained_virtual_p): New
13127         predicate.
13128         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
13129         shaped hierarchy.
13130         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
13131         diamond shaped hierarchy. Add early out for mixed diamond and
13132         duplicate shaped hierarchy.
13133
13134 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
13135
13136         * cp-tree.h (build_delete): Change prototype.
13137         (build_vec_delete): Likewise.
13138         * call.c (build_scoped_method_call): Use special_function_kind
13139         values to indicate the kind of destruction to be done.
13140         (build_method_call): Likewise.
13141         * decl.c (finish_destructor_body): Likewise.
13142         (maybe_build_cleanup_1): Likewise.  Rename to ...
13143         (maybe_build_cleanup): ... this.
13144         * decl2.c (delete_sanity): Use special_function_kind
13145         values to indicate the kind of destruction to be done.
13146         (build_cleanup): Likewise.
13147         * init.c (perform_member_init): Likewise.
13148         (build_vec_delete_1): Likewise.
13149         (build_dtor_call): Simplify.
13150         (build_delete): Use special_function_kind
13151         values to indicate the kind of destruction to be done.
13152         (build_vbase_delete): Likewise.
13153         (build_vec_delete): Likewise.
13154
13155         * init.c (sort_member_init): Fix typo in error message generation
13156         code.
13157
13158 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
13159
13160         * semantics.c (begin_class_definition): make the packed
13161         attribute be sensitive to the "-fpack-struct" command line flag
13162
13163 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
13164
13165         Update new-abi upcast algorithm.
13166         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
13167         prototype and meaning of return value.
13168         (__si_class_type_info::__do_upcast): Likewise.
13169         (__vmi_class_type_info::__do_upcast): Likewise.
13170         * tinfo.cc (__class_type_info::__upcast_result): Replace
13171         whole2dst with part2dst. Adjust ctor.
13172         (__class_type_info::__do_upcast): Adjust call of worker function.
13173         (__class_type_info::__do_upcast): Adjust.
13174         (__si_class_type_info::__do_upcast): Adjust. Use parent's
13175         __do_upcast.
13176         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
13177         virtual base in diamond hierarchy bug.
13178
13179 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
13180
13181         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
13182         and bitfield to tinfo_fn_p.
13183         (DECL_TINFO_FN_P): Adjust.
13184         (SET_DECL_TINFO_FN_P): Likewise.
13185         (DECL_MUTABLE_P): Likewise.
13186         (DECL_C_BIT_FIELD): Likewise.
13187         (SET_DECL_C_BIT_FIELD): Likewise.
13188         (CLEAR_DECL_C_BIT_FIELD): Likewise.
13189         (DECL_UNINLINABLE): Likewise.
13190         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
13191         (handle_using_decl): Remove assertion.
13192         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
13193         to build FIELD_DECLs.
13194         (build_base_field): Likewise.
13195         (layout_class_type): Likewise.
13196         * decl.c (init_decl_processing): Likewise.
13197         (build_ptrmemfunc_type): Likewise.
13198         (grokdeclarator): Likewise.
13199         * decl2.c (grok_x_components): Likewise.
13200         * except.c (call_eh_info): Likewise.
13201         * init.c (init_init_processing): Likewise.
13202         * rtti.c (expand_class_desc): Likewise.
13203         (create_pseudo_type_info): Likewise.
13204         (get_vmi_pseudo_type_info): Likewise.
13205         (create_tinfo_types): Likewise.
13206         * ptree.c (print_lang_decl): Adjust.
13207         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
13208         before checking DECL_MUTABLE_P.
13209
13210         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
13211         parameters for template functions.
13212         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
13213         destructors as well as constructors.
13214
13215 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
13216
13217         * class.c (build_ctor_vtbl_group): Set inits.
13218         * optimize.c (maybe_clone_body): Set DECL_INLINE and
13219         DECL_THIS_INLINE appropriately for clones.
13220
13221         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
13222         (DECL_CONV_FN_P): Simplify.
13223         (DECL_OPERATOR): Remove.
13224         (language_to_string): Declare.
13225         * decl.c (duplicate_decls): Fix typo in comment.
13226         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
13227         (grok_op_properties): Use DECL_CONV_FN_P instead of
13228         IDENTIFIER_TYPENAME_P.
13229         * dump.c (dequeue_and_dump): Dump the language linkage of
13230         declarations.
13231         * error.c (language_to_string): Give it external linkage.
13232         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
13233         (implicitly_declare_fn): Set DECL_LANGUAGE.
13234         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
13235         IDENTIFIER_TYPENAME_P.
13236         (tsubst_decl): Likewise.
13237         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
13238         * semantics.c (finish_member_declaration): Don't mark members of
13239         classes declared in an extern "C" region as extern "C".
13240
13241 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13242
13243         * decl2.c (qualified_lookup_using_namespace): Look through
13244         namespace aliases.
13245
13246         * decl.c (push_using_decl): Return the old decl on namespace level.
13247
13248 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
13249
13250         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
13251         (VTT_NAME_PREFIX): New macro.
13252         (CTOR_VTBL_NAME_PREFIX): Likewise.
13253         (get_ctor_vtbl_name): New function.
13254         * class.c (get_vtable_name): Simplify.
13255         (get_vtt_name): New function.
13256         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
13257         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
13258         when a virtual base becomes primary.
13259         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
13260         VTTs.
13261         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
13262         additional parameters.
13263         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
13264         (initialize_array): New function.
13265         (build_vtt): Likewise.
13266         (build_vtt_inits): Likewise.
13267         (dfs_build_vtt_inits): Likewise.
13268         (dfs_fixup_binfo_vtbls): Likewise.
13269         (build_ctor_vtbl_group): Likewise.
13270         (initialize_vtable): Use initialize_array.
13271         (accumulate_vtbl_inits): Reimplement to handle construction
13272         vtables.
13273         (dfs_accumulate_vtbl_inits): Likewise.
13274         (bulid_vtbl_initializer): Adjust parameter name.
13275         * method.c (build_typename_overload): Remove #if 0'd code.
13276         (get_ctor_vtbl_name): New function.
13277         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
13278         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
13279
13280         * cp-tree.h (struct lang_type): Remove search_slot.
13281         (CLASSTYPE_SEARCH_SLOT): Remove.
13282         (emit_base_init): Change prototype.
13283         (initialize_vtbl_ptrs): Likewise.
13284         (expand_indirect_vtbls_init): Likewise.
13285         (clear_search_slots): Remove.
13286         * decl.c (lang_mark_tree): Don't mark search_slot.
13287         * init.c (initialize_vtbl_ptrs): Simplify.
13288         (emit_base_init): Likewise.
13289         * search.c (struct vbase_info): Document decl_ptr.
13290         (convert_pointer_to_single_level): Remove.
13291         (dfs_find_vbases): Remove.
13292         (dfs_init_base_pointers): Simplify.
13293         (dfs_clear_vbase_slots): Remove.
13294         (dfs_vtable_path_unmark): New function.
13295         (init_vbase_pointers): Simplify.
13296         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
13297         (expand_indirect_vtbls_init): Simplify.  Don't call
13298         mark_all_temps_used.
13299         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
13300         initialize_vtbl_ptrs.
13301
13302 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
13303
13304         * except.c: Add static prototypes.
13305
13306 2000-05-20  H.J. Lu  <hjl@gnu.org>
13307
13308         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
13309
13310 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
13311
13312         Don't create a separate copy of virtual bases for the
13313         CLASSTYPE_VBASECLASSES list.
13314         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
13315         (BINFO_FOR_VBASE): Remove.
13316         (CANONICAL_BINFO): Adjust.
13317         (binfo_for_vbase): New function.
13318         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
13319         instead of BINFO_FOR_VBASE.
13320         (build_vbase_pointer): Likewise.
13321         (build_secondary_vtable): Likewise.
13322         (dfs_mark_primary_bases): Likewise.
13323         (mark_primary_bases): Likewise.
13324         (layout_nonempty_base_or_field): Likewise.
13325         (dfs_set_offset_for_shared_vbases): Likewise.
13326         (dfs_set_offset_for_unshared_vbases): Likewise.
13327         (layout_virtual_bases): Likewise.  Adjust for changes to the
13328         CLASSTYPE_VBASECLASSES list.
13329         (dump_class_hierarchy_r): Use binfo_for_vbase
13330         instead of BINFO_FOR_VBASE.
13331         (dump_class_hierarchy): Likewise.
13332         (finish_vtbls): Likewise.
13333         (build_vtbl_initializer): Adjust for changes to the
13334         CLASSTYPE_VBASECLASSES list.
13335         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
13336         * decl.c (finish_destructor_body): Adjust for changes to the
13337         CLASSTYPE_VBASECLASSES list.
13338         * init.c (sort_base_init): Use binfo_for_vbase.
13339         (construct_virtual_bases): Adjust for changes to the
13340         CLASSTYPE_VBASECLASSES list.
13341         (expand_member_init): Use binfo_for_vbase.
13342         (build_vbase_delete):  Adjust for changes to the
13343         CLASSTYPE_VBASECLASSES list.
13344         * method.c (do_build_copy_constructor): Likewise.
13345         * rtti.c (get_base_offset): Use binfo_for_vbase.
13346         (expand_class_desc): Remove #if 0'd code.
13347         * search.c (struct vbase_info): Remove vbase_types.
13348         (get_base_distance):  Use binfo_for_vbase.
13349         (lookup_field_queue_p): Use CANONICAL_BINFO.
13350         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
13351         (get_pure_virtuals): Adjust for changes to the
13352         CLASSTYPE_VBASECLASSES list.
13353         (dfs_find_vbases): Use binfo_for_vbase.
13354         (dfs_init_vbase_pointers): Likewise.
13355         (init_vbase_pointers): Don't initialize vi.vbase_types.
13356         (virtual_context): Use binfo_for_vbase.
13357         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
13358         CLASSTYPE_VBASECLASSES list.
13359         (expand_indirect_vtbls_init): Simplify.
13360         (dfs_get_vbase_types): Don't replicate virtual bases.
13361         (find_vbase_instance): Use binfo_for_vbase.
13362         (binfo_for_vbase): New function.
13363         * typeck.c (get_delta_difference): Use binfo_for_vbase.
13364
13365 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
13366
13367         * decl2.c (finish_anon_union): Generalize error messages to handle
13368         anonymous structures.
13369         * init.c (perform_member_init): Remove `name' parameter.
13370         (build_field_list): New function.
13371         (sort_member_init): Handle anonymous union initialization order
13372         correctly.  Check for multiple initializations of the same union.
13373         (emit_base_init): Don't look up fields by name here.
13374         (expand_member_init): Record the result of name lookup for future
13375         reference.
13376         * typeck.c (build_component_ref): Fix formatting.
13377
13378 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
13379
13380         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
13381         * typeck.c (build_x_compound_expr): Replace warn_unused with
13382         warn_unused_value.
13383
13384         * decl2.c (lang_decode_option): Update -Wall unused flags by
13385         calling set_Wunused.
13386
13387 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
13388
13389         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
13390         * init.c (dfs_vtable_path_unmark): Remove.
13391         * search.c (marked_new_vtable_p): Likewise.
13392         (unmarked_new_vtable_p): Likewise.
13393         (dfs_search_slot_nonempty_p): Likewise.
13394         (dfs_mark): Likewise.
13395         (dfs_vtable_path_unmark): Likewise.
13396         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
13397         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
13398         (dfs_init_vbase_pointers): Remove special-case new ABI code.
13399         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
13400         (init_vbase_pointers): Simplify.
13401         (expand_indirect_vtbls_init): Likewise.
13402
13403         * class.c (copy_virtuals): New function.
13404         (build_primary_table): Use it.
13405         (build_secondary_vtable): Likewise.
13406         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
13407         indicate that no vcall offset is required.
13408         (add_virtual_function): Likewise.
13409         (modify_all_vtables): Likewise.
13410         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
13411         (dfs_accumulate_vtbl_inits): Likewise.
13412         (build_vtbl_initializer): Make changes to handle construction
13413         vtables.
13414         (dfs_build_vcall_offset_vtbl_entries): Likewise.
13415         (build_rtti_vtbl_entries): Likewise.
13416         (build_vtable_entries): Handle a NULL vcall_index.
13417
13418 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
13419
13420         * decl2.c (lang_decode_option): Fix thinko.
13421
13422 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
13423
13424         * except.c (check_handlers): New fn.
13425         * cp-tree.h: Declare it.
13426         * semantics.c (finish_handler_sequence): Call it.
13427         (finish_function_handler_sequence): Likewise.
13428         (finish_handler_parms): Set TREE_TYPE on the handler.
13429         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
13430         * search.c (get_base_distance_recursive): If protect>1, ignore
13431         special access.
13432         (get_base_distance): Don't reduce watch_access.
13433
13434 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
13435
13436         * lex.c: #include diagnostic.h.
13437         (lang_init_options): Set default prefixing rules.
13438
13439         * lang-options.h: Add -fdiagnostics-show-location=.
13440
13441         * decl2.c: #include diagnostic.h.
13442         (lang_decode_option): Handle -fdiagnostics-show-location=.
13443
13444 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
13445
13446         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
13447         * vec.cc: Revert my 2000-05-07 change.
13448
13449 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
13450
13451         * class.c (check_field_decls): Complain about non-static data
13452         members with same name as class in class with constructor.
13453
13454 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
13455
13456         * decl.c (grokdeclarator): Allow non-static data members with
13457         same name as class.
13458
13459 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
13460
13461         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
13462         and pending_inline.filename.  Update prototypes.
13463         * decl.c (define_label): Constify filename parameter.
13464         * decl2.c (warn_if_unknown_interface): Constify local char *.
13465         * input.c Constify input_source.filename. Don't declare
13466         input_filename or lineno.  Constify filename parameter to feed_input.
13467         * lex.c (init_parse): Constify parameter and return value.
13468         (cp_pragma_interface, cp_pragma_implementation): Constify
13469         filename argument.
13470         (reinit_parse_for_method, reinit_parse_for_block,
13471         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
13472         Constify local char *.
13473         * pt.c: Don't declare lineno or input_filename.
13474         (print_template_context, tsubst_friend_function, tsubst_decl,
13475         tsubst, instantiate_decl): Constify local char *.
13476         * semantics.c (expand_body): Constify local char *.
13477         * tree.c (build_srcloc): Constify filename parameter.
13478         * typeck.c (c_expand_asm_operands): Constify filename
13479         parameter.
13480
13481 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
13482
13483         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
13484         offsetof expansion.
13485
13486 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
13487
13488         * inc/cxxabi.h:  Fix typos in comment.
13489         (__base_class_info::__offset): Use a static_cast.
13490
13491 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
13492
13493         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
13494         of std::size_t and std::ptrdiff_t respectively.
13495         * tinfo.cc: Likewise.
13496         * vec.cc: Likewise.
13497
13498 2000-05-06  Richard Henderson  <rth@cygnus.com>
13499
13500         * typeck.c (build_c_cast): Don't warn integer->pointer size
13501         mismatch for constants.
13502
13503 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
13504
13505         * rtti.c (ptmd_initializer): Set non-public, if class is
13506         incomplete.
13507
13508         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
13509         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13510         __cxa_vec_delete): Likewise.
13511         * tinfo.cc (__dynamic_cast): Likewise.
13512         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
13513         __cxa_vec_delete): Likewise.
13514
13515 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13516
13517         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
13518         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
13519         (lang_decl_flags): Add vcall_offset.
13520         (THUNK_VCALL_OFFSET): Use it.
13521         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
13522         * method.c (make_thunk): Create the lang_decl here, not in
13523         emit_thunk.
13524         (emit_thunk): Make generic thunks into ordinary functions once
13525         they have been fed to expand_body.
13526         * semantics.c (expand_body): Set current_function_is_thunk here.
13527
13528 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13529
13530         * class.c (update_vtable_entry_for_fn): Prototype.
13531
13532         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
13533         and `tmpl'.
13534
13535         * search.c (dfs_build_inheritance_graph_order): Prototype.
13536
13537 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
13538
13539         * cp-tree.h (special_function_kind): Add various kinds of
13540         destructors.
13541         (special_function_p): New function.
13542         * class.c (overrides): Don't let one kind of destructor override
13543         another.
13544         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
13545         whether or not to instantiate a template.
13546         * tree.c (special_function_p): Define.
13547
13548 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
13549
13550         * cp-tree.def (THUNK_DECL): Remove.
13551         * cp-tree.h (DECL_THUNK_P): New macro.
13552         (DECL_NON_THUNK_FUNCTION_P): Likewise.
13553         (DECL_EXTERN_C_FUNCTION_P): Likewise.
13554         (SET_DECL_THUNK_P): Likewise.
13555         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
13556         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
13557         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
13558         * decl.c (decls_match): Use DECL_EXTERN_C_P.
13559         (duplicate_decls): Likewise.
13560         (pushdecl): Likewise.  Adjust thunk handling.
13561         (grokfndecl): Use DECL_EXTERN_C_P.
13562         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
13563         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
13564         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
13565         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
13566         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
13567         DECL_NO_STATIC_CHAIN.
13568         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
13569         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
13570         * search.c (covariant_return_p): Remove THUNK_DECL handling.
13571         * ir.texi: Update.
13572
13573 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13574
13575         * tree.c (walk_tree): Set lineno.
13576
13577 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13578
13579         * exception.cc: Update license notice.
13580         * new.cc: Likewise.
13581         * new1.cc: Likewise.
13582         * new2.cc: Likewise.
13583         * tinfo.cc: Likewise.
13584         * tinfo2.cc: Likewise.
13585         * vec.cc: Likewise.
13586         * inc/cxxabi.h: Likewise.
13587         * inc/exception: Likewise.
13588         * inc/new: Likewise.
13589         * inc/new.h: Likewise.
13590         * inc/typeinfo: Likewise.
13591
13592 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
13593
13594         * tree.c (build_target_expr_with_type): If we already have a
13595         TARGET_EXPR, just return it.
13596
13597         * optimize.c (initialize_inlined_parameters): Don't generate an
13598         EXPR_STMT if we can just use DECL_INITIAL.
13599         * decl.c (emit_local_var): Only make the initialization a
13600         full-expression if stmts_are_full_exprs_p.
13601
13602 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
13603
13604         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
13605         macro.
13606         * call.c (standard_conversion): Use it.
13607         (direct_reference_binding): Likewise.
13608         (build_over_call): Likewise.
13609         (is_properly_derived_from): Likewise.
13610         (compare_ics): Likewise.
13611         * class.c (resolves_to_fixed_type_p): Likewise.
13612         * optimize.c (declare_return_variable): Likewise.
13613         * pt.c (is_specialization_of): Likewise.
13614         (unify): Likewise.
13615         * typeck.c (comp_target_parms): Likeiwse.
13616         (build_static_cast): Likewise.
13617         (build_reinterpret_cast): Likewise.
13618         (build_const_cast): Likewise.
13619         (comp_ptr_ttypes_real): Likewise.
13620         (comp_ptr_ttypes_const): Likewise.
13621         * typeck2.c (process_init_constructor): Likewise.
13622
13623 2000-04-30  Scott Snyder <snyder@fnal.gov>
13624
13625         * decl.c (finish_destructor_body): Use the base destructor when
13626         destroying virtual bases.
13627
13628 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
13629
13630         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
13631         STMT_EXPRs.
13632         * optimize.c (struct inline_data): Add target_exprs field.
13633         (declare_return_variable): When a function returns an aggregate,
13634         use the variable declared in the TARGET_EXPR as the remapped
13635         DECL_RESULT.
13636         (expand_call_inline): Update the pending target_exprs stack.
13637         (optimize_function): Initialize the stack.
13638
13639         * decl2.c (finish_file): Fix typo in comment.
13640
13641         * method.c (emit_thunk): Don't try to return a `void' value.
13642
13643         * optimize.c (initialize_inlined_parameters): If the parameter is
13644         addressable, we need to make a new VAR_DECL, even if the
13645         initializer is constant.
13646
13647 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
13648
13649         * decl.c (grok_op_properties): Add an extra check of argtypes.
13650
13651 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
13652
13653         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
13654         variables.
13655         (initialize_inlined_parameters): Try to avoid creating new
13656         VAR_DECLs.
13657
13658 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
13659
13660         * lex.c (my_get_run_time): Remove.
13661         (init_filename_times): Use get_run_time instead of my_get_run_time.
13662         (check_newline): Likewise.
13663         (dump_time_statistics): Likewise.
13664         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
13665         of computing elapsed time explicitly.
13666
13667 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
13668
13669         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
13670         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
13671         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
13672         before calling decl_constant_value.
13673         * class.c (check_bitfield_decl): Likewise.
13674         * cvt.c (ocp_convert): Likewise.
13675         (convert): Likewise.
13676         * decl.c (compute_array_index_type): Likewise.
13677         (build_enumerator): Likewise.
13678         * decl2.c (check_cp_case_value): Likewise.
13679         * pt.c (convert_nontype_argument): Likewise.
13680         (tsubst): Likewise.
13681         * typeck.c (decay_conversion): Likewise.
13682         (build_compound_expr): Likewise.
13683         (build_reinterpret_cast): Likewise.
13684         (build_c_cast): Likewise.
13685         (convert_for_assignment): Likewise.
13686
13687 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
13688
13689         * decl.c (finish_function): Don't play games with DECL_INLINE.
13690
13691 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
13692
13693         * ir.texi: Correct typo.
13694
13695 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13696
13697         * decl.c (grokdeclarator): Reject VLAs as members.
13698
13699 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
13700
13701         * call.c (standard_conversion): Accept conversion between
13702         COMPLEX_TYPEs.
13703
13704         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
13705
13706 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
13707
13708         * decl2.c (finish_file): Remove double setup for accounting
13709         compile time.
13710
13711 2000-04-24  Robert Lipe <robertlipe@usa.net>
13712
13713         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
13714
13715 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
13716
13717         * new.cc (set_new_handler): Needs to be in std::.
13718
13719 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
13720
13721         * cp-tree.h (lang_decl): Remove pretty_function_p.
13722         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
13723         language-specific node.
13724         * decl.c (cp_make_fname_decl): Use build_decl, not
13725         build_lang_decl, to build the variables.
13726         (grokvardecl): Don't call build_lang_decl for local variables in
13727         templates.
13728         (grokdeclarator): Don't call build_lang_decl for local type
13729         declarations in templates.
13730         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
13731         zero'd memory, rather than calling memset.
13732         * pt.c: Include hashtab.h.
13733         (local_specializations): New variable.
13734         (retrieve_local_specialization): Use it.
13735         (register_local_specialization): Likewise.
13736         (tsubst_decl): Don't assume local variables have
13737         DECL_LANG_SPECIFIC.
13738         (instantiate_decl): Set up local_specializations.
13739         * Makefile.in (HTAB_H): New variable.
13740
13741 2000-04-23  Richard Henderson  <rth@cygnus.com>
13742
13743         * typeck.c (c_expand_asm_operands): Restore the original
13744         contents of the output list.
13745
13746 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
13747
13748         * ir.texi:  Document complex number representation.
13749
13750 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
13751
13752         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
13753         (target_incomplete_p): New function.
13754         (tinfo_base_init): Create comdat NTBS name variable.
13755         (ptr_initializer): Add non_public parameter. Calculate it.
13756         (ptmd_initializer): Likewise.
13757         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
13758         (create_real_tinfo_var): Add non_public parameter. Use it.
13759         Push proxy into global namespace.
13760         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
13761         New enumeration.
13762         * inc/typeinfo (type_info::before, type_info::operator==):
13763         Compare __name addresses.
13764
13765         * tinfo2.cc: Remove new-abi builtins comment.
13766
13767 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
13768
13769         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
13770
13771         * call.c (joust): Exit early if we get the same function, too.
13772
13773         * decl2.c (key_method): Return NULL_TREE for template classes.
13774         (import_export_class): Don't need to check for template classes.
13775
13776 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
13777
13778         * lex.c: Remove references to cccp.c.
13779
13780 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
13781
13782         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
13783         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
13784         (DECL_DESTRUCTOR_P): Use destructor_attr.
13785         (DECL_CONST_MEMFUNC_P): Reimplement.
13786         (DECL_VOLATILE_MEMFUNC_P): Remove.
13787         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
13788         (overrides): Use DECL_DESTRUCTOR_P.
13789         (check_for_override): Likewise.
13790         * decl.c (start_function): Likewise.
13791         * decl2.c (grokfclassfn): Likewise.
13792         (check_classfn): Likewise.
13793         (grok_function_init): Likewise.
13794
13795 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
13796
13797         * decl2.c (grokfield): Issue error on illegal data member
13798         declaration.
13799
13800 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
13801
13802         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
13803
13804 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
13805
13806         * class.c (build_vtable_entry): Don't build thunks for type-info
13807         functions.
13808
13809 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
13810
13811         * decl.c (decls_match): Allow a redeclaration of a builtin to
13812         specify args while the builtin did not.
13813
13814 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
13815
13816         * cp-tree.def (THUNK_DECL): Add to documentation.
13817         * cp-tree.h (flag_huge_objects): Declare.
13818         * class.c (modify_vtable_entry): Tidy.
13819         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
13820         Calculate delta appropriately for the new ABI.
13821         (dfs_modify_vtables): Use it.
13822         (modify_all_vtables): Fix thinko in code to add overriding copies
13823         of functions to primary vtables.
13824         (build_clone): Fix typo in comment.
13825         (clone_function_decl): Correct order of destructors in vtable.
13826         (build_vbase_offset_vtbl_entries): Adjust comment.
13827         (dfs_vcall_offset_queue_p): Remove.
13828         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
13829         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
13830         (build_vtable_entry): Correct check for pure virtual functions.
13831         Don't declare flag_huge_objects.
13832         * decl.c (flag_huge_objects): Remove declaration.
13833         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
13834         Use int_size_in_bytes.
13835         (emit_thunk): Handle vcall offset thunks.
13836
13837 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13838
13839         * decl2.c (parse_time, varconst_time): Delete declarations.
13840         (finish_file): Delete LINENO declaration.
13841         START_TIME and THIS_TIME now long.
13842
13843 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
13844
13845         * class.c (build_base_field): Reformat comment.
13846
13847         * inc/cxxabi.h (stddef.h): Comment inclusion.
13848         (__base_class_info::__offset): Comment shift.
13849
13850 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
13851
13852         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
13853         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
13854         (cp_push_exception_identifier): New macro.
13855         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
13856         (DECL_BASE_DESTRUCTOR_P): Likewise.
13857         (DECL_DELETING_DESTRUCTOR_P): Likewise.
13858         (get_vtbl_decl_for_binfo): Fix formatting.
13859         (in_charge_arg_for_name): New macro.
13860         (maybe_build_cleanup_and_delete): Remove declaration.
13861         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
13862         (in_charge_arg_for_name): New function.
13863         (build_new_method_call): Use it.  Handle cloned destructors.
13864         (build_clone): Don't make the base constructor virtual.
13865         Automatically defer generated functions.
13866         (clone_function_decl): Handle destructors, too.
13867         (clone_constructors_and_destructors): Likewise.
13868         (create_vtable_ptr): Don't create a vtable entry for a cloned
13869         function.
13870         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
13871         (initialize_predefined_identifiers): Update appropriately.
13872         (finish_destructor_body): Simplify.
13873         (maybe_build_cleanup_and_delete): Remove.
13874         * except.c (expand_throw): Handle new-ABI destructors.
13875         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
13876         (build_dtor_call): New function.
13877         (build_delete): Use it.  Simplify.
13878         * optimize.c (maybe_clone_body): Handle destructors.
13879         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
13880
13881         * exception.cc (cleanup_fn): New typedef.
13882         (CALL_CLEANUP): New macro.
13883         (cp_eh_info): Use them.
13884         (__cp_push_exception): Likewise.
13885         (__cp_pop_exception): Likewise.
13886
13887 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
13888
13889         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
13890         (complete_dtor_identifier): New macro.
13891         (CLASSTYPE_FIRST_CONVERSION): Remove.
13892         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
13893         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
13894         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
13895         (CLASSTYPE_CONSTRUCTORS): Likewise.
13896         (CLASSTYPE_DESTRUCTORS): Likewise.
13897         (lang_decl): Add cloned_function.
13898         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
13899         (DECL_BASE_CONSTRUCTOR_P): Likewise.
13900         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
13901         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
13902         (DECL_CLONED_FUNCTION_P): Likewise.
13903         (DECL_CLONED_FUNCTION): Likewise.
13904         (clone_function_decl): Declare.
13905         (maybe_clone_body): Likewise.
13906         * call.c (build_user_type_conversion_1): Call complete object
13907         constructors in the new ABI.
13908         (build_new_method_call): Don't add in-charge parameters under the
13909         new ABI.
13910         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
13911         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
13912         CLASSTYPE_DESTRUCTOR_SLOT.
13913         (build_clone): New function.
13914         (clone_function_decl): Likewise.
13915         (clone_constructors_and_destructors): Likewise.
13916         (check_bases_and_members): Use it.
13917         * decl.c (iniitialize_predefined_identifiers): Initialize
13918         complete_dtor_identifier.
13919         (finish_function): Don't add extra code to a clone.
13920         (lang_mark_tree): Mark cloned_function.
13921         * decl2.c (mark_used): Don't bother trying to instantiate things
13922         we synthesized.
13923         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
13924         * method.c (set_mangled_name_for_decl): Don't treat clones as
13925         constructors.
13926         (synthesize_method): Sythesize cloned functions, not the clones.
13927         * optimize.c (inline_data): Update comment on ret_label.
13928         (remap_block): Don't assume DECL_INITIAL exists.
13929         (copy_body_r): Allow ret_label to be NULL.
13930         (maybe_clone_body): Define.
13931         * pt.c (tsubst_decl): Handle clones.
13932         (instantiate_clone): New function.
13933         (instantiate_template): Use it.
13934         (set_mangled_name_for_template_decl): Don't treat clones as
13935         constructors.
13936         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
13937         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
13938         * semantics.c (expand_body): Clone function bodies as necessary.
13939
13940         * optimize.c (remap_decl): Avoid sharing structure for arrays
13941         whose size is only known at run-time.
13942         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
13943
13944         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
13945         to has_in_charge_parm_p.
13946         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
13947         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
13948         (DECL_COPY_CONSTRUCTOR_P): New macro.
13949         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
13950         (build_user_type_conversion_1): Likewise.
13951         (convert_like_real): Likewise.
13952         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
13953         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
13954         (copy_args_p): Likewise.
13955         (grok_ctor_properties): Likewise.
13956         (start_function): Likewise.
13957         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
13958         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
13959         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
13960         * method.c (do_build_copy_constructor): Use
13961         DECL_HAS_IN_CHARGE_PARM_P.
13962         (synthesize_method): Likewise.
13963         * pt.c (instantiate_template): Remove goto.
13964         * tree.c (build_cplus_method_type): Remove mention of obstacks in
13965         comment.
13966
13967         * cp-tre.h (finish_function): Change prototype.
13968         * decl.c (end_cleanup_fn): Adjust caller.
13969         (finish_function): Take only one parameter.
13970         * decl2.c (finish_objects): Adjust caller.
13971         (finish_static_storage_duration_function): Likewise.
13972         * method.c (emit_thunk): Likewise.
13973         * parse.y: Likewise.
13974         * parse.c: Regenerated.
13975         * pt.c (instantiate_decl): Likewise.
13976         * rtti.c (synthesize_tinfo_fn): Likewise.
13977         * semantics.c (expand_body): Likewise.
13978
13979         * cp-tree.h (copy_decl): New function.
13980         * class.c (finish_struct_1): Use it.
13981         * lex.c (copy_decl): Define it.
13982         * pt.c (tsubst_decl): Likewise.
13983         * tree.c (copy_template_template_parm): Likewise.
13984
13985         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
13986         has_nonpublic_assign_ref.
13987         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
13988         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
13989         * class.c (finish_struct_methods): Don't set
13990         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
13991         (interface_only): Don't declare.
13992         (interface_unknown): Likewise.
13993
13994 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13995
13996         * tree.h (HAVE_TEMPLATES): Remove definition.
13997         * lang-options.h (-fthis-is-variable): Remove documentation.
13998
13999 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
14000
14001         * class.c (instantiate_type): Handle object-relative template-id.
14002
14003         * semantics.c (finish_expr_stmt): Call convert_to_void here.
14004         * decl.c (cplus_expand_expr_stmt): Not here.
14005
14006         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
14007         Initialize exprtype earlier.
14008
14009         * parse.y (fn.def1): Check for defining types in return types.
14010
14011         * decl.c (check_tag_decl): Notice extra fundamental types.
14012         Diagnose empty decls in classes, too.
14013
14014         * decl.c (grokdeclarator): Don't override an anonymous name if no
14015         declarator was given.
14016
14017         * cvt.c (convert_to_void): Call resolve_offset_ref.
14018
14019         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
14020
14021         * decl2.c (decl_namespace): Handle getting a type.
14022
14023         * typeck.c (build_c_cast): Re-enable warning for cast between
14024         pointer and integer of different size.
14025
14026 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
14027
14028         * inc/cxxabi.h (__pointer_type_info): Add restrict and
14029         incomplete flags.
14030         (__pointer_type_info::__pointer_catch): New virtual function.
14031         (__pointer_to_member_type_info): Derive from
14032         __pointer_type_info. Adjust.
14033         (__pointer_to_member_type_info::__do_catch): Remove.
14034         (__pointer_to_member_type_info::__is_pointer_p): Declare.
14035         (__pointer_to_member_type_info::__pointer_catch): Declare.
14036         * rtti.c (qualifier_flags): Add restrict flag.
14037         (ptmd_initializer): Reorder members.
14038         (create_tinfo_types): Expand comments. Reorder
14039         ptmd_desc_type_node members.
14040         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
14041         Implement.
14042         (__pointer_type_info::__do_catch): Move specific code into
14043         __pointer_catch. Call it.
14044         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
14045         specific catch checking. Fix void conversion check.
14046         (__pointer_to_member_type_info::__do_catch): Remove.
14047         (__pointer_to_member_type_info::__pointer_catch): Implement.
14048
14049 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14050
14051         * lex.c (init_parse): Remove traces of classof and headof.
14052         * decl2.c (flag_operator_names): Default to 1.
14053         (lang_decode_option): Do not set it for -ansi.
14054
14055 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
14056
14057         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
14058         (DECL_MAIN_VARIANT): Remove.
14059         * decl.c (duplicate_decls): Don't set it.
14060         (start_function): Likewise.
14061         (lang_mark_tree): Don't mark it.
14062         * decl2.c (defer_fn): Don't use it.
14063         * lex.c (retrofit_lang_decl): Don't set it.
14064         * pt.c (tsubst_decl): Likewise.
14065         * ptree.c (print_lang_decl): Don't print it.
14066         * typeck.c (mark_addressable): Don't use it.
14067
14068 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14069
14070         * vec.cc: Include <new> and <exception>.
14071         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
14072         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
14073         terminate.
14074         (__cxa_vec_delete): Catch dtor exceptions.
14075
14076 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
14077
14078         Prepend __ to implementation defined names.
14079         * inc/typeinfo (type_info): Rename _name to __name.
14080         (type_info::type_info): Rename parameter.
14081         (type_info::operator==, type_info::operator!=,
14082         type_info::before): Likewise.
14083         (type_info::is_pointer_p, type_info::is_function_p,
14084         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
14085         parameters.
14086         * inc/cxxabi.h
14087         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
14088         (__pointer_type_info::__pointer_type_info): Likewise.
14089         (__pointer_type_info::is_pointer_p,
14090         __pointer_type_info::do_catch): Prepend __. Rename parameters.
14091         (__array_type_info::__array_type_info): Rename parameters.
14092         (__function_type_info::__function_type_info): Likewise.
14093         (__function_type_info::is_function_p): Prepend __.
14094         (__enum_type_info::__enum_type_info): Rename parameters.
14095         (__pointer_to_member_type_info::__pointer_to_member_type_info):
14096         Likewise.
14097         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
14098         parameters.
14099         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
14100         (__class_type_info::__class_type_info): Rename parameters.
14101         (__class_type_info::sub_kind): Prepend __. Adjust member names.
14102         (__class_type_info::upcast_result,
14103         __class_type_info::dyncast_result): Prepend __. Move definition
14104         into tinfo.cc.
14105         (__class_type_info::do_upcast, __class_type_info::do_catch,
14106         __class_type_info::find_public_src,
14107         __class_type_info::do_dyncast,
14108         __class_type_info::do_find_public_src): Prepend __. Rename
14109         parameters.
14110         (__si_class_type_info::__si_class_type_info): Rename parameters.
14111         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
14112         __si_class_type_info::do_find_public_src): Prepent __. Rename
14113         parameters.
14114         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
14115         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
14116         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
14117         parameters.
14118         (__dynamic_cast): Rename parameters.
14119         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
14120         type_info::do_catch, type_info::do_upcast): Prepend __.
14121         (contained_p, public_p, virtual_p, contained_public_p,
14122         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
14123         (__class_type_info::do_catch,
14124         __class_type_info::do_upcast): Prepend __. Adjust.
14125         (__class_type_info::__upcast_result,
14126         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
14127         Adjust.
14128         (__class_type_info::find_public_src): Prepend __. Adjust.
14129         (__class_type_info::do_find_public_src,
14130         __si_class_type_info::do_find_public_src,
14131         __vmi_class_type_info::do_find_public_src): Likewise.
14132         (__class_type_info::do_dyncast,
14133         __si_class_type_info::do_dyncast,
14134         __vmi_class_type_info::do_dyncast): Likewise.
14135         (__class_type_info::do_upcast,
14136         __si_class_type_info::do_upcast,
14137         __vmi_class_type_info::do_upcast): Likewise.
14138         (__dynamic_cast): Adjust.
14139         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
14140         (__function_type_info::is_function_p): Likewise.
14141         (__pointer_type_info::do_catch): Likewise. Adjust.
14142         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
14143         (__throw_type_match_rtti_2): Adjust.
14144         (__is_pointer): Adjust.
14145
14146 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
14147
14148         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
14149         (complete_ctor_identifier): New macro.
14150         (special_function_kind): Add sfk_copy_constructor and
14151         sfk_assignment_operator.
14152         (LOOKUP_HAS_IN_CHARGE): Remove.
14153         (cons_up_default_function): Rename to ...
14154         (implicitly_declare_fn): ... this.
14155         * call.c (build_new_method_call): Add in-charge parameters for
14156         constructors here.
14157         * class.c (add_implicitly_declared_members): Change parameter name
14158         from cant_have_assignment to cant_have_const_assignment.
14159         Replace calls to cons_up_default_function to implicitly_declare_fn.
14160         * cvt.c (ocp_convert): Use complete_ctor_identifier.
14161         * decl.c (initialize_predefined_identifiers): Initialize it.
14162         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
14163         complex expression.
14164         * init.c (expand_default_init): Don't calculate the in-charge
14165         parameter here.
14166         (build_new_1): Likewise.
14167         * lex.c (cons_up_default_function): Move to method.c.
14168         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
14169         (implicitly_declare_fn): New function.
14170         * typeck.c (build_static_cast): Use complete_ctor_identifier.
14171         (build_modify_expr): Likewise.
14172         * typeck2.c (build_functional_cast): Likewise.
14173
14174         Under the new ABI, constructors don't return `this'.
14175         * cp-tree.h (warn_reorder): Declare.
14176         (special_function_kind): New enum.
14177         (global_base_init_list): Remove declaration.
14178         (emit_base_init): Don't return a value.
14179         (check_base_init): Don't declare.
14180         (is_aggr_typedef): Likewise.
14181         * decl.c (check_special_function_return_type): New function.
14182         (return_types): Remove.
14183         (grokdeclarator): Use check_special_function_return_type.
14184         (start_function): Don't initialize ctor_label under the new ABI.
14185         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
14186         * init.c (begin_init_stmts): Move to top of file.
14187         (finish_init_stmts): Likewise.
14188         (warn_reorder): Don't declare.
14189         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
14190         value.
14191         (check_base_init): Remove.
14192         (is_aggr_typedef): Likewise.
14193         (build_new_1): Don't use the return value of a constructor.
14194         * semantics.c (setup_vtbl_ptr): Don't use the return value
14195         of emit_base_init.
14196         * typeck.c (check_return_expr): Don't magically convert return
14197         statements into `return this' in constructors under the new ABI.
14198
14199         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
14200         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
14201         (base_ctor_identifier): New macro.
14202         (base_dtor_identifier): Likewise.
14203         (deleting_dtor_identifier): Likewise.
14204         * decl.c: Don't include obstack.h.
14205         (obstack_chunk_alloc): Don't define.
14206         (obstack_chunk_free): Likewise.
14207         (struct predefined_identifier): New type.
14208         (initialize_predefined_identifiers): New function.
14209         (init_decl_processing): Use it.
14210         (debug_temp_inits): Remove.
14211         (start_method): Don't call preserve_data.
14212         (hack_incomplete_structures): Update comment.
14213         * init.c (init_init_processing): Don't initialize
14214         nelts_identifier.
14215         (build_offset_rf): Remove dead code.
14216         (build_delete): Use CLASSTYPE_N_BASECLASSES.
14217         * search.c (init_search_processing): Don't initialize
14218         vptr_identifier.
14219
14220 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14221
14222         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
14223         some sign_compare warnings.
14224
14225 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14226
14227         Rename abi::__vmi_class_type_info members.
14228         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
14229         base_list, detail_masks members to vmi_flags, vmi_base_count,
14230         vmi_bases and vmi_flags_masks respectively.
14231         (__vmi_class_type_info::vmi_flags_masks): Rename
14232         details_unknown_mask to flags_unknown_mask.
14233         * tinfo.cc (__class_type_info::do_upcast): Adjust.
14234         (__vmi_class_type_info::do_find_public_src): Adjust.
14235         (__vmi_class_type_info::do_dyncast): Adjust.
14236         (__vmi_class_type_info::do_upcast): Adjust.
14237
14238 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
14239
14240         * tinfo.cc (convert_to_base): New function.
14241         (get_vbase_offset): Remove. Move into convert_to_base.
14242         (__vmi_class_type_info::do_find_public_src): Adjust.
14243         (__vmi_class_type_info::do_dyncast): Adjust.
14244         (__vmi_class_type_info::do_upcast): Adjust.
14245
14246 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
14247
14248         * tinfo.cc (operator=): Use __builtin_strcmp.
14249         * tinfo2.cc (before): Likewise.
14250
14251 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
14252
14253         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
14254         (DECL_SAVED_INLINE): Rename to ...
14255         (DECL_DEFERRED_FN): ... this.
14256         (in_function_p): Remove declaration.
14257         (mark_inline_for_output): Rename to ...
14258         (defer_fn): ... this.
14259         * decl.c (finish_function): Adjust call to mark_inline_for_output.
14260         (in_function_p): Remove definition.
14261         * decl2.c (saved_inlines): Rename to ...
14262         (deferred_fns): ... this.
14263         (saved_inlines_used): Rename to ...
14264         (deferred_fns_used): ... this.
14265         (mark_inline_for_output): Rename to ...
14266         (defer_fn): ... this.
14267         (finish_file): Adjust accordingly.
14268         (init_decl2): Likewise.
14269         * lex.c (cons_up_default_function): Likewise.
14270         * pt.c (mark_decl_instantiated): Likewise.
14271         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
14272         circumstances.
14273         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
14274         * semantics.c (expand_body): Defer more functions.
14275
14276 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14277
14278         * vec.cc: New file.
14279         * Make-lang.in (CXX_LIB2FUNCS): Add it.
14280         (vec.o): Build it.
14281         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
14282         __cxa_vec_delete): Declare.
14283
14284 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
14285
14286         * rtti.c (dfs_class_hint_mark): New static function.
14287         (dfs_class_hint_unmark): New static function.
14288         (class_hint_flags): Use them.
14289
14290 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
14291
14292         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
14293
14294 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
14295
14296         * cp-tree.h (instantiate_decl): Change prototype.
14297         * decl2.c (mark_used): Adjust call.
14298         * optimize.c (inlinable_function_p): Adjust handling of templates.
14299         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
14300         (do_type_instantiation): Likewise.
14301         (instantiate_decl): Defer more templates.
14302         (instantiate_pending_templates): Adjust logic to handle inline
14303         friend functions.
14304
14305         * Makefile.in (GGC_H): New variable.  Use it throughout in place
14306         of ggc.h.
14307
14308         * call.c: Don't include obstack.h.  Include ggc.h.
14309         (obstack_chunk_alloc): Don't define.
14310         (obstack_chunk_free): Likewise.
14311         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
14312         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
14313         (pop_switch): Free it.
14314
14315         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
14316
14317         * dump.c (dequeue_and_dump): Don't try to print the bit_position
14318         if we don't have a DECL_FIELD_OFFSET.
14319
14320 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
14321
14322         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
14323         special_function_p.
14324
14325 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14326
14327         * cfns.gperf (hash, libc_name_p): Prototype.
14328
14329         * rtti.c (build_dynamic_cast_1): Constification.
14330
14331         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
14332
14333         * semantics.c (deferred_type_access_control): Prototype.
14334
14335 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
14336
14337         Correct many new ABI issues regarding vbase and vcall offset
14338         layout.
14339         * cp-tree.h (BINFO_VTABLE): Document.
14340         (struct lang_type): Tweak formatting.
14341         (BINFO_PRIMARY_BINFO): Add to documentation.
14342         (CLASSTYPE_VSIZE): Fix typo in comment.
14343         (CLASSTYPE_VBASECLASSES): Update documentation.
14344         (BINFO_VBASE_MARKED): Remove.
14345         (SET_BINFO_VBASE_MARKED): Likewise.
14346         (CLEAR_BINFO_VBASE_MARKED): Likewise.
14347         (BINFO_FIELDS_MARKED): Remove.
14348         (SET_BINFO_FIELDS_MARKED): Likewise.
14349         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
14350         (enum access_kind): New enumeration.
14351         (num_extra_vtbl_entries): Remove declaration.
14352         (size_extra_vtbl_entries): Likewise.
14353         (get_vtbl_decl_for_binfo): New function.
14354         (dfs_vbase_unmark): Remove declaration.
14355         (mark_primary_bases): Likewise.
14356         * class.c (SAME_FN): Remove.
14357         (struct vcall_offset_data_s): Move definition.
14358         (build_vbase_pointer): Use `build', not `build_binary_op', to
14359         access the vbase pointer under the new ABI.
14360         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
14361         (build_primary_vtable): Likewise.
14362         (dfs_mark_primary_bases): Move here from search.c.
14363         (mark_primary_bases): Likewise.
14364         (determine_primary_bases): Under the new ABI, don't make a base
14365         class a primary base just because we don't yet have any virtual
14366         functions.
14367         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
14368         (num_vfun_entries): Remove.
14369         (dfs_count_virtuals): Likewise.
14370         (num_extra_vtbl_entries): Likewise.
14371         (size_extra_vtbl_entries): Likewise.
14372         (layout_virtual_bases): Iterate in inheritance graph order under
14373         the new ABI.
14374         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
14375         indicate that a vfield is present.
14376         (init_class_processing): Initialize access_public_node, etc., from
14377         ak_public, etc.
14378         (get_vtbl_decl_for_binfo): New function.
14379         (dump_class_hierarchy_r): Likewise.
14380         (dump_class_hierarchy): Use it.
14381         (finish_vtbls): Build the vtbls in inheritance graph order.
14382         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
14383         (initialize_vtable): Use get_vtbl_decl_for_binfo.
14384         (accumulate_vtbl_inits): Add comments explaining why a pre-order
14385         walk is required.
14386         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
14387         where the vptr points, even for primary vtables.
14388         (build_vtbl_initializer): Adjust handling of vbase and vcall
14389         offsets.
14390         (build_vcall_and_vbase_vtable_entries): New function.
14391         (dfs_build_vbase_offset_vtbl_entries): Remove.
14392         (build_vbase_offset_vtbl_entries): Reimplement.
14393         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
14394         were already handled in a primary base class vtable.
14395         (build_vcall_offset_vtbl_entries): Adjust.
14396         (build_rtti_vtbl_entries): Adjust.
14397         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
14398         * init.c (expand_virtual_init): Simplify.
14399         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
14400         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
14401         * search.c (BINFO_ACCESS): New macro.
14402         (SET_BINFO_ACCESS): Likewise.
14403         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
14404         (access_in_type): Likewise.
14405         (dfs_accessible_p): Likewise.
14406         (protected_accessible_p): Likewise.
14407         (lookup_fnfields_1): Adjust documentation.
14408         (dfs_mark_primary_bases): Move to class.c
14409         (mark_primary_bases): Likewise.
14410         (dfs_vbase_unmark): Remove.
14411         (virtual_context): Use BINFO_FOR_VBASE.
14412         (dfs_get_vbase_types): Simplify.
14413         (dfs_build_inheritance_graph_order): New function.
14414         (get_vbase_types): Use it.
14415         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
14416
14417         * tinfo.cc (get_vbase_offset): New function.
14418         (__vmi_class_type_info::do_find_public_src): Use it.
14419         (__vmi_class_type_info::do_dyncast): Likewise.
14420         (__vmi_class_type_info::do_upcast): Likewise.
14421
14422 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
14423
14424         * lang-specs.h: Pass -fno-show-column to the preprocessor.
14425
14426 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
14427
14428         * rtti.c (class_hint_flags): Rename flags.
14429         (class_initializer): Remove flags.
14430         (synthesize_tinfo_var): Combine offset and flags. Add flags
14431         for __vmi_class_type_info.
14432         (create_tinfo_types): Remove flags from __class_type_info and
14433         __si_class_type_info. Merge flags and offset from
14434         base_class_type_info.
14435         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
14436         (__base_class_info::is_virtual_p): Adjust.
14437         (__base_class_info::is_public_p): Adjust.
14438         (__base_class_info::offset): New accessor.
14439         (__class_type_info::details): Remove member.
14440         (__class_type_info::__class_type_info): Lose details.
14441         (__class_type_info::detail_masks): Remove.
14442         (__si_class_type_info::__si_class_type_info): Lose details.
14443         (__vmi_class_type_info::details): New member.
14444         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
14445         (__vmi_class_type_info::detail_masks): New member.
14446         * tinfo.cc (__class_type_info::do_upcast): Initialize result
14447         with unknown_details_mask.
14448         (__vmi_class_type_info::do_find_public_src): Adjust
14449         (__vmi_class_type_info::do_dyncast): Adjust.
14450         (__vmi_class_type_info::do_upcast): Set result details, if
14451         needed. Adjust.
14452         (__dynamic_cast): Temporarily #if out optimization.
14453
14454 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
14455
14456         * rtti.c (get_tinfo_decl): Mark used.
14457         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
14458         mark as dealt with, if we output it.
14459
14460 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14461
14462         * class.c: Reorganize to put virtual function table initialization
14463         machinery at the end of the file.
14464
14465 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
14466
14467         * class.c (finish_struct): Use bitsize_zero_node.
14468         * pt.c (instantiate_class_template): Likewise.
14469
14470 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
14471
14472         Put RTTI entries at negative offsets in new ABI.
14473         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
14474         vbase offset at index -3, not -1.
14475         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
14476         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
14477         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
14478         (build_rtti_vtbl_entries): New function.
14479         (set_rtti_entry): Remove.
14480         (build_primary_vtable): Don't use it.
14481         (build_secondary_vtable): Likewise.
14482         (start_vtable): Remove.
14483         (first_vfun_index): New function.
14484         (set_vindex): Likewise.
14485         (add_virtual_function): Don't call start_vtable.  Do call
14486         set_vindex.
14487         (set_primary_base): Rename parameter.
14488         (determine_primary_base): Likewise.
14489         (num_vfun_entries): Don't use skip_rtti_stuff.
14490         (num_extra_vtbl_entries): Include RTTI information.
14491         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
14492         (skip_rtti_stuff): Remove.
14493         (dfs_modify_vtables): Don't use it.
14494         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
14495         (layout_nonempty_base_or_field): Update size handling.
14496         (create_vtable_ptr): Tweak.
14497         (layout_class_type): Adjust parameter names.
14498         (finish_struct_1): Simplify.
14499         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
14500         (skip_rtti_stuff): Remove.
14501         (first_vfun_index): New function.
14502         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14503         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
14504         (marked_vtable_pathp): Declare.
14505         (unmarked_vtable_pathp): Likewise.
14506         * error.c (dump_expr): Use first_vfun_index to calculate vtable
14507         offsets.
14508         * rtti.c (build_headof): Look for RTTI at negative offsets.
14509         (get_tinfo_decl_dynamic): Likewise.
14510         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
14511         here.
14512         (create_pseudo_type_info): Do it here instead.  Adjust so that
14513         vptr points at first virtual function.
14514         * search.c (marked_vtable_pathp): Make it global.
14515         (unmarked_vtable_pathp): Likewise.
14516         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
14517         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
14518         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
14519         (get_pure_virtuals): Likewise.
14520         (expand_upcast_fixups): Likewise.
14521         * tree.c (debug_binfo): Likewise.
14522         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
14523         negative offset.
14524
14525 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14526
14527         * class.c (check_field_decl): Fix typo.
14528         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
14529         (check_methods): Likewise.
14530         (check_field_decls): Likewise.
14531         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
14532         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
14533         Use DECL_RESULT_FLD, not DECL_RESULT.
14534         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
14535         * lex.c (identifier_type): Likewise.
14536         * pt.c (determine_specialization, lookup_template_class): Likewise.
14537         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
14538         (resolve_overloaded_unification, more_specialized): Likewise.
14539         * semantics.c (finish_member_declaration): Likewise.
14540         * typeck.c (build_x_function_call): Likewise.
14541
14542 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
14543
14544         * class.c (layout_empty_base): Handle empty bases with non-byte
14545         alignment.
14546         (build_base_field): Likewise.
14547         (layout_virtual_bases): Likewise.
14548
14549         * class.c (finish_struct_1): Fix typo in this change:
14550
14551         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14552
14553 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
14554
14555         * decl.c (grokdeclarator): Count partial specializations when
14556         keeping track of how many template classes have been seen.
14557
14558         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
14559
14560 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14561
14562         * class.c (build_vbase_pointer_fields): layout_field now place_field.
14563         (get_vfield_offset): Use byte_position.
14564         (set_rtti_entry): Set OFFSET to ssizetype zero.
14565         (get_binfo_offset_as_int): Deleted.
14566         (dfs_record_base_offsets): Use tree_low_cst.
14567         (dfs_search_base_offsets): Likewise.
14568         (layout_nonempty_base_or_field): Reflect changes in RLI format
14569         and call byte_position.
14570         (layout_empty_base): Convert offset to ssizetype.
14571         (build_base_field): use rli_size_unit_so_far.
14572         (dfs_propagate_binfo_offsets): Do computation in proper type.
14573         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
14574         (layout_class_type): Reflect changes in RLI names and fields.
14575         (finish_struct_1): Set DECL_FIELD_OFFSET.
14576         * dump.c (dequeue_and_dump): Call bit_position.
14577         * expr.c (cplus_expand_constant): Use byte_position.
14578         * rtti.c (expand_class_desc): Use bitsize_one_node.
14579         * typeck.c (build_component_addr): Use byte_position and don't
14580         special case for zero offset.
14581
14582 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
14583
14584         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
14585
14586         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
14587         tinfo object.
14588         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
14589         vtable.
14590
14591 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14592
14593         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
14594         DECL_P macros.
14595         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
14596         make_typename_type, check_initializer, cp_finish_decl,
14597         xref_tag): Likewise.
14598         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
14599         decl_namespace, arg_assoc_template_arg, arg_assoc,
14600         validate_nonmember_using_decl, do_class_using_decl): Likewise.
14601         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
14602         args_to_string): Likewise.
14603         * friend.c (is_friend): Likewise.
14604         * lex.c (note_got_semicolon, note_list_got_semicolon,
14605         is_global): Likewise.
14606         * method.c (build_overload_nested_name, build_overload_value,
14607         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
14608         * parse.y (typename_sub, typename_sub1): Likewise.
14609         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
14610         process_partial_specialization, convert_template_argument,
14611         template_args_equal, add_pending_template, lookup_template_class,
14612         for_each_template_parm_r, maybe_fold_nontype_arg,
14613         tsubst, instantiate_template, type_unification_real, unify,
14614         instantiate_pending_templates, set_mangled_name_for_template_decl):
14615         Likewise.
14616         * repo.c (repo_get_id, repo_template_used): Likewise.
14617         * search.c (lookup_field_1): Likewise.
14618         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
14619         * xref.c (classname): Likewise.
14620
14621 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
14622
14623         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
14624         (CANONICAL_BINFO): New macro.
14625         (BINFO_NEW_VTABLE_MARKED): Use it.
14626         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
14627         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
14628         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
14629         not TREE_TYPE.
14630         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14631         (build_secondary_vtable): Likewise.
14632         (dfs_finish_vtbls): Likewise.
14633         (dfs_accumulate_vtbl_inits): Likewise.
14634         (accumulate_vtbl_inits): New function.
14635         (finish_vtbls): Make sure that virtual bases come after
14636         non-virtual bases in the vtable group.
14637         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
14638         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14639         * search.c (struct vbase_info): Move definition.
14640         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
14641         (unmarked_new_vtable_p): Likewise.
14642         (dfs_mark_vtable_path): Remove.
14643         (dfs_mark_new_vtable): Remove.
14644         (dfs_unmark_new_vtable): Likewise.
14645         (dfs_clear_search_slot): Likewise.
14646         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
14647         (dfs_clear_vbase_slots): Likewise.
14648         (init_vbase_pointers): LIkewise.
14649
14650 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
14651
14652         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
14653         SIZETYPE to a non-SIZETYPE.
14654
14655 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
14656
14657         * class.c (layout_virtual_bases): Adjust names in conditionally
14658         compiled code.
14659
14660         * class.c (record_base_offsets): New function.
14661         (layout_conflict_p): Likewise.
14662         (layout_nonempty_base_or_field): Use it.
14663         (layout_empty_base): New function.
14664         (build_base_field): Use it.
14665         (build_base_fields): Update comment.
14666         (layout_virtual_bases): Fold in a little code form
14667         layout_basetypes.  Use layout_empty_base.
14668         (layout_basetypes): Remove.
14669         (end_of_class): New function.
14670         (layout_class_type): Use it.  Adjust.
14671
14672         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
14673         (fntype_p): Remove.
14674         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
14675         comment.
14676         (dfs_skip_nonprimary_vbases_markedp): Likewise.
14677         * typeck.c (fntype_p): Remove.
14678
14679         * cp-tree.h (TI_SPEC_INFO): Remove.
14680         (CLASSTYPE_TI_SPEC_INFO): Likewise.
14681         * pt.c (process_partial_specialization): Likewise.
14682
14683         * class.c (build_base_field): Fix thinko in computation of binfo
14684         offsets.
14685
14686         * tree.c (mark_local_for_remap_p): Mark variables declared in
14687         TARGET_EXPRs as well.
14688
14689 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14690
14691         * typeck.c (require_complete_type, complete_type,
14692         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
14693         build_array_ref, convert_arguments, pointer_diff,
14694         build_x_unary_op, build_unary_op, build_c_cast,
14695         build_modify_expr): Use COMPLETE_TYPE_P etc.
14696         * call.c (is_complete, convert_like_real,
14697         build_new_method_call): Likewise.
14698         * class.c (build_vbase_pointer_fields, check_bases,
14699         build_base_field, finish_struct_1, pushclass): Likewise.
14700         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
14701         * decl.c (maybe_process_template_type_declaration, pushtag,
14702         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
14703         layout_var_decl, check_initializer, cp_finish_decl,
14704         grokdeclarator, require_complete_types_for_parms,
14705         grok_op_properties, xref_tag, xref_basetypes,
14706         check_function_type): Likewise.
14707         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
14708         * friend.c (do_friend): Likewise.
14709         * init.c (build_offset_ref): Likewise.
14710         * parse.y (structsp): Likewise.
14711         * pt.c (maybe_process_partial_specialization,
14712         tsubst_friend_function, instantiate_class_template, tsubst,
14713         do_type_instantiation, instantiate_pending_templates): Likewise.
14714         * repo.c (repo_get_id): Likewise.
14715         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
14716         synthesize_tinfo_var, emit_support_tinfos): Likewise.
14717         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
14718         * semantics.c (begin_class_definition): Likewise.
14719         * tree.c (build_cplus_method_type): Likewise.
14720         * typeck2.c (digest_init, build_functional_cast,
14721         add_exception_specifier): Likewise.
14722         * parse.h, parse.c: Regenerated.
14723
14724 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
14725
14726         * inc/cxxabi.h: New header file. Define new-abi entry points.
14727         (__pointer_type_info::target): Rename member to ...
14728         (__pointer_type_info::type): ... here.
14729         (__base_class_info::type): Rename member to ...
14730         (__base_class_info::base): ... here.
14731         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
14732         * cp-tree.h (CPTI_ABI): New global tree enumeration.
14733         (abi_node): New global tree node.
14734         * decl.c (abi_node): Document.
14735         (init_decl_processing): Initialize abi_node.
14736         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
14737         (get_vmi_pseudo_type_info): Likewise.
14738         (create_tinfo_types): Likewise.
14739         (emit_support_tinfos): Likewise.
14740         * tinfo.h (cxxabi.h): Include for new-abi.
14741         Move rtti class definitions to new header file.
14742         * tinfo.cc (abi): Use the namespace.
14743         (std): Move new abi rtti classes from here ...
14744         (__cxxabiv1): ... to here.
14745         * tinfo2.cc (cxxabi.h): Include for new-abi.
14746         Move rtti class definitions to new header file.
14747         (std): Move new abi rtti classes from here ...
14748         (__cxxabiv1): ... to here.
14749         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
14750         namespace.
14751
14752 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
14753             Jason Merrill  <jason@casey.cygnus.com>
14754
14755         * method.c (build_overload_int): Use host_integerp.
14756
14757 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
14758
14759         * init.c (build_offset_ref): Handle the case of a templated member
14760         function.
14761
14762 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14763
14764         * except.c (expand_exception_blocks): Clear catch_clauses_last.
14765
14766 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
14767
14768         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
14769         * class.c (check_bitfield_decl): Turn illegal bitfields into
14770         non-bitfields.
14771         (dfs_propagate_binfo_offsets): Adjust for new size_binop
14772         semantics.
14773         (dfs_offset_for_unshared_vbases): Likewise.
14774         * cvt.c (cp_convert_to_pointer): Convert NULL to a
14775         pointer-to-member correctly under the new ABI.
14776         * expr.c (cplus_expand_constant): Don't use cp_convert when
14777         turning an offset into a pointer-to-member.
14778         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
14779         when dereferencing them under the new ABI.
14780         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
14781         of pointers-to-members under the new ABI.
14782
14783         * class.c (check_bitfield_decl): Remove restriction on really long
14784         bitfields.
14785         (layout_class_type): Implement new ABI handling of bitfields
14786         longer than their types.
14787
14788 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
14789
14790         * parse.y (extdefs): Call ggc_collect.
14791         * parse.c: Regenerated.
14792
14793 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
14794
14795         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
14796         (note_name_declared_in_class): Use OVL_CURRENT to get at a
14797         potential overload.
14798
14799 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14800
14801         * class.c (build_vbase_path): Use integer_zerop.
14802         (build_vtable_entry): Use tree_low_cst.
14803         (get_vfield_offset): Use bit_position.
14804         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
14805         Use tree_low_cst.
14806         (check_bitfield_decl): Set DECL_SIZE using convert.
14807         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
14808         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
14809         Use tree_low_cst.
14810         (finish_struct_1): Use bit_position.
14811         (dump_class_hierarchy): Use tree_low_cst.
14812         * cp-tree.h (min_precision): Add declaration.
14813         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
14814         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
14815         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
14816         * expr.c (cplus_expand_constant): Use bit_position.
14817         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
14818         * rtti.c (get_base_offset): Use bit_position.
14819         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
14820         host_integerp, and tree_low_cst.
14821         (pointer_int_sum): Use integer_zerop.
14822         (build_component_addr): Use bit_position.
14823
14824 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
14825
14826         * typeck.c (require_complete_type): Don't assume size_zero_node.
14827         (complete_type_or_else): Likewise.
14828
14829 2000-03-16  Steven Grady <grady@digitaldeck.com>
14830             Jason Merrill  <jason@casey.cygnus.com>
14831
14832         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
14833
14834 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
14835
14836         * decl2.c (grokfield): Bail out if type is error_mark_node.
14837
14838 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14839
14840         * tinfo2.cc (__ptr_to_member_data): Rename to ...
14841         (__pointer_to_member_data): ... here. Adjust.
14842         * rtti.c (create_tinfo_types): Adjust.
14843
14844 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14845
14846         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
14847         * decl.c (ref_desc_type_node): Undocument.
14848         * rtti.c (ptr_ref_initializer): Rename to ...
14849         (ptr_initializer): ... here. Adjust comments.
14850         (ptmd_initializer): Fix comment thinko.
14851         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
14852         (create_tinfo_types): Remove ref_desc_type_node init.
14853         * tinfo2.cc (__reference_type_info): Remove.
14854
14855 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
14856
14857         * decl.c (cp_finish_decl): Remove obsolete comment.
14858
14859         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
14860
14861 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
14862
14863         * cp-tree.h: Tweak documentation.
14864         * class.c (build_vbase_pointer_fields): Layout the fields, too.
14865         (avoid_overlap): Remove.
14866         (get_binfo_offset_as_int): New function.
14867         (dfs_serach_base_offsets): Likewise.
14868         (layout_nonempty_base_or_field): Likewise.
14869         (build_base_field): Layout fields here.  Avoid placing two objects
14870         of the same type at the same address, under the new ABI.
14871         (build_base_fields): Adjust accordingly.
14872         (create_vtable_ptr): Return the new field, but don't attach it to
14873         TYPE_FIELDS.
14874         (remove_base_field): Remove.
14875         (remove_base_fields): Remove.
14876         (layout_basetypes): Adjust accordingly.
14877         (layout_class_type): Call layout_field for each field, rather than
14878         just making a wholesale call to layout_type.
14879
14880 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
14881
14882         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
14883
14884 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
14885
14886         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
14887
14888         * except.c (dtor_nothrow): New fn.
14889         (do_pop_exception): Use it.  Take type parm.
14890         (push_eh_cleanup): Take type parm.
14891         (expand_start_catch_block): Pass it.
14892         (build_eh_type_type_ref): Accept null type.
14893
14894 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
14895
14896         * cp-tree.h (revert_static_member_fn): Change prototype.
14897         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
14898         (grok_op_properties): Likewise.
14899         (start_function): Likewise.
14900         (revert_static_member_fn): Simplify.
14901         * pt.c (check_explicit_specialization): Adjust call to
14902         revert_static_member_fn.
14903
14904 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
14905
14906         * cp-tree.h (scope_kind): New type.
14907         (tmpl_spec_kind): Likewise.
14908         (declare_pseudo_global_level): Remove.
14909         (pseudo_global_level_p): Rename to template_parm_scope_p.
14910         (pushlevel): Remove declaration.
14911         (begin_scope): New function.
14912         (finish_scope): Likewise.
14913         (current_tmpl_spec_kind): Likewise.
14914         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
14915         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
14916         Add template_spec_p.
14917         (toplevel_bindings_p): Adjust.
14918         (declare_pseudo_global_level): Remove.
14919         (pseudo_global_level_p): Rename to template_parm_scope_p.
14920         (current_tmpl_spec_kind): New function.
14921         (begin_scope): Likewise.
14922         (finish_scope): Likewise.
14923         (maybe_push_to_top_level): Adjust.
14924         (maybe_process_template_type_declaration): Likewise.
14925         (pushtag): Likewise.
14926         (pushdecl_nonclass_level): Likewise.
14927         (lookup_tag): Likewise.
14928         (grokfndecl): Handle member template specializations.  Share
14929         constructor and non-constructor code.
14930         * decl2.c (check_classfn): Handle member template specializations.
14931         * pt.c (begin_template_parm_list): Use begin_scope.
14932         (begin_specialization): Likewise.
14933         (end_specialization): Likewise.
14934         (check_explicit_specialization): Use current_tmpl_spec_kind.
14935         Handle member template specializations.
14936         (end_template_decl): Use finish_scope.  Remove call to
14937         get_pending_sizes.
14938         (push_template_decl_real): Remove bogus error message.
14939         (tsubst_decl): Fix typo in code contained in comment.
14940         (instantiate_template): Handle member template specializations.
14941         (most_general_template): Likewise.
14942
14943 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
14944
14945         * lex.c (whitespace_cr): Compress consecutive calls to warning().
14946         (do_identifier): Ditto for error().
14947
14948         * pt.c (convert_nontype_argument): Ditto for cp_error().
14949         (convert_template_argument): Ditto for cp_pedwarn().
14950
14951 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
14952
14953         * exception.cc (__check_null_eh_spec): New fn.
14954         * except.c (expand_end_eh_spec): Call it if the spec is throw().
14955
14956 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14957
14958         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
14959         * except.c (expand_end_eh_spec): Add the return type.
14960         * rtti.c (throw_bad_cast): Add the parmtypes.
14961         (throw_bad_typeid): Likewise.
14962
14963         * semantics.c (expand_stmt): Only leave out rtl for unused
14964         artificials, and set DECL_IGNORED_P on them as well.
14965         * decl.c (wrapup_globals_for_namespace): Likewise.
14966
14967 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
14968
14969         * decl.c (maybe_commonize_var): Skip all artificial decls.
14970         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
14971
14972 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
14973
14974         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
14975         * cp-tree.h: Declare flag_enforce_eh_specs.
14976         * decl.c (store_parm_decls, finish_function): Check it.
14977
14978         C library functions don't throw.
14979         * Makefile.in (cfns.h): New target.
14980         (except.o): Depend on it.
14981         * Make-lang.in (cc1plus): Depend on cfns.gperf.
14982         * cfns.gperf: New file.
14983         * cfns.h: Generated.
14984         * except.c: Include it.
14985         (nothrow_libfn_p): New fn.
14986         * decl.c (grokfndecl): Use it.
14987         * cp-tree.h: Declare it.
14988
14989         * decl.c (push_overloaded_decl_1, auto_function,
14990         define_function): Lose.
14991         (build_library_fn_1): New static fn.
14992         (builtin_function): Use it.
14993         (get_atexit_node): Use build_library_fn_ptr.
14994         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
14995         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
14996         push_void_library_fn, push_throw_library_fn): New fns.
14997         * cp-tree.h: Declare them.
14998         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
14999         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
15000         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
15001         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
15002         * rtti.c (build_runtime_decl): Lose.
15003         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
15004         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
15005         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
15006
15007         * call.c (build_call): Remove result_type parm.
15008         Call mark_used on unused artificial fns.
15009         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
15010
15011 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
15012
15013         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
15014         appropriate.
15015         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
15016         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
15017         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
15018         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
15019         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
15020         expand_generic_desc): Likewise.
15021
15022 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15023
15024         * exception.cc (__cp_pop_exception): Cleanup the original object.
15025
15026 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15027
15028         * decl.c (grok_op_properties): Merge conversion to void warning
15029         with other silly op warnings.
15030
15031 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
15032
15033         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
15034         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
15035
15036 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15037
15038         * decl.c (cp_make_fname_decl): New function.
15039         (wrapup_globals_for_namespace): Don't emit unused static vars.
15040         (init_decl_processing): Remove comment about use of
15041         array_domain_type. Set make_fname_decl.
15042         (cp_finish_decl): Remove __FUNCTION__ nadgering.
15043         * semantics.c (begin_compound_stmt): Remove
15044         current_function_name_declared flagging.
15045         (expand_stmt): Don't emit unused local statics.
15046         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
15047         specially.
15048
15049 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
15050
15051         * typeck.c (convert_for_assignment): Don't look at array
15052         initializer.
15053         * call.c (convert_like_real): Likewise.
15054
15055 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
15056
15057         Add initial support for '\uNNNN' specifier.
15058         * lex.c (read_ucs): New fn.
15059         (readescape, skip_white_space): Call it.
15060         (is_extended_char, is_extended_char_1): New fns.
15061         (utf8_extend_token): New fn, #if 0'd out.
15062         (real_yylex): Treat extended chars like letters.
15063
15064         * search.c (note_debug_info_needed): Walk the bases even if we
15065         weren't deferring the type itself.
15066
15067 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15068
15069         * decl2.c (finish_objects): Constify a char*.
15070
15071         * method.c (emit_thunk): Likewise.
15072
15073 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
15074
15075         * typeck.c (dubious_conversion_warnings): Look through
15076         REFERENCE_TYPE.
15077
15078 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15079
15080         * class.c (dfs_modify_vtables): I is now unsigned.
15081         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
15082         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
15083         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
15084         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
15085         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
15086         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
15087         Call integer_all_onesp.
15088         * typeck2.c (process_init_constructor): Use compare_tree_int.
15089
15090         * lang-specs.h (as): Don't call if -syntax-only.
15091
15092 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
15093
15094         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
15095         RTL_EXPR_HAS_NO_SCOPE after all.
15096
15097 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
15098
15099         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
15100         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
15101         RTL_EXPR_HAS_NO_SCOPE.
15102
15103         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
15104         later.
15105
15106         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
15107
15108 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
15109
15110         * call.c (convert_like): Macrofy.
15111         (convert_like_with_context): New macro.
15112         (convert_like_real): Renamed from convert_like.  Add calling
15113         context parameters, for diagnostics. Add recursive flag.  Call
15114         dubious_conversion_warnings for outer conversion.
15115         (build_user_type_conversion): Use convert_like_with_context.
15116         (build_over_call): Likewise. Don't warn about dubious
15117         conversions here. Adjust convert_default_arg calls.
15118         (convert_default_arg): Add context parameters for diagnostics.
15119         Pass through to convert_like_with_context.
15120         * cp-tree.h (convert_default_arg): Add context parameters.
15121         (dubious_conversion_warnings): Prototype new function.
15122         * typeck.c (convert_arguments): Adjust convert_default_arg call.
15123         (dubious_conversion_warnings): New function, broken
15124         out of convert_for_assignment.
15125         (convert_for_assignment): Adjust.
15126
15127 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
15128
15129         * decl2.c (key_method): Break out from...
15130         (import_export_vtable, import_export_class): ...here.
15131
15132         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
15133         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
15134
15135         * search.c (note_debug_info_needed, dfs_debug_mark,
15136         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
15137         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
15138
15139 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
15140
15141         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
15142         typos.
15143
15144 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
15145
15146         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
15147         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
15148         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
15149         (lang_type): Split gets_new into has_new and has_array_new.
15150         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15151         (TYPE_GETS_NEW): Split into ...
15152         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
15153         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
15154         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
15155         (build_op_new_call): Don't declare.
15156         (build_new_1): Likewise.
15157         * call.c (build_op_new_call): Remove.
15158         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15159         instead of TYPE_NEEDS_DESTRUCTOR.
15160         (finish_struct_bits): Likewise.
15161         (add_implicitly_declared_members): Likewise.
15162         (check_field_decl): Likewise.
15163         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
15164         correctly under the new ABI.
15165         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
15166         instead of TYPE_NEEDS_DESTRUCTOR.
15167         (initialize_local_var): Likewise.
15168         (destroy_local_var): Likewise.
15169         (cp_finish_decl): Likewise.
15170         (register_dtor_fn): Likewise.
15171         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
15172         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
15173         TYPE_VEC_DELETE_TAKES_SIZE here.
15174         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
15175         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
15176         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15177         (finish_destructor_body): Likewise.
15178         (maybe_build_cleanup_1): Likewise.
15179         * decl2.c (do_static_destruction): Likewise.
15180         * init.c (build_new_1): Make it static.
15181         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15182         (expand_cleanup_for_base): Likewise.
15183         (get_cookie_size): New function.
15184         (build_new_1): Handle array-new cookies correctly under the new
15185         ABI.
15186         (build_vec_delete_1): Likewise.
15187         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15188         (build_delete): Likewise.
15189         (build_vec_delete): Handle array-new cookies correctly under the new
15190         ABI.
15191         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15192         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
15193         TYPE_HAS_ARRAY_NEW_OPERATOR.
15194         * ptree.c (print_lang_type): Check them.
15195         * search.c (context_for_name_lookup): Fix typo in comment.
15196         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
15197         * tree.c (break_out_cleanups): Likewise.
15198         (build_cplus_array_test_1): Likewise.
15199         (cp_build_qualified_type_real): Likewise.
15200         * typeck.c (complete_type): Likewise.
15201
15202         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
15203         the command-line, not the end.
15204
15205 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
15206
15207         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
15208
15209 2000-03-02  Tom Tromey  <tromey@cygnus.com>
15210
15211         * cp-tree.h (build_java_class_ref): Declare.
15212         * init.c (build_java_class_ref): No longer static.
15213         * except.c (expand_throw): Generate a Java-style `throw' if the
15214         thrown object is a "Java" object.
15215         (initialize_handler_parm): Generate a Java-style lookup of
15216         exception info if the caught object is a "Java" object.
15217         (catch_language, catch_language_init): New globals.
15218         (decl_is_java_type): New function.
15219         (expand_start_catch_block): Don't call push_eh_info() or
15220         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
15221         class reference to build_catch_block.
15222
15223 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15224
15225         * typeck.c (comptypes): Treat sizetype like its language equivalent.
15226
15227 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
15228
15229         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
15230         to merge reference/pointer code and fix incorrect warnings.
15231
15232 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
15233
15234         * search.c (protected_accessible_p): Use context_for_name_lookup.
15235
15236         * init.c (construct_virtual_bases): Fix thinko.
15237         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
15238
15239 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15240
15241         * decl.c (current_function_decl): Move to toplev.c.
15242
15243 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
15244
15245         * pt.c (fn_type_unification): Unify return type, whenever
15246         provided.
15247         (get_bindings_real): Only pass return type when necessary.
15248         Remove explicit return type check.
15249         * class.c (resolve_address_of_overloaded_function): Pass desired
15250         return type to fn_type_unification.
15251
15252 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15253
15254         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
15255         DECL_FIELD_SIZE.
15256         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
15257         DECL_FIELD_SIZE.
15258         * rtti.c (expand_class_desc): Likewise.
15259         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
15260         (THUNK_VCALL_OFFSET): Likewise.
15261         (THUNK_DELTA): Reflect changes in ../tree.h.
15262
15263 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
15264
15265         * search.c (protected_accessible_p): Also allow the access if
15266         the member is public in DERIVED.  Lose TYPE parm.
15267         (friend_accessible_p): Lose TYPE parm.
15268         (accessible_p): Adjust.
15269
15270 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15271
15272         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
15273         on things that are not sizes; ssize_binop deleted.
15274         Call size_diffop when appropriate.
15275         (dfs_build_vcall_offset_vtbl_entries): Likewise.
15276         (build_primary_vtable, build_secondary_vtable): Likewise.
15277         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
15278         Variable I is HOST_WIDE_INT.
15279         (get_vfield_offset): Pass proper types to size_binop.
15280         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
15281         (finish_struct_1): Likewise.
15282         (skip_rtti_stuff): Arg N is now pointer to signed.
15283         (layout_class_type): Use size_zero_node.
15284         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
15285         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
15286         * decl.c (complete_arry_type): Pass proper types to size_binop.
15287         (xref_basetypes): BINFO_OFFSET is sizetype.
15288         * error.c (dump_expr): Don't use size_binop non-sizes.
15289         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
15290         * init.c (construct_virtual_bases): Fix type error.
15291         (build_vec_delete_1): Pass proper type to size_binop and don't
15292         fold result.
15293         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
15294         * rtti.c (get_base_offset): Pass proper type to size_binop.
15295         * search.c (dfs_find_vbases): Fix type error.
15296         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
15297         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
15298         * tree.c (debug_binfo): Variable N is signed.
15299         Use HOST_WIDE_INT_PRINT_DEC.
15300         * typeck.c (comptypes): sizetype is same as equivalent integer type.
15301         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
15302         size_one_node and size_zero_node.
15303         (c_alignof): Use size_one_node.
15304         (build_component_addr): Pass proper types to size_binop.
15305         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
15306
15307 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
15308
15309         Implement class scope using-declarations for functions.
15310         * class.c (handle_using_decl): Call add_method for used functions.
15311         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
15312         (add_method): Used functions are hidden by local functions.
15313         (check_bases_and_members): Handle using-decls before finalizing
15314         CLASSTYPE_METHOD_VEC.
15315         * call.c (add_function_candidate): Add ctype parm; if nonzero,
15316         override the type of 'this' accordingly.
15317         (add_template_candidate, add_template_candidate_real): Add ctype parm.
15318         (convert_class_to_reference, build_user_type_conversion_1,
15319         build_new_function_call, build_object_call, build_new_op,
15320         build_new_method_call): Pass ctype parm.
15321
15322         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
15323         the baselink.
15324         * call.c (convert_class_to_reference, build_user_type_conversion_1,
15325         build_new_function_call, build_object_call, build_new_op,
15326         build_new_method_call, build_op_delete_call): Don't get basetype_path
15327         from a baselink.
15328         * typeck.c (build_component_ref): Likewise.
15329         * init.c (build_offset_ref): Likewise.
15330         (resolve_offset_ref): Don't call enforce_access.
15331         Call build_scoped_ref.
15332         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
15333         would cause an error or if -pedantic.
15334         * class.c (alter_access): Lose binfo parm.
15335
15336 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15337
15338         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
15339         types.
15340
15341 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
15342
15343         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
15344         pseudo_type_info creation into the std namespace
15345
15346 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
15347
15348         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
15349         (import_export_class): Remove declaration.
15350         * decl2.c (import_export_class): Make it static.
15351         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
15352         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
15353         EXPR_WITH_FILE_LOCATION.
15354         * lex.c (check_newline): Tweak filename/lineno setting.
15355         * semantics.c (begin_while_stmt): Fix typo in comment.
15356
15357 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15358
15359         * lang-options.h (-fmessage-length=): Add missing option.
15360
15361         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
15362
15363 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
15364
15365         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
15366
15367 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
15368
15369         * optimize.c (expand_call_inline): Emit the return label before
15370         evaluating the return value.
15371
15372 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
15373
15374         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
15375         than duplicating functionality here.
15376         * optimize.c: Include input.h.
15377         (expand_call_inline): Use push_srcloc and pop_srcloc.
15378         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
15379         * parse.c: Regenerated.
15380         * Makefile.in (lex.o): Depend on input.h.
15381         (optimize.o): Likewise.
15382
15383 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
15384
15385         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
15386         function type, rather than ICE.
15387
15388 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
15389
15390         * decl.c (grokdeclarator): Call decl_type_access_control.
15391         * parse.y (parse_end_decl): Don't call decl_type_access_control if
15392         decl is null.
15393
15394 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
15395
15396         * decl.c (decls_match): Remove obsolete static member nadgering.
15397
15398 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
15399
15400         * decl.c (grokdeclarator): Change ANSI to ISO.
15401         * lex.c (consume_string, readescape, do_identifier): Likewise.
15402         (parse_float, real_yylex): Likewise.
15403         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
15404         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
15405         new_type_id, maybe_label_decls, simple_stmt,
15406         for.init.statement): Likewise.
15407         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
15408         * semantics.c (finish_named_return_value): Likewise.
15409         * parse.c: Regenerate.
15410
15411 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
15412
15413         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
15414         (CPTI_CLASS_STAR_TYPE): Remove.
15415         (vtable_index_type): Likewise.
15416         (class_star_type_node): Remove.
15417         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
15418         (build_binary_op_nodefault): Remove.
15419         * call.c (build_new_op): Use build_binary_op instead of
15420         build_binary_op_nodefault.
15421         * decl.c (init_decl_processing): Remove class_star_type_node
15422         initialization.  Make delta_type_node ptrdiff_type_node under the
15423         new ABI.  Initialize vtable_index_type.
15424         (build_ptrmemfunc_type): Build different structures for the new
15425         ABI.
15426         (build_enumerator): Use build_binary_op instead of
15427         build_binary_op_nodefault.
15428         * method.c (build_overload_value): Mangle pointers-to-members
15429         appropriately under the new ABI.
15430         * typeck.c (build_array_ref): Use build_binary_op instead of
15431         build_binary_op_nodefault.
15432         (get_member_function_from_ptrfunc): Adjust for the new ABI.
15433         (build_binary_op_nodefault): Rename to ...
15434         (build_binary_op): ... this.  Remove old version.  Adjust for
15435         pointer-to-member comparisons under the new ABI.
15436         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
15437         (build_ptrmemfunc): Adjust for the new ABI.
15438         (expand_ptrmemfunc_cst): Likewise.
15439         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
15440         (pfn_from_ptrmemfunc): Adjust for the new ABI.
15441
15442 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
15443
15444         * call.c (build_object_call): Compress consecutive calls to
15445         cp_error.
15446         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
15447         (build_op_delete_call): Adjust message formatting.
15448
15449         * class.c (check_bases): Compress consecutive calls to
15450         cp_pedwarn.
15451         (finish_struct_anon): Say 'ISO C++'.
15452
15453         * decl.c (start_decl): Same here.
15454         (grok_reference_init): Likewise.
15455         (grokfndecl): Correct message formatting.
15456         (grokfndecl): Improve diagnostic.
15457         (check_static_variable_definition): Likewise. Say 'ISO C++'
15458         (compute_array_index_type): Say 'ISO C++'
15459         (create_array_type_for_decl): Compress consecutive calls to
15460         cp_error.
15461         (grokdeclarator): Say 'ISO C++'
15462         (grok_op_properties): Likewise.
15463
15464         * decl2.c (delete_sanity): Clairify diagnostic.
15465         (check_member_template): Same here.
15466         (grok_function_init): Use consistent terminology.
15467
15468         * expr.c (do_case): Say 'ISO C++'
15469
15470         * friend.c (do_friend): Compress consecutive calls to warning.
15471
15472 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
15473
15474         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
15475         * class.c (build_secondary_vtable): Reorganize.  Don't create a
15476         new vtable under the new ABI.
15477         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
15478         computing the size.
15479         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
15480         the initializing elements.
15481         (initialize_vtable): New function.
15482         (dfs_finish_vtbls): Use it.
15483         (dfs_accumulate_vtbl_inits): New function.
15484         (finish_vtbls): Merge primary and secondary vtables under the new
15485         ABI.
15486         (finish_struct_1): Remove redundant call to layout_vtable_decl.
15487         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
15488         aren't VAR_DECLs.
15489
15490         * class.c (build_vtable): New function, split out from ...
15491         (get_vtable_decl): ... here, and ...
15492         (build_secondary_vtable): ... here.
15493
15494         * pt.c (tsubst_decl): Fix formatting.
15495
15496 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
15497
15498         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
15499         (avoid_overlap, build_base_field): Likewise.
15500         (build_base_field, build_base_fields, is_empty_class):
15501         Test DECL_SIZE with integer_zero.
15502         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
15503         * cp-tree.h (struct lang_type): New field size_unit.
15504         (CLASSTYPE_SIZE_UNIT): New macro.
15505         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
15506         (cp_finish_decl): Delete -Wlarger-than processing.
15507         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
15508         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
15509         * tree.c (make_binfo): binfo vector is one entry longer.
15510         (walk_tree): Walk DECL_SIZE_UNIT.
15511
15512 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
15513
15514         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
15515         comment.
15516         (build_vtable_entry): Don't assume all vtable entries are
15517         functions.
15518         (build_vtbl_initializer): Adjust accordingly.
15519         (get_vtable_decl): Fix formatting.
15520
15521 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
15522
15523         * semantics.c (deferred_type_access_control): Walk the entire
15524         type_lookups list.
15525         (save_type_access_control): Rename from
15526         initial_deferred_type_access_control.  Just remember the value.
15527         (decl_type_access_control): New fn.
15528         (begin_function_definition): Use deferred_type_access_control, after
15529         we've started the function.  Set type_lookups to error_mark_node.
15530         * parse.y (frob_specs, fn.def1): Adjust.
15531         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
15532         (parse_end_decl, parse_bitfield0, parse_method): New fns.
15533         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
15534         (after_type_component_declarator0): Likewise.
15535         (after_type_component_declarator): Likewise.
15536         (notype_component_declarator): Likewise.
15537         * cp-tree.h: Adjust.
15538
15539         * decl.c (redeclaration_error_message): Allow redeclaration of
15540         namespace-scope decls.
15541
15542 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
15543
15544         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
15545
15546 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
15547
15548         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
15549         * decl2.c (grokclassfn): Likewise.
15550
15551         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
15552
15553         * decl2.c (lang_decode_option): Don't set default message length
15554         here.
15555         * lex.c (lang_init_options): Set it here.
15556
15557 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
15558
15559         Make DECL_CONTEXT mean the class in which a member function was
15560         declared, even for a virtual function.
15561         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
15562         (DECL_FRIEND_CONTEXT): New macro.
15563         (DECL_REAL_CONTEXT): Remove.
15564         (SET_DECL_FRIEND_CONTEXT): Likewise.
15565         (DECL_VIRTUAL_CONTEXT): Adjust.
15566         (DECL_CLASS_SCOPE_P): Use TYPE_P.
15567         (add_friends): Remove.
15568         (hack_decl_function_context): Likewise.
15569         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
15570         CP_DECL_CONTEXT.
15571         (build_over_call): Fix indentation.  Use DECL_CONTEXT
15572         instead of DECL_CLASS_CONTEXT.
15573         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
15574         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15575         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15576         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
15577         (build_base_field): Likewise.
15578         (finish_struct_1): Likewise.
15579         (build_self_reference): Likewise.
15580         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
15581         DECL_REAL_CONTEXT.
15582         (pushtag): Use decl_function_context, not
15583         hack_decl_function_context.
15584         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15585         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
15586         (pushdecl): Remove bogus code.
15587         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
15588         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15589         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15590         Use decl_function_context, nothack_decl_function_context.
15591         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
15592         (grokdeclarator): Likewise.  Use decl_function_context, not
15593         hack_decl_function_context.
15594         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
15595         (start_function): Use DECL_FRIEND_CONTEXT, not
15596         DECL_CLASS_CONTEXT.  Use decl_function_context, not
15597         hack_decl_function_context.
15598         (finish_function): Use decl_function_context, not
15599         hack_decl_function_context.
15600         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
15601         DECL_CLASS_CONTEXT.
15602         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
15603         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
15604         (grokfield): Likewise.
15605         (finish_builtin_type): Likewise.
15606         (finish_vtable_vardec): Use decl_function_context, not
15607         hack_decl_function_context.
15608         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15609         (start_static_initialization_or_destruction): Likewise.
15610         (finish_static_initialization_or_destruction): Likewise.
15611         (mark_used): Adjust logic for deciding when to synthesize methods.
15612         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
15613         DECL_REAL_CONTEXT.
15614         * error.c (dump_function_decl): Use DECL_CONTEXT, not
15615         DECL_CLASS_CONTEXT.
15616         * friend.c (is_friend): Likewise.
15617         (add_friends): Remove.
15618         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
15619         * lex.c (begin_definition_of_inclass_inline): Use
15620         decl_function_context, not hack_decl_function_context.
15621         (process_next_inline): Likewise.
15622         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
15623         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
15624         DECL_CLASSS_CONTEXT.
15625         (hack_identifier): Likewise.
15626         (synthesize_method):  Use decl_function_context, not
15627         hack_decl_function_context.
15628         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
15629         DECL_REAL_CONTEXT.
15630         (is_member_template): Use decl_function_context, not
15631         hack_decl_function_context.  Use DECL_CONTEXT, not
15632         DECL_CLASS_CONTEXT.
15633         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
15634         DECL_CLASS_CONTEXT.
15635         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
15636         DECL_REAL_CONTEXT.
15637         (push_template_decl_real): Likewise.
15638         (instantiate_class_template): Don't call add_friends.
15639         (tsubst_default_argument): Use DECL_CONTEXT, not
15640         DECL_REAL_CONTEXT.
15641         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
15642         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15643         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
15644         DECL_CLASS_CONTEXT.
15645         * repo.c (repo_inline_used): Likewise.
15646         * search.c (current_scope): Adjust for new _CONTEXT macros.
15647         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
15648         DECL_REAL_CONTEXT.
15649         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
15650         (lookup_fnfields_here):Likewise.
15651         (check_final_overrider): Likewise.
15652         (init_vbase_pointers): Likewise.
15653         (virtual_context): Likewise.
15654         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
15655         (expand_body): Use decl_function_context, not
15656         hack_decl_function_context.
15657         * tree.c (hack_decl_function_context): Remove.
15658         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
15659         DECL_CLASS_CONTEXT.
15660         * typeck2.c (error_not_base_type): Likewise.
15661
15662 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
15663
15664         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
15665
15666 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15667
15668         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
15669
15670 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
15671
15672         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
15673
15674 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
15675
15676         * decl2.c (lang_decode_option): Enable automatic line wrapping.
15677
15678 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
15679
15680         * parse.y (frob_specs): Split out...
15681         (parse_decl): From here.
15682         (fn.def2): Call initial_deferred_type_access_control.
15683         (after_type_component_declarator0): Call frob_specs.
15684         (notype_component_declarator0): Likewise.
15685         * search.c (friend_accessible_p): Nested classes are friends of their
15686         enclosing classes.
15687
15688 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
15689
15690         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
15691         used to create an implicit temporary.
15692
15693         * class.c (dfs_modify_vtables): Tweak calculation of functions to
15694         override.
15695
15696 2000-02-08  Nathan Sidwell  <nathan@acm.org>
15697
15698         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
15699         strip array element qualifiers too.
15700
15701 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
15702
15703         * decl.c (store_parm_decls): Don't build cleanups for parameters
15704         while processing_template_decl.
15705
15706 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
15707
15708         * cp-tree.h (struct saved_scope): Add incomplete field.
15709         (namespace_scope_incomplete): New macro.
15710         * decl.c (pushdecl): Use it.
15711         (hack_incomplete_structures): Use it.  See through artificial
15712         binding levels.
15713         (mark_saved_scope): Mark it.
15714
15715         Implement access control for nested types.
15716         * search.c (type_access_control): New fn.
15717         (accessible_p): Now we do perform access control for types.
15718         * semantics.c (deferred_type_access_control): New fn.
15719         (initial_deferred_type_access_control): New fn.
15720         (begin_function_definition): Call it.  Add lookups parm.
15721         * decl.c (struct binding_level): Add this_class field.
15722         (pushlevel_class): Set it.
15723         (mark_binding_level): Mark it.
15724         (lookup_name_real): Use it.  Call type_access_control.
15725         (mark_saved_scope): Mark lookups field.
15726         * cp-tree.h (flagged_type_tree): Add lookups field.
15727         (struct saved_scope): Add lookups field.
15728         (type_lookups): New macro.
15729         * parse.y (declmods): Now <ftype>.
15730         (parse_decl): Add lookups parm.  Call
15731         initial_deferred_type_access_control.
15732         (lang_extdef): Clear type_lookups.
15733         (typed_declspecs, declmods, typespec): Set lookups field.
15734         (initdcl): Call deferred_type_access_control.
15735         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
15736         component_decl_1, named_parm): Adjust.
15737         * friend.c (is_friend): Nested classes are friends of their
15738         enclosing classes.
15739
15740         * class.c (currently_open_derived_class): New fn.
15741         * method.c (hack_identifier): Use it.
15742
15743         * lex.c (do_identifier): Remove obsolete code.
15744
15745         * parse.y (typed_typespecs): Propagate new_type_flag properly.
15746
15747 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
15748
15749         * tinfo.h: Remove apostrophes from C++ comment (xgettext
15750         thinks this file is plain C).
15751
15752 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15753
15754         * Makefile.in (call.o): Depend on $(EXPR_H).
15755
15756         * call.c: Include "expr.h".
15757
15758         * class.c (dump_class_hierarchy): Add prototype.
15759
15760         * search.c (dfs_get_pure_virtuals): Likewise.
15761
15762 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
15763
15764         * parse.y (simple_stmt): Allow :: token in asm parameter list.
15765         * parse.c: Rebuilt.
15766
15767 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
15768
15769         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
15770         Store it in DECL_FCONTEXT.
15771         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
15772
15773 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
15774
15775         * tinfo.h (old abi): #include "tconfig.h".
15776         * tinfo.cc (convert_to_base): Move into old abi section.
15777
15778 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
15779
15780         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
15781         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
15782         (BINFO_PRIMARY_BINFO): New macro.
15783         (BF_DELTA): Rename to ...
15784         (BV_DELTA): ... this.
15785         (BF_VCALL_INDEX): Rename to ...
15786         (BV_VCALL_INDEX): ... this.
15787         (BF_FN): Rename to ...
15788         (BV_FN): ... this.
15789         * class.c (build_vbase_path): Adjust for changes to reverse_path.
15790         (set_rtti_entry): Rename BF_ macros to BV_ variants.
15791         (modify_vtable_entry): Simplify.
15792         (add_virtual_function): Rename BF_ macros to BV_ variants.
15793         (build_vtable_initializer): Likewise.
15794         (get_class_offset_1): Remove.
15795         (dfs_get_class_offset): Likewise.
15796         (get_class_offset): Likewise.
15797         (dfs_find_final_overrider): New function.
15798         (find_final_overrider): Likewise.
15799         (modify_one_vtable): Remove.
15800         (dfs_find_base): New function.
15801         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
15802         find_final_overrider.
15803         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
15804         virtuals.
15805         (dfs_fixup_vtable_deltas): Remove.
15806         (override_one_vtable): Remove.
15807         (merge_overrides): Likewise.
15808         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
15809         unreal chilren of virtual bases.
15810         (finish_struct_1): Don't use merge_overrides.  Don't use
15811         dfs_fixup_vtable_deltas.
15812         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
15813         BINFOs.
15814
15815 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
15816             Jason Merrill  <jason@yorick.cygnus.com>
15817
15818         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
15819
15820 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
15821
15822         * exception.cc (__throw_bad_typeid): Add missing std::.
15823
15824 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15825
15826         * cp-tree.h (make_thunk): PROTO -> PARAMS.
15827
15828 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
15829
15830         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
15831
15832         Runtime support for new-abi rtti.
15833         * inc/typeinfo (type_info::operator!=): Define in class.
15834         (type_info::before, type_info::name, type_info::operator==,
15835         type_info::operator!=): Define new ABI implementations.
15836         (type_info::is_pointer_p, type_info::is_function_p): Declare
15837         new virtual functions.
15838         (type_info::do_catch, type_info::do_upcast): Likewise.
15839
15840         * tinfo.h (__base_class_info): Define new class.
15841         (__class_type_info): Likewise.
15842         (__si_class_type_info): Likewise.
15843         (__vmi_class_type_info): Likewise.
15844         (__dynamic_cast): Prototype.
15845
15846         * tinfo.cc: Conditionalize old and new rtti mechanisms.
15847         (type_info::is_pointer_p): Define new function.
15848         (type_info::is_function_p): Likewise.
15849         (type_info::do_catch): Likewise.
15850         (type_info::do_upcast): Likewise.
15851         (vtable_prefix): New structure for vtable access.
15852         (adjust_pointer): Define new template function.
15853         (contained_p, public_p, virtual_p, contained_public_p,
15854         contained_nonpublic_p, contained_nonvirtual_p): Define new
15855         functions.
15856         (nonvirtual_base_type): New local variable.
15857         (__class_type_info::~__class_type_info): Define.
15858         (__si_class_type_info::~__si_class_type_info): Likewise.
15859         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
15860         (__class_type_info::do_catch): Define new function.
15861         (__class_type_info::do_upcast): Likewise.
15862         (__class_type_info::find_public_src): Likewise.
15863         (__class_type_info::do_find_public_src): Likewise.
15864         (__si_class_type_info::do_find_public_src): Likewise.
15865         (__vmi_class_type_info::do_find_public_src): Likewise.
15866         (__class_type_info::do_dyncast): Likewise.
15867         (__si_class_type_info::do_dyncast): Likewise.
15868         (__vmi_class_type_info::do_dyncast): Likewise.
15869         (__class_type_info::do_upcast): Likewise.
15870         (__si_class_type_info::do_upcast): Likewise.
15871         (__vmi_class_type_info::do_upcast): Likewise.
15872         (__dynamic_cast): Likewise.
15873
15874         * tinfo2.cc (__fundamental_type_info): Define new class.
15875         (__pointer_type_info): Likewise.
15876         (__reference_type_info): Likewise.
15877         (__array_type_info): Likewise.
15878         (__function_type_info): Likewise.
15879         (__enum_type_info): Likewise.
15880         (__ptr_to_member_type_info): Likewise.
15881         (__fundamental_type_info::~__fundamental_type_info): Define.
15882         (__pointer_type_info::~__pointer_type_info): Likewise.
15883         (__reference_type_info::~__reference_type_info): Likewise.
15884         (__array_type_info::~__array_type_info): Likewise.
15885         (__function_type_info::~__function_type_info): Likewise.
15886         (__enum_type_info::~__enum_type_info): Likewise.
15887         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
15888         (__pointer_type_info::do_catch): Define new function.
15889         (__ptr_to_member_type_info::do_catch): Define new function.
15890
15891         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
15892         (__is_pointer): Likewise.
15893
15894         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
15895
15896 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
15897
15898         * cp/class.c (build_vtable): Rename to build_primary_vtable.
15899         (prepare_fresh_vtable): Rename to build_secondary_vtable.
15900         (make_new_vtable): New function.
15901         (modify_vtable_entry): Handle generation of new vtables correctly.
15902         (modify_one_vtable): Remove unused parameter.
15903         (dfs_fixup_vtable_deltas): Likewise.
15904         (override_one_vtable): Use build_secondary_vtable.
15905         (finish_struct_1): Use build_primary_vtable and
15906         build_secondary_vtable.
15907
15908 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
15909
15910         * cp/decl.c: Adjust variable names, comments, help strings.
15911
15912 2000-01-29  Nathan Sidwell  <nathan@acm.org>
15913
15914         * new2.cc (operator delete[]): Use operator delete, don't assume
15915         implementation.
15916
15917 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
15918
15919         * class.c (build_vtbl_initializer): Add argument to
15920         build_vtable_entry call.
15921
15922 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
15923
15924         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
15925         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
15926         (BF_DELTA): New macro.
15927         (BF_VCALL_INDEX): Likewise.
15928         (BF_FN): Likewise.
15929         (THUNK_VCALL_OFFSET): Likewise.
15930         (make_thunk): Change prototype.
15931         * class.c (build_vtable_entry): Integrate
15932         build_vtable_entry_for_fn.  Handle vcall indices.
15933         (build_vtable_entry_for_fn): Remove.
15934         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
15935         BF_VCALL_INDEX, BF_FN.
15936         (modify_vtable_entry): Integrate common code from
15937         modify_one_vtable and dfs_fixup_vtable_deltas.
15938         (add_virtual_function): Set BF_VCALL_INDEX.
15939         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
15940         and BF_FN.
15941         (modify_one_vtable): Simplify.
15942         (dfs_fixup_vtable_deltas): Likewise.
15943         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
15944         * method.c (make_thunk): Handle vcall indices.
15945
15946 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
15947
15948         Compiler side new abi rtti (not enabled).
15949         * cp-tree.h (new_abi_rtti_p): New macro.
15950         (emit_support_tinfos): Prototype new function.
15951         (tinfo_decl_p): Likewise.
15952         (emit_tinfo_decl): Likwise.
15953         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
15954         macros.
15955         (doing_runtime): New local static.
15956         (init_rtti_processing): Add new-abi initializer.
15957         (get_tinfo_decl): Add new-abi logic.
15958         (tinfo_from_decl): Likewise.
15959         (build_dynamic_cast_1): Likewise.
15960         (qualifier_flags): New static function.
15961         (tinfo_base_init): Likewise.
15962         (generic_initializer): Likewise.
15963         (ptr_ref_initializer): Likewise.
15964         (ptmd_initializer): Likewise.
15965         (class_hint_flags): Likewise.
15966         (class_initializer): Likewise.
15967         (synthesize_tinfo_var): Likewise.
15968         (create_real_tinfo_var): Likewise.
15969         (create_pseudo_type_info): Likewise.
15970         (get_vmi_pseudo_type_info): Likewise.
15971         (create_tinfo_types): Likewise.
15972         (emit_support_tinfos): New global function.
15973         (tinfo_decl_p): New global predicate.
15974         (emit_tinfo_decl): New global function.
15975         * class.c (set_rtti_entry): Generalize for old and new rtti.
15976         (build_vtbl_initializer): Likewise.
15977         * decl2.c (finish_file): Likewise.
15978
15979 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
15980
15981         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
15982         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
15983
15984 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
15985
15986         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
15987         for scopes.
15988
15989 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
15990
15991         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
15992
15993 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
15994
15995         * optimize.c (calls_setjmp_r): Supply new argument
15996         to special_function_p.
15997
15998 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15999
16000         * call.c: PROTO -> PARAMS.
16001         * class.c: Likewise.
16002         * cp-tree.h: Likewise.
16003         * cvt.c: Likewise.
16004         * decl.c: Likewise.
16005         * decl.h: Likewise.
16006         * decl2.c: Likewise.
16007         * dump.c: Likewise.
16008         * errfn.c: Likewise.
16009         * error.c: Likewise.
16010         * except.c: Likewise.
16011         * expr.c: Likewise.
16012         * init.c: Likewise.
16013         * input.c: Likewise.
16014         * lex.c: Likewise.
16015         * lex.h: Likewise.
16016         * method.c: Likewise.
16017         * optimize.c: Likewise.
16018         * parse.y: Likewise.
16019         * pt.c: Likewise.
16020         * repo.c: Likewise.
16021         * rtti.c: Likewise.
16022         * search.c: Likewise.
16023         * semantics.c: Likewise.
16024         * spew.c: Likewise.
16025         * tree.c: Likewise.
16026         * typeck.c: Likewise.
16027         * typeck2.c: Likewise.
16028         * xref.c: Likewise.
16029
16030 2000-01-25  Richard Henderson  <rth@cygnus.com>
16031
16032         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
16033
16034 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
16035
16036         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
16037         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
16038         (struct vcall_offset_data_s): New type.
16039         (dfs_vcall_offset_queue_p): New function.
16040         (dfs_build_vcall_offset_vtbl_entries): Likewise.
16041         (build_vcall_offset_vtbl_entries): Likewise.
16042         (layout_vtable_decl): Likewise.
16043         (num_vfun_entries): Likewise.
16044         (num_extra_vtbl_entries): Add the entries for vcall offsets.
16045         (build_vtbl_initializer): Likewise.
16046         (dfs_finish_vtabls): Use layout_vtable_decl.
16047         (modify_one_vtables): Always duplicate vtables under the new ABI.
16048         (finish_struct_1): Use layout_vtable_decl.
16049
16050 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16051
16052         * decl.c (member_function_or_else): Change third arg from a format
16053         specifier to an `enum overload_flags'.  Callers changed.
16054
16055 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
16056
16057         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
16058         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
16059         build_const_cast, get_delta_difference, check_return_expr): Avoid
16060         ANSI string concatenation usage.
16061
16062 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
16063
16064         * class.c (layout_class_type): Put the fields required to make a
16065         class non-empty at the end, not the beginning, of the TYPE_FIELDs
16066         list.
16067
16068 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
16069
16070         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
16071         template.
16072
16073         * decl2.c (mark_used): Do instantiate inlines that have been
16074         explicitly instantiated.
16075
16076 2000-01-24  Richard Henderson  <rth@cygnus.com>
16077
16078         * call.c (build_over_call): Use expand_tree_builtin.
16079         * typeck.c (build_function_call_real): Likewise.
16080         (build_binary_op_nodefault): Handle unordered compares.
16081
16082 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16083
16084         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
16085         cp_tree_index values.
16086         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
16087         New global node #defines for them.
16088         * rtti.c (call_void_fn): Replace with ...
16089         (build_runtime_decl): ... new static function.
16090         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
16091         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
16092         (build_dynamic_cast_1): Always produce correctly typed result.
16093         Explicitly produce type_info addresses. Use dynamic_cast_node.
16094         * exception.cc (__throw_bad_cast): Return `void *'.
16095         (__throw_bad_typeid): Return `const type_info &'.
16096
16097 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16098
16099         * cp-tree.h (get_vtable_decl): Prototype new function.
16100         * class.c (get_vtable_decl): New function. Broken out from ...
16101         (build_vtable): ... here. Use it.
16102         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
16103         by get_vtable_decl.
16104
16105 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
16106
16107         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
16108         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
16109         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
16110         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
16111         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
16112         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
16113         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
16114         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
16115         (CPTI_TINFO_VAR_ID): New enumeration.
16116         (__tp_desc_type_node, __access_mode_type_node,
16117         __bltn_desc_type_node, __user_desc_type_node,
16118         __class_desc_type_node, __ptr_desc_type_node,
16119         __attr_desc_type_node, __func_desc_type_node,
16120         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
16121         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
16122         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
16123         enum_desc_type_node, class_desc_type_node,
16124         si_class_desc_type_node, vmi_class_desc_type_node,
16125         ptmd_desc_type_node, base_desc_type_node): New #defines.
16126         (tinfo_fn_id, tinfo_fn_type): Rename to ...
16127         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
16128         (tinfo_var_id): New enumeration.
16129         (DECL_TINFO_FN_P): Augment comment.
16130         * decl.c (cp_global_trees): Adjust documentation.
16131         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
16132         tinfo_decl_type and tinfo_var_id.
16133         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
16134         (build_typeid): Remove unused variable.
16135         (get_tinfo_var): Use tinfo_var_id.
16136         (tinfo_name): New static function.
16137         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
16138         (tinfo_from_decl): Likewise.
16139         (get_base_offset): New static function, broken out of
16140         expand_class_desc.
16141         (expand_si_desc): Use tinfo_name.
16142         (expand_class_desc): Likewise. Lose local static variable.
16143         Use base_desc_type_node. Use get_base_offset.
16144         (expand_ptr_desc): Use tinfo_name.
16145         (expand_attr_desc): Likewise.
16146         (expand_generic_desc): Likewise.
16147
16148         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
16149         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
16150
16151 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16152
16153         * cp-tree.h (__eprintf): Remove declaration.
16154         * tree.c (__eprintf): Remove definition.
16155
16156 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
16157             Mark Mitchell  <mark@codesourcery.com>
16158
16159         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
16160         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
16161
16162 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
16163
16164         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
16165
16166 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
16167
16168         * cp-tree.h (register_dtor_fn): New function.
16169         * decl.c (destroy_local_static): Rename to ...
16170         (register_dtor_fn): ... this.  Give it external linkage.
16171         (expand_static_init): Use it.
16172         * decl2.c (do_static_initialization): Likewise, if using
16173         __cxa_atexit.
16174         (do_static_destruction): Check that __cxa_atexit is not in use.
16175         (finish_file): Don't call do_static_destruction if using
16176         __cxa_atexit.
16177
16178         * typeck.c (convert_arguments): Restore two-message error
16179         reporting.
16180
16181 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
16182
16183         Remap dynamic cast hint values to be consistent across ABIs.
16184         * search.c (dynamic_cast_base_recurse): Remap generated value.
16185         (get_dynamic_cast_base_type): Adjust documentation.
16186         * tinfo.h (__user_type_info::dyncast): Likewise.
16187         (__user_type_info::find_public_subobj): Remap BOFF meaning.
16188         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
16189         (__class_type_info::do_dyncast): Likewise.
16190         (__class_type_info::do_find_public_subobj): Likewise.
16191         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
16192
16193 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16194
16195         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
16196
16197         * typeck2.c (incomplete_type_error): Restore previous
16198         cp_error and cp_error_at call sequence.
16199
16200 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
16201
16202         * class.c (dump_class_hierarchy): Make format agree with argument;
16203         cast pointer to unsigned long and print with %lx.
16204
16205 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
16206
16207         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
16208
16209         * typeck.c (composite_pointer_type, common_type,
16210         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
16211         build_function_call_real, convert_arguments,
16212         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
16213         build_unary_op, mark_addressable, build_compound_expr,
16214         build_static_cast, build_reinterpret_cast, build_const_cast,
16215         build_c_cast, build_modify_expr, get_delta_difference,
16216         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
16217         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
16218         into a single one.
16219         * typeck2.c (readonly_error, abstract_virtuals_error,
16220         process_init_constructor, check_for_new_type): Likewise.
16221
16222 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
16223
16224         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
16225         VAR_DECLs.
16226
16227 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
16228
16229         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
16230         (build_x_typeid): Likewise.
16231         (get_tinfo_fn): Likewise.
16232         (get_tinfo_fn_unused): Rename to ...
16233         (get_tinfo_decl): ... here.
16234         * rtti.c (build_headof): Replace logic error with assertion.
16235         (get_tinfo_fn_dynamic): Rename to ...
16236         (get_tinfo_decl_dynamic): ... here. Make static. Use
16237         complete_type_or_else.
16238         (build_x_typeid): Move into ...
16239         (build_typeid): ... here. Adjust call to
16240         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
16241         throw_bad_typeid expression.
16242         (get_tinfo_fn_unused): Rename to ...
16243         (get_tinfo_decl): ... here. Adjust comment.
16244         (get_tinfo_fn): Delete.
16245         (tinfo_from_decl): New static function.
16246         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
16247         (get_typeid): Use complete_type_or_else.
16248         (build_dynamic_cast_1): Adjust calls to
16249         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
16250         * parse.y (primary): Adjust call to build_typeid.
16251         * except.c (build_eh_type_type_ref): Adjust call to
16252         get_tinfo_decl. Mark as used.
16253         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
16254         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
16255         * parse.c: Regenerated.
16256
16257 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
16258
16259         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
16260         calling convention.
16261         (resolves_to_fixed_type_p): Document calling convention.
16262         * rtti.c (build_x_typeid): Initialize NONNULL.
16263
16264         * cp-tree.h (build_shared_int_cst): New function.
16265         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
16266         * class.c (modify_vtable_entry): Likewise.
16267         (add_virtual_function): Split out code to generated shared
16268         INTEGER_CSTs to build_share_int_cst.
16269         (modify_all_vtables): Handle all the overridden functions here.
16270         Add overridden functions from non-primary virtual bases to the
16271         primary vtable.
16272         (finish_struct_1): Adjust call to modify_all_vtables.  Add
16273         overridden functions from non-primary bases to the vtable.
16274         * tree.c (build_shared_int_cst): New function.
16275
16276         * cp-tree.h (scratchalloc): Remove.
16277         (build_scratch_list): Likewise.
16278         * call.c (convert_class_to_reference): Replace build_scratch_list
16279         and build_expr_list with build_tree_list.
16280         (add_candidate): Replace scratchalloc with expralloc.  Note memory
16281         leak.
16282         (build_user_type_conversion_1):  Replace build_scratch_list
16283         and build_expr_list with build_tree_list.
16284         (build_new_op): Likewise.
16285         (build_op_delete_call): Likewise.
16286         (convert_like): Likewise.
16287         * cvt.c (ocp_convert): Likewise.
16288         * decl.c (start_decl): Likewise.
16289         (start_function): Likewise.
16290         (finish_destructor_body): Likewise.
16291         (maybe_build_cleanup_1): Likewise.
16292         * decl2.c (reparse_decl_as_expr): Likewise.
16293         * init.c (perform_member_init): Likewise.
16294         (expand_cleanup_for_base): Likewise.
16295         (build_builtin_delete_call): Likewise.
16296         (build_new_1): Likewise.
16297         (build_delete): Likewise.
16298         * method.c (do_build_assign_ref): Likewise.
16299         * parse.y (already_scoped_stmt): Likewise.
16300         (nontrivial_exprlist): Likewise.
16301         (net_initializer): Likewise.
16302         (initlist): Likewise.
16303         * parse.c: Regenerated.
16304         * rtti.c (build_x_typeid): Likewise.
16305         (build_dynamic_cast_1): Likewise.
16306         * typeck.c (build_x_compound_expr): Likewise.
16307         (build_static_cast): Likewise.
16308         (build_modify_expr): Likewise.
16309
16310         * cp-tree.h (DECL_VINDEX): Add documentation.
16311         * class.c (build_vtable_entry): Likewise.
16312         (start_vtable): Add comment.
16313         (add_virtual_function): Replace pending_hard_virtuals with
16314         overridden_virtuals and pending_virtuals with new_virtuals.
16315         Replace redundant assignments with assertions.
16316         (check_for_override): Add comment.
16317         (check_bases_and_members): Replace pending_hard_virtuals with
16318         overridden_virtuals and pending_virtuals with new_virtuals.
16319         (create_vtbl_ptr): Likewise.
16320         (layout_class_type): Likewise.
16321         (finish_struct_1): Likewise.  Add comments.
16322
16323 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
16324
16325         * class.c (finish_struct_1): Replace redundant code with
16326         assertions.
16327
16328         * cp-tree.h (flag_new_abi): Move.
16329         (flag_use_cxa_atexit): Likewise.
16330         (flag_honor_std): Likewise.
16331         (flag_rtti): Likewise.
16332         (vbase_offsets_in_vtable_p): Define.
16333         (vptrs_present_everywhere_p): Likewise.
16334         (TYPE_CONTAINS_VPTR_P): Likewise.
16335         (dfs_walk_real): Declare.
16336         * class.c (build_vbase_pointer_fields): Check
16337         vbase_offsets_in_vtable_p.
16338         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
16339         BINFO_VPTR_FIELD.
16340         (build_vbase_offset_vtbl_entries): Simplify.
16341         (build_vbase_offset_vtbl_entries): Adjust.
16342         (build_vbase_pointer): Add ability to look up vbase offsets in
16343         vtable.
16344         (start_vtable): New function.
16345         (add_virtual_function): Use it.
16346         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
16347         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
16348         (build_vtbl_initializer): Take the type of the complete object as
16349         input.  Use it to correctly calculate vbase offsets.
16350         (dfs_finish_vtbls): Pass the complete type to
16351         build_vtbl_initializer.
16352         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
16353         (create_vtable_ptr): Create a vtable even if there are no
16354         new virtual functions, under the new ABI.
16355         (finish_struct_1): Likewise.
16356         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
16357         * decl.c (exapnd_static_init): Remove call to
16358         preserve_initializer.
16359         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
16360         vtables.
16361         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
16362         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
16363         (construct_virtual_bases): Don't initialize virtual base pointers
16364         under the new ABI.
16365         (build_aggr_init): Clean up comment.
16366         (expand_aggr_init_1): Likewise.
16367         * rtti.c (expand_class_desc): Store the virtual function table
16368         index where the vbase offset lives in the offset field.
16369         * search.c (dfs_walk_real): Make it global.
16370         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
16371         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
16372
16373         * tinfo.h (USItype): Make it signed under the new ABI.
16374         * tinfo.cc (convert_to_base): New function.  Encapsulate base
16375         conversion logic here.
16376         (__class_type_info::do_upcast): Use it.
16377         (__class_type_info::do_dyncast): Likewise.
16378         (__class_type_info::do_find_public_subobj): Likewise.
16379
16380         * init.c (construct_virtual_bases): Don't look up the addresses of
16381         virtual bases at run-time.
16382
16383         * class.c (build_vbase_pointer): Relocate.
16384         (build_vbase_pointer_fields): Likewise.
16385         (dfs_build_vbase_offset_vtbl_entries): Likewise.
16386         (build_vbase_offset_vtbl_entries): Likewise.
16387
16388         * decl.c (init_decl_processing): Complain if -fnew-abi
16389         -fno-vtable-thunks is used.
16390
16391         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
16392         flag_new_abi.
16393
16394 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
16395
16396         * cp-tree.h (num_extra_vtbl_entries): New function.
16397         (size_extra_vtbl_entries): Likewise.
16398         (dfs_vtable_path_unmark): Likewise.
16399         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
16400         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
16401         * class.c (num_extra_vtbl_entries): New function.
16402         (size_extra_vtbl_entries): Likewise.
16403         (dfs_build_vbase_offset_vtbl_entries): New function.
16404         (build_vbase_offset_vtbl_entries): Likewise.
16405         (build_vtbl_initializer): Use it.
16406         (finish_struct_1): Adjust vtable sizes (using
16407         num_extra_vtbl_entries).
16408         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
16409         THUNK_DECL is non-NULL before expanding it.
16410         * init.c (expand_virtual_init): Adjust the vtable pointer by
16411         size_extra_vtbl_entries before storing it.
16412         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
16413         Handle TREE_LIST parameters here, not in the dfs_* functions.
16414         (dfs_unmarked_real_bases_queue_p): Adjust.
16415         (dfs_marked_real_bases_queue_p): Likewise.
16416         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
16417         (dfs_vtable_path_marked_real_bases_queue_p): New function.
16418         (dfs_vtable_path_unmark): Likewise.
16419
16420 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
16421
16422         * optimize.c (copy_body_r): Clear the operand three of a
16423         TARGET_EXPR when copying it.
16424
16425 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16426
16427         * method.c (build_decl_overload_real): Check whether we are in ::
16428         before returning __builtin_new/delete.
16429
16430 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
16431
16432         * pt.c (tsubst_friend_function): Improve comment.
16433         (instantiate_decl): Avoid crashing when a "nested" function is
16434         instantiated from the top level.
16435
16436         * dump.c (dqeueue_and_dump): Dump
16437         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
16438
16439 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16440
16441         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
16442
16443 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
16444
16445         * g++spec.c (lang_specific_driver): Add -fnew-abi if
16446         ENABLE_NEW_GXX_ABI defined.
16447         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
16448         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
16449         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
16450
16451 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
16452
16453         * decl.c (start_cleanup_fn): Call pushdecl.
16454
16455         * call.c (convert_class_to_reference): Fix typos.
16456         (build_conditional_expr): Handle errors gracefully.
16457         * class.c (push_nested_class): Likewise.
16458         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
16459         (DECL_THIS_EXTERN): Use it.
16460         (DECL_THIS_STATIC): Likewise.
16461         * cvt.c (convert_to_void): Handle errors gracefully.
16462         (build_expr_type_conversion): Likewise.
16463         * decl.c (maybe_push_decl): Likewise.
16464         (start_decl_1): Likewise.
16465         (require_complete_types_for_parms): Likewise.
16466         * parse.y (structsp): Likewise.
16467         (base_class): Likewise.
16468         * parse.c: Regenerated.
16469         * pt.c (finish_member_template_decl): Likewise.
16470         * typeck.c (decay_conversion): Likewise.
16471
16472         * cp-tree.h (dfs_skip_vbases): New function.
16473         (find_vbase_instance): Likewise.
16474         * class.c (determine_primary_base): Allow a nearly empty base to
16475         serve as a primary base class under the new ABI.
16476         (get_class_offset_1): Rename to ...
16477         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
16478         messages here.
16479         (get_class_offset): Use it.  Issue error messages here.
16480         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
16481         find the right copies of virtual bases.
16482         (fixup_vtable_deltas1): Rename to ...
16483         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
16484         bases as primary bases.
16485         (fixup_vtable_deltas): Remove.
16486         (override_one_vtable): Handle virtual bases as primary bases.
16487         (merge_overrides): Likewise.
16488         (finish_struct_1): Likewise.
16489         (dump_class_hierarchy): Dump primary-ness of bases as well.
16490         * search.c (mark_primary_bases): Use a pre-order traversal to
16491         handle primary virtual bases.
16492         (dfs_skip_vbases): New fiunction.
16493         (expand_upcast_fixups): Adjust to handle primary virtual bases.
16494         (fixup_virtual_upcast_offsets): Likewise.
16495         (fixup_all_virtual_upcast_offsets): Likewise.
16496         (dfs_find_vbase_instances): New function.
16497         (find_vbase_instance): Likewise.
16498
16499 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
16500
16501         * lex.c (DIR_SEPARATOR): Delete macro.
16502
16503 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
16504
16505        * decl2.c (lang_decode_option): Handle automatic line wrapping
16506        option.
16507
16508 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
16509
16510         * friend.c (do_friend): Don't resolve scopes when processing
16511         template declarations, even if the qualifying scope doesn't
16512         involve template parameters.
16513
16514 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
16515
16516         * class.c (dfs_modify_vtables_queue_p): Remove.
16517         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
16518         and dfs_marked_real_bases_queue_p instead of
16519         dfs_modify_vtables_queue_p.
16520
16521         * class.c (build_vbase_path): Simplify.
16522         (dfs_propagate_binfo_offsets): New function.
16523         (propagate_binfo_offsets): Use it.
16524         (remove_base_field): Simplify.
16525         (dfs_set_offset_for_vbases): Remove.
16526         (dfs_set_offset_for_shared_vbases): New function.
16527         (dfs_set_offset_for_unshared_vbases): Likewise.
16528         (layout_virtual_bases): Use them.
16529         (layout_basetypes): Don't call propagate_binfo_offsets.
16530         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
16531         for the vbases.
16532
16533         * class.c (build_base_field): New function, split out from ...
16534         (build_base_fields): ... here.  Use it.  Allocate primary bases
16535         first, under the new ABI.
16536         (get_vtable_entry): Remove.
16537         (remove_base_field): New function, split out from ...
16538         (remove_base_fields): ... here.  Adjust since primary bases come
16539         first under the new ABI.
16540
16541         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
16542         (initialize_vtbl_ptrs): New function.
16543         (expand_indirect_vtbls_init): Change prototype.
16544         (convert_pointer_to_vbase): Declare.
16545         * init.c (expand_direct_vtbls_init): Remove.
16546         (dfs_initialize_vtbl_ptrs): New function.
16547         (initialize_vtbl_ptrs): Likewise.
16548         (emit_base_init): Use initialize_vtbl_ptrs.
16549         * search.c (convert_pointer_to_vbase): Make it global.
16550         (expand_indirect_vtbls_init): Remove vtable initialization code.
16551         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
16552
16553         * class.c (dfs_finish_vtbls): New function.
16554         (finish_vtbls): Use it.
16555         (dump_class_hierarchy): New function.
16556
16557         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
16558         (BINFO_VBASE_PRIMARY_P): New macro.
16559         (BINFO_VIRTUALS): Add to documentation.
16560         (SET_BINFO_PRIMARY_MARKED_P): Remove.
16561         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16562         (dfs_mark_primary_bases_queue_p): Likewise.
16563         (dfs_unmarked_real_bases_queue_p): New function.
16564         (dfs_marked_real_bases_queue_p): Likewise.
16565         * search.c (dfs_mark_primary_bases): Adjust.
16566         (mark_primary_bases): Likewise.
16567         (get_shared_vbase_if_not_primary): New function.
16568         (dfs_unmarked_real_bases_queue_p): Likewise.
16569         (dfs_marked_real_bases_queue_p): Likewise.
16570         (dfs_get_pure_virtuals): Simplify.
16571         (get_pure_virtuals): Likewise.
16572
16573 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16574
16575         * lex.c: Include tm_p.h.
16576
16577 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
16578
16579         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
16580
16581 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
16582
16583         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
16584         * pt.c (instantiate_decl): Defer comdat templates that might not be
16585         needed.
16586
16587         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
16588         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
16589         (finish_file): Likewise.
16590
16591         * decl2.c (import_export_class): Undo 12/14 change.
16592
16593         * error.c (dump_decl): operator new, not operatornew.
16594
16595         * class.c (field_decl_cmp): A nontype is "greater" than a type.
16596         * search.c (lookup_field_1): Look for the last field with the
16597         desired name.
16598
16599 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16600
16601         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
16602         FUNCTION_DECL.
16603
16604 2000-01-05  Nathan Sidwell  <nathan@acm.org>
16605
16606         * typeck.c (build_static_cast): Don't strip target qualifiers
16607         when casting from a class.
16608
16609 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16610
16611         * class.c (warn_hidden): Initialize variable `fndecl'.
16612
16613 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
16614
16615         * decl.c (flag_isoc9x): New variable to be able to use code in
16616         c-common.c.  For now always zero.
16617
16618 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
16619
16620         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
16621         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
16622         or unshare_base_binfos for virtual bases here.
16623         * search.c (dfs_get_vbase_types): Do it here.
16624         (get_vbase_types): Adjust.
16625
16626 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
16627
16628         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
16629         (BINFO_PRIMARY_MARKED_P): Use flag 5.
16630         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16631         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16632         (unmark_primary_bases): Remove declaration.
16633         (unmarkedp): Declare.
16634         (dfs_vbase_unmark): Likewise.
16635         * class.c (determine_primary_base): Return immediately if there
16636         are no base classes.  Call mark_primary_bases here.
16637         (modify_all_direct_vtables): Remove.
16638         (modify_all_indirect_vtables): Remove.
16639         (dfs_modify_vtables_queue_p): New function.
16640         (dfs_modify_vtables): New function.
16641         (modify_all_vtables): Use them.
16642         (build_base_fields): Build FIELD_DECLs for primary virtual base
16643         classes.
16644         (create_vtable_ptr): Don't call determine_primary_base here.
16645         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
16646         (dfs_set_offset_for_vbases): ... this.
16647         (layout_virtual_bases): Use it.
16648         (layout_class_type): Call determine_primary_base here.
16649         * search.c (unmarkedp): Make it global.
16650         (shared_marked_p): Simplify.
16651         (shared_unmarked_p): Likewise.
16652         (dfs_primary_bases_queue_p): Remove.
16653         (dfs_unmark_primary_bases): Likewise.
16654         (unmark_primary_bases): Likewise.
16655         (mark_primary_bases): Simplify.
16656         (get_pure_virtuals): Don't call mark_primary_bases here.
16657         (dfs_vbase_unmark): New function.
16658         (get_vbase_types): Simplify.
16659
16660         * class.c (struct base_info): Remove.
16661         (determine_primary_base): Take has_virtual_p rather than a
16662         base_info as input.  Don't calculate max_has_virtual.
16663         (finish_struct_bits): Remove max_has_virtual argument.
16664         (create_vtable_ptr): Remove max_has_virtual_p argument.
16665         (layout_virtual_bases): Remove max argument.
16666         (layout_basetypes): Likewise.
16667         (layout_class_type): Remove max_has_virtual_p argument.
16668         (finish_struct_1): Remove max_has_virtual.
16669
16670         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
16671         (layout_basetypes): Remove.
16672         * class.c (propagate_binfo_offsets): Moved here from tree.c.
16673         Update to handle primary virtual bases.
16674         (remove_base_fields): New function, split out from
16675         layout_basetypes.
16676         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
16677         (layout_virtual_bases): New function, split out from
16678         layout_basetypes.  Update to handle primary virtual bases.
16679         (layout_basetypes): Moved here from tree.c.  Use
16680         remove_base_fields and layout_virtual_bases.
16681         * search.c (dfs_mark_primary_bases_queue_p): New function.
16682         (mark_primary_bases): Use it.
16683         * tree.c (CEIL): Remove.
16684         (propagate_binfo_offsets): Remove.
16685         (layout_basetypes): Remove.
16686
16687 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16688
16689         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
16690         (BINFO_PRIMARY_MARKED_P): New macro.
16691         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
16692         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
16693         (mark_primary_bases): New function.
16694         (unmark_primary_bases): Likewise.
16695         * search.c (get_abstract_virtuals_1): Remove.
16696         (dfs_mark_primary_bases): New function.
16697         (mark_primary_bases): Likewise.
16698         (dfs_unmark_primary_bases): Likewise.
16699         (unmark_primary_bases): Likewise.
16700         (dfs_get_pure_virtuals): Likewise.
16701
16702 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
16703
16704         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
16705         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
16706         (modify_one_vtable): Adjust.
16707         (fixup_vtable_deltas1): Likewise.
16708         (override_one_vtable): Likewise.
16709         * search.c (get_abstract_virtuals_1): Likewise.
16710         (get_pure_virtuals): Likewise.
16711         (expand_upcast_fixups): Likewise.
16712         * tree.c (debug_binfo): Likewise.
16713
16714         * class.c (build_vtable): Don't return a value.  Don't rebuild
16715         vtables for bases that have already been handled.
16716         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
16717         already been handled.
16718         (modify_one_vtable): Adjust accordingly.
16719         (fixup_vtable_deltas1): Likewise.
16720         (finish_struct_1): Likewise.
16721
16722 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
16723
16724         * call.c (build_new_method_call): Also check destructors.